@ranger-testing/ranger-cli 3.1.5 → 3.1.6-alpha.4287155-52
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.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1e5a54,_0x2056f8){const _0x5e17ec=_0x49b4,_0x102813=_0x1e5a54();while(!![]){try{const _0x1d733=parseInt(_0x5e17ec(0x8d))/0x1+-parseInt(_0x5e17ec(0xb6))/0x2*(-parseInt(_0x5e17ec(0xab))/0x3)+-parseInt(_0x5e17ec(0xad))/0x4+parseInt(_0x5e17ec(0xb5))/0x5*(parseInt(_0x5e17ec(0x7c))/0x6)+parseInt(_0x5e17ec(0xb4))/0x7+parseInt(_0x5e17ec(0x73))/0x8+-parseInt(_0x5e17ec(0x97))/0x9;if(_0x1d733===_0x2056f8)break;else _0x102813['push'](_0x102813['shift']());}catch(_0xfa443){_0x102813['push'](_0x102813['shift']());}}}(_0x19e4,0x88876));function _0x19e4(){const _0xf0c03f=['resolvedEnv','figbT','uiQlV','RANGER_SESSION_STATE_PATH=','2124138hbzlBy','iCofa','2668436ZSabBq','message','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','key','Profile\x20\x22','lunKt','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','2963478OlAInW','2214755VPzLZM','2flEkwI','skDSY','VDUwf','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','7867392JOekYS','`\x20to\x20recreate\x20it.','FEcat','\x22.\x20Pass\x20--profile\x20','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','name','\x20\x20Note:\x20--env\x20\x22','local','UcbQd','6UkYIQU','startPath','env','BNYRy','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','source','telemetry','aWqDf','ZmzYG','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','log','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','prompt','authEnv','\x20does\x20not\x20exist.','gehWY','baseUrl','1084124HuheUM','list','kYhSY','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','`ranger\x20profile\x20add`\x20to\x20create\x20one.','envBaseUrl','settings','envStartPath','domains','21740112RSbhdq','KZnRu','laEcA','UGQpP','ySFwh','\x20to\x20override.','KNHuo','kYpOf','profile','RANGER_SESSION_STATE_PATH','cdpEndpoint','GWisu','environmentKey','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','cwd','taIpE'];_0x19e4=function(){return _0xf0c03f;};return _0x19e4();}import{existsSync}from'fs';import _0x342380 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';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x4a9cc4){const _0x4af5e0=_0x49b4,_0xfba835={'kYpOf':function(_0x5982c2){return _0x5982c2();},'UcbQd':function(_0x4b4c41){return _0x4b4c41();},'dBwum':function(_0x4b1d09,_0x38967c){return _0x4b1d09!==_0x38967c;},'BNYRy':function(_0x34c729,_0x3ade94){return _0x34c729(_0x3ade94);},'FEcat':function(_0xf1d115,_0x481ece){return _0xf1d115??_0x481ece;},'ZmzYG':function(_0x173554,_0x3828c6){return _0x173554+_0x3828c6;},'figbT':function(_0x5bf103,_0x1a156c){return _0x5bf103+_0x1a156c;},'vzxrX':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','uiQlV':_0x4af5e0(0x85),'GWisu':function(_0x3549c5,_0x4fea1f){return _0x3549c5(_0x4fea1f);},'UGQpP':function(_0x824fe8,_0xcc4866){return _0x824fe8 instanceof _0xcc4866;},'akaQH':function(_0x1dd704,_0x38f4bc){return _0x1dd704===_0x38f4bc;},'laEcA':function(_0x4a6528,_0xf5caf){return _0x4a6528+_0xf5caf;},'BRKRe':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','pgvXB':_0x4af5e0(0x92),'vprfx':function(_0x78d812,_0xef3ad5){return _0x78d812&&_0xef3ad5;},'KZnRu':'Local\x20profile','ySFwh':'cloud','zqiMW':function(_0x310386,_0x182559){return _0x310386===_0x182559;},'VDUwf':function(_0x300e42,_0x24491e,_0x4713ab){return _0x300e42(_0x24491e,_0x4713ab);},'lunKt':function(_0x54b837){return _0x54b837();},'NRZaI':function(_0x570bc3,_0x10e68e){return _0x570bc3(_0x10e68e);},'skDSY':function(_0x2f6b47,_0xf575b8){return _0x2f6b47(_0xf575b8);},'gehWY':function(_0x24d1b5,_0x295d8c){return _0x24d1b5+_0x295d8c;},'KNHuo':function(_0x564e60,_0x18fc61){return _0x564e60+_0x18fc61;},'taIpE':_0x4af5e0(0xb3),'EmjyP':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a'},_0x3d477b=_0x4a9cc4['profile'];let _0x299215=_0x3d477b,_0x1fa216=null;const _0xa87349=_0x3d477b?null:await _0xfba835[_0x4af5e0(0x9e)](readActiveProfileName);if(_0x4a9cc4['authEnv']&&_0x3d477b)console['log'](_0x4af5e0(0x79)+_0x4a9cc4[_0x4af5e0(0x89)]+_0x4af5e0(0x80));else _0x4a9cc4['authEnv']&&!process['env']['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x4a9cc4['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x3d477b&&process[_0x4af5e0(0x7e)]['RANGER_TEST_USERNAME'])try{const _0x531a27=await resolveAdHocProfile({'targetUrl':_0x4a9cc4[_0x4af5e0(0x8c)]??_0xfba835[_0x4af5e0(0x7b)](readUrlEnvVars)[_0x4af5e0(0x93)],'envKey':_0x4a9cc4['authEnv']});_0x531a27&&(_0xa87349&&_0xfba835['dBwum'](_0xa87349,_0x531a27[_0x4af5e0(0x78)])&&console[_0x4af5e0(0x86)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x531a27[_0x4af5e0(0x78)]+_0x4af5e0(0x72)+_0xa87349+_0x4af5e0(0x76)+_0xa87349+_0x4af5e0(0x9c)),_0x299215=_0x531a27[_0x4af5e0(0x78)],_0x1fa216=_0x531a27[_0x4af5e0(0x9f)]);}catch(_0xc83beb){if(!_0xa87349||_0x4a9cc4['authEnv'])throw _0xc83beb;console[_0x4af5e0(0x86)]('\x20\x20Warning:\x20'+(_0xc83beb instanceof Error?_0xc83beb[_0x4af5e0(0xae)]:_0xfba835[_0x4af5e0(0x7f)](String,_0xc83beb))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0xa87349+'\x22.');}if(!_0x299215)_0x299215=_0xfba835[_0x4af5e0(0x75)](_0xa87349,undefined);if(!_0x299215)try{const _0x30d411=await _0xfba835['UcbQd'](listCloudProfiles);if(_0x30d411['length']===0x1){const _0x5ef5ad=_0x30d411[0x0];_0x299215=_0x5ef5ad[_0x4af5e0(0x78)],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x5ef5ad['name']),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x299215)throw new Error(_0xfba835[_0x4af5e0(0x84)](_0xfba835['ZmzYG'](_0xfba835[_0x4af5e0(0xa8)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x4af5e0(0x87))+_0xfba835['vzxrX'],_0xfba835[_0x4af5e0(0xa9)]),_0x4af5e0(0x77)));const _0x40b66e=_0xfba835[_0x4af5e0(0x7f)](getEnvDir,_0x299215),_0x5616ff=existsSync(_0x40b66e);let _0x4c31f2=_0x1fa216,_0x4dbb11=![];if(!_0x4c31f2)try{_0x4c31f2=await _0xfba835[_0x4af5e0(0xa2)](fetchCloudProfile,_0x299215);if(!_0x4c31f2)_0x4dbb11=!![];}catch(_0x4dc75b){_0xfba835[_0x4af5e0(0x9a)](_0x4dc75b,ApiError)&&_0xfba835['akaQH'](_0x4dc75b['status'],0x194)&&(_0x4dbb11=!![]);}if(_0x3d477b&&_0x4dbb11&&!_0x5616ff&&!_0x4c31f2)throw new Error(_0xfba835[_0x4af5e0(0x99)](_0x4af5e0(0xb1)+_0x3d477b+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0xfba835['BRKRe'])+_0xfba835['pgvXB']);if(_0xfba835['vprfx'](_0x4c31f2,_0x5616ff)){let _0x34777b=!![];if(isInteractive()){const {source:_0x298139}=await _0x342380[_0x4af5e0(0x88)]([{'type':_0x4af5e0(0x8e),'name':_0x4af5e0(0x81),'message':_0x4af5e0(0xb1)+_0x299215+_0x4af5e0(0xa4),'choices':[{'name':'Cloud\x20profile\x20(recommended)','value':'cloud'},{'name':_0xfba835[_0x4af5e0(0x98)],'value':_0x4af5e0(0x7a)}],'default':_0xfba835[_0x4af5e0(0x9b)]}]);_0x34777b=_0xfba835['zqiMW'](_0x298139,_0xfba835[_0x4af5e0(0x9b)]);}if(!_0x34777b)_0x4c31f2=null;}const _0x27ee23=_0xfba835['VDUwf'](readProfileOverrides,process[_0x4af5e0(0xa5)](),_0x299215);let _0x35c1db=null,_0x177fd8,_0x2a8aa6,_0x32c6ba,_0x50c664,_0xe5dd3d=null,_0x289428,_0x5dafb3;const _0x4c4e89=_0xfba835[_0x4af5e0(0x7f)](expandOverrides,_0x27ee23),_0x145af6=_0xfba835[_0x4af5e0(0xb2)](readUrlEnvVars);if(_0x4c31f2){_0x35c1db=_0x4c31f2;const _0x447037=_0x4c31f2[_0x4af5e0(0x94)]??{},_0x511d5d=_0xfba835['VDUwf'](mergeCloudProfileSettings,_0x447037,_0x27ee23??undefined),_0x3df357={..._0x4c31f2,'settings':_0x511d5d};_0xe5dd3d={'baseUrl':_0xfba835[_0x4af5e0(0x7f)](expandString,_0x447037[_0x4af5e0(0x8c)]),'startPath':_0xfba835[_0x4af5e0(0xa2)](expandString,_0x447037[_0x4af5e0(0x7d)])};const _0x547697=await _0xfba835['UcbQd'](fetchAuthConfig),_0x551f80=_0x547697?resolveAuthEnvironmentLocally(_0x547697,_0x4c31f2[_0x4af5e0(0xa3)]):null;_0x289428=_0x551f80?.['domains']?.[0x0],_0x5dafb3=_0x551f80?.[_0x4af5e0(0xb0)];const _0x5551bf=_0xfba835[_0x4af5e0(0x7f)](resolveProfileUrl,{'flagBaseUrl':_0x4a9cc4[_0x4af5e0(0x8c)],'flagStartPath':_0x4a9cc4['startPath'],'envBaseUrl':_0x145af6[_0x4af5e0(0x93)],'envStartPath':_0x145af6[_0x4af5e0(0x95)],'projectOverrides':_0x4c4e89,'cloudSettings':_0xe5dd3d,'authEnvironmentDomain':_0x289428}),_0x50c640=process[_0x4af5e0(0x7e)][_0x4af5e0(0xa0)];if(_0x50c640){if(!_0xfba835[_0x4af5e0(0x7f)](existsSync,_0x50c640))throw new Error(_0x4af5e0(0xaa)+_0x50c640+_0x4af5e0(0x8a));_0x177fd8=_0x50c640,_0x2a8aa6=_0xfba835['NRZaI'](resolveEnvVars,_0x511d5d),_0x32c6ba=Boolean(_0x2a8aa6['cdpEndpoint']);}else{const _0x2f0b44=await _0xfba835[_0x4af5e0(0xb8)](resolveCloudProfileSession,_0x3df357,{'effectiveBaseUrl':_0x5551bf[_0x4af5e0(0x8c)],'telemetry':_0x4a9cc4[_0x4af5e0(0x82)]});_0x177fd8=_0x2f0b44['authPath'],_0x2a8aa6=_0xfba835[_0x4af5e0(0xb7)](resolveEnvVars,_0x2f0b44[_0x4af5e0(0x94)]),_0x32c6ba=Boolean(_0x2a8aa6[_0x4af5e0(0xa1)]),_0x289428=_0x2f0b44['resolvedEnv']?.[_0x4af5e0(0x96)]?.[0x0],_0x5dafb3=_0x2f0b44[_0x4af5e0(0xa7)]?.['key'];}}else{if(!_0x5616ff){const _0x1a5eb7=!_0x3d477b;throw new Error(_0x1a5eb7?_0xfba835['gehWY'](_0xfba835[_0x4af5e0(0x8b)](_0xfba835[_0x4af5e0(0x9d)]('Active\x20profile\x20\x22'+_0x299215+_0x4af5e0(0x91),_0xfba835[_0x4af5e0(0xa6)]),_0xfba835['EmjyP']),_0x4af5e0(0x90)+_0x299215+_0x4af5e0(0x74)):_0x4af5e0(0xb1)+_0x299215+_0x4af5e0(0xaf)+_0x299215);}const _0x2c0a93=await loadSettings(_0x299215);_0x2a8aa6=_0xfba835['BNYRy'](resolveEnvVars,_0x2c0a93),_0x32c6ba=Boolean(_0x2a8aa6['cdpEndpoint']),_0x50c664=_0x2a8aa6['baseUrl'];}const _0x55f3fa=resolveProfileUrl({'flagBaseUrl':_0x4a9cc4['baseUrl'],'flagStartPath':_0x4a9cc4['startPath'],'envBaseUrl':_0x145af6[_0x4af5e0(0x93)],'envStartPath':_0x145af6['envStartPath'],'localSettingsBaseUrl':_0x50c664,'projectOverrides':_0x4c4e89,'cloudSettings':_0xe5dd3d,'authEnvironmentDomain':_0x289428}),_0x19c06c=_0x55f3fa['url']??_0x55f3fa['baseUrl'];if(!_0x19c06c&&!_0x32c6ba)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x299215+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x299215+'\x20baseUrl\x20<url>');return{'activeProfile':_0x299215,'resolvedCloudProfile':_0x35c1db,'cloudAuthPath':_0x177fd8,'resolvedSettings':_0x2a8aa6,'isCdpMode':_0x32c6ba,'url':_0x19c06c,'baseUrlSource':_0x55f3fa['baseUrlSource'],'authEnvKey':_0x5dafb3,'startPath':_0x55f3fa['startPath']};}function expandString(_0x1642f1){if(typeof _0x1642f1!=='string')return _0x1642f1;return resolveEnvVars(_0x1642f1);}function _0x49b4(_0x4632d4,_0x4a89a7){_0x4632d4=_0x4632d4-0x72;const _0x19e465=_0x19e4();let _0x49b467=_0x19e465[_0x4632d4];return _0x49b467;}function expandOverrides(_0xf9f49b){const _0x46efd8=_0x49b4,_0x2aaed5={'kYhSY':function(_0x2a999d,_0x2c9a58){return _0x2a999d===_0x2c9a58;},'iCofa':'string','aWqDf':function(_0x247c78,_0x3f8209){return _0x247c78(_0x3f8209);}};if(!_0xf9f49b)return _0xf9f49b;const _0xcc1765={..._0xf9f49b};return _0x2aaed5[_0x46efd8(0x8f)](typeof _0xcc1765[_0x46efd8(0x8c)],_0x2aaed5[_0x46efd8(0xac)])&&(_0xcc1765['baseUrl']=resolveEnvVars(_0xcc1765[_0x46efd8(0x8c)])),typeof _0xcc1765[_0x46efd8(0x7d)]==='string'&&(_0xcc1765[_0x46efd8(0x7d)]=_0x2aaed5[_0x46efd8(0x83)](resolveEnvVars,_0xcc1765['startPath'])),_0xcc1765;}
|
|
1
|
+
(function(_0x13c1a8,_0x457160){const _0x541d82=_0x250e,_0x54592b=_0x13c1a8();while(!![]){try{const _0x456ce4=-parseInt(_0x541d82(0x12a))/0x1+-parseInt(_0x541d82(0xfd))/0x2+parseInt(_0x541d82(0x11f))/0x3+-parseInt(_0x541d82(0x103))/0x4+parseInt(_0x541d82(0x11c))/0x5*(parseInt(_0x541d82(0x126))/0x6)+-parseInt(_0x541d82(0x101))/0x7*(-parseInt(_0x541d82(0xf9))/0x8)+parseInt(_0x541d82(0x124))/0x9;if(_0x456ce4===_0x457160)break;else _0x54592b['push'](_0x54592b['shift']());}catch(_0x160b63){_0x54592b['push'](_0x54592b['shift']());}}}(_0x2d9d,0xef208));import{existsSync}from'fs';import _0x5090dc from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';function _0x2d9d(){const _0x2babf7=['`ranger\x20profile\x20add`\x20to\x20create\x20one.','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','Local\x20profile','baseUrl','telemetry','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','domains','zWiwT','settings','TsjYz','xNHKQ','resolvedEnv','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','CSkaM','tyyPC','log','345DKLGsk','name','\x20\x20Warning:\x20','2821500WDVLYx','Active\x20profile\x20\x22','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','profile','2788677MlJpOr','\x20\x20Note:\x20--env\x20\x22','144060EMFzoh','length','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','HtThA','306744iyuysw','gYdOE','envBaseUrl','environmentKey','QjYdf','eYEoI','AeWwH','baseUrlSource','wxsnS','NFIHx','Iskmn','string','cdpEndpoint','authEnv','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','cloud','72hzjHHK','startPath','tkvgJ','\x22.\x20Pass\x20--profile\x20','2226156eYFNMa','key','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','envStartPath','469973ILbhjW','vWMpA','4448032pKMfNl','\x20baseUrl\x20<url>','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','APbes','Profile\x20\x22','KAozC','env','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)'];_0x2d9d=function(){return _0x2babf7;};return _0x2d9d();}import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';function _0x250e(_0x546bd2,_0x202727){_0x546bd2=_0x546bd2-0xf7;const _0x2d9da6=_0x2d9d();let _0x250e3a=_0x2d9da6[_0x546bd2];return _0x250e3a;}import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x2c9b3f){const _0x328b64=_0x250e,_0x321f48={'vWMpA':function(_0x43de87){return _0x43de87();},'TsjYz':function(_0x3b852a,_0x39722a){return _0x3b852a??_0x39722a;},'CSkaM':function(_0x10f6c5,_0x5f3caa){return _0x10f6c5+_0x5f3caa;},'SIECd':'Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','VQvYv':_0x328b64(0x128),'gYdOE':function(_0x398477,_0x4c268d){return _0x398477(_0x4c268d);},'APbes':function(_0x3f4825,_0xd36088){return _0x3f4825 instanceof _0xd36088;},'tkvgJ':function(_0x46b1be,_0x3eb302){return _0x46b1be+_0x3eb302;},'wxsnS':_0x328b64(0x10c),'HtThA':function(_0x55309a,_0x4cd819){return _0x55309a&&_0x4cd819;},'KAozC':'list','Spesa':'Cloud\x20profile\x20(recommended)','QjYdf':'local','zYtuE':_0x328b64(0xf8),'MMkqQ':function(_0x1daf15,_0x4de11f){return _0x1daf15===_0x4de11f;},'NFIHx':function(_0x260b9d,_0x159929){return _0x260b9d(_0x159929);},'eYEoI':function(_0xefaae4,_0xcd2812,_0x5d65a3){return _0xefaae4(_0xcd2812,_0x5d65a3);},'HoNqC':function(_0x209617){return _0x209617();},'Iskmn':function(_0x3aaf6a,_0x35319d){return _0x3aaf6a(_0x35319d);},'EVklD':function(_0x5b6f84,_0x1a8b52){return _0x5b6f84(_0x1a8b52);},'OKUFY':function(_0x4aaf91,_0x3c603c){return _0x4aaf91+_0x3c603c;},'rEmVB':function(_0x20d798,_0x23676a){return _0x20d798+_0x23676a;},'tyyPC':_0x328b64(0x10d)},_0x5d06d9=_0x2c9b3f[_0x328b64(0x123)];let _0x40a614=_0x5d06d9,_0x508c11=null;const _0x422553=_0x5d06d9?null:await _0x321f48[_0x328b64(0x102)](readActiveProfileName);if(_0x2c9b3f['authEnv']&&_0x5d06d9)console['log'](_0x328b64(0x125)+_0x2c9b3f['authEnv']+'\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.');else _0x2c9b3f['authEnv']&&!process[_0x328b64(0x10a)]['RANGER_TEST_USERNAME']&&console['log'](_0x328b64(0x125)+_0x2c9b3f[_0x328b64(0x137)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x5d06d9&&process[_0x328b64(0x10a)]['RANGER_TEST_USERNAME'])try{const _0x691ab9=await resolveAdHocProfile({'targetUrl':_0x2c9b3f['baseUrl']??_0x321f48['vWMpA'](readUrlEnvVars)['envBaseUrl'],'envKey':_0x2c9b3f[_0x328b64(0x137)]});_0x691ab9&&(_0x422553&&_0x422553!==_0x691ab9['name']&&console[_0x328b64(0x11b)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x691ab9['name']+_0x328b64(0x118)+_0x422553+_0x328b64(0xfc)+_0x422553+'\x20to\x20override.'),_0x40a614=_0x691ab9[_0x328b64(0x11d)],_0x508c11=_0x691ab9['profile']);}catch(_0x2098e7){if(!_0x422553||_0x2c9b3f[_0x328b64(0x137)])throw _0x2098e7;console['log'](_0x328b64(0x11e)+(_0x2098e7 instanceof Error?_0x2098e7['message']:String(_0x2098e7))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x422553+'\x22.');}if(!_0x40a614)_0x40a614=_0x321f48[_0x328b64(0x115)](_0x422553,undefined);if(!_0x40a614)try{const _0x913140=await listCloudProfiles();if(_0x913140[_0x328b64(0x127)]===0x1){const _0x431920=_0x913140[0x0];_0x40a614=_0x431920[_0x328b64(0x11d)],console['log'](_0x328b64(0xff)+_0x431920[_0x328b64(0x11d)]),console[_0x328b64(0x11b)](_0x328b64(0x10b));}}catch{}if(!_0x40a614)throw new Error(_0x321f48[_0x328b64(0x119)](_0x321f48[_0x328b64(0x119)](_0x321f48['CSkaM'](_0x321f48[_0x328b64(0x119)](_0x321f48['SIECd'],_0x328b64(0x138)),_0x321f48['VQvYv']),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x328b64(0x122)));const _0x1de870=getEnvDir(_0x40a614),_0x26880b=_0x321f48['gYdOE'](existsSync,_0x1de870);let _0x2344b2=_0x508c11,_0x3202fe=![];if(!_0x2344b2)try{_0x2344b2=await fetchCloudProfile(_0x40a614);if(!_0x2344b2)_0x3202fe=!![];}catch(_0x51e833){_0x321f48[_0x328b64(0x107)](_0x51e833,ApiError)&&_0x51e833['status']===0x194&&(_0x3202fe=!![]);}if(_0x5d06d9&&_0x3202fe&&!_0x26880b&&!_0x2344b2)throw new Error(_0x321f48['tkvgJ'](_0x321f48[_0x328b64(0x119)]('Profile\x20\x22'+_0x5d06d9+_0x328b64(0x121),'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),_0x321f48[_0x328b64(0x132)]));if(_0x321f48[_0x328b64(0x129)](_0x2344b2,_0x26880b)){let _0x4b5a0c=!![];if(isInteractive()){const {source:_0x185bbc}=await _0x5090dc['prompt']([{'type':_0x321f48[_0x328b64(0x109)],'name':'source','message':'Profile\x20\x22'+_0x40a614+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x321f48['Spesa'],'value':'cloud'},{'name':_0x328b64(0x10e),'value':_0x321f48[_0x328b64(0x12e)]}],'default':_0x321f48['zYtuE']}]);_0x4b5a0c=_0x321f48['MMkqQ'](_0x185bbc,_0x321f48['zYtuE']);}if(!_0x4b5a0c)_0x2344b2=null;}const _0x37e502=readProfileOverrides(process['cwd'](),_0x40a614);let _0x50e072=null,_0xc59cd5,_0x229a9a,_0x4e3396,_0x3a32bc,_0x3c7fad=null,_0x313347,_0x4c95fa;const _0x944977=_0x321f48[_0x328b64(0x133)](expandOverrides,_0x37e502),_0x4808e3=readUrlEnvVars();if(_0x2344b2){_0x50e072=_0x2344b2;const _0x52db5a=_0x2344b2[_0x328b64(0x114)]??{},_0x1db2cd=_0x321f48[_0x328b64(0x12f)](mergeCloudProfileSettings,_0x52db5a,_0x37e502??undefined),_0x38eb99={..._0x2344b2,'settings':_0x1db2cd};_0x3c7fad={'baseUrl':expandString(_0x52db5a[_0x328b64(0x10f)]),'startPath':expandString(_0x52db5a[_0x328b64(0xfa)])};const _0x1af372=await _0x321f48['HoNqC'](fetchAuthConfig),_0x5726a5=_0x1af372?resolveAuthEnvironmentLocally(_0x1af372,_0x2344b2[_0x328b64(0x12d)]):null;_0x313347=_0x5726a5?.[_0x328b64(0x112)]?.[0x0],_0x4c95fa=_0x5726a5?.[_0x328b64(0xfe)];const _0x1e434b=resolveProfileUrl({'flagBaseUrl':_0x2c9b3f['baseUrl'],'flagStartPath':_0x2c9b3f[_0x328b64(0xfa)],'envBaseUrl':_0x4808e3['envBaseUrl'],'envStartPath':_0x4808e3[_0x328b64(0x100)],'projectOverrides':_0x944977,'cloudSettings':_0x3c7fad,'authEnvironmentDomain':_0x313347}),_0x5b9042=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x5b9042){if(!_0x321f48[_0x328b64(0x134)](existsSync,_0x5b9042))throw new Error('RANGER_SESSION_STATE_PATH='+_0x5b9042+'\x20does\x20not\x20exist.');_0xc59cd5=_0x5b9042,_0x229a9a=_0x321f48['EVklD'](resolveEnvVars,_0x1db2cd),_0x4e3396=Boolean(_0x229a9a['cdpEndpoint']);}else{const _0x11d089=await _0x321f48[_0x328b64(0x12f)](resolveCloudProfileSession,_0x38eb99,{'effectiveBaseUrl':_0x1e434b['baseUrl'],'telemetry':_0x2c9b3f[_0x328b64(0x110)]});_0xc59cd5=_0x11d089['authPath'],_0x229a9a=resolveEnvVars(_0x11d089[_0x328b64(0x114)]),_0x4e3396=_0x321f48['Iskmn'](Boolean,_0x229a9a['cdpEndpoint']),_0x313347=_0x11d089['resolvedEnv']?.[_0x328b64(0x112)]?.[0x0],_0x4c95fa=_0x11d089[_0x328b64(0x117)]?.['key'];}}else{if(!_0x26880b){const _0x5452a7=!_0x5d06d9;throw new Error(_0x5452a7?_0x321f48[_0x328b64(0xfb)](_0x321f48['OKUFY'](_0x321f48['rEmVB'](_0x328b64(0x120)+_0x40a614+_0x328b64(0x106),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'),_0x321f48[_0x328b64(0x11a)]),_0x328b64(0x111)+_0x40a614+'`\x20to\x20recreate\x20it.'):_0x328b64(0x108)+_0x40a614+_0x328b64(0x105)+_0x40a614);}const _0x439ad9=await _0x321f48[_0x328b64(0x134)](loadSettings,_0x40a614);_0x229a9a=resolveEnvVars(_0x439ad9),_0x4e3396=Boolean(_0x229a9a[_0x328b64(0x136)]),_0x3a32bc=_0x229a9a['baseUrl'];}const _0x23e70c=_0x321f48[_0x328b64(0x12b)](resolveProfileUrl,{'flagBaseUrl':_0x2c9b3f[_0x328b64(0x10f)],'flagStartPath':_0x2c9b3f[_0x328b64(0xfa)],'envBaseUrl':_0x4808e3[_0x328b64(0x12c)],'envStartPath':_0x4808e3[_0x328b64(0x100)],'localSettingsBaseUrl':_0x3a32bc,'projectOverrides':_0x944977,'cloudSettings':_0x3c7fad,'authEnvironmentDomain':_0x313347}),_0x4be5ff=_0x23e70c['url']??_0x23e70c['baseUrl'];if(!_0x4be5ff&&!_0x4e3396)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x40a614+_0x328b64(0xf7)+_0x40a614+_0x328b64(0x104));return{'activeProfile':_0x40a614,'resolvedCloudProfile':_0x50e072,'cloudAuthPath':_0xc59cd5,'resolvedSettings':_0x229a9a,'isCdpMode':_0x4e3396,'url':_0x4be5ff,'baseUrlSource':_0x23e70c[_0x328b64(0x131)],'authEnvKey':_0x4c95fa,'startPath':_0x23e70c[_0x328b64(0xfa)]};}function expandString(_0x5100a6){const _0xd6e318=_0x250e,_0x820bde={'xNHKQ':function(_0x149460,_0x51908e){return _0x149460!==_0x51908e;},'ToYpP':'string','SXlhJ':function(_0x17c1d6,_0x2eb810){return _0x17c1d6(_0x2eb810);}};if(_0x820bde[_0xd6e318(0x116)](typeof _0x5100a6,_0x820bde['ToYpP']))return _0x5100a6;return _0x820bde['SXlhJ'](resolveEnvVars,_0x5100a6);}function expandOverrides(_0x302a19){const _0x54bd87=_0x250e,_0x2a055b={'AeWwH':function(_0x441b1c,_0x20aa03){return _0x441b1c===_0x20aa03;},'FServ':function(_0x395be3,_0x364e69){return _0x395be3(_0x364e69);},'zWiwT':function(_0x1f3985,_0x566b9c){return _0x1f3985===_0x566b9c;}};if(!_0x302a19)return _0x302a19;const _0x864b15={..._0x302a19};return _0x2a055b[_0x54bd87(0x130)](typeof _0x864b15['baseUrl'],_0x54bd87(0x135))&&(_0x864b15[_0x54bd87(0x10f)]=_0x2a055b['FServ'](resolveEnvVars,_0x864b15['baseUrl'])),_0x2a055b[_0x54bd87(0x113)](typeof _0x864b15[_0x54bd87(0xfa)],_0x54bd87(0x135))&&(_0x864b15[_0x54bd87(0xfa)]=resolveEnvVars(_0x864b15[_0x54bd87(0xfa)])),_0x864b15;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x324361=_0x47d2;(function(_0x2f2875,_0x1e77e7){const _0xf9b293=_0x47d2,_0x1a7e05=_0x2f2875();while(!![]){try{const _0xe289db=-parseInt(_0xf9b293(0x1ac))/0x1*(parseInt(_0xf9b293(0x1a5))/0x2)+-parseInt(_0xf9b293(0x1bd))/0x3+parseInt(_0xf9b293(0x1b1))/0x4+parseInt(_0xf9b293(0x1a9))/0x5*(parseInt(_0xf9b293(0x1c2))/0x6)+-parseInt(_0xf9b293(0x1b2))/0x7*(-parseInt(_0xf9b293(0x1b5))/0x8)+parseInt(_0xf9b293(0x1c3))/0x9+parseInt(_0xf9b293(0x1b8))/0xa*(parseInt(_0xf9b293(0x1bb))/0xb);if(_0xe289db===_0x1e77e7)break;else _0x1a7e05['push'](_0x1a7e05['shift']());}catch(_0x1b3aca){_0x1a7e05['push'](_0x1a7e05['shift']());}}}(_0x2c2d,0x43f80));function firstDefined(..._0x31bcff){const _0x40e5b7={'MAPRQ':function(_0x477bd2,_0x139d40){return _0x477bd2!==_0x139d40;}};for(const _0x1e5c63 of _0x31bcff){if(_0x1e5c63!==undefined&&_0x40e5b7['MAPRQ'](_0x1e5c63,null)&&_0x1e5c63!=='')return _0x1e5c63;}return undefined;}function normalizeAuthEnvironmentDomain(_0x3808d4){const _0x1afac4=_0x47d2;if(!_0x3808d4)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x3808d4))return _0x3808d4;return _0x1afac4(0x1ae)+_0x3808d4;}export function resolveBaseUrlWithSource(_0x59e745){const _0x5448fe=_0x47d2,_0x4c5fef={'eOptz':'baseUrl','dVSmK':function(_0x5671b2,_0x13ca26){return _0x5671b2===_0x13ca26;},'eVWKp':'local\x20profile\x20settings','VtGfh':_0x5448fe(0x1af),'OkkJC':_0x5448fe(0x1b0),'OyEPN':function(_0x30f892,_0x18540e){return _0x30f892!==_0x18540e;}},_0x3036ca=_0x59e745[_0x5448fe(0x1a7)],_0x3ce8c6=!!_0x3036ca&&_0x4c5fef[_0x5448fe(0x1c0)]in _0x3036ca,_0x488c1d=_0x3036ca?.['baseUrl'],_0x15eca7=!(_0x3ce8c6&&_0x4c5fef[_0x5448fe(0x1b9)](_0x488c1d,null)),_0x3139d1=[[_0x59e745[_0x5448fe(0x1b7)],_0x5448fe(0x1b3)],[_0x59e745['envBaseUrl'],_0x5448fe(0x1aa)],[_0x59e745[_0x5448fe(0x1c4)],_0x4c5fef['eVWKp']],[typeof _0x488c1d===_0x5448fe(0x1bc)?_0x488c1d:undefined,'projects.json\x20override'],[_0x15eca7?_0x59e745['cloudSettings']?.['baseUrl']:undefined,_0x4c5fef['VtGfh']],[_0x15eca7?normalizeAuthEnvironmentDomain(_0x59e745[_0x5448fe(0x1be)]):undefined,_0x4c5fef[_0x5448fe(0x1a8)]]];for(const [_0x14f6a9,_0x41a509]of _0x3139d1){if(_0x14f6a9!==undefined&&_0x14f6a9!==null&&_0x4c5fef['OyEPN'](_0x14f6a9,''))return{'baseUrl':_0x14f6a9,'source':_0x41a509};}return{};}export function resolveBaseUrl(_0x222ce0){return resolveBaseUrlWithSource(_0x222ce0)['baseUrl'];}function _0x47d2(_0xcd2f5f,_0x1315c8){_0xcd2f5f=_0xcd2f5f-0x1a5;const _0x2c2dcb=_0x2c2d();let _0x47d2f3=_0x2c2dcb[_0xcd2f5f];return _0x47d2f3;}export function resolveStartPath(_0x4c8d87){const _0x3c40ee=_0x47d2,_0x47a772={'LqIxO':'startPath','meNvu':function(_0x1081b3,_0x3cfedd){return _0x1081b3===_0x3cfedd;},'CxxuD':function(_0x3cc38e,_0x45b929,_0x2c344b,_0x4c4625,_0x134c92){return _0x3cc38e(_0x45b929,_0x2c344b,_0x4c4625,_0x134c92);},'jFOdu':'string'},_0x2b0562=_0x4c8d87['projectOverrides'],_0x3ef464=!!_0x2b0562&&_0x47a772[_0x3c40ee(0x1b4)]in _0x2b0562,_0x558e5f=_0x2b0562?.[_0x3c40ee(0x1ab)],_0x32633a=!(_0x3ef464&&_0x47a772[_0x3c40ee(0x1c1)](_0x558e5f,null));return _0x47a772[_0x3c40ee(0x1bf)](firstDefined,_0x4c8d87[_0x3c40ee(0x1ba)],_0x4c8d87[_0x3c40ee(0x1ad)],typeof _0x558e5f===_0x47a772[_0x3c40ee(0x1b6)]?_0x558e5f:undefined,_0x32633a?_0x4c8d87['cloudSettings']?.['startPath']:undefined);}function _0x2c2d(){const _0xb55501=['startPath','5900IPqZoc','envStartPath','https://','cloud\x20profile\x20settings','auth\x20environment\x20domain','420708KDynNd','21csuARj','--base-url','LqIxO','10712wOlhMB','jFOdu','flagBaseUrl','36870iqSehI','dVSmK','flagStartPath','1254iFZFbb','string','906099UhNvDG','authEnvironmentDomain','CxxuD','eOptz','meNvu','55836kMeJbt','2257155cPHFXm','localSettingsBaseUrl','134Tbjorm','env','projectOverrides','OkkJC','105vQxXIZ','RANGER_BASE_URL'];_0x2c2d=function(){return _0xb55501;};return _0x2c2d();}export function joinBaseAndPath(_0x2caabd,_0x44e2a8){const _0x149f5e={'wtFFe':function(_0x532863,_0x19859d){return _0x532863+_0x19859d;},'mvYAc':function(_0x5ac9d9,_0x12d802){return _0x5ac9d9+_0x12d802;}};if(!_0x2caabd)return undefined;if(!_0x44e2a8)return _0x2caabd;const _0x4a7368=_0x2caabd['endsWith']('/')?_0x2caabd['slice'](0x0,-0x1):_0x2caabd,_0x1c5481=_0x44e2a8['startsWith']('/')?_0x44e2a8:_0x149f5e['wtFFe']('/',_0x44e2a8);return _0x149f5e['mvYAc'](_0x4a7368,_0x1c5481);}export function resolveProfileUrl(_0x3770e9){const _0x35609f={'hpudP':function(_0x42f55c,_0x588414){return _0x42f55c(_0x588414);}},{baseUrl:_0x4bb355,source:_0x45f0a7}=_0x35609f['hpudP'](resolveBaseUrlWithSource,_0x3770e9),_0x2489eb=resolveStartPath(_0x3770e9);return{'baseUrl':_0x4bb355,'baseUrlSource':_0x45f0a7,'startPath':_0x2489eb,'url':joinBaseAndPath(_0x4bb355,_0x2489eb)};}export function readUrlEnvVars(_0x8d6ef0=process[_0x324361(0x1a6)]){return{'envBaseUrl':_0x8d6ef0['RANGER_BASE_URL'],'envStartPath':_0x8d6ef0['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x164aed,_0x52f78d){const _0x30f80e=_0x151f,_0x532bd8=_0x164aed();while(!![]){try{const _0x27a639=parseInt(_0x30f80e(0x1f7))/0x1*(-parseInt(_0x30f80e(0x1f5))/0x2)+-parseInt(_0x30f80e(0x1fa))/0x3*(parseInt(_0x30f80e(0x1f8))/0x4)+parseInt(_0x30f80e(0x1ed))/0x5+-parseInt(_0x30f80e(0x1fb))/0x6*(-parseInt(_0x30f80e(0x1f3))/0x7)+parseInt(_0x30f80e(0x1ec))/0x8+parseInt(_0x30f80e(0x1ef))/0x9*(parseInt(_0x30f80e(0x1f9))/0xa)+-parseInt(_0x30f80e(0x1f0))/0xb*(parseInt(_0x30f80e(0x1fc))/0xc);if(_0x27a639===_0x52f78d)break;else _0x532bd8['push'](_0x532bd8['shift']());}catch(_0x5e871b){_0x532bd8['push'](_0x532bd8['shift']());}}}(_0x16b9,0xbb310));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x151f(_0x382da0,_0x465104){_0x382da0=_0x382da0-0x1ec;const _0x16b916=_0x16b9();let _0x151fae=_0x16b916[_0x382da0];return _0x151fae;}function _0x16b9(){const _0x168d32=['maxRetries','9XBPAaM','3668423DHEAKS','label','ms...','254513VKbxqh','dtiQB','2ssBPFU','error','1434461JAIwzv','11756UXzQjX','5281630gyTiXx','1206HEcEID','72EqlDkZ','12elcZym','12137128VJQdJM','6172780qXRPoA'];_0x16b9=function(){return _0x168d32;};return _0x16b9();}export async function withRetry(_0x2fe32c,_0x54d787){const _0x3c0793=_0x151f,_0x5a9d9f={'dtiQB':function(_0x56c0b8){return _0x56c0b8();},'Ofugg':function(_0x180acd,_0x1784f6){return _0x180acd instanceof _0x1784f6;}},_0x453906=_0x54d787?.[_0x3c0793(0x1ee)]??DEFAULT_MAX_RETRIES,_0x30c377=_0x54d787?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x4202d2;for(let _0x3b22b5=0x0;_0x3b22b5<=_0x453906;_0x3b22b5++){try{return await _0x5a9d9f[_0x3c0793(0x1f4)](_0x2fe32c);}catch(_0x91cda4){_0x4202d2=_0x5a9d9f['Ofugg'](_0x91cda4,Error)?_0x91cda4:new Error(String(_0x91cda4));if(_0x3b22b5<_0x453906){const _0x3ffe13=_0x30c377*Math['pow'](0x2,_0x3b22b5);_0x54d787?.['label']&&console[_0x3c0793(0x1f6)](_0x54d787[_0x3c0793(0x1f1)]+'\x20failed\x20(attempt\x20'+(_0x3b22b5+0x1)+'/'+(_0x453906+0x1)+'),\x20retrying\x20in\x20'+_0x3ffe13+_0x3c0793(0x1f2)),await new Promise(_0xbad14c=>setTimeout(_0xbad14c,_0x3ffe13));}}}throw _0x4202d2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2147(){const _0x3c4d15=['1045052Snwquv','matchAll','604604Yydeas','replace','2mKFVZz','11996EhEzAb','3019010tNUnGE','9VHpKwi','3367144XzUEDk','1638890UudIsj','136xtLiBM','origin','6091386xNlwGu','1059EFbycs'];_0x2147=function(){return _0x3c4d15;};return _0x2147();}function _0x12ec(_0x4bb13e,_0x56e43a){_0x4bb13e=_0x4bb13e-0x111;const _0x214704=_0x2147();let _0x12ecd2=_0x214704[_0x4bb13e];return _0x12ecd2;}(function(_0x2796b9,_0x2ff96e){const _0x1211fd=_0x12ec,_0x2952dc=_0x2796b9();while(!![]){try{const _0x265c8c=-parseInt(_0x1211fd(0x11e))/0x1*(-parseInt(_0x1211fd(0x11a))/0x2)+-parseInt(_0x1211fd(0x119))/0x3*(parseInt(_0x1211fd(0x111))/0x4)+parseInt(_0x1211fd(0x115))/0x5+-parseInt(_0x1211fd(0x118))/0x6+parseInt(_0x1211fd(0x11c))/0x7*(parseInt(_0x1211fd(0x116))/0x8)+parseInt(_0x1211fd(0x113))/0x9*(parseInt(_0x1211fd(0x112))/0xa)+-parseInt(_0x1211fd(0x114))/0xb;if(_0x265c8c===_0x2ff96e)break;else _0x2952dc['push'](_0x2952dc['shift']());}catch(_0x1bf8b5){_0x2952dc['push'](_0x2952dc['shift']());}}}(_0x2147,0xba4c1));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x3a5747){const _0x456811=_0x12ec,_0x4d0acd=new Set();for(const _0x2230f3 of _0x3a5747[_0x456811(0x11b)](ABSOLUTE_URL_PATTERN)){const _0x56cf7f=_0x2230f3[0x0][_0x456811(0x11d)](/[.,;:!?]+$/,'');try{_0x4d0acd['add'](new URL(_0x56cf7f)[_0x456811(0x117)]);}catch{}}return[..._0x4d0acd];}export function findScenarioOriginMismatches(_0xa3029f,_0x320e49){const _0x2f4fc9={'rlJcA':function(_0x48f135,_0xda6bc3){return _0x48f135(_0xda6bc3);}};let _0x529eee;try{_0x529eee=new URL(_0x320e49)['origin'];}catch{return[];}return _0x2f4fc9['rlJcA'](extractUrlOrigins,_0xa3029f)['filter'](_0x4893c4=>_0x4893c4!==_0x529eee);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x337bee=_0x2ff3;(function(_0x588893,_0x197fdc){const _0x241ad1=_0x2ff3,_0x596e9d=_0x588893();while(!![]){try{const _0x57cc91=parseInt(_0x241ad1(0x16a))/0x1*(parseInt(_0x241ad1(0x153))/0x2)+parseInt(_0x241ad1(0x16e))/0x3*(-parseInt(_0x241ad1(0x162))/0x4)+-parseInt(_0x241ad1(0x157))/0x5+parseInt(_0x241ad1(0x15c))/0x6+parseInt(_0x241ad1(0x167))/0x7+-parseInt(_0x241ad1(0x17b))/0x8*(-parseInt(_0x241ad1(0x15a))/0x9)+parseInt(_0x241ad1(0x166))/0xa;if(_0x57cc91===_0x197fdc)break;else _0x596e9d['push'](_0x596e9d['shift']());}catch(_0x41202a){_0x596e9d['push'](_0x596e9d['shift']());}}}(_0x2324,0x935f3));import*as _0x4d3a0f from'fs';import*as _0x2932e1 from'path';import*as _0x34da45 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x2932e1['join'](_0x34da45[_0x337bee(0x152)](),'.claude',_0x337bee(0x177));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x14c7b6=_0x337bee,_0x1179e1={'bEUpE':'utf-8'};try{if(_0x4d3a0f['existsSync'](CACHE_FILE)){const _0x3d0680=JSON[_0x14c7b6(0x170)](_0x4d3a0f['readFileSync'](CACHE_FILE,_0x1179e1[_0x14c7b6(0x172)]));return{'version':0x3,'sessions':_0x3d0680['sessions']||{},'branches':_0x3d0680[_0x14c7b6(0x174)]||{},'lastEnabledSessionClearedAt':_0x3d0680['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x55e880){const _0x28accc=_0x337bee;try{const _0x56b86c=_0x2932e1[_0x28accc(0x16d)](CACHE_FILE);!_0x4d3a0f[_0x28accc(0x175)](_0x56b86c)&&_0x4d3a0f[_0x28accc(0x171)](_0x56b86c,{'recursive':!![]}),_0x4d3a0f[_0x28accc(0x161)](CACHE_FILE,JSON[_0x28accc(0x14b)](_0x55e880,null,0x2));}catch{}}export function getCurrentBranch(){const _0xb13b63=_0x337bee,_0x2f8f1e={'ShKrB':_0xb13b63(0x14a),'qSPXh':_0xb13b63(0x148),'aqkyO':'pipe','MXlpn':'HEAD'};try{const _0x2e5001=execSync(_0x2f8f1e[_0xb13b63(0x17a)],{'encoding':_0x2f8f1e[_0xb13b63(0x164)],'stdio':[_0xb13b63(0x149),'pipe',_0x2f8f1e['aqkyO']]})[_0xb13b63(0x15b)]();if(!_0x2e5001||_0x2e5001===_0x2f8f1e[_0xb13b63(0x17f)])return null;return _0x2e5001;}catch{return null;}}function _0x2ff3(_0x5c638f,_0x3e7aa6){_0x5c638f=_0x5c638f-0x148;const _0x2324f7=_0x2324();let _0x2ff32a=_0x2324f7[_0x5c638f];return _0x2ff32a;}export function enableBranch(_0x17f8d3){const _0x317667=_0x337bee,_0x407e58=loadCache();_0x407e58[_0x317667(0x174)][_0x17f8d3]=!![],saveCache(_0x407e58);}export function disableBranch(_0x166f28){const _0x178b1f=loadCache();delete _0x178b1f['branches'][_0x166f28],saveCache(_0x178b1f);}export function isBranchEnabled(_0x297c90){const _0x20585b=_0x337bee,_0x323f0c={'WnFCL':function(_0x5179ca){return _0x5179ca();}},_0x31a465=_0x323f0c['WnFCL'](loadCache);return _0x31a465[_0x20585b(0x174)][_0x297c90]===!![];}function getOrCreateSession(_0x285057,_0x24020b){return!_0x285057['sessions'][_0x24020b]&&(_0x285057['sessions'][_0x24020b]={}),_0x285057['sessions'][_0x24020b];}export function enableSession(_0x35613c){const _0x4d6025=_0x337bee,_0x1167c3={'zkola':'main'},_0x362d4a=loadCache(),_0x2570e7=getOrCreateSession(_0x362d4a,_0x35613c);_0x2570e7[_0x4d6025(0x15d)]=!![];const _0x41db83=getCurrentBranch();_0x41db83&&_0x41db83!==_0x1167c3[_0x4d6025(0x16c)]&&_0x41db83!=='master'&&(_0x362d4a['branches'][_0x41db83]=!![],_0x2570e7[_0x4d6025(0x158)]=_0x41db83),saveCache(_0x362d4a);}export function isSessionEnabled(_0x397032){const _0x129e02=_0x337bee,_0x2d4bed={'psxYN':function(_0x34cf88){return _0x34cf88();},'cyGmS':function(_0xf942e3,_0xe3e98d){return _0xf942e3===_0xe3e98d;},'rcora':function(_0x211aa7,_0x355f46){return _0x211aa7===_0x355f46;}},_0x179325=loadCache(),_0x3aaaff=_0x2d4bed[_0x129e02(0x160)](getCurrentBranch);if(!_0x3aaaff||_0x2d4bed['cyGmS'](_0x3aaaff,'main')||_0x2d4bed[_0x129e02(0x17d)](_0x3aaaff,_0x129e02(0x16f)))return _0x179325['sessions'][_0x397032]?.['enabled']===!![];const _0x178111=_0x2d4bed['cyGmS'](_0x179325[_0x129e02(0x174)][_0x3aaaff],!![]),_0x31d3dc=_0x179325[_0x129e02(0x14e)][_0x397032]?.[_0x129e02(0x15d)]===!![];return _0x178111||_0x31d3dc;}export function disableSession(_0x1bb4e7){const _0x4cbb74=loadCache(),_0x463e3f=getOrCreateSession(_0x4cbb74,_0x1bb4e7);_0x463e3f['enabled']=![],saveCache(_0x4cbb74);}export function updateBranchTracking(_0x4534c4){const _0x3354d1=_0x337bee,_0x41cb36={'SUDpO':_0x3354d1(0x16f)},_0x337143=loadCache(),_0x13939a=_0x337143[_0x3354d1(0x14e)][_0x4534c4];if(!_0x13939a?.[_0x3354d1(0x15d)])return;const _0x1088c7=getCurrentBranch();if(!_0x1088c7||_0x1088c7==='main'||_0x1088c7===_0x41cb36[_0x3354d1(0x178)])return;_0x13939a['currentBranch']!==_0x1088c7&&(_0x337143['branches'][_0x1088c7]=!![],_0x13939a[_0x3354d1(0x158)]=_0x1088c7,saveCache(_0x337143));}export function initBranchTracking(_0x47090c){const _0x2df4c6=_0x337bee,_0x76c435={'fWdHN':function(_0x28b07d){return _0x28b07d();},'WRmaN':function(_0x3be3be,_0x14667d){return _0x3be3be===_0x14667d;},'ptrbD':_0x2df4c6(0x165),'HAhcs':'master','nhVgd':function(_0x367ef0,_0x3921b0){return _0x367ef0(_0x3921b0);}},_0xd7d99c=_0x76c435['fWdHN'](loadCache),_0x291bf4=_0x76c435['fWdHN'](getCurrentBranch);if(!_0x291bf4||_0x76c435[_0x2df4c6(0x168)](_0x291bf4,_0x76c435[_0x2df4c6(0x163)])||_0x291bf4===_0x76c435['HAhcs'])return;if(_0xd7d99c[_0x2df4c6(0x174)][_0x291bf4]===!![]){const _0x4eb647=getOrCreateSession(_0xd7d99c,_0x47090c);_0x4eb647[_0x2df4c6(0x15d)]=!![],_0x4eb647[_0x2df4c6(0x158)]=_0x291bf4,_0x76c435['nhVgd'](saveCache,_0xd7d99c);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x2324(){const _0x1f728c=['bvtoF','sessions','lastPlanReminderAt','registeredAt','Cindk','homedir','2476KjmoSb','oywyn','dTHhZ','leqCj','4691040sJiatl','currentBranch','tCwWi','3696885TkDCKz','trim','3697512chLrNA','enabled','ebZha','zZiAE','psxYN','writeFileSync','4PxlFDt','ptrbD','qSPXh','main','159840ZlIBue','3531003AahCfU','WRmaN','toISOString','5UCnYWK','featureId','zkola','dirname','35331GsvMRj','master','parse','mkdirSync','bEUpE','lastStopReminderAt','branches','existsSync','uAcVm','.ranger_cache.json','SUDpO','SBKZS','ShKrB','8JquWWV','now','rcora','jBKcS','MXlpn','utf-8','pipe','git\x20rev-parse\x20--abbrev-ref\x20HEAD','stringify','lastEnabledSessionClearedAt'];_0x2324=function(){return _0x1f728c;};return _0x2324();}export function recordEnabledSessionCleared(_0x1f9ee0){const _0x1bbad9=_0x337bee,_0x21a1b3=loadCache(),_0xf37bc4=_0x21a1b3[_0x1bbad9(0x14e)][_0x1f9ee0];_0xf37bc4?.['enabled']&&(_0x21a1b3['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x21a1b3));}export function shouldAutoEnableAfterClear(_0x38332f){const _0x479e01=_0x337bee,_0x49db1f={'dkvTX':function(_0x4c36a6,_0x39f8cc){return _0x4c36a6!==_0x39f8cc;},'dTHhZ':'clear','leqCj':function(_0x31d151){return _0x31d151();},'oywyn':function(_0x50933d,_0x115266){return _0x50933d-_0x115266;}};if(_0x49db1f['dkvTX'](_0x38332f,_0x49db1f[_0x479e01(0x155)]))return![];const _0x26f9c3=_0x49db1f[_0x479e01(0x156)](loadCache),_0x291efe=_0x26f9c3[_0x479e01(0x14c)];if(!_0x291efe)return![];const _0x20882f=_0x49db1f[_0x479e01(0x154)](Date['now'](),_0x291efe);return _0x20882f<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x224611){const _0x465ae3=_0x337bee,_0x4b54dc={'uAcVm':function(_0x2a1fe1){return _0x2a1fe1();},'zZiAE':function(_0x1c8d06,_0x16601e){return _0x1c8d06!==_0x16601e;},'ebZha':'master'},_0x2fea11=_0x4b54dc[_0x465ae3(0x176)](loadCache),_0x1b8922=getOrCreateSession(_0x2fea11,_0x224611);_0x1b8922[_0x465ae3(0x15d)]=!![];const _0x28e884=getCurrentBranch();_0x28e884&&_0x4b54dc['zZiAE'](_0x28e884,_0x465ae3(0x165))&&_0x4b54dc[_0x465ae3(0x15f)](_0x28e884,_0x4b54dc[_0x465ae3(0x15e)])&&(_0x1b8922[_0x465ae3(0x158)]=_0x28e884),delete _0x2fea11[_0x465ae3(0x14c)],saveCache(_0x2fea11);}export function registerSession(_0x4cb0a4,_0x58bac2){const _0x4f20fb=_0x337bee,_0x109464={'oSlrT':function(_0x175001,_0x2f7703){return _0x175001(_0x2f7703);}},_0xe73d39=loadCache(),_0x5d39a6=getOrCreateSession(_0xe73d39,_0x4cb0a4);_0x5d39a6[_0x4f20fb(0x16b)]=_0x58bac2,_0x5d39a6['registeredAt']=new Date()[_0x4f20fb(0x169)](),_0x109464['oSlrT'](saveCache,_0xe73d39);}export function getSessionEntry(_0x56c902){const _0x30594d=_0x337bee,_0x2c68b7=loadCache(),_0xf50004=_0x2c68b7['sessions'][_0x56c902];if(_0xf50004?.[_0x30594d(0x16b)]&&_0xf50004?.[_0x30594d(0x150)])return{'featureId':_0xf50004[_0x30594d(0x16b)],'registeredAt':_0xf50004[_0x30594d(0x150)]};return null;}export function unregisterSession(_0x37a628){const _0x4ad663=_0x337bee,_0x80fb2b={'Pnaod':function(_0x1bee0e,_0x537691){return _0x1bee0e(_0x537691);}},_0x44857c=loadCache(),_0x49e57b=_0x44857c['sessions'][_0x37a628];_0x49e57b&&(delete _0x49e57b[_0x4ad663(0x16b)],delete _0x49e57b[_0x4ad663(0x150)],_0x80fb2b['Pnaod'](saveCache,_0x44857c));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3e67d0){const _0x215b12=_0x337bee,_0x1a8ca8={'wDqVp':function(_0xc6b656){return _0xc6b656();},'mZNGS':function(_0x4c6ac9,_0x5a9dc1,_0x2b8032){return _0x4c6ac9(_0x5a9dc1,_0x2b8032);},'tCwWi':function(_0x4a466e,_0x5e0900){return _0x4a466e-_0x5e0900;},'jBKcS':function(_0x2dfafb,_0x460590){return _0x2dfafb(_0x460590);}},_0x36f475=_0x1a8ca8['wDqVp'](loadCache),_0x210650=_0x1a8ca8['mZNGS'](getOrCreateSession,_0x36f475,_0x3e67d0),_0xd647f7=_0x210650[_0x215b12(0x14f)]||0x0,_0x1c7218=Date[_0x215b12(0x17c)]();if(_0x1a8ca8[_0x215b12(0x159)](_0x1c7218,_0xd647f7)>=PLAN_REMINDER_INTERVAL_MS)return _0x210650['lastPlanReminderAt']=_0x1c7218,_0x1a8ca8[_0x215b12(0x17e)](saveCache,_0x36f475),!![];return![];}export function shouldShowStopReminder(_0x465146){const _0x229a47=_0x337bee,_0x38a58f={'SBKZS':function(_0x3055d5,_0x3df9c2){return _0x3055d5>=_0x3df9c2;},'Cindk':function(_0x3ecdf3,_0x2a7d42){return _0x3ecdf3-_0x2a7d42;},'CWQIT':function(_0x46dcca,_0x1e25f1){return _0x46dcca(_0x1e25f1);}},_0x3a322c=loadCache(),_0x422008=getOrCreateSession(_0x3a322c,_0x465146),_0x33c8c3=_0x422008[_0x229a47(0x173)]||0x0,_0x49372c=Date[_0x229a47(0x17c)]();if(_0x38a58f[_0x229a47(0x179)](_0x38a58f[_0x229a47(0x151)](_0x49372c,_0x33c8c3),STOP_REMINDER_INTERVAL_MS))return _0x422008['lastStopReminderAt']=_0x49372c,_0x38a58f['CWQIT'](saveCache,_0x3a322c),!![];return![];}export function hasSessionBeenPrompted(_0x3d89c8){const _0x187120=_0x337bee,_0x6adb5e={'bvtoF':function(_0x2fdcd9,_0x4f9ced){return _0x2fdcd9===_0x4f9ced;}},_0x839955=loadCache();return _0x6adb5e[_0x187120(0x14d)](_0x839955[_0x187120(0x14e)][_0x3d89c8]?.['prompted'],!![]);}export function markSessionPrompted(_0x5599e6){const _0x565476={'iaRmj':function(_0x1b81f8,_0x33d5ba,_0x35f22c){return _0x1b81f8(_0x33d5ba,_0x35f22c);}},_0x2addb2=loadCache(),_0x3c8d80=_0x565476['iaRmj'](getOrCreateSession,_0x2addb2,_0x5599e6);_0x3c8d80['prompted']=!![],saveCache(_0x2addb2);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x36c632=_0x1a4a;(function(_0x2600ce,_0x311427){const _0x26896f=_0x1a4a,_0x4d50fb=_0x2600ce();while(!![]){try{const _0x1b3b08=parseInt(_0x26896f(0xb0))/0x1+-parseInt(_0x26896f(0xad))/0x2+-parseInt(_0x26896f(0xba))/0x3+-parseInt(_0x26896f(0x97))/0x4*(-parseInt(_0x26896f(0x99))/0x5)+parseInt(_0x26896f(0xb3))/0x6*(parseInt(_0x26896f(0x9d))/0x7)+-parseInt(_0x26896f(0x9f))/0x8+-parseInt(_0x26896f(0x9a))/0x9*(parseInt(_0x26896f(0x96))/0xa);if(_0x1b3b08===_0x311427)break;else _0x4d50fb['push'](_0x4d50fb['shift']());}catch(_0x56f7a4){_0x4d50fb['push'](_0x4d50fb['shift']());}}}(_0x2223,0x54091));import*as _0x5c9faf from'fs';import*as _0x214aff from'path';import*as _0x390884 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x214aff[_0x36c632(0x93)](_0x390884['homedir'](),_0x36c632(0xc7),_0x36c632(0xb6));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x458e6d=_0x36c632,_0xe18310={'YuVZb':function(_0x516a88){return _0x516a88();}};try{if(_0x5c9faf[_0x458e6d(0xa9)](CACHE_FILE)){const _0x12b963=JSON['parse'](_0x5c9faf[_0x458e6d(0xb4)](CACHE_FILE,_0x458e6d(0xae)));return{'version':0x3,'sessions':_0x12b963[_0x458e6d(0x9b)]||{},'branches':_0x12b963[_0x458e6d(0xaa)]||{},'lastEnabledSessionClearedAt':_0x12b963[_0x458e6d(0xaf)]};}}catch{}return _0xe18310[_0x458e6d(0xb8)](createEmptyCache);}function saveCache(_0x246eef){const _0x54cfcf=_0x36c632;try{const _0x1fa9de=_0x214aff['dirname'](CACHE_FILE);!_0x5c9faf[_0x54cfcf(0xa9)](_0x1fa9de)&&_0x5c9faf['mkdirSync'](_0x1fa9de,{'recursive':!![]}),_0x5c9faf['writeFileSync'](CACHE_FILE,JSON[_0x54cfcf(0x91)](_0x246eef,null,0x2));}catch{}}export function getCurrentBranch(){const _0x4784dd=_0x36c632,_0xe843be={'KXOyN':function(_0x185926,_0xeee4c6,_0x4a511c){return _0x185926(_0xeee4c6,_0x4a511c);},'aUOFe':_0x4784dd(0xb2),'uVICT':_0x4784dd(0xae),'QTDQf':_0x4784dd(0xc3),'MkMzk':'HEAD'};try{const _0x5e40ec=_0xe843be[_0x4784dd(0xb7)](execSync,_0xe843be[_0x4784dd(0xc1)],{'encoding':_0xe843be['uVICT'],'stdio':[_0xe843be['QTDQf'],_0xe843be['QTDQf'],'pipe']})['trim']();if(!_0x5e40ec||_0x5e40ec===_0xe843be[_0x4784dd(0xa3)])return null;return _0x5e40ec;}catch{return null;}}export function enableBranch(_0x1ba56b){const _0x55f81d=_0x36c632,_0x3d4c26={'NimCN':function(_0x2789f9){return _0x2789f9();},'YEHFp':function(_0x34cb17,_0x21fb50){return _0x34cb17(_0x21fb50);}},_0x455245=_0x3d4c26[_0x55f81d(0xb9)](loadCache);_0x455245['branches'][_0x1ba56b]=!![],_0x3d4c26['YEHFp'](saveCache,_0x455245);}export function disableBranch(_0x4f2d5c){const _0x5cd290={'VGJxR':function(_0x31e3b6){return _0x31e3b6();},'ipWCq':function(_0x21d4f4,_0x290c87){return _0x21d4f4(_0x290c87);}},_0x1a0fc4=_0x5cd290['VGJxR'](loadCache);delete _0x1a0fc4['branches'][_0x4f2d5c],_0x5cd290['ipWCq'](saveCache,_0x1a0fc4);}export function isBranchEnabled(_0x298d3f){const _0x25a689=_0x36c632,_0xeb2343={'EClbg':function(_0x16721a){return _0x16721a();},'GAfiL':function(_0x3e2b12,_0x2b8547){return _0x3e2b12===_0x2b8547;}},_0x538a3d=_0xeb2343[_0x25a689(0xb5)](loadCache);return _0xeb2343['GAfiL'](_0x538a3d[_0x25a689(0xaa)][_0x298d3f],!![]);}function _0x2223(){const _0x4e6064=['join','XMtGy','txDPT','4630DRnBfb','4COrTAo','iGdiG','2702995zbqctU','5967jyFweC','sessions','master','508193icrTmS','enabled','4400992EpGnRw','now','main','Nxlpk','MkMzk','dMTDa','WniCv','qBMAQ','aewui','prompted','existsSync','branches','registeredAt','ADRLj','202396SUULRw','utf-8','lastEnabledSessionClearedAt','660298mOAxZo','UWzKu','git\x20rev-parse\x20--abbrev-ref\x20HEAD','18rwjNLd','readFileSync','EClbg','.ranger_cache.json','KXOyN','YuVZb','NimCN','348582dGfWia','YwuMO','kIgdD','qStkX','featureId','IXECN','currentBranch','aUOFe','bzgOa','pipe','jTsTC','HBxJI','xfzTI','.claude','ibNlT','stringify','dpWcH'];_0x2223=function(){return _0x4e6064;};return _0x2223();}function getOrCreateSession(_0x130bf1,_0x2ab63b){return!_0x130bf1['sessions'][_0x2ab63b]&&(_0x130bf1['sessions'][_0x2ab63b]={}),_0x130bf1['sessions'][_0x2ab63b];}export function enableSession(_0x3c1d02){const _0x2deb18=_0x36c632,_0x5c871b={'XMtGy':function(_0x5b7fae){return _0x5b7fae();},'dMTDa':'main','nDsCY':function(_0x3bd02a,_0x552975){return _0x3bd02a!==_0x552975;}},_0x188149=_0x5c871b[_0x2deb18(0x94)](loadCache),_0x10553f=getOrCreateSession(_0x188149,_0x3c1d02);_0x10553f['enabled']=!![];const _0x54cbd6=getCurrentBranch();_0x54cbd6&&_0x54cbd6!==_0x5c871b[_0x2deb18(0xa4)]&&_0x5c871b['nDsCY'](_0x54cbd6,_0x2deb18(0x9c))&&(_0x188149[_0x2deb18(0xaa)][_0x54cbd6]=!![],_0x10553f[_0x2deb18(0xc0)]=_0x54cbd6),saveCache(_0x188149);}export function isSessionEnabled(_0x4ee317){const _0x3b6fd6=_0x36c632,_0x2e6f15={'dpWcH':'main','IXECN':function(_0xfe780f,_0x42019b){return _0xfe780f===_0x42019b;},'YwuMO':'master','uaKTE':function(_0x1c0ee6,_0x3c9734){return _0x1c0ee6===_0x3c9734;},'hxGiY':function(_0x215c53,_0x368cda){return _0x215c53===_0x368cda;}},_0x31de61=loadCache(),_0x410fdb=getCurrentBranch();if(!_0x410fdb||_0x410fdb===_0x2e6f15[_0x3b6fd6(0x92)]||_0x2e6f15[_0x3b6fd6(0xbf)](_0x410fdb,_0x2e6f15[_0x3b6fd6(0xbb)]))return _0x31de61[_0x3b6fd6(0x9b)][_0x4ee317]?.[_0x3b6fd6(0x9e)]===!![];const _0x1fbf21=_0x2e6f15['uaKTE'](_0x31de61['branches'][_0x410fdb],!![]),_0x56a69a=_0x2e6f15['hxGiY'](_0x31de61['sessions'][_0x4ee317]?.[_0x3b6fd6(0x9e)],!![]);return _0x1fbf21||_0x56a69a;}export function disableSession(_0x559706){const _0x1374c9=_0x36c632,_0x5d9fa0={'bzgOa':function(_0x2fca52,_0x90f293){return _0x2fca52(_0x90f293);}},_0x256b27=loadCache(),_0x47a529=getOrCreateSession(_0x256b27,_0x559706);_0x47a529['enabled']=![],_0x5d9fa0[_0x1374c9(0xc2)](saveCache,_0x256b27);}function _0x1a4a(_0x3a5f1e,_0x72c407){_0x3a5f1e=_0x3a5f1e-0x91;const _0x2223bb=_0x2223();let _0x1a4a03=_0x2223bb[_0x3a5f1e];return _0x1a4a03;}export function updateBranchTracking(_0x213560){const _0x1c174a=_0x36c632,_0x12c0cc={'qStkX':function(_0x1c6e33){return _0x1c6e33();},'ADRLj':'master','TnKkc':function(_0x207aff,_0x24eba7){return _0x207aff!==_0x24eba7;}},_0x8cd1f9=loadCache(),_0x810ef2=_0x8cd1f9[_0x1c174a(0x9b)][_0x213560];if(!_0x810ef2?.[_0x1c174a(0x9e)])return;const _0x566842=_0x12c0cc[_0x1c174a(0xbd)](getCurrentBranch);if(!_0x566842||_0x566842===_0x1c174a(0xa1)||_0x566842===_0x12c0cc[_0x1c174a(0xac)])return;_0x12c0cc['TnKkc'](_0x810ef2['currentBranch'],_0x566842)&&(_0x8cd1f9['branches'][_0x566842]=!![],_0x810ef2[_0x1c174a(0xc0)]=_0x566842,saveCache(_0x8cd1f9));}export function initBranchTracking(_0x1eeff4){const _0x4ac8b1=_0x36c632,_0x220701={'txDPT':function(_0xbdaac2){return _0xbdaac2();},'aewui':function(_0x1b038f){return _0x1b038f();},'ekcpH':_0x4ac8b1(0xa1),'PCOsV':function(_0xb6d1ed,_0x1d16de){return _0xb6d1ed===_0x1d16de;},'kIgdD':_0x4ac8b1(0x9c),'LlGan':function(_0x4f89e5,_0xaa308,_0x4fa90c){return _0x4f89e5(_0xaa308,_0x4fa90c);},'SGLyH':function(_0x6c1003,_0x3ca4e2){return _0x6c1003(_0x3ca4e2);}},_0x8c468a=_0x220701[_0x4ac8b1(0x95)](loadCache),_0x487218=_0x220701[_0x4ac8b1(0xa7)](getCurrentBranch);if(!_0x487218||_0x487218===_0x220701['ekcpH']||_0x220701['PCOsV'](_0x487218,_0x220701[_0x4ac8b1(0xbc)]))return;if(_0x8c468a[_0x4ac8b1(0xaa)][_0x487218]===!![]){const _0x85c89b=_0x220701['LlGan'](getOrCreateSession,_0x8c468a,_0x1eeff4);_0x85c89b['enabled']=!![],_0x85c89b[_0x4ac8b1(0xc0)]=_0x487218,_0x220701['SGLyH'](saveCache,_0x8c468a);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x3642d0){const _0xf7213b=_0x36c632,_0x22243a={'WniCv':function(_0x42670e){return _0x42670e();},'ibNlT':function(_0x571498,_0x1a6c68){return _0x571498(_0x1a6c68);}},_0x30f0d3=_0x22243a[_0xf7213b(0xa5)](loadCache),_0x1c7fe2=_0x30f0d3[_0xf7213b(0x9b)][_0x3642d0];_0x1c7fe2?.[_0xf7213b(0x9e)]&&(_0x30f0d3[_0xf7213b(0xaf)]=Date[_0xf7213b(0xa0)](),_0x22243a[_0xf7213b(0xc8)](saveCache,_0x30f0d3));}export function shouldAutoEnableAfterClear(_0x45b051){const _0x218324=_0x36c632,_0x2d9876={'COKfX':function(_0x2c96d6,_0x46c24e){return _0x2c96d6!==_0x46c24e;},'Nxlpk':'clear','lMLQk':function(_0x4e8890){return _0x4e8890();},'uDtRR':function(_0x38c7dd,_0x52848d){return _0x38c7dd-_0x52848d;},'iGdiG':function(_0x225766,_0x3c5cb4){return _0x225766<=_0x3c5cb4;}};if(_0x2d9876['COKfX'](_0x45b051,_0x2d9876[_0x218324(0xa2)]))return![];const _0x4bc841=_0x2d9876['lMLQk'](loadCache),_0x121f40=_0x4bc841['lastEnabledSessionClearedAt'];if(!_0x121f40)return![];const _0x1c44b5=_0x2d9876['uDtRR'](Date[_0x218324(0xa0)](),_0x121f40);return _0x2d9876[_0x218324(0x98)](_0x1c44b5,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x49b56c){const _0x294ea9=_0x36c632,_0x42215d={'ovTjd':function(_0x4c0635,_0x1828bb,_0x204f53){return _0x4c0635(_0x1828bb,_0x204f53);},'UWzKu':'main','xfzTI':'master','HBxJI':function(_0x3a0607,_0x2e424d){return _0x3a0607(_0x2e424d);}},_0x5d68b2=loadCache(),_0x2ef699=_0x42215d['ovTjd'](getOrCreateSession,_0x5d68b2,_0x49b56c);_0x2ef699[_0x294ea9(0x9e)]=!![];const _0x3e3a94=getCurrentBranch();_0x3e3a94&&_0x3e3a94!==_0x42215d[_0x294ea9(0xb1)]&&_0x3e3a94!==_0x42215d[_0x294ea9(0xc6)]&&(_0x2ef699['currentBranch']=_0x3e3a94),delete _0x5d68b2[_0x294ea9(0xaf)],_0x42215d[_0x294ea9(0xc5)](saveCache,_0x5d68b2);}export function registerSession(_0x4df904,_0x3602bf){const _0x4b0d41=_0x36c632,_0x1dbfba=loadCache(),_0x368b31=getOrCreateSession(_0x1dbfba,_0x4df904);_0x368b31['featureId']=_0x3602bf,_0x368b31[_0x4b0d41(0xab)]=new Date()['toISOString'](),saveCache(_0x1dbfba);}export function getSessionEntry(_0x479ac5){const _0x47331d=_0x36c632,_0x1c026f={'jTsTC':function(_0x2b5975){return _0x2b5975();}},_0x43d658=_0x1c026f[_0x47331d(0xc4)](loadCache),_0x5b6249=_0x43d658[_0x47331d(0x9b)][_0x479ac5];if(_0x5b6249?.['featureId']&&_0x5b6249?.['registeredAt'])return{'featureId':_0x5b6249['featureId'],'registeredAt':_0x5b6249[_0x47331d(0xab)]};return null;}export function unregisterSession(_0x4dfe41){const _0x4f8f66=_0x36c632,_0x60973e=loadCache(),_0x9a338e=_0x60973e['sessions'][_0x4dfe41];_0x9a338e&&(delete _0x9a338e[_0x4f8f66(0xbe)],delete _0x9a338e['registeredAt'],saveCache(_0x60973e));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x8c16d9){const _0x5dc04b=_0x36c632,_0x1a042c=loadCache(),_0x5d4bcf=getOrCreateSession(_0x1a042c,_0x8c16d9),_0x454304=_0x5d4bcf['lastPlanReminderAt']||0x0,_0x5d1921=Date[_0x5dc04b(0xa0)]();if(_0x5d1921-_0x454304>=PLAN_REMINDER_INTERVAL_MS)return _0x5d4bcf['lastPlanReminderAt']=_0x5d1921,saveCache(_0x1a042c),!![];return![];}export function shouldShowStopReminder(_0x1dcad4){const _0x8b0d6d=_0x36c632,_0x2e5b8c={'qBMAQ':function(_0x3d8ddb){return _0x3d8ddb();}},_0x475eb8=_0x2e5b8c[_0x8b0d6d(0xa6)](loadCache),_0xe23d84=getOrCreateSession(_0x475eb8,_0x1dcad4),_0x19f200=_0xe23d84['lastStopReminderAt']||0x0,_0x5db3c4=Date['now']();if(_0x5db3c4-_0x19f200>=STOP_REMINDER_INTERVAL_MS)return _0xe23d84['lastStopReminderAt']=_0x5db3c4,saveCache(_0x475eb8),!![];return![];}export function hasSessionBeenPrompted(_0x4aca1b){const _0x5a8ecd=_0x36c632,_0x383f46={'mJesc':function(_0xc9a5f1){return _0xc9a5f1();},'DXbsS':function(_0x23e9d8,_0x413f19){return _0x23e9d8===_0x413f19;}},_0x282fbd=_0x383f46['mJesc'](loadCache);return _0x383f46['DXbsS'](_0x282fbd['sessions'][_0x4aca1b]?.[_0x5a8ecd(0xa8)],!![]);}export function markSessionPrompted(_0x46b51b){const _0x1f7662={'mrVvA':function(_0x594129){return _0x594129();}},_0x4a4986=_0x1f7662['mrVvA'](loadCache),_0x3ae378=getOrCreateSession(_0x4a4986,_0x46b51b);_0x3ae378['prompted']=!![],saveCache(_0x4a4986);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xceb2ee=_0x11ed;(function(_0x522127,_0x5597c2){const _0x335726=_0x11ed,_0x579ee2=_0x522127();while(!![]){try{const _0x5d5b52=-parseInt(_0x335726(0x18f))/0x1+-parseInt(_0x335726(0x1d0))/0x2*(-parseInt(_0x335726(0x188))/0x3)+parseInt(_0x335726(0x16f))/0x4*(parseInt(_0x335726(0x1c7))/0x5)+-parseInt(_0x335726(0x18c))/0x6*(parseInt(_0x335726(0x1b6))/0x7)+-parseInt(_0x335726(0x19b))/0x8*(parseInt(_0x335726(0x1cc))/0x9)+parseInt(_0x335726(0x1d3))/0xa*(parseInt(_0x335726(0x1ac))/0xb)+parseInt(_0x335726(0x1a0))/0xc*(parseInt(_0x335726(0x169))/0xd);if(_0x5d5b52===_0x5597c2)break;else _0x579ee2['push'](_0x579ee2['shift']());}catch(_0x4b1f49){_0x579ee2['push'](_0x579ee2['shift']());}}}(_0x5640,0xc09b7));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(_0x557286,_0x142eb0){const _0xb13a22=_0x11ed,_0x4beb98={'ZFkar':function(_0x50634f,_0x4af72c,_0xbca0b4){return _0x50634f(_0x4af72c,_0xbca0b4);},'ETfVD':function(_0x4edf9d,_0x4b8b64,_0x4e0b6e){return _0x4edf9d(_0x4b8b64,_0x4e0b6e);},'syTRz':_0xb13a22(0x1a4),'vhYHD':function(_0x101dc6,_0x36c8f1){return _0x101dc6(_0x36c8f1);},'vUZAx':function(_0x478d7d,_0x2a5cb4){return _0x478d7d(_0x2a5cb4);},'prWMR':function(_0x51f16c,_0x265f2c){return _0x51f16c!==_0x265f2c;},'GpJlV':function(_0x3c4211,_0xb76da8){return _0x3c4211!==_0xb76da8;}},_0x5d0518=join(_0x142eb0,'ci',_0x557286),_0x42837c=join(_0x142eb0,'local',_0x557286),_0x257f47=_0x4beb98['ZFkar'](join,_0x142eb0,_0x557286),_0x1b3ff2=_0x4beb98[_0xb13a22(0x17c)](join,_0x142eb0,_0x4beb98[_0xb13a22(0x1df)]),_0x3d731a=join(_0x142eb0,'ci');if(_0x4beb98['vhYHD'](existsSync,_0x5d0518))return _0x5d0518;if(existsSync(_0x42837c))return _0x42837c;if(_0x4beb98[_0xb13a22(0x16e)](existsSync,_0x257f47)&&(_0x4beb98[_0xb13a22(0x190)](_0x257f47,_0x1b3ff2)&&_0x4beb98[_0xb13a22(0x1b9)](_0x257f47,_0x3d731a)?!![]:hasLegacyProfileFiles(_0x257f47)))return _0x257f47;return null;}export function getEnvDir(_0x260bf4,_0x361820={}){const _0x1ea085=_0x11ed,_0xa3502f={'cBedV':function(_0x7e8c4d,_0x4e74a6){return _0x7e8c4d!==_0x4e74a6;},'xxgwc':function(_0x264ada,_0xe29c50,_0x18a822){return _0x264ada(_0xe29c50,_0x18a822);},'AIzJr':'local'},_0x146383=getRangerDir(),_0x1299f1=findEnvInRoot(_0x260bf4,_0x146383);if(_0x1299f1){if(_0x361820['forWrite']&&isLegacyEnvPath(_0x1299f1))throw legacyWriteError(_0x260bf4,_0x1299f1);return _0x1299f1;}const _0x3ae15f=getRangerHomeDir();if(_0xa3502f['cBedV'](_0x3ae15f,_0x146383)){const _0x181045=findEnvInRoot(_0x260bf4,_0x3ae15f);if(_0x181045){if(_0x361820['forWrite']&&isLegacyEnvPath(_0x181045))throw _0xa3502f['xxgwc'](legacyWriteError,_0x260bf4,_0x181045);return _0x181045;}}const _0x29531f=join(_0x3ae15f,_0xa3502f[_0x1ea085(0x186)],_0x260bf4);if(_0x361820['forWrite'])throw _0xa3502f['xxgwc'](legacyWriteError,_0x260bf4,_0x29531f);return _0x29531f;}function _0x5640(){const _0x44e421=['replace','path','--no-sandbox','getuid','vdTFz','bminV','stagehand','cfZPe','IjZGZ','24GSNeyO','DmLwh','legacy','ocNFG','sessions','127416zGIlrz','ranger-auth-','ZsBAu','settings.json','local','bFbjd','llMPp','wuzjV','stringify','setupHeaders','JYskQ','PcOfq','70917bKzrAE','tgbSo','isArray','push','auth.json.enc','header','utf-8','ENOENT','uhnyr','clipboard-write','700UpJfIl','--disable-features=WebBluetooth','XcxdT','GpJlV','warn','Qrkfg','args','headless','browser','uAHyZ','cdpEndpoint','ngWWl','executablePath','--disable-web-security','AQraL','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','gZZvc','15WfvanO','clipboard-read','TqiBZ','vision','auth.json','286281boWHsj','djbKG','lLiVN','playwright-cli','14coZDXC','SuMrB','kHWEJ','1010EQGDnN','rangerDir','string','CPrFF','--allow-running-insecure-content','location','filter','tBDpY','JTDeh','catch','--disable-setuid-sandbox','hNtmW','syTRz','vbiyd','YpLyE','includes','message','ZPfHr','wGvdD','szvGq','SGqXB','BiuKV','headers','XXHQl','uWEQa','ignoreHTTPSErrors','locations','XINOU','chromium','13vVcEkT','storageState','nHNQq','core','contextOptions','vUZAx','445828LHHHOB','XCFKh','now','code','extraHTTPHeaders','Hflpe','lXVei','iCfvD','mJzDZ','tabs','userAgent','phTRn','lLxfh','ETfVD','oHXTN','file','length','Refusing\x20to\x20write\x20profile\x20\x22','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','Environment\x20variable\x20','object','IDZxT','safeMode','AIzJr','endsWith','359964wqKBEn','VnZhH','entries','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6606bERyDA','indexOf','storageStatePath','841606WllYhr','prWMR','startsWith'];_0x5640=function(){return _0x44e421;};return _0x5640();}function isLegacyEnvPath(_0x563f61){const _0x47dc81=_0x11ed,_0x56de2f={'KhxCw':function(_0x54e3f1){return _0x54e3f1();},'XCFKh':function(_0x357c07,_0x19c3ed){return _0x357c07+_0x19c3ed;},'wtscR':function(_0x54021f,_0xe7b2f9){return _0x54021f===_0xe7b2f9;}},_0xbea2f2=_0x56de2f['KhxCw'](getRangerDir),_0x44e978=getRangerHomeDir();for(const _0x38559e of new Set([_0xbea2f2,_0x44e978])){const _0x41d64f=_0x38559e[_0x47dc81(0x187)]('/')?_0x38559e:_0x56de2f[_0x47dc81(0x170)](_0x38559e,'/');if(_0x56de2f['wtscR'](_0x563f61,_0x38559e)||_0x563f61[_0x47dc81(0x191)](_0x41d64f))return!![];}return![];}function legacyWriteError(_0x3e108e,_0x2d3540){const _0x39c078=_0x11ed;return new Error(_0x39c078(0x180)+_0x3e108e+'\x22\x20to\x20legacy\x20path\x20'+_0x2d3540+'.\x0a'+_0x39c078(0x18b)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+_0x39c078(0x1c5));}export function findExistingEnv(_0x346cb0,_0x410cde){const _0x8d014d=_0x11ed,_0x115f77={'tgbSo':function(_0x1bab5c){return _0x1bab5c();},'moqdj':_0x8d014d(0x19d),'ZPfHr':function(_0x1a3700,_0xa18fb,_0x151656){return _0x1a3700(_0xa18fb,_0x151656);},'wuzjV':function(_0x3dba78,_0x5a6957,_0x4f9ebd,_0x51437d){return _0x3dba78(_0x5a6957,_0x4f9ebd,_0x51437d);},'vbiyd':_0x8d014d(0x1a4),'iFHtq':function(_0xb9eac,_0x429e4e){return _0xb9eac(_0x429e4e);},'XcxdT':function(_0x4f26ac,_0x269c20){return _0x4f26ac===_0x269c20;},'WbohQ':function(_0x31408e,_0x507b8d){return _0x31408e(_0x507b8d);}},_0x3d9fc0=_0x410cde?.[_0x8d014d(0x1d4)],_0x10d528=_0x3d9fc0?[_0x3d9fc0]:[_0x115f77[_0x8d014d(0x1ad)](getRangerDir),getRangerHomeDir()][_0x8d014d(0x1d9)]((_0x24dab9,_0xa44013,_0x5cad86)=>_0x5cad86[_0x8d014d(0x18d)](_0x24dab9)===_0xa44013),_0x14e14b=_0x410cde?.[_0x8d014d(0x166)]??['ci',_0x8d014d(0x1a4),_0x115f77['moqdj']];for(const _0x1c6af9 of _0x10d528){const _0xdce38a=join(_0x1c6af9,_0x8d014d(0x1a4)),_0x255d37=_0x115f77[_0x8d014d(0x1e4)](join,_0x1c6af9,'ci'),_0x3abbf2=[{'location':'ci','path':_0x115f77[_0x8d014d(0x1a7)](join,_0x1c6af9,'ci',_0x346cb0)},{'location':_0x115f77[_0x8d014d(0x1e0)],'path':join(_0x1c6af9,_0x115f77[_0x8d014d(0x1e0)],_0x346cb0)},{'location':'legacy','path':_0x115f77['ZPfHr'](join,_0x1c6af9,_0x346cb0)}];for(const _0xdacc5f of _0x3abbf2){if(_0x14e14b['includes'](_0xdacc5f[_0x8d014d(0x1d8)])&&_0x115f77['iFHtq'](existsSync,_0xdacc5f[_0x8d014d(0x193)])){if(_0x115f77[_0x8d014d(0x1b8)](_0xdacc5f['location'],_0x8d014d(0x19d))&&(_0xdacc5f['path']===_0xdce38a||_0xdacc5f['path']===_0x255d37)&&!_0x115f77['WbohQ'](hasLegacyProfileFiles,_0xdacc5f['path']))continue;return{'path':_0xdacc5f[_0x8d014d(0x193)],'location':_0xdacc5f['location']};}}}return null;}function hasLegacyProfileFiles(_0x40316d){const _0x169429=_0x11ed,_0x435717={'BiuKV':function(_0xd958cb,_0x394ef2){return _0xd958cb(_0x394ef2);},'njHoM':function(_0x15cb7a,_0x2c8f7e,_0x4e0f87){return _0x15cb7a(_0x2c8f7e,_0x4e0f87);},'ngWWl':_0x169429(0x1a3),'OpiFe':function(_0x4aca93,_0x1710cc){return _0x4aca93(_0x1710cc);},'myVer':function(_0x291442,_0x5db911,_0x68f388){return _0x291442(_0x5db911,_0x68f388);}};return _0x435717['BiuKV'](existsSync,_0x435717['njHoM'](join,_0x40316d,_0x435717[_0x169429(0x1c1)]))||_0x435717['OpiFe'](existsSync,_0x435717['myVer'](join,_0x40316d,_0x169429(0x1cb)))||_0x435717[_0x169429(0x1e8)](existsSync,join(_0x40316d,_0x169429(0x1b0)));}export function isEnvCi(_0x111bc2){const _0x4330d1=_0x11ed,_0x36f7e5={'djbKG':function(_0x24596e,_0x287fa5,_0x45353e,_0x25c1c1){return _0x24596e(_0x287fa5,_0x45353e,_0x25c1c1);},'EaueC':function(_0x446336){return _0x446336();}};if(existsSync(_0x36f7e5[_0x4330d1(0x1cd)](join,getRangerDir(),'ci',_0x111bc2)))return!![];const _0x39f6c0=_0x36f7e5['EaueC'](getRangerHomeDir);if(_0x39f6c0!==getRangerDir()&&existsSync(join(_0x39f6c0,'ci',_0x111bc2)))return!![];return![];}export async function cleanupTempFiles(_0x3680ae){const _0x18b043=[_0x3680ae['tempAuthPath'],_0x3680ae['configPath']]['filter'](Boolean);await Promise['all'](_0x18b043['map'](_0x5b7be2=>unlink(_0x5b7be2)['catch'](_0x2bd105=>{const _0x35d60e=_0x11ed;_0x2bd105[_0x35d60e(0x172)]!==_0x35d60e(0x1b3)&&console[_0x35d60e(0x1ba)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5b7be2+':',_0x2bd105['message']);})));}export function getSettingsPath(_0x429885){const _0x1554a5={'NYEnO':function(_0x1bfbb8,_0x41bee6){return _0x1bfbb8(_0x41bee6);},'tSCcI':'settings.json'};return join(_0x1554a5['NYEnO'](getEnvDir,_0x429885),_0x1554a5['tSCcI']);}export async function loadSettings(_0x4eb0ec){const _0x3dfb8e=_0x11ed,_0x3ed114=getSettingsPath(_0x4eb0ec);if(!existsSync(_0x3ed114))return{};try{const _0x4c776b=await readFile(_0x3ed114,_0x3dfb8e(0x1b2));return JSON['parse'](_0x4c776b);}catch{return{};}}export async function saveSettings(_0x58c37b,_0x356f6c){const _0x167603=_0x11ed,_0x26cacc={'uWEQa':function(_0x197655,_0x3867a6){return _0x197655(_0x3867a6);},'uhnyr':function(_0x4794b5,_0x3d27f3){return _0x4794b5(_0x3d27f3);},'DmLwh':function(_0x513ddf,_0x3a174d,_0xd0cf6c){return _0x513ddf(_0x3a174d,_0xd0cf6c);},'pnPon':function(_0x2d259d,_0x409cb3,_0x37ed7a){return _0x2d259d(_0x409cb3,_0x37ed7a);}},_0x2f0ff6=_0x26cacc['uWEQa'](getSettingsPath,_0x58c37b),_0x213a30=_0x26cacc[_0x167603(0x164)](dirname,_0x2f0ff6);!_0x26cacc[_0x167603(0x1b4)](existsSync,_0x213a30)&&await _0x26cacc[_0x167603(0x19c)](mkdir,_0x213a30,{'recursive':!![]}),await _0x26cacc['pnPon'](writeFile,_0x2f0ff6,JSON[_0x167603(0x1a8)](_0x356f6c,null,0x2));}export function resolveEnvVars(_0x2c864e){const _0x2543a8=_0x11ed,_0x16742e={'etyoA':function(_0x3f88ba,_0x21cf5d){return _0x3f88ba===_0x21cf5d;},'nHNQq':function(_0x35da9d,_0x16194c){return _0x35da9d===_0x16194c;},'lLiVN':_0x2543a8(0x1d5),'DfxDx':function(_0x25a320,_0x28e2b6){return _0x25a320===_0x28e2b6;},'bsKan':_0x2543a8(0x183)};if(_0x16742e[_0x2543a8(0x16b)](typeof _0x2c864e,_0x16742e[_0x2543a8(0x1ce)]))return _0x2c864e[_0x2543a8(0x192)](/\$\{(\w+)\}/g,(_0x98257,_0x466a0e)=>{const _0x2bf75c=_0x2543a8,_0x3d50ae=process['env'][_0x466a0e];if(_0x16742e['etyoA'](_0x3d50ae,undefined))throw new Error(_0x2bf75c(0x182)+_0x466a0e+'\x20is\x20not\x20set');return _0x3d50ae;});if(Array['isArray'](_0x2c864e))return _0x2c864e['map'](resolveEnvVars);if(_0x2c864e&&_0x16742e['DfxDx'](typeof _0x2c864e,_0x16742e['bsKan']))return Object['fromEntries'](Object['entries'](_0x2c864e)['map'](([_0x58c701,_0x258795])=>[_0x58c701,resolveEnvVars(_0x258795)]));return _0x2c864e;}const isRecord=_0x5a6571=>typeof _0x5a6571===_0xceb2ee(0x183)&&_0x5a6571!==null&&!Array[_0xceb2ee(0x1ae)](_0x5a6571),asRecord=_0x194cc5=>isRecord(_0x194cc5)?_0x194cc5:undefined,mergeHeaders=(_0x54f97b,_0x3a7368)=>{const _0x2a4593=_0xceb2ee,_0x970295={'IDZxT':function(_0x5f4c7d,_0x112d7b){return _0x5f4c7d??_0x112d7b;},'glOxs':function(_0x1c211f,_0x4b75e3){return _0x1c211f??_0x4b75e3;}},_0x4df458={..._0x970295[_0x2a4593(0x184)](_0x54f97b,{}),..._0x970295['glOxs'](_0x3a7368,{})};return Object['keys'](_0x4df458)['length']?_0x4df458:undefined;},SAFE_MODE_ARGS=[_0xceb2ee(0x1b7)],ALLOW_LOCALHOST_ARGS=[_0xceb2ee(0x1c3),_0xceb2ee(0x1d7),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x121422,_0x5ed849={}){const _0x724e58=_0xceb2ee,_0x5ddeef={'SYZSD':function(_0x3d2324,_0x1f1477){return _0x3d2324(_0x1f1477);},'IjZGZ':function(_0x59a55a,_0x4747ab){return _0x59a55a===_0x4747ab;}},_0x5a5362=_0x5ddeef['SYZSD'](asRecord,_0x121422[_0x724e58(0x1be)]),_0x2844bc={...asRecord(_0x5a5362?.['launchOptions'])??{}};_0x5ddeef[_0x724e58(0x19a)](typeof _0x5ed849[_0x724e58(0x1bd)],'boolean')&&(_0x2844bc['headless']=_0x5ed849[_0x724e58(0x1bd)]);if(_0x121422[_0x724e58(0x185)]){const _0x15b314=_0x2844bc[_0x724e58(0x1bc)]??[],_0x27577e=SAFE_MODE_ARGS['filter'](_0x15e976=>!_0x15b314['includes'](_0x15e976));_0x2844bc[_0x724e58(0x1bc)]=[..._0x15b314,..._0x27577e];}if(_0x121422['allowInsecureLocalhost']){const _0x5a4318=_0x2844bc[_0x724e58(0x1bc)]??[],_0x12fbe6=ALLOW_LOCALHOST_ARGS['filter'](_0x38fc32=>!_0x5a4318['includes'](_0x38fc32));_0x2844bc['args']=[..._0x5a4318,..._0x12fbe6];}const _0x176350={...asRecord(_0x5a5362?.['contextOptions'])??{}};_0x176350[_0x724e58(0x165)]=!![];typeof _0x121422[_0x724e58(0x179)]==='string'&&(_0x176350[_0x724e58(0x179)]=_0x121422[_0x724e58(0x179)]);const _0x4b4820=mergeHeaders(asRecord(_0x176350['extraHTTPHeaders']),asRecord(_0x121422['headers']));return _0x4b4820?_0x176350[_0x724e58(0x173)]=_0x4b4820:delete _0x176350[_0x724e58(0x173)],_0x5ed849[_0x724e58(0x18e)]&&(_0x176350['storageState']=_0x5ed849['storageStatePath']),{'launchOptions':_0x2844bc,'contextOptions':_0x176350};}export async function resolveProfileStorageState(_0x5adeea){const _0x15eaf6=_0xceb2ee,_0x51f8b6={'VnZhH':function(_0x54c64f,_0x5a8b9f){return _0x54c64f(_0x5a8b9f);}};return _0x51f8b6[_0x15eaf6(0x189)](resolveLocalAuthPath,getEnvDir(_0x5adeea));}async function resolveLocalAuthPath(_0x54b5a5){const _0x506fc8=_0xceb2ee,_0x3e6520={'ZsBAu':function(_0x4e4f59,_0x62743,_0x126f6f){return _0x4e4f59(_0x62743,_0x126f6f);},'lLxfh':'auth.json.enc','ocNFG':'auth.json','kHWEJ':function(_0xfe2fa7,_0x5e79e2){return _0xfe2fa7(_0x5e79e2);},'sqidX':function(_0x590b7a,_0x42f632,_0x4c1984){return _0x590b7a(_0x42f632,_0x4c1984);},'BEjpb':function(_0x34b63d,_0x55638f){return _0x34b63d(_0x55638f);}},_0x306d0b=_0x3e6520[_0x506fc8(0x1a2)](join,_0x54b5a5,_0x3e6520[_0x506fc8(0x17b)]),_0x19c2de=_0x3e6520[_0x506fc8(0x1a2)](join,_0x54b5a5,_0x3e6520[_0x506fc8(0x19e)]);if(_0x3e6520['kHWEJ'](existsSync,_0x306d0b))try{const _0x4db9d7=await getToken();if(!_0x4db9d7)throw new Error(_0x506fc8(0x181));const _0xc3e384=await readFile(_0x306d0b),_0x54af09=_0x3e6520['sqidX'](decrypt,_0xc3e384,_0x4db9d7),_0x3de961=join(tmpdir(),_0x506fc8(0x1a1)+Date[_0x506fc8(0x171)]()+'.json');return await _0x3e6520['ZsBAu'](writeFile,_0x3de961,_0x54af09),{'storageStatePath':_0x3de961,'tempAuthPath':_0x3de961};}catch(_0x461efc){const _0x5ccea1=_0x461efc instanceof Error?_0x461efc[_0x506fc8(0x1e3)]:_0x3e6520[_0x506fc8(0x1d2)](String,_0x461efc);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x5ccea1);}if(_0x3e6520['BEjpb'](existsSync,_0x19c2de))return{'storageStatePath':_0x19c2de};return{};}export async function buildPlaywrightConfig(_0x3dc78d,_0x214cef,_0x2c1ff2,_0x21818f,_0x5517d1){const _0xae2c20={'CcHvK':function(_0x2673b8,_0x114818){return _0x2673b8(_0x114818);},'jNUMs':function(_0x24ead4,_0x220f1f){return _0x24ead4(_0x220f1f);}};if(_0x5517d1)return buildPlaywrightConfigCore(_0x3dc78d,_0x5517d1,_0x214cef,_0x2c1ff2,_0x21818f,'stagehand');const {storageStatePath:_0xef1a31,tempAuthPath:_0x4048b7}=await _0xae2c20['CcHvK'](resolveLocalAuthPath,_0xae2c20['jNUMs'](getEnvDir,_0x214cef));try{const _0x2ff2fa=await buildPlaywrightConfigCore(_0x3dc78d,_0xef1a31,_0x214cef,_0x2c1ff2,_0x21818f,'stagehand');return{..._0x2ff2fa,'tempAuthPath':_0x4048b7};}catch(_0x4cbc14){_0x4048b7&&await unlink(_0x4048b7)['catch'](()=>{});throw _0x4cbc14;}}export async function buildPlaywrightConfigCore(_0x2042f5,_0x270a75,_0x4dc58b,_0x502362,_0x4a654d,_0x4bace0=_0xceb2ee(0x198)){const _0x4a1891=_0xceb2ee,_0x2c86ad={'UtGFe':'--disable-setuid-sandbox','Zqkfk':_0x4a1891(0x1c8),'GNoZv':function(_0x3c7ce3){return _0x3c7ce3();},'wHNEa':function(_0x43665d,_0x2b307b,_0x36f48a,_0x4e9a74){return _0x43665d(_0x2b307b,_0x36f48a,_0x4e9a74);},'efeJj':function(_0x34adfd){return _0x34adfd();},'PcOfq':'chromium','SuMrB':'playwright-cli','SGqXB':_0x4a1891(0x17e),'YuiRq':_0x4a1891(0x178),'CoYwR':'pdf','BADGG':_0x4a1891(0x1ca),'VvnmA':'allow','szpHN':function(_0x93ffd5,_0x309622){return _0x93ffd5===_0x309622;},'gZZvc':'ranger-config','tbWyx':function(_0x520661,_0x38fd56){return _0x520661(_0x38fd56);},'JYskQ':function(_0x268320,_0x4dd02a,_0x248af4){return _0x268320(_0x4dd02a,_0x248af4);},'hNtmW':'-cli','oHXTN':function(_0x3712e3,_0x44c61b,_0x54bcfb){return _0x3712e3(_0x44c61b,_0x54bcfb);}},_0x1789e0=_0x502362||_0x2c86ad['GNoZv'](randomUUID),_0x5b2174=_0x2c86ad['wHNEa'](join,_0x2c86ad['efeJj'](getRangerDir),'sessions',_0x1789e0),_0x42fa00=Boolean(_0x2042f5[_0x4a1891(0x1c0)]),_0x2e1f71=_0x42fa00?{'browserName':_0x2c86ad[_0x4a1891(0x1ab)],'cdpEndpoint':_0x2042f5[_0x4a1891(0x1c0)]}:((()=>{const _0x3a1601=_0x4a1891,{launchOptions:_0x2d78c8,contextOptions:_0x33a8c5}=buildBrowserOptionsFromSettings(_0x2042f5,{'headless':_0x4a654d?![]:_0x2042f5[_0x3a1601(0x1bd)]??!![],'storageStatePath':_0x270a75});if(process[_0x3a1601(0x195)]?.()===0x0){const _0x55ec36=['--no-sandbox',_0x2c86ad['UtGFe']],_0x65958=_0x2d78c8[_0x3a1601(0x1bc)]??[],_0x541f8d=_0x55ec36[_0x3a1601(0x1d9)](_0x50adf5=>!_0x65958[_0x3a1601(0x1e2)](_0x50adf5));_0x2d78c8['args']=[..._0x65958,..._0x541f8d];}return{'isolated':!![],'browserName':_0x3a1601(0x168),'launchOptions':_0x2d78c8,'contextOptions':{..._0x33a8c5,'permissions':[_0x2c86ad['Zqkfk'],_0x3a1601(0x1b5)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3c700b=_0x4bace0===_0x2c86ad['SuMrB']?{'browser':_0x2e1f71,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5b2174,'outputMode':_0x2c86ad[_0x4a1891(0x1e7)],'codegen':'none'}:{'name':_0x4dc58b,'browser':_0x2e1f71,'capabilities':[_0x4a1891(0x16c),_0x2c86ad['YuiRq'],'install',_0x2c86ad['CoYwR'],_0x2c86ad['BADGG']],'imageResponses':_0x2c86ad['VvnmA'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5b2174};if(!_0x42fa00){const _0x45d773=_0x3c700b[_0x4a1891(0x1be)],_0x638f18=_0x45d773[_0x4a1891(0x16d)];if(_0x2c86ad['szpHN'](_0x638f18[_0x4a1891(0x179)],undefined))delete _0x638f18['userAgent'];if(_0x638f18[_0x4a1891(0x16a)]===undefined)delete _0x638f18[_0x4a1891(0x16a)];}const _0x31ce55=join(tmpdir(),_0x2c86ad[_0x4a1891(0x1c6)]);!_0x2c86ad['tbWyx'](existsSync,_0x31ce55)&&await _0x2c86ad[_0x4a1891(0x1aa)](mkdir,_0x31ce55,{'recursive':!![]});const _0x2462b3=_0x4bace0===_0x2c86ad[_0x4a1891(0x1d1)]?_0x2c86ad[_0x4a1891(0x1de)]:'',_0x451df5=_0x2c86ad[_0x4a1891(0x1aa)](join,_0x31ce55,_0x4dc58b+'-'+Date['now']()+_0x2462b3+'.json');return await _0x2c86ad[_0x4a1891(0x17d)](writeFile,_0x451df5,JSON['stringify'](_0x3c700b,null,0x2)),{'configPath':_0x451df5,'storageStatePath':_0x270a75};}function _0x11ed(_0x3a8173,_0x22ed3d){_0x3a8173=_0x3a8173-0x162;const _0x564054=_0x5640();let _0x11ed50=_0x564054[_0x3a8173];return _0x11ed50;}export async function buildPlaywrightCliConfig(_0x16c1be,_0x3c450c,_0x298912,_0x1910c5,_0x26eff7){const _0x3ff5da=_0xceb2ee,_0x4f1160={'FvDnu':function(_0x3fb664,_0x3db239,_0x50c42c,_0x379714,_0x120d43,_0x44ce8a,_0x581526){return _0x3fb664(_0x3db239,_0x50c42c,_0x379714,_0x120d43,_0x44ce8a,_0x581526);},'uRvVS':function(_0x575091,_0x5dd9ad){return _0x575091(_0x5dd9ad);}};if(_0x26eff7)return _0x4f1160['FvDnu'](buildPlaywrightConfigCore,_0x16c1be,_0x26eff7,_0x3c450c,_0x298912,_0x1910c5,'playwright-cli');const {storageStatePath:_0x536e30,tempAuthPath:_0x3eedef}=await _0x4f1160['uRvVS'](resolveLocalAuthPath,getEnvDir(_0x3c450c));try{const _0x3e0370=await _0x4f1160['FvDnu'](buildPlaywrightConfigCore,_0x16c1be,_0x536e30,_0x3c450c,_0x298912,_0x1910c5,_0x3ff5da(0x1cf));return{..._0x3e0370,'tempAuthPath':_0x3eedef};}catch(_0x35dede){_0x3eedef&&await unlink(_0x3eedef)[_0x3ff5da(0x1dc)](()=>{});throw _0x35dede;}}export async function buildRangerwrightCliConfig(_0x59330e,_0x277230,_0x31a696,_0x50f8ae,_0x364986){const _0x13e416=_0xceb2ee,_0x2be3d9={'XXHQl':function(_0x4e0ccc,_0x4a9302){return _0x4e0ccc===_0x4a9302;},'xvbsV':'--no-sandbox','llMPp':'chromium','bYIZs':_0x13e416(0x1c8),'iCfvD':_0x13e416(0x1b5),'AQraL':function(_0x422bbb,_0x22efcb){return _0x422bbb(_0x22efcb);},'Qrkfg':function(_0x2a4585){return _0x2a4585();},'ONrhc':function(_0x32d433,_0x2d766d,_0x182019,_0x492d8c){return _0x32d433(_0x2d766d,_0x182019,_0x492d8c);},'phTRn':function(_0x12758d,_0x426ba3){return _0x12758d===_0x426ba3;},'vdTFz':function(_0x1d8797,_0x8d357d,_0x3a380a){return _0x1d8797(_0x8d357d,_0x3a380a);},'bminV':function(_0xc9e49b){return _0xc9e49b();},'TqiBZ':'ranger-config','wGkQz':function(_0x1dca51,_0x19313b,_0x5ce97f){return _0x1dca51(_0x19313b,_0x5ce97f);}},{storageStatePath:_0x59f547,tempAuthPath:_0x2abc42}=_0x364986?{'storageStatePath':_0x364986,'tempAuthPath':undefined}:await _0x2be3d9['AQraL'](resolveLocalAuthPath,getEnvDir(_0x277230)),_0x539574=_0x31a696||_0x2be3d9[_0x13e416(0x1bb)](randomUUID),_0x482cec=_0x2be3d9['ONrhc'](join,_0x2be3d9['Qrkfg'](getRangerDir),'sessions',_0x539574),_0x3e56f9=Boolean(_0x59330e['cdpEndpoint']),_0x226f4e=_0x3e56f9?{'browserName':_0x2be3d9['llMPp'],'cdpEndpoint':_0x59330e[_0x13e416(0x1c0)]}:((()=>{const _0x3b7a37=_0x13e416,{launchOptions:_0x2ee50e,contextOptions:_0x1ffef5}=buildBrowserOptionsFromSettings(_0x59330e,{'headless':_0x50f8ae?![]:_0x59330e['headless']??!![],'storageStatePath':_0x59f547});if(_0x2be3d9[_0x3b7a37(0x163)](process[_0x3b7a37(0x195)]?.(),0x0)){const _0x2f0250=[_0x2be3d9['xvbsV'],'--disable-setuid-sandbox'],_0x4dbf42=_0x2ee50e[_0x3b7a37(0x1bc)]??[],_0x2709a5=_0x2f0250[_0x3b7a37(0x1d9)](_0x5da699=>!_0x4dbf42[_0x3b7a37(0x1e2)](_0x5da699));_0x2ee50e[_0x3b7a37(0x1bc)]=[..._0x4dbf42,..._0x2709a5];}return{'browserName':_0x2be3d9[_0x3b7a37(0x1a6)],'launchOptions':_0x2ee50e,'contextOptions':{..._0x1ffef5,'permissions':[_0x2be3d9['bYIZs'],_0x2be3d9[_0x3b7a37(0x176)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3e56f9){const _0x3bd090=_0x226f4e[_0x13e416(0x16d)];if(_0x3bd090){if(_0x2be3d9[_0x13e416(0x17a)](_0x3bd090[_0x13e416(0x179)],undefined))delete _0x3bd090['userAgent'];if(_0x3bd090[_0x13e416(0x16a)]===undefined)delete _0x3bd090['storageState'];}}const _0x342cf7={'browser':_0x226f4e,'outputDir':_0x482cec,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3f37fd;try{const _0x4290f3=_0x2be3d9[_0x13e416(0x196)](join,_0x2be3d9[_0x13e416(0x197)](tmpdir),_0x2be3d9[_0x13e416(0x1c9)]);!_0x2be3d9['AQraL'](existsSync,_0x4290f3)&&await mkdir(_0x4290f3,{'recursive':!![]}),_0x3f37fd=_0x2be3d9['vdTFz'](join,_0x4290f3,_0x277230+'-'+Date[_0x13e416(0x171)]()+'-rangerwright.json'),await _0x2be3d9['wGkQz'](writeFile,_0x3f37fd,JSON[_0x13e416(0x1a8)](_0x342cf7,null,0x2));}catch(_0x3bd1cd){_0x2abc42&&await _0x2be3d9[_0x13e416(0x1c4)](unlink,_0x2abc42)['catch'](()=>{});throw _0x3bd1cd;}return{'configPath':_0x3f37fd,'storageStatePath':_0x59f547,'tempAuthPath':_0x2abc42,'outputDir':_0x482cec};}export async function buildNovaActCliConfig(_0x14d24c,_0x3f1619,_0x4589bd,_0xd7d706,_0x496d65){const _0x5b1642=_0xceb2ee,_0xec1d13={'xArhN':function(_0x1266a1,_0x540a85){return _0x1266a1(_0x540a85);},'cfZPe':function(_0x2c21de,_0x5ed889){return _0x2c21de(_0x5ed889);},'JTDeh':function(_0x219ce0,_0x3c5b1c,_0x34eb8a,_0x293131){return _0x219ce0(_0x3c5b1c,_0x34eb8a,_0x293131);},'SjtfG':'nova-user-data','szvGq':function(_0x16ce7b,_0x2f40d6,_0x3f4231){return _0x16ce7b(_0x2f40d6,_0x3f4231);},'bFbjd':function(_0x57477e,_0x35506b){return _0x57477e===_0x35506b;},'wGvdD':_0x5b1642(0x194),'gEBqi':_0x5b1642(0x1dd),'mJzDZ':function(_0x3696ed,_0x4618ee){return _0x3696ed===_0x4618ee;},'CPrFF':'string','uAHyZ':function(_0x41bbff,_0x4126e7){return _0x41bbff(_0x4126e7);}},{storageStatePath:_0x406b40,tempAuthPath:_0x4f6a78}=_0x496d65?{'storageStatePath':_0x496d65,'tempAuthPath':undefined}:await _0xec1d13['xArhN'](resolveLocalAuthPath,_0xec1d13[_0x5b1642(0x199)](getEnvDir,_0x3f1619)),_0x2665e9=_0x4589bd||randomUUID(),_0x57d8da=_0xec1d13[_0x5b1642(0x1db)](join,getRangerDir(),_0x5b1642(0x19f),_0x2665e9),_0x10baa9=join(_0x57d8da,_0xec1d13['SjtfG']),_0x242774=_0x406b40?_0xec1d13[_0x5b1642(0x1e6)](join,_0x10baa9,'Default'):undefined,{launchOptions:_0x1649c6,contextOptions:_0x249abd}=buildBrowserOptionsFromSettings(_0x14d24c,{'headless':_0xd7d706?![]:_0x14d24c['headless']??!![],'storageStatePath':_0x406b40});if(_0xec1d13[_0x5b1642(0x1a5)](process['getuid']?.(),0x0)){const _0x21531c=[_0xec1d13[_0x5b1642(0x1e5)],_0xec1d13['gEBqi']],_0xbb3ea=_0x1649c6[_0x5b1642(0x1bc)]??[],_0x86895=_0x21531c[_0x5b1642(0x1d9)](_0x12b743=>!_0xbb3ea[_0x5b1642(0x1e2)](_0x12b743));_0x1649c6['args']=[..._0xbb3ea,..._0x86895];}const _0x1ef183=_0xec1d13[_0x5b1642(0x177)](typeof _0x1649c6['executablePath'],'string')?_0x1649c6[_0x5b1642(0x1c2)]:_0x406b40?chromium['executablePath']():undefined;return{'storageStatePath':_0x406b40,'tempAuthPath':_0x4f6a78,'baseUrl':_0x14d24c['baseUrl'],'headless':_0xec1d13[_0x5b1642(0x199)](Boolean,_0x1649c6['headless']),'userDataDir':_0x10baa9,'browserProfilePath':_0x242774,'executablePath':_0x1ef183,'launchArgs':Array['isArray'](_0x1649c6['args'])?_0x1649c6[_0x5b1642(0x1bc)][_0x5b1642(0x1d9)](_0x3527fa=>typeof _0x3527fa==='string'):[],'userAgent':_0xec1d13['mJzDZ'](typeof _0x249abd['userAgent'],_0xec1d13[_0x5b1642(0x1d6)])?_0x249abd['userAgent']:undefined,'extraHTTPHeaders':_0x249abd['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x14d24c['allowInsecureLocalhost']),'safeMode':Boolean(_0x14d24c[_0x5b1642(0x185)]),'cdpEndpoint':_0x14d24c['cdpEndpoint'],'isCdpMode':_0xec1d13[_0x5b1642(0x1bf)](Boolean,_0x14d24c[_0x5b1642(0x1c0)])};}export function getNestedValue(_0x50805a,_0x128f8a){const _0x1792aa={'Pugsa':function(_0x3b899c,_0x39f6b3){return _0x3b899c(_0x39f6b3);},'VYsss':function(_0x36cc28,_0x2e3d5a){return _0x36cc28===_0x2e3d5a;}},_0x17ff7d=_0x1792aa['Pugsa'](parseKeyPath,_0x128f8a);let _0x43489c=_0x50805a;for(const _0x123dcb of _0x17ff7d){if(_0x1792aa['VYsss'](_0x43489c,null)||_0x43489c===undefined||typeof _0x43489c!=='object')return undefined;_0x43489c=_0x43489c[_0x123dcb];}return _0x43489c;}export function setNestedValue(_0x34ef53,_0x2cf163,_0x46f5e3){const _0x1da8b3=_0xceb2ee,_0x18defe={'Hflpe':function(_0x6974f9,_0x8738c6){return _0x6974f9<_0x8738c6;},'sOThA':function(_0x4e4e09,_0x4dc2a2){return _0x4e4e09!==_0x4dc2a2;},'RbZIC':function(_0x3916cd,_0x2c4e8d){return _0x3916cd-_0x2c4e8d;}},_0x54ecb1=parseKeyPath(_0x2cf163);let _0x16b366=_0x34ef53;for(let _0xb34c87=0x0;_0x18defe[_0x1da8b3(0x174)](_0xb34c87,_0x54ecb1[_0x1da8b3(0x17f)]-0x1);_0xb34c87++){const _0x3abf2e=_0x54ecb1[_0xb34c87];(!(_0x3abf2e in _0x16b366)||_0x18defe['sOThA'](typeof _0x16b366[_0x3abf2e],'object'))&&(_0x16b366[_0x3abf2e]={}),_0x16b366=_0x16b366[_0x3abf2e];}_0x16b366[_0x54ecb1[_0x18defe['RbZIC'](_0x54ecb1[_0x1da8b3(0x17f)],0x1)]]=_0x46f5e3;}export function deleteNestedValue(_0x387942,_0x410e98){const _0x3b709e=_0xceb2ee,_0x22f517={'lXVei':function(_0x13232d,_0x3faf2b){return _0x13232d<_0x3faf2b;},'fpJSG':function(_0x43b362,_0x5f1944){return _0x43b362-_0x5f1944;},'YpLyE':function(_0x47ab90,_0x84cc70){return _0x47ab90===_0x84cc70;},'hriMc':function(_0x4c7607,_0x23246a){return _0x4c7607===_0x23246a;}},_0x229f1c=parseKeyPath(_0x410e98);let _0x5a4195=_0x387942;for(let _0x2cd11c=0x0;_0x22f517[_0x3b709e(0x175)](_0x2cd11c,_0x22f517['fpJSG'](_0x229f1c[_0x3b709e(0x17f)],0x1));_0x2cd11c++){if(_0x22f517[_0x3b709e(0x1e1)](_0x5a4195,null)||_0x5a4195===undefined||typeof _0x5a4195!=='object')return![];_0x5a4195=_0x5a4195[_0x229f1c[_0x2cd11c]];}if(_0x22f517[_0x3b709e(0x1e1)](_0x5a4195,null)||_0x22f517['hriMc'](_0x5a4195,undefined)||typeof _0x5a4195!==_0x3b709e(0x183))return![];const _0x1a96d8=_0x229f1c[_0x229f1c['length']-0x1];if(_0x1a96d8 in _0x5a4195)return delete _0x5a4195[_0x1a96d8],!![];return![];}function parseKeyPath(_0x53b8a5){const _0x1160ff=_0xceb2ee,_0x5109aa={'tBDpY':function(_0x562eba,_0x1c54e7){return _0x562eba===_0x1c54e7;}},_0x3758c0=_0x53b8a5['split']('.');return _0x5109aa[_0x1160ff(0x1da)](_0x3758c0[0x0],_0x1160ff(0x1b1))&&(_0x3758c0[0x0]=_0x1160ff(0x162)),_0x3758c0[0x0]==='setupHeader'&&(_0x3758c0[0x0]=_0x1160ff(0x1a9)),_0x3758c0;}export function formatSettings(_0x4f1366,_0x40d554=0x0){const _0x5848ee=_0xceb2ee,_0x55ec40={'ZZhHu':function(_0x19a623,_0xeddbea){return _0x19a623===_0xeddbea;},'XINOU':_0x5848ee(0x183)},_0x147889=[],_0x31c187='\x20\x20'['repeat'](_0x40d554);for(const [_0x38f8c0,_0x8c536c]of Object[_0x5848ee(0x18a)](_0x4f1366)){if(_0x8c536c===undefined)continue;if(_0x55ec40['ZZhHu'](typeof _0x8c536c,_0x55ec40[_0x5848ee(0x167)])&&_0x8c536c!==null){_0x147889[_0x5848ee(0x1af)](''+_0x31c187+_0x38f8c0+':');for(const [_0x262b91,_0x278d6a]of Object['entries'](_0x8c536c)){_0x147889[_0x5848ee(0x1af)](_0x31c187+'\x20\x20'+_0x262b91+':\x20'+_0x278d6a);}}else _0x147889['push'](''+_0x31c187+_0x38f8c0+':\x20'+_0x8c536c);}return _0x147889['join']('\x0a');}
|
|
1
|
+
const _0x3644ca=_0x19b3;(function(_0x299e15,_0x4c70ff){const _0x39b7ef=_0x19b3,_0x21bfcb=_0x299e15();while(!![]){try{const _0x47ee3a=-parseInt(_0x39b7ef(0x220))/0x1+parseInt(_0x39b7ef(0x23f))/0x2+parseInt(_0x39b7ef(0x22e))/0x3+-parseInt(_0x39b7ef(0x216))/0x4+-parseInt(_0x39b7ef(0x210))/0x5+parseInt(_0x39b7ef(0x255))/0x6+parseInt(_0x39b7ef(0x23c))/0x7;if(_0x47ee3a===_0x4c70ff)break;else _0x21bfcb['push'](_0x21bfcb['shift']());}catch(_0x18bde8){_0x21bfcb['push'](_0x21bfcb['shift']());}}}(_0x9827,0xbc5da));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0x9827(){const _0x2a022b=['none','env','-cli','tabs','1527144eaLfRp','headers','forWrite','executablePath','object','HOGVR','userAgent','NKPCR','TQXUH','endsWith','string','nRTWN','WeGzw','legacy','3167883hVZURT','core','bMwrc','wfsls','entries','BiWNK','sessions','now','akzfN','clipboard-write','vOAtB','gstDH','fromEntries','join','16378978pSbQtW','path','nVqcP','1109870aspFVU','ignoreHTTPSErrors','extraHTTPHeaders','lpzVH','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','configPath','afHPe','filter','--disable-setuid-sandbox','NlhaT','poEMU','RXVqS','pHPFl','bvQXb','ranger-auth-','contextOptions','--allow-running-insecure-content','allowInsecureLocalhost','dIriU','--no-sandbox','vPqXq','luCGO','5068404AdxAsh','includes','auth.json','setupHeader','browser','length','nGPnB','auth.json.enc','indexOf','xxFdL','ranger-config','file','chromium','settings.json','HPvdv','local','isArray','headless','catch','eXpGy','Refusing\x20to\x20write\x20profile\x20\x22','EIfGM','storageState','.json','THRQt','all','header','adzsq','cdpEndpoint','xHFrT','allow','rrtIx','qTDWp','lKeCT','push','location','nBPBe','playwright-cli','QyMiW','stringify','CbmUI','cCvLm','TPjsu','gBRto','CLbpJ','utf-8','NruHL','code','map','7224390vGGRXi','AgdXx','swXge','RmCHz','UNroW','safeMode','4207664UkvJkr','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','args','frqcE','clipboard-read','mojgl'];_0x9827=function(){return _0x2a022b;};return _0x9827();}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(_0x3db051,_0x2837c9){const _0x3c487c=_0x19b3,_0x107a7e={'swXge':function(_0x444608,_0x2cd913,_0x42d828,_0x22aa46){return _0x444608(_0x2cd913,_0x42d828,_0x22aa46);},'YOBbk':function(_0x7ea2df,_0x4e792d,_0x591d16){return _0x7ea2df(_0x4e792d,_0x591d16);},'tVyVV':function(_0x4b552c,_0x2e1454){return _0x4b552c(_0x2e1454);},'rrfMg':function(_0x585377,_0x274d2e){return _0x585377(_0x274d2e);},'wSmOR':function(_0x1c5cc7,_0xd62b32){return _0x1c5cc7!==_0xd62b32;}},_0x4dc53a=_0x107a7e[_0x3c487c(0x212)](join,_0x2837c9,'ci',_0x3db051),_0x1661b7=_0x107a7e[_0x3c487c(0x212)](join,_0x2837c9,'local',_0x3db051),_0x4ad8ff=join(_0x2837c9,_0x3db051),_0x5e5737=join(_0x2837c9,'local'),_0x535143=_0x107a7e['YOBbk'](join,_0x2837c9,'ci');if(existsSync(_0x4dc53a))return _0x4dc53a;if(_0x107a7e['tVyVV'](existsSync,_0x1661b7))return _0x1661b7;if(_0x107a7e['rrfMg'](existsSync,_0x4ad8ff)&&(_0x107a7e['wSmOR'](_0x4ad8ff,_0x5e5737)&&_0x4ad8ff!==_0x535143?!![]:hasLegacyProfileFiles(_0x4ad8ff)))return _0x4ad8ff;return null;}export function getEnvDir(_0x12c911,_0x1b0964={}){const _0x20d597=_0x19b3,_0x1663fc={'oXnIa':function(_0x43a68a){return _0x43a68a();},'afHPe':function(_0x2d9d25,_0x1da0e9,_0xf5c599){return _0x2d9d25(_0x1da0e9,_0xf5c599);},'eXpGy':function(_0x4fa777,_0x380ec6){return _0x4fa777!==_0x380ec6;},'FlETX':function(_0xa94cce,_0xf461d4){return _0xa94cce(_0xf461d4);},'luCGO':'local'},_0x2f9085=_0x1663fc['oXnIa'](getRangerDir),_0x3a0c48=_0x1663fc[_0x20d597(0x245)](findEnvInRoot,_0x12c911,_0x2f9085);if(_0x3a0c48){if(_0x1b0964[_0x20d597(0x222)]&&isLegacyEnvPath(_0x3a0c48))throw _0x1663fc[_0x20d597(0x245)](legacyWriteError,_0x12c911,_0x3a0c48);return _0x3a0c48;}const _0x1798b7=getRangerHomeDir();if(_0x1663fc[_0x20d597(0x1f2)](_0x1798b7,_0x2f9085)){const _0x1d9218=_0x1663fc[_0x20d597(0x245)](findEnvInRoot,_0x12c911,_0x1798b7);if(_0x1d9218){if(_0x1b0964[_0x20d597(0x222)]&&_0x1663fc['FlETX'](isLegacyEnvPath,_0x1d9218))throw legacyWriteError(_0x12c911,_0x1d9218);return _0x1d9218;}}const _0x2399a7=join(_0x1798b7,_0x1663fc[_0x20d597(0x254)],_0x12c911);if(_0x1b0964[_0x20d597(0x222)])throw _0x1663fc[_0x20d597(0x245)](legacyWriteError,_0x12c911,_0x2399a7);return _0x2399a7;}function isLegacyEnvPath(_0x1af3cf){const _0x47e75a=_0x19b3,_0x57f84c={'QLkBx':function(_0x93175d){return _0x93175d();},'RmCHz':function(_0x59c812,_0x4fb2d0){return _0x59c812+_0x4fb2d0;},'hmeCJ':function(_0x7718fc,_0x4820c3){return _0x7718fc===_0x4820c3;}},_0x4f131c=_0x57f84c['QLkBx'](getRangerDir),_0x1f9ca0=getRangerHomeDir();for(const _0x2e7925 of new Set([_0x4f131c,_0x1f9ca0])){const _0x2511a7=_0x2e7925[_0x47e75a(0x229)]('/')?_0x2e7925:_0x57f84c[_0x47e75a(0x213)](_0x2e7925,'/');if(_0x57f84c['hmeCJ'](_0x1af3cf,_0x2e7925)||_0x1af3cf['startsWith'](_0x2511a7))return!![];}return![];}function legacyWriteError(_0x3c7be4,_0x158245){const _0x4f773a=_0x19b3,_0x4b1f9c={'bvQXb':function(_0x18078c,_0x5d8e56){return _0x18078c+_0x5d8e56;}};return new Error(_0x4b1f9c[_0x4f773a(0x24c)](_0x4b1f9c['bvQXb'](_0x4f773a(0x1f3)+_0x3c7be4+'\x22\x20to\x20legacy\x20path\x20'+_0x158245+'.\x0a'+_0x4f773a(0x243),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x5886d7,_0x197a6a){const _0x6f620=_0x19b3,_0x5d2c51={'vPqXq':_0x6f620(0x1ee),'TAwHZ':_0x6f620(0x22d),'Daixz':function(_0x315177,_0x1a4cb6,_0x118aa4){return _0x315177(_0x1a4cb6,_0x118aa4);},'qTDWp':function(_0x791aa7,_0x461f84,_0x2845bb,_0x32dfda){return _0x791aa7(_0x461f84,_0x2845bb,_0x32dfda);},'VNjqz':function(_0x1a41fb,_0x26e54e,_0x32f494){return _0x1a41fb(_0x26e54e,_0x32f494);},'nRTWN':function(_0x5f0f0a,_0x3dbab1){return _0x5f0f0a(_0x3dbab1);}},_0x458e2c=_0x197a6a?.['rangerDir'],_0x4a078d=_0x458e2c?[_0x458e2c]:[getRangerDir(),getRangerHomeDir()][_0x6f620(0x246)]((_0x5ab591,_0x1bae02,_0x218526)=>_0x218526[_0x6f620(0x25d)](_0x5ab591)===_0x1bae02),_0x37eccb=_0x197a6a?.['locations']??['ci',_0x5d2c51[_0x6f620(0x253)],_0x5d2c51['TAwHZ']];for(const _0x2bbd94 of _0x4a078d){const _0x4c0b0f=join(_0x2bbd94,_0x5d2c51['vPqXq']),_0x2aad93=_0x5d2c51['Daixz'](join,_0x2bbd94,'ci'),_0xf19bef=[{'location':'ci','path':join(_0x2bbd94,'ci',_0x5886d7)},{'location':'local','path':_0x5d2c51[_0x6f620(0x1ff)](join,_0x2bbd94,_0x6f620(0x1ee),_0x5886d7)},{'location':'legacy','path':_0x5d2c51['VNjqz'](join,_0x2bbd94,_0x5886d7)}];for(const _0x411fa5 of _0xf19bef){if(_0x37eccb[_0x6f620(0x256)](_0x411fa5[_0x6f620(0x202)])&&_0x5d2c51[_0x6f620(0x22b)](existsSync,_0x411fa5[_0x6f620(0x23d)])){if(_0x411fa5[_0x6f620(0x202)]===_0x6f620(0x22d)&&(_0x411fa5[_0x6f620(0x23d)]===_0x4c0b0f||_0x411fa5[_0x6f620(0x23d)]===_0x2aad93)&&!hasLegacyProfileFiles(_0x411fa5[_0x6f620(0x23d)]))continue;return{'path':_0x411fa5[_0x6f620(0x23d)],'location':_0x411fa5['location']};}}}return null;}function hasLegacyProfileFiles(_0x591c94){const _0xa428c2=_0x19b3,_0x31d21b={'dIriU':function(_0x19d28e,_0xf351ea){return _0x19d28e(_0xf351ea);},'nGPnB':function(_0x34ef1a,_0x51220f,_0xa0028f){return _0x34ef1a(_0x51220f,_0xa0028f);},'aJMzL':function(_0x5334a8,_0x18a22a,_0x564145){return _0x5334a8(_0x18a22a,_0x564145);},'AwLBL':'auth.json','NKPCR':_0xa428c2(0x25c)};return _0x31d21b[_0xa428c2(0x251)](existsSync,_0x31d21b[_0xa428c2(0x25b)](join,_0x591c94,_0xa428c2(0x262)))||existsSync(_0x31d21b['aJMzL'](join,_0x591c94,_0x31d21b['AwLBL']))||existsSync(join(_0x591c94,_0x31d21b[_0xa428c2(0x227)]));}export function isEnvCi(_0x5842e3){const _0x5178ee=_0x19b3,_0x3e89b5={'hShBg':function(_0xe1b610){return _0xe1b610();},'poEMU':function(_0x382a55,_0x2d68df){return _0x382a55!==_0x2d68df;},'VgnuV':function(_0x36c395,_0x178de3){return _0x36c395(_0x178de3);},'RXVqS':function(_0x3260cb,_0x56f1c8,_0x4e4283,_0x4db244){return _0x3260cb(_0x56f1c8,_0x4e4283,_0x4db244);}};if(existsSync(join(_0x3e89b5['hShBg'](getRangerDir),'ci',_0x5842e3)))return!![];const _0x3c4e89=getRangerHomeDir();if(_0x3e89b5[_0x5178ee(0x249)](_0x3c4e89,getRangerDir())&&_0x3e89b5['VgnuV'](existsSync,_0x3e89b5[_0x5178ee(0x24a)](join,_0x3c4e89,'ci',_0x5842e3)))return!![];return![];}export async function cleanupTempFiles(_0x232f34){const _0x471cb3=_0x19b3,_0x24fb8a={'mojgl':function(_0xd04b98,_0x4695b1){return _0xd04b98!==_0x4695b1;}},_0x2f068d=[_0x232f34['tempAuthPath'],_0x232f34[_0x471cb3(0x244)]]['filter'](Boolean);await Promise[_0x471cb3(0x1f8)](_0x2f068d['map'](_0x5d3a76=>unlink(_0x5d3a76)[_0x471cb3(0x1f1)](_0x36cf69=>{const _0x42b434=_0x471cb3;_0x24fb8a[_0x42b434(0x21b)](_0x36cf69[_0x42b434(0x20e)],'ENOENT')&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5d3a76+':',_0x36cf69['message']);})));}export function getSettingsPath(_0x9c9413){const _0x33ca95=_0x19b3,_0x3a8cf0={'xxFdL':function(_0x10125b,_0x3182a7){return _0x10125b(_0x3182a7);},'BiWNK':_0x33ca95(0x262)};return join(_0x3a8cf0[_0x33ca95(0x25e)](getEnvDir,_0x9c9413),_0x3a8cf0[_0x33ca95(0x233)]);}function _0x19b3(_0x228d8f,_0x364896){_0x228d8f=_0x228d8f-0x1ed;const _0x982760=_0x9827();let _0x19b3ab=_0x982760[_0x228d8f];return _0x19b3ab;}export async function loadSettings(_0x4c3029){const _0x3d0817=_0x19b3,_0xb7561d={'gstDH':function(_0x2f23d8,_0x167373){return _0x2f23d8(_0x167373);},'THRQt':_0x3d0817(0x20c)},_0x9ccac8=_0xb7561d[_0x3d0817(0x239)](getSettingsPath,_0x4c3029);if(!existsSync(_0x9ccac8))return{};try{const _0x4a8fa1=await readFile(_0x9ccac8,_0xb7561d[_0x3d0817(0x1f7)]);return JSON['parse'](_0x4a8fa1);}catch{return{};}}export async function saveSettings(_0xef4859,_0x1c8a47){const _0x217e81=_0x19b3,_0xaa74ef={'zZpOw':function(_0x4cebcf,_0x2ab99f){return _0x4cebcf(_0x2ab99f);},'UNroW':function(_0x40f261,_0x52c947,_0x125266){return _0x40f261(_0x52c947,_0x125266);}},_0x1fa0bd=_0xaa74ef['zZpOw'](getSettingsPath,_0xef4859),_0x43d3dd=dirname(_0x1fa0bd);!existsSync(_0x43d3dd)&&await _0xaa74ef[_0x217e81(0x214)](mkdir,_0x43d3dd,{'recursive':!![]}),await writeFile(_0x1fa0bd,JSON[_0x217e81(0x206)](_0x1c8a47,null,0x2));}export function resolveEnvVars(_0x3c5df7){const _0x3f0452=_0x19b3,_0x32e92b={'gUCDs':function(_0x2b761a,_0x238e64){return _0x2b761a===_0x238e64;},'juThm':'object'};if(typeof _0x3c5df7==='string')return _0x3c5df7['replace'](/\$\{(\w+)\}/g,(_0x602e4b,_0x22afe8)=>{const _0xd95e67=_0x19b3,_0x40b965=process[_0xd95e67(0x21d)][_0x22afe8];if(_0x32e92b['gUCDs'](_0x40b965,undefined))throw new Error('Environment\x20variable\x20'+_0x22afe8+'\x20is\x20not\x20set');return _0x40b965;});if(Array['isArray'](_0x3c5df7))return _0x3c5df7[_0x3f0452(0x20f)](resolveEnvVars);if(_0x3c5df7&&typeof _0x3c5df7===_0x32e92b['juThm'])return Object[_0x3f0452(0x23a)](Object[_0x3f0452(0x232)](_0x3c5df7)['map'](([_0x333fba,_0x56b328])=>[_0x333fba,resolveEnvVars(_0x56b328)]));return _0x3c5df7;}const isRecord=_0x5f53b5=>typeof _0x5f53b5===_0x3644ca(0x224)&&_0x5f53b5!==null&&!Array[_0x3644ca(0x1ef)](_0x5f53b5),asRecord=_0x494cbe=>isRecord(_0x494cbe)?_0x494cbe:undefined,mergeHeaders=(_0x1700d6,_0x55c36d)=>{const _0x57b9ea={'hbQAd':function(_0x11ae42,_0x4a2e5c){return _0x11ae42??_0x4a2e5c;}},_0x365728={..._0x1700d6??{},..._0x57b9ea['hbQAd'](_0x55c36d,{})};return Object['keys'](_0x365728)['length']?_0x365728:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x3644ca(0x24f),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x53bab1,_0x390d51={}){const _0x50a83b=_0x3644ca,_0x39dfb8={'ELkgJ':function(_0x3ec2f2,_0x184e49){return _0x3ec2f2(_0x184e49);},'nVqcP':function(_0x3df592,_0x3bc6b2){return _0x3df592===_0x3bc6b2;},'xHFrT':function(_0x2cdd13,_0xcf0f57){return _0x2cdd13(_0xcf0f57);}},_0x1733fe=_0x39dfb8['ELkgJ'](asRecord,_0x53bab1[_0x50a83b(0x259)]),_0x483cf4={..._0x39dfb8['ELkgJ'](asRecord,_0x1733fe?.['launchOptions'])??{}};_0x39dfb8[_0x50a83b(0x23e)](typeof _0x390d51[_0x50a83b(0x1f0)],'boolean')&&(_0x483cf4[_0x50a83b(0x1f0)]=_0x390d51[_0x50a83b(0x1f0)]);if(_0x53bab1['safeMode']){const _0x30892f=_0x483cf4[_0x50a83b(0x218)]??[],_0x48718f=SAFE_MODE_ARGS[_0x50a83b(0x246)](_0x1c45c0=>!_0x30892f[_0x50a83b(0x256)](_0x1c45c0));_0x483cf4[_0x50a83b(0x218)]=[..._0x30892f,..._0x48718f];}if(_0x53bab1['allowInsecureLocalhost']){const _0x3b8b97=_0x483cf4['args']??[],_0x5e75e9=ALLOW_LOCALHOST_ARGS['filter'](_0x40be58=>!_0x3b8b97[_0x50a83b(0x256)](_0x40be58));_0x483cf4[_0x50a83b(0x218)]=[..._0x3b8b97,..._0x5e75e9];}const _0x195e78={...asRecord(_0x1733fe?.[_0x50a83b(0x24e)])??{}};_0x195e78[_0x50a83b(0x240)]=!![];typeof _0x53bab1['userAgent']===_0x50a83b(0x22a)&&(_0x195e78['userAgent']=_0x53bab1['userAgent']);const _0x2f9f51=mergeHeaders(asRecord(_0x195e78[_0x50a83b(0x241)]),_0x39dfb8[_0x50a83b(0x1fc)](asRecord,_0x53bab1['headers']));return _0x2f9f51?_0x195e78['extraHTTPHeaders']=_0x2f9f51:delete _0x195e78[_0x50a83b(0x241)],_0x390d51['storageStatePath']&&(_0x195e78['storageState']=_0x390d51['storageStatePath']),{'launchOptions':_0x483cf4,'contextOptions':_0x195e78};}export async function resolveProfileStorageState(_0x3087ef){const _0x1197e3=_0x3644ca,_0x1d6367={'pHPFl':function(_0x14ac2f,_0x10b35c){return _0x14ac2f(_0x10b35c);},'vScgu':function(_0x412085,_0x28b5b5){return _0x412085(_0x28b5b5);}};return _0x1d6367[_0x1197e3(0x24b)](resolveLocalAuthPath,_0x1d6367['vScgu'](getEnvDir,_0x3087ef));}async function resolveLocalAuthPath(_0x46b264){const _0x56c1ab=_0x3644ca,_0x1e86a2={'xLUYX':function(_0x465852,_0x232c5e,_0x4ac9cf){return _0x465852(_0x232c5e,_0x4ac9cf);},'RdHST':_0x56c1ab(0x25c),'rlapK':function(_0x1a5c3b,_0x4d2405){return _0x1a5c3b(_0x4d2405);},'kiluj':function(_0x5d43a7,_0x3cc680){return _0x5d43a7 instanceof _0x3cc680;},'hUWAo':function(_0x2db9b7,_0x6c1429){return _0x2db9b7(_0x6c1429);}},_0xc0fa9b=_0x1e86a2['xLUYX'](join,_0x46b264,_0x1e86a2['RdHST']),_0x5cf5c4=join(_0x46b264,_0x56c1ab(0x257));if(existsSync(_0xc0fa9b))try{const _0x5ee7af=await getToken();if(!_0x5ee7af)throw new Error(_0x56c1ab(0x217));const _0x23530a=await _0x1e86a2['rlapK'](readFile,_0xc0fa9b),_0x4abd7b=decrypt(_0x23530a,_0x5ee7af),_0x15485a=join(tmpdir(),_0x56c1ab(0x24d)+Date[_0x56c1ab(0x235)]()+'.json');return await writeFile(_0x15485a,_0x4abd7b),{'storageStatePath':_0x15485a,'tempAuthPath':_0x15485a};}catch(_0x34723e){const _0x444be1=_0x1e86a2['kiluj'](_0x34723e,Error)?_0x34723e['message']:_0x1e86a2['hUWAo'](String,_0x34723e);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x444be1);}if(_0x1e86a2['rlapK'](existsSync,_0x5cf5c4))return{'storageStatePath':_0x5cf5c4};return{};}export async function buildPlaywrightConfig(_0x35fce1,_0x397a6f,_0x300c1b,_0x30cabf,_0x15b087){const _0x261dc2=_0x3644ca,_0xd8200f={'nBPBe':function(_0x225d3c,_0x3b26f7,_0x46e36f,_0x50a24a,_0x475517,_0x48b042,_0x426f48){return _0x225d3c(_0x3b26f7,_0x46e36f,_0x50a24a,_0x475517,_0x48b042,_0x426f48);},'KgvgR':function(_0x43bcc9,_0x8a6f2c,_0x1fc109,_0x1f5558,_0x101888,_0x271d92,_0x4098f8){return _0x43bcc9(_0x8a6f2c,_0x1fc109,_0x1f5558,_0x101888,_0x271d92,_0x4098f8);},'cCvLm':'stagehand'};if(_0x15b087)return _0xd8200f[_0x261dc2(0x203)](buildPlaywrightConfigCore,_0x35fce1,_0x15b087,_0x397a6f,_0x300c1b,_0x30cabf,'stagehand');const {storageStatePath:_0x1e9448,tempAuthPath:_0x25332b}=await resolveLocalAuthPath(getEnvDir(_0x397a6f));try{const _0x4591ab=await _0xd8200f['KgvgR'](buildPlaywrightConfigCore,_0x35fce1,_0x1e9448,_0x397a6f,_0x300c1b,_0x30cabf,_0xd8200f[_0x261dc2(0x208)]);return{..._0x4591ab,'tempAuthPath':_0x25332b};}catch(_0x1345f4){_0x25332b&&await unlink(_0x25332b)[_0x261dc2(0x1f1)](()=>{});throw _0x1345f4;}}export async function buildPlaywrightConfigCore(_0x5548b4,_0x1d3544,_0x104f2d,_0x1520e0,_0x515418,_0x6e9342='stagehand'){const _0x3e4c62=_0x3644ca,_0x45225b={'frqcE':_0x3e4c62(0x252),'vKvXJ':_0x3e4c62(0x247),'UiCbo':_0x3e4c62(0x237),'MjohT':function(_0x3b73eb,_0x1d293b,_0x491e07,_0x5ebfac){return _0x3b73eb(_0x1d293b,_0x491e07,_0x5ebfac);},'MKMNG':function(_0x3e151e){return _0x3e151e();},'fBXnd':_0x3e4c62(0x234),'NruHL':function(_0x1d38dd,_0x1de952){return _0x1d38dd(_0x1de952);},'AgdXx':function(_0x13ac9e,_0x5ba664){return _0x13ac9e===_0x5ba664;},'rrtIx':_0x3e4c62(0x22f),'NzxbV':_0x3e4c62(0x21f),'gGREG':'vision','bXYOH':function(_0x3ff3fa){return _0x3ff3fa();},'tHVcW':function(_0x1024b4,_0x1772b7,_0x560492){return _0x1024b4(_0x1772b7,_0x560492);},'jjQkI':_0x3e4c62(0x204),'bMwrc':_0x3e4c62(0x21e),'gCkxi':function(_0x1f310a,_0x1a034a,_0x4fd544){return _0x1f310a(_0x1a034a,_0x4fd544);}},_0x329a42=_0x1520e0||randomUUID(),_0x43fd24=_0x45225b['MjohT'](join,_0x45225b['MKMNG'](getRangerDir),_0x45225b['fBXnd'],_0x329a42),_0x33d732=_0x45225b[_0x3e4c62(0x20d)](Boolean,_0x5548b4[_0x3e4c62(0x1fb)]),_0x45da2e=_0x33d732?{'browserName':_0x3e4c62(0x261),'cdpEndpoint':_0x5548b4[_0x3e4c62(0x1fb)]}:((()=>{const _0x522e7d=_0x3e4c62,{launchOptions:_0x27b86e,contextOptions:_0x5b5bc2}=buildBrowserOptionsFromSettings(_0x5548b4,{'headless':_0x515418?![]:_0x5548b4[_0x522e7d(0x1f0)]??!![],'storageStatePath':_0x1d3544});if(process['getuid']?.()===0x0){const _0x2c50ea=[_0x45225b[_0x522e7d(0x219)],_0x45225b['vKvXJ']],_0x594e49=_0x27b86e['args']??[],_0x4d24ee=_0x2c50ea[_0x522e7d(0x246)](_0x25d77e=>!_0x594e49['includes'](_0x25d77e));_0x27b86e[_0x522e7d(0x218)]=[..._0x594e49,..._0x4d24ee];}return{'isolated':!![],'browserName':_0x522e7d(0x261),'launchOptions':_0x27b86e,'contextOptions':{..._0x5b5bc2,'permissions':[_0x522e7d(0x21a),_0x45225b['UiCbo']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1b13e0=_0x45225b[_0x3e4c62(0x211)](_0x6e9342,_0x3e4c62(0x204))?{'browser':_0x45da2e,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x43fd24,'outputMode':_0x3e4c62(0x260),'codegen':_0x3e4c62(0x21c)}:{'name':_0x104f2d,'browser':_0x45da2e,'capabilities':[_0x45225b[_0x3e4c62(0x1fe)],_0x45225b['NzxbV'],'install','pdf',_0x45225b['gGREG']],'imageResponses':_0x3e4c62(0x1fd),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x43fd24};if(!_0x33d732){const _0x31038e=_0x1b13e0[_0x3e4c62(0x259)],_0x3d34bd=_0x31038e[_0x3e4c62(0x24e)];if(_0x3d34bd[_0x3e4c62(0x226)]===undefined)delete _0x3d34bd[_0x3e4c62(0x226)];if(_0x3d34bd[_0x3e4c62(0x1f5)]===undefined)delete _0x3d34bd[_0x3e4c62(0x1f5)];}const _0x458592=join(_0x45225b['bXYOH'](tmpdir),'ranger-config');!existsSync(_0x458592)&&await _0x45225b['tHVcW'](mkdir,_0x458592,{'recursive':!![]});const _0x4f4373=_0x45225b['AgdXx'](_0x6e9342,_0x45225b['jjQkI'])?_0x45225b[_0x3e4c62(0x230)]:'',_0x15627b=_0x45225b['gCkxi'](join,_0x458592,_0x104f2d+'-'+Date[_0x3e4c62(0x235)]()+_0x4f4373+_0x3e4c62(0x1f6));return await _0x45225b['gCkxi'](writeFile,_0x15627b,JSON['stringify'](_0x1b13e0,null,0x2)),{'configPath':_0x15627b,'storageStatePath':_0x1d3544};}export async function buildPlaywrightCliConfig(_0x130a7f,_0xc30c8c,_0x5ea2a9,_0x4d0a8b,_0x5644c2){const _0x345787=_0x3644ca,_0x54d0f5={'aLHAc':function(_0x456bc6,_0xcfdaa3,_0xf96e11,_0x258f0e,_0x2fc75e,_0x51326d,_0x5f5cf5){return _0x456bc6(_0xcfdaa3,_0xf96e11,_0x258f0e,_0x2fc75e,_0x51326d,_0x5f5cf5);},'nqbkv':function(_0x2c70d3,_0x2d3475){return _0x2c70d3(_0x2d3475);},'HtUwP':function(_0x579a91,_0x510393,_0x852fdc,_0x1ebf4c,_0x85d839,_0x2c737b,_0x186c53){return _0x579a91(_0x510393,_0x852fdc,_0x1ebf4c,_0x85d839,_0x2c737b,_0x186c53);},'TQXUH':_0x345787(0x204)};if(_0x5644c2)return _0x54d0f5['aLHAc'](buildPlaywrightConfigCore,_0x130a7f,_0x5644c2,_0xc30c8c,_0x5ea2a9,_0x4d0a8b,'playwright-cli');const {storageStatePath:_0x2ae1b1,tempAuthPath:_0x49a745}=await _0x54d0f5['nqbkv'](resolveLocalAuthPath,getEnvDir(_0xc30c8c));try{const _0x108c1e=await _0x54d0f5['HtUwP'](buildPlaywrightConfigCore,_0x130a7f,_0x2ae1b1,_0xc30c8c,_0x5ea2a9,_0x4d0a8b,_0x54d0f5[_0x345787(0x228)]);return{..._0x108c1e,'tempAuthPath':_0x49a745};}catch(_0x5ee6db){_0x49a745&&await _0x54d0f5['nqbkv'](unlink,_0x49a745)['catch'](()=>{});throw _0x5ee6db;}}export async function buildRangerwrightCliConfig(_0x44bf2f,_0x3d3077,_0x55e4c9,_0x26ae51,_0x4fa1e8){const _0x2c90d8=_0x3644ca,_0x4fb541={'WdfQR':'--no-sandbox','VliPc':_0x2c90d8(0x247),'UsFKX':_0x2c90d8(0x21a),'whaDE':_0x2c90d8(0x237),'EIfGM':function(_0x50a1d7,_0xd8ff6f){return _0x50a1d7(_0xd8ff6f);},'AVsPC':function(_0x174057){return _0x174057();},'lpzVH':function(_0x68ba3d,_0x688f4e,_0x94c58b,_0x242bae){return _0x68ba3d(_0x688f4e,_0x94c58b,_0x242bae);},'ecKol':'chromium','UMkXf':_0x2c90d8(0x25f),'TCPzK':function(_0x3c0fbf,_0x2f0599){return _0x3c0fbf(_0x2f0599);},'TPjsu':function(_0x62516,_0xf57229,_0x1f45ce){return _0x62516(_0xf57229,_0x1f45ce);},'Zghur':function(_0x2d00ee,_0x4d2d28,_0x3539fc){return _0x2d00ee(_0x4d2d28,_0x3539fc);}},{storageStatePath:_0x56c86e,tempAuthPath:_0x35073d}=_0x4fa1e8?{'storageStatePath':_0x4fa1e8,'tempAuthPath':undefined}:await _0x4fb541['EIfGM'](resolveLocalAuthPath,_0x4fb541['EIfGM'](getEnvDir,_0x3d3077)),_0x34a7e8=_0x55e4c9||_0x4fb541['AVsPC'](randomUUID),_0x7b1981=_0x4fb541[_0x2c90d8(0x242)](join,getRangerDir(),'sessions',_0x34a7e8),_0x3444ab=Boolean(_0x44bf2f[_0x2c90d8(0x1fb)]),_0x4f70b2=_0x3444ab?{'browserName':_0x4fb541['ecKol'],'cdpEndpoint':_0x44bf2f['cdpEndpoint']}:((()=>{const _0x63c10a=_0x2c90d8,{launchOptions:_0x456fff,contextOptions:_0x4494c8}=buildBrowserOptionsFromSettings(_0x44bf2f,{'headless':_0x26ae51?![]:_0x44bf2f[_0x63c10a(0x1f0)]??!![],'storageStatePath':_0x56c86e});if(process['getuid']?.()===0x0){const _0x2c9ea7=[_0x4fb541['WdfQR'],_0x4fb541['VliPc']],_0x1c475c=_0x456fff[_0x63c10a(0x218)]??[],_0x571bf1=_0x2c9ea7['filter'](_0x4b9394=>!_0x1c475c['includes'](_0x4b9394));_0x456fff[_0x63c10a(0x218)]=[..._0x1c475c,..._0x571bf1];}return{'browserName':_0x63c10a(0x261),'launchOptions':_0x456fff,'contextOptions':{..._0x4494c8,'permissions':[_0x4fb541['UsFKX'],_0x4fb541['whaDE']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3444ab){const _0x515760=_0x4f70b2[_0x2c90d8(0x24e)];if(_0x515760){if(_0x515760['userAgent']===undefined)delete _0x515760[_0x2c90d8(0x226)];if(_0x515760[_0x2c90d8(0x1f5)]===undefined)delete _0x515760['storageState'];}}const _0x31bdb0={'browser':_0x4f70b2,'outputDir':_0x7b1981,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x106238;try{const _0x25daa5=join(tmpdir(),_0x4fb541['UMkXf']);!_0x4fb541['TCPzK'](existsSync,_0x25daa5)&&await _0x4fb541[_0x2c90d8(0x209)](mkdir,_0x25daa5,{'recursive':!![]}),_0x106238=_0x4fb541['Zghur'](join,_0x25daa5,_0x3d3077+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x106238,JSON[_0x2c90d8(0x206)](_0x31bdb0,null,0x2));}catch(_0x423847){_0x35073d&&await _0x4fb541[_0x2c90d8(0x1f4)](unlink,_0x35073d)[_0x2c90d8(0x1f1)](()=>{});throw _0x423847;}return{'configPath':_0x106238,'storageStatePath':_0x56c86e,'tempAuthPath':_0x35073d,'outputDir':_0x7b1981};}export async function buildNovaActCliConfig(_0x26b7d5,_0x4976d6,_0x10211f,_0x44b8df,_0x66037b){const _0x374550=_0x3644ca,_0x54503f={'wfsls':function(_0x54c183){return _0x54c183();},'QyMiW':function(_0x13dcd0,_0x1a8336,_0x392d2f){return _0x13dcd0(_0x1a8336,_0x392d2f);},'WeGzw':'nova-user-data','hYzZR':'Default','CLbpJ':function(_0x3a2042,_0x54bb59){return _0x3a2042===_0x54bb59;},'VTrVI':_0x374550(0x247),'gBRto':_0x374550(0x22a),'ZXdMB':function(_0x327032,_0x2b2c20){return _0x327032(_0x2b2c20);}},{storageStatePath:_0x13ba9d,tempAuthPath:_0x300905}=_0x66037b?{'storageStatePath':_0x66037b,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4976d6)),_0x2f2eea=_0x10211f||_0x54503f[_0x374550(0x231)](randomUUID),_0x22de6a=join(getRangerDir(),'sessions',_0x2f2eea),_0x2c9741=_0x54503f['QyMiW'](join,_0x22de6a,_0x54503f[_0x374550(0x22c)]),_0x5b53ab=_0x13ba9d?_0x54503f[_0x374550(0x205)](join,_0x2c9741,_0x54503f['hYzZR']):undefined,{launchOptions:_0x37527e,contextOptions:_0x159f87}=buildBrowserOptionsFromSettings(_0x26b7d5,{'headless':_0x44b8df?![]:_0x26b7d5[_0x374550(0x1f0)]??!![],'storageStatePath':_0x13ba9d});if(_0x54503f['CLbpJ'](process['getuid']?.(),0x0)){const _0x2336d8=['--no-sandbox',_0x54503f['VTrVI']],_0xf90922=_0x37527e[_0x374550(0x218)]??[],_0x274049=_0x2336d8['filter'](_0x5495cb=>!_0xf90922['includes'](_0x5495cb));_0x37527e['args']=[..._0xf90922,..._0x274049];}const _0x17ef86=typeof _0x37527e[_0x374550(0x223)]===_0x374550(0x22a)?_0x37527e['executablePath']:_0x13ba9d?chromium[_0x374550(0x223)]():undefined;return{'storageStatePath':_0x13ba9d,'tempAuthPath':_0x300905,'baseUrl':_0x26b7d5['baseUrl'],'headless':Boolean(_0x37527e[_0x374550(0x1f0)]),'userDataDir':_0x2c9741,'browserProfilePath':_0x5b53ab,'executablePath':_0x17ef86,'launchArgs':Array[_0x374550(0x1ef)](_0x37527e['args'])?_0x37527e[_0x374550(0x218)][_0x374550(0x246)](_0x2c189b=>typeof _0x2c189b===_0x374550(0x22a)):[],'userAgent':_0x54503f[_0x374550(0x20b)](typeof _0x159f87['userAgent'],_0x54503f[_0x374550(0x20a)])?_0x159f87[_0x374550(0x226)]:undefined,'extraHTTPHeaders':_0x159f87['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x26b7d5[_0x374550(0x250)]),'safeMode':Boolean(_0x26b7d5[_0x374550(0x215)]),'cdpEndpoint':_0x26b7d5['cdpEndpoint'],'isCdpMode':_0x54503f['ZXdMB'](Boolean,_0x26b7d5[_0x374550(0x1fb)])};}export function getNestedValue(_0x2daeb8,_0x2f40a1){const _0x3dfb79=_0x3644ca,_0x1bef88={'qbigv':function(_0x2112e1,_0x1daac5){return _0x2112e1(_0x1daac5);},'HLBOR':function(_0x3a39ce,_0x4ad588){return _0x3a39ce===_0x4ad588;},'CbmUI':function(_0x7c6438,_0x12d945){return _0x7c6438!==_0x12d945;}},_0xbca4f8=_0x1bef88['qbigv'](parseKeyPath,_0x2f40a1);let _0x476356=_0x2daeb8;for(const _0x5c65f2 of _0xbca4f8){if(_0x1bef88['HLBOR'](_0x476356,null)||_0x476356===undefined||_0x1bef88[_0x3dfb79(0x207)](typeof _0x476356,_0x3dfb79(0x224)))return undefined;_0x476356=_0x476356[_0x5c65f2];}return _0x476356;}export function setNestedValue(_0x272384,_0x27f919,_0xbc6752){const _0x57a5a9=_0x3644ca,_0x1e32da={'adzsq':function(_0x1cc2cc,_0x1923d8){return _0x1cc2cc-_0x1923d8;},'Wrqun':function(_0x2823ca,_0x5e3c86){return _0x2823ca in _0x5e3c86;},'MsFGa':function(_0x4ed5ff,_0x5f26f0){return _0x4ed5ff!==_0x5f26f0;},'HPvdv':_0x57a5a9(0x224),'lKeCT':function(_0xfe4ee9,_0x33e3a1){return _0xfe4ee9-_0x33e3a1;}},_0x445f58=parseKeyPath(_0x27f919);let _0x2511b1=_0x272384;for(let _0x4324c2=0x0;_0x4324c2<_0x1e32da[_0x57a5a9(0x1fa)](_0x445f58[_0x57a5a9(0x25a)],0x1);_0x4324c2++){const _0x48711d=_0x445f58[_0x4324c2];(!_0x1e32da['Wrqun'](_0x48711d,_0x2511b1)||_0x1e32da['MsFGa'](typeof _0x2511b1[_0x48711d],_0x1e32da[_0x57a5a9(0x1ed)]))&&(_0x2511b1[_0x48711d]={}),_0x2511b1=_0x2511b1[_0x48711d];}_0x2511b1[_0x445f58[_0x1e32da[_0x57a5a9(0x200)](_0x445f58['length'],0x1)]]=_0xbc6752;}export function deleteNestedValue(_0x82bd0,_0x45e322){const _0xcb614c=_0x3644ca,_0x3e075a={'vOAtB':function(_0x4d883d,_0x231e6d){return _0x4d883d(_0x231e6d);},'ZcJmK':function(_0x229877,_0x1e84d1){return _0x229877-_0x1e84d1;},'HOGVR':function(_0x2aae0e,_0x4c2d3b){return _0x2aae0e!==_0x4c2d3b;},'JHYux':_0xcb614c(0x224),'QkorX':function(_0x2c19f8,_0x2fd95e){return _0x2c19f8-_0x2fd95e;}},_0x5149d8=_0x3e075a[_0xcb614c(0x238)](parseKeyPath,_0x45e322);let _0x246f11=_0x82bd0;for(let _0x581822=0x0;_0x581822<_0x3e075a['ZcJmK'](_0x5149d8['length'],0x1);_0x581822++){if(_0x246f11===null||_0x246f11===undefined||typeof _0x246f11!=='object')return![];_0x246f11=_0x246f11[_0x5149d8[_0x581822]];}if(_0x246f11===null||_0x246f11===undefined||_0x3e075a[_0xcb614c(0x225)](typeof _0x246f11,_0x3e075a['JHYux']))return![];const _0x52d618=_0x5149d8[_0x3e075a['QkorX'](_0x5149d8[_0xcb614c(0x25a)],0x1)];if(_0x52d618 in _0x246f11)return delete _0x246f11[_0x52d618],!![];return![];}function parseKeyPath(_0x406378){const _0x450cfc=_0x3644ca,_0x32d42f={'NlhaT':function(_0xe8e169,_0x562b71){return _0xe8e169===_0x562b71;},'jOKkf':_0x450cfc(0x258)},_0x31c91a=_0x406378['split']('.');return _0x32d42f[_0x450cfc(0x248)](_0x31c91a[0x0],_0x450cfc(0x1f9))&&(_0x31c91a[0x0]=_0x450cfc(0x221)),_0x31c91a[0x0]===_0x32d42f['jOKkf']&&(_0x31c91a[0x0]='setupHeaders'),_0x31c91a;}export function formatSettings(_0x23a862,_0xe0d88f=0x0){const _0x20d0a5=_0x3644ca,_0x149ca6={'akzfN':function(_0x14956e,_0x5daf2d){return _0x14956e!==_0x5daf2d;}},_0x1034eb=[],_0x2201a0='\x20\x20'['repeat'](_0xe0d88f);for(const [_0x3ece79,_0x9867ea]of Object[_0x20d0a5(0x232)](_0x23a862)){if(_0x9867ea===undefined)continue;if(typeof _0x9867ea==='object'&&_0x149ca6[_0x20d0a5(0x236)](_0x9867ea,null)){_0x1034eb[_0x20d0a5(0x201)](''+_0x2201a0+_0x3ece79+':');for(const [_0x4a62a1,_0x54e7f3]of Object[_0x20d0a5(0x232)](_0x9867ea)){_0x1034eb[_0x20d0a5(0x201)](_0x2201a0+'\x20\x20'+_0x4a62a1+':\x20'+_0x54e7f3);}}else _0x1034eb['push'](''+_0x2201a0+_0x3ece79+':\x20'+_0x9867ea);}return _0x1034eb[_0x20d0a5(0x23b)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44f441,_0x526425){const _0x55f7ef=_0x2831,_0xf21205=_0x44f441();while(!![]){try{const _0xd8c57=parseInt(_0x55f7ef(0x1e2))/0x1*(-parseInt(_0x55f7ef(0x1e4))/0x2)+parseInt(_0x55f7ef(0x1e5))/0x3+-parseInt(_0x55f7ef(0x1e1))/0x4*(parseInt(_0x55f7ef(0x1df))/0x5)+-parseInt(_0x55f7ef(0x1e6))/0x6*(parseInt(_0x55f7ef(0x1e8))/0x7)+-parseInt(_0x55f7ef(0x1dd))/0x8+-parseInt(_0x55f7ef(0x1e9))/0x9*(-parseInt(_0x55f7ef(0x1de))/0xa)+parseInt(_0x55f7ef(0x1e3))/0xb;if(_0xd8c57===_0x526425)break;else _0xf21205['push'](_0xf21205['shift']());}catch(_0x509753){_0xf21205['push'](_0xf21205['shift']());}}}(_0x3749,0x35837));import{readFileSync}from'fs';import{dirname,join}from'path';function _0x3749(){const _0x43cc84=['591741tyUjkf','108LxPaVC','utf-8','5691SFQaup','67581xfRnPC','JzndA','2753936TMnhPe','110YpASNA','771010UmOadU','skills','8ldOPVS','78388vUYOLF','7535143cyMViy','2ynVebE'];_0x3749=function(){return _0x43cc84;};return _0x3749();}function _0x2831(_0x3d3e1d,_0xca3d45){_0x3d3e1d=_0x3d3e1d-0x1dc;const _0x37498f=_0x3749();let _0x2831f5=_0x37498f[_0x3d3e1d];return _0x2831f5;}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x3ad8bb){const _0x254a74=_0x2831,_0x485578={'CWDyt':_0x254a74(0x1e0),'qHmAg':function(_0x529cf6,_0x522941,_0x1b0a9d){return _0x529cf6(_0x522941,_0x1b0a9d);},'JzndA':_0x254a74(0x1e7)},_0x4bfb79=join(__dirname,'..','..',_0x485578['CWDyt']),_0x29c957=_0x485578['qHmAg'](join,_0x4bfb79,_0x3ad8bb);try{return readFileSync(_0x29c957,_0x485578[_0x254a74(0x1dc)]);}catch{return'';}}export function getRangerSkillContent(){return readSkillContent('ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3c7947=_0x1a7f;(function(_0x4245ef,_0xa201a3){const _0x18c4ab=_0x1a7f,_0xd2f07c=_0x4245ef();while(!![]){try{const _0x4f85c9=-parseInt(_0x18c4ab(0x126))/0x1+parseInt(_0x18c4ab(0x119))/0x2*(-parseInt(_0x18c4ab(0x114))/0x3)+-parseInt(_0x18c4ab(0x109))/0x4*(-parseInt(_0x18c4ab(0x111))/0x5)+-parseInt(_0x18c4ab(0x10b))/0x6+-parseInt(_0x18c4ab(0x11d))/0x7+-parseInt(_0x18c4ab(0x125))/0x8+parseInt(_0x18c4ab(0x11f))/0x9;if(_0x4f85c9===_0xa201a3)break;else _0xd2f07c['push'](_0xd2f07c['shift']());}catch(_0x173c21){_0xd2f07c['push'](_0xd2f07c['shift']());}}}(_0x22d5,0x81407));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=[_0x3c7947(0x10a)];function _0x1a7f(_0x2504c2,_0x2d517d){_0x2504c2=_0x2504c2-0x108;const _0x22d59b=_0x22d5();let _0x1a7f0c=_0x22d59b[_0x2504c2];return _0x1a7f0c;}function _0x22d5(){const _0x4b1d0f=['match','skills','log','1049998fnOeRY','isDirectory','SKILL.md','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','5899012fsHnxw','LCQpV','25349769xNHtbm','bug-bash','\x20\x20Skill\x20not\x20found:\x20','.md','catch','Invalid\x20skill\x20frontmatter','5019240xWPzGR','143046ZzRaac','filter','bkcxv','ubMpw','utf-8','1440284GQDoZv','ranger','5215212cvWgkL','length','LYvxn','warn','hrnje','aMkRH','10jFbNxp','kAMhU','zBFvw','3barBEM','feature-tracker'];_0x22d5=function(){return _0x4b1d0f;};return _0x22d5();}export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x3c7947(0x120),_0x3c7947(0x115)];export async function installSkill(_0x24d211,_0x4053bc={}){const _0x9963e7=_0x3c7947,_0x2dc826={'Fbngt':'project','LCQpV':function(_0x593298,_0x4a8195,_0x1e8c7e){return _0x593298(_0x4a8195,_0x1e8c7e);},'zBFvw':function(_0xa8270c,_0x5d0492){return _0xa8270c&&_0x5d0492;},'kAMhU':function(_0xd7cfd3,_0x49c2f4){return _0xd7cfd3(_0x49c2f4);},'hrnje':'SKILL.md','bkcxv':_0x9963e7(0x108),'ubMpw':function(_0x1e1fca,_0x44535a,_0x4c0c43,_0x3f0f12){return _0x1e1fca(_0x44535a,_0x4c0c43,_0x3f0f12);}},{level:level=_0x2dc826['Fbngt'],cliVersion:_0x1ec764,platform:platform='claude'}=_0x4053bc,_0xc3f30f=getSourceSkillsDir(),_0x1950dd=join(_0xc3f30f,_0x24d211),_0x31bba3=_0x2dc826[_0x9963e7(0x11e)](join,_0xc3f30f,_0x24d211+'.md'),_0x48e3f2=existsSync(_0x1950dd)&&statSync(_0x1950dd)[_0x9963e7(0x11a)]()&&existsSync(join(_0x1950dd,_0x9963e7(0x11b))),_0x550282=existsSync(_0x31bba3);if(_0x2dc826[_0x9963e7(0x113)](!_0x48e3f2,!_0x550282))return console[_0x9963e7(0x10e)](_0x9963e7(0x121)+_0x24d211),![];const _0x497648=platform==='opencode'?_0x2dc826[_0x9963e7(0x112)](getOpencodeSkillsDir,level):getSkillsDir(level),_0x48bf00=join(_0x497648,_0x24d211);await mkdir(_0x48bf00,{'recursive':!![]});let _0x589350,_0x5ea503=[];if(_0x48e3f2){const _0x56ba94=await readdir(_0x1950dd),_0x2952d1=_0x56ba94[_0x9963e7(0x127)](_0x48e15a=>_0x48e15a['endsWith'](_0x9963e7(0x122)));for(const _0x287dd8 of _0x2952d1){const _0x432aa9=join(_0x1950dd,_0x287dd8),_0x13f756=_0x2dc826['LCQpV'](join,_0x48bf00,_0x287dd8);await copyFile(_0x432aa9,_0x13f756),_0x5ea503['push'](_0x287dd8);}_0x589350=await readFile(join(_0x1950dd,_0x2dc826['hrnje']),_0x9963e7(0x108));}else{_0x589350=await readFile(_0x31bba3,'utf-8');const _0x44044f=join(_0x48bf00,_0x2dc826[_0x9963e7(0x10f)]);await writeFile(_0x44044f,_0x589350,_0x2dc826[_0x9963e7(0x128)]),_0x5ea503['push']('SKILL.md');}const {name:_0x3ed1dc}=parseFrontmatter(_0x589350);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x3ed1dc),console[_0x9963e7(0x118)]('\x20\x20Location:\x20'+_0x48bf00),_0x5ea503[_0x9963e7(0x10c)]>0x1&&console[_0x9963e7(0x118)]('\x20\x20Files:\x20'+_0x5ea503['join'](',\x20')),_0x2dc826[_0x9963e7(0x129)](logLocalAgentInstallation,_0x24d211,{'skillDisplayName':_0x3ed1dc,'installLevel':level},_0x1ec764)[_0x9963e7(0x123)](()=>{}),!![];}function getSourceSkillsDir(){const _0x640585=_0x3c7947,_0x1967e4={'GmCDw':function(_0x4af494,_0x4f01ad,_0x2a359a,_0x2b9a60,_0x4f3ed3){return _0x4af494(_0x4f01ad,_0x2a359a,_0x2b9a60,_0x4f3ed3);},'LYvxn':_0x640585(0x117),'NqLQT':function(_0x16bf0a,_0x57c151,_0x587cf8,_0x9f9c6b,_0x49d856,_0x4cbe50){return _0x16bf0a(_0x57c151,_0x587cf8,_0x9f9c6b,_0x49d856,_0x4cbe50);}},_0x32bd8a=[_0x1967e4['GmCDw'](join,__dirname,'..','..',_0x1967e4[_0x640585(0x10d)]),_0x1967e4['NqLQT'](join,__dirname,'..','..','..',_0x640585(0x117))];for(const _0xabb495 of _0x32bd8a){if(existsSync(_0xabb495))return _0xabb495;}return _0x32bd8a[0x0];}function parseFrontmatter(_0xdc9725){const _0xc888c4=_0x3c7947,_0x3310f7={'DiozU':_0xc888c4(0x124)},_0x1b501d=_0xdc9725[_0xc888c4(0x116)](/^---\n([\s\S]+?)\n---/);if(!_0x1b501d)throw new Error(_0x3310f7['DiozU']);const _0x338c3f=_0x1b501d[0x1],_0xeb1267=_0x338c3f['match'](/name:\s*(.+)/),_0x3f811e=_0x338c3f['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0xeb1267?.[0x1]['trim']()||'','description':_0x3f811e?.[0x1]['trim']()||''};}export async function removeSkill(_0x3a717f,_0x3910d7){const _0x364117=_0x3c7947,_0xf4d287={'aMkRH':function(_0x1cb6f4,_0xa012ca){return _0x1cb6f4(_0xa012ca);}},_0x15de51=getSkillsDir(_0x3910d7),_0xa284bd=join(_0x15de51,_0x3a717f);if(!_0xf4d287[_0x364117(0x110)](existsSync,_0xa284bd))return![];try{return await rm(_0xa284bd,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x3a717f),!![];}catch{return console[_0x364117(0x10e)](_0x364117(0x11c)+_0x3a717f),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3935bf=_0x1edf;(function(_0x18585c,_0x111599){const _0x4bd028=_0x1edf,_0x29235f=_0x18585c();while(!![]){try{const _0x42cf09=parseInt(_0x4bd028(0x118))/0x1+parseInt(_0x4bd028(0x120))/0x2+parseInt(_0x4bd028(0x122))/0x3+-parseInt(_0x4bd028(0xf9))/0x4*(parseInt(_0x4bd028(0x102))/0x5)+-parseInt(_0x4bd028(0xff))/0x6+parseInt(_0x4bd028(0x12a))/0x7*(parseInt(_0x4bd028(0xfd))/0x8)+-parseInt(_0x4bd028(0x11b))/0x9*(parseInt(_0x4bd028(0xfe))/0xa);if(_0x42cf09===_0x111599)break;else _0x29235f['push'](_0x29235f['shift']());}catch(_0x2d60c1){_0x29235f['push'](_0x29235f['shift']());}}}(_0x4f86,0xdc15c));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(_0x48adf8,_0x5be912){const _0x2cbca8=_0x1edf,_0x4c3fe6={'gyxaS':function(_0x37d12a,_0x227ad7){return _0x37d12a<=_0x227ad7;},'LRpQv':function(_0x356360,_0x4b8b76){return _0x356360+_0x4b8b76;},'Ipnwx':function(_0x2ebcfc,_0x28534d){return _0x2ebcfc*_0x28534d;}};if(_0x5be912>=_0x48adf8['length'])return[0x0,0x0];const _0x3841af=_0x48adf8[_0x5be912];let _0x3184ce=0x1,_0x33e893=0x80;while(_0x4c3fe6['gyxaS'](_0x3184ce,0x8)&&!(_0x3841af&_0x33e893)){_0x3184ce++,_0x33e893>>=0x1;}if(_0x5be912+_0x3184ce>_0x48adf8[_0x2cbca8(0x108)])return[0x0,0x0];let _0x548fcf=_0x3841af&_0x33e893-0x1;for(let _0x35adfc=0x1;_0x35adfc<_0x3184ce;_0x35adfc++){_0x548fcf=_0x4c3fe6[_0x2cbca8(0x10b)](_0x4c3fe6[_0x2cbca8(0x110)](_0x548fcf,0x100),_0x48adf8[_0x5be912+_0x35adfc]);}return[_0x548fcf,_0x3184ce];}function readId(_0x167c12,_0x46a282){const _0x112a0a=_0x1edf,_0x528548={'FMmEc':function(_0x457793,_0x5a7eec){return _0x457793>=_0x5a7eec;},'HhsyI':function(_0x1f907a,_0x4e58ff){return _0x1f907a>=_0x4e58ff;},'IWrKZ':function(_0xb0ba99,_0x3fd758){return _0xb0ba99+_0x3fd758;}};if(_0x46a282>=_0x167c12[_0x112a0a(0x108)])return[0x0,0x0];const _0x2f9ecc=_0x167c12[_0x46a282];let _0x514ea3;if(_0x2f9ecc>=0x80)_0x514ea3=0x1;else{if(_0x528548[_0x112a0a(0x138)](_0x2f9ecc,0x40))_0x514ea3=0x2;else{if(_0x528548[_0x112a0a(0x101)](_0x2f9ecc,0x20))_0x514ea3=0x3;else{if(_0x528548['FMmEc'](_0x2f9ecc,0x10))_0x514ea3=0x4;else return[_0x2f9ecc,0x1];}}}if(_0x46a282+_0x514ea3>_0x167c12['length'])return[0x0,0x0];let _0x1eab52=0x0;for(let _0x5e8e9f=0x0;_0x5e8e9f<_0x514ea3;_0x5e8e9f++){_0x1eab52=_0x1eab52*0x100+_0x167c12[_0x528548['IWrKZ'](_0x46a282,_0x5e8e9f)];}return[_0x1eab52,_0x514ea3];}function _0x1edf(_0x5afb5a,_0xab4175){_0x5afb5a=_0x5afb5a-0xf6;const _0x4f862e=_0x4f86();let _0x1edf9d=_0x4f862e[_0x5afb5a];return _0x1edf9d;}function _0x4f86(){const _0x58f224=['log','2938617sTPiKH','etDkw','uRUIq','maxTicks','sfGHf','KbcGJ','pIkOe','JBCsO','742560ebHMjq','indexOf','from','VJcUN','Pclkg','RvOec','header','VJNDP','KRVHG','maxTimestampTicks','CRsbj','bodyAfterTimestamp','argv','vyYSo','FMmEc','min','kgPKs','slice','TwFop','DYKOB','CKGZB','1156MQbJUC','JuhJy','qHRSD','floor','24VwBhZG','10abGnUd','5650152yMljhf','uAJqn','HhsyI','2075KvyShJ','\x20files\x20->\x20','kWkuG','hqDta','Stitched\x20','kWIlE','length','vcGGE','endsWith','LRpQv','nsjio','IKETS','dYtKM','push','Ipnwx','VIrBY','IZvWO','concat','fxfxH','aorBG','npMUs','clusters','603895ruyQmt','uydEK','alloc','723429EAkMrg','jeDUM','stitchWebmFiles.js','pow','mxsHu','283604nfkaoJ'];_0x4f86=function(){return _0x58f224;};return _0x4f86();}function readUint(_0x359f31,_0x36f0fd,_0x162f4a){const _0x33996b=_0x1edf,_0x1f38d2={'CLjVQ':function(_0x25e365,_0x41ca09){return _0x25e365<_0x41ca09;},'etDkw':function(_0x35a9b4,_0x37f2a0){return _0x35a9b4*_0x37f2a0;},'Cdeic':function(_0x3fa5ff,_0x5be083){return _0x3fa5ff+_0x5be083;}};let _0x57ee8a=0x0;for(let _0x2b4636=0x0;_0x1f38d2['CLjVQ'](_0x2b4636,_0x162f4a);_0x2b4636++){_0x57ee8a=_0x1f38d2[_0x33996b(0x123)](_0x57ee8a,0x100)+_0x359f31[_0x1f38d2['Cdeic'](_0x36f0fd,_0x2b4636)];}return _0x57ee8a;}function isUnknownSize(_0x2071ed,_0x22e72f){const _0x234188={'MOqgG':function(_0x21954a,_0x2491ea){return _0x21954a===_0x2491ea;},'vvdJj':function(_0x123dba,_0x3e1770){return _0x123dba*_0x3e1770;}};return _0x234188['MOqgG'](_0x2071ed,Math['pow'](0x2,_0x234188['vvdJj'](0x7,_0x22e72f))-0x1);}function writeVint(_0x314030,_0x1a7667){const _0x3cf4da=_0x1edf,_0x4def06={'aorBG':function(_0x48d21d,_0x256265){return _0x48d21d*_0x256265;},'CKGZB':function(_0x3896f3,_0x308b76){return _0x3896f3&_0x308b76;}};let _0x4f43c1=_0x1a7667||0x1;while(Math[_0x3cf4da(0x11e)](0x2,_0x4def06[_0x3cf4da(0x115)](0x7,_0x4f43c1))-0x2<_0x314030)_0x4f43c1++;const _0x4e8500=Buffer['alloc'](_0x4f43c1);for(let _0x5bc043=_0x4f43c1-0x1;_0x5bc043>=0x0;_0x5bc043--){_0x4e8500[_0x5bc043]=_0x4def06[_0x3cf4da(0xf8)](_0x314030,0xff),_0x314030=Math['floor'](_0x314030/0x100);}return _0x4e8500[0x0]|=0x1<<0x8-_0x4f43c1,_0x4e8500;}function writeUint(_0x1dcac1,_0x4f8440){const _0x1a8204=_0x1edf,_0x5dfd03={'fcTRn':function(_0xa14b49,_0x3c3caf){return _0xa14b49-_0x3c3caf;},'mxsHu':function(_0x3654be,_0x1b5fc2){return _0x3654be/_0x1b5fc2;}},_0x2968d4=Buffer[_0x1a8204(0x11a)](_0x4f8440);for(let _0x5a2231=_0x5dfd03['fcTRn'](_0x4f8440,0x1);_0x5a2231>=0x0;_0x5a2231--){_0x2968d4[_0x5a2231]=_0x1dcac1&0xff,_0x1dcac1=Math[_0x1a8204(0xfc)](_0x5dfd03[_0x1a8204(0x11f)](_0x1dcac1,0x100));}return _0x2968d4;}function writeUnknownSizeVint(_0x3e6c1f){const _0x4930f2=_0x1edf,_0x34297c={'TmMBr':function(_0x8ea7f5,_0x3c5798){return _0x8ea7f5>>_0x3c5798;}},_0x11d72b=Buffer[_0x4930f2(0x11a)](_0x3e6c1f,0xff);return _0x11d72b[0x0]=_0x34297c['TmMBr'](0xff,_0x3e6c1f-0x1),_0x11d72b;}function uintSize(_0x497980){const _0x11db95=_0x1edf,_0x480f17={'IZvWO':function(_0x2147c9,_0xcc65cd){return _0x2147c9===_0xcc65cd;},'kWkuG':function(_0x17f851,_0x5946e5){return _0x17f851/_0x5946e5;}};if(_0x480f17[_0x11db95(0x112)](_0x497980,0x0))return 0x1;let _0x3cc43a=0x0,_0x3e1b26=_0x497980;while(_0x3e1b26>0x0){_0x3cc43a++,_0x3e1b26=Math['floor'](_0x480f17[_0x11db95(0x104)](_0x3e1b26,0x100));}return _0x3cc43a;}function findTimestampScale(_0x351193,_0x32143d){const _0x16537f=_0x1edf,_0x28f32e={'fxfxH':function(_0x2ef263,_0x316b1a){return _0x2ef263<_0x316b1a;},'hJUHK':function(_0x2e7c3c,_0xa1f834,_0x9cb4c0){return _0x2e7c3c(_0xa1f834,_0x9cb4c0);},'DYKOB':function(_0x1366a5,_0x40a8bd){return _0x1366a5+_0x40a8bd;},'JuhJy':function(_0x1112de,_0x5e390c){return _0x1112de+_0x5e390c;},'ZFrXb':function(_0x682591,_0x1b8150,_0x3a6e85){return _0x682591(_0x1b8150,_0x3a6e85);},'qHRSD':function(_0x2e8b4e,_0x445ea4,_0x241e5c,_0xdc8236){return _0x2e8b4e(_0x445ea4,_0x241e5c,_0xdc8236);},'VJNDP':function(_0x1b9c85,_0x52e0c0){return _0x1b9c85===_0x52e0c0;}};let _0xc471ce=_0x32143d;const _0x380e08=Math['min'](_0x351193['length'],_0x32143d+0x2710);while(_0x28f32e[_0x16537f(0x114)](_0xc471ce,_0x380e08)){const [_0x14b3e4,_0x547575]=_0x28f32e['hJUHK'](readId,_0x351193,_0xc471ce),[_0xeab416,_0x1765f8]=readVint(_0x351193,_0x28f32e['DYKOB'](_0xc471ce,_0x547575));if(_0x14b3e4===ID_INFO){let _0xf5679c=_0x28f32e['JuhJy'](_0xc471ce+_0x547575,_0x1765f8);const _0x153df2=_0x28f32e[_0x16537f(0xfa)](_0xf5679c,_0xeab416);while(_0xf5679c<_0x153df2){const [_0x32fd3a,_0x152935]=_0x28f32e['ZFrXb'](readId,_0x351193,_0xf5679c),[_0x687be8,_0x1735f1]=readVint(_0x351193,_0xf5679c+_0x152935);if(_0x32fd3a===ID_TIMESTAMP_SCALE)return _0x28f32e[_0x16537f(0xfb)](readUint,_0x351193,_0xf5679c+_0x152935+_0x1735f1,_0x687be8);_0xf5679c+=_0x28f32e[_0x16537f(0xf7)](_0x152935+_0x1735f1,_0x687be8);}break;}if(_0x28f32e[_0x16537f(0x131)](_0x14b3e4,ID_CLUSTER))break;if(isUnknownSize(_0xeab416,_0x1765f8))break;_0xc471ce+=_0x28f32e['JuhJy'](_0x547575+_0x1765f8,_0xeab416);}return 0xf4240;}function findFirstClusterOffset(_0x54066c,_0x51ee43){const _0x28412f=_0x1edf,_0x5036ca={'VIrBY':function(_0x222231,_0x60a985){return _0x222231<_0x60a985;},'XlBrz':function(_0x1d6e74,_0xa546cc,_0x3c9544){return _0x1d6e74(_0xa546cc,_0x3c9544);},'VJcUN':function(_0x5322df,_0x27f2df,_0x3ca20e){return _0x5322df(_0x27f2df,_0x3ca20e);},'uRUIq':function(_0x2405c5,_0x2f6f64){return _0x2405c5+_0x2f6f64;},'kWIlE':function(_0x5dd77a,_0x44bd1f){return _0x5dd77a+_0x44bd1f;}};let _0xe7d8af=_0x51ee43;while(_0x5036ca[_0x28412f(0x111)](_0xe7d8af,_0x54066c['length'])){const [_0x423384,_0x59f976]=_0x5036ca['XlBrz'](readId,_0x54066c,_0xe7d8af);if(_0x423384===ID_CLUSTER)return _0xe7d8af;const [_0x35538c,_0x2d5760]=_0x5036ca[_0x28412f(0x12d)](readVint,_0x54066c,_0x5036ca[_0x28412f(0x124)](_0xe7d8af,_0x59f976));if(isUnknownSize(_0x35538c,_0x2d5760))return _0xe7d8af;_0xe7d8af+=_0x5036ca[_0x28412f(0x107)](_0x59f976+_0x2d5760,_0x35538c);}return _0x54066c[_0x28412f(0x108)];}function findClusterEnd(_0x3ce6d9,_0x10740b,_0x37c494,_0x405854){const _0x4290a3=_0x1edf,_0x308d76={'ZgnOp':function(_0x3f4b72,_0x228525,_0x2f6e19){return _0x3f4b72(_0x228525,_0x2f6e19);},'CRsbj':function(_0x42e95a,_0x433fdd){return _0x42e95a+_0x433fdd;},'RvOec':function(_0x5aeec6,_0x1d0215){return _0x5aeec6<_0x1d0215;},'DtcdL':function(_0x5e0e91,_0x28d11e,_0x496b34){return _0x5e0e91(_0x28d11e,_0x496b34);}};if(!_0x308d76['ZgnOp'](isUnknownSize,_0x37c494,_0x405854))return _0x308d76[_0x4290a3(0x134)](_0x10740b,_0x37c494);const _0x296324=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x1ca69d=_0x10740b;while(_0x308d76[_0x4290a3(0x12f)](_0x1ca69d,_0x3ce6d9[_0x4290a3(0x108)]-0x4)){const [_0x640b53,_0x136319]=_0x308d76['DtcdL'](readId,_0x3ce6d9,_0x1ca69d);if(_0x296324['has'](_0x640b53))return _0x1ca69d;const [_0x13330a,_0x49d81f]=readVint(_0x3ce6d9,_0x308d76['CRsbj'](_0x1ca69d,_0x136319));if(isUnknownSize(_0x13330a,_0x49d81f))return _0x3ce6d9['length'];_0x1ca69d+=_0x308d76['CRsbj'](_0x308d76[_0x4290a3(0x134)](_0x136319,_0x49d81f),_0x13330a);}return _0x3ce6d9[_0x4290a3(0x108)];}function extractClusters(_0x2956cd,_0x5b1f1d){const _0x39e580=_0x1edf,_0x573c86={'gRpMf':function(_0x5c8554,_0x503bd7){return _0x5c8554===_0x503bd7;},'EJMwI':function(_0xcc4cc4,_0x5bb935,_0x2819e6){return _0xcc4cc4(_0x5bb935,_0x2819e6);},'pIkOe':function(_0x33194d,_0x55ce8e){return _0x33194d+_0x55ce8e;},'KbcGJ':function(_0x4d0ba5,_0xe26446,_0x165325){return _0x4d0ba5(_0xe26446,_0x165325);},'CqWiy':function(_0x25e6b1,_0x344a31){return _0x25e6b1+_0x344a31;},'JBCsO':function(_0x5878d0,_0x36ee75){return _0x5878d0<_0x36ee75;},'Pclkg':function(_0x45ef17,_0x8497c6,_0x3af098){return _0x45ef17(_0x8497c6,_0x3af098);},'npMUs':function(_0x458709,_0xf4650d,_0x3b75e4,_0x5f1fd7){return _0x458709(_0xf4650d,_0x3b75e4,_0x5f1fd7);},'OevAL':function(_0x413736,_0x368b71){return _0x413736+_0x368b71;},'RoZWB':function(_0x1dd586,_0x519aa6){return _0x1dd586+_0x519aa6;}},_0x25a8c2=[],_0x14982b=Buffer[_0x39e580(0x12c)]([0x1f,0x43,0xb6,0x75]);let _0x9d3a3e=0x0;while(_0x9d3a3e<_0x2956cd['length']){const _0x13922b=_0x2956cd[_0x39e580(0x12b)](_0x14982b,_0x9d3a3e);if(_0x573c86['gRpMf'](_0x13922b,-0x1))break;const [_0x5ef843,_0x200459]=_0x573c86['EJMwI'](readId,_0x2956cd,_0x13922b);if(_0x5ef843!==ID_CLUSTER){_0x9d3a3e=_0x573c86[_0x39e580(0x128)](_0x13922b,0x1);continue;}const [_0x24e282,_0x2a6561]=_0x573c86['KbcGJ'](readVint,_0x2956cd,_0x573c86['CqWiy'](_0x13922b,_0x200459)),_0x214bc7=_0x13922b+_0x200459+_0x2a6561,_0x264af8=findClusterEnd(_0x2956cd,_0x214bc7,_0x24e282,_0x2a6561);let _0x24b955=_0x214bc7,_0x153c5e=0x0,_0x4b2376=0x2,_0x38bc1f=![],_0xa0e5=Buffer['alloc'](0x0),_0x161a10=Buffer[_0x39e580(0x11a)](0x0);while(_0x573c86[_0x39e580(0x129)](_0x24b955,_0x264af8)){const [_0x1e0649,_0x2133ca]=_0x573c86[_0x39e580(0x12e)](readId,_0x2956cd,_0x24b955),[_0xd25996,_0x3a3119]=_0x573c86['EJMwI'](readVint,_0x2956cd,_0x24b955+_0x2133ca);if(_0x1e0649===ID_TIMESTAMP){_0x153c5e=_0x573c86[_0x39e580(0x116)](readUint,_0x2956cd,_0x573c86['OevAL'](_0x24b955,_0x2133ca)+_0x3a3119,_0xd25996),_0x4b2376=_0xd25996,_0x38bc1f=!![],_0xa0e5=_0x2956cd['slice'](_0x214bc7,_0x24b955);const _0x5a6af7=_0x573c86[_0x39e580(0x128)](_0x24b955,_0x2133ca)+_0x3a3119+_0xd25996;_0x161a10=_0x2956cd[_0x39e580(0x13b)](_0x5a6af7,_0x264af8);break;}if(_0x573c86['gRpMf'](_0x1e0649,ID_CLUSTER))break;if(isUnknownSize(_0xd25996,_0x3a3119))break;_0x24b955+=_0x2133ca+_0x3a3119+_0xd25996;}!_0x38bc1f&&(_0x161a10=_0x2956cd['slice'](_0x214bc7,_0x264af8));let _0x7481f3=_0x153c5e;_0x24b955=_0x214bc7;while(_0x573c86['JBCsO'](_0x24b955,_0x264af8)){const [_0x59bd0a,_0x4dfd31]=_0x573c86[_0x39e580(0x127)](readId,_0x2956cd,_0x24b955),[_0x15cdf5,_0x378b03]=_0x573c86[_0x39e580(0x127)](readVint,_0x2956cd,_0x24b955+_0x4dfd31);if(_0x59bd0a===ID_SIMPLE_BLOCK&&_0x15cdf5>=0x4){const _0x8c398a=_0x24b955+_0x4dfd31+_0x378b03,[,_0x56f208]=_0x573c86['KbcGJ'](readVint,_0x2956cd,_0x8c398a),_0x13faa1=_0x2956cd['readInt16BE'](_0x8c398a+_0x56f208),_0x4dc151=_0x153c5e+_0x13faa1;if(_0x4dc151>_0x7481f3)_0x7481f3=_0x4dc151;}if(_0x59bd0a===ID_CLUSTER)break;if(isUnknownSize(_0x15cdf5,_0x378b03))break;_0x24b955+=_0x573c86['RoZWB'](_0x4dfd31,_0x378b03)+_0x15cdf5;}_0x25a8c2[_0x39e580(0x10f)]({'timestamp':_0x153c5e,'maxTicks':_0x7481f3,'bodyBeforeTimestamp':_0xa0e5,'bodyAfterTimestamp':_0x161a10,'timestampElementSize':_0x4b2376}),_0x9d3a3e=_0x264af8;}return _0x25a8c2;}function parseWebm(_0x597e13){const _0x51ae7a=_0x1edf,_0x289507={'pOeQL':function(_0x1b34dc,_0x23383b,_0x4fed23){return _0x1b34dc(_0x23383b,_0x4fed23);},'IKETS':function(_0x227e06,_0x4deb5b){return _0x227e06+_0x4deb5b;},'zRViL':function(_0x33c8ed,_0x224b33){return _0x33c8ed!==_0x224b33;},'zVLFE':function(_0x5d370e,_0x49b949){return _0x5d370e+_0x49b949;},'TwFop':function(_0x57a0c3,_0x4009d9){return _0x57a0c3+_0x4009d9;},'dYtKM':function(_0x27f617,_0x33bf3b,_0x1c1781){return _0x27f617(_0x33bf3b,_0x1c1781);},'uydEK':function(_0x389719,_0x1abae9){return _0x389719>_0x1abae9;}};let _0x4af0bc=0x0;const [,_0x59025f]=readId(_0x597e13,_0x4af0bc),[_0x127b1e,_0x4c6385]=_0x289507['pOeQL'](readVint,_0x597e13,_0x4af0bc+_0x59025f);_0x4af0bc+=_0x289507['IKETS'](_0x289507[_0x51ae7a(0x10d)](_0x59025f,_0x4c6385),_0x127b1e);const [_0x1157f3,_0x9a785b]=readId(_0x597e13,_0x4af0bc);if(_0x289507['zRViL'](_0x1157f3,ID_SEGMENT))return null;const [,_0x270b76]=readVint(_0x597e13,_0x289507['zVLFE'](_0x4af0bc,_0x9a785b)),_0x2f41ed=_0x289507[_0x51ae7a(0xf6)](_0x4af0bc+_0x9a785b,_0x270b76),_0x1f2bd7=_0x289507['pOeQL'](findTimestampScale,_0x597e13,_0x2f41ed),_0x5eeee8=_0x289507[_0x51ae7a(0x10e)](findFirstClusterOffset,_0x597e13,_0x2f41ed),_0x45d056=_0x597e13['slice'](0x0,_0x5eeee8),_0x397817=extractClusters(_0x597e13,_0x1f2bd7);let _0x242c3f=0x0;for(const _0x277afc of _0x397817){if(_0x289507[_0x51ae7a(0x119)](_0x277afc[_0x51ae7a(0x125)],_0x242c3f))_0x242c3f=_0x277afc['maxTicks'];}return{'header':_0x45d056,'clusters':_0x397817,'timestampScale':_0x1f2bd7,'maxTimestampTicks':_0x242c3f};}function buildCluster(_0x890158,_0x312ab3,_0x40bdbe){const _0x422d03=_0x1edf,_0x550228={'SxvmK':function(_0x4d0e5f,_0x1dad06){return _0x4d0e5f(_0x1dad06);}},_0x23d25b=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0xdc954c=Math['max'](0x4,_0x550228['SxvmK'](uintSize,_0x890158)),_0xdbc76a=Buffer['concat']([Buffer[_0x422d03(0x12c)]([ID_TIMESTAMP]),writeVint(_0xdc954c),writeUint(_0x890158,_0xdc954c)]),_0x56200b=Buffer['concat']([_0x312ab3,_0xdbc76a,_0x40bdbe]),_0x308767=writeVint(_0x56200b['length']);return Buffer[_0x422d03(0x113)]([_0x23d25b,_0x308767,_0x56200b]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x76fece){const _0xb571c9=_0x1edf,_0xfcca9c={'sfGHf':function(_0x512ad2,_0x58b1ab){return _0x512ad2+_0x58b1ab;},'hqDta':function(_0x1e1c46,_0x504fb4){return _0x1e1c46+_0x504fb4;},'PtBJs':function(_0x359f58,_0x17ad09){return _0x359f58+_0x17ad09;},'uAJqn':function(_0x15b73f,_0x187d42,_0x2c6cb8){return _0x15b73f(_0x187d42,_0x2c6cb8);},'nsjio':function(_0x17ac20,_0x500f78,_0x3ec56a){return _0x17ac20(_0x500f78,_0x3ec56a);},'hBuQa':function(_0x7ad18b,_0x392f54){return _0x7ad18b+_0x392f54;},'MAMqn':function(_0x57bc5c,_0x7dc0c2){return _0x57bc5c(_0x7dc0c2);},'kgPKs':function(_0x16502c,_0x1b04b5){return _0x16502c+_0x1b04b5;},'vcGGE':function(_0x4e6bfd,_0x13471a){return _0x4e6bfd===_0x13471a;},'cQApu':function(_0x4bf80e,_0x532768,_0x38695d){return _0x4bf80e(_0x532768,_0x38695d);}},_0x17c6ee=Buffer['from'](_0x76fece);let _0x23cc92=0x0;const [,_0x90c7ad]=readId(_0x17c6ee,_0x23cc92),[_0x30ccb9,_0x8247cf]=readVint(_0x17c6ee,_0xfcca9c[_0xb571c9(0x126)](_0x23cc92,_0x90c7ad)),_0x41be1e=_0xfcca9c[_0xb571c9(0x105)](_0xfcca9c['hqDta'](_0xfcca9c['PtBJs'](_0x23cc92,_0x90c7ad),_0x8247cf),_0x30ccb9),[,_0x2c64dd]=_0xfcca9c[_0xb571c9(0x100)](readId,_0x17c6ee,_0x41be1e),[,_0x518bfe]=_0xfcca9c[_0xb571c9(0x10c)](readVint,_0x17c6ee,_0xfcca9c['hBuQa'](_0x41be1e,_0x2c64dd)),_0x175cdb=_0xfcca9c['hqDta'](_0xfcca9c['sfGHf'](_0x41be1e,_0x2c64dd),_0x518bfe),_0x5f1e53=_0xfcca9c['MAMqn'](writeUnknownSizeVint,_0x518bfe);_0x5f1e53['copy'](_0x17c6ee,_0x41be1e+_0x2c64dd);let _0x42ddfb=_0x175cdb;const _0x5b2cf0=Math[_0xb571c9(0x139)](_0x17c6ee['length'],_0xfcca9c[_0xb571c9(0x13a)](_0x175cdb,0x2710));while(_0x42ddfb<_0x5b2cf0){const [_0xe85338,_0x1e5111]=readId(_0x17c6ee,_0x42ddfb),[_0x46404f,_0x2b0105]=_0xfcca9c[_0xb571c9(0x10c)](readVint,_0x17c6ee,_0x42ddfb+_0x1e5111);if(_0xfcca9c[_0xb571c9(0x109)](_0xe85338,ID_CLUSTER))break;if(_0xfcca9c['nsjio'](isUnknownSize,_0x46404f,_0x2b0105))break;if(_0xfcca9c[_0xb571c9(0x109)](_0xe85338,ID_INFO)){const _0x4b039a=_0x42ddfb+_0x1e5111+_0x2b0105,_0x3f921a=_0x4b039a+_0x46404f,_0x5767ec=[];let _0x511ef2=_0x4b039a;while(_0x511ef2<_0x3f921a){const [_0x19d5e,_0x5854ec]=readId(_0x17c6ee,_0x511ef2),[_0x4eb5ba,_0x56e7ef]=_0xfcca9c['cQApu'](readVint,_0x17c6ee,_0x511ef2+_0x5854ec),_0x5e800c=_0x5854ec+_0x56e7ef+_0x4eb5ba;_0x19d5e!==ID_DURATION&&_0x5767ec[_0xb571c9(0x10f)](_0x17c6ee[_0xb571c9(0x13b)](_0x511ef2,_0x511ef2+_0x5e800c)),_0x511ef2+=_0x5e800c;}const _0x532b26=Buffer[_0xb571c9(0x113)](_0x5767ec),_0x3d99e9=Buffer['concat']([_0x17c6ee['slice'](_0x42ddfb,_0x42ddfb+_0x1e5111),writeVint(_0x532b26['length'],_0x2b0105)]);return Buffer[_0xb571c9(0x113)]([_0x17c6ee['slice'](0x0,_0x42ddfb),_0x3d99e9,_0x532b26,_0x17c6ee['slice'](_0x3f921a)]);}_0x42ddfb+=_0xfcca9c[_0xb571c9(0x126)](_0x1e5111,_0x2b0105)+_0x46404f;}return _0x17c6ee;}export function stitchWebmFiles(_0x342bf0,_0x56f41a){const _0x58663c=_0x1edf,_0x25595c={'KRVHG':function(_0x57a0a5,_0x49d40f){return _0x57a0a5(_0x49d40f);},'vyYSo':function(_0x4757d5,_0x49b482){return _0x4757d5(_0x49b482);},'jeDUM':function(_0x4e834b,_0x48fefc){return _0x4e834b+_0x48fefc;}};if(_0x342bf0['length']<=0x1)return![];const _0x3c5d39=[];for(const _0x46d837 of _0x342bf0){const _0x2228b6=_0x25595c[_0x58663c(0x132)](readFileSync,_0x46d837),_0x2e4cdb=_0x25595c['KRVHG'](parseWebm,_0x2228b6);if(!_0x2e4cdb||_0x2e4cdb[_0x58663c(0x117)]['length']===0x0)return![];_0x3c5d39[_0x58663c(0x10f)](_0x2e4cdb);}const _0x3e6d37=_0x3c5d39[0x0],_0x3db3d7=_0x25595c[_0x58663c(0x137)](rebuildHeaderWithoutDuration,_0x3e6d37[_0x58663c(0x130)]),_0x2166c6=[_0x3db3d7];let _0x1e4680=0x0;for(let _0x339017=0x0;_0x339017<_0x3c5d39['length'];_0x339017++){const _0x3ed6af=_0x3c5d39[_0x339017];for(const _0x33a1c6 of _0x3ed6af['clusters']){const _0x20b0c5=_0x33a1c6['timestamp']+_0x1e4680;_0x2166c6[_0x58663c(0x10f)](buildCluster(_0x20b0c5,_0x33a1c6['bodyBeforeTimestamp'],_0x33a1c6[_0x58663c(0x135)]));}const _0x408d76=0x1e;_0x1e4680+=_0x25595c[_0x58663c(0x11c)](_0x3ed6af[_0x58663c(0x133)],_0x408d76);}return writeFileSync(_0x56f41a,Buffer['concat'](_0x2166c6)),!![];}if(process['argv'][0x1]?.[_0x3935bf(0x10a)]('stitchWebmFiles.ts')||process[_0x3935bf(0x136)][0x1]?.['endsWith'](_0x3935bf(0x11d))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x3935bf(0x108)]-0x1],inputs=args[_0x3935bf(0x13b)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3935bf(0x121)](_0x3935bf(0x106)+inputs['length']+_0x3935bf(0x103)+output):console[_0x3935bf(0x121)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x12c2e2=_0x1e08;(function(_0x31ba0a,_0x48e499){const _0x10c71c=_0x1e08,_0x4d5724=_0x31ba0a();while(!![]){try{const _0x143f73=-parseInt(_0x10c71c(0x1fd))/0x1*(-parseInt(_0x10c71c(0x1ee))/0x2)+parseInt(_0x10c71c(0x217))/0x3*(parseInt(_0x10c71c(0x1cf))/0x4)+-parseInt(_0x10c71c(0x1c3))/0x5*(-parseInt(_0x10c71c(0x1c7))/0x6)+-parseInt(_0x10c71c(0x210))/0x7*(-parseInt(_0x10c71c(0x1c8))/0x8)+-parseInt(_0x10c71c(0x1de))/0x9*(-parseInt(_0x10c71c(0x1ea))/0xa)+parseInt(_0x10c71c(0x206))/0xb+parseInt(_0x10c71c(0x218))/0xc*(-parseInt(_0x10c71c(0x1d2))/0xd);if(_0x143f73===_0x48e499)break;else _0x4d5724['push'](_0x4d5724['shift']());}catch(_0x3bb18b){_0x4d5724['push'](_0x4d5724['shift']());}}}(_0x3dfb,0x70734));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(_0x52d8ab,_0x1903f8){const _0x1bf372=_0x1e08,_0x3474f2={'hWhSm':function(_0x152626,_0x5afd19){return _0x152626>=_0x5afd19;},'VOCIw':function(_0x251e91,_0x1fc303){return _0x251e91+_0x1fc303;},'FYgME':function(_0x378196,_0x3ccd4e){return _0x378196&_0x3ccd4e;}};if(_0x3474f2[_0x1bf372(0x1f0)](_0x1903f8,_0x52d8ab[_0x1bf372(0x202)]))return[0x0,0x0];const _0x85f09=_0x52d8ab[_0x1903f8];let _0x5d425f=0x1,_0x44286d=0x80;while(_0x5d425f<=0x8&&!(_0x85f09&_0x44286d)){_0x5d425f++,_0x44286d>>=0x1;}if(_0x3474f2[_0x1bf372(0x1f8)](_0x1903f8,_0x5d425f)>_0x52d8ab['length'])return[0x0,0x0];let _0x52ea32=_0x3474f2[_0x1bf372(0x1f3)](_0x85f09,_0x44286d-0x1);for(let _0x28f0e4=0x1;_0x28f0e4<_0x5d425f;_0x28f0e4++){_0x52ea32=_0x52ea32*0x100+_0x52d8ab[_0x1903f8+_0x28f0e4];}return[_0x52ea32,_0x5d425f];}function readId(_0x178fee,_0x2eb999){const _0x4c9fe4=_0x1e08,_0x223f9d={'LLnJJ':function(_0x597fdd,_0x479625){return _0x597fdd>=_0x479625;},'LYnMP':function(_0x14c7aa,_0x5da31f){return _0x14c7aa+_0x5da31f;},'HgUWo':function(_0x625a83,_0x1d6464){return _0x625a83<_0x1d6464;}};if(_0x2eb999>=_0x178fee['length'])return[0x0,0x0];const _0x31f951=_0x178fee[_0x2eb999];let _0x20188b;if(_0x223f9d[_0x4c9fe4(0x1e6)](_0x31f951,0x80))_0x20188b=0x1;else{if(_0x223f9d[_0x4c9fe4(0x1e6)](_0x31f951,0x40))_0x20188b=0x2;else{if(_0x31f951>=0x20)_0x20188b=0x3;else{if(_0x223f9d['LLnJJ'](_0x31f951,0x10))_0x20188b=0x4;else return[_0x31f951,0x1];}}}if(_0x223f9d[_0x4c9fe4(0x1d5)](_0x2eb999,_0x20188b)>_0x178fee[_0x4c9fe4(0x202)])return[0x0,0x0];let _0x52987b=0x0;for(let _0x15b5e0=0x0;_0x223f9d[_0x4c9fe4(0x1fb)](_0x15b5e0,_0x20188b);_0x15b5e0++){_0x52987b=_0x223f9d['LYnMP'](_0x52987b*0x100,_0x178fee[_0x223f9d['LYnMP'](_0x2eb999,_0x15b5e0)]);}return[_0x52987b,_0x20188b];}function readUint(_0x4add74,_0x1fb15b,_0x3114c8){const _0x2b7706=_0x1e08,_0x83628f={'dtIwU':function(_0x442361,_0x1c03aa){return _0x442361<_0x1c03aa;},'RStYc':function(_0x4e5e14,_0x3ee508){return _0x4e5e14+_0x3ee508;}};let _0x5ae481=0x0;for(let _0x5c9ef8=0x0;_0x83628f[_0x2b7706(0x1d6)](_0x5c9ef8,_0x3114c8);_0x5c9ef8++){_0x5ae481=_0x83628f['RStYc'](_0x5ae481*0x100,_0x4add74[_0x1fb15b+_0x5c9ef8]);}return _0x5ae481;}function isUnknownSize(_0x5583cd,_0x3eff83){const _0x32cf69=_0x1e08,_0x4f09ed={'TXSbh':function(_0x3a6e4b,_0x2d3e6b){return _0x3a6e4b-_0x2d3e6b;}};return _0x5583cd===_0x4f09ed[_0x32cf69(0x1dc)](Math['pow'](0x2,0x7*_0x3eff83),0x1);}function writeVint(_0x31cd70,_0x3f41e3){const _0x1925e7=_0x1e08,_0x51545e={'TAfbZ':function(_0x4a46fa,_0x1443a8){return _0x4a46fa||_0x1443a8;},'vInnQ':function(_0x2af347,_0x4fe2fe){return _0x2af347<_0x4fe2fe;},'hjWbD':function(_0x2658f2,_0x1a7fb7){return _0x2658f2-_0x1a7fb7;},'mnlCK':function(_0xf510ee,_0x21b8e9){return _0xf510ee&_0x21b8e9;},'sVzbq':function(_0x31415a,_0x35988f){return _0x31415a/_0x35988f;},'tJjNq':function(_0x2f8106,_0x73ae5){return _0x2f8106<<_0x73ae5;},'LiWzZ':function(_0x37a4f7,_0x3391b2){return _0x37a4f7-_0x3391b2;}};let _0x1bf927=_0x51545e[_0x1925e7(0x1c6)](_0x3f41e3,0x1);while(_0x51545e[_0x1925e7(0x1d9)](_0x51545e['hjWbD'](Math[_0x1925e7(0x1f5)](0x2,0x7*_0x1bf927),0x2),_0x31cd70))_0x1bf927++;const _0x265e27=Buffer['alloc'](_0x1bf927);for(let _0xc8361d=_0x51545e['hjWbD'](_0x1bf927,0x1);_0xc8361d>=0x0;_0xc8361d--){_0x265e27[_0xc8361d]=_0x51545e[_0x1925e7(0x1e4)](_0x31cd70,0xff),_0x31cd70=Math[_0x1925e7(0x1fc)](_0x51545e[_0x1925e7(0x1ef)](_0x31cd70,0x100));}return _0x265e27[0x0]|=_0x51545e[_0x1925e7(0x211)](0x1,_0x51545e[_0x1925e7(0x20c)](0x8,_0x1bf927)),_0x265e27;}function writeUint(_0x55ad8a,_0x360f80){const _0x338c8c=_0x1e08,_0x196abf={'XaVmJ':function(_0x5cf0ce,_0x4812b7){return _0x5cf0ce>=_0x4812b7;},'wmBgH':function(_0x7498c8,_0x2ad279){return _0x7498c8&_0x2ad279;}},_0x279983=Buffer['alloc'](_0x360f80);for(let _0x44e9cc=_0x360f80-0x1;_0x196abf[_0x338c8c(0x1f4)](_0x44e9cc,0x0);_0x44e9cc--){_0x279983[_0x44e9cc]=_0x196abf[_0x338c8c(0x1f7)](_0x55ad8a,0xff),_0x55ad8a=Math['floor'](_0x55ad8a/0x100);}return _0x279983;}function writeUnknownSizeVint(_0x27aec1){const _0x50c4a5=_0x1e08,_0x29ed5c={'EdvwT':function(_0x114be1,_0x4d4e8e){return _0x114be1-_0x4d4e8e;}},_0x4fa6a9=Buffer['alloc'](_0x27aec1,0xff);return _0x4fa6a9[0x0]=0xff>>_0x29ed5c[_0x50c4a5(0x1e1)](_0x27aec1,0x1),_0x4fa6a9;}function uintSize(_0x40e3bf){const _0x29a9aa=_0x1e08,_0x250c54={'kgDcB':function(_0x59a9c3,_0x10857f){return _0x59a9c3===_0x10857f;},'rvFbt':function(_0x46c5fd,_0x4d0a84){return _0x46c5fd>_0x4d0a84;}};if(_0x250c54['kgDcB'](_0x40e3bf,0x0))return 0x1;let _0xdf674f=0x0,_0x239ab0=_0x40e3bf;while(_0x250c54[_0x29a9aa(0x1f9)](_0x239ab0,0x0)){_0xdf674f++,_0x239ab0=Math['floor'](_0x239ab0/0x100);}return _0xdf674f;}function findTimestampScale(_0x254d0b,_0x56d341){const _0x50b142=_0x1e08,_0x2b3923={'kiAeP':function(_0x40dfc0,_0x5ba316){return _0x40dfc0+_0x5ba316;},'bvVas':function(_0x33a20b,_0x28dde0,_0x4788b7){return _0x33a20b(_0x28dde0,_0x4788b7);},'OLqCN':function(_0x57594b,_0x3d8e6e){return _0x57594b+_0x3d8e6e;},'Ridpk':function(_0x4cb669,_0x4a2373,_0x563d1b){return _0x4cb669(_0x4a2373,_0x563d1b);},'IqzaI':function(_0x5a664a,_0x22647c){return _0x5a664a===_0x22647c;},'Htfzw':function(_0x4c724c,_0x5f5735,_0x5c4f94,_0x5c5054){return _0x4c724c(_0x5f5735,_0x5c4f94,_0x5c5054);},'Obpmo':function(_0x166a79,_0x4946a7){return _0x166a79+_0x4946a7;}};let _0x15c5b1=_0x56d341;const _0x54d922=Math[_0x50b142(0x215)](_0x254d0b['length'],_0x2b3923[_0x50b142(0x212)](_0x56d341,0x2710));while(_0x15c5b1<_0x54d922){const [_0x47481a,_0x326931]=readId(_0x254d0b,_0x15c5b1),[_0x5f033c,_0x1089b3]=_0x2b3923[_0x50b142(0x201)](readVint,_0x254d0b,_0x2b3923[_0x50b142(0x1e2)](_0x15c5b1,_0x326931));if(_0x47481a===ID_INFO){let _0x2ef6c0=_0x15c5b1+_0x326931+_0x1089b3;const _0x14323d=_0x2ef6c0+_0x5f033c;while(_0x2ef6c0<_0x14323d){const [_0x70f83,_0x56edf1]=readId(_0x254d0b,_0x2ef6c0),[_0x5a3bbf,_0x56211a]=_0x2b3923[_0x50b142(0x1d4)](readVint,_0x254d0b,_0x2ef6c0+_0x56edf1);if(_0x2b3923['IqzaI'](_0x70f83,ID_TIMESTAMP_SCALE))return _0x2b3923['Htfzw'](readUint,_0x254d0b,_0x2b3923[_0x50b142(0x212)](_0x2b3923[_0x50b142(0x1e2)](_0x2ef6c0,_0x56edf1),_0x56211a),_0x5a3bbf);_0x2ef6c0+=_0x2b3923[_0x50b142(0x212)](_0x56edf1+_0x56211a,_0x5a3bbf);}break;}if(_0x2b3923['IqzaI'](_0x47481a,ID_CLUSTER))break;if(_0x2b3923['bvVas'](isUnknownSize,_0x5f033c,_0x1089b3))break;_0x15c5b1+=_0x2b3923[_0x50b142(0x1e7)](_0x326931+_0x1089b3,_0x5f033c);}return 0xf4240;}function findFirstClusterOffset(_0x27b53a,_0x3a5cf6){const _0x1ef0a4=_0x1e08,_0x4143a4={'SJgbU':function(_0x15cd2e,_0x7bd734){return _0x15cd2e<_0x7bd734;},'tfhyX':function(_0x26b4fc,_0x5e2608,_0x2c4e43){return _0x26b4fc(_0x5e2608,_0x2c4e43);},'IyXUa':function(_0x1f8b8f,_0x29cdb7){return _0x1f8b8f===_0x29cdb7;},'zFaIm':function(_0x3d18f9,_0x2e5bff,_0x390ef9){return _0x3d18f9(_0x2e5bff,_0x390ef9);},'ANQHQ':function(_0xb3839e,_0x388d7a){return _0xb3839e+_0x388d7a;}};let _0x2cc491=_0x3a5cf6;while(_0x4143a4[_0x1ef0a4(0x1c4)](_0x2cc491,_0x27b53a[_0x1ef0a4(0x202)])){const [_0x4bbd3c,_0xf24d24]=_0x4143a4['tfhyX'](readId,_0x27b53a,_0x2cc491);if(_0x4143a4['IyXUa'](_0x4bbd3c,ID_CLUSTER))return _0x2cc491;const [_0x27645d,_0x4f17b1]=_0x4143a4['zFaIm'](readVint,_0x27b53a,_0x2cc491+_0xf24d24);if(isUnknownSize(_0x27645d,_0x4f17b1))return _0x2cc491;_0x2cc491+=_0x4143a4['ANQHQ'](_0xf24d24+_0x4f17b1,_0x27645d);}return _0x27b53a['length'];}function findClusterEnd(_0x3fba18,_0x32e326,_0x28c62a,_0x489199){const _0x5c3a8c=_0x1e08,_0x208515={'bWJem':function(_0x3dc986,_0x30b34e){return _0x3dc986+_0x30b34e;},'QuRLt':function(_0x3d5341,_0x546f3d){return _0x3d5341<_0x546f3d;},'Nbwsq':function(_0x24bc8b,_0xe15cb3){return _0x24bc8b-_0xe15cb3;},'tiEFR':function(_0x5a18df,_0x3d8696,_0x536a37){return _0x5a18df(_0x3d8696,_0x536a37);},'IEMbB':function(_0x541da9,_0x2df442,_0x4d92ab){return _0x541da9(_0x2df442,_0x4d92ab);},'glGsR':function(_0x449076,_0x44fc9f){return _0x449076+_0x44fc9f;},'GCUEi':function(_0x4cbe35,_0x4d6c9e,_0x3cae87){return _0x4cbe35(_0x4d6c9e,_0x3cae87);},'GNflC':function(_0x380c11,_0x126d8f){return _0x380c11+_0x126d8f;}};if(!isUnknownSize(_0x28c62a,_0x489199))return _0x208515['bWJem'](_0x32e326,_0x28c62a);const _0x3d715d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x57318a=_0x32e326;while(_0x208515[_0x5c3a8c(0x20a)](_0x57318a,_0x208515[_0x5c3a8c(0x1f2)](_0x3fba18['length'],0x4))){const [_0x1d19c9,_0x386751]=_0x208515[_0x5c3a8c(0x1d1)](readId,_0x3fba18,_0x57318a);if(_0x3d715d['has'](_0x1d19c9))return _0x57318a;const [_0x5d1014,_0x51c3a0]=_0x208515['IEMbB'](readVint,_0x3fba18,_0x208515[_0x5c3a8c(0x1ed)](_0x57318a,_0x386751));if(_0x208515[_0x5c3a8c(0x207)](isUnknownSize,_0x5d1014,_0x51c3a0))return _0x3fba18[_0x5c3a8c(0x202)];_0x57318a+=_0x208515['GNflC'](_0x208515['GNflC'](_0x386751,_0x51c3a0),_0x5d1014);}return _0x3fba18['length'];}function extractClusters(_0x2948e4,_0x33b80f){const _0x1723fb=_0x1e08,_0x176720={'BNzwF':function(_0x1336fa,_0x37593e){return _0x1336fa<_0x37593e;},'YsriJ':function(_0x3ba3aa,_0x1b30ea){return _0x3ba3aa===_0x1b30ea;},'HbHvz':function(_0x4daf85,_0x30c819,_0x3e697d){return _0x4daf85(_0x30c819,_0x3e697d);},'GGXqP':function(_0x4286de,_0x1778b7,_0x5116bf,_0xf0a6f9){return _0x4286de(_0x1778b7,_0x5116bf,_0xf0a6f9);},'kuDAo':function(_0x5deab3,_0x3b4c87){return _0x5deab3+_0x3b4c87;},'rYcNv':function(_0x312bd5,_0x399934){return _0x312bd5+_0x399934;},'uGFwl':function(_0x19d901,_0x381f8b){return _0x19d901===_0x381f8b;},'kieGf':function(_0x4b31cf,_0x25e890){return _0x4b31cf>=_0x25e890;},'sXNkT':function(_0x4cae27,_0x387a94){return _0x4cae27+_0x387a94;},'rnZVM':function(_0x19546a,_0x39832c){return _0x19546a+_0x39832c;}},_0x4c949b=[],_0x4dd7f5=Buffer[_0x1723fb(0x1e5)]([0x1f,0x43,0xb6,0x75]);let _0x4906f6=0x0;while(_0x176720['BNzwF'](_0x4906f6,_0x2948e4['length'])){const _0x2e5c6a=_0x2948e4['indexOf'](_0x4dd7f5,_0x4906f6);if(_0x176720['YsriJ'](_0x2e5c6a,-0x1))break;const [_0x1c2077,_0x6a334]=_0x176720['HbHvz'](readId,_0x2948e4,_0x2e5c6a);if(_0x1c2077!==ID_CLUSTER){_0x4906f6=_0x2e5c6a+0x1;continue;}const [_0x143747,_0x2b0f7e]=readVint(_0x2948e4,_0x2e5c6a+_0x6a334),_0x9bca8f=_0x2e5c6a+_0x6a334+_0x2b0f7e,_0x4cd596=findClusterEnd(_0x2948e4,_0x9bca8f,_0x143747,_0x2b0f7e);let _0xcbd72c=_0x9bca8f,_0xe5688=0x0,_0x492922=0x2,_0x46c7dd=![],_0x3a9f36=Buffer[_0x1723fb(0x213)](0x0),_0x2ce601=Buffer['alloc'](0x0);while(_0x176720[_0x1723fb(0x1ca)](_0xcbd72c,_0x4cd596)){const [_0x39428a,_0x3e7569]=readId(_0x2948e4,_0xcbd72c),[_0x1ffc5b,_0x26968e]=_0x176720[_0x1723fb(0x1ff)](readVint,_0x2948e4,_0xcbd72c+_0x3e7569);if(_0x176720['YsriJ'](_0x39428a,ID_TIMESTAMP)){_0xe5688=_0x176720['GGXqP'](readUint,_0x2948e4,_0x176720[_0x1723fb(0x203)](_0xcbd72c+_0x3e7569,_0x26968e),_0x1ffc5b),_0x492922=_0x1ffc5b,_0x46c7dd=!![],_0x3a9f36=_0x2948e4[_0x1723fb(0x205)](_0x9bca8f,_0xcbd72c);const _0x2b8e28=_0x176720[_0x1723fb(0x203)](_0x176720['kuDAo'](_0xcbd72c,_0x3e7569)+_0x26968e,_0x1ffc5b);_0x2ce601=_0x2948e4['slice'](_0x2b8e28,_0x4cd596);break;}if(_0x39428a===ID_CLUSTER)break;if(isUnknownSize(_0x1ffc5b,_0x26968e))break;_0xcbd72c+=_0x176720[_0x1723fb(0x204)](_0x3e7569,_0x26968e)+_0x1ffc5b;}!_0x46c7dd&&(_0x2ce601=_0x2948e4['slice'](_0x9bca8f,_0x4cd596));let _0x32c710=_0xe5688;_0xcbd72c=_0x9bca8f;while(_0xcbd72c<_0x4cd596){const [_0xf12a5c,_0x46a8a6]=readId(_0x2948e4,_0xcbd72c),[_0x59fcff,_0x4d0ff5]=readVint(_0x2948e4,_0x176720[_0x1723fb(0x204)](_0xcbd72c,_0x46a8a6));if(_0x176720[_0x1723fb(0x208)](_0xf12a5c,ID_SIMPLE_BLOCK)&&_0x176720['kieGf'](_0x59fcff,0x4)){const _0x462f6b=_0x176720['kuDAo'](_0xcbd72c,_0x46a8a6)+_0x4d0ff5,[,_0x162d3d]=readVint(_0x2948e4,_0x462f6b),_0x55000d=_0x2948e4['readInt16BE'](_0x176720['sXNkT'](_0x462f6b,_0x162d3d)),_0x3c47a0=_0x176720['kuDAo'](_0xe5688,_0x55000d);if(_0x3c47a0>_0x32c710)_0x32c710=_0x3c47a0;}if(_0xf12a5c===ID_CLUSTER)break;if(isUnknownSize(_0x59fcff,_0x4d0ff5))break;_0xcbd72c+=_0x176720[_0x1723fb(0x1d7)](_0x176720[_0x1723fb(0x203)](_0x46a8a6,_0x4d0ff5),_0x59fcff);}_0x4c949b[_0x1723fb(0x1df)]({'timestamp':_0xe5688,'maxTicks':_0x32c710,'bodyBeforeTimestamp':_0x3a9f36,'bodyAfterTimestamp':_0x2ce601,'timestampElementSize':_0x492922}),_0x4906f6=_0x4cd596;}return _0x4c949b;}function parseWebm(_0x1d3972){const _0x11fbc6=_0x1e08,_0x5a2d9d={'naqpH':function(_0x4754b9,_0x3dfc11,_0x27dbe6){return _0x4754b9(_0x3dfc11,_0x27dbe6);},'JJqgY':function(_0x2515e8,_0x364530){return _0x2515e8+_0x364530;},'PjBls':function(_0x350a9b,_0x316262){return _0x350a9b+_0x316262;},'lVUCZ':function(_0x1a26ca,_0x4d7355,_0xb7ee5){return _0x1a26ca(_0x4d7355,_0xb7ee5);},'heJYa':function(_0x37b5f8,_0x1b060c){return _0x37b5f8!==_0x1b060c;},'bALHW':function(_0x31bfeb,_0x4baa36){return _0x31bfeb+_0x4baa36;}};let _0x261066=0x0;const [,_0x2fd65c]=_0x5a2d9d[_0x11fbc6(0x20b)](readId,_0x1d3972,_0x261066),[_0x122677,_0x3ea0e4]=readVint(_0x1d3972,_0x5a2d9d['JJqgY'](_0x261066,_0x2fd65c));_0x261066+=_0x5a2d9d[_0x11fbc6(0x1e8)](_0x5a2d9d['PjBls'](_0x2fd65c,_0x3ea0e4),_0x122677);const [_0x58473e,_0x4f56e2]=_0x5a2d9d[_0x11fbc6(0x1dd)](readId,_0x1d3972,_0x261066);if(_0x5a2d9d[_0x11fbc6(0x1da)](_0x58473e,ID_SEGMENT))return null;const [,_0x36c429]=readVint(_0x1d3972,_0x261066+_0x4f56e2),_0x421791=_0x5a2d9d['bALHW'](_0x261066,_0x4f56e2)+_0x36c429,_0x207290=_0x5a2d9d['lVUCZ'](findTimestampScale,_0x1d3972,_0x421791),_0x45df2c=findFirstClusterOffset(_0x1d3972,_0x421791),_0x22e325=_0x1d3972['slice'](0x0,_0x45df2c),_0x2cd63b=extractClusters(_0x1d3972,_0x207290);let _0x1bfa39=0x0;for(const _0x38371b of _0x2cd63b){if(_0x38371b['maxTicks']>_0x1bfa39)_0x1bfa39=_0x38371b[_0x11fbc6(0x20e)];}return{'header':_0x22e325,'clusters':_0x2cd63b,'timestampScale':_0x207290,'maxTimestampTicks':_0x1bfa39};}function buildCluster(_0x2c2586,_0x219df7,_0x42dd6b){const _0x2fccca=_0x1e08,_0x3c4576={'SZXQy':function(_0x41db9b,_0x597c2f){return _0x41db9b(_0x597c2f);},'WMaAd':function(_0x25e6d7,_0x327d09,_0x498051){return _0x25e6d7(_0x327d09,_0x498051);}},_0x28b683=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x180ed8=Math[_0x2fccca(0x1f1)](0x4,uintSize(_0x2c2586)),_0x365c1f=Buffer[_0x2fccca(0x1c9)]([Buffer['from']([ID_TIMESTAMP]),_0x3c4576[_0x2fccca(0x1d8)](writeVint,_0x180ed8),_0x3c4576[_0x2fccca(0x1ce)](writeUint,_0x2c2586,_0x180ed8)]),_0x1b6a89=Buffer[_0x2fccca(0x1c9)]([_0x219df7,_0x365c1f,_0x42dd6b]),_0x2dbaea=_0x3c4576[_0x2fccca(0x1d8)](writeVint,_0x1b6a89['length']);return Buffer['concat']([_0x28b683,_0x2dbaea,_0x1b6a89]);}function _0x1e08(_0x4b6a01,_0x9b1959){_0x4b6a01=_0x4b6a01-0x1c3;const _0x3dfbad=_0x3dfb();let _0x1e0805=_0x3dfbad[_0x4b6a01];return _0x1e0805;}function _0x3dfb(){const _0x3656b4=['rnZVM','SZXQy','vInnQ','heJYa','bZKxg','TXSbh','lVUCZ','7592067rIXVuz','push','NLfkH','EdvwT','OLqCN','Stitched\x20','mnlCK','from','LLnJJ','Obpmo','JJqgY','ercCW','10rnSBJb','QHmDQ','VCTyQ','glGsR','2hPUOHX','sVzbq','hWhSm','max','Nbwsq','FYgME','XaVmJ','pow','AUrNd','wmBgH','VOCIw','rvFbt','log','HgUWo','floor','418288aqcoQp','endsWith','HbHvz','sNfYP','bvVas','length','kuDAo','rYcNv','slice','4078151oQTmMr','GCUEi','uGFwl','NWORL','QuRLt','naqpH','LiWzZ','EOCrU','maxTicks','\x20files\x20->\x20','21hnidsi','tJjNq','kiAeP','alloc','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','min','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','46149rYKsNk','315348pcDlGM','15evxWhy','SJgbU','srRbv','TAfbZ','1573248oBmcfT','1364264ZNcjng','concat','BNzwF','argv','RENXJ','bodyBeforeTimestamp','WMaAd','164DSIoaJ','error','tiEFR','1534QBReis','header','Ridpk','LYnMP','dtIwU'];_0x3dfb=function(){return _0x3656b4;};return _0x3dfb();}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3c82b4){const _0x5b2a44=_0x1e08,_0x227ac9={'NWORL':function(_0x521a96,_0x113091){return _0x521a96+_0x113091;},'NLfkH':function(_0x4f1f77,_0x45aff3,_0x2d24ef){return _0x4f1f77(_0x45aff3,_0x2d24ef);},'ercCW':function(_0x11d3b8,_0x3d2d43,_0xae16a){return _0x11d3b8(_0x3d2d43,_0xae16a);},'ApLFL':function(_0xa92de2,_0x2cb622){return _0xa92de2(_0x2cb622);},'kcHay':function(_0x371255,_0x59a987){return _0x371255===_0x59a987;},'bZKxg':function(_0x5304d8,_0x4a8ccc,_0x1dff8a){return _0x5304d8(_0x4a8ccc,_0x1dff8a);},'srRbv':function(_0x4bbae2,_0x3faa8f){return _0x4bbae2+_0x3faa8f;},'sNfYP':function(_0x26d7ae,_0x4cfdf3,_0x47c1fc){return _0x26d7ae(_0x4cfdf3,_0x47c1fc);},'wLmAk':function(_0x82ce6a,_0x26f3b5){return _0x82ce6a+_0x26f3b5;},'QHmDQ':function(_0x2c18fb,_0x382c99){return _0x2c18fb!==_0x382c99;},'VCTyQ':function(_0x435a39,_0x27ead7){return _0x435a39+_0x27ead7;}},_0x5175c2=Buffer['from'](_0x3c82b4);let _0x419d6a=0x0;const [,_0x5c353c]=readId(_0x5175c2,_0x419d6a),[_0x54a3ee,_0x34a935]=readVint(_0x5175c2,_0x419d6a+_0x5c353c),_0x5718a6=_0x227ac9[_0x5b2a44(0x209)](_0x227ac9['NWORL'](_0x419d6a,_0x5c353c),_0x34a935)+_0x54a3ee,[,_0x3591e7]=_0x227ac9[_0x5b2a44(0x1e0)](readId,_0x5175c2,_0x5718a6),[,_0x4721cc]=_0x227ac9[_0x5b2a44(0x1e9)](readVint,_0x5175c2,_0x5718a6+_0x3591e7),_0x294a60=_0x227ac9[_0x5b2a44(0x209)](_0x227ac9['NWORL'](_0x5718a6,_0x3591e7),_0x4721cc),_0x440518=_0x227ac9['ApLFL'](writeUnknownSizeVint,_0x4721cc);_0x440518['copy'](_0x5175c2,_0x5718a6+_0x3591e7);let _0x354fe6=_0x294a60;const _0x27f3d7=Math['min'](_0x5175c2[_0x5b2a44(0x202)],_0x294a60+0x2710);while(_0x354fe6<_0x27f3d7){const [_0x1e638e,_0x188a2f]=readId(_0x5175c2,_0x354fe6),[_0x50357f,_0x3c7360]=readVint(_0x5175c2,_0x354fe6+_0x188a2f);if(_0x227ac9['kcHay'](_0x1e638e,ID_CLUSTER))break;if(_0x227ac9[_0x5b2a44(0x1db)](isUnknownSize,_0x50357f,_0x3c7360))break;if(_0x1e638e===ID_INFO){const _0x5255d3=_0x227ac9[_0x5b2a44(0x1c5)](_0x354fe6+_0x188a2f,_0x3c7360),_0x4d0791=_0x5255d3+_0x50357f,_0x483474=[];let _0x15abf6=_0x5255d3;while(_0x15abf6<_0x4d0791){const [_0x4a5a13,_0x166fa7]=_0x227ac9[_0x5b2a44(0x200)](readId,_0x5175c2,_0x15abf6),[_0x523665,_0x486a31]=_0x227ac9[_0x5b2a44(0x1db)](readVint,_0x5175c2,_0x227ac9['wLmAk'](_0x15abf6,_0x166fa7)),_0x388314=_0x166fa7+_0x486a31+_0x523665;_0x227ac9[_0x5b2a44(0x1eb)](_0x4a5a13,ID_DURATION)&&_0x483474['push'](_0x5175c2['slice'](_0x15abf6,_0x227ac9[_0x5b2a44(0x1ec)](_0x15abf6,_0x388314))),_0x15abf6+=_0x388314;}const _0xfc7e72=Buffer['concat'](_0x483474),_0x33abea=Buffer[_0x5b2a44(0x1c9)]([_0x5175c2['slice'](_0x354fe6,_0x227ac9[_0x5b2a44(0x209)](_0x354fe6,_0x188a2f)),writeVint(_0xfc7e72['length'],_0x3c7360)]);return Buffer[_0x5b2a44(0x1c9)]([_0x5175c2[_0x5b2a44(0x205)](0x0,_0x354fe6),_0x33abea,_0xfc7e72,_0x5175c2[_0x5b2a44(0x205)](_0x4d0791)]);}_0x354fe6+=_0x188a2f+_0x3c7360+_0x50357f;}return _0x5175c2;}export function stitchWebmFiles(_0x10120f,_0x210626){const _0x30ebdb=_0x1e08,_0x34d518={'EOCrU':function(_0x45210e,_0x3dacd0){return _0x45210e<=_0x3dacd0;},'PSWIB':function(_0x37281a,_0x5a581b){return _0x37281a(_0x5a581b);},'AUrNd':function(_0x59be98,_0x5343f4){return _0x59be98(_0x5343f4);},'YCDPT':function(_0x5e9dab,_0x2f2b9e){return _0x5e9dab<_0x2f2b9e;},'RENXJ':function(_0x1eb3b4,_0x49bb4f){return _0x1eb3b4+_0x49bb4f;},'BdPIs':function(_0x352332,_0x39f03a,_0x5e4b9e){return _0x352332(_0x39f03a,_0x5e4b9e);}};if(_0x34d518[_0x30ebdb(0x20d)](_0x10120f['length'],0x1))return![];const _0x552092=[];for(const _0x10e283 of _0x10120f){const _0x4fc978=_0x34d518['PSWIB'](readFileSync,_0x10e283),_0x219aa0=parseWebm(_0x4fc978);if(!_0x219aa0||_0x219aa0['clusters']['length']===0x0)return![];_0x552092[_0x30ebdb(0x1df)](_0x219aa0);}const _0x1bc014=_0x552092[0x0],_0x197ef1=_0x34d518[_0x30ebdb(0x1f6)](rebuildHeaderWithoutDuration,_0x1bc014[_0x30ebdb(0x1d3)]),_0x39bf94=[_0x197ef1];let _0x5263c3=0x0;for(let _0x1a0343=0x0;_0x34d518['YCDPT'](_0x1a0343,_0x552092[_0x30ebdb(0x202)]);_0x1a0343++){const _0x5d4713=_0x552092[_0x1a0343];for(const _0x4cbd23 of _0x5d4713['clusters']){const _0x31f78d=_0x34d518[_0x30ebdb(0x1cc)](_0x4cbd23['timestamp'],_0x5263c3);_0x39bf94[_0x30ebdb(0x1df)](buildCluster(_0x31f78d,_0x4cbd23[_0x30ebdb(0x1cd)],_0x4cbd23['bodyAfterTimestamp']));}const _0x45b673=0x1e;_0x5263c3+=_0x5d4713['maxTimestampTicks']+_0x45b673;}return _0x34d518['BdPIs'](writeFileSync,_0x210626,Buffer[_0x30ebdb(0x1c9)](_0x39bf94)),!![];}if(process[_0x12c2e2(0x1cb)][0x1]?.[_0x12c2e2(0x1fe)]('stitchWebmFiles.ts')||process[_0x12c2e2(0x1cb)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process[_0x12c2e2(0x1cb)]['slice'](0x2);args[_0x12c2e2(0x202)]<0x3&&(console[_0x12c2e2(0x1d0)](_0x12c2e2(0x216)),process['exit'](0x1));const output=args[args[_0x12c2e2(0x202)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x12c2e2(0x1fa)](_0x12c2e2(0x1e3)+inputs[_0x12c2e2(0x202)]+_0x12c2e2(0x20f)+output):console['log'](_0x12c2e2(0x214));}
|