@ranger-testing/ranger-cli 3.1.2 → 3.1.3-alpha.e1ca941-42
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/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(
|
|
1
|
+
(function(_0x25de18,_0x289c40){const _0x584e3b=_0x1a6e,_0x42816c=_0x25de18();while(!![]){try{const _0x664faa=parseInt(_0x584e3b(0x1cc))/0x1*(-parseInt(_0x584e3b(0x1cb))/0x2)+-parseInt(_0x584e3b(0x1bf))/0x3+-parseInt(_0x584e3b(0x1d0))/0x4+parseInt(_0x584e3b(0x1da))/0x5*(-parseInt(_0x584e3b(0x1c4))/0x6)+parseInt(_0x584e3b(0x1d1))/0x7+parseInt(_0x584e3b(0x1ce))/0x8*(parseInt(_0x584e3b(0x1bd))/0x9)+parseInt(_0x584e3b(0x1bb))/0xa*(parseInt(_0x584e3b(0x1bc))/0xb);if(_0x664faa===_0x289c40)break;else _0x42816c['push'](_0x42816c['shift']());}catch(_0x585a26){_0x42816c['push'](_0x42816c['shift']());}}}(_0x27a5,0xd3407));import{existsSync}from'fs';import _0xe72293 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x1a6e(_0x44da53,_0x5f5560){_0x44da53=_0x44da53-0x1b3;const _0x27a595=_0x27a5();let _0x1a6e73=_0x27a595[_0x44da53];return _0x1a6e73;}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(_0x414ce4){const _0x43bafd=_0x1a6e,_0x7fff4f={'eiGjO':function(_0xb17b65,_0xbfb307){return _0xb17b65+_0xbfb307;},'HVXjw':_0x43bafd(0x1d4),'gKMGv':_0x43bafd(0x1df),'PpKkp':function(_0xe2b6c6,_0x55307c){return _0xe2b6c6(_0x55307c);},'oAwUH':function(_0x4ad334,_0x4315ad){return _0x4ad334(_0x4315ad);},'qQumH':function(_0x85f723,_0x13555c){return _0x85f723===_0x13555c;},'VciFZ':function(_0x1a1fc7,_0x2e16d1){return _0x1a1fc7&&_0x2e16d1;},'WMObE':function(_0x4d7d0c,_0x42045c){return _0x4d7d0c+_0x42045c;},'yHeaQ':function(_0x170e9f,_0x1e02a1){return _0x170e9f+_0x1e02a1;},'tvnya':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','iMwFj':function(_0x22e66f){return _0x22e66f();},'FftMJ':_0x43bafd(0x1ba),'RhWvW':'cloud','ZSDLY':_0x43bafd(0x1c5),'zeifU':function(_0x444935,_0x63fa96){return _0x444935===_0x63fa96;},'OtpIY':function(_0x326cb5,_0x401c0e,_0x1221f8){return _0x326cb5(_0x401c0e,_0x1221f8);},'eMTnb':function(_0x79a438,_0x4a48ae){return _0x79a438(_0x4a48ae);}},_0x38faa0=_0x414ce4['profile'];let _0x5a2c97=_0x414ce4['profile']??await readActiveProfileName(),_0x39eb04=null;if(!_0x5a2c97&&process[_0x43bafd(0x1e5)]['RANGER_TEST_USERNAME']){const _0x2c77ac=await resolveAdHocProfile();_0x2c77ac&&(_0x5a2c97=_0x2c77ac['name'],_0x39eb04=_0x2c77ac[_0x43bafd(0x1cd)]);}if(!_0x5a2c97)try{const _0x338fbb=await listCloudProfiles();if(_0x338fbb[_0x43bafd(0x1b7)]===0x1){const _0x1fa548=_0x338fbb[0x0];_0x5a2c97=_0x1fa548['name'],console[_0x43bafd(0x1d8)](_0x43bafd(0x1b6)+_0x1fa548['name']),console[_0x43bafd(0x1d8)](_0x43bafd(0x1b4));}}catch{}if(!_0x5a2c97)throw new Error(_0x7fff4f['eiGjO'](_0x7fff4f[_0x43bafd(0x1c2)]+_0x7fff4f['gKMGv']+'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a',_0x43bafd(0x1c7))+'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.');const _0x50806e=getEnvDir(_0x5a2c97),_0x22779c=_0x7fff4f['PpKkp'](existsSync,_0x50806e);let _0x16cadf=_0x39eb04,_0x33892d=![];if(!_0x16cadf)try{_0x16cadf=await _0x7fff4f['oAwUH'](fetchCloudProfile,_0x5a2c97);if(!_0x16cadf)_0x33892d=!![];}catch(_0x568457){_0x568457 instanceof ApiError&&_0x7fff4f[_0x43bafd(0x1d2)](_0x568457[_0x43bafd(0x1db)],0x194)&&(_0x33892d=!![]);}if(_0x7fff4f['VciFZ'](_0x38faa0,_0x33892d)&&!_0x22779c&&!_0x16cadf)throw new Error(_0x7fff4f['WMObE'](_0x7fff4f[_0x43bafd(0x1ca)]('Profile\x20\x22'+_0x38faa0+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x7fff4f[_0x43bafd(0x1d6)]),'`ranger\x20profile\x20add`\x20to\x20create\x20one.'));if(_0x7fff4f['VciFZ'](_0x16cadf,_0x22779c)){let _0x3f7ccb=!![];if(_0x7fff4f[_0x43bafd(0x1c6)](isInteractive)){const {source:_0x22ef5b}=await _0xe72293['prompt']([{'type':'list','name':_0x43bafd(0x1d5),'message':_0x43bafd(0x1c9)+_0x5a2c97+_0x43bafd(0x1d9),'choices':[{'name':_0x7fff4f['FftMJ'],'value':_0x7fff4f['RhWvW']},{'name':'Local\x20profile','value':_0x7fff4f[_0x43bafd(0x1dc)]}],'default':_0x43bafd(0x1b5)}]);_0x3f7ccb=_0x7fff4f[_0x43bafd(0x1e3)](_0x22ef5b,_0x43bafd(0x1b5));}if(!_0x3f7ccb)_0x16cadf=null;}const _0x24d900=readProfileOverrides(process[_0x43bafd(0x1b3)](),_0x5a2c97);let _0x4e0a48=null,_0x495861,_0x19a90b,_0x30622f,_0x47c88d,_0x4333e1=null,_0x1e8c79;const _0x1f58f1=expandOverrides(_0x24d900),_0x20db4b=readUrlEnvVars();if(_0x16cadf){_0x4e0a48=_0x16cadf;const _0x3203d9=_0x16cadf['settings']??{},_0x19d9f4=_0x7fff4f['OtpIY'](mergeCloudProfileSettings,_0x3203d9,_0x24d900??undefined),_0x9b992f={..._0x16cadf,'settings':_0x19d9f4};_0x4333e1={'baseUrl':_0x7fff4f['PpKkp'](expandString,_0x3203d9['baseUrl']),'startPath':expandString(_0x3203d9[_0x43bafd(0x1d7)])};const _0x5222b2=await fetchAuthConfig(),_0x53cfc4=_0x5222b2?_0x7fff4f[_0x43bafd(0x1de)](resolveAuthEnvironmentLocally,_0x5222b2,_0x16cadf['environmentKey']):null;_0x1e8c79=_0x53cfc4?.['domains']?.[0x0];const _0x30d849=resolveProfileUrl({'flagBaseUrl':_0x414ce4[_0x43bafd(0x1e1)],'flagStartPath':_0x414ce4['startPath'],'envBaseUrl':_0x20db4b['envBaseUrl'],'envStartPath':_0x20db4b[_0x43bafd(0x1d3)],'projectOverrides':_0x1f58f1,'cloudSettings':_0x4333e1,'authEnvironmentDomain':_0x1e8c79}),_0xe6ca2c=process['env'][_0x43bafd(0x1cf)];if(_0xe6ca2c){if(!existsSync(_0xe6ca2c))throw new Error(_0x43bafd(0x1e4)+_0xe6ca2c+_0x43bafd(0x1e6));_0x495861=_0xe6ca2c,_0x19a90b=resolveEnvVars(_0x19d9f4),_0x30622f=Boolean(_0x19a90b[_0x43bafd(0x1c1)]);}else{const _0x65fb3=await _0x7fff4f['OtpIY'](resolveCloudProfileSession,_0x9b992f,{'effectiveBaseUrl':_0x30d849['baseUrl'],'telemetry':_0x414ce4[_0x43bafd(0x1dd)]});_0x495861=_0x65fb3[_0x43bafd(0x1c8)],_0x19a90b=_0x7fff4f['eMTnb'](resolveEnvVars,_0x65fb3['settings']),_0x30622f=Boolean(_0x19a90b['cdpEndpoint']),_0x1e8c79=_0x65fb3[_0x43bafd(0x1c3)]?.['domains']?.[0x0];}}else{if(!_0x22779c)throw new Error('Profile\x20\x22'+_0x5a2c97+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x5a2c97);const _0x17277d=await _0x7fff4f[_0x43bafd(0x1e0)](loadSettings,_0x5a2c97);_0x19a90b=_0x7fff4f['eMTnb'](resolveEnvVars,_0x17277d),_0x30622f=_0x7fff4f['PpKkp'](Boolean,_0x19a90b[_0x43bafd(0x1c1)]),_0x47c88d=_0x19a90b[_0x43bafd(0x1e1)];}const _0x3f1bb2=_0x7fff4f['PpKkp'](resolveProfileUrl,{'flagBaseUrl':_0x414ce4[_0x43bafd(0x1e1)],'flagStartPath':_0x414ce4['startPath'],'envBaseUrl':_0x20db4b['envBaseUrl'],'envStartPath':_0x20db4b['envStartPath'],'localSettingsBaseUrl':_0x47c88d,'projectOverrides':_0x1f58f1,'cloudSettings':_0x4333e1,'authEnvironmentDomain':_0x1e8c79}),_0x4b915d=_0x3f1bb2[_0x43bafd(0x1be)]??_0x3f1bb2['baseUrl'];if(_0x7fff4f[_0x43bafd(0x1b9)](!_0x4b915d,!_0x30622f))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x5a2c97+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x5a2c97+_0x43bafd(0x1e2));return{'activeProfile':_0x5a2c97,'resolvedCloudProfile':_0x4e0a48,'cloudAuthPath':_0x495861,'resolvedSettings':_0x19a90b,'isCdpMode':_0x30622f,'url':_0x4b915d,'startPath':_0x3f1bb2['startPath']};}function expandString(_0x3077d6){const _0x326f18=_0x1a6e;if(typeof _0x3077d6!==_0x326f18(0x1c0))return _0x3077d6;return resolveEnvVars(_0x3077d6);}function _0x27a5(){const _0x593b4f=['1318655sWWwgS','status','ZSDLY','telemetry','OtpIY','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','oAwUH','baseUrl','\x20baseUrl\x20<url>','zeifU','RANGER_SESSION_STATE_PATH=','env','\x20does\x20not\x20exist.','cwd','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','cloud','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','length','oJrZP','VciFZ','Cloud\x20profile\x20(recommended)','11688730qSdhsI','11xoMCPu','2007vYpRBg','url','980457kqrXlu','string','cdpEndpoint','HVXjw','resolvedEnv','6cvmiks','local','iMwFj','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','authPath','Profile\x20\x22','yHeaQ','4cJrnFS','623947DQVRDU','profile','20192EDjSFm','RANGER_SESSION_STATE_PATH','100572vIIZjU','6980043WIhZhu','qQumH','envStartPath','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','source','tvnya','startPath','log','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?'];_0x27a5=function(){return _0x593b4f;};return _0x27a5();}function expandOverrides(_0x1a7528){const _0x192860=_0x1a6e,_0x3fb3e7={'oJrZP':_0x192860(0x1c0)};if(!_0x1a7528)return _0x1a7528;const _0x2255ff={..._0x1a7528};return typeof _0x2255ff['baseUrl']===_0x3fb3e7[_0x192860(0x1b8)]&&(_0x2255ff[_0x192860(0x1e1)]=resolveEnvVars(_0x2255ff['baseUrl'])),typeof _0x2255ff['startPath']===_0x3fb3e7[_0x192860(0x1b8)]&&(_0x2255ff[_0x192860(0x1d7)]=resolveEnvVars(_0x2255ff['startPath'])),_0x2255ff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fe408,_0xc80ee9){const _0x413996=_0x5b3c,_0x49d77b=_0x3fe408();while(!![]){try{const _0x56c81d=parseInt(_0x413996(0x9c))/0x1*(parseInt(_0x413996(0xa7))/0x2)+-parseInt(_0x413996(0xa9))/0x3*(parseInt(_0x413996(0x96))/0x4)+parseInt(_0x413996(0xa5))/0x5+-parseInt(_0x413996(0x95))/0x6+-parseInt(_0x413996(0xa8))/0x7+-parseInt(_0x413996(0x9f))/0x8*(-parseInt(_0x413996(0x9a))/0x9)+parseInt(_0x413996(0xa4))/0xa*(parseInt(_0x413996(0xad))/0xb);if(_0x56c81d===_0xc80ee9)break;else _0x49d77b['push'](_0x49d77b['shift']());}catch(_0x496318){_0x49d77b['push'](_0x49d77b['shift']());}}}(_0x3c11,0xca7ba));function firstDefined(..._0x4e8903){const _0x4fdbda=_0x5b3c,_0x75d2e1={'wwteF':function(_0x3fabd3,_0x550359){return _0x3fabd3!==_0x550359;}};for(const _0x2d3a84 of _0x4e8903){if(_0x2d3a84!==undefined&&_0x75d2e1[_0x4fdbda(0x94)](_0x2d3a84,null)&&_0x2d3a84!=='')return _0x2d3a84;}return undefined;}function _0x3c11(){const _0x418ea5=['17JFdzlQ','test','rBsjD','9890024cIpEnh','uqBxr','RANGER_START_PATH','txaND','string','2223640raMhKJ','5898840VfxEer','Tmhen','458hcREeF','10975608tNFtpe','2436mBHRmV','USIcZ','slice','cloudSettings','154xDWorj','wwteF','9508656umTwZV','7640UBDOmu','flagBaseUrl','flagStartPath','projectOverrides','9LOFDnR','FtnER'];_0x3c11=function(){return _0x418ea5;};return _0x3c11();}function normalizeAuthEnvironmentDomain(_0x56d483){const _0x39e905=_0x5b3c;if(!_0x56d483)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x39e905(0x9d)](_0x56d483))return _0x56d483;return'https://'+_0x56d483;}export function resolveBaseUrl(_0x5f26a5){const _0x19b3bd=_0x5b3c,_0x21b0e4={'USIcZ':function(_0x49d2c6,_0x1fef57){return _0x49d2c6 in _0x1fef57;},'txaND':'baseUrl','HTgHq':function(_0x24730a,_0x149010){return _0x24730a===_0x149010;},'FtnER':function(_0x4a017b,_0x5269f5){return _0x4a017b(_0x5269f5);}},_0x44a83b=_0x5f26a5['projectOverrides'],_0x397885=!!_0x44a83b&&_0x21b0e4[_0x19b3bd(0xaa)](_0x21b0e4[_0x19b3bd(0xa2)],_0x44a83b),_0x28c776=_0x44a83b?.['baseUrl'],_0x205bd9=!(_0x397885&&_0x28c776===null);return firstDefined(_0x5f26a5[_0x19b3bd(0x97)],_0x5f26a5['envBaseUrl'],_0x5f26a5['localSettingsBaseUrl'],_0x21b0e4['HTgHq'](typeof _0x28c776,'string')?_0x28c776:undefined,_0x205bd9?_0x5f26a5[_0x19b3bd(0xac)]?.['baseUrl']:undefined,_0x205bd9?_0x21b0e4[_0x19b3bd(0x9b)](normalizeAuthEnvironmentDomain,_0x5f26a5['authEnvironmentDomain']):undefined);}function _0x5b3c(_0x580b53,_0x208de9){_0x580b53=_0x580b53-0x94;const _0x3c110d=_0x3c11();let _0x5b3c8d=_0x3c110d[_0x580b53];return _0x5b3c8d;}export function resolveStartPath(_0x5a1700){const _0x4b7d41=_0x5b3c,_0x343d22={'Tmhen':'startPath','uqBxr':function(_0x242ddb,_0x4b9053,_0x523304,_0x4e3532,_0x1b569c){return _0x242ddb(_0x4b9053,_0x523304,_0x4e3532,_0x1b569c);},'ckpTw':function(_0x235428,_0x94c265){return _0x235428===_0x94c265;},'vFAkQ':_0x4b7d41(0xa3)},_0x29f95a=_0x5a1700[_0x4b7d41(0x99)],_0x121eef=!!_0x29f95a&&_0x343d22[_0x4b7d41(0xa6)]in _0x29f95a,_0x4df2c5=_0x29f95a?.['startPath'],_0x2deb58=!(_0x121eef&&_0x4df2c5===null);return _0x343d22[_0x4b7d41(0xa0)](firstDefined,_0x5a1700[_0x4b7d41(0x98)],_0x5a1700['envStartPath'],_0x343d22['ckpTw'](typeof _0x4df2c5,_0x343d22['vFAkQ'])?_0x4df2c5:undefined,_0x2deb58?_0x5a1700[_0x4b7d41(0xac)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x4c918f,_0x45d5f7){const _0x1b4d53=_0x5b3c,_0x5b1385={'rBsjD':function(_0x1fe1df,_0xfe4c65){return _0x1fe1df+_0xfe4c65;}};if(!_0x4c918f)return undefined;if(!_0x45d5f7)return _0x4c918f;const _0x7230fa=_0x4c918f['endsWith']('/')?_0x4c918f[_0x1b4d53(0xab)](0x0,-0x1):_0x4c918f,_0x37b71f=_0x45d5f7['startsWith']('/')?_0x45d5f7:'/'+_0x45d5f7;return _0x5b1385[_0x1b4d53(0x9e)](_0x7230fa,_0x37b71f);}export function resolveProfileUrl(_0x4ad581){const _0x301a36={'RyBZk':function(_0x25bdee,_0x363709){return _0x25bdee(_0x363709);},'flCMU':function(_0x49c06a,_0x4f4c3e,_0x211988){return _0x49c06a(_0x4f4c3e,_0x211988);}},_0x149b08=resolveBaseUrl(_0x4ad581),_0x5d11b3=_0x301a36['RyBZk'](resolveStartPath,_0x4ad581);return{'baseUrl':_0x149b08,'startPath':_0x5d11b3,'url':_0x301a36['flCMU'](joinBaseAndPath,_0x149b08,_0x5d11b3)};}export function readUrlEnvVars(_0x1dc0e9=process['env']){const _0x9a828f=_0x5b3c;return{'envBaseUrl':_0x1dc0e9['RANGER_BASE_URL'],'envStartPath':_0x1dc0e9[_0x9a828f(0xa1)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x3e3b(_0x3c3eb9,_0x2d7751){_0x3c3eb9=_0x3c3eb9-0xd4;const _0x16a5bc=_0x16a5();let _0x3e3ba8=_0x16a5bc[_0x3c3eb9];return _0x3e3ba8;}function _0x16a5(){const _0x92575e=['1499460tqCjbI','317046TYrUSG','maxRetries','49TggILS','label','15wCSNiw','pow','baseDelayMs','58IkllAX','1138DLwkNY','29772ZmNEoQ','),\x20retrying\x20in\x20','2032mttTLO','1010756cRzrPS','zwkpk','495mKXDoQ','42220dVvpSA','9713796CFqIKz'];_0x16a5=function(){return _0x92575e;};return _0x16a5();}(function(_0x1db35d,_0x51df75){const _0x3a3b35=_0x3e3b,_0x409416=_0x1db35d();while(!![]){try{const _0x5a2f3c=-parseInt(_0x3a3b35(0xd4))/0x1*(parseInt(_0x3a3b35(0xd5))/0x2)+parseInt(_0x3a3b35(0xde))/0x3+parseInt(_0x3a3b35(0xd9))/0x4*(parseInt(_0x3a3b35(0xe3))/0x5)+-parseInt(_0x3a3b35(0xdf))/0x6*(parseInt(_0x3a3b35(0xe1))/0x7)+parseInt(_0x3a3b35(0xd8))/0x8*(-parseInt(_0x3a3b35(0xd6))/0x9)+parseInt(_0x3a3b35(0xdc))/0xa*(-parseInt(_0x3a3b35(0xdb))/0xb)+parseInt(_0x3a3b35(0xdd))/0xc;if(_0x5a2f3c===_0x51df75)break;else _0x409416['push'](_0x409416['shift']());}catch(_0x986132){_0x409416['push'](_0x409416['shift']());}}}(_0x16a5,0x9ad93));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x17b220,_0x3a3576){const _0x5245a5=_0x3e3b,_0x529acd={'MCknL':function(_0x1e3be8,_0x9d85d0){return _0x1e3be8(_0x9d85d0);},'iUOGY':function(_0x4a404c,_0xb9a62c){return _0x4a404c*_0xb9a62c;},'zwkpk':function(_0x888fc,_0x4c52a1){return _0x888fc+_0x4c52a1;}},_0x35ba2d=_0x3a3576?.[_0x5245a5(0xe0)]??DEFAULT_MAX_RETRIES,_0x155f20=_0x3a3576?.[_0x5245a5(0xe5)]??DEFAULT_BASE_DELAY_MS;let _0x56db88;for(let _0x4b0754=0x0;_0x4b0754<=_0x35ba2d;_0x4b0754++){try{return await _0x17b220();}catch(_0x527813){_0x56db88=_0x527813 instanceof Error?_0x527813:new Error(_0x529acd['MCknL'](String,_0x527813));if(_0x4b0754<_0x35ba2d){const _0x4005a8=_0x529acd['iUOGY'](_0x155f20,Math[_0x5245a5(0xe4)](0x2,_0x4b0754));_0x3a3576?.['label']&&console['error'](_0x3a3576[_0x5245a5(0xe2)]+'\x20failed\x20(attempt\x20'+_0x529acd[_0x5245a5(0xda)](_0x4b0754,0x1)+'/'+(_0x35ba2d+0x1)+_0x5245a5(0xd7)+_0x4005a8+'ms...'),await new Promise(_0xe2badd=>setTimeout(_0xe2badd,_0x4005a8));}}}throw _0x56db88;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x157323=_0x2d46;(function(_0x49eab4,_0x43eb3f){const _0x1d918c=_0x2d46,_0x209490=_0x49eab4();while(!![]){try{const _0x1f5b2a=-parseInt(_0x1d918c(0x18d))/0x1*(-parseInt(_0x1d918c(0x182))/0x2)+-parseInt(_0x1d918c(0x162))/0x3+-parseInt(_0x1d918c(0x170))/0x4*(-parseInt(_0x1d918c(0x160))/0x5)+-parseInt(_0x1d918c(0x16b))/0x6*(parseInt(_0x1d918c(0x179))/0x7)+parseInt(_0x1d918c(0x18b))/0x8*(-parseInt(_0x1d918c(0x178))/0x9)+parseInt(_0x1d918c(0x189))/0xa+-parseInt(_0x1d918c(0x17e))/0xb*(-parseInt(_0x1d918c(0x169))/0xc);if(_0x1f5b2a===_0x43eb3f)break;else _0x209490['push'](_0x209490['shift']());}catch(_0x1c6089){_0x209490['push'](_0x209490['shift']());}}}(_0x5b79,0xea10a));import*as _0xb1b4c5 from'fs';import*as _0x11ae9c from'path';import*as _0x51cb73 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x11ae9c[_0x157323(0x188)](_0x51cb73[_0x157323(0x176)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function _0x5b79(){const _0x3aadf2=['12dmTLWS','DhNlY','AaUDz','CZaBV','umPRN','XUZAk','homedir','xDVlM','36ahvsrd','26215OdpEcd','readFileSync','lastEnabledSessionClearedAt','mtFvx','WhMJs','422972ZjjCpY','lpUDi','pipe','now','4zdQLES','VxvDk','zheWG','sessions','existsSync','ldcyi','join','6874750hMekHu','featureId','2652576hZyTeZ','lastPlanReminderAt','852203eALwym','branches','lastStopReminderAt','main','master','936555AZLLOB','Kbhec','1906062lCFuRF','MFQPP','registeredAt','JOQMx','currentBranch','RLwLG','fjxsH','48mEGtYz','enabled','300YXafqP','utf-8','zSpID','TCxPr','writeFileSync'];_0x5b79=function(){return _0x3aadf2;};return _0x5b79();}function loadCache(){const _0x3db2e0=_0x157323,_0x35eaa0={'Kbhec':'utf-8','JOQMx':function(_0x22bb44){return _0x22bb44();}};try{if(_0xb1b4c5[_0x3db2e0(0x186)](CACHE_FILE)){const _0x285f0b=JSON['parse'](_0xb1b4c5[_0x3db2e0(0x17a)](CACHE_FILE,_0x35eaa0[_0x3db2e0(0x161)]));return{'version':0x3,'sessions':_0x285f0b[_0x3db2e0(0x185)]||{},'branches':_0x285f0b[_0x3db2e0(0x18e)]||{},'lastEnabledSessionClearedAt':_0x285f0b[_0x3db2e0(0x17b)]};}}catch{}return _0x35eaa0[_0x3db2e0(0x165)](createEmptyCache);}function saveCache(_0x53275e){const _0x2bea19=_0x157323;try{const _0x1e6ea4=_0x11ae9c['dirname'](CACHE_FILE);!_0xb1b4c5['existsSync'](_0x1e6ea4)&&_0xb1b4c5['mkdirSync'](_0x1e6ea4,{'recursive':!![]}),_0xb1b4c5[_0x2bea19(0x16f)](CACHE_FILE,JSON['stringify'](_0x53275e,null,0x2));}catch{}}export function getCurrentBranch(){const _0x37a5a6=_0x157323,_0x93db83={'fjxsH':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','kUxEn':_0x37a5a6(0x16c),'TCxPr':_0x37a5a6(0x180),'PUMNX':'HEAD'};try{const _0x4e655b=execSync(_0x93db83[_0x37a5a6(0x168)],{'encoding':_0x93db83['kUxEn'],'stdio':[_0x93db83[_0x37a5a6(0x16e)],'pipe',_0x93db83['TCxPr']]})['trim']();if(!_0x4e655b||_0x4e655b===_0x93db83['PUMNX'])return null;return _0x4e655b;}catch{return null;}}export function enableBranch(_0xc39ca4){const _0x3ef32b={'kCdIC':function(_0x1d95bc){return _0x1d95bc();}},_0x526a66=_0x3ef32b['kCdIC'](loadCache);_0x526a66['branches'][_0xc39ca4]=!![],saveCache(_0x526a66);}export function disableBranch(_0x551775){const _0x25d5c4=loadCache();delete _0x25d5c4['branches'][_0x551775],saveCache(_0x25d5c4);}export function isBranchEnabled(_0x459f97){const _0x5bdaf3=_0x157323,_0x282917={'pRQFE':function(_0x34e325){return _0x34e325();},'lpUDi':function(_0x3f250c,_0x64e0e1){return _0x3f250c===_0x64e0e1;}},_0x386be4=_0x282917['pRQFE'](loadCache);return _0x282917[_0x5bdaf3(0x17f)](_0x386be4['branches'][_0x459f97],!![]);}function getOrCreateSession(_0x3be73b,_0x1a5e37){const _0x364217=_0x157323;return!_0x3be73b[_0x364217(0x185)][_0x1a5e37]&&(_0x3be73b['sessions'][_0x1a5e37]={}),_0x3be73b[_0x364217(0x185)][_0x1a5e37];}export function enableSession(_0x3938fd){const _0xce1087=_0x157323,_0x2fed7b={'XUZAk':function(_0x8d7eb3){return _0x8d7eb3();},'VZveT':function(_0x2d9fc5,_0x15002b,_0x159d8c){return _0x2d9fc5(_0x15002b,_0x159d8c);}},_0x33fdc7=_0x2fed7b[_0xce1087(0x175)](loadCache),_0xa5b297=_0x2fed7b['VZveT'](getOrCreateSession,_0x33fdc7,_0x3938fd);_0xa5b297[_0xce1087(0x16a)]=!![];const _0x261284=_0x2fed7b['XUZAk'](getCurrentBranch);_0x261284&&_0x261284!=='main'&&_0x261284!=='master'&&(_0x33fdc7[_0xce1087(0x18e)][_0x261284]=!![],_0xa5b297['currentBranch']=_0x261284),saveCache(_0x33fdc7);}export function isSessionEnabled(_0x262023){const _0x3aff57=_0x157323,_0x34b33f={'WhMJs':function(_0x1c4908){return _0x1c4908();},'CZaBV':function(_0x18e4fb,_0x7ff141){return _0x18e4fb===_0x7ff141;},'VxvDk':_0x3aff57(0x191)},_0x485b97=loadCache(),_0x54836d=_0x34b33f[_0x3aff57(0x17d)](getCurrentBranch);if(!_0x54836d||_0x34b33f[_0x3aff57(0x173)](_0x54836d,'main')||_0x34b33f['CZaBV'](_0x54836d,_0x34b33f[_0x3aff57(0x183)]))return _0x34b33f[_0x3aff57(0x173)](_0x485b97[_0x3aff57(0x185)][_0x262023]?.['enabled'],!![]);const _0x45c7ab=_0x485b97['branches'][_0x54836d]===!![],_0x4e4852=_0x485b97[_0x3aff57(0x185)][_0x262023]?.['enabled']===!![];return _0x45c7ab||_0x4e4852;}export function disableSession(_0x400430){const _0x4d24ec=_0x157323,_0x1b0041={'umPRN':function(_0x52fe2c){return _0x52fe2c();},'jaPwC':function(_0x14528f,_0xc7b1bc,_0x40947e){return _0x14528f(_0xc7b1bc,_0x40947e);}},_0x34f0af=_0x1b0041[_0x4d24ec(0x174)](loadCache),_0x3f8f89=_0x1b0041['jaPwC'](getOrCreateSession,_0x34f0af,_0x400430);_0x3f8f89['enabled']=![],saveCache(_0x34f0af);}export function updateBranchTracking(_0x4f777c){const _0x5b6615=_0x157323,_0x45896f={'ldcyi':function(_0x3a8448){return _0x3a8448();},'DhNlY':function(_0x102ebf,_0x48e161){return _0x102ebf===_0x48e161;}},_0x60b90f=loadCache(),_0x3fd000=_0x60b90f['sessions'][_0x4f777c];if(!_0x3fd000?.[_0x5b6615(0x16a)])return;const _0x244267=_0x45896f[_0x5b6615(0x187)](getCurrentBranch);if(!_0x244267||_0x45896f[_0x5b6615(0x171)](_0x244267,_0x5b6615(0x190))||_0x244267==='master')return;_0x3fd000[_0x5b6615(0x166)]!==_0x244267&&(_0x60b90f[_0x5b6615(0x18e)][_0x244267]=!![],_0x3fd000['currentBranch']=_0x244267,saveCache(_0x60b90f));}function _0x2d46(_0xd9990a,_0x170575){_0xd9990a=_0xd9990a-0x160;const _0x5b799a=_0x5b79();let _0x2d46bb=_0x5b799a[_0xd9990a];return _0x2d46bb;}export function initBranchTracking(_0x1e2f3e){const _0x3de50a=_0x157323,_0x4be22f={'ZttnY':function(_0x4da2a8){return _0x4da2a8();},'mtFvx':function(_0x1609b8){return _0x1609b8();},'RLwLG':function(_0x20351a,_0x3e2eb4){return _0x20351a===_0x3e2eb4;},'zheWG':'master','zSpID':function(_0x183812,_0x3e1e71,_0x1ccdc3){return _0x183812(_0x3e1e71,_0x1ccdc3);}},_0x44b517=_0x4be22f['ZttnY'](loadCache),_0x26d711=_0x4be22f[_0x3de50a(0x17c)](getCurrentBranch);if(!_0x26d711||_0x4be22f[_0x3de50a(0x167)](_0x26d711,_0x3de50a(0x190))||_0x26d711===_0x4be22f[_0x3de50a(0x184)])return;if(_0x44b517['branches'][_0x26d711]===!![]){const _0x272b92=_0x4be22f[_0x3de50a(0x16d)](getOrCreateSession,_0x44b517,_0x1e2f3e);_0x272b92['enabled']=!![],_0x272b92['currentBranch']=_0x26d711,saveCache(_0x44b517);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x3fc3a5){const _0x184e44=_0x157323,_0x5a16dd=loadCache(),_0x2e32c9=_0x5a16dd['sessions'][_0x3fc3a5];_0x2e32c9?.[_0x184e44(0x16a)]&&(_0x5a16dd[_0x184e44(0x17b)]=Date['now'](),saveCache(_0x5a16dd));}export function shouldAutoEnableAfterClear(_0x5a76f4){const _0x21400c={'zgLZc':function(_0x1bf072,_0x377578){return _0x1bf072!==_0x377578;},'pxFcs':function(_0x17e681){return _0x17e681();},'RsCPH':function(_0x8818e9,_0x4e23f6){return _0x8818e9-_0x4e23f6;},'AkHOg':function(_0x57ba88,_0x2e8ec5){return _0x57ba88<=_0x2e8ec5;}};if(_0x21400c['zgLZc'](_0x5a76f4,'clear'))return![];const _0x26583a=_0x21400c['pxFcs'](loadCache),_0x6c8bff=_0x26583a['lastEnabledSessionClearedAt'];if(!_0x6c8bff)return![];const _0x37326e=_0x21400c['RsCPH'](Date['now'](),_0x6c8bff);return _0x21400c['AkHOg'](_0x37326e,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x4757de){const _0x174f3c=_0x157323,_0x218015={'lXJod':function(_0x18f72a){return _0x18f72a();},'AlSEh':function(_0x3afeac,_0x4a0bea){return _0x3afeac(_0x4a0bea);}},_0x569eac=loadCache(),_0x1bf6ef=getOrCreateSession(_0x569eac,_0x4757de);_0x1bf6ef[_0x174f3c(0x16a)]=!![];const _0xd9116c=_0x218015['lXJod'](getCurrentBranch);_0xd9116c&&_0xd9116c!==_0x174f3c(0x190)&&_0xd9116c!==_0x174f3c(0x191)&&(_0x1bf6ef[_0x174f3c(0x166)]=_0xd9116c),delete _0x569eac['lastEnabledSessionClearedAt'],_0x218015['AlSEh'](saveCache,_0x569eac);}export function registerSession(_0xc39a1e,_0x37430c){const _0x2e011e=_0x157323,_0x5b1462=loadCache(),_0x1894f7=getOrCreateSession(_0x5b1462,_0xc39a1e);_0x1894f7[_0x2e011e(0x18a)]=_0x37430c,_0x1894f7['registeredAt']=new Date()['toISOString'](),saveCache(_0x5b1462);}export function getSessionEntry(_0x2d254c){const _0x500184=_0x157323,_0x52d32f=loadCache(),_0x48c7e9=_0x52d32f['sessions'][_0x2d254c];if(_0x48c7e9?.[_0x500184(0x18a)]&&_0x48c7e9?.['registeredAt'])return{'featureId':_0x48c7e9['featureId'],'registeredAt':_0x48c7e9[_0x500184(0x164)]};return null;}export function unregisterSession(_0x22a35){const _0x31c87d=_0x157323,_0x9b7100={'AaUDz':function(_0x50c379){return _0x50c379();},'MFQPP':function(_0xc27c16,_0xd97420){return _0xc27c16(_0xd97420);}},_0x4ad644=_0x9b7100[_0x31c87d(0x172)](loadCache),_0x259f47=_0x4ad644[_0x31c87d(0x185)][_0x22a35];_0x259f47&&(delete _0x259f47[_0x31c87d(0x18a)],delete _0x259f47[_0x31c87d(0x164)],_0x9b7100[_0x31c87d(0x163)](saveCache,_0x4ad644));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x5cf045){const _0x150f6c=_0x157323,_0x33476b=loadCache(),_0x26daf2=getOrCreateSession(_0x33476b,_0x5cf045),_0x418821=_0x26daf2[_0x150f6c(0x18c)]||0x0,_0x28efbc=Date['now']();if(_0x28efbc-_0x418821>=PLAN_REMINDER_INTERVAL_MS)return _0x26daf2['lastPlanReminderAt']=_0x28efbc,saveCache(_0x33476b),!![];return![];}export function shouldShowStopReminder(_0x5ee7fd){const _0x4fb446=_0x157323,_0x48004d={'usnTa':function(_0xc1e4ac,_0x46cce3){return _0xc1e4ac>=_0x46cce3;},'EQLOb':function(_0x35b65a,_0x2bc5bf){return _0x35b65a-_0x2bc5bf;}},_0x18b127=loadCache(),_0x526e3b=getOrCreateSession(_0x18b127,_0x5ee7fd),_0x4ce3b1=_0x526e3b[_0x4fb446(0x18f)]||0x0,_0x176c58=Date[_0x4fb446(0x181)]();if(_0x48004d['usnTa'](_0x48004d['EQLOb'](_0x176c58,_0x4ce3b1),STOP_REMINDER_INTERVAL_MS))return _0x526e3b[_0x4fb446(0x18f)]=_0x176c58,saveCache(_0x18b127),!![];return![];}export function hasSessionBeenPrompted(_0x4efe1a){const _0x2b375d=_0x157323,_0x328377={'OiVOz':function(_0xe70c23,_0x3659de){return _0xe70c23===_0x3659de;}},_0x1740f1=loadCache();return _0x328377['OiVOz'](_0x1740f1[_0x2b375d(0x185)][_0x4efe1a]?.['prompted'],!![]);}export function markSessionPrompted(_0x3f8b1f){const _0x23eb8d=_0x157323,_0x2e99b2={'dzbXF':function(_0x2cb800){return _0x2cb800();},'xDVlM':function(_0x25e4fd,_0x3bf2fc,_0x3a96d8){return _0x25e4fd(_0x3bf2fc,_0x3a96d8);}},_0x54d7a3=_0x2e99b2['dzbXF'](loadCache),_0x23be21=_0x2e99b2[_0x23eb8d(0x177)](getOrCreateSession,_0x54d7a3,_0x3f8b1f);_0x23be21['prompted']=!![],saveCache(_0x54d7a3);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x1838c3=_0x22fc;(function(_0x1d92e1,_0x567def){const _0x4229f8=_0x22fc,_0x1c92dd=_0x1d92e1();while(!![]){try{const _0x56457f=-parseInt(_0x4229f8(0x1d4))/0x1*(parseInt(_0x4229f8(0x1d8))/0x2)+-parseInt(_0x4229f8(0x1e5))/0x3+-parseInt(_0x4229f8(0x1d2))/0x4+-parseInt(_0x4229f8(0x1f0))/0x5*(parseInt(_0x4229f8(0x1df))/0x6)+parseInt(_0x4229f8(0x1db))/0x7*(-parseInt(_0x4229f8(0x1be))/0x8)+parseInt(_0x4229f8(0x1f6))/0x9+parseInt(_0x4229f8(0x1bf))/0xa;if(_0x56457f===_0x567def)break;else _0x1c92dd['push'](_0x1c92dd['shift']());}catch(_0x47b42e){_0x1c92dd['push'](_0x1c92dd['shift']());}}}(_0x3d7e,0xeac82));import*as _0x14eaaa from'fs';import*as _0x5d964d from'path';import*as _0x18a6e6 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x5d964d[_0x1838c3(0x1f9)](_0x18a6e6['homedir'](),_0x1838c3(0x1d6),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x2295fd=_0x1838c3,_0x14b4d2={'UfCdk':_0x2295fd(0x1cf),'iIHcZ':function(_0x55b881){return _0x55b881();}};try{if(_0x14eaaa[_0x2295fd(0x1ea)](CACHE_FILE)){const _0x336865=JSON['parse'](_0x14eaaa['readFileSync'](CACHE_FILE,_0x14b4d2[_0x2295fd(0x1c7)]));return{'version':0x3,'sessions':_0x336865['sessions']||{},'branches':_0x336865[_0x2295fd(0x1e6)]||{},'lastEnabledSessionClearedAt':_0x336865[_0x2295fd(0x1e7)]};}}catch{}return _0x14b4d2['iIHcZ'](createEmptyCache);}function saveCache(_0x3b3dae){const _0x5ec746=_0x1838c3;try{const _0x167f5c=_0x5d964d['dirname'](CACHE_FILE);!_0x14eaaa['existsSync'](_0x167f5c)&&_0x14eaaa[_0x5ec746(0x1e2)](_0x167f5c,{'recursive':!![]}),_0x14eaaa[_0x5ec746(0x1cc)](CACHE_FILE,JSON['stringify'](_0x3b3dae,null,0x2));}catch{}}export function getCurrentBranch(){const _0x562118=_0x1838c3,_0x1ffa0b={'TjzKd':function(_0x2b6ad9,_0x43ac09,_0x47357e){return _0x2b6ad9(_0x43ac09,_0x47357e);},'nxGTJ':_0x562118(0x1ca),'wWJWJ':'pipe','JreQl':function(_0x1f1981,_0x12fc17){return _0x1f1981===_0x12fc17;},'KRpxl':'HEAD'};try{const _0x4f25d8=_0x1ffa0b[_0x562118(0x1dc)](execSync,_0x1ffa0b[_0x562118(0x1c0)],{'encoding':_0x562118(0x1cf),'stdio':[_0x1ffa0b['wWJWJ'],_0x1ffa0b[_0x562118(0x1cb)],_0x1ffa0b['wWJWJ']]})['trim']();if(!_0x4f25d8||_0x1ffa0b['JreQl'](_0x4f25d8,_0x1ffa0b[_0x562118(0x1c2)]))return null;return _0x4f25d8;}catch{return null;}}export function enableBranch(_0x32a5de){const _0x58ab96=_0x1838c3,_0x1e73e2={'hgPpN':function(_0x10ed98){return _0x10ed98();}},_0xb559b7=_0x1e73e2[_0x58ab96(0x1ee)](loadCache);_0xb559b7['branches'][_0x32a5de]=!![],saveCache(_0xb559b7);}export function disableBranch(_0x591314){const _0x359ca8=_0x1838c3,_0x45515a={'iAdkt':function(_0x29fc77){return _0x29fc77();}},_0x345d3f=_0x45515a[_0x359ca8(0x1e8)](loadCache);delete _0x345d3f[_0x359ca8(0x1e6)][_0x591314],saveCache(_0x345d3f);}export function isBranchEnabled(_0x49c821){const _0x801644=_0x1838c3,_0x5d2ede={'cFCyn':function(_0x10fd82){return _0x10fd82();},'vulKT':function(_0x836125,_0x46d1ef){return _0x836125===_0x46d1ef;}},_0x2cc326=_0x5d2ede[_0x801644(0x1d7)](loadCache);return _0x5d2ede['vulKT'](_0x2cc326[_0x801644(0x1e6)][_0x49c821],!![]);}function getOrCreateSession(_0x321004,_0x5daf2d){const _0x576c97=_0x1838c3;return!_0x321004['sessions'][_0x5daf2d]&&(_0x321004[_0x576c97(0x1c3)][_0x5daf2d]={}),_0x321004[_0x576c97(0x1c3)][_0x5daf2d];}export function enableSession(_0x3e95cd){const _0x161a3b=_0x1838c3,_0xde133c={'zBneE':function(_0x470e29){return _0x470e29();},'LDpnw':function(_0x459c32,_0xeacd7a){return _0x459c32!==_0xeacd7a;},'zWQRi':_0x161a3b(0x1f5),'fMkvV':function(_0x27ba1b,_0x5cc52a){return _0x27ba1b(_0x5cc52a);}},_0x557a68=_0xde133c[_0x161a3b(0x1d0)](loadCache),_0x1f4795=getOrCreateSession(_0x557a68,_0x3e95cd);_0x1f4795['enabled']=!![];const _0xb7cfb8=getCurrentBranch();_0xb7cfb8&&_0xde133c[_0x161a3b(0x1d1)](_0xb7cfb8,_0xde133c[_0x161a3b(0x1c1)])&&_0xde133c['LDpnw'](_0xb7cfb8,_0x161a3b(0x1d9))&&(_0x557a68[_0x161a3b(0x1e6)][_0xb7cfb8]=!![],_0x1f4795[_0x161a3b(0x1d5)]=_0xb7cfb8),_0xde133c[_0x161a3b(0x1e4)](saveCache,_0x557a68);}function _0x22fc(_0x50b97b,_0x345fe9){_0x50b97b=_0x50b97b-0x1be;const _0x3d7e6f=_0x3d7e();let _0x22fcf8=_0x3d7e6f[_0x50b97b];return _0x22fcf8;}export function isSessionEnabled(_0x5d8cf2){const _0x41c3c9=_0x1838c3,_0x435f3c={'hkGTf':function(_0x1bf97e){return _0x1bf97e();},'wqvlR':function(_0xb50732,_0x4a8d3e){return _0xb50732===_0x4a8d3e;},'LiHHJ':_0x41c3c9(0x1f5),'hWuZc':function(_0x131013,_0x4abe8){return _0x131013===_0x4abe8;}},_0x1c6754=_0x435f3c[_0x41c3c9(0x1d3)](loadCache),_0x33e47e=getCurrentBranch();if(!_0x33e47e||_0x435f3c['wqvlR'](_0x33e47e,_0x435f3c[_0x41c3c9(0x1e9)])||_0x33e47e==='master')return _0x1c6754[_0x41c3c9(0x1c3)][_0x5d8cf2]?.['enabled']===!![];const _0x3fb4ad=_0x435f3c['hWuZc'](_0x1c6754['branches'][_0x33e47e],!![]),_0x1a229f=_0x1c6754[_0x41c3c9(0x1c3)][_0x5d8cf2]?.['enabled']===!![];return _0x3fb4ad||_0x1a229f;}export function disableSession(_0x4492a4){const _0x28b062={'Ckmar':function(_0x1807b6,_0x22e366){return _0x1807b6(_0x22e366);}},_0x1cc459=loadCache(),_0x19f45a=getOrCreateSession(_0x1cc459,_0x4492a4);_0x19f45a['enabled']=![],_0x28b062['Ckmar'](saveCache,_0x1cc459);}export function updateBranchTracking(_0x44ffc8){const _0x2f3094=_0x1838c3,_0x24cf5a={'xyrLg':function(_0x3609dd){return _0x3609dd();},'AxNlm':function(_0x18cc7e,_0x18cfec){return _0x18cc7e===_0x18cfec;},'YhOgn':'master','uRBRR':function(_0x2e0bb7,_0x5958a2){return _0x2e0bb7!==_0x5958a2;}},_0x193cdf=loadCache(),_0x4c97f9=_0x193cdf['sessions'][_0x44ffc8];if(!_0x4c97f9?.['enabled'])return;const _0x16ea32=_0x24cf5a[_0x2f3094(0x1eb)](getCurrentBranch);if(!_0x16ea32||_0x24cf5a['AxNlm'](_0x16ea32,'main')||_0x16ea32===_0x24cf5a[_0x2f3094(0x1c6)])return;_0x24cf5a['uRBRR'](_0x4c97f9[_0x2f3094(0x1d5)],_0x16ea32)&&(_0x193cdf[_0x2f3094(0x1e6)][_0x16ea32]=!![],_0x4c97f9[_0x2f3094(0x1d5)]=_0x16ea32,saveCache(_0x193cdf));}export function initBranchTracking(_0x290666){const _0x4d7cc9=_0x1838c3,_0xe594d2={'srAYB':function(_0x28233b){return _0x28233b();},'BvHvN':function(_0x2a4b42,_0x2ee5b2){return _0x2a4b42(_0x2ee5b2);}},_0x2877c7=loadCache(),_0x135e1a=_0xe594d2['srAYB'](getCurrentBranch);if(!_0x135e1a||_0x135e1a==='main'||_0x135e1a===_0x4d7cc9(0x1d9))return;if(_0x2877c7[_0x4d7cc9(0x1e6)][_0x135e1a]===!![]){const _0x54fc2e=getOrCreateSession(_0x2877c7,_0x290666);_0x54fc2e['enabled']=!![],_0x54fc2e['currentBranch']=_0x135e1a,_0xe594d2[_0x4d7cc9(0x1c5)](saveCache,_0x2877c7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x862606){const _0x3812bc=_0x1838c3,_0x595e7d=loadCache(),_0x57072a=_0x595e7d['sessions'][_0x862606];_0x57072a?.['enabled']&&(_0x595e7d[_0x3812bc(0x1e7)]=Date[_0x3812bc(0x1dd)](),saveCache(_0x595e7d));}export function shouldAutoEnableAfterClear(_0x53362b){const _0x43dac4=_0x1838c3,_0x227321={'VaolJ':function(_0xcafe7b,_0x4e4b78){return _0xcafe7b!==_0x4e4b78;},'ICdoV':function(_0x2a6d35,_0x2d4318){return _0x2a6d35-_0x2d4318;},'oyChn':function(_0x10466f,_0x574755){return _0x10466f<=_0x574755;}};if(_0x227321['VaolJ'](_0x53362b,_0x43dac4(0x1ef)))return![];const _0x4de370=loadCache(),_0x5969a7=_0x4de370[_0x43dac4(0x1e7)];if(!_0x5969a7)return![];const _0x417594=_0x227321[_0x43dac4(0x1f7)](Date[_0x43dac4(0x1dd)](),_0x5969a7);return _0x227321[_0x43dac4(0x1da)](_0x417594,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x5b67ad){const _0x2082b=_0x1838c3,_0x524352={'tjdhJ':function(_0x1ca34d,_0x3ad75b,_0x1fd401){return _0x1ca34d(_0x3ad75b,_0x1fd401);},'AiwSb':function(_0x13fcef){return _0x13fcef();},'hmkmn':function(_0x1caf38,_0x3b60d4){return _0x1caf38!==_0x3b60d4;},'dlDQK':_0x2082b(0x1d9)},_0x43d7fa=loadCache(),_0x447654=_0x524352['tjdhJ'](getOrCreateSession,_0x43d7fa,_0x5b67ad);_0x447654[_0x2082b(0x1e0)]=!![];const _0x31f2ac=_0x524352[_0x2082b(0x1c9)](getCurrentBranch);_0x31f2ac&&_0x524352[_0x2082b(0x1e1)](_0x31f2ac,_0x2082b(0x1f5))&&_0x524352['hmkmn'](_0x31f2ac,_0x524352['dlDQK'])&&(_0x447654[_0x2082b(0x1d5)]=_0x31f2ac),delete _0x43d7fa['lastEnabledSessionClearedAt'],saveCache(_0x43d7fa);}export function registerSession(_0x28a9d6,_0x15d429){const _0x4afd1a=_0x1838c3,_0x379951={'ofEvQ':function(_0x349e93,_0x2bb14e,_0x34c854){return _0x349e93(_0x2bb14e,_0x34c854);},'DIuHp':function(_0x3019f3,_0x325e6e){return _0x3019f3(_0x325e6e);}},_0x3a879d=loadCache(),_0x3b769f=_0x379951['ofEvQ'](getOrCreateSession,_0x3a879d,_0x28a9d6);_0x3b769f[_0x4afd1a(0x1c8)]=_0x15d429,_0x3b769f['registeredAt']=new Date()[_0x4afd1a(0x1f4)](),_0x379951['DIuHp'](saveCache,_0x3a879d);}export function getSessionEntry(_0x111561){const _0x4daef4=_0x1838c3,_0x3eb76d={'PiqYH':function(_0x21ac25){return _0x21ac25();}},_0x4eaefd=_0x3eb76d['PiqYH'](loadCache),_0x351383=_0x4eaefd['sessions'][_0x111561];if(_0x351383?.[_0x4daef4(0x1c8)]&&_0x351383?.['registeredAt'])return{'featureId':_0x351383[_0x4daef4(0x1c8)],'registeredAt':_0x351383[_0x4daef4(0x1e3)]};return null;}export function unregisterSession(_0x58396f){const _0x3b4543=_0x1838c3,_0x91ebce={'aoHvM':function(_0x47bcdc){return _0x47bcdc();},'MZEPB':function(_0x207133,_0x3cbc81){return _0x207133(_0x3cbc81);}},_0xd6c34b=_0x91ebce[_0x3b4543(0x1c4)](loadCache),_0x2b5b01=_0xd6c34b['sessions'][_0x58396f];_0x2b5b01&&(delete _0x2b5b01[_0x3b4543(0x1c8)],delete _0x2b5b01['registeredAt'],_0x91ebce['MZEPB'](saveCache,_0xd6c34b));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x7037a5){const _0x1b1c86=_0x1838c3,_0x28e471={'tduQz':function(_0xcb5412){return _0xcb5412();},'urXCN':function(_0x1bcbdf,_0x3508a0,_0x1a7cbe){return _0x1bcbdf(_0x3508a0,_0x1a7cbe);},'pxNjq':function(_0x115183,_0x423cd2){return _0x115183-_0x423cd2;},'IWNKl':function(_0x240df7,_0x5a3cce){return _0x240df7(_0x5a3cce);}},_0x5d7dfa=_0x28e471['tduQz'](loadCache),_0x2abb4c=_0x28e471[_0x1b1c86(0x1ed)](getOrCreateSession,_0x5d7dfa,_0x7037a5),_0x353cd0=_0x2abb4c['lastPlanReminderAt']||0x0,_0x3aca05=Date[_0x1b1c86(0x1dd)]();if(_0x28e471['pxNjq'](_0x3aca05,_0x353cd0)>=PLAN_REMINDER_INTERVAL_MS)return _0x2abb4c[_0x1b1c86(0x1f2)]=_0x3aca05,_0x28e471[_0x1b1c86(0x1de)](saveCache,_0x5d7dfa),!![];return![];}export function shouldShowStopReminder(_0x51fc15){const _0x3efcc8=_0x1838c3,_0x434adb={'iXJEu':function(_0x38e5c9,_0x1d7a46){return _0x38e5c9>=_0x1d7a46;}},_0x53e569=loadCache(),_0x1c47a5=getOrCreateSession(_0x53e569,_0x51fc15),_0x3a269a=_0x1c47a5[_0x3efcc8(0x1cd)]||0x0,_0x28957a=Date['now']();if(_0x434adb[_0x3efcc8(0x1ce)](_0x28957a-_0x3a269a,STOP_REMINDER_INTERVAL_MS))return _0x1c47a5[_0x3efcc8(0x1cd)]=_0x28957a,saveCache(_0x53e569),!![];return![];}export function hasSessionBeenPrompted(_0x1127dd){const _0x498e3b=_0x1838c3,_0xc6d80c={'MyUGP':function(_0x2c5bd8){return _0x2c5bd8();},'iruqe':function(_0x4267d0,_0x554062){return _0x4267d0===_0x554062;}},_0x33aca1=_0xc6d80c['MyUGP'](loadCache);return _0xc6d80c[_0x498e3b(0x1f8)](_0x33aca1[_0x498e3b(0x1c3)][_0x1127dd]?.[_0x498e3b(0x1f3)],!![]);}function _0x3d7e(){const _0x3b84d9=['nxGTJ','zWQRi','KRpxl','sessions','aoHvM','BvHvN','YhOgn','UfCdk','featureId','AiwSb','git\x20rev-parse\x20--abbrev-ref\x20HEAD','wWJWJ','writeFileSync','lastStopReminderAt','iXJEu','utf-8','zBneE','LDpnw','3869112WUKMAX','hkGTf','2sQIaBH','currentBranch','.claude','cFCyn','1550126Nqqlhv','master','oyChn','259dleHSl','TjzKd','now','IWNKl','24qBbUWk','enabled','hmkmn','mkdirSync','registeredAt','fMkvV','3840678CAwkaq','branches','lastEnabledSessionClearedAt','iAdkt','LiHHJ','existsSync','xyrLg','BWqBl','urXCN','hgPpN','clear','182615lgiQGO','EXExi','lastPlanReminderAt','prompted','toISOString','main','6478254KWpRhD','ICdoV','iruqe','join','375616TrrFCB','59228060Gnoybj'];_0x3d7e=function(){return _0x3b84d9;};return _0x3d7e();}export function markSessionPrompted(_0x40e708){const _0x3dee80=_0x1838c3,_0xc8c3b0={'BWqBl':function(_0x3dbac0){return _0x3dbac0();},'EXExi':function(_0x359f7b,_0x18ef59){return _0x359f7b(_0x18ef59);}},_0x1a366b=_0xc8c3b0[_0x3dee80(0x1ec)](loadCache),_0x291f4d=getOrCreateSession(_0x1a366b,_0x40e708);_0x291f4d['prompted']=!![],_0xc8c3b0[_0x3dee80(0x1f1)](saveCache,_0x1a366b);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x272792=_0x5860;(function(_0x3330c5,_0x3b3568){const _0x3e814c=_0x5860,_0x65fc51=_0x3330c5();while(!![]){try{const _0x276161=parseInt(_0x3e814c(0x1fe))/0x1*(-parseInt(_0x3e814c(0x208))/0x2)+parseInt(_0x3e814c(0x212))/0x3*(parseInt(_0x3e814c(0x1ee))/0x4)+parseInt(_0x3e814c(0x247))/0x5*(-parseInt(_0x3e814c(0x23c))/0x6)+-parseInt(_0x3e814c(0x22c))/0x7+-parseInt(_0x3e814c(0x215))/0x8*(parseInt(_0x3e814c(0x1f4))/0x9)+-parseInt(_0x3e814c(0x23a))/0xa+parseInt(_0x3e814c(0x238))/0xb*(parseInt(_0x3e814c(0x205))/0xc);if(_0x276161===_0x3b3568)break;else _0x65fc51['push'](_0x65fc51['shift']());}catch(_0x45b094){_0x65fc51['push'](_0x65fc51['shift']());}}}(_0x1290,0x5b4d0));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(_0x97c3e3,_0x135e4b){const _0x51504e=_0x5860,_0x49f6d4={'dihRQ':function(_0x52bc8d,_0x10f54f,_0x43e3ac,_0x26c950){return _0x52bc8d(_0x10f54f,_0x43e3ac,_0x26c950);},'RTPCF':function(_0x24c1fa,_0x321847,_0x4498a3,_0xe16e0){return _0x24c1fa(_0x321847,_0x4498a3,_0xe16e0);},'ruOOR':function(_0x5b07b6,_0x41c3aa,_0x55ccdd){return _0x5b07b6(_0x41c3aa,_0x55ccdd);},'beZaH':function(_0x5af2ac,_0x3b3ef5){return _0x5af2ac(_0x3b3ef5);}},_0x3c21e9=_0x49f6d4[_0x51504e(0x1f0)](join,_0x135e4b,'ci',_0x97c3e3),_0x5d6159=_0x49f6d4['RTPCF'](join,_0x135e4b,'local',_0x97c3e3),_0x4b2d51=join(_0x135e4b,_0x97c3e3),_0x2d8c3e=join(_0x135e4b,'local'),_0x578583=_0x49f6d4['ruOOR'](join,_0x135e4b,'ci');if(_0x49f6d4['beZaH'](existsSync,_0x3c21e9))return _0x3c21e9;if(existsSync(_0x5d6159))return _0x5d6159;if(_0x49f6d4[_0x51504e(0x25b)](existsSync,_0x4b2d51)&&(_0x4b2d51!==_0x2d8c3e&&_0x4b2d51!==_0x578583?!![]:_0x49f6d4['beZaH'](hasLegacyProfileFiles,_0x4b2d51)))return _0x4b2d51;return null;}export function getEnvDir(_0x23e6f5,_0x4b4b18={}){const _0x674c71=_0x5860,_0x35af8e={'oYpNZ':function(_0x338dc6){return _0x338dc6();},'IFmpZ':function(_0x3e0ada,_0x4bd2b0){return _0x3e0ada(_0x4bd2b0);},'GOUJT':function(_0x578ff7,_0x2056a0,_0x2ea763){return _0x578ff7(_0x2056a0,_0x2ea763);},'WhbAT':function(_0x23d2c6,_0x28dc12,_0x5ea010,_0x14e756){return _0x23d2c6(_0x28dc12,_0x5ea010,_0x14e756);}},_0x529e6e=_0x35af8e['oYpNZ'](getRangerDir),_0x5d4346=findEnvInRoot(_0x23e6f5,_0x529e6e);if(_0x5d4346){if(_0x4b4b18['forWrite']&&isLegacyEnvPath(_0x5d4346))throw legacyWriteError(_0x23e6f5,_0x5d4346);return _0x5d4346;}const _0x28c09f=getRangerHomeDir();if(_0x28c09f!==_0x529e6e){const _0xd0a48d=findEnvInRoot(_0x23e6f5,_0x28c09f);if(_0xd0a48d){if(_0x4b4b18[_0x674c71(0x1f5)]&&_0x35af8e['IFmpZ'](isLegacyEnvPath,_0xd0a48d))throw _0x35af8e[_0x674c71(0x242)](legacyWriteError,_0x23e6f5,_0xd0a48d);return _0xd0a48d;}}const _0x2a4771=_0x35af8e[_0x674c71(0x234)](join,_0x28c09f,_0x674c71(0x26c),_0x23e6f5);if(_0x4b4b18[_0x674c71(0x1f5)])throw legacyWriteError(_0x23e6f5,_0x2a4771);return _0x2a4771;}function isLegacyEnvPath(_0xdf81a7){const _0x4bee9a=_0x5860,_0x238af9={'czTTu':function(_0xa1f8cf){return _0xa1f8cf();},'Oxigo':function(_0x12489b,_0x1ca0a7){return _0x12489b+_0x1ca0a7;},'hmTql':function(_0x213b9e,_0x25510c){return _0x213b9e===_0x25510c;}},_0x4da2f8=getRangerDir(),_0x3c852c=_0x238af9['czTTu'](getRangerHomeDir);for(const _0x3b3638 of new Set([_0x4da2f8,_0x3c852c])){const _0x1e2f14=_0x3b3638['endsWith']('/')?_0x3b3638:_0x238af9[_0x4bee9a(0x237)](_0x3b3638,'/');if(_0x238af9[_0x4bee9a(0x1f1)](_0xdf81a7,_0x3b3638)||_0xdf81a7['startsWith'](_0x1e2f14))return!![];}return![];}function legacyWriteError(_0x17550a,_0x2132e0){const _0x2f3045=_0x5860,_0x45881f={'FhyKQ':function(_0x47ae82,_0x1612dc){return _0x47ae82+_0x1612dc;}};return new Error(_0x45881f[_0x2f3045(0x224)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x17550a+_0x2f3045(0x276)+_0x2132e0+'.\x0a'+_0x2f3045(0x25d)+_0x2f3045(0x271),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0xb97ab1,_0x5590c3){const _0x3cd264=_0x5860,_0x2c7321={'wmXQP':_0x3cd264(0x26c),'vxHbw':function(_0x204c0f,_0x31f80b,_0xefd1cb,_0x501cdb){return _0x204c0f(_0x31f80b,_0xefd1cb,_0x501cdb);},'kRvff':function(_0x5c47d0,_0x4ab952,_0x58824e){return _0x5c47d0(_0x4ab952,_0x58824e);},'OSHmp':function(_0x6ac519,_0x1e014b){return _0x6ac519===_0x1e014b;},'SkLat':function(_0x392be6,_0x299559){return _0x392be6===_0x299559;}},_0x13920c=_0x5590c3?.[_0x3cd264(0x22b)],_0x5ef49a=_0x13920c?[_0x13920c]:[getRangerDir(),getRangerHomeDir()][_0x3cd264(0x256)]((_0x47c031,_0x4f4f38,_0x4d82b9)=>_0x4d82b9[_0x3cd264(0x1fa)](_0x47c031)===_0x4f4f38),_0x34d916=_0x5590c3?.[_0x3cd264(0x25e)]??['ci',_0x2c7321['wmXQP'],'legacy'];for(const _0x4ebd92 of _0x5ef49a){const _0x2766e3=join(_0x4ebd92,_0x2c7321['wmXQP']),_0x293b31=join(_0x4ebd92,'ci'),_0x1aadf9=[{'location':'ci','path':join(_0x4ebd92,'ci',_0xb97ab1)},{'location':'local','path':_0x2c7321['vxHbw'](join,_0x4ebd92,_0x2c7321[_0x3cd264(0x201)],_0xb97ab1)},{'location':'legacy','path':_0x2c7321['kRvff'](join,_0x4ebd92,_0xb97ab1)}];for(const _0x45484d of _0x1aadf9){if(_0x34d916[_0x3cd264(0x244)](_0x45484d[_0x3cd264(0x21f)])&&existsSync(_0x45484d[_0x3cd264(0x22f)])){if(_0x45484d[_0x3cd264(0x21f)]===_0x3cd264(0x246)&&(_0x2c7321[_0x3cd264(0x209)](_0x45484d['path'],_0x2766e3)||_0x2c7321['SkLat'](_0x45484d['path'],_0x293b31))&&!hasLegacyProfileFiles(_0x45484d['path']))continue;return{'path':_0x45484d[_0x3cd264(0x22f)],'location':_0x45484d[_0x3cd264(0x21f)]};}}}return null;}function hasLegacyProfileFiles(_0x2e956b){const _0x4a92d1=_0x5860,_0x26bdd4={'NMQbZ':function(_0x16c1a4,_0x2d1470,_0x58c913){return _0x16c1a4(_0x2d1470,_0x58c913);},'whaKv':function(_0x528a83,_0x1c46b8,_0x2a1d19){return _0x528a83(_0x1c46b8,_0x2a1d19);},'ZCgCq':_0x4a92d1(0x1f8)};return existsSync(_0x26bdd4['NMQbZ'](join,_0x2e956b,_0x4a92d1(0x26e)))||existsSync(_0x26bdd4['whaKv'](join,_0x2e956b,_0x26bdd4[_0x4a92d1(0x24b)]))||existsSync(_0x26bdd4['NMQbZ'](join,_0x2e956b,'auth.json.enc'));}export function isEnvCi(_0x4bc77d){const _0x2591d3=_0x5860,_0x558998={'lBmsT':function(_0x593e27,_0x2104be){return _0x593e27!==_0x2104be;},'pALTc':function(_0x1961bb){return _0x1961bb();}};if(existsSync(join(getRangerDir(),'ci',_0x4bc77d)))return!![];const _0x21a0e8=getRangerHomeDir();if(_0x558998[_0x2591d3(0x269)](_0x21a0e8,_0x558998[_0x2591d3(0x20a)](getRangerDir))&&existsSync(join(_0x21a0e8,'ci',_0x4bc77d)))return!![];return![];}export async function cleanupTempFiles(_0x28c22b){const _0x1d4e44=_0x5860,_0x52f147={'lqFHS':function(_0x32e28c,_0x5382c1){return _0x32e28c!==_0x5382c1;},'VvAxG':_0x1d4e44(0x261)},_0xcef653=[_0x28c22b['tempAuthPath'],_0x28c22b['configPath']][_0x1d4e44(0x256)](Boolean);await Promise['all'](_0xcef653[_0x1d4e44(0x1ef)](_0xb11f38=>unlink(_0xb11f38)['catch'](_0xce77a9=>{const _0x12dfba=_0x1d4e44;_0x52f147['lqFHS'](_0xce77a9[_0x12dfba(0x257)],_0x52f147['VvAxG'])&&console['warn'](_0x12dfba(0x279)+_0xb11f38+':',_0xce77a9['message']);})));}export function getSettingsPath(_0x4587fc){const _0x234ab1=_0x5860;return join(getEnvDir(_0x4587fc),_0x234ab1(0x26e));}export async function loadSettings(_0x5e0377){const _0x401673=_0x5860,_0x36c670={'zUdoq':function(_0x299f0e,_0x1ad83b){return _0x299f0e(_0x1ad83b);},'BTvET':function(_0x576e49,_0x4285e8,_0x378c83){return _0x576e49(_0x4285e8,_0x378c83);}},_0x1b59dc=_0x36c670[_0x401673(0x230)](getSettingsPath,_0x5e0377);if(!_0x36c670['zUdoq'](existsSync,_0x1b59dc))return{};try{const _0x1e4dc3=await _0x36c670['BTvET'](readFile,_0x1b59dc,'utf-8');return JSON[_0x401673(0x22e)](_0x1e4dc3);}catch{return{};}}export async function saveSettings(_0x2ec0bd,_0xfeee77){const _0x2ed1be=_0x5860,_0x235e34={'toKLD':function(_0x34df16,_0x5b0920){return _0x34df16(_0x5b0920);}},_0x5add83=_0x235e34['toKLD'](getSettingsPath,_0x2ec0bd),_0xa35fa4=_0x235e34['toKLD'](dirname,_0x5add83);!_0x235e34[_0x2ed1be(0x210)](existsSync,_0xa35fa4)&&await mkdir(_0xa35fa4,{'recursive':!![]}),await writeFile(_0x5add83,JSON['stringify'](_0xfeee77,null,0x2));}export function resolveEnvVars(_0x155903){const _0x299636=_0x5860,_0x1e0f0f={'KKseB':function(_0x280f47,_0x5d6685){return _0x280f47===_0x5d6685;},'rssTH':'string'};if(_0x1e0f0f[_0x299636(0x260)](typeof _0x155903,_0x1e0f0f[_0x299636(0x1f7)]))return _0x155903[_0x299636(0x248)](/\$\{(\w+)\}/g,(_0x3bd57e,_0x10c78a)=>{const _0xb4a8b3=_0x299636,_0x1231e8=process[_0xb4a8b3(0x21b)][_0x10c78a];if(_0x1231e8===undefined)throw new Error(_0xb4a8b3(0x26a)+_0x10c78a+_0xb4a8b3(0x1ff));return _0x1231e8;});if(Array[_0x299636(0x273)](_0x155903))return _0x155903[_0x299636(0x1ef)](resolveEnvVars);if(_0x155903&&_0x1e0f0f['KKseB'](typeof _0x155903,_0x299636(0x26f)))return Object['fromEntries'](Object[_0x299636(0x20b)](_0x155903)['map'](([_0x81902a,_0x26acdf])=>[_0x81902a,resolveEnvVars(_0x26acdf)]));return _0x155903;}const isRecord=_0x14029f=>typeof _0x14029f===_0x272792(0x26f)&&_0x14029f!==null&&!Array[_0x272792(0x273)](_0x14029f),asRecord=_0x248506=>isRecord(_0x248506)?_0x248506:undefined,mergeHeaders=(_0x1b1d9e,_0xa62139)=>{const _0x4bc8ba=_0x272792,_0x6a5ef4={'fRZlI':function(_0x16514a,_0x430fa2){return _0x16514a??_0x430fa2;}},_0x453a0f={..._0x6a5ef4[_0x4bc8ba(0x20e)](_0x1b1d9e,{}),..._0xa62139??{}};return Object[_0x4bc8ba(0x1fb)](_0x453a0f)[_0x4bc8ba(0x23f)]?_0x453a0f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x272792(0x270),'--allow-running-insecure-content',_0x272792(0x231),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x1b6c95,_0x350ecf={}){const _0x28068d=_0x272792,_0xcc4c6b={'XwFHt':function(_0x2d9828,_0x4f0b3b){return _0x2d9828(_0x4f0b3b);},'rBKZG':function(_0x5d513b,_0x5d6ca6){return _0x5d513b===_0x5d6ca6;},'GYxlf':'string','mDZRX':function(_0x556b35,_0x1d91fd,_0x23fef6){return _0x556b35(_0x1d91fd,_0x23fef6);},'JgGla':function(_0x188d66,_0x3918d3){return _0x188d66(_0x3918d3);}},_0xb3a2be=asRecord(_0x1b6c95[_0x28068d(0x24a)]),_0x5c0d83={..._0xcc4c6b[_0x28068d(0x227)](asRecord,_0xb3a2be?.['launchOptions'])??{}};_0xcc4c6b['rBKZG'](typeof _0x350ecf[_0x28068d(0x235)],'boolean')&&(_0x5c0d83[_0x28068d(0x235)]=_0x350ecf['headless']);if(_0x1b6c95['safeMode']){const _0x7e12a6=_0x5c0d83['args']??[],_0x2c9eab=SAFE_MODE_ARGS[_0x28068d(0x256)](_0x25d05d=>!_0x7e12a6['includes'](_0x25d05d));_0x5c0d83[_0x28068d(0x221)]=[..._0x7e12a6,..._0x2c9eab];}if(_0x1b6c95[_0x28068d(0x268)]){const _0x1a1168=_0x5c0d83[_0x28068d(0x221)]??[],_0x11ac81=ALLOW_LOCALHOST_ARGS[_0x28068d(0x256)](_0x2758e6=>!_0x1a1168[_0x28068d(0x244)](_0x2758e6));_0x5c0d83[_0x28068d(0x221)]=[..._0x1a1168,..._0x11ac81];}const _0x3051ad={...asRecord(_0xb3a2be?.[_0x28068d(0x1f2)])??{}};_0x3051ad[_0x28068d(0x200)]=!![];_0xcc4c6b['rBKZG'](typeof _0x1b6c95['userAgent'],_0xcc4c6b[_0x28068d(0x265)])&&(_0x3051ad['userAgent']=_0x1b6c95['userAgent']);const _0xe3e745=_0xcc4c6b['mDZRX'](mergeHeaders,_0xcc4c6b['XwFHt'](asRecord,_0x3051ad['extraHTTPHeaders']),_0xcc4c6b[_0x28068d(0x251)](asRecord,_0x1b6c95[_0x28068d(0x219)]));return _0xe3e745?_0x3051ad['extraHTTPHeaders']=_0xe3e745:delete _0x3051ad[_0x28068d(0x274)],_0x350ecf['storageStatePath']&&(_0x3051ad['storageState']=_0x350ecf['storageStatePath']),{'launchOptions':_0x5c0d83,'contextOptions':_0x3051ad};}export async function resolveProfileStorageState(_0x94cfec){const _0x57155c={'qdGFG':function(_0x361ee8,_0xa2b565){return _0x361ee8(_0xa2b565);}};return _0x57155c['qdGFG'](resolveLocalAuthPath,getEnvDir(_0x94cfec));}function _0x5860(_0x17d1a3,_0x44f739){_0x17d1a3=_0x17d1a3-0x1ee;const _0x1290d9=_0x1290();let _0x5860a6=_0x1290d9[_0x17d1a3];return _0x5860a6;}async function resolveLocalAuthPath(_0xff4249){const _0x16284d=_0x272792,_0x313cae={'FvrVB':_0x16284d(0x277),'rknBr':function(_0x45f47b,_0x4ea013,_0x570151){return _0x45f47b(_0x4ea013,_0x570151);},'FQGlD':function(_0x53ae8d,_0x22560e){return _0x53ae8d(_0x22560e);}},_0x51293c=join(_0xff4249,_0x313cae[_0x16284d(0x20c)]),_0x14c6f6=join(_0xff4249,'auth.json');if(existsSync(_0x51293c))try{const _0x3b8141=await getToken();if(!_0x3b8141)throw new Error(_0x16284d(0x254));const _0x3f2ce2=await readFile(_0x51293c),_0x57b845=_0x313cae[_0x16284d(0x1f9)](decrypt,_0x3f2ce2,_0x3b8141),_0x59811e=join(tmpdir(),_0x16284d(0x236)+Date[_0x16284d(0x24f)]()+_0x16284d(0x216));return await _0x313cae['rknBr'](writeFile,_0x59811e,_0x57b845),{'storageStatePath':_0x59811e,'tempAuthPath':_0x59811e};}catch(_0xce4ab3){const _0x280243=_0xce4ab3 instanceof Error?_0xce4ab3[_0x16284d(0x253)]:String(_0xce4ab3);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x280243);}if(_0x313cae['FQGlD'](existsSync,_0x14c6f6))return{'storageStatePath':_0x14c6f6};return{};}export async function buildPlaywrightConfig(_0x3538e3,_0xb74cbd,_0x4b0d13,_0x52d09c,_0xdb331d){const _0x326b9c=_0x272792,_0x2faa9a={'oQVtP':function(_0x64e565,_0xcf14d8,_0x3c5d62,_0x2cb621,_0x2f7edd,_0x5e01f6,_0x1c395b){return _0x64e565(_0xcf14d8,_0x3c5d62,_0x2cb621,_0x2f7edd,_0x5e01f6,_0x1c395b);},'qWVaf':'stagehand','iZjSw':function(_0x246b5b,_0xc18c3e){return _0x246b5b(_0xc18c3e);},'RdHJK':function(_0xc6e3eb,_0x304137,_0x482354,_0x551172,_0x25fbe5,_0x5ec898,_0x2f22aa){return _0xc6e3eb(_0x304137,_0x482354,_0x551172,_0x25fbe5,_0x5ec898,_0x2f22aa);}};if(_0xdb331d)return _0x2faa9a[_0x326b9c(0x267)](buildPlaywrightConfigCore,_0x3538e3,_0xdb331d,_0xb74cbd,_0x4b0d13,_0x52d09c,_0x2faa9a[_0x326b9c(0x220)]);const {storageStatePath:_0x4d0bb1,tempAuthPath:_0x36dc27}=await _0x2faa9a['iZjSw'](resolveLocalAuthPath,getEnvDir(_0xb74cbd));try{const _0x4768b9=await _0x2faa9a[_0x326b9c(0x263)](buildPlaywrightConfigCore,_0x3538e3,_0x4d0bb1,_0xb74cbd,_0x4b0d13,_0x52d09c,_0x2faa9a[_0x326b9c(0x220)]);return{..._0x4768b9,'tempAuthPath':_0x36dc27};}catch(_0x11cf91){_0x36dc27&&await unlink(_0x36dc27)[_0x326b9c(0x202)](()=>{});throw _0x11cf91;}}function _0x1290(){const _0x29e3f3=['keys','VCaOI','OBHkc','115786HisNvN','\x20is\x20not\x20set','ignoreHTTPSErrors','wmXQP','catch','avuuC','EBkaD','12bIAqBm','stringify','BPTzj','4IiBzJe','OSHmp','pALTc','entries','FvrVB','adwpk','fRZlI','ihPkT','toKLD','userAgent','48terpSb','TTMhX','lochm','464456TgLshA','.json','NparI','KZPvr','headers','xexry','env','core','mYiUl','AqKXC','location','qWVaf','args','chromium','iZHMs','FhyKQ','xkuPP','clipboard-read','XwFHt','mlMnj','myvyI','fojZY','rangerDir','558670psjjKh','lfJTr','parse','path','zUdoq','--unsafely-treat-insecure-origin-as-secure=http://localhost','string','playwright-cli','WhbAT','headless','ranger-auth-','Oxigo','14620617tHyYFd','DODhM','3929210vwqnXh','gKiIK','918vmUGlK','RZdXc','setupHeaders','length','--no-sandbox','file','GOUJT','yOLRg','includes','none','legacy','10275mjBtXp','replace','cdpEndpoint','browser','ZCgCq','IwldF','zJzKq','ESOJH','now','--disable-setuid-sandbox','JgGla','WOfSQ','message','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','tIrIs','filter','code','hvBCT','vision','baseUrl','beZaH','mAAbO','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','locations','join','KKseB','ENOENT','jdkRH','RdHJK','nova-user-data','GYxlf','ranger-config','oQVtP','allowInsecureLocalhost','lBmsT','Environment\x20variable\x20','getuid','local','storageState','settings.json','object','--disable-web-security','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','FwGEA','isArray','extraHTTPHeaders','push','\x22\x20to\x20legacy\x20path\x20','auth.json.enc','KYzMX','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','88456byyHKW','map','dihRQ','hmTql','contextOptions','SntKF','45ZiHJnn','forWrite','-cli','rssTH','auth.json','rknBr','indexOf'];_0x1290=function(){return _0x29e3f3;};return _0x1290();}export async function buildPlaywrightConfigCore(_0x4786ee,_0x2d03ce,_0x292e3b,_0x5277c7,_0x236e71,_0x1611ae='stagehand'){const _0x1ccf6e=_0x272792,_0x177a2b={'fojZY':function(_0x1e231e,_0x187b95){return _0x1e231e===_0x187b95;},'BPTzj':_0x1ccf6e(0x250),'AqKXC':'chromium','JZANC':'clipboard-read','Iygdb':'clipboard-write','DODhM':function(_0x546b1e){return _0x546b1e();},'ihPkT':function(_0x44505d,_0x44d848,_0x17e937,_0x379170){return _0x44505d(_0x44d848,_0x17e937,_0x379170);},'mzTXq':function(_0x51a5a1){return _0x51a5a1();},'RWdSq':'sessions','avuuC':_0x1ccf6e(0x241),'rlwdC':'tabs','xexry':'install','YshfW':_0x1ccf6e(0x259),'lfJTr':function(_0x9e73eb,_0x5f1974,_0x2085a0){return _0x9e73eb(_0x5f1974,_0x2085a0);},'MmyWU':_0x1ccf6e(0x266),'RZdXc':function(_0xf46573,_0x490044,_0x28b545){return _0xf46573(_0x490044,_0x28b545);}},_0x1a82f6=_0x5277c7||_0x177a2b[_0x1ccf6e(0x239)](randomUUID),_0x5abb39=_0x177a2b[_0x1ccf6e(0x20f)](join,_0x177a2b['mzTXq'](getRangerDir),_0x177a2b['RWdSq'],_0x1a82f6),_0x4521a7=Boolean(_0x4786ee['cdpEndpoint']),_0x3c4b27=_0x4521a7?{'browserName':'chromium','cdpEndpoint':_0x4786ee[_0x1ccf6e(0x249)]}:((()=>{const _0x1609ed=_0x1ccf6e,{launchOptions:_0x5e2de3,contextOptions:_0x2838a5}=buildBrowserOptionsFromSettings(_0x4786ee,{'headless':_0x236e71?![]:_0x4786ee[_0x1609ed(0x235)]??!![],'storageStatePath':_0x2d03ce});if(_0x177a2b[_0x1609ed(0x22a)](process['getuid']?.(),0x0)){const _0x5a7205=['--no-sandbox',_0x177a2b[_0x1609ed(0x207)]],_0x13fd84=_0x5e2de3['args']??[],_0x581866=_0x5a7205[_0x1609ed(0x256)](_0x1908a3=>!_0x13fd84[_0x1609ed(0x244)](_0x1908a3));_0x5e2de3[_0x1609ed(0x221)]=[..._0x13fd84,..._0x581866];}return{'isolated':!![],'browserName':_0x177a2b[_0x1609ed(0x21e)],'launchOptions':_0x5e2de3,'contextOptions':{..._0x2838a5,'permissions':[_0x177a2b['JZANC'],_0x177a2b['Iygdb']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x867dfc=_0x177a2b[_0x1ccf6e(0x22a)](_0x1611ae,'playwright-cli')?{'browser':_0x3c4b27,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5abb39,'outputMode':_0x177a2b[_0x1ccf6e(0x203)],'codegen':_0x1ccf6e(0x245)}:{'name':_0x292e3b,'browser':_0x3c4b27,'capabilities':[_0x1ccf6e(0x21c),_0x177a2b['rlwdC'],_0x177a2b[_0x1ccf6e(0x21a)],'pdf',_0x177a2b['YshfW']],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5abb39};if(!_0x4521a7){const _0x399a1a=_0x867dfc['browser'],_0x2f1da8=_0x399a1a[_0x1ccf6e(0x1f2)];if(_0x2f1da8[_0x1ccf6e(0x211)]===undefined)delete _0x2f1da8['userAgent'];if(_0x2f1da8['storageState']===undefined)delete _0x2f1da8[_0x1ccf6e(0x26d)];}const _0x286a48=_0x177a2b[_0x1ccf6e(0x22d)](join,tmpdir(),_0x177a2b['MmyWU']);!existsSync(_0x286a48)&&await _0x177a2b[_0x1ccf6e(0x23d)](mkdir,_0x286a48,{'recursive':!![]});const _0x109b9f=_0x1611ae===_0x1ccf6e(0x233)?_0x1ccf6e(0x1f6):'',_0x2bc7a0=_0x177a2b[_0x1ccf6e(0x22d)](join,_0x286a48,_0x292e3b+'-'+Date['now']()+_0x109b9f+_0x1ccf6e(0x216));return await writeFile(_0x2bc7a0,JSON[_0x1ccf6e(0x206)](_0x867dfc,null,0x2)),{'configPath':_0x2bc7a0,'storageStatePath':_0x2d03ce};}export async function buildPlaywrightCliConfig(_0x4161be,_0x216943,_0x55d5b5,_0x493397,_0x3716d7){const _0x303b38=_0x272792,_0x6362a8={'RzgNR':function(_0x5d0d71,_0x22971d,_0x47261b,_0x11ef53,_0x3ee94c,_0x5ef258,_0x5cbe67){return _0x5d0d71(_0x22971d,_0x47261b,_0x11ef53,_0x3ee94c,_0x5ef258,_0x5cbe67);},'hvBCT':function(_0x2c4bdb,_0x6ac8b){return _0x2c4bdb(_0x6ac8b);},'WOfSQ':function(_0x5e2ecf,_0x241a38,_0x480d52,_0x1225ec,_0x343173,_0x1bc17f,_0x5e0a64){return _0x5e2ecf(_0x241a38,_0x480d52,_0x1225ec,_0x343173,_0x1bc17f,_0x5e0a64);},'FwGEA':'playwright-cli'};if(_0x3716d7)return _0x6362a8['RzgNR'](buildPlaywrightConfigCore,_0x4161be,_0x3716d7,_0x216943,_0x55d5b5,_0x493397,'playwright-cli');const {storageStatePath:_0x4b1387,tempAuthPath:_0x552978}=await resolveLocalAuthPath(_0x6362a8[_0x303b38(0x258)](getEnvDir,_0x216943));try{const _0x14fd21=await _0x6362a8[_0x303b38(0x252)](buildPlaywrightConfigCore,_0x4161be,_0x4b1387,_0x216943,_0x55d5b5,_0x493397,_0x6362a8[_0x303b38(0x272)]);return{..._0x14fd21,'tempAuthPath':_0x552978};}catch(_0x135c24){_0x552978&&await unlink(_0x552978)['catch'](()=>{});throw _0x135c24;}}export async function buildRangerwrightCliConfig(_0x39fb91,_0x51c0a3,_0x33d8ed,_0x5c55fb,_0x5515f7){const _0xff16dc=_0x272792,_0x471696={'NparI':function(_0x21a5e3,_0x55994c,_0x27babb){return _0x21a5e3(_0x55994c,_0x27babb);},'EBkaD':function(_0x16ceca,_0x57e7c6){return _0x16ceca===_0x57e7c6;},'ESOJH':_0xff16dc(0x222),'GpQWh':_0xff16dc(0x226),'KZPvr':function(_0x124bc7,_0x387c83,_0x1eb209,_0x251ed3){return _0x124bc7(_0x387c83,_0x1eb209,_0x251ed3);},'fKwfY':function(_0x323c53){return _0x323c53();},'myvyI':'sessions','xkuPP':function(_0x3c271b,_0x974120){return _0x3c271b(_0x974120);},'VCaOI':function(_0x3273a9,_0xb88775,_0xfabb38){return _0x3273a9(_0xb88775,_0xfabb38);}},{storageStatePath:_0x240877,tempAuthPath:_0xefb631}=_0x5515f7?{'storageStatePath':_0x5515f7,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x51c0a3)),_0x49de7b=_0x33d8ed||randomUUID(),_0x19773c=_0x471696[_0xff16dc(0x218)](join,_0x471696['fKwfY'](getRangerDir),_0x471696[_0xff16dc(0x229)],_0x49de7b),_0x341973=_0x471696[_0xff16dc(0x225)](Boolean,_0x39fb91['cdpEndpoint']),_0x2f6ea9=_0x341973?{'browserName':_0x471696[_0xff16dc(0x24e)],'cdpEndpoint':_0x39fb91['cdpEndpoint']}:((()=>{const _0x50e374=_0xff16dc,{launchOptions:_0x2d0a1a,contextOptions:_0x2fb441}=_0x471696[_0x50e374(0x217)](buildBrowserOptionsFromSettings,_0x39fb91,{'headless':_0x5c55fb?![]:_0x39fb91[_0x50e374(0x235)]??!![],'storageStatePath':_0x240877});if(_0x471696[_0x50e374(0x204)](process['getuid']?.(),0x0)){const _0x406fa7=['--no-sandbox',_0x50e374(0x250)],_0x1900de=_0x2d0a1a['args']??[],_0x4f7648=_0x406fa7['filter'](_0x4865af=>!_0x1900de[_0x50e374(0x244)](_0x4865af));_0x2d0a1a['args']=[..._0x1900de,..._0x4f7648];}return{'browserName':_0x471696['ESOJH'],'launchOptions':_0x2d0a1a,'contextOptions':{..._0x2fb441,'permissions':[_0x471696['GpQWh'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x341973){const _0xcb1baa=_0x2f6ea9['contextOptions'];if(_0xcb1baa){if(_0xcb1baa[_0xff16dc(0x211)]===undefined)delete _0xcb1baa[_0xff16dc(0x211)];if(_0xcb1baa['storageState']===undefined)delete _0xcb1baa['storageState'];}}const _0x193dd8={'browser':_0x2f6ea9,'outputDir':_0x19773c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5b37c8;try{const _0x4e3b52=_0x471696['VCaOI'](join,tmpdir(),_0xff16dc(0x266));!_0x471696['xkuPP'](existsSync,_0x4e3b52)&&await _0x471696[_0xff16dc(0x1fc)](mkdir,_0x4e3b52,{'recursive':!![]}),_0x5b37c8=_0x471696[_0xff16dc(0x1fc)](join,_0x4e3b52,_0x51c0a3+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x5b37c8,JSON[_0xff16dc(0x206)](_0x193dd8,null,0x2));}catch(_0x5a791c){_0xefb631&&await unlink(_0xefb631)['catch'](()=>{});throw _0x5a791c;}return{'configPath':_0x5b37c8,'storageStatePath':_0x240877,'tempAuthPath':_0xefb631,'outputDir':_0x19773c};}export async function buildNovaActCliConfig(_0x287f3c,_0x243824,_0x166625,_0x233ce9,_0x31172a){const _0x2431ea=_0x272792,_0x4cdb3e={'adwpk':function(_0x983a48,_0x52bb88){return _0x983a48(_0x52bb88);},'OBHkc':function(_0x110240,_0x5d5c7c){return _0x110240(_0x5d5c7c);},'mlMnj':function(_0x1fbdfd){return _0x1fbdfd();},'OpwyD':_0x2431ea(0x264),'zJzKq':function(_0x2b3529,_0x4c000f,_0x173dac){return _0x2b3529(_0x4c000f,_0x173dac);},'yOLRg':function(_0x4ac347,_0x4ea143){return _0x4ac347===_0x4ea143;},'WsfcS':_0x2431ea(0x240),'TTMhX':'--disable-setuid-sandbox','ThqcP':function(_0x4fafa2,_0x48b138){return _0x4fafa2===_0x48b138;},'mAAbO':'string','MEmOz':function(_0xf5f4c1,_0x29f4cf){return _0xf5f4c1(_0x29f4cf);}},{storageStatePath:_0x5ad0a6,tempAuthPath:_0x396dbf}=_0x31172a?{'storageStatePath':_0x31172a,'tempAuthPath':undefined}:await _0x4cdb3e[_0x2431ea(0x20d)](resolveLocalAuthPath,_0x4cdb3e[_0x2431ea(0x1fd)](getEnvDir,_0x243824)),_0xa11f3=_0x166625||randomUUID(),_0x57038d=join(_0x4cdb3e[_0x2431ea(0x228)](getRangerDir),'sessions',_0xa11f3),_0x2ad8f1=join(_0x57038d,_0x4cdb3e['OpwyD']),_0x2a0663=_0x5ad0a6?join(_0x2ad8f1,'Default'):undefined,{launchOptions:_0x579d78,contextOptions:_0xf3d426}=_0x4cdb3e[_0x2431ea(0x24d)](buildBrowserOptionsFromSettings,_0x287f3c,{'headless':_0x233ce9?![]:_0x287f3c['headless']??!![],'storageStatePath':_0x5ad0a6});if(_0x4cdb3e[_0x2431ea(0x243)](process[_0x2431ea(0x26b)]?.(),0x0)){const _0x3da234=[_0x4cdb3e['WsfcS'],_0x4cdb3e[_0x2431ea(0x213)]],_0x2a9c1e=_0x579d78[_0x2431ea(0x221)]??[],_0x7639f=_0x3da234['filter'](_0xdfc6f4=>!_0x2a9c1e[_0x2431ea(0x244)](_0xdfc6f4));_0x579d78['args']=[..._0x2a9c1e,..._0x7639f];}const _0x402fe3=_0x4cdb3e['ThqcP'](typeof _0x579d78['executablePath'],_0x4cdb3e['mAAbO'])?_0x579d78['executablePath']:_0x5ad0a6?chromium['executablePath']():undefined;return{'storageStatePath':_0x5ad0a6,'tempAuthPath':_0x396dbf,'baseUrl':_0x287f3c[_0x2431ea(0x25a)],'headless':Boolean(_0x579d78['headless']),'userDataDir':_0x2ad8f1,'browserProfilePath':_0x2a0663,'executablePath':_0x402fe3,'launchArgs':Array[_0x2431ea(0x273)](_0x579d78['args'])?_0x579d78[_0x2431ea(0x221)][_0x2431ea(0x256)](_0x1de683=>typeof _0x1de683===_0x2431ea(0x232)):[],'userAgent':typeof _0xf3d426[_0x2431ea(0x211)]===_0x4cdb3e[_0x2431ea(0x25c)]?_0xf3d426[_0x2431ea(0x211)]:undefined,'extraHTTPHeaders':_0xf3d426[_0x2431ea(0x274)],'allowInsecureLocalhost':_0x4cdb3e['MEmOz'](Boolean,_0x287f3c['allowInsecureLocalhost']),'safeMode':_0x4cdb3e['OBHkc'](Boolean,_0x287f3c['safeMode']),'cdpEndpoint':_0x287f3c[_0x2431ea(0x249)],'isCdpMode':Boolean(_0x287f3c['cdpEndpoint'])};}export function getNestedValue(_0x5957b5,_0x14ac00){const _0x4cb5c9=_0x272792,_0x6fbeda={'wAZJW':function(_0x34c23d,_0x4b81d3){return _0x34c23d!==_0x4b81d3;},'aTITX':_0x4cb5c9(0x26f)},_0x3b35eb=parseKeyPath(_0x14ac00);let _0x42c53e=_0x5957b5;for(const _0x26c9c5 of _0x3b35eb){if(_0x42c53e===null||_0x42c53e===undefined||_0x6fbeda['wAZJW'](typeof _0x42c53e,_0x6fbeda['aTITX']))return undefined;_0x42c53e=_0x42c53e[_0x26c9c5];}return _0x42c53e;}export function setNestedValue(_0x22a264,_0x31168d,_0x52cfa5){const _0x650f2d=_0x272792,_0x1a1412={'SNNUC':function(_0x128b46,_0x2e3ee6){return _0x128b46(_0x2e3ee6);},'iZHMs':function(_0x24a6c2,_0x4cab05){return _0x24a6c2 in _0x4cab05;},'jdkRH':function(_0x3679ca,_0x242330){return _0x3679ca!==_0x242330;}},_0x494d88=_0x1a1412['SNNUC'](parseKeyPath,_0x31168d);let _0x393b62=_0x22a264;for(let _0xa0eefb=0x0;_0xa0eefb<_0x494d88[_0x650f2d(0x23f)]-0x1;_0xa0eefb++){const _0x11f2d0=_0x494d88[_0xa0eefb];(!_0x1a1412[_0x650f2d(0x223)](_0x11f2d0,_0x393b62)||_0x1a1412[_0x650f2d(0x262)](typeof _0x393b62[_0x11f2d0],'object'))&&(_0x393b62[_0x11f2d0]={}),_0x393b62=_0x393b62[_0x11f2d0];}_0x393b62[_0x494d88[_0x494d88['length']-0x1]]=_0x52cfa5;}export function deleteNestedValue(_0x54ebd6,_0x4a8bab){const _0x5d7e19=_0x272792,_0x3bc2eb={'mYiUl':function(_0x125156,_0x26a6cd){return _0x125156<_0x26a6cd;},'KYzMX':function(_0x578acb,_0x4a3513){return _0x578acb-_0x4a3513;},'pedfk':function(_0x46911d,_0x42a09d){return _0x46911d!==_0x42a09d;},'SntKF':function(_0x11dea2,_0x6a3172){return _0x11dea2===_0x6a3172;},'gKiIK':function(_0x5d63ca,_0x15619f){return _0x5d63ca-_0x15619f;},'IwldF':function(_0x254359,_0x397cca){return _0x254359 in _0x397cca;}},_0xc175e9=parseKeyPath(_0x4a8bab);let _0x440b73=_0x54ebd6;for(let _0x1384bd=0x0;_0x3bc2eb[_0x5d7e19(0x21d)](_0x1384bd,_0x3bc2eb[_0x5d7e19(0x278)](_0xc175e9[_0x5d7e19(0x23f)],0x1));_0x1384bd++){if(_0x440b73===null||_0x440b73===undefined||_0x3bc2eb['pedfk'](typeof _0x440b73,'object'))return![];_0x440b73=_0x440b73[_0xc175e9[_0x1384bd]];}if(_0x3bc2eb[_0x5d7e19(0x1f3)](_0x440b73,null)||_0x440b73===undefined||typeof _0x440b73!=='object')return![];const _0x3e89bd=_0xc175e9[_0x3bc2eb[_0x5d7e19(0x23b)](_0xc175e9['length'],0x1)];if(_0x3bc2eb[_0x5d7e19(0x24c)](_0x3e89bd,_0x440b73))return delete _0x440b73[_0x3e89bd],!![];return![];}function parseKeyPath(_0x5ccd45){const _0x44b16f=_0x272792,_0xfb9ccd={'tIrIs':'header','ARkYC':'setupHeader'},_0x316af1=_0x5ccd45['split']('.');return _0x316af1[0x0]===_0xfb9ccd[_0x44b16f(0x255)]&&(_0x316af1[0x0]='headers'),_0x316af1[0x0]===_0xfb9ccd['ARkYC']&&(_0x316af1[0x0]=_0x44b16f(0x23e)),_0x316af1;}export function formatSettings(_0x127e26,_0x44fc6b=0x0){const _0x27490e=_0x272792,_0xcce30c={'zShBi':function(_0x326999,_0x3d3fd2){return _0x326999===_0x3d3fd2;},'lochm':_0x27490e(0x26f),'fynQh':function(_0x4c9946,_0x591a97){return _0x4c9946!==_0x591a97;}},_0xcc84ed=[],_0x88e55d='\x20\x20'['repeat'](_0x44fc6b);for(const [_0x2c80fe,_0x3c6ab7]of Object[_0x27490e(0x20b)](_0x127e26)){if(_0xcce30c['zShBi'](_0x3c6ab7,undefined))continue;if(_0xcce30c['zShBi'](typeof _0x3c6ab7,_0xcce30c[_0x27490e(0x214)])&&_0xcce30c['fynQh'](_0x3c6ab7,null)){_0xcc84ed[_0x27490e(0x275)](''+_0x88e55d+_0x2c80fe+':');for(const [_0x341e36,_0x301b6b]of Object[_0x27490e(0x20b)](_0x3c6ab7)){_0xcc84ed[_0x27490e(0x275)](_0x88e55d+'\x20\x20'+_0x341e36+':\x20'+_0x301b6b);}}else _0xcc84ed['push'](''+_0x88e55d+_0x2c80fe+':\x20'+_0x3c6ab7);}return _0xcc84ed[_0x27490e(0x25f)]('\x0a');}
|
|
1
|
+
const _0x1f0ad9=_0x47e9;(function(_0x35e1eb,_0x36c5c7){const _0x1ab00d=_0x47e9,_0x1ba2f5=_0x35e1eb();while(!![]){try{const _0x2cb6e8=-parseInt(_0x1ab00d(0x1e3))/0x1+parseInt(_0x1ab00d(0x1ee))/0x2+parseInt(_0x1ab00d(0x23c))/0x3*(parseInt(_0x1ab00d(0x1e7))/0x4)+parseInt(_0x1ab00d(0x1f6))/0x5*(-parseInt(_0x1ab00d(0x1fe))/0x6)+-parseInt(_0x1ab00d(0x1fb))/0x7+parseInt(_0x1ab00d(0x23d))/0x8+parseInt(_0x1ab00d(0x1f2))/0x9;if(_0x2cb6e8===_0x36c5c7)break;else _0x1ba2f5['push'](_0x1ba2f5['shift']());}catch(_0x256acc){_0x1ba2f5['push'](_0x1ba2f5['shift']());}}}(_0x3fd7,0xae509));import{readFile,writeFile,mkdir,unlink}from'fs/promises';function _0x3fd7(){const _0x2c04c1=['wdKTI','stNvu','OZmKf','chromium','fmdmn','bWSPn','legacy','all','string','QLaiQ','ENOENT','split','497827fOXAPR','repeat','.json','executablePath','4kOgeDb','EvtgJ','header','parse','KxKTH','filter','settings.json','1631378jcsaQm','IANpn','catch','join','12100509iQqEpX','pdf','gjDDQ','TkFME','5931110RMLTyi','aELBT','RaDCQ','hERmT','--disable-features=WebBluetooth','4562831FWvRwP','boolean','lxdoT','6cpFQdO','pNBDK','IQXtB','\x22\x20to\x20legacy\x20path\x20','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','storageState','iYUtl','forWrite','isArray','xXOTe','--no-sandbox','agAgz','userAgent','aSWLi','tWfuM','auth.json','Awqob','zlQVP','emQoT','dWfli','cdpEndpoint','XXfZD','--disable-web-security','keys','drYAL','XAWpQ','clipboard-write','cZExQ','LCKcT','emAUS','FGlsd','WktYv','ranger-config','safeMode','dHPMx','path','ignoreHTTPSErrors','map','efcYn','Failed\x20to\x20decrypt\x20auth\x20state:\x20','now','KqidD','--allow-insecure-localhost','--disable-setuid-sandbox','endsWith','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','OdCrt','-cli','DxaNB','amsxl','storageStatePath','baseUrl','extraHTTPHeaders','auth.json.enc','browser','getuid','setupHeaders','stagehand','contextOptions','KurYN','allow','qAilj','2225814oSgiJe','1181976TqBlSF','env','sessions','tOjoF','playwright-cli','dGxmx','args','length','object','fromEntries','--unsafely-treat-insecure-origin-as-secure=http://localhost','configPath','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','core','push','includes','headless','file','local','slwnW','entries'];_0x3fd7=function(){return _0x2c04c1;};return _0x3fd7();}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(_0x288e1f,_0xe51316){const _0x34a8a3=_0x47e9,_0x45304f={'ZboOC':function(_0x137a13,_0x4b2a8f,_0x55dbd5,_0x379a4e){return _0x137a13(_0x4b2a8f,_0x55dbd5,_0x379a4e);},'dWfli':function(_0x42ceb9,_0x4a0a4c,_0x5353a8){return _0x42ceb9(_0x4a0a4c,_0x5353a8);},'EvtgJ':function(_0x360b9d,_0x379607,_0x1b2693){return _0x360b9d(_0x379607,_0x1b2693);},'bWSPn':function(_0x4aea6a,_0x22a9a5){return _0x4aea6a(_0x22a9a5);},'RaDCQ':function(_0x51e20e,_0x17f46b){return _0x51e20e!==_0x17f46b;}},_0x16a03a=_0x45304f['ZboOC'](join,_0xe51316,'ci',_0x288e1f),_0x5ae453=join(_0xe51316,_0x34a8a3(0x24f),_0x288e1f),_0x19af9e=_0x45304f[_0x34a8a3(0x211)](join,_0xe51316,_0x288e1f),_0x48df19=join(_0xe51316,_0x34a8a3(0x24f)),_0x4b02c6=_0x45304f[_0x34a8a3(0x1e8)](join,_0xe51316,'ci');if(existsSync(_0x16a03a))return _0x16a03a;if(_0x45304f[_0x34a8a3(0x1dc)](existsSync,_0x5ae453))return _0x5ae453;if(existsSync(_0x19af9e)&&(_0x45304f[_0x34a8a3(0x1f8)](_0x19af9e,_0x48df19)&&_0x45304f[_0x34a8a3(0x1f8)](_0x19af9e,_0x4b02c6)?!![]:hasLegacyProfileFiles(_0x19af9e)))return _0x19af9e;return null;}export function getEnvDir(_0x1fabb7,_0x55233c={}){const _0x3b412a=_0x47e9,_0x3f0a63={'amsxl':function(_0x1e35e3,_0x4c7e1a,_0x2c773f){return _0x1e35e3(_0x4c7e1a,_0x2c773f);},'OdCrt':function(_0x50ada2,_0x434769){return _0x50ada2(_0x434769);},'huUGH':function(_0xeee981,_0x3c9d89,_0x5228df){return _0xeee981(_0x3c9d89,_0x5228df);},'bHIiO':function(_0x35ec3a,_0x35005a,_0x260464,_0x1464d2){return _0x35ec3a(_0x35005a,_0x260464,_0x1464d2);},'aELBT':_0x3b412a(0x24f)},_0x2bc379=getRangerDir(),_0x565b80=_0x3f0a63[_0x3b412a(0x22f)](findEnvInRoot,_0x1fabb7,_0x2bc379);if(_0x565b80){if(_0x55233c[_0x3b412a(0x205)]&&_0x3f0a63[_0x3b412a(0x22c)](isLegacyEnvPath,_0x565b80))throw _0x3f0a63['huUGH'](legacyWriteError,_0x1fabb7,_0x565b80);return _0x565b80;}const _0x46ac87=getRangerHomeDir();if(_0x46ac87!==_0x2bc379){const _0x8652e6=findEnvInRoot(_0x1fabb7,_0x46ac87);if(_0x8652e6){if(_0x55233c[_0x3b412a(0x205)]&&isLegacyEnvPath(_0x8652e6))throw legacyWriteError(_0x1fabb7,_0x8652e6);return _0x8652e6;}}const _0x167af0=_0x3f0a63['bHIiO'](join,_0x46ac87,_0x3f0a63[_0x3b412a(0x1f7)],_0x1fabb7);if(_0x55233c['forWrite'])throw legacyWriteError(_0x1fabb7,_0x167af0);return _0x167af0;}function isLegacyEnvPath(_0x3339cd){const _0x37209e=_0x47e9,_0xda6afb={'PxOMd':function(_0x1e662c){return _0x1e662c();},'NUDGP':function(_0x59b8a7,_0x49335f){return _0x59b8a7+_0x49335f;}},_0x372fbf=getRangerDir(),_0x7136f8=_0xda6afb['PxOMd'](getRangerHomeDir);for(const _0xbc997c of new Set([_0x372fbf,_0x7136f8])){const _0x2865a6=_0xbc997c[_0x37209e(0x22a)]('/')?_0xbc997c:_0xda6afb['NUDGP'](_0xbc997c,'/');if(_0x3339cd===_0xbc997c||_0x3339cd['startsWith'](_0x2865a6))return!![];}return![];}function legacyWriteError(_0xca273f,_0x49ab0c){const _0x422c02=_0x47e9,_0x510f87={'gjDDQ':function(_0x445bf5,_0xa6ea9d){return _0x445bf5+_0xa6ea9d;}};return new Error(_0x510f87[_0x422c02(0x1f4)](_0x510f87[_0x422c02(0x1f4)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0xca273f+_0x422c02(0x201)+_0x49ab0c+'.\x0a',_0x422c02(0x202))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a',_0x422c02(0x22b)));}export function findExistingEnv(_0x15580c,_0x2f3013){const _0x137366=_0x47e9,_0x2910f2={'OZmKf':_0x137366(0x1dd),'lxdoT':function(_0x5ef9cf,_0x2bae1a,_0x374882){return _0x5ef9cf(_0x2bae1a,_0x374882);},'wdKTI':function(_0x1d112a,_0x4616f9){return _0x1d112a(_0x4616f9);},'MBtId':function(_0x535cef,_0x2b5f96){return _0x535cef===_0x2b5f96;},'pDdUk':function(_0x2a9a09,_0x2e140a){return _0x2a9a09===_0x2e140a;}},_0x3c7b9b=_0x2f3013?.['rangerDir'],_0x57d7de=_0x3c7b9b?[_0x3c7b9b]:[getRangerDir(),getRangerHomeDir()][_0x137366(0x1ec)]((_0x182869,_0x8d2478,_0xe969b7)=>_0xe969b7['indexOf'](_0x182869)===_0x8d2478),_0x3952ca=_0x2f3013?.['locations']??['ci',_0x137366(0x24f),_0x2910f2[_0x137366(0x1d9)]];for(const _0x1f7b5b of _0x57d7de){const _0xc3c225=_0x2910f2[_0x137366(0x1fd)](join,_0x1f7b5b,_0x137366(0x24f)),_0x3fd1a3=join(_0x1f7b5b,'ci'),_0x64785=[{'location':'ci','path':join(_0x1f7b5b,'ci',_0x15580c)},{'location':'local','path':join(_0x1f7b5b,_0x137366(0x24f),_0x15580c)},{'location':_0x137366(0x1dd),'path':join(_0x1f7b5b,_0x15580c)}];for(const _0x488a66 of _0x64785){if(_0x3952ca[_0x137366(0x24c)](_0x488a66['location'])&&_0x2910f2[_0x137366(0x1d7)](existsSync,_0x488a66[_0x137366(0x221)])){if(_0x2910f2['MBtId'](_0x488a66['location'],_0x2910f2['OZmKf'])&&(_0x488a66[_0x137366(0x221)]===_0xc3c225||_0x2910f2['pDdUk'](_0x488a66[_0x137366(0x221)],_0x3fd1a3))&&!hasLegacyProfileFiles(_0x488a66[_0x137366(0x221)]))continue;return{'path':_0x488a66[_0x137366(0x221)],'location':_0x488a66['location']};}}}return null;}function hasLegacyProfileFiles(_0x3f6b69){const _0x190634=_0x47e9,_0x27e8f0={'QLaiQ':function(_0x20f0b4,_0x25c9bb){return _0x20f0b4(_0x25c9bb);}};return _0x27e8f0[_0x190634(0x1e0)](existsSync,join(_0x3f6b69,_0x190634(0x1ed)))||_0x27e8f0[_0x190634(0x1e0)](existsSync,join(_0x3f6b69,_0x190634(0x20d)))||_0x27e8f0['QLaiQ'](existsSync,join(_0x3f6b69,_0x190634(0x233)));}export function isEnvCi(_0xbe52ff){const _0x39ee24=_0x47e9,_0x269b04={'xXOTe':function(_0x2e1761,_0x1e7ba0,_0x5962f7,_0x1a1e53){return _0x2e1761(_0x1e7ba0,_0x5962f7,_0x1a1e53);},'qBHmN':function(_0x3f6419){return _0x3f6419();},'SAoqf':function(_0x2d30fd){return _0x2d30fd();},'Awqob':function(_0x106b86){return _0x106b86();},'QEefw':function(_0x11b09b,_0x41639e){return _0x11b09b(_0x41639e);},'hNXol':function(_0x4dd231,_0x3c5f13,_0x59f51c,_0x1adae6){return _0x4dd231(_0x3c5f13,_0x59f51c,_0x1adae6);}};if(existsSync(_0x269b04[_0x39ee24(0x207)](join,_0x269b04['qBHmN'](getRangerDir),'ci',_0xbe52ff)))return!![];const _0x2e53ba=_0x269b04['SAoqf'](getRangerHomeDir);if(_0x2e53ba!==_0x269b04[_0x39ee24(0x20e)](getRangerDir)&&_0x269b04['QEefw'](existsSync,_0x269b04['hNXol'](join,_0x2e53ba,'ci',_0xbe52ff)))return!![];return![];}export async function cleanupTempFiles(_0x40b047){const _0x3e13bc=_0x47e9,_0x4b3124={'uDBIe':function(_0x54f6f6,_0x450474){return _0x54f6f6!==_0x450474;}},_0x2c3eff=[_0x40b047['tempAuthPath'],_0x40b047[_0x3e13bc(0x248)]]['filter'](Boolean);await Promise[_0x3e13bc(0x1de)](_0x2c3eff['map'](_0xf4524d=>unlink(_0xf4524d)['catch'](_0x13845a=>{const _0x1bda06=_0x3e13bc;_0x4b3124['uDBIe'](_0x13845a['code'],_0x1bda06(0x1e1))&&console['warn'](_0x1bda06(0x249)+_0xf4524d+':',_0x13845a['message']);})));}export function getSettingsPath(_0x33c88f){const _0x49941a=_0x47e9;return join(getEnvDir(_0x33c88f),_0x49941a(0x1ed));}export async function loadSettings(_0xbfb6bb){const _0x11d144=_0x47e9,_0x1e9b61={'fmdmn':function(_0x1699b7,_0x164a7c){return _0x1699b7(_0x164a7c);},'XAWpQ':function(_0x144ec4,_0x48dbb4,_0x2aa754){return _0x144ec4(_0x48dbb4,_0x2aa754);},'AnWdm':'utf-8'},_0x2d69ea=getSettingsPath(_0xbfb6bb);if(!_0x1e9b61[_0x11d144(0x1db)](existsSync,_0x2d69ea))return{};try{const _0x2d0ddb=await _0x1e9b61[_0x11d144(0x217)](readFile,_0x2d69ea,_0x1e9b61['AnWdm']);return JSON[_0x11d144(0x1ea)](_0x2d0ddb);}catch{return{};}}export async function saveSettings(_0x1786f6,_0x436c00){const _0x1beda7=_0x47e9,_0x400f1f={'pNBDK':function(_0x3e9876,_0x33d405){return _0x3e9876(_0x33d405);},'dOHCb':function(_0x36e854,_0x1f61ba,_0x29bf2a){return _0x36e854(_0x1f61ba,_0x29bf2a);},'efcYn':function(_0x450cdc,_0x25256f,_0x25a032){return _0x450cdc(_0x25256f,_0x25a032);}},_0x2dc05a=getSettingsPath(_0x1786f6),_0x3a327b=_0x400f1f['pNBDK'](dirname,_0x2dc05a);!_0x400f1f[_0x1beda7(0x1ff)](existsSync,_0x3a327b)&&await _0x400f1f['dOHCb'](mkdir,_0x3a327b,{'recursive':!![]}),await _0x400f1f[_0x1beda7(0x224)](writeFile,_0x2dc05a,JSON['stringify'](_0x436c00,null,0x2));}export function resolveEnvVars(_0x493d9e){const _0x211eae=_0x47e9,_0x4173f1={'SXbdx':_0x211eae(0x1df)};if(typeof _0x493d9e===_0x4173f1['SXbdx'])return _0x493d9e['replace'](/\$\{(\w+)\}/g,(_0x2eee8f,_0x3f0df5)=>{const _0xe69beb=_0x211eae,_0xeed412=process[_0xe69beb(0x23e)][_0x3f0df5];if(_0xeed412===undefined)throw new Error('Environment\x20variable\x20'+_0x3f0df5+'\x20is\x20not\x20set');return _0xeed412;});if(Array[_0x211eae(0x206)](_0x493d9e))return _0x493d9e['map'](resolveEnvVars);if(_0x493d9e&&typeof _0x493d9e==='object')return Object[_0x211eae(0x246)](Object[_0x211eae(0x1d6)](_0x493d9e)[_0x211eae(0x223)](([_0x280bed,_0x594be0])=>[_0x280bed,resolveEnvVars(_0x594be0)]));return _0x493d9e;}const isRecord=_0x50347f=>typeof _0x50347f==='object'&&_0x50347f!==null&&!Array['isArray'](_0x50347f),asRecord=_0x2a950a=>isRecord(_0x2a950a)?_0x2a950a:undefined,mergeHeaders=(_0x473084,_0xdedd36)=>{const _0x3728c9=_0x47e9,_0x2200fe={'XXfZD':function(_0x550412,_0x210087){return _0x550412??_0x210087;}},_0x3b750b={..._0x2200fe[_0x3728c9(0x213)](_0x473084,{}),..._0xdedd36??{}};return Object[_0x3728c9(0x215)](_0x3b750b)[_0x3728c9(0x244)]?_0x3b750b:undefined;},SAFE_MODE_ARGS=[_0x1f0ad9(0x1fa)],ALLOW_LOCALHOST_ARGS=[_0x1f0ad9(0x214),'--allow-running-insecure-content',_0x1f0ad9(0x247),_0x1f0ad9(0x228)];function _0x47e9(_0x4b2059,_0x537a4d){_0x4b2059=_0x4b2059-0x1d5;const _0x3fd77f=_0x3fd7();let _0x47e921=_0x3fd77f[_0x4b2059];return _0x47e921;}export function buildBrowserOptionsFromSettings(_0x43f73b,_0x335172={}){const _0x696a4f=_0x1f0ad9,_0x7592c7={'vMCkn':function(_0x1f94ab,_0x520f08){return _0x1f94ab(_0x520f08);},'stNvu':function(_0x2122c6,_0x54ad52){return _0x2122c6===_0x54ad52;}},_0x10931f=_0x7592c7['vMCkn'](asRecord,_0x43f73b[_0x696a4f(0x234)]),_0x5da93b={...asRecord(_0x10931f?.['launchOptions'])??{}};typeof _0x335172['headless']===_0x696a4f(0x1fc)&&(_0x5da93b['headless']=_0x335172[_0x696a4f(0x24d)]);if(_0x43f73b[_0x696a4f(0x21f)]){const _0x357e88=_0x5da93b[_0x696a4f(0x243)]??[],_0xf21045=SAFE_MODE_ARGS[_0x696a4f(0x1ec)](_0x18e74d=>!_0x357e88[_0x696a4f(0x24c)](_0x18e74d));_0x5da93b[_0x696a4f(0x243)]=[..._0x357e88,..._0xf21045];}if(_0x43f73b['allowInsecureLocalhost']){const _0x24f9a7=_0x5da93b[_0x696a4f(0x243)]??[],_0x2016b9=ALLOW_LOCALHOST_ARGS['filter'](_0xfe98ca=>!_0x24f9a7[_0x696a4f(0x24c)](_0xfe98ca));_0x5da93b['args']=[..._0x24f9a7,..._0x2016b9];}const _0x378f40={...asRecord(_0x10931f?.['contextOptions'])??{}};_0x378f40[_0x696a4f(0x222)]=!![];_0x7592c7[_0x696a4f(0x1d8)](typeof _0x43f73b[_0x696a4f(0x20a)],_0x696a4f(0x1df))&&(_0x378f40['userAgent']=_0x43f73b['userAgent']);const _0x1d3976=mergeHeaders(_0x7592c7['vMCkn'](asRecord,_0x378f40[_0x696a4f(0x232)]),asRecord(_0x43f73b['headers']));return _0x1d3976?_0x378f40[_0x696a4f(0x232)]=_0x1d3976:delete _0x378f40['extraHTTPHeaders'],_0x335172[_0x696a4f(0x230)]&&(_0x378f40[_0x696a4f(0x203)]=_0x335172['storageStatePath']),{'launchOptions':_0x5da93b,'contextOptions':_0x378f40};}export async function resolveProfileStorageState(_0x7d817c){const _0x4e533b=_0x1f0ad9,_0x503bcd={'iYUtl':function(_0x562b16,_0x2e3cb1){return _0x562b16(_0x2e3cb1);}};return _0x503bcd[_0x4e533b(0x204)](resolveLocalAuthPath,getEnvDir(_0x7d817c));}async function resolveLocalAuthPath(_0x11c2dc){const _0x4cf39a=_0x1f0ad9,_0x2ea274={'KqidD':function(_0x331d88,_0x562a96,_0x2735a8){return _0x331d88(_0x562a96,_0x2735a8);},'slwnW':'auth.json','cZExQ':function(_0x47004d,_0x523c06){return _0x47004d(_0x523c06);},'LCKcT':function(_0x35f5d8,_0x5a19d4){return _0x35f5d8(_0x5a19d4);}},_0x107682=_0x2ea274[_0x4cf39a(0x227)](join,_0x11c2dc,_0x4cf39a(0x233)),_0x4cac6b=_0x2ea274[_0x4cf39a(0x227)](join,_0x11c2dc,_0x2ea274[_0x4cf39a(0x1d5)]);if(_0x2ea274[_0x4cf39a(0x219)](existsSync,_0x107682))try{const _0x1638b1=await getToken();if(!_0x1638b1)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2ec1db=await readFile(_0x107682),_0x13de5a=_0x2ea274['KqidD'](decrypt,_0x2ec1db,_0x1638b1),_0x24b965=join(tmpdir(),'ranger-auth-'+Date[_0x4cf39a(0x226)]()+_0x4cf39a(0x1e5));return await writeFile(_0x24b965,_0x13de5a),{'storageStatePath':_0x24b965,'tempAuthPath':_0x24b965};}catch(_0x3fe2cc){const _0x1c66c5=_0x3fe2cc instanceof Error?_0x3fe2cc['message']:_0x2ea274['cZExQ'](String,_0x3fe2cc);throw new Error(_0x4cf39a(0x225)+_0x1c66c5);}if(_0x2ea274[_0x4cf39a(0x21a)](existsSync,_0x4cac6b))return{'storageStatePath':_0x4cac6b};return{};}export async function buildPlaywrightConfig(_0x8975aa,_0x59d0ca,_0x1fb27c,_0x29e9cd,_0x22b882){const _0x930d82=_0x1f0ad9,_0x46c810={'FGlsd':function(_0x37876c,_0xe2f637,_0xb7dbb0,_0x12b71a,_0xe6606c,_0x4c6283,_0x2ad007){return _0x37876c(_0xe2f637,_0xb7dbb0,_0x12b71a,_0xe6606c,_0x4c6283,_0x2ad007);},'yVAZc':_0x930d82(0x237)};if(_0x22b882)return _0x46c810['FGlsd'](buildPlaywrightConfigCore,_0x8975aa,_0x22b882,_0x59d0ca,_0x1fb27c,_0x29e9cd,'stagehand');const {storageStatePath:_0x416344,tempAuthPath:_0x318e4b}=await resolveLocalAuthPath(getEnvDir(_0x59d0ca));try{const _0x26185d=await _0x46c810[_0x930d82(0x21c)](buildPlaywrightConfigCore,_0x8975aa,_0x416344,_0x59d0ca,_0x1fb27c,_0x29e9cd,_0x46c810['yVAZc']);return{..._0x26185d,'tempAuthPath':_0x318e4b};}catch(_0x5ea96a){_0x318e4b&&await unlink(_0x318e4b)['catch'](()=>{});throw _0x5ea96a;}}export async function buildPlaywrightConfigCore(_0x5e3d6f,_0xbf1747,_0xceb040,_0x12688a,_0x4ec2c2,_0x577bbe=_0x1f0ad9(0x237)){const _0x1ef01f=_0x1f0ad9,_0x5be85a={'WPSuz':_0x1ef01f(0x229),'WYAPS':_0x1ef01f(0x218),'WktYv':function(_0x208c15){return _0x208c15();},'jrBvx':_0x1ef01f(0x1da),'OfCYC':_0x1ef01f(0x24e),'IpDAK':'tabs','ZjRve':function(_0x30d002,_0x208906){return _0x30d002===_0x208906;},'DxaNB':function(_0x4d22e6,_0xf00d,_0x190e6f){return _0x4d22e6(_0xf00d,_0x190e6f);},'sxohG':'ranger-config','mPwNp':function(_0x4079ba,_0x33fb58){return _0x4079ba===_0x33fb58;}},_0x4f4d02=_0x12688a||randomUUID(),_0x52a8ad=join(_0x5be85a[_0x1ef01f(0x21d)](getRangerDir),'sessions',_0x4f4d02),_0x37f2b2=Boolean(_0x5e3d6f[_0x1ef01f(0x212)]),_0x2d27bc=_0x37f2b2?{'browserName':_0x5be85a['jrBvx'],'cdpEndpoint':_0x5e3d6f[_0x1ef01f(0x212)]}:((()=>{const _0x55028b=_0x1ef01f,{launchOptions:_0x107eca,contextOptions:_0x5ee926}=buildBrowserOptionsFromSettings(_0x5e3d6f,{'headless':_0x4ec2c2?![]:_0x5e3d6f[_0x55028b(0x24d)]??!![],'storageStatePath':_0xbf1747});if(process[_0x55028b(0x235)]?.()===0x0){const _0x3a13ca=[_0x55028b(0x208),_0x5be85a['WPSuz']],_0x259d5a=_0x107eca[_0x55028b(0x243)]??[],_0x5095bd=_0x3a13ca['filter'](_0x5cffb9=>!_0x259d5a['includes'](_0x5cffb9));_0x107eca['args']=[..._0x259d5a,..._0x5095bd];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x107eca,'contextOptions':{..._0x5ee926,'permissions':['clipboard-read',_0x5be85a['WYAPS']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3e51a1=_0x577bbe===_0x1ef01f(0x241)?{'browser':_0x2d27bc,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x52a8ad,'outputMode':_0x5be85a['OfCYC'],'codegen':'none'}:{'name':_0xceb040,'browser':_0x2d27bc,'capabilities':[_0x1ef01f(0x24a),_0x5be85a['IpDAK'],'install',_0x1ef01f(0x1f3),'vision'],'imageResponses':_0x1ef01f(0x23a),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x52a8ad};if(!_0x37f2b2){const _0x356def=_0x3e51a1['browser'],_0x24789e=_0x356def['contextOptions'];if(_0x5be85a['ZjRve'](_0x24789e[_0x1ef01f(0x20a)],undefined))delete _0x24789e['userAgent'];if(_0x24789e['storageState']===undefined)delete _0x24789e['storageState'];}const _0x517965=_0x5be85a[_0x1ef01f(0x22e)](join,_0x5be85a['WktYv'](tmpdir),_0x5be85a['sxohG']);!existsSync(_0x517965)&&await mkdir(_0x517965,{'recursive':!![]});const _0x3c1454=_0x5be85a['mPwNp'](_0x577bbe,_0x1ef01f(0x241))?_0x1ef01f(0x22d):'',_0x49b34b=join(_0x517965,_0xceb040+'-'+Date[_0x1ef01f(0x226)]()+_0x3c1454+_0x1ef01f(0x1e5));return await writeFile(_0x49b34b,JSON['stringify'](_0x3e51a1,null,0x2)),{'configPath':_0x49b34b,'storageStatePath':_0xbf1747};}export async function buildPlaywrightCliConfig(_0x27c095,_0x211b70,_0x175c6d,_0x4197ef,_0x400c85){const _0x524415=_0x1f0ad9,_0xe1332b={'rpWMr':function(_0x151621,_0x8be0d2){return _0x151621(_0x8be0d2);},'AWWgS':function(_0x2ce90d,_0x2a77d1,_0x4a8fec,_0x35c3a1,_0x497bf3,_0x350c12,_0x229210){return _0x2ce90d(_0x2a77d1,_0x4a8fec,_0x35c3a1,_0x497bf3,_0x350c12,_0x229210);}};if(_0x400c85)return buildPlaywrightConfigCore(_0x27c095,_0x400c85,_0x211b70,_0x175c6d,_0x4197ef,_0x524415(0x241));const {storageStatePath:_0x5adb63,tempAuthPath:_0x4d7e8b}=await resolveLocalAuthPath(_0xe1332b['rpWMr'](getEnvDir,_0x211b70));try{const _0x4aaced=await _0xe1332b['AWWgS'](buildPlaywrightConfigCore,_0x27c095,_0x5adb63,_0x211b70,_0x175c6d,_0x4197ef,'playwright-cli');return{..._0x4aaced,'tempAuthPath':_0x4d7e8b};}catch(_0x392e17){_0x4d7e8b&&await unlink(_0x4d7e8b)[_0x524415(0x1f0)](()=>{});throw _0x392e17;}}export async function buildRangerwrightCliConfig(_0x35bba7,_0x38c0fa,_0x1a36f6,_0x2a6e6f,_0x454925){const _0x22aef6=_0x1f0ad9,_0x3eabb4={'aSWLi':function(_0x426379,_0x50912e){return _0x426379===_0x50912e;},'RtLdt':'chromium','dWRqJ':'clipboard-read','tOjoF':function(_0xfd9148){return _0xfd9148();},'JVRkb':_0x22aef6(0x23f),'dDaYF':function(_0x2d7469,_0x6bfc21){return _0x2d7469(_0x6bfc21);},'dGxmx':function(_0x2f1d9b,_0x84f0fe,_0x225c56){return _0x2f1d9b(_0x84f0fe,_0x225c56);}},{storageStatePath:_0x257926,tempAuthPath:_0x312747}=_0x454925?{'storageStatePath':_0x454925,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x38c0fa)),_0x51ec57=_0x1a36f6||_0x3eabb4['tOjoF'](randomUUID),_0x53e73d=join(_0x3eabb4[_0x22aef6(0x240)](getRangerDir),_0x3eabb4['JVRkb'],_0x51ec57),_0x20791a=_0x3eabb4['dDaYF'](Boolean,_0x35bba7[_0x22aef6(0x212)]),_0x175d3a=_0x20791a?{'browserName':'chromium','cdpEndpoint':_0x35bba7['cdpEndpoint']}:((()=>{const _0x2702e4=_0x22aef6,{launchOptions:_0x2c4bf8,contextOptions:_0x20ace2}=buildBrowserOptionsFromSettings(_0x35bba7,{'headless':_0x2a6e6f?![]:_0x35bba7[_0x2702e4(0x24d)]??!![],'storageStatePath':_0x257926});if(_0x3eabb4[_0x2702e4(0x20b)](process['getuid']?.(),0x0)){const _0x3c8636=[_0x2702e4(0x208),'--disable-setuid-sandbox'],_0x1464f0=_0x2c4bf8[_0x2702e4(0x243)]??[],_0x5d2566=_0x3c8636['filter'](_0x1a80bf=>!_0x1464f0['includes'](_0x1a80bf));_0x2c4bf8[_0x2702e4(0x243)]=[..._0x1464f0,..._0x5d2566];}return{'browserName':_0x3eabb4['RtLdt'],'launchOptions':_0x2c4bf8,'contextOptions':{..._0x20ace2,'permissions':[_0x3eabb4['dWRqJ'],_0x2702e4(0x218)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x20791a){const _0x316e0c=_0x175d3a[_0x22aef6(0x238)];if(_0x316e0c){if(_0x3eabb4[_0x22aef6(0x20b)](_0x316e0c['userAgent'],undefined))delete _0x316e0c['userAgent'];if(_0x316e0c[_0x22aef6(0x203)]===undefined)delete _0x316e0c['storageState'];}}const _0x5677d8={'browser':_0x175d3a,'outputDir':_0x53e73d,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x1300b7;try{const _0x330a5d=_0x3eabb4[_0x22aef6(0x242)](join,_0x3eabb4['tOjoF'](tmpdir),_0x22aef6(0x21e));!existsSync(_0x330a5d)&&await mkdir(_0x330a5d,{'recursive':!![]}),_0x1300b7=join(_0x330a5d,_0x38c0fa+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x1300b7,JSON['stringify'](_0x5677d8,null,0x2));}catch(_0x88a602){_0x312747&&await unlink(_0x312747)['catch'](()=>{});throw _0x88a602;}return{'configPath':_0x1300b7,'storageStatePath':_0x257926,'tempAuthPath':_0x312747,'outputDir':_0x53e73d};}export async function buildNovaActCliConfig(_0x1e09e5,_0x4c6ccc,_0x484093,_0x3e2194,_0x795d8a){const _0x5709b2=_0x1f0ad9,_0x405018={'bxrtE':function(_0x5a0209,_0x2b8871){return _0x5a0209(_0x2b8871);},'egJbz':function(_0x58eaf2,_0x1d54f9){return _0x58eaf2(_0x1d54f9);},'kAkTp':function(_0x2d802a){return _0x2d802a();},'NLhIc':function(_0x30c7a1,_0x43db75,_0x5201d2,_0x191649){return _0x30c7a1(_0x43db75,_0x5201d2,_0x191649);},'dHPMx':'nova-user-data','qAilj':function(_0xc49d2,_0x38cb3c,_0x9827d){return _0xc49d2(_0x38cb3c,_0x9827d);},'TkFME':function(_0x1f4b0f,_0x52cc1f){return _0x1f4b0f===_0x52cc1f;},'tWfuM':_0x5709b2(0x1df),'KxKTH':function(_0x38aeb2,_0x4877f5){return _0x38aeb2===_0x4877f5;},'wzXrK':function(_0x2ac6ee,_0x113733){return _0x2ac6ee(_0x113733);}},{storageStatePath:_0xb41240,tempAuthPath:_0xd63b3d}=_0x795d8a?{'storageStatePath':_0x795d8a,'tempAuthPath':undefined}:await _0x405018['bxrtE'](resolveLocalAuthPath,_0x405018['egJbz'](getEnvDir,_0x4c6ccc)),_0x1c6e1a=_0x484093||_0x405018['kAkTp'](randomUUID),_0x2e21dc=_0x405018['NLhIc'](join,getRangerDir(),'sessions',_0x1c6e1a),_0x173e1b=join(_0x2e21dc,_0x405018[_0x5709b2(0x220)]),_0x42d318=_0xb41240?_0x405018[_0x5709b2(0x23b)](join,_0x173e1b,'Default'):undefined,{launchOptions:_0xa84ff0,contextOptions:_0x59fc5a}=buildBrowserOptionsFromSettings(_0x1e09e5,{'headless':_0x3e2194?![]:_0x1e09e5[_0x5709b2(0x24d)]??!![],'storageStatePath':_0xb41240});if(_0x405018[_0x5709b2(0x1f5)](process['getuid']?.(),0x0)){const _0x57b710=[_0x5709b2(0x208),'--disable-setuid-sandbox'],_0x344202=_0xa84ff0[_0x5709b2(0x243)]??[],_0x2fcc7c=_0x57b710['filter'](_0x38aef4=>!_0x344202['includes'](_0x38aef4));_0xa84ff0[_0x5709b2(0x243)]=[..._0x344202,..._0x2fcc7c];}const _0x1210c8=typeof _0xa84ff0[_0x5709b2(0x1e6)]===_0x405018[_0x5709b2(0x20c)]?_0xa84ff0['executablePath']:_0xb41240?chromium[_0x5709b2(0x1e6)]():undefined;return{'storageStatePath':_0xb41240,'tempAuthPath':_0xd63b3d,'baseUrl':_0x1e09e5[_0x5709b2(0x231)],'headless':Boolean(_0xa84ff0[_0x5709b2(0x24d)]),'userDataDir':_0x173e1b,'browserProfilePath':_0x42d318,'executablePath':_0x1210c8,'launchArgs':Array['isArray'](_0xa84ff0[_0x5709b2(0x243)])?_0xa84ff0['args']['filter'](_0x347df5=>typeof _0x347df5===_0x5709b2(0x1df)):[],'userAgent':_0x405018[_0x5709b2(0x1eb)](typeof _0x59fc5a[_0x5709b2(0x20a)],'string')?_0x59fc5a['userAgent']:undefined,'extraHTTPHeaders':_0x59fc5a[_0x5709b2(0x232)],'allowInsecureLocalhost':Boolean(_0x1e09e5['allowInsecureLocalhost']),'safeMode':_0x405018['wzXrK'](Boolean,_0x1e09e5['safeMode']),'cdpEndpoint':_0x1e09e5[_0x5709b2(0x212)],'isCdpMode':Boolean(_0x1e09e5['cdpEndpoint'])};}export function getNestedValue(_0x94e9ae,_0x4034b8){const _0x52aa96=_0x1f0ad9,_0x171197={'NAeXp':function(_0x2b871b,_0x9fd540){return _0x2b871b(_0x9fd540);},'GWHLJ':function(_0x3ee471,_0x2c1a09){return _0x3ee471===_0x2c1a09;},'kIpBf':function(_0x3dcfba,_0x297e1f){return _0x3dcfba===_0x297e1f;},'ijJKn':function(_0xbb8a95,_0xe51eda){return _0xbb8a95!==_0xe51eda;}},_0x4628a8=_0x171197['NAeXp'](parseKeyPath,_0x4034b8);let _0x38d0e6=_0x94e9ae;for(const _0xfa2c24 of _0x4628a8){if(_0x171197['GWHLJ'](_0x38d0e6,null)||_0x171197['kIpBf'](_0x38d0e6,undefined)||_0x171197['ijJKn'](typeof _0x38d0e6,_0x52aa96(0x245)))return undefined;_0x38d0e6=_0x38d0e6[_0xfa2c24];}return _0x38d0e6;}export function setNestedValue(_0x985907,_0x37053f,_0x120f1d){const _0x4cbb8c=_0x1f0ad9,_0x25745c={'IANpn':function(_0x45cc29,_0x27178d){return _0x45cc29<_0x27178d;},'zlQVP':function(_0x127821,_0x725f76){return _0x127821 in _0x725f76;},'CEzPA':function(_0x20f55a,_0x55fddd){return _0x20f55a!==_0x55fddd;},'QcqWY':_0x4cbb8c(0x245)},_0x43b24b=parseKeyPath(_0x37053f);let _0xe0e418=_0x985907;for(let _0x232733=0x0;_0x25745c[_0x4cbb8c(0x1ef)](_0x232733,_0x43b24b[_0x4cbb8c(0x244)]-0x1);_0x232733++){const _0x10f30e=_0x43b24b[_0x232733];(!_0x25745c[_0x4cbb8c(0x20f)](_0x10f30e,_0xe0e418)||_0x25745c['CEzPA'](typeof _0xe0e418[_0x10f30e],_0x25745c['QcqWY']))&&(_0xe0e418[_0x10f30e]={}),_0xe0e418=_0xe0e418[_0x10f30e];}_0xe0e418[_0x43b24b[_0x43b24b['length']-0x1]]=_0x120f1d;}export function deleteNestedValue(_0xe909f9,_0x2dca65){const _0x1307ab=_0x1f0ad9,_0x1f6b26={'IQXtB':function(_0x2c4e22,_0x1bf423){return _0x2c4e22(_0x1bf423);},'emAUS':function(_0x45fa90,_0x182e0b){return _0x45fa90<_0x182e0b;},'KurYN':function(_0xd1a7c5,_0x5b2f4f){return _0xd1a7c5-_0x5b2f4f;},'agAgz':'object','hERmT':function(_0x154732,_0x581dc3){return _0x154732 in _0x581dc3;}},_0x6f8a6f=_0x1f6b26[_0x1307ab(0x200)](parseKeyPath,_0x2dca65);let _0x47cf30=_0xe909f9;for(let _0xb9a19c=0x0;_0x1f6b26[_0x1307ab(0x21b)](_0xb9a19c,_0x1f6b26[_0x1307ab(0x239)](_0x6f8a6f['length'],0x1));_0xb9a19c++){if(_0x47cf30===null||_0x47cf30===undefined||typeof _0x47cf30!==_0x1f6b26[_0x1307ab(0x209)])return![];_0x47cf30=_0x47cf30[_0x6f8a6f[_0xb9a19c]];}if(_0x47cf30===null||_0x47cf30===undefined||typeof _0x47cf30!==_0x1f6b26[_0x1307ab(0x209)])return![];const _0x3c5908=_0x6f8a6f[_0x6f8a6f[_0x1307ab(0x244)]-0x1];if(_0x1f6b26[_0x1307ab(0x1f9)](_0x3c5908,_0x47cf30))return delete _0x47cf30[_0x3c5908],!![];return![];}function parseKeyPath(_0x17e1e8){const _0x14bad4=_0x1f0ad9,_0x36bba0={'xMmCj':_0x14bad4(0x1e9),'MAtjT':'headers','LgeSV':function(_0x37d896,_0x272870){return _0x37d896===_0x272870;},'emQoT':'setupHeader'},_0x146a75=_0x17e1e8[_0x14bad4(0x1e2)]('.');return _0x146a75[0x0]===_0x36bba0['xMmCj']&&(_0x146a75[0x0]=_0x36bba0['MAtjT']),_0x36bba0['LgeSV'](_0x146a75[0x0],_0x36bba0[_0x14bad4(0x210)])&&(_0x146a75[0x0]=_0x14bad4(0x236)),_0x146a75;}export function formatSettings(_0x2b70fd,_0x14b2c4=0x0){const _0x2a1f38=_0x1f0ad9,_0x37b877={'zEenn':function(_0x1653a0,_0x3bf537){return _0x1653a0===_0x3bf537;},'drYAL':_0x2a1f38(0x245)},_0x1a3395=[],_0x2d5918='\x20\x20'[_0x2a1f38(0x1e4)](_0x14b2c4);for(const [_0x2ccfbf,_0xfb8cc8]of Object[_0x2a1f38(0x1d6)](_0x2b70fd)){if(_0xfb8cc8===undefined)continue;if(_0x37b877['zEenn'](typeof _0xfb8cc8,_0x37b877[_0x2a1f38(0x216)])&&_0xfb8cc8!==null){_0x1a3395[_0x2a1f38(0x24b)](''+_0x2d5918+_0x2ccfbf+':');for(const [_0x7a85b2,_0x340947]of Object['entries'](_0xfb8cc8)){_0x1a3395['push'](_0x2d5918+'\x20\x20'+_0x7a85b2+':\x20'+_0x340947);}}else _0x1a3395['push'](''+_0x2d5918+_0x2ccfbf+':\x20'+_0xfb8cc8);}return _0x1a3395[_0x2a1f38(0x1f1)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4aad(_0xa5b7a6,_0x5138c2){_0xa5b7a6=_0xa5b7a6-0x9f;const _0x49ea2f=_0x49ea();let _0x4aada5=_0x49ea2f[_0xa5b7a6];return _0x4aada5;}(function(_0x368cbc,_0x1f28f2){const _0x5eaf67=_0x4aad,_0x1912af=_0x368cbc();while(!![]){try{const _0x5a709c=-parseInt(_0x5eaf67(0xa0))/0x1*(-parseInt(_0x5eaf67(0xa7))/0x2)+-parseInt(_0x5eaf67(0xaa))/0x3*(-parseInt(_0x5eaf67(0xa6))/0x4)+parseInt(_0x5eaf67(0xa2))/0x5*(-parseInt(_0x5eaf67(0xa5))/0x6)+parseInt(_0x5eaf67(0xa1))/0x7+parseInt(_0x5eaf67(0xa8))/0x8+-parseInt(_0x5eaf67(0xa9))/0x9+parseInt(_0x5eaf67(0xa4))/0xa*(-parseInt(_0x5eaf67(0xab))/0xb);if(_0x5a709c===_0x1f28f2)break;else _0x1912af['push'](_0x1912af['shift']());}catch(_0x124169){_0x1912af['push'](_0x1912af['shift']());}}}(_0x49ea,0x2c344));function _0x49ea(){const _0x12d7e9=['15zBlTKM','341jUmwWz','gZkZL','utf-8','1906LmOuNj','1482138AfYWen','11835zOwZkK','OnfXH','107390qSrASu','54jYkaoo','257224lyCMSA','166mkpstH','244384zAssjL','1680642qANAun'];_0x49ea=function(){return _0x12d7e9;};return _0x49ea();}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x1bc46b){const _0xb0decb=_0x4aad,_0x3b0295={'OnfXH':function(_0x45a016,_0x7a7593,_0x5734ed,_0x76fa4d,_0x286320){return _0x45a016(_0x7a7593,_0x5734ed,_0x76fa4d,_0x286320);},'cMphl':function(_0x50e876,_0x2e2834,_0x57f201){return _0x50e876(_0x2e2834,_0x57f201);}},_0x28662f=_0x3b0295[_0xb0decb(0xa3)](join,__dirname,'..','..','skills'),_0x3056c0=_0x3b0295['cMphl'](join,_0x28662f,_0x1bc46b);try{return readFileSync(_0x3056c0,_0xb0decb(0x9f));}catch{return'';}}export function getRangerSkillContent(){const _0x16a988=_0x4aad,_0x18a068={'gZkZL':function(_0x395a2a,_0x5f8b7b){return _0x395a2a(_0x5f8b7b);}};return _0x18a068[_0x16a988(0xac)](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x35e3b9=_0x5120;(function(_0x1d39ee,_0x40a30e){const _0x477c80=_0x5120,_0x51928d=_0x1d39ee();while(!![]){try{const _0x1c1c9b=-parseInt(_0x477c80(0x15a))/0x1+parseInt(_0x477c80(0x15e))/0x2*(-parseInt(_0x477c80(0x163))/0x3)+-parseInt(_0x477c80(0x170))/0x4*(-parseInt(_0x477c80(0x14e))/0x5)+parseInt(_0x477c80(0x14f))/0x6+-parseInt(_0x477c80(0x15f))/0x7*(-parseInt(_0x477c80(0x16d))/0x8)+-parseInt(_0x477c80(0x167))/0x9*(parseInt(_0x477c80(0x154))/0xa)+parseInt(_0x477c80(0x168))/0xb*(parseInt(_0x477c80(0x165))/0xc);if(_0x1c1c9b===_0x40a30e)break;else _0x51928d['push'](_0x51928d['shift']());}catch(_0x252718){_0x51928d['push'](_0x51928d['shift']());}}}(_0x16df,0xe3081));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);function _0x16df(){const _0x4a66fa=['\x20\x20Removed\x20deprecated\x20skill:\x20','cZsqO','1171554ICqRcK','zzRfk','warn','.md','158014RLuOXR','18655jKvLLR','gFFlS','kvmFB','SKILL.md','51LndaAC','eTwQD','26434812ChxQeI','\x20\x20Skill\x20not\x20found:\x20','14963184nOLpTA','11IxMpWR','lrxRZ','ranger','log','length','5208lDGgvJ','filter','rBrdp','280828zviyEx','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','xuNPx','e2e-test-recommender','JsIFc','5NLxrEY','6594882iuiZDR','endsWith','UVjFL','trim','match','10FxDRQH','push','\x20\x20Location:\x20','opencode'];_0x16df=function(){return _0x4a66fa;};return _0x16df();}export const RANGER_MANAGED_SKILLS=[_0x35e3b9(0x16a)];export const DEPRECATED_SKILLS=[_0x35e3b9(0x14c),'bug-bash','feature-tracker'];export async function installSkill(_0x60154f,_0x5e685a={}){const _0x5a7f44=_0x35e3b9,_0x2d5b1b={'uqMag':function(_0x47b2c3){return _0x47b2c3();},'DqocV':function(_0x5348b7,_0x335992,_0xfb4fb3){return _0x5348b7(_0x335992,_0xfb4fb3);},'gFFlS':function(_0x3611f9,_0xe79736){return _0x3611f9(_0xe79736);},'lrxRZ':function(_0x37db1b,_0x277895){return _0x37db1b(_0x277895);},'Duszz':function(_0x485763,_0x2b4f56){return _0x485763===_0x2b4f56;},'xuNPx':function(_0x57330b,_0x57b624){return _0x57330b(_0x57b624);},'kvmFB':function(_0x3cf46f,_0x2054aa){return _0x3cf46f(_0x2054aa);},'JsIFc':function(_0x6d6bab,_0x2f90be,_0x4335df){return _0x6d6bab(_0x2f90be,_0x4335df);},'UVjFL':function(_0xdc85ba,_0x512443,_0x1986af){return _0xdc85ba(_0x512443,_0x1986af);},'fVWvh':function(_0x3c1554,_0x486c67,_0x2e99bf){return _0x3c1554(_0x486c67,_0x2e99bf);},'kAlpC':'utf-8','rBrdp':function(_0x6476e4,_0x2cd22a,_0x363442){return _0x6476e4(_0x2cd22a,_0x363442);},'SlWjn':function(_0x562ab0,_0x5cea18,_0x396ec3){return _0x562ab0(_0x5cea18,_0x396ec3);},'cZsqO':'SKILL.md','mVpGG':function(_0xfd7ac0,_0x189169,_0x4f747d,_0xa5339d){return _0xfd7ac0(_0x189169,_0x4f747d,_0xa5339d);}},{level:level='project',cliVersion:_0x5a99e9,platform:platform='claude'}=_0x5e685a,_0x449a05=_0x2d5b1b['uqMag'](getSourceSkillsDir),_0xfee8c0=join(_0x449a05,_0x60154f),_0x3a1d51=_0x2d5b1b['DqocV'](join,_0x449a05,_0x60154f+_0x5a7f44(0x15d)),_0x3bfba6=existsSync(_0xfee8c0)&&_0x2d5b1b[_0x5a7f44(0x160)](statSync,_0xfee8c0)['isDirectory']()&&_0x2d5b1b[_0x5a7f44(0x160)](existsSync,join(_0xfee8c0,_0x5a7f44(0x162))),_0xc384f3=_0x2d5b1b[_0x5a7f44(0x169)](existsSync,_0x3a1d51);if(!_0x3bfba6&&!_0xc384f3)return console['warn'](_0x5a7f44(0x166)+_0x60154f),![];const _0x2ce86c=_0x2d5b1b['Duszz'](platform,_0x5a7f44(0x157))?_0x2d5b1b[_0x5a7f44(0x172)](getOpencodeSkillsDir,level):_0x2d5b1b[_0x5a7f44(0x161)](getSkillsDir,level),_0x2a7257=_0x2d5b1b['JsIFc'](join,_0x2ce86c,_0x60154f);await _0x2d5b1b[_0x5a7f44(0x151)](mkdir,_0x2a7257,{'recursive':!![]});let _0x502407,_0x3ea735=[];if(_0x3bfba6){const _0x4ba921=await readdir(_0xfee8c0),_0x3ce95d=_0x4ba921[_0x5a7f44(0x16e)](_0x1ba3ef=>_0x1ba3ef[_0x5a7f44(0x150)](_0x5a7f44(0x15d)));for(const _0x319044 of _0x3ce95d){const _0x18807e=_0x2d5b1b['fVWvh'](join,_0xfee8c0,_0x319044),_0x312078=join(_0x2a7257,_0x319044);await copyFile(_0x18807e,_0x312078),_0x3ea735[_0x5a7f44(0x155)](_0x319044);}_0x502407=await _0x2d5b1b[_0x5a7f44(0x14d)](readFile,join(_0xfee8c0,_0x5a7f44(0x162)),_0x2d5b1b['kAlpC']);}else{_0x502407=await _0x2d5b1b[_0x5a7f44(0x16f)](readFile,_0x3a1d51,_0x2d5b1b['kAlpC']);const _0x4c4d4b=_0x2d5b1b['SlWjn'](join,_0x2a7257,_0x2d5b1b[_0x5a7f44(0x159)]);await writeFile(_0x4c4d4b,_0x502407,'utf-8'),_0x3ea735[_0x5a7f44(0x155)](_0x2d5b1b[_0x5a7f44(0x159)]);}const {name:_0xd2ec4d}=parseFrontmatter(_0x502407);return console['log']('\x20\x20Installed\x20skill:\x20'+_0xd2ec4d),console[_0x5a7f44(0x16b)](_0x5a7f44(0x156)+_0x2a7257),_0x3ea735[_0x5a7f44(0x16c)]>0x1&&console[_0x5a7f44(0x16b)]('\x20\x20Files:\x20'+_0x3ea735['join'](',\x20')),_0x2d5b1b['mVpGG'](logLocalAgentInstallation,_0x60154f,{'skillDisplayName':_0xd2ec4d,'installLevel':level},_0x5a99e9)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x59a18e=_0x35e3b9,_0x2c0627={'eTwQD':function(_0x3922fa,_0x2ad53c,_0x21a961,_0x380480,_0x5ca342){return _0x3922fa(_0x2ad53c,_0x21a961,_0x380480,_0x5ca342);},'zzRfk':'skills'},_0x5b6ae0=[_0x2c0627[_0x59a18e(0x164)](join,__dirname,'..','..',_0x2c0627['zzRfk']),join(__dirname,'..','..','..',_0x2c0627[_0x59a18e(0x15b)])];for(const _0x308b76 of _0x5b6ae0){if(existsSync(_0x308b76))return _0x308b76;}return _0x5b6ae0[0x0];}function _0x5120(_0x505ed8,_0x182edb){_0x505ed8=_0x505ed8-0x14c;const _0x16dfc1=_0x16df();let _0x512035=_0x16dfc1[_0x505ed8];return _0x512035;}function parseFrontmatter(_0x262e99){const _0x2a3128=_0x35e3b9,_0x5ab89c=_0x262e99['match'](/^---\n([\s\S]+?)\n---/);if(!_0x5ab89c)throw new Error('Invalid\x20skill\x20frontmatter');const _0x38d5d6=_0x5ab89c[0x1],_0x518f7f=_0x38d5d6[_0x2a3128(0x153)](/name:\s*(.+)/),_0x1f127=_0x38d5d6['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x518f7f?.[0x1][_0x2a3128(0x152)]()||'','description':_0x1f127?.[0x1]['trim']()||''};}export async function removeSkill(_0x331fd7,_0x4c92ba){const _0x304a67=_0x35e3b9,_0x502400={'zHVQf':function(_0x1ee65f,_0x3cf56f,_0x1ca0b2){return _0x1ee65f(_0x3cf56f,_0x1ca0b2);},'QrIzO':function(_0x2c3e82,_0x4df231){return _0x2c3e82(_0x4df231);}},_0x3d7b9c=getSkillsDir(_0x4c92ba),_0x4d67cf=_0x502400['zHVQf'](join,_0x3d7b9c,_0x331fd7);if(!_0x502400['QrIzO'](existsSync,_0x4d67cf))return![];try{return await rm(_0x4d67cf,{'recursive':!![]}),console[_0x304a67(0x16b)](_0x304a67(0x158)+_0x331fd7),!![];}catch{return console[_0x304a67(0x15c)](_0x304a67(0x171)+_0x331fd7),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xda9280=_0x3ff6;(function(_0x19893d,_0x4f53ce){const _0xb20585=_0x3ff6,_0x7fdd17=_0x19893d();while(!![]){try{const _0x498cc9=parseInt(_0xb20585(0xd9))/0x1*(-parseInt(_0xb20585(0xa6))/0x2)+parseInt(_0xb20585(0xc9))/0x3*(-parseInt(_0xb20585(0xda))/0x4)+parseInt(_0xb20585(0x99))/0x5+-parseInt(_0xb20585(0xb4))/0x6*(parseInt(_0xb20585(0x9d))/0x7)+-parseInt(_0xb20585(0xc6))/0x8*(parseInt(_0xb20585(0xd1))/0x9)+parseInt(_0xb20585(0xc0))/0xa+parseInt(_0xb20585(0xb0))/0xb;if(_0x498cc9===_0x4f53ce)break;else _0x7fdd17['push'](_0x7fdd17['shift']());}catch(_0x791704){_0x7fdd17['push'](_0x7fdd17['shift']());}}}(_0x3f58,0x32871));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 _0x3ff6(_0x209eab,_0x5dae74){_0x209eab=_0x209eab-0x91;const _0x3f580c=_0x3f58();let _0x3ff6f6=_0x3f580c[_0x209eab];return _0x3ff6f6;}function readVint(_0xe796af,_0x4ab385){const _0x474f8c=_0x3ff6,_0x39c640={'WgTvi':function(_0x4309cf,_0x50ef54){return _0x4309cf>=_0x50ef54;},'VYEKR':function(_0x157d99,_0x21f67f){return _0x157d99-_0x21f67f;}};if(_0x39c640['WgTvi'](_0x4ab385,_0xe796af[_0x474f8c(0xc5)]))return[0x0,0x0];const _0x4728df=_0xe796af[_0x4ab385];let _0x442994=0x1,_0x1d49f1=0x80;while(_0x442994<=0x8&&!(_0x4728df&_0x1d49f1)){_0x442994++,_0x1d49f1>>=0x1;}if(_0x4ab385+_0x442994>_0xe796af[_0x474f8c(0xc5)])return[0x0,0x0];let _0x150d34=_0x4728df&_0x39c640[_0x474f8c(0xaa)](_0x1d49f1,0x1);for(let _0x588056=0x1;_0x588056<_0x442994;_0x588056++){_0x150d34=_0x150d34*0x100+_0xe796af[_0x4ab385+_0x588056];}return[_0x150d34,_0x442994];}function readId(_0x557fcc,_0x408855){const _0x20f5e6=_0x3ff6,_0x192699={'rUMus':function(_0x2911e3,_0x410a1d){return _0x2911e3>=_0x410a1d;},'ZvhoO':function(_0x1f257a,_0x16f3ee){return _0x1f257a+_0x16f3ee;},'JquTE':function(_0x41df9a,_0xd5e87c){return _0x41df9a<_0xd5e87c;},'SCwab':function(_0x3e1cef,_0x5d5dd5){return _0x3e1cef+_0x5d5dd5;},'YxKaG':function(_0x3d75a3,_0x5245a4){return _0x3d75a3*_0x5245a4;}};if(_0x192699['rUMus'](_0x408855,_0x557fcc[_0x20f5e6(0xc5)]))return[0x0,0x0];const _0x409c5a=_0x557fcc[_0x408855];let _0x5e6a94;if(_0x409c5a>=0x80)_0x5e6a94=0x1;else{if(_0x192699[_0x20f5e6(0xd5)](_0x409c5a,0x40))_0x5e6a94=0x2;else{if(_0x192699['rUMus'](_0x409c5a,0x20))_0x5e6a94=0x3;else{if(_0x409c5a>=0x10)_0x5e6a94=0x4;else return[_0x409c5a,0x1];}}}if(_0x192699[_0x20f5e6(0xde)](_0x408855,_0x5e6a94)>_0x557fcc['length'])return[0x0,0x0];let _0x12ccb2=0x0;for(let _0x1f385d=0x0;_0x192699[_0x20f5e6(0xae)](_0x1f385d,_0x5e6a94);_0x1f385d++){_0x12ccb2=_0x192699[_0x20f5e6(0xb5)](_0x192699[_0x20f5e6(0xbf)](_0x12ccb2,0x100),_0x557fcc[_0x408855+_0x1f385d]);}return[_0x12ccb2,_0x5e6a94];}function readUint(_0xe3b6a,_0x3253dc,_0x389624){const _0x137841=_0x3ff6,_0x4f5b67={'ZVrut':function(_0x2e868f,_0x1d5f71){return _0x2e868f<_0x1d5f71;},'JfxBW':function(_0x5a7de5,_0x4302ca){return _0x5a7de5+_0x4302ca;}};let _0x45450a=0x0;for(let _0x57a90b=0x0;_0x4f5b67['ZVrut'](_0x57a90b,_0x389624);_0x57a90b++){_0x45450a=_0x4f5b67[_0x137841(0xd3)](_0x45450a*0x100,_0xe3b6a[_0x3253dc+_0x57a90b]);}return _0x45450a;}function isUnknownSize(_0xcc6655,_0x7bd7d9){const _0x195cab=_0x3ff6,_0xd5f371={'rTDRe':function(_0x5e86a4,_0x236c5b){return _0x5e86a4===_0x236c5b;}};return _0xd5f371['rTDRe'](_0xcc6655,Math[_0x195cab(0x97)](0x2,0x7*_0x7bd7d9)-0x1);}function writeVint(_0x47efe1,_0x32349f){const _0x517595=_0x3ff6,_0x10ea37={'ZwGyu':function(_0x463be7,_0x348100){return _0x463be7||_0x348100;},'wiSXe':function(_0x1634b8,_0x519384){return _0x1634b8<_0x519384;},'eECXe':function(_0x4b5bfe,_0x4091b6){return _0x4b5bfe-_0x4091b6;},'YqRDm':function(_0x4760c5,_0xf8fa9){return _0x4760c5>=_0xf8fa9;},'yYHlc':function(_0x1d4d87,_0x37d1c1){return _0x1d4d87<<_0x37d1c1;}};let _0x14e07f=_0x10ea37['ZwGyu'](_0x32349f,0x1);while(_0x10ea37[_0x517595(0xcf)](Math['pow'](0x2,0x7*_0x14e07f)-0x2,_0x47efe1))_0x14e07f++;const _0x290d9f=Buffer['alloc'](_0x14e07f);for(let _0x156972=_0x10ea37['eECXe'](_0x14e07f,0x1);_0x10ea37[_0x517595(0xd7)](_0x156972,0x0);_0x156972--){_0x290d9f[_0x156972]=_0x47efe1&0xff,_0x47efe1=Math[_0x517595(0xcd)](_0x47efe1/0x100);}return _0x290d9f[0x0]|=_0x10ea37['yYHlc'](0x1,_0x10ea37[_0x517595(0xba)](0x8,_0x14e07f)),_0x290d9f;}function writeUint(_0x22b129,_0x3e41d5){const _0x1157a8=_0x3ff6,_0x2640e3={'DGQEc':function(_0x28fe4d,_0x12173c){return _0x28fe4d>=_0x12173c;}},_0x273845=Buffer[_0x1157a8(0xb9)](_0x3e41d5);for(let _0x231f4d=_0x3e41d5-0x1;_0x2640e3['DGQEc'](_0x231f4d,0x0);_0x231f4d--){_0x273845[_0x231f4d]=_0x22b129&0xff,_0x22b129=Math[_0x1157a8(0xcd)](_0x22b129/0x100);}return _0x273845;}function writeUnknownSizeVint(_0x1c6046){const _0x12559d=_0x3ff6,_0x23a4be={'FBdqk':function(_0x3f9894,_0x3e81c1){return _0x3f9894>>_0x3e81c1;}},_0x202279=Buffer['alloc'](_0x1c6046,0xff);return _0x202279[0x0]=_0x23a4be[_0x12559d(0x9c)](0xff,_0x1c6046-0x1),_0x202279;}function uintSize(_0x449503){if(_0x449503===0x0)return 0x1;let _0x1eb76d=0x0,_0x123f02=_0x449503;while(_0x123f02>0x0){_0x1eb76d++,_0x123f02=Math['floor'](_0x123f02/0x100);}return _0x1eb76d;}function findTimestampScale(_0x584475,_0x5ebb74){const _0x3fac1c=_0x3ff6,_0x4fd7f9={'OGnzu':function(_0x49da5e,_0x4fedbb){return _0x49da5e<_0x4fedbb;},'fthnE':function(_0x4603cc,_0x299b60,_0x5b2b19){return _0x4603cc(_0x299b60,_0x5b2b19);},'MlIAS':function(_0x1b1a9e,_0x58c504){return _0x1b1a9e+_0x58c504;},'kSZcT':function(_0x3f45ab,_0x182f8b){return _0x3f45ab===_0x182f8b;},'wmaFh':function(_0x69e2fe,_0xd1217a){return _0x69e2fe+_0xd1217a;},'GptdM':function(_0x1a7725,_0x2738ce,_0x51d3a8){return _0x1a7725(_0x2738ce,_0x51d3a8);},'ZUhvq':function(_0x1a860c,_0x3659e4){return _0x1a860c===_0x3659e4;},'MlUeA':function(_0x326618,_0x231043){return _0x326618+_0x231043;}};let _0x15daa9=_0x5ebb74;const _0x39bd18=Math['min'](_0x584475[_0x3fac1c(0xc5)],_0x5ebb74+0x2710);while(_0x4fd7f9[_0x3fac1c(0xab)](_0x15daa9,_0x39bd18)){const [_0x4906e4,_0x294446]=readId(_0x584475,_0x15daa9),[_0x3277e7,_0x325c42]=_0x4fd7f9['fthnE'](readVint,_0x584475,_0x4fd7f9['MlIAS'](_0x15daa9,_0x294446));if(_0x4fd7f9['kSZcT'](_0x4906e4,ID_INFO)){let _0x540cf2=_0x4fd7f9['wmaFh'](_0x15daa9+_0x294446,_0x325c42);const _0x473db0=_0x540cf2+_0x3277e7;while(_0x540cf2<_0x473db0){const [_0x34d794,_0x5b7e17]=_0x4fd7f9[_0x3fac1c(0xa2)](readId,_0x584475,_0x540cf2),[_0x154200,_0x366bbf]=_0x4fd7f9['fthnE'](readVint,_0x584475,_0x4fd7f9[_0x3fac1c(0xd8)](_0x540cf2,_0x5b7e17));if(_0x4fd7f9['ZUhvq'](_0x34d794,ID_TIMESTAMP_SCALE))return readUint(_0x584475,_0x540cf2+_0x5b7e17+_0x366bbf,_0x154200);_0x540cf2+=_0x4fd7f9[_0x3fac1c(0xc7)](_0x5b7e17+_0x366bbf,_0x154200);}break;}if(_0x4906e4===ID_CLUSTER)break;if(isUnknownSize(_0x3277e7,_0x325c42))break;_0x15daa9+=_0x4fd7f9[_0x3fac1c(0xc7)](_0x294446+_0x325c42,_0x3277e7);}return 0xf4240;}function findFirstClusterOffset(_0x285765,_0x17a58d){const _0x44348d=_0x3ff6,_0x404190={'awpnk':function(_0x2830b9,_0x2744d1){return _0x2830b9<_0x2744d1;},'JhODP':function(_0x2d7a94,_0x354eb8,_0x2ae9fa){return _0x2d7a94(_0x354eb8,_0x2ae9fa);},'rQUce':function(_0x410222,_0x69990a){return _0x410222+_0x69990a;}};let _0x4547c0=_0x17a58d;while(_0x404190['awpnk'](_0x4547c0,_0x285765['length'])){const [_0xdb2d02,_0x4ff282]=_0x404190['JhODP'](readId,_0x285765,_0x4547c0);if(_0xdb2d02===ID_CLUSTER)return _0x4547c0;const [_0x2d90f9,_0x14d925]=_0x404190['JhODP'](readVint,_0x285765,_0x4547c0+_0x4ff282);if(isUnknownSize(_0x2d90f9,_0x14d925))return _0x4547c0;_0x4547c0+=_0x404190[_0x44348d(0x98)](_0x4ff282,_0x14d925)+_0x2d90f9;}return _0x285765['length'];}function findClusterEnd(_0x10c996,_0x3f7fc0,_0x3b05fd,_0x2aeab4){const _0x1dd883=_0x3ff6,_0x10d543={'Wrfym':function(_0x27add8,_0x35d96a){return _0x27add8+_0x35d96a;},'ZTHjd':function(_0x55e4da,_0x484dff){return _0x55e4da-_0x484dff;},'kZRSv':function(_0x2d0010,_0x28691d,_0x1035ee){return _0x2d0010(_0x28691d,_0x1035ee);},'iSVaP':function(_0x3c0482,_0x596973,_0x361bd0){return _0x3c0482(_0x596973,_0x361bd0);},'bUCGT':function(_0x54b1a9,_0x3030cc){return _0x54b1a9+_0x3030cc;},'sJuNd':function(_0xfdd247,_0x5a825a){return _0xfdd247+_0x5a825a;}};if(!isUnknownSize(_0x3b05fd,_0x2aeab4))return _0x10d543['Wrfym'](_0x3f7fc0,_0x3b05fd);const _0x26e5e0=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x89ea34=_0x3f7fc0;while(_0x89ea34<_0x10d543[_0x1dd883(0xa0)](_0x10c996[_0x1dd883(0xc5)],0x4)){const [_0x56c9d8,_0x1ffaa1]=_0x10d543[_0x1dd883(0xad)](readId,_0x10c996,_0x89ea34);if(_0x26e5e0[_0x1dd883(0xa3)](_0x56c9d8))return _0x89ea34;const [_0x3567a0,_0x351a26]=_0x10d543[_0x1dd883(0xdb)](readVint,_0x10c996,_0x10d543['bUCGT'](_0x89ea34,_0x1ffaa1));if(isUnknownSize(_0x3567a0,_0x351a26))return _0x10c996['length'];_0x89ea34+=_0x10d543['sJuNd'](_0x1ffaa1,_0x351a26)+_0x3567a0;}return _0x10c996[_0x1dd883(0xc5)];}function extractClusters(_0x46350d,_0x353d99){const _0x127bfa=_0x3ff6,_0x36a6c5={'BZgLG':function(_0x4d0526,_0x280a45){return _0x4d0526<_0x280a45;},'PFHMy':function(_0xac41f9,_0x4f6741){return _0xac41f9===_0x4f6741;},'kiOKe':function(_0x93fc90,_0x52fbf7,_0xa14f88){return _0x93fc90(_0x52fbf7,_0xa14f88);},'UFMLU':function(_0x333665,_0x3d66c6){return _0x333665!==_0x3d66c6;},'ZhXhY':function(_0x2c3301,_0x4dc9be){return _0x2c3301+_0x4dc9be;},'EdZgO':function(_0x4d5360,_0x265d88){return _0x4d5360+_0x265d88;},'biVqX':function(_0x39b2f8,_0x4c2ea1){return _0x39b2f8+_0x4c2ea1;},'Jerij':function(_0x362427,_0x557091){return _0x362427+_0x557091;},'iEHxa':function(_0x174c37,_0xf0c07d){return _0x174c37+_0xf0c07d;},'wzMzA':function(_0x27167b,_0x82980a){return _0x27167b===_0x82980a;},'MPkjB':function(_0x5e4b13,_0x4f650d,_0x47bc96){return _0x5e4b13(_0x4f650d,_0x47bc96);},'MEunf':function(_0x26256d,_0x4d0c79){return _0x26256d+_0x4d0c79;}},_0x2acaa7=[],_0x1180f9=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0xaab0ac=0x0;while(_0x36a6c5[_0x127bfa(0x93)](_0xaab0ac,_0x46350d[_0x127bfa(0xc5)])){const _0x439269=_0x46350d[_0x127bfa(0xc3)](_0x1180f9,_0xaab0ac);if(_0x36a6c5[_0x127bfa(0xce)](_0x439269,-0x1))break;const [_0xe20b17,_0x3a4022]=_0x36a6c5[_0x127bfa(0xb6)](readId,_0x46350d,_0x439269);if(_0x36a6c5['UFMLU'](_0xe20b17,ID_CLUSTER)){_0xaab0ac=_0x36a6c5['ZhXhY'](_0x439269,0x1);continue;}const [_0x4ac80b,_0x123fe2]=readVint(_0x46350d,_0x36a6c5[_0x127bfa(0x9b)](_0x439269,_0x3a4022)),_0xcaaa8d=_0x36a6c5['biVqX'](_0x439269+_0x3a4022,_0x123fe2),_0x114150=findClusterEnd(_0x46350d,_0xcaaa8d,_0x4ac80b,_0x123fe2);let _0x36c632=_0xcaaa8d,_0x173c21=0x0,_0x4d73c8=0x2,_0x2fd1cf=![],_0x1bc798=Buffer['alloc'](0x0),_0x48cd99=Buffer['alloc'](0x0);while(_0x36a6c5['BZgLG'](_0x36c632,_0x114150)){const [_0x41c8cc,_0x18686]=readId(_0x46350d,_0x36c632),[_0x300549,_0x4d5cce]=_0x36a6c5['kiOKe'](readVint,_0x46350d,_0x36c632+_0x18686);if(_0x41c8cc===ID_TIMESTAMP){_0x173c21=readUint(_0x46350d,_0x36a6c5[_0x127bfa(0x9b)](_0x36a6c5['Jerij'](_0x36c632,_0x18686),_0x4d5cce),_0x300549),_0x4d73c8=_0x300549,_0x2fd1cf=!![],_0x1bc798=_0x46350d['slice'](_0xcaaa8d,_0x36c632);const _0x29c8df=_0x36a6c5[_0x127bfa(0x96)](_0x36c632+_0x18686+_0x4d5cce,_0x300549);_0x48cd99=_0x46350d[_0x127bfa(0xa8)](_0x29c8df,_0x114150);break;}if(_0x41c8cc===ID_CLUSTER)break;if(_0x36a6c5[_0x127bfa(0xb6)](isUnknownSize,_0x300549,_0x4d5cce))break;_0x36c632+=_0x18686+_0x4d5cce+_0x300549;}!_0x2fd1cf&&(_0x48cd99=_0x46350d[_0x127bfa(0xa8)](_0xcaaa8d,_0x114150));let _0x361ff9=_0x173c21;_0x36c632=_0xcaaa8d;while(_0x36c632<_0x114150){const [_0xc4f76d,_0x54725e]=_0x36a6c5[_0x127bfa(0xb6)](readId,_0x46350d,_0x36c632),[_0x2bb74b,_0x3af0a5]=readVint(_0x46350d,_0x36a6c5['iEHxa'](_0x36c632,_0x54725e));if(_0x36a6c5['PFHMy'](_0xc4f76d,ID_SIMPLE_BLOCK)&&_0x2bb74b>=0x4){const _0x3ebe60=_0x36a6c5[_0x127bfa(0x9a)](_0x36c632+_0x54725e,_0x3af0a5),[,_0x4386fe]=readVint(_0x46350d,_0x3ebe60),_0x924b0=_0x46350d[_0x127bfa(0xdd)](_0x36a6c5[_0x127bfa(0x96)](_0x3ebe60,_0x4386fe)),_0x44154f=_0x173c21+_0x924b0;if(_0x44154f>_0x361ff9)_0x361ff9=_0x44154f;}if(_0x36a6c5[_0x127bfa(0xb8)](_0xc4f76d,ID_CLUSTER))break;if(_0x36a6c5['MPkjB'](isUnknownSize,_0x2bb74b,_0x3af0a5))break;_0x36c632+=_0x36a6c5[_0x127bfa(0xd6)](_0x36a6c5['MEunf'](_0x54725e,_0x3af0a5),_0x2bb74b);}_0x2acaa7['push']({'timestamp':_0x173c21,'maxTicks':_0x361ff9,'bodyBeforeTimestamp':_0x1bc798,'bodyAfterTimestamp':_0x48cd99,'timestampElementSize':_0x4d73c8}),_0xaab0ac=_0x114150;}return _0x2acaa7;}function parseWebm(_0x183ee8){const _0x56e468=_0x3ff6,_0x4d460c={'Wsvxr':function(_0xcdfef3,_0x458d8e,_0x4f177f){return _0xcdfef3(_0x458d8e,_0x4f177f);},'WVQIZ':function(_0x2d7e15,_0x596508){return _0x2d7e15+_0x596508;},'gstXw':function(_0x559767,_0x141f52){return _0x559767+_0x141f52;},'UfEWi':function(_0x53e96d,_0x17c61c,_0x4c73bf){return _0x53e96d(_0x17c61c,_0x4c73bf);}};let _0x23e834=0x0;const [,_0x5d2764]=readId(_0x183ee8,_0x23e834),[_0x4a6aed,_0x133684]=_0x4d460c[_0x56e468(0x95)](readVint,_0x183ee8,_0x23e834+_0x5d2764);_0x23e834+=_0x4d460c['WVQIZ'](_0x4d460c[_0x56e468(0xb7)](_0x5d2764,_0x133684),_0x4a6aed);const [_0x2aa5b4,_0x3ee0bc]=readId(_0x183ee8,_0x23e834);if(_0x2aa5b4!==ID_SEGMENT)return null;const [,_0x353cc8]=readVint(_0x183ee8,_0x4d460c['WVQIZ'](_0x23e834,_0x3ee0bc)),_0x588999=_0x23e834+_0x3ee0bc+_0x353cc8,_0x27322d=findTimestampScale(_0x183ee8,_0x588999),_0x127aed=_0x4d460c[_0x56e468(0xa9)](findFirstClusterOffset,_0x183ee8,_0x588999),_0x5b3511=_0x183ee8['slice'](0x0,_0x127aed),_0x12dc51=_0x4d460c[_0x56e468(0x95)](extractClusters,_0x183ee8,_0x27322d);let _0x42df70=0x0;for(const _0x27956f of _0x12dc51){if(_0x27956f[_0x56e468(0x92)]>_0x42df70)_0x42df70=_0x27956f['maxTicks'];}return{'header':_0x5b3511,'clusters':_0x12dc51,'timestampScale':_0x27322d,'maxTimestampTicks':_0x42df70};}function buildCluster(_0x1f0bc3,_0x466ccf,_0x126d36){const _0x44658b=_0x3ff6,_0xbdbac5={'JBRME':function(_0x61c5b4,_0x245788){return _0x61c5b4(_0x245788);}},_0x308cbc=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x1ba4c1=Math[_0x44658b(0xb1)](0x4,_0xbdbac5['JBRME'](uintSize,_0x1f0bc3)),_0x2dd488=Buffer[_0x44658b(0xbc)]([Buffer[_0x44658b(0xa5)]([ID_TIMESTAMP]),_0xbdbac5['JBRME'](writeVint,_0x1ba4c1),writeUint(_0x1f0bc3,_0x1ba4c1)]),_0x3e931c=Buffer[_0x44658b(0xbc)]([_0x466ccf,_0x2dd488,_0x126d36]),_0xfd666c=writeVint(_0x3e931c['length']);return Buffer[_0x44658b(0xbc)]([_0x308cbc,_0xfd666c,_0x3e931c]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x378fa3){const _0x4c5c91=_0x3ff6,_0x22dbde={'JnUUg':function(_0x1216d0,_0x1a0b0d,_0x395f1b){return _0x1216d0(_0x1a0b0d,_0x395f1b);},'DPZhu':function(_0x189bfc,_0x2e4b76,_0x43d319){return _0x189bfc(_0x2e4b76,_0x43d319);},'TuufJ':function(_0x1d769a,_0x372667){return _0x1d769a+_0x372667;},'nBEVJ':function(_0x5323ae,_0x1a80a6,_0x24bee3){return _0x5323ae(_0x1a80a6,_0x24bee3);},'XKQlW':function(_0x2da9f4,_0x70204d){return _0x2da9f4+_0x70204d;},'cqnXT':function(_0x1dac3b,_0x954a3d){return _0x1dac3b+_0x954a3d;},'echQf':function(_0x172f65,_0x5efe02){return _0x172f65(_0x5efe02);},'gmRDW':function(_0x4ab790,_0x5431fa){return _0x4ab790<_0x5431fa;},'cDQws':function(_0x12c7e8,_0x3bd3b6){return _0x12c7e8===_0x3bd3b6;},'pWJyq':function(_0x45d5ea,_0x3fcfce){return _0x45d5ea+_0x3fcfce;},'VGvWg':function(_0x124c30,_0x398c4c){return _0x124c30+_0x398c4c;},'xmnKR':function(_0x2c9905,_0x505d94){return _0x2c9905+_0x505d94;},'UOPfj':function(_0x3376da,_0x254f3b){return _0x3376da+_0x254f3b;}},_0x29a3a2=Buffer[_0x4c5c91(0xa5)](_0x378fa3);let _0x40d2e8=0x0;const [,_0x42a1d0]=_0x22dbde[_0x4c5c91(0xc1)](readId,_0x29a3a2,_0x40d2e8),[_0x125094,_0x1e9cb6]=_0x22dbde['DPZhu'](readVint,_0x29a3a2,_0x40d2e8+_0x42a1d0),_0x21db5e=_0x22dbde[_0x4c5c91(0xc8)](_0x22dbde[_0x4c5c91(0xc8)](_0x40d2e8+_0x42a1d0,_0x1e9cb6),_0x125094),[,_0x5cfe96]=_0x22dbde[_0x4c5c91(0x9f)](readId,_0x29a3a2,_0x21db5e),[,_0x4363ff]=readVint(_0x29a3a2,_0x21db5e+_0x5cfe96),_0xc36ad0=_0x22dbde['XKQlW'](_0x22dbde['cqnXT'](_0x21db5e,_0x5cfe96),_0x4363ff),_0x1c0928=_0x22dbde[_0x4c5c91(0xac)](writeUnknownSizeVint,_0x4363ff);_0x1c0928[_0x4c5c91(0xa4)](_0x29a3a2,_0x21db5e+_0x5cfe96);let _0x3830b9=_0xc36ad0;const _0x5a3074=Math[_0x4c5c91(0xcc)](_0x29a3a2[_0x4c5c91(0xc5)],_0x22dbde['cqnXT'](_0xc36ad0,0x2710));while(_0x22dbde[_0x4c5c91(0xbe)](_0x3830b9,_0x5a3074)){const [_0x5b9ff7,_0x156e9c]=_0x22dbde[_0x4c5c91(0xc1)](readId,_0x29a3a2,_0x3830b9),[_0x257ded,_0x3ed538]=readVint(_0x29a3a2,_0x3830b9+_0x156e9c);if(_0x5b9ff7===ID_CLUSTER)break;if(_0x22dbde[_0x4c5c91(0xc1)](isUnknownSize,_0x257ded,_0x3ed538))break;if(_0x22dbde[_0x4c5c91(0xdc)](_0x5b9ff7,ID_INFO)){const _0x2e7e73=_0x22dbde['XKQlW'](_0x3830b9+_0x156e9c,_0x3ed538),_0x334bfa=_0x22dbde[_0x4c5c91(0xaf)](_0x2e7e73,_0x257ded),_0x3d4ee3=[];let _0x31836a=_0x2e7e73;while(_0x31836a<_0x334bfa){const [_0x6fc21a,_0x1636a9]=readId(_0x29a3a2,_0x31836a),[_0x2d69a4,_0x807c35]=_0x22dbde['nBEVJ'](readVint,_0x29a3a2,_0x22dbde[_0x4c5c91(0x9e)](_0x31836a,_0x1636a9)),_0x34d1ac=_0x22dbde[_0x4c5c91(0x91)](_0x1636a9+_0x807c35,_0x2d69a4);_0x6fc21a!==ID_DURATION&&_0x3d4ee3[_0x4c5c91(0xa1)](_0x29a3a2['slice'](_0x31836a,_0x22dbde[_0x4c5c91(0xd0)](_0x31836a,_0x34d1ac))),_0x31836a+=_0x34d1ac;}const _0x55fd33=Buffer['concat'](_0x3d4ee3),_0x520686=Buffer[_0x4c5c91(0xbc)]([_0x29a3a2[_0x4c5c91(0xa8)](_0x3830b9,_0x22dbde[_0x4c5c91(0xc2)](_0x3830b9,_0x156e9c)),writeVint(_0x55fd33[_0x4c5c91(0xc5)],_0x3ed538)]);return Buffer[_0x4c5c91(0xbc)]([_0x29a3a2[_0x4c5c91(0xa8)](0x0,_0x3830b9),_0x520686,_0x55fd33,_0x29a3a2['slice'](_0x334bfa)]);}_0x3830b9+=_0x22dbde[_0x4c5c91(0xc8)](_0x156e9c,_0x3ed538)+_0x257ded;}return _0x29a3a2;}function _0x3f58(){const _0x18462b=['max','exit','LxUZL','6SfHZyp','SCwab','kiOKe','gstXw','wzMzA','alloc','eECXe','clusters','concat','Stitched\x20','gmRDW','YxKaG','3896010vMOHJZ','JnUUg','UOPfj','indexOf','Yzerj','length','16DmNqhf','MlUeA','TuufJ','3uZCvcC','stitchWebmFiles.js','log','min','floor','PFHMy','wiSXe','xmnKR','1452321FpSNbk','stitchWebmFiles.ts','JfxBW','ctdjl','rUMus','biVqX','YqRDm','MlIAS','460iJOjfQ','1555080OoUmru','iSVaP','cDQws','readInt16BE','ZvhoO','VGvWg','maxTicks','BZgLG','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','Wsvxr','Jerij','pow','rQUce','994345icJWny','iEHxa','EdZgO','FBdqk','2834503AQItgj','XKQlW','nBEVJ','ZTHjd','push','GptdM','has','copy','from','1174PVIHWo','endsWith','slice','UfEWi','VYEKR','OGnzu','echQf','kZRSv','JquTE','pWJyq','11054428EFSzzd'];_0x3f58=function(){return _0x18462b;};return _0x3f58();}export function stitchWebmFiles(_0x4a1151,_0x4e5c49){const _0x4d7462=_0x3ff6,_0x181c90={'AAdxu':function(_0x4e0942,_0x1e1fb2){return _0x4e0942<=_0x1e1fb2;},'ctdjl':function(_0x552991,_0x231523){return _0x552991(_0x231523);},'Yzerj':function(_0x542a93,_0x20905f){return _0x542a93===_0x20905f;},'LxUZL':function(_0x3d5d0d,_0xdc65ed){return _0x3d5d0d+_0xdc65ed;},'oVwrQ':function(_0x5190a4,_0xe8c57c,_0x10c0b2){return _0x5190a4(_0xe8c57c,_0x10c0b2);}};if(_0x181c90['AAdxu'](_0x4a1151['length'],0x1))return![];const _0x592e3c=[];for(const _0xb3de55 of _0x4a1151){const _0x4191b9=readFileSync(_0xb3de55),_0x43a463=_0x181c90[_0x4d7462(0xd4)](parseWebm,_0x4191b9);if(!_0x43a463||_0x181c90[_0x4d7462(0xc4)](_0x43a463[_0x4d7462(0xbb)]['length'],0x0))return![];_0x592e3c['push'](_0x43a463);}const _0x339c73=_0x592e3c[0x0],_0x2a0788=_0x181c90[_0x4d7462(0xd4)](rebuildHeaderWithoutDuration,_0x339c73['header']),_0x48e312=[_0x2a0788];let _0x2e7925=0x0;for(let _0x464a70=0x0;_0x464a70<_0x592e3c[_0x4d7462(0xc5)];_0x464a70++){const _0x2578ce=_0x592e3c[_0x464a70];for(const _0x26fcce of _0x2578ce[_0x4d7462(0xbb)]){const _0x2e8ec7=_0x181c90[_0x4d7462(0xb3)](_0x26fcce['timestamp'],_0x2e7925);_0x48e312['push'](buildCluster(_0x2e8ec7,_0x26fcce['bodyBeforeTimestamp'],_0x26fcce['bodyAfterTimestamp']));}const _0x1405f6=0x1e;_0x2e7925+=_0x2578ce['maxTimestampTicks']+_0x1405f6;}return _0x181c90['oVwrQ'](writeFileSync,_0x4e5c49,Buffer['concat'](_0x48e312)),!![];}if(process['argv'][0x1]?.[_0xda9280(0xa7)](_0xda9280(0xd2))||process['argv'][0x1]?.['endsWith'](_0xda9280(0xca))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0xda9280(0xb2)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0xda9280(0xcb)](_0xda9280(0xbd)+inputs[_0xda9280(0xc5)]+'\x20files\x20->\x20'+output):console['log'](_0xda9280(0x94));}
|
|
1
|
+
const _0xc3913b=_0x4621;function _0x472b(){const _0x11eacb=['IdRaB','error','jRHqi','clusters','svOlw','gfcRA','maxTicks','fyLNX','hundk','331499ZLdVcJ','qddHF','GwhuP','push','kbePJ','argv','jKZBK','NYbEf','30wMdHSr','stitchWebmFiles.ts','from','exit','HEjKv','Stitched\x20','YgLcf','TWChh','omUeT','1224414knSOiX','qYpCo','11465wtkSvg','bodyAfterTimestamp','readInt16BE','4458000vXPsaW','BCoiE','MfmxH','VAABF','tgTVN','KUJRD','slice','log','\x20files\x20->\x20','drLgr','DlKMF','TOQxH','ZrzIa','beXqy','oxjuk','alloc','timestamp','481937JYaHiI','FexMj','2uXvmBi','jEGqV','XZBsp','indexOf','ertCR','12GNMwTe','vntLU','floor','length','copy','tPFLY','dNSyu','GNQVC','356Gaggdd','yxRiv','znJdW','619713BMbxnB','Qsvet','concat','123277YDgFkZ','bFIyG'];_0x472b=function(){return _0x11eacb;};return _0x472b();}(function(_0x2acc28,_0x579587){const _0x49a7a0=_0x4621,_0x1e55b6=_0x2acc28();while(!![]){try{const _0x3f8165=-parseInt(_0x49a7a0(0xeb))/0x1*(parseInt(_0x49a7a0(0xed))/0x2)+parseInt(_0x49a7a0(0x11c))/0x3+-parseInt(_0x49a7a0(0xfa))/0x4*(parseInt(_0x49a7a0(0xd7))/0x5)+parseInt(_0x49a7a0(0xf2))/0x6*(-parseInt(_0x49a7a0(0x10b))/0x7)+parseInt(_0x49a7a0(0xda))/0x8+parseInt(_0x49a7a0(0xfd))/0x9+-parseInt(_0x49a7a0(0x113))/0xa*(-parseInt(_0x49a7a0(0x100))/0xb);if(_0x3f8165===_0x579587)break;else _0x1e55b6['push'](_0x1e55b6['shift']());}catch(_0x5014cb){_0x1e55b6['push'](_0x1e55b6['shift']());}}}(_0x472b,0x461a2));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(_0xb5ed25,_0x4aec5d){const _0x24789d=_0x4621,_0x54830e={'czita':function(_0x5dbb2e,_0x13ec33){return _0x5dbb2e>=_0x13ec33;},'MfmxH':function(_0x19be31,_0xbc18a7){return _0x19be31&_0xbc18a7;},'vntLU':function(_0x28efaa,_0x24bf50){return _0x28efaa-_0x24bf50;},'ifUNC':function(_0x3a5bfe,_0x50acf8){return _0x3a5bfe+_0x50acf8;}};if(_0x54830e['czita'](_0x4aec5d,_0xb5ed25[_0x24789d(0xf5)]))return[0x0,0x0];const _0x297520=_0xb5ed25[_0x4aec5d];let _0x3450ed=0x1,_0x4c4218=0x80;while(_0x3450ed<=0x8&&!(_0x297520&_0x4c4218)){_0x3450ed++,_0x4c4218>>=0x1;}if(_0x4aec5d+_0x3450ed>_0xb5ed25['length'])return[0x0,0x0];let _0x1763b8=_0x54830e[_0x24789d(0xdc)](_0x297520,_0x54830e[_0x24789d(0xf3)](_0x4c4218,0x1));for(let _0xf2205b=0x1;_0xf2205b<_0x3450ed;_0xf2205b++){_0x1763b8=_0x1763b8*0x100+_0xb5ed25[_0x54830e['ifUNC'](_0x4aec5d,_0xf2205b)];}return[_0x1763b8,_0x3450ed];}function readId(_0x5bba0d,_0x59fe54){const _0x2e35ae=_0x4621,_0x2ceb95={'omUeT':function(_0x51da32,_0x3c77c1){return _0x51da32+_0x3c77c1;},'ILNtI':function(_0x51eff0,_0x809c3){return _0x51eff0<_0x809c3;},'BCoiE':function(_0xfc8496,_0x3f7423){return _0xfc8496*_0x3f7423;}};if(_0x59fe54>=_0x5bba0d['length'])return[0x0,0x0];const _0x4e2659=_0x5bba0d[_0x59fe54];let _0x3ef81f;if(_0x4e2659>=0x80)_0x3ef81f=0x1;else{if(_0x4e2659>=0x40)_0x3ef81f=0x2;else{if(_0x4e2659>=0x20)_0x3ef81f=0x3;else{if(_0x4e2659>=0x10)_0x3ef81f=0x4;else return[_0x4e2659,0x1];}}}if(_0x2ceb95[_0x2e35ae(0x11b)](_0x59fe54,_0x3ef81f)>_0x5bba0d[_0x2e35ae(0xf5)])return[0x0,0x0];let _0x278e1b=0x0;for(let _0x5dda7f=0x0;_0x2ceb95['ILNtI'](_0x5dda7f,_0x3ef81f);_0x5dda7f++){_0x278e1b=_0x2ceb95[_0x2e35ae(0xdb)](_0x278e1b,0x100)+_0x5bba0d[_0x2ceb95['omUeT'](_0x59fe54,_0x5dda7f)];}return[_0x278e1b,_0x3ef81f];}function _0x4621(_0x8995c7,_0x3151f5){_0x8995c7=_0x8995c7-0xd7;const _0x472b7f=_0x472b();let _0x46219a=_0x472b7f[_0x8995c7];return _0x46219a;}function readUint(_0x504db8,_0x312c3f,_0x5e8cb9){const _0x4d92d9=_0x4621,_0x593691={'hAhth':function(_0x161d5c,_0x289f5d){return _0x161d5c<_0x289f5d;},'ZrzIa':function(_0xa63d01,_0x302ae2){return _0xa63d01+_0x302ae2;}};let _0x48c440=0x0;for(let _0x504b0d=0x0;_0x593691['hAhth'](_0x504b0d,_0x5e8cb9);_0x504b0d++){_0x48c440=_0x593691[_0x4d92d9(0xe6)](_0x48c440*0x100,_0x504db8[_0x312c3f+_0x504b0d]);}return _0x48c440;}function isUnknownSize(_0x51cda5,_0x13eee4){const _0x439f35=_0x4621,_0x20e510={'qYpCo':function(_0x3c8e4,_0x1be7ea){return _0x3c8e4-_0x1be7ea;}};return _0x51cda5===_0x20e510[_0x439f35(0x11d)](Math['pow'](0x2,0x7*_0x13eee4),0x1);}function writeVint(_0x3be58a,_0xea3b58){const _0x208569=_0x4621,_0x26b92b={'IdRaB':function(_0x39249e,_0x5ba817){return _0x39249e||_0x5ba817;},'Akcfn':function(_0x1d6d45,_0x4db16f){return _0x1d6d45<_0x4db16f;},'UnZDR':function(_0x1fd2b1,_0x58072e){return _0x1fd2b1*_0x58072e;},'TOQxH':function(_0x8c7ffc,_0x14f1a8){return _0x8c7ffc-_0x14f1a8;},'Ebwkb':function(_0x46f315,_0xb7f5b6){return _0x46f315&_0xb7f5b6;},'JbAgb':function(_0x27583d,_0x4683ee){return _0x27583d/_0x4683ee;}};let _0x1ec2f2=_0x26b92b[_0x208569(0x102)](_0xea3b58,0x1);while(_0x26b92b['Akcfn'](Math['pow'](0x2,_0x26b92b['UnZDR'](0x7,_0x1ec2f2))-0x2,_0x3be58a))_0x1ec2f2++;const _0x19515b=Buffer['alloc'](_0x1ec2f2);for(let _0x1ed74f=_0x26b92b[_0x208569(0xe5)](_0x1ec2f2,0x1);_0x1ed74f>=0x0;_0x1ed74f--){_0x19515b[_0x1ed74f]=_0x26b92b['Ebwkb'](_0x3be58a,0xff),_0x3be58a=Math['floor'](_0x26b92b['JbAgb'](_0x3be58a,0x100));}return _0x19515b[0x0]|=0x1<<0x8-_0x1ec2f2,_0x19515b;}function writeUint(_0x412794,_0x3c3a46){const _0x3c16f5=_0x4621,_0xe59179={'AdIEE':function(_0x29b5dd,_0x5f1213){return _0x29b5dd-_0x5f1213;}},_0x2bcc82=Buffer[_0x3c16f5(0xe9)](_0x3c3a46);for(let _0x1c3a8f=_0xe59179['AdIEE'](_0x3c3a46,0x1);_0x1c3a8f>=0x0;_0x1c3a8f--){_0x2bcc82[_0x1c3a8f]=_0x412794&0xff,_0x412794=Math[_0x3c16f5(0xf4)](_0x412794/0x100);}return _0x2bcc82;}function writeUnknownSizeVint(_0x590f88){const _0x2767af=_0x4621,_0x53160d={'oxjuk':function(_0x281be8,_0x5cdee2){return _0x281be8-_0x5cdee2;}},_0x29f861=Buffer[_0x2767af(0xe9)](_0x590f88,0xff);return _0x29f861[0x0]=0xff>>_0x53160d[_0x2767af(0xe8)](_0x590f88,0x1),_0x29f861;}function uintSize(_0x40bb71){const _0x21f6c7=_0x4621,_0x260818={'VAABF':function(_0x4763c2,_0x40fd79){return _0x4763c2===_0x40fd79;},'TWChh':function(_0x3ee6fa,_0x13c92b){return _0x3ee6fa>_0x13c92b;},'SQQvM':function(_0x24856b,_0x3c6684){return _0x24856b/_0x3c6684;}};if(_0x260818[_0x21f6c7(0xdd)](_0x40bb71,0x0))return 0x1;let _0x1ea482=0x0,_0x409c5c=_0x40bb71;while(_0x260818[_0x21f6c7(0x11a)](_0x409c5c,0x0)){_0x1ea482++,_0x409c5c=Math['floor'](_0x260818['SQQvM'](_0x409c5c,0x100));}return _0x1ea482;}function findTimestampScale(_0x484f42,_0x1eaf14){const _0x4ed432=_0x4621,_0x1d8bf8={'GNQVC':function(_0x412e70,_0xa289c0){return _0x412e70+_0xa289c0;},'GwhuP':function(_0x41119c,_0x433c0b){return _0x41119c<_0x433c0b;},'fyLNX':function(_0x16ec14,_0x496a26,_0x4e593e){return _0x16ec14(_0x496a26,_0x4e593e);},'tPFLY':function(_0x20fc7f,_0x5077c6){return _0x20fc7f===_0x5077c6;},'dNSyu':function(_0x3fb343,_0x1d9f25){return _0x3fb343+_0x1d9f25;},'pZzhD':function(_0x7d6d75,_0x1d10ba,_0x1f8e93){return _0x7d6d75(_0x1d10ba,_0x1f8e93);},'txFqY':function(_0x275017,_0x27b201){return _0x275017+_0x27b201;}};let _0x374740=_0x1eaf14;const _0x573285=Math['min'](_0x484f42[_0x4ed432(0xf5)],_0x1d8bf8['GNQVC'](_0x1eaf14,0x2710));while(_0x1d8bf8[_0x4ed432(0x10d)](_0x374740,_0x573285)){const [_0x485445,_0x572e4a]=readId(_0x484f42,_0x374740),[_0x29ff08,_0xaef361]=_0x1d8bf8['fyLNX'](readVint,_0x484f42,_0x374740+_0x572e4a);if(_0x1d8bf8['tPFLY'](_0x485445,ID_INFO)){let _0x4b4c20=_0x1d8bf8[_0x4ed432(0xf9)](_0x374740+_0x572e4a,_0xaef361);const _0x3c1716=_0x1d8bf8['GNQVC'](_0x4b4c20,_0x29ff08);while(_0x4b4c20<_0x3c1716){const [_0x233ba8,_0x3f2d7c]=_0x1d8bf8[_0x4ed432(0x109)](readId,_0x484f42,_0x4b4c20),[_0x271369,_0x524beb]=_0x1d8bf8[_0x4ed432(0x109)](readVint,_0x484f42,_0x4b4c20+_0x3f2d7c);if(_0x233ba8===ID_TIMESTAMP_SCALE)return readUint(_0x484f42,_0x1d8bf8[_0x4ed432(0xf8)](_0x4b4c20+_0x3f2d7c,_0x524beb),_0x271369);_0x4b4c20+=_0x1d8bf8[_0x4ed432(0xf8)](_0x3f2d7c,_0x524beb)+_0x271369;}break;}if(_0x1d8bf8[_0x4ed432(0xf7)](_0x485445,ID_CLUSTER))break;if(_0x1d8bf8['pZzhD'](isUnknownSize,_0x29ff08,_0xaef361))break;_0x374740+=_0x1d8bf8['txFqY'](_0x572e4a+_0xaef361,_0x29ff08);}return 0xf4240;}function findFirstClusterOffset(_0x4f10f4,_0x4cec3d){const _0x45bfe8=_0x4621,_0x2fad94={'MhRka':function(_0x5ad2dd,_0x461749){return _0x5ad2dd<_0x461749;},'ALKBN':function(_0x4c66cf,_0x1ba35f,_0x3e5efc){return _0x4c66cf(_0x1ba35f,_0x3e5efc);},'qddHF':function(_0x37fd4e,_0x161c0a){return _0x37fd4e+_0x161c0a;}};let _0x1aad88=_0x4cec3d;while(_0x2fad94['MhRka'](_0x1aad88,_0x4f10f4[_0x45bfe8(0xf5)])){const [_0x538a0d,_0xcfb983]=readId(_0x4f10f4,_0x1aad88);if(_0x538a0d===ID_CLUSTER)return _0x1aad88;const [_0x40eb23,_0x70db8b]=readVint(_0x4f10f4,_0x1aad88+_0xcfb983);if(_0x2fad94['ALKBN'](isUnknownSize,_0x40eb23,_0x70db8b))return _0x1aad88;_0x1aad88+=_0x2fad94[_0x45bfe8(0x10c)](_0x2fad94['qddHF'](_0xcfb983,_0x70db8b),_0x40eb23);}return _0x4f10f4[_0x45bfe8(0xf5)];}function findClusterEnd(_0x3b8261,_0x40d1e6,_0x6fc84e,_0x3e9651){const _0x1d4bdc={'hdfnm':function(_0x42b718,_0xa9c3ae,_0x987ad8){return _0x42b718(_0xa9c3ae,_0x987ad8);},'cWKBM':function(_0x40e068,_0x1cfd61){return _0x40e068+_0x1cfd61;}};if(!isUnknownSize(_0x6fc84e,_0x3e9651))return _0x40d1e6+_0x6fc84e;const _0x4efe6d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x3f1867=_0x40d1e6;while(_0x3f1867<_0x3b8261['length']-0x4){const [_0x2dcce2,_0x2b8894]=readId(_0x3b8261,_0x3f1867);if(_0x4efe6d['has'](_0x2dcce2))return _0x3f1867;const [_0x1105f7,_0x568120]=readVint(_0x3b8261,_0x3f1867+_0x2b8894);if(_0x1d4bdc['hdfnm'](isUnknownSize,_0x1105f7,_0x568120))return _0x3b8261['length'];_0x3f1867+=_0x1d4bdc['cWKBM'](_0x2b8894,_0x568120)+_0x1105f7;}return _0x3b8261['length'];}function extractClusters(_0x15a0f1,_0x8b7ea2){const _0x54eb3c=_0x4621,_0x5a94ff={'Qsvet':function(_0x35966f,_0x195f6c){return _0x35966f<_0x195f6c;},'KUJRD':function(_0x5bb2aa,_0x7b0f8a){return _0x5bb2aa===_0x7b0f8a;},'mDxPM':function(_0x5b5aad,_0x221b23){return _0x5b5aad!==_0x221b23;},'NYbEf':function(_0x117a1e,_0x39365b){return _0x117a1e+_0x39365b;},'QSFWA':function(_0x20fdb2,_0x9df418,_0x272b3c){return _0x20fdb2(_0x9df418,_0x272b3c);},'GJqdf':function(_0x2673d6,_0x4d580f,_0x76fd8f){return _0x2673d6(_0x4d580f,_0x76fd8f);},'jKZBK':function(_0x341181,_0xa3baa,_0x3b7a18,_0x477b30){return _0x341181(_0xa3baa,_0x3b7a18,_0x477b30);},'HEjKv':function(_0x5bfcad,_0x2dbd2f){return _0x5bfcad+_0x2dbd2f;},'znJdW':function(_0x5a260c,_0x12ed68){return _0x5a260c+_0x12ed68;},'HOaWg':function(_0x1b6416,_0x216f8d){return _0x1b6416+_0x216f8d;},'FexMj':function(_0x3265e6,_0x2c4827){return _0x3265e6+_0x2c4827;},'yxRiv':function(_0x424a10,_0x17b034){return _0x424a10>_0x17b034;},'kEaHo':function(_0x50325b,_0x58a073){return _0x50325b+_0x58a073;}},_0x396451=[],_0x4fece3=Buffer[_0x54eb3c(0x115)]([0x1f,0x43,0xb6,0x75]);let _0x514630=0x0;while(_0x5a94ff[_0x54eb3c(0xfe)](_0x514630,_0x15a0f1['length'])){const _0xd32187=_0x15a0f1[_0x54eb3c(0xf0)](_0x4fece3,_0x514630);if(_0x5a94ff['KUJRD'](_0xd32187,-0x1))break;const [_0x4443b3,_0xd03a1b]=readId(_0x15a0f1,_0xd32187);if(_0x5a94ff['mDxPM'](_0x4443b3,ID_CLUSTER)){_0x514630=_0x5a94ff[_0x54eb3c(0x112)](_0xd32187,0x1);continue;}const [_0x523325,_0x2a7992]=readVint(_0x15a0f1,_0xd32187+_0xd03a1b),_0x19357c=_0x5a94ff[_0x54eb3c(0x112)](_0xd32187+_0xd03a1b,_0x2a7992),_0x51de94=findClusterEnd(_0x15a0f1,_0x19357c,_0x523325,_0x2a7992);let _0x19ad68=_0x19357c,_0x2fe3d1=0x0,_0x7c2c68=0x2,_0x4b286b=![],_0x2b9068=Buffer[_0x54eb3c(0xe9)](0x0),_0x34b28a=Buffer['alloc'](0x0);while(_0x19ad68<_0x51de94){const [_0x1b3eb6,_0x2c1e41]=_0x5a94ff['QSFWA'](readId,_0x15a0f1,_0x19ad68),[_0x299391,_0x35c218]=_0x5a94ff['GJqdf'](readVint,_0x15a0f1,_0x19ad68+_0x2c1e41);if(_0x1b3eb6===ID_TIMESTAMP){_0x2fe3d1=_0x5a94ff[_0x54eb3c(0x111)](readUint,_0x15a0f1,_0x5a94ff[_0x54eb3c(0x112)](_0x5a94ff[_0x54eb3c(0x117)](_0x19ad68,_0x2c1e41),_0x35c218),_0x299391),_0x7c2c68=_0x299391,_0x4b286b=!![],_0x2b9068=_0x15a0f1['slice'](_0x19357c,_0x19ad68);const _0x2ecf22=_0x5a94ff[_0x54eb3c(0xfc)](_0x5a94ff['znJdW'](_0x5a94ff['HOaWg'](_0x19ad68,_0x2c1e41),_0x35c218),_0x299391);_0x34b28a=_0x15a0f1['slice'](_0x2ecf22,_0x51de94);break;}if(_0x5a94ff[_0x54eb3c(0xdf)](_0x1b3eb6,ID_CLUSTER))break;if(isUnknownSize(_0x299391,_0x35c218))break;_0x19ad68+=_0x5a94ff[_0x54eb3c(0xec)](_0x2c1e41,_0x35c218)+_0x299391;}!_0x4b286b&&(_0x34b28a=_0x15a0f1[_0x54eb3c(0xe0)](_0x19357c,_0x51de94));let _0x587add=_0x2fe3d1;_0x19ad68=_0x19357c;while(_0x19ad68<_0x51de94){const [_0x5ace91,_0x43de75]=_0x5a94ff['QSFWA'](readId,_0x15a0f1,_0x19ad68),[_0x2fc138,_0x10af2c]=readVint(_0x15a0f1,_0x19ad68+_0x43de75);if(_0x5a94ff[_0x54eb3c(0xdf)](_0x5ace91,ID_SIMPLE_BLOCK)&&_0x2fc138>=0x4){const _0x3b2972=_0x19ad68+_0x43de75+_0x10af2c,[,_0xadab9f]=_0x5a94ff['QSFWA'](readVint,_0x15a0f1,_0x3b2972),_0x4ef02e=_0x15a0f1[_0x54eb3c(0xd9)](_0x3b2972+_0xadab9f),_0x4b549a=_0x2fe3d1+_0x4ef02e;if(_0x5a94ff[_0x54eb3c(0xfb)](_0x4b549a,_0x587add))_0x587add=_0x4b549a;}if(_0x5a94ff[_0x54eb3c(0xdf)](_0x5ace91,ID_CLUSTER))break;if(isUnknownSize(_0x2fc138,_0x10af2c))break;_0x19ad68+=_0x5a94ff[_0x54eb3c(0x112)](_0x5a94ff['kEaHo'](_0x43de75,_0x10af2c),_0x2fc138);}_0x396451[_0x54eb3c(0x10e)]({'timestamp':_0x2fe3d1,'maxTicks':_0x587add,'bodyBeforeTimestamp':_0x2b9068,'bodyAfterTimestamp':_0x34b28a,'timestampElementSize':_0x7c2c68}),_0x514630=_0x51de94;}return _0x396451;}function parseWebm(_0x4dd1d8){const _0x8e87b9=_0x4621,_0x3eb857={'NQoDm':function(_0x12e605,_0x4e452a,_0xab9795){return _0x12e605(_0x4e452a,_0xab9795);},'bFIyG':function(_0x3e2101,_0x50838b){return _0x3e2101+_0x50838b;},'YgLcf':function(_0x3c279f,_0x36e2fd,_0x1c3c1f){return _0x3c279f(_0x36e2fd,_0x1c3c1f);},'KDITo':function(_0x3e9d98,_0x2b1e54){return _0x3e9d98+_0x2b1e54;},'gfcRA':function(_0x4136fd,_0x1e00cb,_0xbf52bb){return _0x4136fd(_0x1e00cb,_0xbf52bb);},'svOlw':function(_0x348604,_0x4c43a6){return _0x348604>_0x4c43a6;}};let _0x22eae7=0x0;const [,_0x29ed11]=_0x3eb857['NQoDm'](readId,_0x4dd1d8,_0x22eae7),[_0x562bad,_0x328b35]=_0x3eb857['NQoDm'](readVint,_0x4dd1d8,_0x22eae7+_0x29ed11);_0x22eae7+=_0x3eb857[_0x8e87b9(0x101)](_0x3eb857['bFIyG'](_0x29ed11,_0x328b35),_0x562bad);const [_0x1f2aed,_0x36349d]=readId(_0x4dd1d8,_0x22eae7);if(_0x1f2aed!==ID_SEGMENT)return null;const [,_0x5aca61]=_0x3eb857[_0x8e87b9(0x119)](readVint,_0x4dd1d8,_0x22eae7+_0x36349d),_0x2d1d0f=_0x3eb857[_0x8e87b9(0x101)](_0x3eb857['KDITo'](_0x22eae7,_0x36349d),_0x5aca61),_0x33af91=findTimestampScale(_0x4dd1d8,_0x2d1d0f),_0x1aba5c=_0x3eb857[_0x8e87b9(0x107)](findFirstClusterOffset,_0x4dd1d8,_0x2d1d0f),_0x4742b8=_0x4dd1d8['slice'](0x0,_0x1aba5c),_0x4d7b29=extractClusters(_0x4dd1d8,_0x33af91);let _0x416619=0x0;for(const _0x5f58d3 of _0x4d7b29){if(_0x3eb857[_0x8e87b9(0x106)](_0x5f58d3[_0x8e87b9(0x108)],_0x416619))_0x416619=_0x5f58d3['maxTicks'];}return{'header':_0x4742b8,'clusters':_0x4d7b29,'timestampScale':_0x33af91,'maxTimestampTicks':_0x416619};}function buildCluster(_0x3beb8b,_0x29cc30,_0x104d02){const _0x2564dd=_0x4621,_0x43d416={'jRHqi':function(_0x36e77f,_0x41bac9){return _0x36e77f(_0x41bac9);},'yuRIF':function(_0x315827,_0x5399b9,_0x3ba38b){return _0x315827(_0x5399b9,_0x3ba38b);}},_0x158319=Buffer[_0x2564dd(0x115)]([0x1f,0x43,0xb6,0x75]),_0xe59f68=Math['max'](0x4,_0x43d416['jRHqi'](uintSize,_0x3beb8b)),_0x48eea0=Buffer['concat']([Buffer[_0x2564dd(0x115)]([ID_TIMESTAMP]),_0x43d416[_0x2564dd(0x104)](writeVint,_0xe59f68),_0x43d416['yuRIF'](writeUint,_0x3beb8b,_0xe59f68)]),_0x120a43=Buffer['concat']([_0x29cc30,_0x48eea0,_0x104d02]),_0x47beb7=writeVint(_0x120a43['length']);return Buffer[_0x2564dd(0xff)]([_0x158319,_0x47beb7,_0x120a43]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x33813c){const _0x18b666=_0x4621,_0x210a7a={'jEGqV':function(_0x4d46d8,_0x2945c5,_0xc4ee2c){return _0x4d46d8(_0x2945c5,_0xc4ee2c);},'DlKMF':function(_0x3d40e4,_0x17216c){return _0x3d40e4+_0x17216c;},'beXqy':function(_0x561cd0,_0x3d1681){return _0x561cd0+_0x3d1681;},'ertCR':function(_0x1f33a2,_0x4b56c7,_0x226e08){return _0x1f33a2(_0x4b56c7,_0x226e08);},'etTtz':function(_0x575f9d,_0xca13d8){return _0x575f9d+_0xca13d8;},'CMedD':function(_0xa65b4f,_0x18e0d5){return _0xa65b4f+_0x18e0d5;},'dbXTc':function(_0x41749e,_0x580b1e){return _0x41749e<_0x580b1e;},'drLgr':function(_0x3a6760,_0x494dd2,_0x4ae0ad){return _0x3a6760(_0x494dd2,_0x4ae0ad);},'WkzVq':function(_0x486262,_0x2b60f8){return _0x486262+_0x2b60f8;},'pROgg':function(_0x5d571f,_0x25278e,_0xf202ba){return _0x5d571f(_0x25278e,_0xf202ba);},'kbePJ':function(_0x4ffdef,_0x3524fb){return _0x4ffdef+_0x3524fb;}},_0x3b8540=Buffer[_0x18b666(0x115)](_0x33813c);let _0x311461=0x0;const [,_0xbafa13]=_0x210a7a['jEGqV'](readId,_0x3b8540,_0x311461),[_0x2e8de1,_0x46c555]=readVint(_0x3b8540,_0x210a7a['DlKMF'](_0x311461,_0xbafa13)),_0x1d1e48=_0x210a7a['beXqy'](_0x210a7a['beXqy'](_0x311461,_0xbafa13),_0x46c555)+_0x2e8de1,[,_0x365ef5]=_0x210a7a[_0x18b666(0xf1)](readId,_0x3b8540,_0x1d1e48),[,_0x4b70ee]=readVint(_0x3b8540,_0x1d1e48+_0x365ef5),_0x12a855=_0x210a7a[_0x18b666(0xe7)](_0x210a7a['etTtz'](_0x1d1e48,_0x365ef5),_0x4b70ee),_0x3dd030=writeUnknownSizeVint(_0x4b70ee);_0x3dd030[_0x18b666(0xf6)](_0x3b8540,_0x210a7a['CMedD'](_0x1d1e48,_0x365ef5));let _0x557ec3=_0x12a855;const _0x5208c3=Math['min'](_0x3b8540[_0x18b666(0xf5)],_0x12a855+0x2710);while(_0x210a7a['dbXTc'](_0x557ec3,_0x5208c3)){const [_0x5358e5,_0x56305a]=_0x210a7a[_0x18b666(0xee)](readId,_0x3b8540,_0x557ec3),[_0x4172e6,_0x2457c8]=_0x210a7a['drLgr'](readVint,_0x3b8540,_0x557ec3+_0x56305a);if(_0x5358e5===ID_CLUSTER)break;if(_0x210a7a[_0x18b666(0xee)](isUnknownSize,_0x4172e6,_0x2457c8))break;if(_0x5358e5===ID_INFO){const _0x5cbfc8=_0x210a7a[_0x18b666(0xe4)](_0x210a7a['WkzVq'](_0x557ec3,_0x56305a),_0x2457c8),_0x55890a=_0x210a7a['WkzVq'](_0x5cbfc8,_0x4172e6),_0x3974cd=[];let _0x983b70=_0x5cbfc8;while(_0x983b70<_0x55890a){const [_0x306f24,_0x5e04e6]=_0x210a7a['pROgg'](readId,_0x3b8540,_0x983b70),[_0xf75fc8,_0x819473]=readVint(_0x3b8540,_0x983b70+_0x5e04e6),_0x3e5289=_0x5e04e6+_0x819473+_0xf75fc8;_0x306f24!==ID_DURATION&&_0x3974cd[_0x18b666(0x10e)](_0x3b8540[_0x18b666(0xe0)](_0x983b70,_0x210a7a['etTtz'](_0x983b70,_0x3e5289))),_0x983b70+=_0x3e5289;}const _0x408064=Buffer[_0x18b666(0xff)](_0x3974cd),_0x11ddfc=Buffer[_0x18b666(0xff)]([_0x3b8540['slice'](_0x557ec3,_0x557ec3+_0x56305a),_0x210a7a[_0x18b666(0xe3)](writeVint,_0x408064[_0x18b666(0xf5)],_0x2457c8)]);return Buffer['concat']([_0x3b8540['slice'](0x0,_0x557ec3),_0x11ddfc,_0x408064,_0x3b8540['slice'](_0x55890a)]);}_0x557ec3+=_0x210a7a[_0x18b666(0x10f)](_0x56305a,_0x2457c8)+_0x4172e6;}return _0x3b8540;}export function stitchWebmFiles(_0x15c04d,_0x1b4e9a){const _0x26981b=_0x4621,_0x25d022={'XZBsp':function(_0x57bbb7,_0x15fd8e){return _0x57bbb7===_0x15fd8e;},'hundk':function(_0x21e400,_0xcd80e5){return _0x21e400(_0xcd80e5);},'tgTVN':function(_0x228d68,_0x8b19a6){return _0x228d68+_0x8b19a6;},'wUmJv':function(_0xd30917,_0x55e131,_0x1623be){return _0xd30917(_0x55e131,_0x1623be);}};if(_0x15c04d['length']<=0x1)return![];const _0x3a8ddb=[];for(const _0x1cb20e of _0x15c04d){const _0xb8a358=readFileSync(_0x1cb20e),_0xac0dc1=parseWebm(_0xb8a358);if(!_0xac0dc1||_0x25d022[_0x26981b(0xef)](_0xac0dc1[_0x26981b(0x105)]['length'],0x0))return![];_0x3a8ddb[_0x26981b(0x10e)](_0xac0dc1);}const _0x312e6f=_0x3a8ddb[0x0],_0x1756e4=_0x25d022[_0x26981b(0x10a)](rebuildHeaderWithoutDuration,_0x312e6f['header']),_0x52c922=[_0x1756e4];let _0x397977=0x0;for(let _0x1cd243=0x0;_0x1cd243<_0x3a8ddb[_0x26981b(0xf5)];_0x1cd243++){const _0x16af68=_0x3a8ddb[_0x1cd243];for(const _0x14dd13 of _0x16af68[_0x26981b(0x105)]){const _0x30e6ec=_0x14dd13[_0x26981b(0xea)]+_0x397977;_0x52c922[_0x26981b(0x10e)](buildCluster(_0x30e6ec,_0x14dd13['bodyBeforeTimestamp'],_0x14dd13[_0x26981b(0xd8)]));}const _0x4b28c6=0x1e;_0x397977+=_0x25d022[_0x26981b(0xde)](_0x16af68['maxTimestampTicks'],_0x4b28c6);}return _0x25d022['wUmJv'](writeFileSync,_0x1b4e9a,Buffer['concat'](_0x52c922)),!![];}if(process['argv'][0x1]?.['endsWith'](_0xc3913b(0x114))||process[_0xc3913b(0x110)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console[_0xc3913b(0x103)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0xc3913b(0x116)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0xc3913b(0xe1)](_0xc3913b(0x118)+inputs['length']+_0xc3913b(0xe2)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|