@ranger-testing/ranger-cli 3.1.4-alpha.fb796e7-45 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -0
- 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 _0x555c(){const _0x2f1d6d=['\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','baseUrl','317220dThtFE','404907dViwVU','envBaseUrl','name','cwd','LcKKv','JMpic','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','url','cloud','string','startPath','Profile\x20\x22','RANGER_SESSION_STATE_PATH','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','9pIwQVV','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','PXnHW','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','profile','resolvedEnv','240785fXMuus','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','source','DISKK','EBrOr','environmentKey','RANGER_SESSION_STATE_PATH=','Cloud\x20profile\x20(recommended)','telemetry','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','8qVsMqx','Mejcv','ngFtj','ItiZI','log','length','NodMo','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','Local\x20profile','332804pgGRZC','hGGRM','cdpEndpoint','ivJft','envStartPath','380302yzhmjH','fKSUQ','status','TYffA','zGwlD','SkFxe','742238QvGSkg','UfPXS','zWRqU','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','domains','3264410IfDgXR','36uBNBZe','settings'];_0x555c=function(){return _0x2f1d6d;};return _0x555c();}(function(_0x3e7b67,_0x15e14b){const _0x182a6a=_0x2807,_0x2afdc2=_0x3e7b67();while(!![]){try{const _0x407736=-parseInt(_0x182a6a(0x167))/0x1+-parseInt(_0x182a6a(0x157))/0x2+-parseInt(_0x182a6a(0x168))/0x3+parseInt(_0x182a6a(0x18f))/0x4+-parseInt(_0x182a6a(0x17c))/0x5*(-parseInt(_0x182a6a(0x163))/0x6)+parseInt(_0x182a6a(0x15d))/0x7*(parseInt(_0x182a6a(0x186))/0x8)+-parseInt(_0x182a6a(0x176))/0x9*(-parseInt(_0x182a6a(0x162))/0xa);if(_0x407736===_0x15e14b)break;else _0x2afdc2['push'](_0x2afdc2['shift']());}catch(_0x590a26){_0x2afdc2['push'](_0x2afdc2['shift']());}}}(_0x555c,0x279e6));import{existsSync}from'fs';import _0x2c2e87 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x1a680e){const _0xb6517e=_0x2807,_0x5825b4={'Mejcv':function(_0x5209f3){return _0x5209f3();},'zWRqU':function(_0x4a993c){return _0x4a993c();},'uhdtw':function(_0x41f7ae,_0x486d0c){return _0x41f7ae===_0x486d0c;},'PbuyC':function(_0x383262,_0x29dbcf){return _0x383262+_0x29dbcf;},'ItiZI':_0xb6517e(0x179),'GRpfW':_0xb6517e(0x165),'MFDPB':_0xb6517e(0x18d),'ppPVm':_0xb6517e(0x16e),'zGwlD':function(_0x500532,_0x478068){return _0x500532(_0x478068);},'YeTQn':function(_0x56d0d2,_0x17111e){return _0x56d0d2(_0x17111e);},'IoEha':function(_0x45d401,_0x45ec7d){return _0x45d401===_0x45ec7d;},'EGFjX':function(_0x48726a,_0x1e05c8){return _0x48726a&&_0x1e05c8;},'ivJft':function(_0x344c24,_0x19fc17){return _0x344c24+_0x19fc17;},'mdgjU':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','iubOV':_0xb6517e(0x17e),'fKSUQ':_0xb6517e(0x170),'EBrOr':_0xb6517e(0x18e),'LcKKv':'local','JMpic':function(_0xae357f,_0x1f96a6){return _0xae357f===_0x1f96a6;},'PXnHW':function(_0x60caff,_0x4ab460,_0x41e753){return _0x60caff(_0x4ab460,_0x41e753);},'ozObz':function(_0x4eee00,_0x3226b0){return _0x4eee00(_0x3226b0);},'Lmwcw':function(_0x1d9966,_0x5b8011){return _0x1d9966??_0x5b8011;},'SkFxe':function(_0x15c4d3,_0x1a3039){return _0x15c4d3(_0x1a3039);},'UfPXS':function(_0x314bee,_0x1cd57d){return _0x314bee(_0x1cd57d);},'QAQKe':function(_0x38428f,_0x4682fe){return _0x38428f(_0x4682fe);},'hGGRM':function(_0x3222c9,_0x124945){return _0x3222c9(_0x124945);},'NodMo':function(_0x5d8fae,_0x436bc0){return _0x5d8fae(_0x436bc0);},'tUCiX':function(_0x1bb4a0,_0x1b72f9){return _0x1bb4a0(_0x1b72f9);},'pYACp':function(_0x49fc40,_0x55a26c){return _0x49fc40&&_0x55a26c;}},_0x465ede=_0x1a680e[_0xb6517e(0x17a)];let _0x591a4a=_0x1a680e[_0xb6517e(0x17a)]??await _0x5825b4[_0xb6517e(0x187)](readActiveProfileName),_0x5a8378=null;if(!_0x591a4a&&process['env']['RANGER_TEST_USERNAME']){const _0x4a185e=await resolveAdHocProfile();_0x4a185e&&(_0x591a4a=_0x4a185e[_0xb6517e(0x16a)],_0x5a8378=_0x4a185e[_0xb6517e(0x17a)]);}if(!_0x591a4a)try{const _0x310283=await _0x5825b4[_0xb6517e(0x15f)](listCloudProfiles);if(_0x5825b4['uhdtw'](_0x310283[_0xb6517e(0x18b)],0x1)){const _0x4a0887=_0x310283[0x0];_0x591a4a=_0x4a0887['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x4a0887[_0xb6517e(0x16a)]),console[_0xb6517e(0x18a)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x591a4a)throw new Error(_0x5825b4['PbuyC'](_0x5825b4[_0xb6517e(0x189)]+'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a',_0x5825b4['GRpfW'])+_0x5825b4['MFDPB']+_0x5825b4['ppPVm']);const _0x19e303=getEnvDir(_0x591a4a),_0x4b6251=_0x5825b4['zGwlD'](existsSync,_0x19e303);let _0x6322a=_0x5a8378,_0x525126=![];if(!_0x6322a)try{_0x6322a=await _0x5825b4['YeTQn'](fetchCloudProfile,_0x591a4a);if(!_0x6322a)_0x525126=!![];}catch(_0x1c6c62){_0x1c6c62 instanceof ApiError&&_0x5825b4['IoEha'](_0x1c6c62[_0xb6517e(0x159)],0x194)&&(_0x525126=!![]);}if(_0x5825b4['EGFjX'](_0x465ede,_0x525126)&&!_0x4b6251&&!_0x6322a)throw new Error(_0x5825b4[_0xb6517e(0x192)](_0xb6517e(0x173)+_0x465ede+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0xb6517e(0x175),_0x5825b4['mdgjU']));if(_0x6322a&&_0x4b6251){let _0x5d342c=!![];if(_0x5825b4['zWRqU'](isInteractive)){const {source:_0x1155c5}=await _0x2c2e87['prompt']([{'type':'list','name':_0x5825b4['iubOV'],'message':'Profile\x20\x22'+_0x591a4a+_0xb6517e(0x160),'choices':[{'name':_0xb6517e(0x183),'value':_0x5825b4[_0xb6517e(0x158)]},{'name':_0x5825b4[_0xb6517e(0x180)],'value':_0x5825b4[_0xb6517e(0x16c)]}],'default':_0xb6517e(0x170)}]);_0x5d342c=_0x5825b4[_0xb6517e(0x16d)](_0x1155c5,_0x5825b4[_0xb6517e(0x158)]);}if(!_0x5d342c)_0x6322a=null;}const _0x102e2e=_0x5825b4[_0xb6517e(0x178)](readProfileOverrides,process[_0xb6517e(0x16b)](),_0x591a4a);let _0x464deb=null,_0x3fbf07,_0x30d1a8,_0x291c70,_0x481347,_0x2aaecb=null,_0x5c80db;const _0x5bec18=_0x5825b4['ozObz'](expandOverrides,_0x102e2e),_0x12b8be=readUrlEnvVars();if(_0x6322a){_0x464deb=_0x6322a;const _0x2290a4=_0x6322a[_0xb6517e(0x164)]??{},_0x2e30ff=mergeCloudProfileSettings(_0x2290a4,_0x5825b4['Lmwcw'](_0x102e2e,undefined)),_0x31cbde={..._0x6322a,'settings':_0x2e30ff};_0x2aaecb={'baseUrl':_0x5825b4['SkFxe'](expandString,_0x2290a4['baseUrl']),'startPath':expandString(_0x2290a4[_0xb6517e(0x172)])};const _0x177cc3=await _0x5825b4['Mejcv'](fetchAuthConfig),_0x45ce89=_0x177cc3?resolveAuthEnvironmentLocally(_0x177cc3,_0x6322a[_0xb6517e(0x181)]):null;_0x5c80db=_0x45ce89?.[_0xb6517e(0x161)]?.[0x0];const _0x4db832=resolveProfileUrl({'flagBaseUrl':_0x1a680e[_0xb6517e(0x166)],'flagStartPath':_0x1a680e[_0xb6517e(0x172)],'envBaseUrl':_0x12b8be[_0xb6517e(0x169)],'envStartPath':_0x12b8be[_0xb6517e(0x156)],'projectOverrides':_0x5bec18,'cloudSettings':_0x2aaecb,'authEnvironmentDomain':_0x5c80db}),_0x2e6c50=process['env'][_0xb6517e(0x174)];if(_0x2e6c50){if(!_0x5825b4[_0xb6517e(0x15e)](existsSync,_0x2e6c50))throw new Error(_0xb6517e(0x182)+_0x2e6c50+'\x20does\x20not\x20exist.');_0x3fbf07=_0x2e6c50,_0x30d1a8=_0x5825b4['QAQKe'](resolveEnvVars,_0x2e30ff),_0x291c70=_0x5825b4[_0xb6517e(0x190)](Boolean,_0x30d1a8['cdpEndpoint']);}else{const _0x37a7bd=await resolveCloudProfileSession(_0x31cbde,{'effectiveBaseUrl':_0x4db832['baseUrl'],'telemetry':_0x1a680e[_0xb6517e(0x184)]});_0x3fbf07=_0x37a7bd['authPath'],_0x30d1a8=_0x5825b4['ozObz'](resolveEnvVars,_0x37a7bd['settings']),_0x291c70=Boolean(_0x30d1a8[_0xb6517e(0x191)]),_0x5c80db=_0x37a7bd[_0xb6517e(0x17b)]?.[_0xb6517e(0x161)]?.[0x0];}}else{if(!_0x4b6251)throw new Error(_0xb6517e(0x173)+_0x591a4a+_0xb6517e(0x185)+_0x591a4a);const _0x3f3b3d=await _0x5825b4[_0xb6517e(0x15c)](loadSettings,_0x591a4a);_0x30d1a8=_0x5825b4[_0xb6517e(0x15b)](resolveEnvVars,_0x3f3b3d),_0x291c70=_0x5825b4[_0xb6517e(0x18c)](Boolean,_0x30d1a8[_0xb6517e(0x191)]),_0x481347=_0x30d1a8[_0xb6517e(0x166)];}const _0x10ae95=_0x5825b4['tUCiX'](resolveProfileUrl,{'flagBaseUrl':_0x1a680e[_0xb6517e(0x166)],'flagStartPath':_0x1a680e['startPath'],'envBaseUrl':_0x12b8be['envBaseUrl'],'envStartPath':_0x12b8be[_0xb6517e(0x156)],'localSettingsBaseUrl':_0x481347,'projectOverrides':_0x5bec18,'cloudSettings':_0x2aaecb,'authEnvironmentDomain':_0x5c80db}),_0x43e9fe=_0x10ae95[_0xb6517e(0x16f)]??_0x10ae95['baseUrl'];if(_0x5825b4['pYACp'](!_0x43e9fe,!_0x291c70))throw new Error(_0xb6517e(0x177)+_0x591a4a+_0xb6517e(0x17d)+_0x591a4a+'\x20baseUrl\x20<url>');return{'activeProfile':_0x591a4a,'resolvedCloudProfile':_0x464deb,'cloudAuthPath':_0x3fbf07,'resolvedSettings':_0x30d1a8,'isCdpMode':_0x291c70,'url':_0x43e9fe,'startPath':_0x10ae95[_0xb6517e(0x172)]};}function expandString(_0x7e45b2){const _0x52e923=_0x2807,_0x377aa7={'TYffA':function(_0x4a5216,_0x42914d){return _0x4a5216!==_0x42914d;},'VWfQU':function(_0x20a466,_0x43d804){return _0x20a466(_0x43d804);}};if(_0x377aa7[_0x52e923(0x15a)](typeof _0x7e45b2,'string'))return _0x7e45b2;return _0x377aa7['VWfQU'](resolveEnvVars,_0x7e45b2);}function _0x2807(_0x417bf3,_0x196b15){_0x417bf3=_0x417bf3-0x156;const _0x555ced=_0x555c();let _0x280765=_0x555ced[_0x417bf3];return _0x280765;}function expandOverrides(_0x3366b5){const _0x4dad38=_0x2807,_0x7e0f3={'uPfHe':function(_0x5a6b30,_0x27e14c){return _0x5a6b30===_0x27e14c;},'DISKK':_0x4dad38(0x171),'ngFtj':function(_0x3a8d68,_0x3a97ff){return _0x3a8d68(_0x3a97ff);}};if(!_0x3366b5)return _0x3366b5;const _0x292686={..._0x3366b5};return _0x7e0f3['uPfHe'](typeof _0x292686[_0x4dad38(0x166)],_0x4dad38(0x171))&&(_0x292686[_0x4dad38(0x166)]=resolveEnvVars(_0x292686['baseUrl'])),typeof _0x292686[_0x4dad38(0x172)]===_0x7e0f3[_0x4dad38(0x17f)]&&(_0x292686[_0x4dad38(0x172)]=_0x7e0f3[_0x4dad38(0x188)](resolveEnvVars,_0x292686['startPath'])),_0x292686;}
|
|
1
|
+
(function(_0x408763,_0x140cc1){const _0x553d3a=_0x112d,_0x30aec5=_0x408763();while(!![]){try{const _0x174a2c=parseInt(_0x553d3a(0x123))/0x1*(parseInt(_0x553d3a(0x15d))/0x2)+parseInt(_0x553d3a(0x158))/0x3+parseInt(_0x553d3a(0x127))/0x4+-parseInt(_0x553d3a(0x146))/0x5*(parseInt(_0x553d3a(0x131))/0x6)+parseInt(_0x553d3a(0x132))/0x7*(-parseInt(_0x553d3a(0x169))/0x8)+parseInt(_0x553d3a(0x167))/0x9*(-parseInt(_0x553d3a(0x16b))/0xa)+parseInt(_0x553d3a(0x155))/0xb;if(_0x174a2c===_0x140cc1)break;else _0x30aec5['push'](_0x30aec5['shift']());}catch(_0x466901){_0x30aec5['push'](_0x30aec5['shift']());}}}(_0x4b06,0x215f4));import{existsSync}from'fs';import _0x4d62b7 from'inquirer';function _0x4b06(){const _0x3038c3=['RANGER_TEST_USERNAME','1990881aDFaMK','\x22.\x20Pass\x20--profile\x20','1168616ueWfce','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','10wkLWJT','baseUrl','53669XqsxUg','glvby','FTTwS','url','627348AElVvO','`ranger\x20profile\x20add`\x20to\x20create\x20one.','Hycnt','lnLys','local','cloud','\x20\x20Note:\x20--env\x20\x22','kJDNZ','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x20baseUrl\x20<url>','1448004frwHVH','7XRGxvf','cwd','cdpEndpoint','ZuzZh','TbLPu','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','RANGER_SESSION_STATE_PATH=','zBnWV','ttzqS','envStartPath','iFwis','string','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','env','authPath','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','key','startPath','`\x20to\x20recreate\x20it.','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','5IDXWKl','prompt','rLWxo','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','\x20\x20Warning:\x20','egJvD','message','domains','muWip','list','LpXku','Active\x20profile\x20\x22','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','resolvedEnv','2186602NyjAOR','telemetry','log','364044iqwZmc','name','RANGER_SESSION_STATE_PATH','pAthR','environmentKey','10LvhkGA','xQCWJ','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','VItYa','Profile\x20\x22','\x20does\x20not\x20exist.','source','baseUrlSource','authEnv'];_0x4b06=function(){return _0x3038c3;};return _0x4b06();}import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x112d(_0x286e40,_0x5369c6){_0x286e40=_0x286e40-0x123;const _0x4b0660=_0x4b06();let _0x112dae=_0x4b0660[_0x286e40];return _0x112dae;}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(_0xdedac1){const _0x1451b9=_0x112d,_0x25713b={'VItYa':function(_0x4d6f5c){return _0x4d6f5c();},'glvby':function(_0xcb7cc7,_0x5d5026){return _0xcb7cc7!==_0x5d5026;},'ZuzZh':function(_0x218534,_0x1b27af){return _0x218534===_0x1b27af;},'JkBTk':function(_0x49284c,_0x3473b){return _0x49284c+_0x3473b;},'zBnWV':function(_0x354931,_0x2f2fef){return _0x354931+_0x2f2fef;},'fbHDn':_0x1451b9(0x141),'lnLys':_0x1451b9(0x15f),'LpXku':_0x1451b9(0x128),'eHQkb':function(_0x38fcba){return _0x38fcba();},'xQCWJ':_0x1451b9(0x150),'pAthR':'Local\x20profile','YENer':_0x1451b9(0x12b),'egJvD':_0x1451b9(0x12c),'Hycnt':function(_0x13e405,_0x484e5a,_0x1cef0b){return _0x13e405(_0x484e5a,_0x1cef0b);},'iFwis':function(_0x264ddb,_0x7fc46a){return _0x264ddb(_0x7fc46a);},'VMkYS':function(_0x414ea8,_0x3a0e62){return _0x414ea8(_0x3a0e62);},'bpaik':function(_0x28aedf,_0x2acb46){return _0x28aedf(_0x2acb46);},'FTTwS':function(_0x3b9a56,_0x1235bc){return _0x3b9a56(_0x1235bc);},'muWip':function(_0x3d1481,_0x4890bd){return _0x3d1481+_0x4890bd;},'rLWxo':function(_0x59b851,_0x133166){return _0x59b851+_0x133166;},'xjDUh':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','kJDNZ':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','CbdhC':function(_0x433ac0,_0x168926){return _0x433ac0&&_0x168926;}},_0x56c4ff=_0xdedac1['profile'];let _0xb6fc86=_0x56c4ff,_0x141e34=null;const _0x422559=_0x56c4ff?null:await _0x25713b['VItYa'](readActiveProfileName);if(_0xdedac1['authEnv']&&_0x56c4ff)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0xdedac1[_0x1451b9(0x165)]+_0x1451b9(0x145));else _0xdedac1[_0x1451b9(0x165)]&&!process[_0x1451b9(0x13f)][_0x1451b9(0x166)]&&console['log'](_0x1451b9(0x12d)+_0xdedac1[_0x1451b9(0x165)]+_0x1451b9(0x14a));if(!_0x56c4ff&&process['env'][_0x1451b9(0x166)])try{const _0x51d500=await resolveAdHocProfile({'targetUrl':_0xdedac1['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0xdedac1[_0x1451b9(0x165)]});_0x51d500&&(_0x422559&&_0x25713b[_0x1451b9(0x124)](_0x422559,_0x51d500[_0x1451b9(0x159)])&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x51d500['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x422559+_0x1451b9(0x168)+_0x422559+'\x20to\x20override.'),_0xb6fc86=_0x51d500['name'],_0x141e34=_0x51d500['profile']);}catch(_0x317f6d){if(!_0x422559||_0xdedac1['authEnv'])throw _0x317f6d;console[_0x1451b9(0x157)](_0x1451b9(0x14b)+(_0x317f6d instanceof Error?_0x317f6d[_0x1451b9(0x14d)]:String(_0x317f6d))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x422559+'\x22.');}if(!_0xb6fc86)_0xb6fc86=_0x422559??undefined;if(!_0xb6fc86)try{const _0x17a562=await _0x25713b['VItYa'](listCloudProfiles);if(_0x25713b[_0x1451b9(0x135)](_0x17a562['length'],0x1)){const _0x53c762=_0x17a562[0x0];_0xb6fc86=_0x53c762['name'],console[_0x1451b9(0x157)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x53c762[_0x1451b9(0x159)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0xb6fc86)throw new Error(_0x25713b['JkBTk'](_0x25713b[_0x1451b9(0x139)](_0x1451b9(0x16a),_0x1451b9(0x13e)),_0x25713b['fbHDn'])+_0x25713b[_0x1451b9(0x12a)]+'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.');const _0x5ea535=getEnvDir(_0xb6fc86),_0x43ec5a=existsSync(_0x5ea535);let _0x3149d6=_0x141e34,_0x2886f0=![];if(!_0x3149d6)try{_0x3149d6=await fetchCloudProfile(_0xb6fc86);if(!_0x3149d6)_0x2886f0=!![];}catch(_0x1135f8){_0x1135f8 instanceof ApiError&&_0x1135f8['status']===0x194&&(_0x2886f0=!![]);}if(_0x56c4ff&&_0x2886f0&&!_0x43ec5a&&!_0x3149d6)throw new Error(_0x1451b9(0x161)+_0x56c4ff+_0x1451b9(0x12f)+'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+_0x25713b[_0x1451b9(0x151)]);if(_0x3149d6&&_0x43ec5a){let _0x4ef584=!![];if(_0x25713b['eHQkb'](isInteractive)){const {source:_0x1e6f2a}=await _0x4d62b7[_0x1451b9(0x147)]([{'type':_0x25713b[_0x1451b9(0x15e)],'name':_0x1451b9(0x163),'message':_0x1451b9(0x161)+_0xb6fc86+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':'Cloud\x20profile\x20(recommended)','value':_0x1451b9(0x12c)},{'name':_0x25713b[_0x1451b9(0x15b)],'value':_0x25713b['YENer']}],'default':_0x25713b['egJvD']}]);_0x4ef584=_0x1e6f2a===_0x25713b[_0x1451b9(0x14c)];}if(!_0x4ef584)_0x3149d6=null;}const _0x5ef393=_0x25713b[_0x1451b9(0x129)](readProfileOverrides,process[_0x1451b9(0x133)](),_0xb6fc86);let _0x381e94=null,_0x3fa04c,_0x31b19b,_0x10bc80,_0x154e3a,_0x3a5c58=null,_0x267a79,_0x30652d;const _0x39bdb5=_0x25713b[_0x1451b9(0x13c)](expandOverrides,_0x5ef393),_0x578a60=_0x25713b[_0x1451b9(0x160)](readUrlEnvVars);if(_0x3149d6){_0x381e94=_0x3149d6;const _0x24d575=_0x3149d6['settings']??{},_0x5bbc6b=_0x25713b['Hycnt'](mergeCloudProfileSettings,_0x24d575,_0x5ef393??undefined),_0x5be998={..._0x3149d6,'settings':_0x5bbc6b};_0x3a5c58={'baseUrl':_0x25713b['VMkYS'](expandString,_0x24d575['baseUrl']),'startPath':_0x25713b['bpaik'](expandString,_0x24d575[_0x1451b9(0x143)])};const _0x143886=await fetchAuthConfig(),_0x2556c9=_0x143886?_0x25713b[_0x1451b9(0x129)](resolveAuthEnvironmentLocally,_0x143886,_0x3149d6[_0x1451b9(0x15c)]):null;_0x267a79=_0x2556c9?.[_0x1451b9(0x14e)]?.[0x0],_0x30652d=_0x2556c9?.[_0x1451b9(0x142)];const _0x2b56ec=_0x25713b['iFwis'](resolveProfileUrl,{'flagBaseUrl':_0xdedac1[_0x1451b9(0x16c)],'flagStartPath':_0xdedac1['startPath'],'envBaseUrl':_0x578a60['envBaseUrl'],'envStartPath':_0x578a60['envStartPath'],'projectOverrides':_0x39bdb5,'cloudSettings':_0x3a5c58,'authEnvironmentDomain':_0x267a79}),_0x2efa4c=process[_0x1451b9(0x13f)][_0x1451b9(0x15a)];if(_0x2efa4c){if(!existsSync(_0x2efa4c))throw new Error(_0x1451b9(0x138)+_0x2efa4c+_0x1451b9(0x162));_0x3fa04c=_0x2efa4c,_0x31b19b=resolveEnvVars(_0x5bbc6b),_0x10bc80=Boolean(_0x31b19b[_0x1451b9(0x134)]);}else{const _0x1a97ec=await _0x25713b[_0x1451b9(0x129)](resolveCloudProfileSession,_0x5be998,{'effectiveBaseUrl':_0x2b56ec[_0x1451b9(0x16c)],'telemetry':_0xdedac1[_0x1451b9(0x156)]});_0x3fa04c=_0x1a97ec[_0x1451b9(0x140)],_0x31b19b=_0x25713b[_0x1451b9(0x125)](resolveEnvVars,_0x1a97ec['settings']),_0x10bc80=_0x25713b[_0x1451b9(0x125)](Boolean,_0x31b19b[_0x1451b9(0x134)]),_0x267a79=_0x1a97ec[_0x1451b9(0x154)]?.[_0x1451b9(0x14e)]?.[0x0],_0x30652d=_0x1a97ec['resolvedEnv']?.[_0x1451b9(0x142)];}}else{if(!_0x43ec5a){const _0x259034=!_0x56c4ff;throw new Error(_0x259034?_0x25713b[_0x1451b9(0x14f)](_0x25713b[_0x1451b9(0x148)](_0x1451b9(0x152)+_0xb6fc86+_0x1451b9(0x153),_0x25713b['xjDUh'])+_0x25713b[_0x1451b9(0x12e)],'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0xb6fc86+_0x1451b9(0x144)):'Profile\x20\x22'+_0xb6fc86+_0x1451b9(0x149)+_0xb6fc86);}const _0xf4655c=await loadSettings(_0xb6fc86);_0x31b19b=resolveEnvVars(_0xf4655c),_0x10bc80=Boolean(_0x31b19b['cdpEndpoint']),_0x154e3a=_0x31b19b[_0x1451b9(0x16c)];}const _0x130f38=resolveProfileUrl({'flagBaseUrl':_0xdedac1['baseUrl'],'flagStartPath':_0xdedac1[_0x1451b9(0x143)],'envBaseUrl':_0x578a60['envBaseUrl'],'envStartPath':_0x578a60[_0x1451b9(0x13b)],'localSettingsBaseUrl':_0x154e3a,'projectOverrides':_0x39bdb5,'cloudSettings':_0x3a5c58,'authEnvironmentDomain':_0x267a79}),_0x518706=_0x130f38[_0x1451b9(0x126)]??_0x130f38[_0x1451b9(0x16c)];if(_0x25713b['CbdhC'](!_0x518706,!_0x10bc80))throw new Error(_0x1451b9(0x137)+_0xb6fc86+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0xb6fc86+_0x1451b9(0x130));return{'activeProfile':_0xb6fc86,'resolvedCloudProfile':_0x381e94,'cloudAuthPath':_0x3fa04c,'resolvedSettings':_0x31b19b,'isCdpMode':_0x10bc80,'url':_0x518706,'baseUrlSource':_0x130f38[_0x1451b9(0x164)],'authEnvKey':_0x30652d,'startPath':_0x130f38['startPath']};}function expandString(_0x338fab){const _0x427b32=_0x112d,_0x230970={'ttzqS':_0x427b32(0x13d),'TbLPu':function(_0x1ec70f,_0x28e1ae){return _0x1ec70f(_0x28e1ae);}};if(typeof _0x338fab!==_0x230970[_0x427b32(0x13a)])return _0x338fab;return _0x230970[_0x427b32(0x136)](resolveEnvVars,_0x338fab);}function expandOverrides(_0x5dfad3){const _0x4b0bd0=_0x112d,_0x337d73={'jflaV':function(_0x5c8613,_0x4785f9){return _0x5c8613===_0x4785f9;}};if(!_0x5dfad3)return _0x5dfad3;const _0x5062d1={..._0x5dfad3};return _0x337d73['jflaV'](typeof _0x5062d1['baseUrl'],_0x4b0bd0(0x13d))&&(_0x5062d1[_0x4b0bd0(0x16c)]=resolveEnvVars(_0x5062d1[_0x4b0bd0(0x16c)])),typeof _0x5062d1['startPath']===_0x4b0bd0(0x13d)&&(_0x5062d1['startPath']=resolveEnvVars(_0x5062d1['startPath'])),_0x5062d1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x420f19=_0x10fc;(function(_0x370940,_0x51ec6a){const _0x3ea199=_0x10fc,_0xdb7bc3=_0x370940();while(!![]){try{const _0x27be22=-parseInt(_0x3ea199(0xf3))/0x1*(-parseInt(_0x3ea199(0xf0))/0x2)+-parseInt(_0x3ea199(0x102))/0x3+parseInt(_0x3ea199(0xfa))/0x4+-parseInt(_0x3ea199(0xfc))/0x5*(-parseInt(_0x3ea199(0xf6))/0x6)+-parseInt(_0x3ea199(0xf5))/0x7+-parseInt(_0x3ea199(0x103))/0x8*(parseInt(_0x3ea199(0xea))/0x9)+parseInt(_0x3ea199(0x100))/0xa*(-parseInt(_0x3ea199(0xff))/0xb);if(_0x27be22===_0x51ec6a)break;else _0xdb7bc3['push'](_0xdb7bc3['shift']());}catch(_0x425a4e){_0xdb7bc3['push'](_0xdb7bc3['shift']());}}}(_0x2314,0x5ab09));function firstDefined(..._0x302627){for(const _0x5586c5 of _0x302627){if(_0x5586c5!==undefined&&_0x5586c5!==null&&_0x5586c5!=='')return _0x5586c5;}return undefined;}function normalizeAuthEnvironmentDomain(_0x41d3ac){const _0x486d3a=_0x10fc;if(!_0x41d3ac)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x486d3a(0xe7)](_0x41d3ac))return _0x41d3ac;return'https://'+_0x41d3ac;}export function resolveBaseUrlWithSource(_0x502836){const _0x10c71f=_0x10fc,_0x527ca2={'dUyZh':function(_0xf32052,_0x300f1a){return _0xf32052===_0x300f1a;},'JokPM':'cloud\x20profile\x20settings','BwkjQ':'auth\x20environment\x20domain','qMlHX':function(_0xab351f,_0x30bfd7){return _0xab351f!==_0x30bfd7;}},_0x1eecc8=_0x502836['projectOverrides'],_0x5c8635=!!_0x1eecc8&&_0x10c71f(0xe6)in _0x1eecc8,_0x18f1fe=_0x1eecc8?.[_0x10c71f(0xe6)],_0x517f06=!(_0x5c8635&&_0x527ca2['dUyZh'](_0x18f1fe,null)),_0x4f8074=[[_0x502836['flagBaseUrl'],'--base-url'],[_0x502836[_0x10c71f(0xf9)],_0x10c71f(0x101)],[_0x502836[_0x10c71f(0xe8)],_0x10c71f(0xeb)],[typeof _0x18f1fe==='string'?_0x18f1fe:undefined,'projects.json\x20override'],[_0x517f06?_0x502836[_0x10c71f(0xfe)]?.['baseUrl']:undefined,_0x527ca2[_0x10c71f(0xf4)]],[_0x517f06?normalizeAuthEnvironmentDomain(_0x502836['authEnvironmentDomain']):undefined,_0x527ca2[_0x10c71f(0xf7)]]];for(const [_0x3b4f11,_0x2f9b01]of _0x4f8074){if(_0x3b4f11!==undefined&&_0x3b4f11!==null&&_0x527ca2['qMlHX'](_0x3b4f11,''))return{'baseUrl':_0x3b4f11,'source':_0x2f9b01};}return{};}export function resolveBaseUrl(_0x291861){return resolveBaseUrlWithSource(_0x291861)['baseUrl'];}function _0x10fc(_0x1dda78,_0x30efec){_0x1dda78=_0x1dda78-0xe6;const _0x2314bf=_0x2314();let _0x10fc88=_0x2314bf[_0x1dda78];return _0x10fc88;}function _0x2314(){const _0x45702d=['143jyKOKp','716530qUAEpc','RANGER_BASE_URL','372693lniOyz','80FYJwXg','baseUrl','test','localSettingsBaseUrl','RANGER_START_PATH','58131UVXeVt','local\x20profile\x20settings','Hyqxn','env','projectOverrides','slice','66xfbduy','startPath','startsWith','19994XesaHv','JokPM','2024631RcgdsO','120WmUxDw','BwkjQ','endsWith','envBaseUrl','2779304XBgtlg','string','106595HxcrDR','gpPAo','cloudSettings'];_0x2314=function(){return _0x45702d;};return _0x2314();}export function resolveStartPath(_0x8c5e36){const _0x4bdc20=_0x10fc,_0x3ffa9f={'CTpXe':function(_0x1aa226,_0x5e9e90){return _0x1aa226 in _0x5e9e90;},'Hyqxn':'startPath'},_0x22ba71=_0x8c5e36[_0x4bdc20(0xee)],_0x554253=!!_0x22ba71&&_0x3ffa9f['CTpXe'](_0x3ffa9f[_0x4bdc20(0xec)],_0x22ba71),_0x58a293=_0x22ba71?.[_0x4bdc20(0xf1)],_0x430c6e=!(_0x554253&&_0x58a293===null);return firstDefined(_0x8c5e36['flagStartPath'],_0x8c5e36['envStartPath'],typeof _0x58a293===_0x4bdc20(0xfb)?_0x58a293:undefined,_0x430c6e?_0x8c5e36[_0x4bdc20(0xfe)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x550dc7,_0xc151ad){const _0x470c6d=_0x10fc,_0x1193f0={'gpPAo':function(_0x29d15f,_0x5166d0){return _0x29d15f+_0x5166d0;}};if(!_0x550dc7)return undefined;if(!_0xc151ad)return _0x550dc7;const _0x45463f=_0x550dc7[_0x470c6d(0xf8)]('/')?_0x550dc7[_0x470c6d(0xef)](0x0,-0x1):_0x550dc7,_0x5b7ceb=_0xc151ad[_0x470c6d(0xf2)]('/')?_0xc151ad:_0x1193f0[_0x470c6d(0xfd)]('/',_0xc151ad);return _0x1193f0['gpPAo'](_0x45463f,_0x5b7ceb);}export function resolveProfileUrl(_0x1c73f9){const _0x42fd0d={'CzhRt':function(_0x517e14,_0x3a5463){return _0x517e14(_0x3a5463);},'TGSpn':function(_0x49b38e,_0x47dec8){return _0x49b38e(_0x47dec8);}},{baseUrl:_0x41c43a,source:_0x2adf9e}=_0x42fd0d['CzhRt'](resolveBaseUrlWithSource,_0x1c73f9),_0x1eaaf5=_0x42fd0d['TGSpn'](resolveStartPath,_0x1c73f9);return{'baseUrl':_0x41c43a,'baseUrlSource':_0x2adf9e,'startPath':_0x1eaaf5,'url':joinBaseAndPath(_0x41c43a,_0x1eaaf5)};}export function readUrlEnvVars(_0x20467c=process[_0x420f19(0xed)]){const _0x5cf4dd=_0x420f19;return{'envBaseUrl':_0x20467c[_0x5cf4dd(0x101)],'envStartPath':_0x20467c[_0x5cf4dd(0xe9)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x37cf(_0x42e3ea,_0x32934c){_0x42e3ea=_0x42e3ea-0x1f0;const _0x1e7214=_0x1e72();let _0x37cfdd=_0x1e7214[_0x42e3ea];return _0x37cfdd;}(function(_0x1d92b3,_0x344b85){const _0x3b8aee=_0x37cf,_0x6c0110=_0x1d92b3();while(!![]){try{const _0x5e8a70=parseInt(_0x3b8aee(0x1f0))/0x1*(-parseInt(_0x3b8aee(0x1fc))/0x2)+-parseInt(_0x3b8aee(0x1f8))/0x3*(-parseInt(_0x3b8aee(0x1f2))/0x4)+parseInt(_0x3b8aee(0x1f7))/0x5+-parseInt(_0x3b8aee(0x1fa))/0x6+-parseInt(_0x3b8aee(0x1f5))/0x7+-parseInt(_0x3b8aee(0x1f3))/0x8*(parseInt(_0x3b8aee(0x1f9))/0x9)+parseInt(_0x3b8aee(0x1f6))/0xa;if(_0x5e8a70===_0x344b85)break;else _0x6c0110['push'](_0x6c0110['shift']());}catch(_0x23125f){_0x6c0110['push'](_0x6c0110['shift']());}}}(_0x1e72,0x3f610));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x4a2d51,_0x12aebf){const _0x1b1f12=_0x37cf,_0x4b5fef={'mBBzt':function(_0x4de51e){return _0x4de51e();},'osJZR':function(_0x1611db,_0x199116){return _0x1611db(_0x199116);},'PQvWO':function(_0x40a45d,_0x3a141e){return _0x40a45d<_0x3a141e;},'Tjfqw':function(_0x44fa85,_0x133f2f){return _0x44fa85*_0x133f2f;},'VfmRr':function(_0x113bc8,_0x3e5983){return _0x113bc8+_0x3e5983;}},_0x2308b1=_0x12aebf?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x50cf62=_0x12aebf?.[_0x1b1f12(0x1f1)]??DEFAULT_BASE_DELAY_MS;let _0x6787d5;for(let _0x54c04e=0x0;_0x54c04e<=_0x2308b1;_0x54c04e++){try{return await _0x4b5fef['mBBzt'](_0x4a2d51);}catch(_0x15dba6){_0x6787d5=_0x15dba6 instanceof Error?_0x15dba6:new Error(_0x4b5fef['osJZR'](String,_0x15dba6));if(_0x4b5fef['PQvWO'](_0x54c04e,_0x2308b1)){const _0x178abc=_0x4b5fef['Tjfqw'](_0x50cf62,Math[_0x1b1f12(0x1fe)](0x2,_0x54c04e));_0x12aebf?.[_0x1b1f12(0x1fb)]&&console['error'](_0x12aebf['label']+_0x1b1f12(0x1f4)+_0x4b5fef['VfmRr'](_0x54c04e,0x1)+'/'+(_0x2308b1+0x1)+'),\x20retrying\x20in\x20'+_0x178abc+_0x1b1f12(0x1fd)),await new Promise(_0x4137e3=>setTimeout(_0x4137e3,_0x178abc));}}}throw _0x6787d5;}function _0x1e72(){const _0x4df639=['\x20failed\x20(attempt\x20','1085287usXkXc','6764450KvZdGa','234145CkrMeK','63YOeAns','263628vTtgKR','2017536rDnkPV','label','49978bMGajL','ms...','pow','2gGbzkT','baseDelayMs','25940TuHLLP','16Xfdzfw'];_0x1e72=function(){return _0x4df639;};return _0x1e72();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x3cac27,_0x2ba621){const _0x37ae97=_0x5f2d,_0x51007b=_0x3cac27();while(!![]){try{const _0x240758=parseInt(_0x37ae97(0x83))/0x1+-parseInt(_0x37ae97(0x7a))/0x2*(-parseInt(_0x37ae97(0x79))/0x3)+-parseInt(_0x37ae97(0x82))/0x4*(parseInt(_0x37ae97(0x7e))/0x5)+-parseInt(_0x37ae97(0x81))/0x6*(parseInt(_0x37ae97(0x7f))/0x7)+-parseInt(_0x37ae97(0x85))/0x8+parseInt(_0x37ae97(0x7c))/0x9+parseInt(_0x37ae97(0x7d))/0xa*(parseInt(_0x37ae97(0x84))/0xb);if(_0x240758===_0x2ba621)break;else _0x51007b['push'](_0x51007b['shift']());}catch(_0x1bcdc6){_0x51007b['push'](_0x51007b['shift']());}}}(_0x47a0,0xe962a));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;function _0x5f2d(_0x4d6e1e,_0x1d4c88){_0x4d6e1e=_0x4d6e1e-0x79;const _0x47a027=_0x47a0();let _0x5f2d70=_0x47a027[_0x4d6e1e];return _0x5f2d70;}export function extractUrlOrigins(_0x52ca19){const _0x44da95=_0x5f2d,_0x45958e=new Set();for(const _0x31284f of _0x52ca19['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x146537=_0x31284f[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x45958e['add'](new URL(_0x146537)[_0x44da95(0x80)]);}catch{}}return[..._0x45958e];}export function findScenarioOriginMismatches(_0x112be6,_0x25f70c){const _0x2ea2e5=_0x5f2d,_0x3a6b76={'papqC':function(_0xa032eb,_0x370d28){return _0xa032eb(_0x370d28);}};let _0x2f8067;try{_0x2f8067=new URL(_0x25f70c)['origin'];}catch{return[];}return _0x3a6b76['papqC'](extractUrlOrigins,_0x112be6)[_0x2ea2e5(0x7b)](_0x47af32=>_0x47af32!==_0x2f8067);}function _0x47a0(){const _0x58fd40=['12156ZcgOio','4YfmyKf','148516gnHlgh','374oyHCuj','7323712MYneWH','760011lZmarA','8LHTrDz','filter','13050639IWMJrf','82810NiqJng','2446205fgSTLl','1841JQgqfm','origin'];_0x47a0=function(){return _0x58fd40;};return _0x47a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3a4e38=_0x3f2d;(function(_0x2f1ab3,_0x5866c1){const _0x290a1a=_0x3f2d,_0x1f43ee=_0x2f1ab3();while(!![]){try{const _0x3df6e7=parseInt(_0x290a1a(0x14f))/0x1*(-parseInt(_0x290a1a(0x13e))/0x2)+-parseInt(_0x290a1a(0x13f))/0x3*(parseInt(_0x290a1a(0x149))/0x4)+parseInt(_0x290a1a(0x141))/0x5*(parseInt(_0x290a1a(0x14c))/0x6)+-parseInt(_0x290a1a(0x14d))/0x7*(parseInt(_0x290a1a(0x138))/0x8)+-parseInt(_0x290a1a(0x133))/0x9+-parseInt(_0x290a1a(0x153))/0xa*(-parseInt(_0x290a1a(0x12c))/0xb)+parseInt(_0x290a1a(0x12e))/0xc;if(_0x3df6e7===_0x5866c1)break;else _0x1f43ee['push'](_0x1f43ee['shift']());}catch(_0x4419ac){_0x1f43ee['push'](_0x1f43ee['shift']());}}}(_0x2566,0x690d0));import*as _0x461a86 from'fs';import*as _0x157448 from'path';import*as _0x12fd9c from'os';import{execSync}from'child_process';const CACHE_FILE=_0x157448['join'](_0x12fd9c[_0x3a4e38(0x13d)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0xaea1e3=_0x3a4e38;try{if(_0x461a86['existsSync'](CACHE_FILE)){const _0x2f630e=JSON[_0xaea1e3(0x135)](_0x461a86[_0xaea1e3(0x144)](CACHE_FILE,_0xaea1e3(0x147)));return{'version':0x3,'sessions':_0x2f630e[_0xaea1e3(0x146)]||{},'branches':_0x2f630e['branches']||{},'lastEnabledSessionClearedAt':_0x2f630e[_0xaea1e3(0x131)]};}}catch{}return createEmptyCache();}function saveCache(_0x293d03){const _0x4b8ff8=_0x3a4e38;try{const _0x9cdb5=_0x157448['dirname'](CACHE_FILE);!_0x461a86['existsSync'](_0x9cdb5)&&_0x461a86[_0x4b8ff8(0x12b)](_0x9cdb5,{'recursive':!![]}),_0x461a86['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x293d03,null,0x2));}catch{}}export function getCurrentBranch(){const _0x51b82e=_0x3a4e38,_0x3e72bd={'ddukj':_0x51b82e(0x15a),'lKDJD':'utf-8','SKahH':'pipe','DVlAC':'HEAD'};try{const _0x7390f1=execSync(_0x3e72bd[_0x51b82e(0x150)],{'encoding':_0x3e72bd[_0x51b82e(0x12a)],'stdio':[_0x3e72bd['SKahH'],_0x51b82e(0x12f),_0x51b82e(0x12f)]})['trim']();if(!_0x7390f1||_0x7390f1===_0x3e72bd[_0x51b82e(0x13c)])return null;return _0x7390f1;}catch{return null;}}export function enableBranch(_0x55afd8){const _0x2ce847=_0x3a4e38,_0x3b357f={'ueQGV':function(_0x4ccbff){return _0x4ccbff();},'MCqyC':function(_0x1cb7dc,_0x1d47a7){return _0x1cb7dc(_0x1d47a7);}},_0x3f9e2f=_0x3b357f[_0x2ce847(0x134)](loadCache);_0x3f9e2f['branches'][_0x55afd8]=!![],_0x3b357f[_0x2ce847(0x13b)](saveCache,_0x3f9e2f);}function _0x2566(){const _0x30788b=['311526QaTEzH','ueQGV','parse','vTphO','CBJhk','64LfvrQv','uZlFK','main','MCqyC','DVlAC','homedir','2mTdtpD','6VEhDbQ','ikMho','5075kxbyEu','enabled','uCtMZ','readFileSync','UhbuO','sessions','utf-8','MeJgV','920784pZLzCu','branches','featureId','1014srtUhy','487438GOyvVw','TODHM','705981SPeBOD','ddukj','BLjeJ','YgGao','7220PDyXzc','now','pSuNu','currentBranch','prompted','YCLpU','HYJhg','git\x20rev-parse\x20--abbrev-ref\x20HEAD','master','mWnPS','nzuYv','lKDJD','mkdirSync','6941YkFBME','clear','18734760QfrxBY','pipe','registeredAt','lastEnabledSessionClearedAt','RGfYk'];_0x2566=function(){return _0x30788b;};return _0x2566();}export function disableBranch(_0x32a388){const _0x56efc8=loadCache();delete _0x56efc8['branches'][_0x32a388],saveCache(_0x56efc8);}export function isBranchEnabled(_0x28dbdb){const _0x11adcf=_0x3a4e38,_0x21752a=loadCache();return _0x21752a[_0x11adcf(0x14a)][_0x28dbdb]===!![];}function getOrCreateSession(_0x10e328,_0x5d0ad9){const _0x30d7e4=_0x3a4e38;return!_0x10e328['sessions'][_0x5d0ad9]&&(_0x10e328['sessions'][_0x5d0ad9]={}),_0x10e328[_0x30d7e4(0x146)][_0x5d0ad9];}export function enableSession(_0x38986c){const _0x376e1=_0x3a4e38,_0x1933a0={'ikMho':function(_0x5393d8){return _0x5393d8();},'MeJgV':function(_0x2f6413,_0x502384,_0x43d9dc){return _0x2f6413(_0x502384,_0x43d9dc);},'zenhG':function(_0x54f26f,_0x4e9536){return _0x54f26f!==_0x4e9536;}},_0xdc32f5=_0x1933a0[_0x376e1(0x140)](loadCache),_0x4d19cc=_0x1933a0[_0x376e1(0x148)](getOrCreateSession,_0xdc32f5,_0x38986c);_0x4d19cc[_0x376e1(0x142)]=!![];const _0x1224e5=getCurrentBranch();_0x1224e5&&_0x1224e5!==_0x376e1(0x13a)&&_0x1933a0['zenhG'](_0x1224e5,'master')&&(_0xdc32f5['branches'][_0x1224e5]=!![],_0x4d19cc[_0x376e1(0x156)]=_0x1224e5),saveCache(_0xdc32f5);}export function isSessionEnabled(_0x3fa135){const _0x167341=_0x3a4e38,_0x2aab08={'BLjeJ':function(_0xf339f0){return _0xf339f0();},'UhbuO':function(_0x5a1cd3,_0x1f7c4b){return _0x5a1cd3===_0x1f7c4b;},'JBUrK':'main','IVEAX':function(_0x201eee,_0x4a7e8e){return _0x201eee===_0x4a7e8e;}},_0x1faa7d=_0x2aab08['BLjeJ'](loadCache),_0x1469d9=_0x2aab08[_0x167341(0x151)](getCurrentBranch);if(!_0x1469d9||_0x2aab08[_0x167341(0x145)](_0x1469d9,_0x2aab08['JBUrK'])||_0x1469d9===_0x167341(0x15b))return _0x1faa7d[_0x167341(0x146)][_0x3fa135]?.[_0x167341(0x142)]===!![];const _0x731f3a=_0x2aab08['IVEAX'](_0x1faa7d['branches'][_0x1469d9],!![]),_0x4a8dc8=_0x2aab08['IVEAX'](_0x1faa7d['sessions'][_0x3fa135]?.['enabled'],!![]);return _0x731f3a||_0x4a8dc8;}export function disableSession(_0x37186a){const _0x56fa59=_0x3a4e38,_0x422a2b={'uCtMZ':function(_0xe2790){return _0xe2790();},'fFUea':function(_0x59bc0c,_0x452322,_0x420d2b){return _0x59bc0c(_0x452322,_0x420d2b);},'DTFEn':function(_0x1225dc,_0x28954e){return _0x1225dc(_0x28954e);}},_0x18403c=_0x422a2b[_0x56fa59(0x143)](loadCache),_0x15391f=_0x422a2b['fFUea'](getOrCreateSession,_0x18403c,_0x37186a);_0x15391f[_0x56fa59(0x142)]=![],_0x422a2b['DTFEn'](saveCache,_0x18403c);}export function updateBranchTracking(_0x57b41f){const _0x1b71d7=_0x3a4e38,_0x4e051d={'NGfke':'main','HMgmt':function(_0x4f0286,_0x160f2f){return _0x4f0286!==_0x160f2f;}},_0x198106=loadCache(),_0x3dc4de=_0x198106[_0x1b71d7(0x146)][_0x57b41f];if(!_0x3dc4de?.[_0x1b71d7(0x142)])return;const _0x5e07d1=getCurrentBranch();if(!_0x5e07d1||_0x5e07d1===_0x4e051d['NGfke']||_0x5e07d1===_0x1b71d7(0x15b))return;_0x4e051d['HMgmt'](_0x3dc4de[_0x1b71d7(0x156)],_0x5e07d1)&&(_0x198106[_0x1b71d7(0x14a)][_0x5e07d1]=!![],_0x3dc4de[_0x1b71d7(0x156)]=_0x5e07d1,saveCache(_0x198106));}export function initBranchTracking(_0x424a54){const _0x110141=_0x3a4e38,_0x1d6e6c={'kPSJX':function(_0x339850){return _0x339850();},'yhfPe':'main','nzuYv':_0x110141(0x15b)},_0x3162e9=loadCache(),_0x28b693=_0x1d6e6c['kPSJX'](getCurrentBranch);if(!_0x28b693||_0x28b693===_0x1d6e6c['yhfPe']||_0x28b693===_0x1d6e6c[_0x110141(0x15d)])return;if(_0x3162e9['branches'][_0x28b693]===!![]){const _0x141abd=getOrCreateSession(_0x3162e9,_0x424a54);_0x141abd['enabled']=!![],_0x141abd['currentBranch']=_0x28b693,saveCache(_0x3162e9);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x382f2e){const _0x5b3342=_0x3a4e38,_0x3d9780={'kZupG':function(_0x5b8baf){return _0x5b8baf();}},_0x3479c4=_0x3d9780['kZupG'](loadCache),_0x33d346=_0x3479c4['sessions'][_0x382f2e];_0x33d346?.['enabled']&&(_0x3479c4[_0x5b3342(0x131)]=Date['now'](),saveCache(_0x3479c4));}export function shouldAutoEnableAfterClear(_0x2214f1){const _0x126326=_0x3a4e38,_0x56c83e={'wwOHb':function(_0x2a3381,_0x31ed33){return _0x2a3381!==_0x31ed33;},'HYJhg':_0x126326(0x12d),'vTphO':function(_0x3f7371,_0x15e2b9){return _0x3f7371-_0x15e2b9;}};if(_0x56c83e['wwOHb'](_0x2214f1,_0x56c83e[_0x126326(0x159)]))return![];const _0x3bb095=loadCache(),_0x2bcbe8=_0x3bb095['lastEnabledSessionClearedAt'];if(!_0x2bcbe8)return![];const _0x1631a1=_0x56c83e[_0x126326(0x136)](Date['now'](),_0x2bcbe8);return _0x1631a1<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0xb3252a){const _0x46b80e=_0x3a4e38,_0x3c68ec={'DBxqn':function(_0x8e06f4){return _0x8e06f4();},'pSuNu':'main','uqTSN':function(_0x2445b6,_0x9f5256){return _0x2445b6(_0x9f5256);}},_0x575fe4=_0x3c68ec['DBxqn'](loadCache),_0x174143=getOrCreateSession(_0x575fe4,_0xb3252a);_0x174143[_0x46b80e(0x142)]=!![];const _0x21d1dd=getCurrentBranch();_0x21d1dd&&_0x21d1dd!==_0x3c68ec[_0x46b80e(0x155)]&&_0x21d1dd!==_0x46b80e(0x15b)&&(_0x174143[_0x46b80e(0x156)]=_0x21d1dd),delete _0x575fe4[_0x46b80e(0x131)],_0x3c68ec['uqTSN'](saveCache,_0x575fe4);}export function registerSession(_0x16b18e,_0x53c035){const _0x476dce=_0x3a4e38,_0x49c6dd={'mWnPS':function(_0xb9e60f){return _0xb9e60f();},'YCLpU':function(_0x56608b,_0x573669,_0x3ab9d4){return _0x56608b(_0x573669,_0x3ab9d4);},'uZlFK':function(_0x244e5a,_0x447283){return _0x244e5a(_0x447283);}},_0x405a72=_0x49c6dd[_0x476dce(0x15c)](loadCache),_0x130350=_0x49c6dd[_0x476dce(0x158)](getOrCreateSession,_0x405a72,_0x16b18e);_0x130350['featureId']=_0x53c035,_0x130350[_0x476dce(0x130)]=new Date()['toISOString'](),_0x49c6dd[_0x476dce(0x139)](saveCache,_0x405a72);}export function getSessionEntry(_0x4588a6){const _0x288698=_0x3a4e38,_0x19c6d5={'CBJhk':function(_0x282003){return _0x282003();}},_0x2ad9f8=_0x19c6d5[_0x288698(0x137)](loadCache),_0x213c75=_0x2ad9f8['sessions'][_0x4588a6];if(_0x213c75?.[_0x288698(0x14b)]&&_0x213c75?.[_0x288698(0x130)])return{'featureId':_0x213c75['featureId'],'registeredAt':_0x213c75['registeredAt']};return null;}export function unregisterSession(_0xf459e){const _0x25efdb=_0x3a4e38,_0x3ef9c1={'NUtbk':function(_0x2ba878){return _0x2ba878();},'TODHM':function(_0x22e969,_0x1373aa){return _0x22e969(_0x1373aa);}},_0x1a134d=_0x3ef9c1['NUtbk'](loadCache),_0x10d8f8=_0x1a134d[_0x25efdb(0x146)][_0xf459e];_0x10d8f8&&(delete _0x10d8f8[_0x25efdb(0x14b)],delete _0x10d8f8[_0x25efdb(0x130)],_0x3ef9c1[_0x25efdb(0x14e)](saveCache,_0x1a134d));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;function _0x3f2d(_0x2bab08,_0x3f14d3){_0x2bab08=_0x2bab08-0x12a;const _0x256659=_0x2566();let _0x3f2d69=_0x256659[_0x2bab08];return _0x3f2d69;}export function shouldShowPlanReminder(_0x409215){const _0xb782ab=_0x3a4e38,_0x1f037a={'RGfYk':function(_0x3c922f,_0x431f6a,_0x43e0a4){return _0x3c922f(_0x431f6a,_0x43e0a4);}},_0x2da467=loadCache(),_0x3f73d9=_0x1f037a[_0xb782ab(0x132)](getOrCreateSession,_0x2da467,_0x409215),_0x40c2e8=_0x3f73d9['lastPlanReminderAt']||0x0,_0x39e1df=Date[_0xb782ab(0x154)]();if(_0x39e1df-_0x40c2e8>=PLAN_REMINDER_INTERVAL_MS)return _0x3f73d9['lastPlanReminderAt']=_0x39e1df,saveCache(_0x2da467),!![];return![];}export function shouldShowStopReminder(_0x4e8a7a){const _0x1a49e3=_0x3a4e38,_0x434a78={'ggsEW':function(_0xf298c2,_0x339a6d){return _0xf298c2>=_0x339a6d;},'xdpmF':function(_0x2cd290,_0x1d675e){return _0x2cd290-_0x1d675e;}},_0x4b649e=loadCache(),_0x33d7fc=getOrCreateSession(_0x4b649e,_0x4e8a7a),_0x562e8a=_0x33d7fc['lastStopReminderAt']||0x0,_0x35203c=Date[_0x1a49e3(0x154)]();if(_0x434a78['ggsEW'](_0x434a78['xdpmF'](_0x35203c,_0x562e8a),STOP_REMINDER_INTERVAL_MS))return _0x33d7fc['lastStopReminderAt']=_0x35203c,saveCache(_0x4b649e),!![];return![];}export function hasSessionBeenPrompted(_0x45d12c){const _0x51aff7=_0x3a4e38,_0x5ee25f={'cRQjT':function(_0x52cf3f){return _0x52cf3f();},'YgGao':function(_0x3d6a23,_0x5e3330){return _0x3d6a23===_0x5e3330;}},_0x88da8c=_0x5ee25f['cRQjT'](loadCache);return _0x5ee25f[_0x51aff7(0x152)](_0x88da8c['sessions'][_0x45d12c]?.[_0x51aff7(0x157)],!![]);}export function markSessionPrompted(_0x41fe75){const _0x4c0da0={'BaIuO':function(_0x41869c,_0x52c097){return _0x41869c(_0x52c097);}},_0x97b0c8=loadCache(),_0x585da8=getOrCreateSession(_0x97b0c8,_0x41fe75);_0x585da8['prompted']=!![],_0x4c0da0['BaIuO'](saveCache,_0x97b0c8);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x39918b=_0x3ee1;(function(_0x57e62e,_0x4ae911){const _0x2039c2=_0x3ee1,_0x1873c6=_0x57e62e();while(!![]){try{const _0x3fc259=parseInt(_0x2039c2(0xc5))/0x1*(-parseInt(_0x2039c2(0xd3))/0x2)+parseInt(_0x2039c2(0xb5))/0x3*(parseInt(_0x2039c2(0xc2))/0x4)+-parseInt(_0x2039c2(0xb6))/0x5+parseInt(_0x2039c2(0xbd))/0x6*(-parseInt(_0x2039c2(0xcf))/0x7)+parseInt(_0x2039c2(0xc8))/0x8+parseInt(_0x2039c2(0xda))/0x9*(-parseInt(_0x2039c2(0xc3))/0xa)+parseInt(_0x2039c2(0xd2))/0xb*(parseInt(_0x2039c2(0xc4))/0xc);if(_0x3fc259===_0x4ae911)break;else _0x1873c6['push'](_0x1873c6['shift']());}catch(_0x4b3b01){_0x1873c6['push'](_0x1873c6['shift']());}}}(_0x1334,0x2b8d8));import*as _0x24ad0d from'fs';import*as _0x4bf313 from'path';import*as _0x5dc103 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4bf313[_0x39918b(0xab)](_0x5dc103[_0x39918b(0xb2)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x2bf693=_0x39918b,_0x452dfe={'FBMnn':_0x2bf693(0xe3)};try{if(_0x24ad0d['existsSync'](CACHE_FILE)){const _0x1752a5=JSON['parse'](_0x24ad0d['readFileSync'](CACHE_FILE,_0x452dfe[_0x2bf693(0xdd)]));return{'version':0x3,'sessions':_0x1752a5['sessions']||{},'branches':_0x1752a5['branches']||{},'lastEnabledSessionClearedAt':_0x1752a5[_0x2bf693(0xd1)]};}}catch{}return createEmptyCache();}function saveCache(_0x39f4f8){const _0x244090=_0x39918b;try{const _0x226b0b=_0x4bf313[_0x244090(0xcc)](CACHE_FILE);!_0x24ad0d[_0x244090(0xc1)](_0x226b0b)&&_0x24ad0d['mkdirSync'](_0x226b0b,{'recursive':!![]}),_0x24ad0d[_0x244090(0xb1)](CACHE_FILE,JSON['stringify'](_0x39f4f8,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3e1f3b=_0x39918b,_0x2fca24={'camcm':function(_0x58c733,_0x592588,_0x13ce5d){return _0x58c733(_0x592588,_0x13ce5d);},'ExGoQ':_0x3e1f3b(0xd4),'mRBJS':_0x3e1f3b(0xe3),'Uqfqy':_0x3e1f3b(0xb8),'iOWbr':function(_0x57bdee,_0x52c0c3){return _0x57bdee===_0x52c0c3;},'aNJFI':_0x3e1f3b(0xae)};try{const _0x1b5fc9=_0x2fca24[_0x3e1f3b(0xd6)](execSync,_0x2fca24['ExGoQ'],{'encoding':_0x2fca24['mRBJS'],'stdio':[_0x3e1f3b(0xb8),_0x2fca24[_0x3e1f3b(0xc7)],_0x3e1f3b(0xb8)]})['trim']();if(!_0x1b5fc9||_0x2fca24[_0x3e1f3b(0xe0)](_0x1b5fc9,_0x2fca24[_0x3e1f3b(0xb7)]))return null;return _0x1b5fc9;}catch{return null;}}export function enableBranch(_0x5b0c1e){const _0x960449={'bGSbu':function(_0x3c0e6b){return _0x3c0e6b();}},_0x3fab79=_0x960449['bGSbu'](loadCache);_0x3fab79['branches'][_0x5b0c1e]=!![],saveCache(_0x3fab79);}export function disableBranch(_0x2030cd){const _0x3dbd50=_0x39918b,_0x3007ff={'clYFI':function(_0x821c31,_0x28496d){return _0x821c31(_0x28496d);}},_0x3b8cfc=loadCache();delete _0x3b8cfc['branches'][_0x2030cd],_0x3007ff[_0x3dbd50(0xcb)](saveCache,_0x3b8cfc);}function _0x3ee1(_0x1398ae,_0x5372d5){_0x1398ae=_0x1398ae-0xaa;const _0x133492=_0x1334();let _0x3ee12f=_0x133492[_0x1398ae];return _0x3ee12f;}export function isBranchEnabled(_0x10ce76){const _0x328dfa=_0x39918b,_0x13d370={'KUgHG':function(_0x1fb40c,_0x253cdf){return _0x1fb40c===_0x253cdf;}},_0x125b76=loadCache();return _0x13d370['KUgHG'](_0x125b76[_0x328dfa(0xd9)][_0x10ce76],!![]);}function getOrCreateSession(_0x295381,_0x47963c){return!_0x295381['sessions'][_0x47963c]&&(_0x295381['sessions'][_0x47963c]={}),_0x295381['sessions'][_0x47963c];}export function enableSession(_0x5bf9b9){const _0x492a7a=_0x39918b,_0x3efb51={'dVtXi':function(_0x5cfcd9){return _0x5cfcd9();},'RnegA':function(_0x598cb1,_0x3fd85f,_0x4e3f1a){return _0x598cb1(_0x3fd85f,_0x4e3f1a);},'KSkUd':function(_0x2b389b,_0xaa01d7){return _0x2b389b!==_0xaa01d7;},'pSHfE':function(_0x29e9cb,_0xfdd0cc){return _0x29e9cb(_0xfdd0cc);}},_0x454a6e=_0x3efb51['dVtXi'](loadCache),_0x41edb1=_0x3efb51['RnegA'](getOrCreateSession,_0x454a6e,_0x5bf9b9);_0x41edb1['enabled']=!![];const _0x5a5f43=getCurrentBranch();_0x5a5f43&&_0x5a5f43!==_0x492a7a(0xe4)&&_0x3efb51['KSkUd'](_0x5a5f43,_0x492a7a(0xbf))&&(_0x454a6e[_0x492a7a(0xd9)][_0x5a5f43]=!![],_0x41edb1[_0x492a7a(0xdc)]=_0x5a5f43),_0x3efb51['pSHfE'](saveCache,_0x454a6e);}export function isSessionEnabled(_0x3753b3){const _0x2805cc=_0x39918b,_0x36607d={'fzmFq':function(_0x3dd81f){return _0x3dd81f();},'drnce':function(_0x53e595){return _0x53e595();},'lRpDj':'main','RWPRu':function(_0x31268f,_0x237849){return _0x31268f===_0x237849;}},_0x23fc31=_0x36607d[_0x2805cc(0xc9)](loadCache),_0x2d4135=_0x36607d['drnce'](getCurrentBranch);if(!_0x2d4135||_0x2d4135===_0x36607d[_0x2805cc(0xb9)]||_0x2d4135===_0x2805cc(0xbf))return _0x23fc31[_0x2805cc(0xbb)][_0x3753b3]?.['enabled']===!![];const _0x2cb568=_0x23fc31['branches'][_0x2d4135]===!![],_0x36cad8=_0x36607d['RWPRu'](_0x23fc31[_0x2805cc(0xbb)][_0x3753b3]?.['enabled'],!![]);return _0x2cb568||_0x36cad8;}export function disableSession(_0x53037f){const _0x7cb726=_0x39918b,_0x178522={'XXlik':function(_0x3e4976,_0x2ff04c,_0x2dd97f){return _0x3e4976(_0x2ff04c,_0x2dd97f);},'BcRRf':function(_0x4ebb2d,_0x55ae47){return _0x4ebb2d(_0x55ae47);}},_0x164a05=loadCache(),_0x24be06=_0x178522['XXlik'](getOrCreateSession,_0x164a05,_0x53037f);_0x24be06[_0x7cb726(0xe1)]=![],_0x178522['BcRRf'](saveCache,_0x164a05);}export function updateBranchTracking(_0x403112){const _0x379a35=_0x39918b,_0x4a23a7={'fMGoU':function(_0x4072ab){return _0x4072ab();},'UMgBb':function(_0x209e42,_0x1f9ce3){return _0x209e42===_0x1f9ce3;},'AvUds':'master','xHPdX':function(_0x1fa202,_0x563d2f){return _0x1fa202!==_0x563d2f;},'UrvXa':function(_0xf30e65,_0x3bcc1c){return _0xf30e65(_0x3bcc1c);}},_0x4ebd2d=loadCache(),_0x315582=_0x4ebd2d[_0x379a35(0xbb)][_0x403112];if(!_0x315582?.[_0x379a35(0xe1)])return;const _0x42c77f=_0x4a23a7[_0x379a35(0xaa)](getCurrentBranch);if(!_0x42c77f||_0x42c77f==='main'||_0x4a23a7['UMgBb'](_0x42c77f,_0x4a23a7[_0x379a35(0xdb)]))return;_0x4a23a7[_0x379a35(0xaf)](_0x315582[_0x379a35(0xdc)],_0x42c77f)&&(_0x4ebd2d[_0x379a35(0xd9)][_0x42c77f]=!![],_0x315582['currentBranch']=_0x42c77f,_0x4a23a7['UrvXa'](saveCache,_0x4ebd2d));}export function initBranchTracking(_0x3f0de5){const _0x5d44e8=_0x39918b,_0x5403ea={'RtJiW':function(_0x531dc9){return _0x531dc9();},'nnPnM':function(_0x56a577,_0x3f5979){return _0x56a577===_0x3f5979;},'QnjNz':'master','SJBud':function(_0x394976,_0x56339f,_0x1efdf6){return _0x394976(_0x56339f,_0x1efdf6);}},_0x295bf1=_0x5403ea['RtJiW'](loadCache),_0x55a7e7=getCurrentBranch();if(!_0x55a7e7||_0x5403ea[_0x5d44e8(0xde)](_0x55a7e7,'main')||_0x55a7e7===_0x5403ea[_0x5d44e8(0xce)])return;if(_0x5403ea['nnPnM'](_0x295bf1[_0x5d44e8(0xd9)][_0x55a7e7],!![])){const _0x57e938=_0x5403ea['SJBud'](getOrCreateSession,_0x295bf1,_0x3f0de5);_0x57e938['enabled']=!![],_0x57e938['currentBranch']=_0x55a7e7,saveCache(_0x295bf1);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x1334(){const _0x59c820=['40bSqNLm','5421648mxicOo','331736aVADGj','cnpES','Uqfqy','2221072YTClqB','fzmFq','MsicI','clYFI','dirname','lastStopReminderAt','QnjNz','7dMVhqG','BZvAl','lastEnabledSessionClearedAt','11wPLMAA','2dOgNMY','git\x20rev-parse\x20--abbrev-ref\x20HEAD','rwZOa','camcm','xTCnE','XQeKh','branches','53595yPevIO','AvUds','currentBranch','FBMnn','nnPnM','RfQXH','iOWbr','enabled','JsYEU','utf-8','main','fMGoU','join','clear','registeredAt','HEAD','xHPdX','featureId','writeFileSync','homedir','HGCcP','tAVJx','45705ABZqjp','918360ErjadQ','aNJFI','pipe','lRpDj','lastPlanReminderAt','sessions','YtFAy','162318BbgeOE','tNhcD','master','now','existsSync','4FdaSPU'];_0x1334=function(){return _0x59c820;};return _0x1334();}export function recordEnabledSessionCleared(_0x555af4){const _0x22f23d=_0x39918b,_0x34153a={'iqAjZ':function(_0x500525){return _0x500525();},'wULWh':function(_0x220a83,_0x5f45b9){return _0x220a83(_0x5f45b9);}},_0x31f1c5=_0x34153a['iqAjZ'](loadCache),_0x27a032=_0x31f1c5[_0x22f23d(0xbb)][_0x555af4];_0x27a032?.[_0x22f23d(0xe1)]&&(_0x31f1c5[_0x22f23d(0xd1)]=Date[_0x22f23d(0xc0)](),_0x34153a['wULWh'](saveCache,_0x31f1c5));}export function shouldAutoEnableAfterClear(_0x584cb2){const _0x23fe41=_0x39918b,_0x2cf1f8={'snfXv':function(_0x35519d,_0x22d6e4){return _0x35519d!==_0x22d6e4;},'mwbRz':_0x23fe41(0xac),'cDhuF':function(_0x50f474,_0x1aeea2){return _0x50f474-_0x1aeea2;},'BZvAl':function(_0x371bf8,_0x423467){return _0x371bf8<=_0x423467;}};if(_0x2cf1f8['snfXv'](_0x584cb2,_0x2cf1f8['mwbRz']))return![];const _0xf506a0=loadCache(),_0x2801e1=_0xf506a0[_0x23fe41(0xd1)];if(!_0x2801e1)return![];const _0x2c5ab8=_0x2cf1f8['cDhuF'](Date[_0x23fe41(0xc0)](),_0x2801e1);return _0x2cf1f8[_0x23fe41(0xd0)](_0x2c5ab8,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x4f571a){const _0xca29dc=_0x39918b,_0x1f3ae9={'cnpES':function(_0x1b1763){return _0x1b1763();},'YtFAy':function(_0x378521,_0x56b856){return _0x378521!==_0x56b856;},'ZpDpd':'master','ltGYD':function(_0x41ced9,_0x1224b1){return _0x41ced9(_0x1224b1);}},_0x4b8afe=_0x1f3ae9[_0xca29dc(0xc6)](loadCache),_0x505e44=getOrCreateSession(_0x4b8afe,_0x4f571a);_0x505e44['enabled']=!![];const _0xb965d3=_0x1f3ae9[_0xca29dc(0xc6)](getCurrentBranch);_0xb965d3&&_0x1f3ae9[_0xca29dc(0xbc)](_0xb965d3,'main')&&_0x1f3ae9['YtFAy'](_0xb965d3,_0x1f3ae9['ZpDpd'])&&(_0x505e44['currentBranch']=_0xb965d3),delete _0x4b8afe['lastEnabledSessionClearedAt'],_0x1f3ae9['ltGYD'](saveCache,_0x4b8afe);}export function registerSession(_0x73676c,_0xd410a2){const _0x152a4a=_0x39918b,_0x1dc61f={'XQeKh':function(_0x59bbb9){return _0x59bbb9();},'tAVJx':function(_0x6fa130,_0x39afba,_0x2970ae){return _0x6fa130(_0x39afba,_0x2970ae);},'pCtOI':function(_0x257a3c,_0x540303){return _0x257a3c(_0x540303);}},_0x57bb9e=_0x1dc61f[_0x152a4a(0xd8)](loadCache),_0x14cadf=_0x1dc61f[_0x152a4a(0xb4)](getOrCreateSession,_0x57bb9e,_0x73676c);_0x14cadf[_0x152a4a(0xb0)]=_0xd410a2,_0x14cadf['registeredAt']=new Date()['toISOString'](),_0x1dc61f['pCtOI'](saveCache,_0x57bb9e);}export function getSessionEntry(_0x50d51e){const _0x36210e=_0x39918b,_0x3f5cb9={'rwZOa':function(_0x2d4f18){return _0x2d4f18();}},_0x28579d=_0x3f5cb9[_0x36210e(0xd5)](loadCache),_0x5654d7=_0x28579d[_0x36210e(0xbb)][_0x50d51e];if(_0x5654d7?.[_0x36210e(0xb0)]&&_0x5654d7?.[_0x36210e(0xad)])return{'featureId':_0x5654d7[_0x36210e(0xb0)],'registeredAt':_0x5654d7[_0x36210e(0xad)]};return null;}export function unregisterSession(_0x221826){const _0x3e1087=_0x39918b,_0x55f8d4={'HGCcP':function(_0x1fea7e){return _0x1fea7e();},'NobhJ':function(_0x1cd673,_0x22fe03){return _0x1cd673(_0x22fe03);}},_0x228c4b=_0x55f8d4[_0x3e1087(0xb3)](loadCache),_0x47bdf7=_0x228c4b['sessions'][_0x221826];_0x47bdf7&&(delete _0x47bdf7['featureId'],delete _0x47bdf7['registeredAt'],_0x55f8d4['NobhJ'](saveCache,_0x228c4b));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2bee4b){const _0x5cf1e1=_0x39918b,_0x40157b={'tNhcD':function(_0x34234b){return _0x34234b();},'xTCnE':function(_0x541036,_0x2ff261,_0x36b28d){return _0x541036(_0x2ff261,_0x36b28d);},'MsicI':function(_0x3273d3,_0x337c52){return _0x3273d3>=_0x337c52;},'JsYEU':function(_0x4a875e,_0x1c9d65){return _0x4a875e-_0x1c9d65;},'UqtOK':function(_0x4ebc98,_0x3884f5){return _0x4ebc98(_0x3884f5);}},_0xf6bce3=_0x40157b[_0x5cf1e1(0xbe)](loadCache),_0x3b7fd6=_0x40157b[_0x5cf1e1(0xd7)](getOrCreateSession,_0xf6bce3,_0x2bee4b),_0x25c414=_0x3b7fd6['lastPlanReminderAt']||0x0,_0x1066c3=Date['now']();if(_0x40157b[_0x5cf1e1(0xca)](_0x40157b[_0x5cf1e1(0xe2)](_0x1066c3,_0x25c414),PLAN_REMINDER_INTERVAL_MS))return _0x3b7fd6[_0x5cf1e1(0xba)]=_0x1066c3,_0x40157b['UqtOK'](saveCache,_0xf6bce3),!![];return![];}export function shouldShowStopReminder(_0x460ac6){const _0x36835c=_0x39918b,_0x3fc918={'bOmes':function(_0x49f522){return _0x49f522();},'RfQXH':function(_0x21f4ff,_0x314a7b){return _0x21f4ff>=_0x314a7b;},'rWqWY':function(_0x8f7b59,_0x3a06a4){return _0x8f7b59-_0x3a06a4;},'kytBn':function(_0x39880c,_0x482f04){return _0x39880c(_0x482f04);}},_0x1000d6=_0x3fc918['bOmes'](loadCache),_0x5487c6=getOrCreateSession(_0x1000d6,_0x460ac6),_0x27ce44=_0x5487c6[_0x36835c(0xcd)]||0x0,_0x206efe=Date['now']();if(_0x3fc918[_0x36835c(0xdf)](_0x3fc918['rWqWY'](_0x206efe,_0x27ce44),STOP_REMINDER_INTERVAL_MS))return _0x5487c6['lastStopReminderAt']=_0x206efe,_0x3fc918['kytBn'](saveCache,_0x1000d6),!![];return![];}export function hasSessionBeenPrompted(_0x51eef0){const _0x2a6d08=_0x39918b,_0x4cc54d=loadCache();return _0x4cc54d[_0x2a6d08(0xbb)][_0x51eef0]?.['prompted']===!![];}export function markSessionPrompted(_0x4ce77e){const _0x1ea0fc={'lsesW':function(_0x4330b9){return _0x4330b9();}},_0x84351=_0x1ea0fc['lsesW'](loadCache),_0x1bcfa6=getOrCreateSession(_0x84351,_0x4ce77e);_0x1bcfa6['prompted']=!![],saveCache(_0x84351);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x44a5db=_0x20d1;(function(_0x4e3ced,_0x13796a){const _0x46e26b=_0x20d1,_0x2e27ad=_0x4e3ced();while(!![]){try{const _0x231f92=-parseInt(_0x46e26b(0xb3))/0x1*(-parseInt(_0x46e26b(0xdf))/0x2)+-parseInt(_0x46e26b(0x73))/0x3+parseInt(_0x46e26b(0xa0))/0x4*(parseInt(_0x46e26b(0xe7))/0x5)+parseInt(_0x46e26b(0xb0))/0x6+parseInt(_0x46e26b(0xea))/0x7*(parseInt(_0x46e26b(0xd7))/0x8)+parseInt(_0x46e26b(0xed))/0x9*(-parseInt(_0x46e26b(0xab))/0xa)+parseInt(_0x46e26b(0xce))/0xb*(-parseInt(_0x46e26b(0xa3))/0xc);if(_0x231f92===_0x13796a)break;else _0x2e27ad['push'](_0x2e27ad['shift']());}catch(_0x4af222){_0x2e27ad['push'](_0x2e27ad['shift']());}}}(_0xbd33,0x75b9b));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(_0x23cae7,_0x11be48){const _0x47972c=_0x20d1,_0x57b284={'tsiYp':'local','AlZLv':function(_0x38682b,_0x3dea31,_0x268e60){return _0x38682b(_0x3dea31,_0x268e60);},'rBEdr':function(_0x4cb25f,_0xf0c3b6){return _0x4cb25f(_0xf0c3b6);},'QIAEn':function(_0x3f9f36,_0x1aa6eb){return _0x3f9f36(_0x1aa6eb);},'OIJPh':function(_0x125b60,_0x23fff7){return _0x125b60!==_0x23fff7;}},_0x3c2941=join(_0x11be48,'ci',_0x23cae7),_0x445066=join(_0x11be48,_0x57b284['tsiYp'],_0x23cae7),_0xb933cb=_0x57b284['AlZLv'](join,_0x11be48,_0x23cae7),_0x3f18b5=_0x57b284[_0x47972c(0xb7)](join,_0x11be48,_0x57b284['tsiYp']),_0x3f5d2b=join(_0x11be48,'ci');if(_0x57b284['rBEdr'](existsSync,_0x3c2941))return _0x3c2941;if(existsSync(_0x445066))return _0x445066;if(_0x57b284[_0x47972c(0xdc)](existsSync,_0xb933cb)&&(_0xb933cb!==_0x3f18b5&&_0x57b284['OIJPh'](_0xb933cb,_0x3f5d2b)?!![]:hasLegacyProfileFiles(_0xb933cb)))return _0xb933cb;return null;}export function getEnvDir(_0x238230,_0xcd322={}){const _0xcf7d29=_0x20d1,_0x5d32bd={'ySrGQ':function(_0x5579a2){return _0x5579a2();},'JYpKD':function(_0x3654d7,_0x1763c6,_0x513e8c){return _0x3654d7(_0x1763c6,_0x513e8c);},'rpZlE':function(_0x445357,_0x4e0d2c,_0x74f9ec){return _0x445357(_0x4e0d2c,_0x74f9ec);},'cvUGV':function(_0x1c6302,_0x111b04){return _0x1c6302(_0x111b04);}},_0x5d4378=_0x5d32bd[_0xcf7d29(0xe1)](getRangerDir),_0x1c6111=findEnvInRoot(_0x238230,_0x5d4378);if(_0x1c6111){if(_0xcd322[_0xcf7d29(0x6d)]&&isLegacyEnvPath(_0x1c6111))throw _0x5d32bd[_0xcf7d29(0xdb)](legacyWriteError,_0x238230,_0x1c6111);return _0x1c6111;}const _0xa986c9=_0x5d32bd[_0xcf7d29(0xe1)](getRangerHomeDir);if(_0xa986c9!==_0x5d4378){const _0x492fa4=_0x5d32bd['rpZlE'](findEnvInRoot,_0x238230,_0xa986c9);if(_0x492fa4){if(_0xcd322['forWrite']&&_0x5d32bd['cvUGV'](isLegacyEnvPath,_0x492fa4))throw legacyWriteError(_0x238230,_0x492fa4);return _0x492fa4;}}const _0x36df04=join(_0xa986c9,'local',_0x238230);if(_0xcd322[_0xcf7d29(0x6d)])throw legacyWriteError(_0x238230,_0x36df04);return _0x36df04;}function isLegacyEnvPath(_0x17fd5d){const _0xcf17e2={'UXPiJ':function(_0x2005b8){return _0x2005b8();}},_0x551f0f=_0xcf17e2['UXPiJ'](getRangerDir),_0x43edb0=getRangerHomeDir();for(const _0x3163cb of new Set([_0x551f0f,_0x43edb0])){const _0x322d93=_0x3163cb['endsWith']('/')?_0x3163cb:_0x3163cb+'/';if(_0x17fd5d===_0x3163cb||_0x17fd5d['startsWith'](_0x322d93))return!![];}return![];}function legacyWriteError(_0x41ce5a,_0x30c033){const _0x5d3234=_0x20d1,_0x43814b={'eBnFr':function(_0x213a15,_0x541a4e){return _0x213a15+_0x541a4e;}};return new Error(_0x43814b[_0x5d3234(0xeb)](_0x5d3234(0x83)+_0x41ce5a+'\x22\x20to\x20legacy\x20path\x20'+_0x30c033+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x5d3234(0x98))+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x5b9ad8,_0x106369){const _0x34672d=_0x20d1,_0x4aeb8b={'sLgNN':function(_0x1d5ed5){return _0x1d5ed5();},'SeFKE':_0x34672d(0x85),'JZzvH':function(_0x1a6eea,_0x5a8379,_0x51b12a){return _0x1a6eea(_0x5a8379,_0x51b12a);},'FlpKj':_0x34672d(0x8b),'eWfee':function(_0x5a3a0e,_0x50e507,_0x2d9364,_0x5a0b5b){return _0x5a3a0e(_0x50e507,_0x2d9364,_0x5a0b5b);},'saxTc':function(_0x49b3ba,_0x4d6223,_0x4beb27,_0x4b815b){return _0x49b3ba(_0x4d6223,_0x4beb27,_0x4b815b);},'eSIFc':function(_0x2df781,_0x3820e0){return _0x2df781===_0x3820e0;}},_0x25a1a2=_0x106369?.[_0x34672d(0xe6)],_0x3aa0e2=_0x25a1a2?[_0x25a1a2]:[_0x4aeb8b[_0x34672d(0xcf)](getRangerDir),getRangerHomeDir()][_0x34672d(0x91)]((_0x538737,_0x18b36d,_0x2ece59)=>_0x2ece59['indexOf'](_0x538737)===_0x18b36d),_0x1da1e4=_0x106369?.['locations']??['ci',_0x34672d(0x8b),_0x4aeb8b[_0x34672d(0xb8)]];for(const _0x1650d9 of _0x3aa0e2){const _0x5ac317=_0x4aeb8b[_0x34672d(0xc3)](join,_0x1650d9,_0x4aeb8b[_0x34672d(0xbc)]),_0x533b2f=join(_0x1650d9,'ci'),_0x160db8=[{'location':'ci','path':_0x4aeb8b['eWfee'](join,_0x1650d9,'ci',_0x5b9ad8)},{'location':_0x4aeb8b[_0x34672d(0xbc)],'path':_0x4aeb8b['saxTc'](join,_0x1650d9,_0x4aeb8b['FlpKj'],_0x5b9ad8)},{'location':_0x34672d(0x85),'path':join(_0x1650d9,_0x5b9ad8)}];for(const _0x152f27 of _0x160db8){if(_0x1da1e4[_0x34672d(0xe2)](_0x152f27['location'])&&existsSync(_0x152f27[_0x34672d(0xd1)])){if(_0x4aeb8b[_0x34672d(0x76)](_0x152f27['location'],'legacy')&&(_0x4aeb8b[_0x34672d(0x76)](_0x152f27['path'],_0x5ac317)||_0x152f27[_0x34672d(0xd1)]===_0x533b2f)&&!hasLegacyProfileFiles(_0x152f27['path']))continue;return{'path':_0x152f27['path'],'location':_0x152f27[_0x34672d(0x8d)]};}}}return null;}function hasLegacyProfileFiles(_0x3c5afe){const _0x15da67=_0x20d1,_0x49f564={'dvLVS':function(_0x4d5833,_0x36299c,_0x1cec27){return _0x4d5833(_0x36299c,_0x1cec27);},'lkEUW':_0x15da67(0x78),'caVUd':function(_0x329d19,_0x4503a7){return _0x329d19(_0x4503a7);},'VsFJc':function(_0x1a114a,_0x2b2548,_0x2e2711){return _0x1a114a(_0x2b2548,_0x2e2711);},'BhHbd':_0x15da67(0xd0),'RVkht':function(_0x38b5e9,_0x3a4e30,_0x6ea529){return _0x38b5e9(_0x3a4e30,_0x6ea529);}};return existsSync(_0x49f564[_0x15da67(0xd8)](join,_0x3c5afe,_0x49f564[_0x15da67(0xc5)]))||_0x49f564[_0x15da67(0xaf)](existsSync,_0x49f564[_0x15da67(0x94)](join,_0x3c5afe,_0x49f564['BhHbd']))||existsSync(_0x49f564[_0x15da67(0xa4)](join,_0x3c5afe,_0x15da67(0x74)));}export function isEnvCi(_0x2d95e0){const _0x4da177=_0x20d1,_0x107036={'hKJhI':function(_0x3dfccb,_0x179a29,_0x261bf6,_0xafec23){return _0x3dfccb(_0x179a29,_0x261bf6,_0xafec23);},'tlwTy':function(_0x31038f){return _0x31038f();},'uDLGX':function(_0x4ca5b0,_0xd3bdb1){return _0x4ca5b0!==_0xd3bdb1;}};if(existsSync(_0x107036['hKJhI'](join,_0x107036['tlwTy'](getRangerDir),'ci',_0x2d95e0)))return!![];const _0x54506e=getRangerHomeDir();if(_0x107036['uDLGX'](_0x54506e,_0x107036[_0x4da177(0xa2)](getRangerDir))&&existsSync(join(_0x54506e,'ci',_0x2d95e0)))return!![];return![];}export async function cleanupTempFiles(_0x26e6a7){const _0x15fa4f=_0x20d1,_0x11e73c={'lNdZc':function(_0x31edd1,_0x456baf){return _0x31edd1!==_0x456baf;},'eiveV':_0x15fa4f(0x82)},_0x5e85f5=[_0x26e6a7['tempAuthPath'],_0x26e6a7['configPath']][_0x15fa4f(0x91)](Boolean);await Promise[_0x15fa4f(0xa7)](_0x5e85f5['map'](_0x1fa265=>unlink(_0x1fa265)['catch'](_0x4b1894=>{const _0x4f0a87=_0x15fa4f;_0x11e73c['lNdZc'](_0x4b1894[_0x4f0a87(0xd2)],_0x11e73c['eiveV'])&&console[_0x4f0a87(0xbf)](_0x4f0a87(0x77)+_0x1fa265+':',_0x4b1894['message']);})));}function _0x20d1(_0x429260,_0x4f8940){_0x429260=_0x429260-0x6a;const _0xbd3396=_0xbd33();let _0x20d145=_0xbd3396[_0x429260];return _0x20d145;}export function getSettingsPath(_0x3e747d){const _0x29f15f=_0x20d1,_0x1bc8be={'aRcpQ':function(_0x3cd926,_0x110562,_0x2e500f){return _0x3cd926(_0x110562,_0x2e500f);},'xijRn':function(_0x36c4a5,_0x501efd){return _0x36c4a5(_0x501efd);},'JpFhj':'settings.json'};return _0x1bc8be[_0x29f15f(0xb1)](join,_0x1bc8be[_0x29f15f(0xa1)](getEnvDir,_0x3e747d),_0x1bc8be[_0x29f15f(0xde)]);}export async function loadSettings(_0x1b67b6){const _0x408557=_0x20d1,_0x2145c7={'YPmuU':function(_0x74741,_0x4ba2a1,_0xfb6ff){return _0x74741(_0x4ba2a1,_0xfb6ff);}},_0x32dcda=getSettingsPath(_0x1b67b6);if(!existsSync(_0x32dcda))return{};try{const _0x44e564=await _0x2145c7[_0x408557(0x7f)](readFile,_0x32dcda,'utf-8');return JSON['parse'](_0x44e564);}catch{return{};}}export async function saveSettings(_0x34e0ad,_0x11e27d){const _0x5e523=_0x20d1,_0x3ed2a3={'hTVQr':function(_0x1fa3ef,_0x44d6b2){return _0x1fa3ef(_0x44d6b2);},'VYqlZ':function(_0x483476,_0x1ec88b,_0xb834b7){return _0x483476(_0x1ec88b,_0xb834b7);}},_0x424fd3=getSettingsPath(_0x34e0ad),_0x31a7ae=_0x3ed2a3['hTVQr'](dirname,_0x424fd3);!existsSync(_0x31a7ae)&&await mkdir(_0x31a7ae,{'recursive':!![]}),await _0x3ed2a3['VYqlZ'](writeFile,_0x424fd3,JSON[_0x5e523(0xc8)](_0x11e27d,null,0x2));}export function resolveEnvVars(_0x34a7ab){const _0x46bda3=_0x20d1,_0x675f3b={'uJpkb':function(_0x1caab2,_0x32a5e2){return _0x1caab2===_0x32a5e2;},'jPGwo':'string','adGuf':'object'};if(_0x675f3b[_0x46bda3(0x72)](typeof _0x34a7ab,_0x675f3b[_0x46bda3(0x9a)]))return _0x34a7ab['replace'](/\$\{(\w+)\}/g,(_0x401e09,_0x158576)=>{const _0x1aa4ae=_0x46bda3,_0x5aaf91=process[_0x1aa4ae(0x7b)][_0x158576];if(_0x5aaf91===undefined)throw new Error(_0x1aa4ae(0xef)+_0x158576+_0x1aa4ae(0xf0));return _0x5aaf91;});if(Array[_0x46bda3(0x80)](_0x34a7ab))return _0x34a7ab[_0x46bda3(0x7c)](resolveEnvVars);if(_0x34a7ab&&typeof _0x34a7ab===_0x675f3b[_0x46bda3(0x8e)])return Object['fromEntries'](Object[_0x46bda3(0xd6)](_0x34a7ab)['map'](([_0x2ee4f1,_0x569093])=>[_0x2ee4f1,resolveEnvVars(_0x569093)]));return _0x34a7ab;}const isRecord=_0x2fbf9f=>typeof _0x2fbf9f==='object'&&_0x2fbf9f!==null&&!Array[_0x44a5db(0x80)](_0x2fbf9f),asRecord=_0x234569=>isRecord(_0x234569)?_0x234569:undefined,mergeHeaders=(_0x5e0ac2,_0x448611)=>{const _0x3e5aa2=_0x44a5db,_0x1bf759={'kvuXZ':function(_0x31e5ef,_0x3579b0){return _0x31e5ef??_0x3579b0;}},_0x583c3a={..._0x1bf759[_0x3e5aa2(0xa5)](_0x5e0ac2,{}),..._0x448611??{}};return Object['keys'](_0x583c3a)[_0x3e5aa2(0xac)]?_0x583c3a:undefined;},SAFE_MODE_ARGS=[_0x44a5db(0xc0)],ALLOW_LOCALHOST_ARGS=[_0x44a5db(0x79),_0x44a5db(0xc2),_0x44a5db(0x92),_0x44a5db(0x86)];export function buildBrowserOptionsFromSettings(_0x4c8ce5,_0x1c88d={}){const _0xbde5a3=_0x44a5db,_0x1b373b={'QlJfN':function(_0x4c5241,_0xfd4512){return _0x4c5241(_0xfd4512);},'grDhB':function(_0x44246f,_0x504cc0){return _0x44246f===_0x504cc0;},'HVQrh':function(_0x31a91f,_0x2f5f5c){return _0x31a91f===_0x2f5f5c;},'CyNiW':'string','sfbJz':function(_0x196b15,_0x359f47){return _0x196b15(_0x359f47);}},_0x4468b6=_0x1b373b['QlJfN'](asRecord,_0x4c8ce5['browser']),_0x56aa88={...asRecord(_0x4468b6?.['launchOptions'])??{}};_0x1b373b[_0xbde5a3(0xe9)](typeof _0x1c88d['headless'],'boolean')&&(_0x56aa88[_0xbde5a3(0x70)]=_0x1c88d[_0xbde5a3(0x70)]);if(_0x4c8ce5[_0xbde5a3(0x90)]){const _0x3ca6fe=_0x56aa88['args']??[],_0x396263=SAFE_MODE_ARGS['filter'](_0x5ed805=>!_0x3ca6fe['includes'](_0x5ed805));_0x56aa88['args']=[..._0x3ca6fe,..._0x396263];}if(_0x4c8ce5[_0xbde5a3(0x88)]){const _0x2fbf85=_0x56aa88['args']??[],_0x47d2da=ALLOW_LOCALHOST_ARGS[_0xbde5a3(0x91)](_0x374520=>!_0x2fbf85['includes'](_0x374520));_0x56aa88[_0xbde5a3(0xd9)]=[..._0x2fbf85,..._0x47d2da];}const _0x481d8a={..._0x1b373b['QlJfN'](asRecord,_0x4468b6?.[_0xbde5a3(0x96)])??{}};_0x481d8a[_0xbde5a3(0xd3)]=!![];_0x1b373b['HVQrh'](typeof _0x4c8ce5['userAgent'],_0x1b373b['CyNiW'])&&(_0x481d8a['userAgent']=_0x4c8ce5['userAgent']);const _0x2fc5d0=mergeHeaders(_0x1b373b['sfbJz'](asRecord,_0x481d8a['extraHTTPHeaders']),asRecord(_0x4c8ce5['headers']));return _0x2fc5d0?_0x481d8a[_0xbde5a3(0xec)]=_0x2fc5d0:delete _0x481d8a[_0xbde5a3(0xec)],_0x1c88d['storageStatePath']&&(_0x481d8a['storageState']=_0x1c88d['storageStatePath']),{'launchOptions':_0x56aa88,'contextOptions':_0x481d8a};}export async function resolveProfileStorageState(_0x42bded){const _0x4a254b=_0x44a5db,_0xddc706={'VbYJN':function(_0x336671,_0x42c9bd){return _0x336671(_0x42c9bd);}};return _0xddc706['VbYJN'](resolveLocalAuthPath,_0xddc706[_0x4a254b(0xb9)](getEnvDir,_0x42bded));}async function resolveLocalAuthPath(_0x5e6999){const _0x2a619a=_0x44a5db,_0x425149={'FquDA':_0x2a619a(0xd0),'MHLeZ':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','mfzFG':function(_0x3237d0,_0x547e3e,_0x52b3d8){return _0x3237d0(_0x547e3e,_0x52b3d8);},'zPKvp':function(_0x1236c4,_0x222b43,_0x1d3321){return _0x1236c4(_0x222b43,_0x1d3321);},'wmrLJ':function(_0x1da41f,_0x476ed7){return _0x1da41f instanceof _0x476ed7;}},_0x30b5a3=join(_0x5e6999,'auth.json.enc'),_0x17646a=join(_0x5e6999,_0x425149[_0x2a619a(0x7a)]);if(existsSync(_0x30b5a3))try{const _0x1f8002=await getToken();if(!_0x1f8002)throw new Error(_0x425149[_0x2a619a(0x6f)]);const _0x41e670=await readFile(_0x30b5a3),_0x59f111=_0x425149['mfzFG'](decrypt,_0x41e670,_0x1f8002),_0x56b275=join(tmpdir(),_0x2a619a(0xda)+Date['now']()+'.json');return await _0x425149[_0x2a619a(0xba)](writeFile,_0x56b275,_0x59f111),{'storageStatePath':_0x56b275,'tempAuthPath':_0x56b275};}catch(_0x4639db){const _0x25a100=_0x425149['wmrLJ'](_0x4639db,Error)?_0x4639db[_0x2a619a(0xa8)]:String(_0x4639db);throw new Error(_0x2a619a(0xcc)+_0x25a100);}if(existsSync(_0x17646a))return{'storageStatePath':_0x17646a};return{};}export async function buildPlaywrightConfig(_0xe66819,_0x381e08,_0x26e330,_0x300d58,_0x3e83f2){const _0x1e1584=_0x44a5db,_0x4f6046={'gqUDF':'stagehand','mYSXA':function(_0x358054,_0x24c432){return _0x358054(_0x24c432);},'mLsiM':function(_0x44bc32,_0x2be672){return _0x44bc32(_0x2be672);}};if(_0x3e83f2)return buildPlaywrightConfigCore(_0xe66819,_0x3e83f2,_0x381e08,_0x26e330,_0x300d58,_0x4f6046['gqUDF']);const {storageStatePath:_0x35466e,tempAuthPath:_0x330694}=await resolveLocalAuthPath(_0x4f6046[_0x1e1584(0xe8)](getEnvDir,_0x381e08));try{const _0x440877=await buildPlaywrightConfigCore(_0xe66819,_0x35466e,_0x381e08,_0x26e330,_0x300d58,'stagehand');return{..._0x440877,'tempAuthPath':_0x330694};}catch(_0x1cd655){_0x330694&&await _0x4f6046['mLsiM'](unlink,_0x330694)['catch'](()=>{});throw _0x1cd655;}}export async function buildPlaywrightConfigCore(_0x2799cb,_0x52128b,_0xedd3d6,_0x3d36c5,_0x5e28ff,_0x45081e=_0x44a5db(0x7e)){const _0x47a337=_0x44a5db,_0x258356={'BtZZZ':function(_0x12e9ce,_0x50dfab){return _0x12e9ce===_0x50dfab;},'rRAuM':'clipboard-read','qlltT':function(_0xa756a2){return _0xa756a2();},'CstcQ':function(_0x34da82,_0x38f2c6,_0x4d3828,_0x4fbb8e){return _0x34da82(_0x38f2c6,_0x4d3828,_0x4fbb8e);},'Nemqh':'playwright-cli','uAyay':_0x47a337(0x8a),'oyHgx':_0x47a337(0x93),'cCGeb':function(_0x4f25b2,_0x3913f7,_0x31aa8c){return _0x4f25b2(_0x3913f7,_0x31aa8c);},'vkrFf':function(_0x349c15){return _0x349c15();},'yDOmS':function(_0x368747,_0x3e900e){return _0x368747(_0x3e900e);},'pBAgQ':function(_0x4a2144,_0x48c7d7,_0x53660a){return _0x4a2144(_0x48c7d7,_0x53660a);},'rRhLb':'-cli','lUnCw':function(_0x299864,_0x1eb7e6,_0x3237a1){return _0x299864(_0x1eb7e6,_0x3237a1);}},_0x30be34=_0x3d36c5||_0x258356['qlltT'](randomUUID),_0x1ece91=_0x258356[_0x47a337(0xe0)](join,_0x258356['qlltT'](getRangerDir),'sessions',_0x30be34),_0x2ca749=Boolean(_0x2799cb[_0x47a337(0xd5)]),_0x4f4f92=_0x2ca749?{'browserName':'chromium','cdpEndpoint':_0x2799cb['cdpEndpoint']}:((()=>{const _0x598d23=_0x47a337,{launchOptions:_0x17f734,contextOptions:_0x208195}=buildBrowserOptionsFromSettings(_0x2799cb,{'headless':_0x5e28ff?![]:_0x2799cb['headless']??!![],'storageStatePath':_0x52128b});if(_0x258356[_0x598d23(0xaa)](process['getuid']?.(),0x0)){const _0x5a666b=['--no-sandbox','--disable-setuid-sandbox'],_0x13411e=_0x17f734[_0x598d23(0xd9)]??[],_0x2d0345=_0x5a666b[_0x598d23(0x91)](_0x39fe07=>!_0x13411e['includes'](_0x39fe07));_0x17f734['args']=[..._0x13411e,..._0x2d0345];}return{'isolated':!![],'browserName':_0x598d23(0xad),'launchOptions':_0x17f734,'contextOptions':{..._0x208195,'permissions':[_0x258356['rRAuM'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x20649b=_0x258356['BtZZZ'](_0x45081e,_0x258356[_0x47a337(0x8f)])?{'browser':_0x4f4f92,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1ece91,'outputMode':_0x258356['uAyay'],'codegen':'none'}:{'name':_0xedd3d6,'browser':_0x4f4f92,'capabilities':['core',_0x258356['oyHgx'],_0x47a337(0xa9),'pdf',_0x47a337(0xc1)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1ece91};if(!_0x2ca749){const _0x15cc13=_0x20649b['browser'],_0x174d5f=_0x15cc13['contextOptions'];if(_0x258356['BtZZZ'](_0x174d5f['userAgent'],undefined))delete _0x174d5f[_0x47a337(0xb6)];if(_0x174d5f[_0x47a337(0x8c)]===undefined)delete _0x174d5f['storageState'];}const _0x2725ef=_0x258356['cCGeb'](join,_0x258356[_0x47a337(0xc4)](tmpdir),_0x47a337(0xd4));!_0x258356['yDOmS'](existsSync,_0x2725ef)&&await _0x258356[_0x47a337(0xf3)](mkdir,_0x2725ef,{'recursive':!![]});const _0x4b9a4c=_0x258356[_0x47a337(0xaa)](_0x45081e,_0x258356[_0x47a337(0x8f)])?_0x258356['rRhLb']:'',_0xf72c4f=_0x258356[_0x47a337(0x97)](join,_0x2725ef,_0xedd3d6+'-'+Date[_0x47a337(0xcb)]()+_0x4b9a4c+'.json');return await writeFile(_0xf72c4f,JSON[_0x47a337(0xc8)](_0x20649b,null,0x2)),{'configPath':_0xf72c4f,'storageStatePath':_0x52128b};}export async function buildPlaywrightCliConfig(_0x2652dd,_0x5166ff,_0x523103,_0x2f86f7,_0x137fb0){const _0x1b20af=_0x44a5db,_0x1f701b={'QKuWY':_0x1b20af(0xc9),'gTgJo':function(_0x8f3f78,_0x2b407a){return _0x8f3f78(_0x2b407a);}};if(_0x137fb0)return buildPlaywrightConfigCore(_0x2652dd,_0x137fb0,_0x5166ff,_0x523103,_0x2f86f7,_0x1f701b['QKuWY']);const {storageStatePath:_0x31b8a8,tempAuthPath:_0x46fc5c}=await _0x1f701b['gTgJo'](resolveLocalAuthPath,getEnvDir(_0x5166ff));try{const _0x131677=await buildPlaywrightConfigCore(_0x2652dd,_0x31b8a8,_0x5166ff,_0x523103,_0x2f86f7,_0x1f701b[_0x1b20af(0xb5)]);return{..._0x131677,'tempAuthPath':_0x46fc5c};}catch(_0x1f41e5){_0x46fc5c&&await unlink(_0x46fc5c)[_0x1b20af(0x6c)](()=>{});throw _0x1f41e5;}}export async function buildRangerwrightCliConfig(_0x1944a6,_0x4f7a0a,_0x12190c,_0x589f41,_0x25bf36){const _0xf4cad2=_0x44a5db,_0x386bde={'MvAKM':function(_0x2dbd29,_0x519689){return _0x2dbd29===_0x519689;},'alOWv':'--no-sandbox','eoFIH':'clipboard-write','unJHP':function(_0x4607f2){return _0x4607f2();},'eMwQf':function(_0x535796,_0x47d71c,_0x3a779b,_0x46a43f){return _0x535796(_0x47d71c,_0x3a779b,_0x46a43f);},'QxuPh':function(_0x43eb9a,_0x2b123f){return _0x43eb9a(_0x2b123f);},'oXspR':_0xf4cad2(0xad),'yMdHX':'ranger-config','QTbjM':function(_0x5b4c2c,_0x38707d){return _0x5b4c2c(_0x38707d);},'xpsSq':function(_0x4f3b34,_0x3a22d4,_0x4c08c4){return _0x4f3b34(_0x3a22d4,_0x4c08c4);}},{storageStatePath:_0x1467f1,tempAuthPath:_0x3e8ef4}=_0x25bf36?{'storageStatePath':_0x25bf36,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4f7a0a)),_0x10df12=_0x12190c||_0x386bde['unJHP'](randomUUID),_0x1f3633=_0x386bde[_0xf4cad2(0xae)](join,getRangerDir(),'sessions',_0x10df12),_0x4abf90=_0x386bde[_0xf4cad2(0xbe)](Boolean,_0x1944a6[_0xf4cad2(0xd5)]),_0x513961=_0x4abf90?{'browserName':_0x386bde['oXspR'],'cdpEndpoint':_0x1944a6[_0xf4cad2(0xd5)]}:((()=>{const _0x5dc987=_0xf4cad2,{launchOptions:_0x1931ee,contextOptions:_0x188cf9}=buildBrowserOptionsFromSettings(_0x1944a6,{'headless':_0x589f41?![]:_0x1944a6[_0x5dc987(0x70)]??!![],'storageStatePath':_0x1467f1});if(_0x386bde['MvAKM'](process[_0x5dc987(0xdd)]?.(),0x0)){const _0x105555=[_0x386bde['alOWv'],_0x5dc987(0x89)],_0x56a7be=_0x1931ee[_0x5dc987(0xd9)]??[],_0x16bb45=_0x105555['filter'](_0x23e2e2=>!_0x56a7be[_0x5dc987(0xe2)](_0x23e2e2));_0x1931ee[_0x5dc987(0xd9)]=[..._0x56a7be,..._0x16bb45];}return{'browserName':'chromium','launchOptions':_0x1931ee,'contextOptions':{..._0x188cf9,'permissions':[_0x5dc987(0xbd),_0x386bde[_0x5dc987(0xc6)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x4abf90){const _0x5e1948=_0x513961['contextOptions'];if(_0x5e1948){if(_0x5e1948[_0xf4cad2(0xb6)]===undefined)delete _0x5e1948['userAgent'];if(_0x386bde[_0xf4cad2(0x6b)](_0x5e1948[_0xf4cad2(0x8c)],undefined))delete _0x5e1948[_0xf4cad2(0x8c)];}}const _0x52731a={'browser':_0x513961,'outputDir':_0x1f3633,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5aeeb2;try{const _0x29618a=join(_0x386bde[_0xf4cad2(0xee)](tmpdir),_0x386bde[_0xf4cad2(0x9b)]);!_0x386bde[_0xf4cad2(0xa6)](existsSync,_0x29618a)&&await _0x386bde['xpsSq'](mkdir,_0x29618a,{'recursive':!![]}),_0x5aeeb2=join(_0x29618a,_0x4f7a0a+'-'+Date['now']()+_0xf4cad2(0xb4)),await writeFile(_0x5aeeb2,JSON['stringify'](_0x52731a,null,0x2));}catch(_0x4fd428){_0x3e8ef4&&await _0x386bde['QTbjM'](unlink,_0x3e8ef4)['catch'](()=>{});throw _0x4fd428;}return{'configPath':_0x5aeeb2,'storageStatePath':_0x1467f1,'tempAuthPath':_0x3e8ef4,'outputDir':_0x1f3633};}export async function buildNovaActCliConfig(_0x41683b,_0x17f3bd,_0x16c2c9,_0x8b6fc,_0x2e160f){const _0xcc7bc6=_0x44a5db,_0x28dc1a={'lOQzr':function(_0x59ad0a){return _0x59ad0a();},'tDOJW':'sessions','aRNcu':function(_0x702247,_0x49ca19,_0x30fb0f){return _0x702247(_0x49ca19,_0x30fb0f);},'qJEAY':_0xcc7bc6(0xc7),'NDTEC':function(_0x17b680,_0x405dfd){return _0x17b680===_0x405dfd;},'XxTpc':'--disable-setuid-sandbox','COAWh':function(_0x518367,_0x33358c){return _0x518367(_0x33358c);},'yFhFN':function(_0x9235ce,_0x4a38f5){return _0x9235ce(_0x4a38f5);}},{storageStatePath:_0x844fd,tempAuthPath:_0x439437}=_0x2e160f?{'storageStatePath':_0x2e160f,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x17f3bd)),_0x50d1e9=_0x16c2c9||randomUUID(),_0x4e65d3=join(_0x28dc1a[_0xcc7bc6(0x95)](getRangerDir),_0x28dc1a[_0xcc7bc6(0x9e)],_0x50d1e9),_0x11612f=_0x28dc1a[_0xcc7bc6(0xbb)](join,_0x4e65d3,'nova-user-data'),_0x2068e2=_0x844fd?join(_0x11612f,_0x28dc1a[_0xcc7bc6(0x81)]):undefined,{launchOptions:_0x17324e,contextOptions:_0x121978}=buildBrowserOptionsFromSettings(_0x41683b,{'headless':_0x8b6fc?![]:_0x41683b[_0xcc7bc6(0x70)]??!![],'storageStatePath':_0x844fd});if(_0x28dc1a['NDTEC'](process['getuid']?.(),0x0)){const _0x2151b=['--no-sandbox',_0x28dc1a[_0xcc7bc6(0xf1)]],_0x5173cf=_0x17324e['args']??[],_0x16f2fd=_0x2151b[_0xcc7bc6(0x91)](_0x30949=>!_0x5173cf['includes'](_0x30949));_0x17324e[_0xcc7bc6(0xd9)]=[..._0x5173cf,..._0x16f2fd];}const _0x372105=typeof _0x17324e['executablePath']===_0xcc7bc6(0x6a)?_0x17324e[_0xcc7bc6(0xe4)]:_0x844fd?chromium['executablePath']():undefined;return{'storageStatePath':_0x844fd,'tempAuthPath':_0x439437,'baseUrl':_0x41683b[_0xcc7bc6(0x99)],'headless':_0x28dc1a[_0xcc7bc6(0xe5)](Boolean,_0x17324e[_0xcc7bc6(0x70)]),'userDataDir':_0x11612f,'browserProfilePath':_0x2068e2,'executablePath':_0x372105,'launchArgs':Array[_0xcc7bc6(0x80)](_0x17324e['args'])?_0x17324e[_0xcc7bc6(0xd9)]['filter'](_0x149da9=>typeof _0x149da9==='string'):[],'userAgent':_0x28dc1a[_0xcc7bc6(0xf2)](typeof _0x121978['userAgent'],'string')?_0x121978['userAgent']:undefined,'extraHTTPHeaders':_0x121978[_0xcc7bc6(0xec)],'allowInsecureLocalhost':_0x28dc1a['yFhFN'](Boolean,_0x41683b['allowInsecureLocalhost']),'safeMode':_0x28dc1a['COAWh'](Boolean,_0x41683b[_0xcc7bc6(0x90)]),'cdpEndpoint':_0x41683b[_0xcc7bc6(0xd5)],'isCdpMode':Boolean(_0x41683b['cdpEndpoint'])};}export function getNestedValue(_0x30a88c,_0x18f847){const _0x547d2f=_0x44a5db,_0x262d83={'NgKkO':function(_0x4ed923,_0x2b819c){return _0x4ed923!==_0x2b819c;}},_0x40526f=parseKeyPath(_0x18f847);let _0x2ab323=_0x30a88c;for(const _0x22e969 of _0x40526f){if(_0x2ab323===null||_0x2ab323===undefined||_0x262d83[_0x547d2f(0x9d)](typeof _0x2ab323,_0x547d2f(0x71)))return undefined;_0x2ab323=_0x2ab323[_0x22e969];}return _0x2ab323;}export function setNestedValue(_0x1d58d9,_0x1186d4,_0x210157){const _0x22cedf=_0x44a5db,_0x25c59c={'TBYOz':function(_0x5afac4,_0x4f09ee){return _0x5afac4-_0x4f09ee;},'BmiQw':function(_0x11b094,_0x15e387){return _0x11b094 in _0x15e387;}},_0x205bac=parseKeyPath(_0x1186d4);let _0x2be08a=_0x1d58d9;for(let _0x2c71be=0x0;_0x2c71be<_0x25c59c['TBYOz'](_0x205bac['length'],0x1);_0x2c71be++){const _0x30460b=_0x205bac[_0x2c71be];(!_0x25c59c[_0x22cedf(0x84)](_0x30460b,_0x2be08a)||typeof _0x2be08a[_0x30460b]!=='object')&&(_0x2be08a[_0x30460b]={}),_0x2be08a=_0x2be08a[_0x30460b];}_0x2be08a[_0x205bac[_0x205bac[_0x22cedf(0xac)]-0x1]]=_0x210157;}export function deleteNestedValue(_0x5600ae,_0x12990e){const _0x38fd0d=_0x44a5db,_0xe78a00={'YVNyt':function(_0x388c31,_0x356a39){return _0x388c31(_0x356a39);},'wqQIK':function(_0x48f6cc,_0x5238d5){return _0x48f6cc<_0x5238d5;},'yAciL':function(_0x20fd47,_0x349aa6){return _0x20fd47-_0x349aa6;},'tnPXQ':function(_0x10f55b,_0x4a683b){return _0x10f55b===_0x4a683b;},'ZOmPh':function(_0xed4287,_0x4ce596){return _0xed4287!==_0x4ce596;},'ocASR':function(_0x10e58d,_0x9dee9b){return _0x10e58d in _0x9dee9b;}},_0x1e7554=_0xe78a00[_0x38fd0d(0x75)](parseKeyPath,_0x12990e);let _0x1f3947=_0x5600ae;for(let _0x1df061=0x0;_0xe78a00['wqQIK'](_0x1df061,_0xe78a00['yAciL'](_0x1e7554[_0x38fd0d(0xac)],0x1));_0x1df061++){if(_0xe78a00['tnPXQ'](_0x1f3947,null)||_0x1f3947===undefined||_0xe78a00['ZOmPh'](typeof _0x1f3947,'object'))return![];_0x1f3947=_0x1f3947[_0x1e7554[_0x1df061]];}if(_0x1f3947===null||_0xe78a00[_0x38fd0d(0x9c)](_0x1f3947,undefined)||typeof _0x1f3947!=='object')return![];const _0x12be1b=_0x1e7554[_0x1e7554['length']-0x1];if(_0xe78a00['ocASR'](_0x12be1b,_0x1f3947))return delete _0x1f3947[_0x12be1b],!![];return![];}function _0xbd33(){const _0x3b6e36=['clipboard-read','QxuPh','warn','--disable-features=WebBluetooth','vision','--allow-running-insecure-content','JZzvH','vkrFf','lkEUW','eoFIH','Default','stringify','playwright-cli','setupHeaders','now','Failed\x20to\x20decrypt\x20auth\x20state:\x20','setupHeader','77nQpxHP','sLgNN','auth.json','path','code','ignoreHTTPSErrors','ranger-config','cdpEndpoint','entries','2401208LfebCf','dvLVS','args','ranger-auth-','JYpKD','QIAEn','getuid','JpFhj','1177204cjPwwH','CstcQ','ySrGQ','includes','repeat','executablePath','COAWh','rangerDir','5QhaSFm','mYSXA','grDhB','14HYMlTA','eBnFr','extraHTTPHeaders','4167JbNjSI','unJHP','Environment\x20variable\x20','\x20is\x20not\x20set','XxTpc','NDTEC','pBAgQ','string','MvAKM','catch','forWrite','BCVqD','MHLeZ','headless','object','uJpkb','2766189IsYBvD','auth.json.enc','YVNyt','eSIFc','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','settings.json','--disable-web-security','FquDA','env','map','gObXG','stagehand','YPmuU','isArray','qJEAY','ENOENT','Refusing\x20to\x20write\x20profile\x20\x22','BmiQw','legacy','--allow-insecure-localhost','join','allowInsecureLocalhost','--disable-setuid-sandbox','file','local','storageState','location','adGuf','Nemqh','safeMode','filter','--unsafely-treat-insecure-origin-as-secure=http://localhost','tabs','VsFJc','lOQzr','contextOptions','lUnCw','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','baseUrl','jPGwo','yMdHX','tnPXQ','NgKkO','tDOJW','Igbtq','3754204faVHue','xijRn','tlwTy','1854804WVlwtB','RVkht','kvuXZ','QTbjM','all','message','install','BtZZZ','7310ZzLFFr','length','chromium','eMwQf','caVUd','4183398MaMFkF','aRcpQ','push','1vPtpBh','-rangerwright.json','QKuWY','userAgent','AlZLv','SeFKE','VbYJN','zPKvp','aRNcu','FlpKj'];_0xbd33=function(){return _0x3b6e36;};return _0xbd33();}function parseKeyPath(_0x589311){const _0x5b6acc=_0x44a5db,_0x1e6fea={'QDHKA':function(_0x1841b0,_0x47a332){return _0x1841b0===_0x47a332;},'VzFXo':'header','BCVqD':'headers','Igbtq':_0x5b6acc(0xcd),'IZKRr':_0x5b6acc(0xca)},_0x330d3c=_0x589311['split']('.');return _0x1e6fea['QDHKA'](_0x330d3c[0x0],_0x1e6fea['VzFXo'])&&(_0x330d3c[0x0]=_0x1e6fea[_0x5b6acc(0x6e)]),_0x330d3c[0x0]===_0x1e6fea[_0x5b6acc(0x9f)]&&(_0x330d3c[0x0]=_0x1e6fea['IZKRr']),_0x330d3c;}export function formatSettings(_0x51a94d,_0x3f1f64=0x0){const _0xa9e067=_0x44a5db,_0xf400c={'gObXG':function(_0x580609,_0x1e011c){return _0x580609===_0x1e011c;},'pwYPB':'object'},_0x3f5472=[],_0xac0352='\x20\x20'[_0xa9e067(0xe3)](_0x3f1f64);for(const [_0x40b98f,_0xeca139]of Object['entries'](_0x51a94d)){if(_0xf400c['gObXG'](_0xeca139,undefined))continue;if(_0xf400c[_0xa9e067(0x7d)](typeof _0xeca139,_0xf400c['pwYPB'])&&_0xeca139!==null){_0x3f5472['push'](''+_0xac0352+_0x40b98f+':');for(const [_0x8b5ea8,_0x5bf915]of Object[_0xa9e067(0xd6)](_0xeca139)){_0x3f5472['push'](_0xac0352+'\x20\x20'+_0x8b5ea8+':\x20'+_0x5bf915);}}else _0x3f5472[_0xa9e067(0xb2)](''+_0xac0352+_0x40b98f+':\x20'+_0xeca139);}return _0x3f5472[_0xa9e067(0x87)]('\x0a');}
|
|
1
|
+
const _0x497371=_0x3a60;(function(_0x553558,_0x14ac0d){const _0x4f6b26=_0x3a60,_0x3beb4b=_0x553558();while(!![]){try{const _0x3e3c18=parseInt(_0x4f6b26(0x15a))/0x1+-parseInt(_0x4f6b26(0x190))/0x2+parseInt(_0x4f6b26(0x19f))/0x3*(-parseInt(_0x4f6b26(0x156))/0x4)+parseInt(_0x4f6b26(0x166))/0x5*(parseInt(_0x4f6b26(0x151))/0x6)+-parseInt(_0x4f6b26(0x15b))/0x7+parseInt(_0x4f6b26(0x136))/0x8+parseInt(_0x4f6b26(0x189))/0x9;if(_0x3e3c18===_0x14ac0d)break;else _0x3beb4b['push'](_0x3beb4b['shift']());}catch(_0x1b9883){_0x3beb4b['push'](_0x3beb4b['shift']());}}}(_0x54e0,0x62f46));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';function _0x54e0(){const _0x558a1b=['jiSYg','pqYPc','HCDGm','ndQNB','doEvn','Environment\x20variable\x20','core','ZoZeg','GeUbu','KJSQb','857916gNnOGd','forWrite','ENOENT','YOjDd','PKQaX','DGbOn','stringify','590950gnVoTn','Failed\x20to\x20decrypt\x20auth\x20state:\x20','dvuwQ','playwright-cli','--allow-insecure-localhost','CMIPx','length','\x22\x20to\x20legacy\x20path\x20','ftDSY','file','local','--disable-setuid-sandbox','bfaDL','vAHKn','zHYub','12wzhzro','Sjvqd','location','oksuz','HzDWr','baseUrl','kpFVm','KGwxz','userAgent','Refusing\x20to\x20write\x20profile\x20\x22','OFkNT','isArray','pCjdH','split','string','pdf','browser','extraHTTPHeaders','bSikD','TrKRp','entries','executablePath','path','install','includes','none','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','bumdg','psqGS','5873312YxpmWJ','object','ZUgDy','jRddQ','cdpEndpoint','.json','clipboard-read','AKqcm','env','args','boolean','GXfXx','VCvLn','nova-user-data','storageState','KnrUz','stagehand','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','BtUvc','FIGxr','filter','contextOptions','auth.json.enc','xcUon','warn','settings.json','tabs','552XoQxnx','map','kujQO','catch','all','559940fIzEfg','keys','sessions','now','269493wSCcxQ','2904972CukltM','headers','Default','allowInsecureLocalhost','bswcw','getuid','parse','--disable-features=WebBluetooth','--unsafely-treat-insecure-origin-as-secure=http://localhost','utf-8','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','31345LWCrNJ','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','storageStatePath','indexOf','--disable-web-security','XmAKW','legacy','header','JjJxD','Vvqvu','vAmLB','QlESa','-cli','headless','startsWith','join','IOvrB','fTqRb','PnCZJ','iFsEx','locations','aDTLn','anEGi','usoRr','eetYE'];_0x54e0=function(){return _0x558a1b;};return _0x54e0();}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x23dfcf,_0x6f4f5b){const _0x3f30f2=_0x3a60,_0xb0b4e3={'IOvrB':function(_0x24e232,_0x438776,_0x32fb3f,_0x4d8937){return _0x24e232(_0x438776,_0x32fb3f,_0x4d8937);},'pDaEb':'local','PSpwP':function(_0x4d6d80,_0x30ed80,_0x1bcc7e){return _0x4d6d80(_0x30ed80,_0x1bcc7e);},'GXfXx':function(_0x32e331,_0x3d05ac){return _0x32e331(_0x3d05ac);}},_0x69575a=_0xb0b4e3[_0x3f30f2(0x176)](join,_0x6f4f5b,'ci',_0x23dfcf),_0x39d393=join(_0x6f4f5b,_0xb0b4e3['pDaEb'],_0x23dfcf),_0x442462=join(_0x6f4f5b,_0x23dfcf),_0x480161=join(_0x6f4f5b,_0x3f30f2(0x19a)),_0x3e6264=_0xb0b4e3['PSpwP'](join,_0x6f4f5b,'ci');if(existsSync(_0x69575a))return _0x69575a;if(existsSync(_0x39d393))return _0x39d393;if(_0xb0b4e3['GXfXx'](existsSync,_0x442462)&&(_0x442462!==_0x480161&&_0x442462!==_0x3e6264?!![]:_0xb0b4e3[_0x3f30f2(0x141)](hasLegacyProfileFiles,_0x442462)))return _0x442462;return null;}export function getEnvDir(_0x5b9158,_0x28f293={}){const _0x2f9594=_0x3a60,_0x4f1934={'dsttA':function(_0x57ea94){return _0x57ea94();},'uAEni':function(_0x14c816,_0xd611df,_0x5318ce){return _0x14c816(_0xd611df,_0x5318ce);},'kujQO':function(_0x441690,_0x5694a5){return _0x441690(_0x5694a5);},'YOjDd':function(_0xa40636){return _0xa40636();},'bSikD':function(_0x194bd2,_0x33fe59){return _0x194bd2!==_0x33fe59;},'zHYub':function(_0x2e0de2,_0x2a6224,_0x4cb465){return _0x2e0de2(_0x2a6224,_0x4cb465);},'JjJxD':function(_0x136dda,_0x3b3e99,_0x3be8a1,_0x2b6830){return _0x136dda(_0x3b3e99,_0x3be8a1,_0x2b6830);},'SjpBr':'local','CMIPx':function(_0x22139f,_0x366f11,_0x3d1b9d){return _0x22139f(_0x366f11,_0x3d1b9d);}},_0x232fab=_0x4f1934['dsttA'](getRangerDir),_0x2f74f2=_0x4f1934['uAEni'](findEnvInRoot,_0x5b9158,_0x232fab);if(_0x2f74f2){if(_0x28f293[_0x2f9594(0x18a)]&&_0x4f1934[_0x2f9594(0x153)](isLegacyEnvPath,_0x2f74f2))throw legacyWriteError(_0x5b9158,_0x2f74f2);return _0x2f74f2;}const _0x1bfb61=_0x4f1934[_0x2f9594(0x18c)](getRangerHomeDir);if(_0x4f1934[_0x2f9594(0x12b)](_0x1bfb61,_0x232fab)){const _0x1b4f7d=_0x4f1934[_0x2f9594(0x19e)](findEnvInRoot,_0x5b9158,_0x1bfb61);if(_0x1b4f7d){if(_0x28f293['forWrite']&&_0x4f1934['kujQO'](isLegacyEnvPath,_0x1b4f7d))throw legacyWriteError(_0x5b9158,_0x1b4f7d);return _0x1b4f7d;}}const _0x53544c=_0x4f1934[_0x2f9594(0x16e)](join,_0x1bfb61,_0x4f1934['SjpBr'],_0x5b9158);if(_0x28f293['forWrite'])throw _0x4f1934[_0x2f9594(0x195)](legacyWriteError,_0x5b9158,_0x53544c);return _0x53544c;}function isLegacyEnvPath(_0x1294b0){const _0x3350ff=_0x3a60,_0x249dd4=getRangerDir(),_0x345e02=getRangerHomeDir();for(const _0x11052e of new Set([_0x249dd4,_0x345e02])){const _0x29453b=_0x11052e['endsWith']('/')?_0x11052e:_0x11052e+'/';if(_0x1294b0===_0x11052e||_0x1294b0[_0x3350ff(0x174)](_0x29453b))return!![];}return![];}function _0x3a60(_0x455da0,_0x43a7ea){_0x455da0=_0x455da0-0x11a;const _0x54e00e=_0x54e0();let _0x3a608e=_0x54e00e[_0x455da0];return _0x3a608e;}function legacyWriteError(_0x49dcbc,_0x1d9f5b){const _0x4fc0bb=_0x3a60,_0xd939a2={'fklgL':function(_0x2360a7,_0x443e6b){return _0x2360a7+_0x443e6b;}};return new Error(_0xd939a2['fklgL'](_0x4fc0bb(0x122)+_0x49dcbc+_0x4fc0bb(0x197)+_0x1d9f5b+'.\x0a'+_0x4fc0bb(0x147),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+_0x4fc0bb(0x133));}export function findExistingEnv(_0x3fced6,_0x43c20e){const _0x4fd91a=_0x3a60,_0x309e24={'zhhba':function(_0x3e5220){return _0x3e5220();},'Vvqvu':function(_0x54dd1d,_0x5ade97,_0xc3eb6d){return _0x54dd1d(_0x5ade97,_0xc3eb6d);},'WVeAV':function(_0x5d1308,_0x463583){return _0x5d1308(_0x463583);},'gSUPW':function(_0x4ccb3c,_0x2eb9d3){return _0x4ccb3c===_0x2eb9d3;},'xcUon':_0x4fd91a(0x16c),'ebveg':function(_0x1ee96a,_0x2f093c){return _0x1ee96a===_0x2f093c;}},_0x1ca367=_0x43c20e?.['rangerDir'],_0x5a0ed5=_0x1ca367?[_0x1ca367]:[getRangerDir(),_0x309e24['zhhba'](getRangerHomeDir)]['filter']((_0x588d5d,_0x9f9ce0,_0x937831)=>_0x937831[_0x4fd91a(0x169)](_0x588d5d)===_0x9f9ce0),_0x5ef767=_0x43c20e?.[_0x4fd91a(0x17a)]??['ci','local','legacy'];for(const _0x3c3203 of _0x5a0ed5){const _0x2359f1=join(_0x3c3203,_0x4fd91a(0x19a)),_0x3c31bb=_0x309e24[_0x4fd91a(0x16f)](join,_0x3c3203,'ci'),_0x40efa6=[{'location':'ci','path':join(_0x3c3203,'ci',_0x3fced6)},{'location':'local','path':join(_0x3c3203,'local',_0x3fced6)},{'location':_0x4fd91a(0x16c),'path':join(_0x3c3203,_0x3fced6)}];for(const _0x36cbdd of _0x40efa6){if(_0x5ef767['includes'](_0x36cbdd['location'])&&_0x309e24['WVeAV'](existsSync,_0x36cbdd['path'])){if(_0x309e24['gSUPW'](_0x36cbdd[_0x4fd91a(0x11b)],_0x309e24[_0x4fd91a(0x14d)])&&(_0x36cbdd[_0x4fd91a(0x12f)]===_0x2359f1||_0x309e24['ebveg'](_0x36cbdd['path'],_0x3c31bb))&&!hasLegacyProfileFiles(_0x36cbdd[_0x4fd91a(0x12f)]))continue;return{'path':_0x36cbdd[_0x4fd91a(0x12f)],'location':_0x36cbdd['location']};}}}return null;}function hasLegacyProfileFiles(_0x4d629c){const _0x334c6f=_0x3a60,_0x502263={'kpFVm':_0x334c6f(0x14f),'KJSQb':_0x334c6f(0x14c)};return existsSync(join(_0x4d629c,_0x502263[_0x334c6f(0x11f)]))||existsSync(join(_0x4d629c,'auth.json'))||existsSync(join(_0x4d629c,_0x502263[_0x334c6f(0x188)]));}export function isEnvCi(_0x38ffad){const _0x98feb7=_0x3a60,_0x4ffb25={'JLmEy':function(_0x361829,_0x3e0c3a){return _0x361829(_0x3e0c3a);},'hvLBP':function(_0x1cafee,_0x2a020f,_0x5cc5b9,_0x22c67b){return _0x1cafee(_0x2a020f,_0x5cc5b9,_0x22c67b);},'ftDSY':function(_0x3097d4,_0x41c9ad){return _0x3097d4!==_0x41c9ad;},'TcEiY':function(_0x761103){return _0x761103();},'eetYE':function(_0x3fa40e,_0x765b73,_0x121d79,_0x2e9a96){return _0x3fa40e(_0x765b73,_0x121d79,_0x2e9a96);}};if(_0x4ffb25['JLmEy'](existsSync,_0x4ffb25['hvLBP'](join,getRangerDir(),'ci',_0x38ffad)))return!![];const _0x1091c7=getRangerHomeDir();if(_0x4ffb25[_0x98feb7(0x198)](_0x1091c7,_0x4ffb25['TcEiY'](getRangerDir))&&existsSync(_0x4ffb25[_0x98feb7(0x17e)](join,_0x1091c7,'ci',_0x38ffad)))return!![];return![];}export async function cleanupTempFiles(_0x3957e6){const _0x592ae9=_0x3a60,_0x257d2=[_0x3957e6['tempAuthPath'],_0x3957e6['configPath']][_0x592ae9(0x14a)](Boolean);await Promise[_0x592ae9(0x155)](_0x257d2[_0x592ae9(0x152)](_0x464501=>unlink(_0x464501)['catch'](_0x52fe46=>{const _0xcd0c6=_0x592ae9;_0x52fe46['code']!==_0xcd0c6(0x18b)&&console[_0xcd0c6(0x14e)](_0xcd0c6(0x167)+_0x464501+':',_0x52fe46['message']);})));}export function getSettingsPath(_0x367d5f){const _0x134eb3=_0x3a60,_0x3786a0={'yhanR':function(_0x30b46e,_0x536200,_0x497d3f){return _0x30b46e(_0x536200,_0x497d3f);},'BHzpr':function(_0xbceda5,_0x2606d7){return _0xbceda5(_0x2606d7);}};return _0x3786a0['yhanR'](join,_0x3786a0['BHzpr'](getEnvDir,_0x367d5f),_0x134eb3(0x14f));}export async function loadSettings(_0x30cb61){const _0x526bad=_0x3a60,_0x24b9c9={'msOnc':function(_0x3c783e,_0x4854de){return _0x3c783e(_0x4854de);},'jRddQ':function(_0x24142d,_0x47f879,_0x11beef){return _0x24142d(_0x47f879,_0x11beef);},'rJemF':_0x526bad(0x164)},_0x38728d=_0x24b9c9['msOnc'](getSettingsPath,_0x30cb61);if(!_0x24b9c9['msOnc'](existsSync,_0x38728d))return{};try{const _0x23943f=await _0x24b9c9[_0x526bad(0x139)](readFile,_0x38728d,_0x24b9c9['rJemF']);return JSON[_0x526bad(0x161)](_0x23943f);}catch{return{};}}export async function saveSettings(_0x30878f,_0x144470){const _0xd538fa=_0x3a60,_0x1eaddf={'vAHKn':function(_0x2f22a2,_0x2cce2b){return _0x2f22a2(_0x2cce2b);},'ndQNB':function(_0x49b9ca,_0x17a815,_0x218659){return _0x49b9ca(_0x17a815,_0x218659);}},_0x389e59=_0x1eaddf['vAHKn'](getSettingsPath,_0x30878f),_0x500621=_0x1eaddf[_0xd538fa(0x19d)](dirname,_0x389e59);!_0x1eaddf[_0xd538fa(0x19d)](existsSync,_0x500621)&&await mkdir(_0x500621,{'recursive':!![]}),await _0x1eaddf[_0xd538fa(0x182)](writeFile,_0x389e59,JSON['stringify'](_0x144470,null,0x2));}export function resolveEnvVars(_0x449fb7){const _0x2efdfd=_0x3a60,_0x23e86f={'oksuz':_0x2efdfd(0x127)};if(typeof _0x449fb7===_0x23e86f[_0x2efdfd(0x11c)])return _0x449fb7['replace'](/\$\{(\w+)\}/g,(_0x4130cb,_0x1b5bf0)=>{const _0x416643=_0x2efdfd,_0x626ce1=process[_0x416643(0x13e)][_0x1b5bf0];if(_0x626ce1===undefined)throw new Error(_0x416643(0x184)+_0x1b5bf0+'\x20is\x20not\x20set');return _0x626ce1;});if(Array['isArray'](_0x449fb7))return _0x449fb7['map'](resolveEnvVars);if(_0x449fb7&&typeof _0x449fb7===_0x2efdfd(0x137))return Object['fromEntries'](Object['entries'](_0x449fb7)[_0x2efdfd(0x152)](([_0x339db5,_0x4ba3a4])=>[_0x339db5,resolveEnvVars(_0x4ba3a4)]));return _0x449fb7;}const isRecord=_0xaf371b=>typeof _0xaf371b===_0x497371(0x137)&&_0xaf371b!==null&&!Array[_0x497371(0x124)](_0xaf371b),asRecord=_0x54acc0=>isRecord(_0x54acc0)?_0x54acc0:undefined,mergeHeaders=(_0x514b8d,_0x11fd07)=>{const _0x45792e=_0x497371,_0x469330={'CbtAx':function(_0xce25fe,_0x22668a){return _0xce25fe??_0x22668a;}},_0xd3a670={..._0x469330['CbtAx'](_0x514b8d,{}),..._0x11fd07??{}};return Object[_0x45792e(0x157)](_0xd3a670)[_0x45792e(0x196)]?_0xd3a670:undefined;},SAFE_MODE_ARGS=[_0x497371(0x162)],ALLOW_LOCALHOST_ARGS=[_0x497371(0x16a),'--allow-running-insecure-content',_0x497371(0x163),_0x497371(0x194)];export function buildBrowserOptionsFromSettings(_0x46361e,_0x4a574c={}){const _0xd9ca86=_0x497371,_0x31befb={'ZSWVd':function(_0x26e817,_0x3cd017){return _0x26e817(_0x3cd017);},'bswcw':function(_0x1dd50b,_0x51c287){return _0x1dd50b===_0x51c287;},'bfaDL':_0xd9ca86(0x127),'OQcqq':function(_0x4db2dc,_0x47938d,_0x55a9ca){return _0x4db2dc(_0x47938d,_0x55a9ca);},'WRNVZ':function(_0x2a9013,_0x23323b){return _0x2a9013(_0x23323b);}},_0x13a9d1=_0x31befb['ZSWVd'](asRecord,_0x46361e['browser']),_0x5b3e48={...asRecord(_0x13a9d1?.['launchOptions'])??{}};typeof _0x4a574c['headless']===_0xd9ca86(0x140)&&(_0x5b3e48['headless']=_0x4a574c[_0xd9ca86(0x173)]);if(_0x46361e['safeMode']){const _0x5f1063=_0x5b3e48['args']??[],_0x4a8bfc=SAFE_MODE_ARGS['filter'](_0x5aed4a=>!_0x5f1063[_0xd9ca86(0x131)](_0x5aed4a));_0x5b3e48[_0xd9ca86(0x13f)]=[..._0x5f1063,..._0x4a8bfc];}if(_0x46361e[_0xd9ca86(0x15e)]){const _0x10ff9e=_0x5b3e48[_0xd9ca86(0x13f)]??[],_0x4b9208=ALLOW_LOCALHOST_ARGS[_0xd9ca86(0x14a)](_0x6fbd1e=>!_0x10ff9e['includes'](_0x6fbd1e));_0x5b3e48[_0xd9ca86(0x13f)]=[..._0x10ff9e,..._0x4b9208];}const _0x330259={...asRecord(_0x13a9d1?.[_0xd9ca86(0x14b)])??{}};_0x330259['ignoreHTTPSErrors']=!![];_0x31befb[_0xd9ca86(0x15f)](typeof _0x46361e['userAgent'],_0x31befb[_0xd9ca86(0x19c)])&&(_0x330259[_0xd9ca86(0x121)]=_0x46361e['userAgent']);const _0x568b9e=_0x31befb['OQcqq'](mergeHeaders,_0x31befb['ZSWVd'](asRecord,_0x330259[_0xd9ca86(0x12a)]),_0x31befb['WRNVZ'](asRecord,_0x46361e[_0xd9ca86(0x15c)]));return _0x568b9e?_0x330259[_0xd9ca86(0x12a)]=_0x568b9e:delete _0x330259[_0xd9ca86(0x12a)],_0x4a574c[_0xd9ca86(0x168)]&&(_0x330259[_0xd9ca86(0x144)]=_0x4a574c['storageStatePath']),{'launchOptions':_0x5b3e48,'contextOptions':_0x330259};}export async function resolveProfileStorageState(_0x41e56c){return resolveLocalAuthPath(getEnvDir(_0x41e56c));}async function resolveLocalAuthPath(_0x7e4612){const _0x192d7a=_0x497371,_0x46505={'pCjdH':function(_0x2969da,_0x1c0f65,_0xad660a){return _0x2969da(_0x1c0f65,_0xad660a);},'XHbmm':_0x192d7a(0x14c),'iFsEx':function(_0x46d7f6,_0xebf8b){return _0x46d7f6(_0xebf8b);},'pqYPc':function(_0x31acda){return _0x31acda();},'qDKtQ':function(_0x111520,_0x5890e4){return _0x111520 instanceof _0x5890e4;}},_0x386bda=_0x46505[_0x192d7a(0x125)](join,_0x7e4612,_0x46505['XHbmm']),_0x14fece=join(_0x7e4612,'auth.json');if(existsSync(_0x386bda))try{const _0x334354=await getToken();if(!_0x334354)throw new Error(_0x192d7a(0x165));const _0x32f63a=await _0x46505['iFsEx'](readFile,_0x386bda),_0x4299dc=decrypt(_0x32f63a,_0x334354),_0x11dfff=join(_0x46505[_0x192d7a(0x180)](tmpdir),'ranger-auth-'+Date[_0x192d7a(0x159)]()+_0x192d7a(0x13b));return await writeFile(_0x11dfff,_0x4299dc),{'storageStatePath':_0x11dfff,'tempAuthPath':_0x11dfff};}catch(_0x581de1){const _0x5e9553=_0x46505['qDKtQ'](_0x581de1,Error)?_0x581de1['message']:_0x46505[_0x192d7a(0x179)](String,_0x581de1);throw new Error(_0x192d7a(0x191)+_0x5e9553);}if(_0x46505['iFsEx'](existsSync,_0x14fece))return{'storageStatePath':_0x14fece};return{};}export async function buildPlaywrightConfig(_0x788507,_0x22fafd,_0x238e1f,_0x597796,_0x59ac70){const _0x3c5139=_0x497371,_0xd58118={'QlESa':function(_0x25c839,_0x3ae38e,_0x37227d,_0x92f3d7,_0x2ccf0c,_0x389352,_0x2b677){return _0x25c839(_0x3ae38e,_0x37227d,_0x92f3d7,_0x2ccf0c,_0x389352,_0x2b677);},'JIgBP':function(_0x2f7635,_0x2f24b3){return _0x2f7635(_0x2f24b3);},'FIGxr':function(_0x3541e1,_0xc8772d,_0x2e2526,_0x42ade1,_0x2f04d0,_0x546178,_0x16bcb5){return _0x3541e1(_0xc8772d,_0x2e2526,_0x42ade1,_0x2f04d0,_0x546178,_0x16bcb5);},'Ezrom':'stagehand','anEGi':function(_0x97f15c,_0x54949f){return _0x97f15c(_0x54949f);}};if(_0x59ac70)return _0xd58118[_0x3c5139(0x171)](buildPlaywrightConfigCore,_0x788507,_0x59ac70,_0x22fafd,_0x238e1f,_0x597796,_0x3c5139(0x146));const {storageStatePath:_0x155ab2,tempAuthPath:_0x190469}=await resolveLocalAuthPath(_0xd58118['JIgBP'](getEnvDir,_0x22fafd));try{const _0x59e788=await _0xd58118[_0x3c5139(0x149)](buildPlaywrightConfigCore,_0x788507,_0x155ab2,_0x22fafd,_0x238e1f,_0x597796,_0xd58118['Ezrom']);return{..._0x59e788,'tempAuthPath':_0x190469};}catch(_0x5c788c){_0x190469&&await _0xd58118[_0x3c5139(0x17c)](unlink,_0x190469)[_0x3c5139(0x154)](()=>{});throw _0x5c788c;}}export async function buildPlaywrightConfigCore(_0x12cf83,_0x5884b3,_0x30fbcf,_0x5f3d6e,_0x2bc4d2,_0x300b84=_0x497371(0x146)){const _0xa73f78=_0x497371,_0x5f15fa={'qjBbt':function(_0x5387ad,_0xf7d193,_0x1decfe){return _0x5387ad(_0xf7d193,_0x1decfe);},'PnCZJ':function(_0x173d6e,_0x2c375c){return _0x173d6e===_0x2c375c;},'SianN':'--no-sandbox','zWXKj':_0xa73f78(0x13c),'QMUyd':function(_0x13a2d1,_0x4afd2d){return _0x13a2d1(_0x4afd2d);},'zewmu':_0xa73f78(0x199),'cTXlZ':'vision','doEvn':'allow','DUImh':function(_0x1a3f9a,_0x3689b8){return _0x1a3f9a===_0x3689b8;},'eZhoK':function(_0x4768d8,_0x59c392){return _0x4768d8===_0x59c392;},'YyolC':'ranger-config','aPKhf':function(_0x4aea9f,_0x36b253,_0x483021){return _0x4aea9f(_0x36b253,_0x483021);},'AKqcm':_0xa73f78(0x193),'fTqRb':function(_0x1748a6,_0x4242a4,_0x135c37){return _0x1748a6(_0x4242a4,_0x135c37);},'oVPHJ':function(_0x26a72e,_0x18edbf,_0x31cb3c){return _0x26a72e(_0x18edbf,_0x31cb3c);}},_0x2ec9d8=_0x5f3d6e||randomUUID(),_0x134420=join(getRangerDir(),_0xa73f78(0x158),_0x2ec9d8),_0x55cd86=_0x5f15fa['QMUyd'](Boolean,_0x12cf83[_0xa73f78(0x13a)]),_0x35b003=_0x55cd86?{'browserName':'chromium','cdpEndpoint':_0x12cf83['cdpEndpoint']}:((()=>{const _0x287a2e=_0xa73f78,{launchOptions:_0x20702a,contextOptions:_0x19a1fe}=_0x5f15fa['qjBbt'](buildBrowserOptionsFromSettings,_0x12cf83,{'headless':_0x2bc4d2?![]:_0x12cf83['headless']??!![],'storageStatePath':_0x5884b3});if(_0x5f15fa[_0x287a2e(0x178)](process['getuid']?.(),0x0)){const _0x2283ee=[_0x5f15fa['SianN'],_0x287a2e(0x19b)],_0x4cadc2=_0x20702a['args']??[],_0x5ad9cb=_0x2283ee['filter'](_0x5cb2af=>!_0x4cadc2['includes'](_0x5cb2af));_0x20702a[_0x287a2e(0x13f)]=[..._0x4cadc2,..._0x5ad9cb];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x20702a,'contextOptions':{..._0x19a1fe,'permissions':[_0x5f15fa['zWXKj'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x34bea8=_0x300b84==='playwright-cli'?{'browser':_0x35b003,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x134420,'outputMode':_0x5f15fa['zewmu'],'codegen':_0xa73f78(0x132)}:{'name':_0x30fbcf,'browser':_0x35b003,'capabilities':[_0xa73f78(0x185),_0xa73f78(0x150),_0xa73f78(0x130),_0xa73f78(0x128),_0x5f15fa['cTXlZ']],'imageResponses':_0x5f15fa[_0xa73f78(0x183)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x134420};if(!_0x55cd86){const _0x5d785e=_0x34bea8[_0xa73f78(0x129)],_0x523991=_0x5d785e['contextOptions'];if(_0x5f15fa['DUImh'](_0x523991[_0xa73f78(0x121)],undefined))delete _0x523991['userAgent'];if(_0x5f15fa['eZhoK'](_0x523991[_0xa73f78(0x144)],undefined))delete _0x523991[_0xa73f78(0x144)];}const _0x162ec7=join(tmpdir(),_0x5f15fa['YyolC']);!existsSync(_0x162ec7)&&await _0x5f15fa['aPKhf'](mkdir,_0x162ec7,{'recursive':!![]});const _0x329775=_0x300b84===_0x5f15fa[_0xa73f78(0x13d)]?_0xa73f78(0x172):'',_0xfe0f43=_0x5f15fa[_0xa73f78(0x177)](join,_0x162ec7,_0x30fbcf+'-'+Date[_0xa73f78(0x159)]()+_0x329775+'.json');return await _0x5f15fa['oVPHJ'](writeFile,_0xfe0f43,JSON[_0xa73f78(0x18f)](_0x34bea8,null,0x2)),{'configPath':_0xfe0f43,'storageStatePath':_0x5884b3};}export async function buildPlaywrightCliConfig(_0x12043c,_0x13ad6c,_0x3bf0ca,_0x259f16,_0x57737f){const _0x172265=_0x497371,_0x5cb26e={'ZEqZL':function(_0x1b4762,_0x54969c,_0x29ddb5,_0x4ff5b3,_0x1a24ce,_0x2be852,_0x490487){return _0x1b4762(_0x54969c,_0x29ddb5,_0x4ff5b3,_0x1a24ce,_0x2be852,_0x490487);},'HCDGm':function(_0x352aac,_0x38b40c){return _0x352aac(_0x38b40c);},'TQojH':function(_0x5ba33a,_0x1ce5f6){return _0x5ba33a(_0x1ce5f6);},'xNhrR':_0x172265(0x193)};if(_0x57737f)return _0x5cb26e['ZEqZL'](buildPlaywrightConfigCore,_0x12043c,_0x57737f,_0x13ad6c,_0x3bf0ca,_0x259f16,'playwright-cli');const {storageStatePath:_0x4de365,tempAuthPath:_0x12a288}=await _0x5cb26e[_0x172265(0x181)](resolveLocalAuthPath,_0x5cb26e['TQojH'](getEnvDir,_0x13ad6c));try{const _0x1c770d=await buildPlaywrightConfigCore(_0x12043c,_0x4de365,_0x13ad6c,_0x3bf0ca,_0x259f16,_0x5cb26e['xNhrR']);return{..._0x1c770d,'tempAuthPath':_0x12a288};}catch(_0x54b169){_0x12a288&&await unlink(_0x12a288)[_0x172265(0x154)](()=>{});throw _0x54b169;}}export async function buildRangerwrightCliConfig(_0x2d1d0d,_0x476627,_0xd27e89,_0xdac380,_0x115b7b){const _0x541004=_0x497371,_0x47c5a1={'Sjvqd':function(_0x32f66f,_0x14402c,_0x52111a){return _0x32f66f(_0x14402c,_0x52111a);},'pUeIs':function(_0x49e0c6,_0x5e8cff){return _0x49e0c6===_0x5e8cff;},'itwIP':'--no-sandbox','usoRr':'chromium','nwMne':'clipboard-write','ZoZeg':function(_0x4c3eac,_0x1941f3){return _0x4c3eac(_0x1941f3);},'TrKRp':function(_0x56aabb,_0x3393e8){return _0x56aabb===_0x3393e8;},'IBCZp':function(_0x35e578,_0x115fe9){return _0x35e578===_0x115fe9;},'OFkNT':'ranger-config','vAmLB':function(_0x4f76a2,_0x5e5a55,_0x366c45){return _0x4f76a2(_0x5e5a55,_0x366c45);},'eYMIz':function(_0xe10782,_0x42827f){return _0xe10782(_0x42827f);}},{storageStatePath:_0x214cb6,tempAuthPath:_0x32b188}=_0x115b7b?{'storageStatePath':_0x115b7b,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x476627)),_0x44d557=_0xd27e89||randomUUID(),_0x3a52cf=join(getRangerDir(),_0x541004(0x158),_0x44d557),_0x478e08=_0x47c5a1[_0x541004(0x186)](Boolean,_0x2d1d0d[_0x541004(0x13a)]),_0x514cc7=_0x478e08?{'browserName':_0x47c5a1[_0x541004(0x17d)],'cdpEndpoint':_0x2d1d0d[_0x541004(0x13a)]}:((()=>{const _0x1fd98c=_0x541004,{launchOptions:_0x518c87,contextOptions:_0x2004f4}=_0x47c5a1[_0x1fd98c(0x11a)](buildBrowserOptionsFromSettings,_0x2d1d0d,{'headless':_0xdac380?![]:_0x2d1d0d[_0x1fd98c(0x173)]??!![],'storageStatePath':_0x214cb6});if(_0x47c5a1['pUeIs'](process[_0x1fd98c(0x160)]?.(),0x0)){const _0x3fb8e5=[_0x47c5a1['itwIP'],_0x1fd98c(0x19b)],_0x29c9ed=_0x518c87[_0x1fd98c(0x13f)]??[],_0x268b49=_0x3fb8e5['filter'](_0x599a9a=>!_0x29c9ed[_0x1fd98c(0x131)](_0x599a9a));_0x518c87['args']=[..._0x29c9ed,..._0x268b49];}return{'browserName':_0x47c5a1[_0x1fd98c(0x17d)],'launchOptions':_0x518c87,'contextOptions':{..._0x2004f4,'permissions':['clipboard-read',_0x47c5a1['nwMne']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x478e08){const _0x342672=_0x514cc7['contextOptions'];if(_0x342672){if(_0x47c5a1[_0x541004(0x12c)](_0x342672[_0x541004(0x121)],undefined))delete _0x342672[_0x541004(0x121)];if(_0x47c5a1['IBCZp'](_0x342672[_0x541004(0x144)],undefined))delete _0x342672['storageState'];}}const _0x1ac050={'browser':_0x514cc7,'outputDir':_0x3a52cf,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5df3be;try{const _0x22e184=_0x47c5a1['Sjvqd'](join,tmpdir(),_0x47c5a1[_0x541004(0x123)]);!_0x47c5a1['ZoZeg'](existsSync,_0x22e184)&&await mkdir(_0x22e184,{'recursive':!![]}),_0x5df3be=join(_0x22e184,_0x476627+'-'+Date['now']()+'-rangerwright.json'),await _0x47c5a1[_0x541004(0x170)](writeFile,_0x5df3be,JSON[_0x541004(0x18f)](_0x1ac050,null,0x2));}catch(_0x1f98fa){_0x32b188&&await _0x47c5a1['eYMIz'](unlink,_0x32b188)[_0x541004(0x154)](()=>{});throw _0x1f98fa;}return{'configPath':_0x5df3be,'storageStatePath':_0x214cb6,'tempAuthPath':_0x32b188,'outputDir':_0x3a52cf};}export async function buildNovaActCliConfig(_0x41f587,_0x25deee,_0x41d995,_0x39eb62,_0x572ffb){const _0x3769bd=_0x497371,_0x4e2bba={'jiSYg':function(_0x10b24c,_0x3f3820){return _0x10b24c(_0x3f3820);},'RkSFs':function(_0x5a98cc){return _0x5a98cc();},'psqGS':_0x3769bd(0x158),'bumdg':function(_0x4ed507,_0x2545b5,_0x4735cc){return _0x4ed507(_0x2545b5,_0x4735cc);},'KGwxz':function(_0x5ba99f,_0x3daebd,_0x4b1369){return _0x5ba99f(_0x3daebd,_0x4b1369);},'AhgeM':_0x3769bd(0x15d),'PKQaX':function(_0x4e7fd2,_0x2b24c5){return _0x4e7fd2===_0x2b24c5;},'aDTLn':'--disable-setuid-sandbox','XmAKW':function(_0x15ec9a,_0xcd95bb){return _0x15ec9a===_0xcd95bb;}},{storageStatePath:_0x598beb,tempAuthPath:_0x1a255f}=_0x572ffb?{'storageStatePath':_0x572ffb,'tempAuthPath':undefined}:await _0x4e2bba['jiSYg'](resolveLocalAuthPath,_0x4e2bba['jiSYg'](getEnvDir,_0x25deee)),_0x346f0=_0x41d995||_0x4e2bba['RkSFs'](randomUUID),_0x54bfa5=join(_0x4e2bba['RkSFs'](getRangerDir),_0x4e2bba[_0x3769bd(0x135)],_0x346f0),_0x5c4908=_0x4e2bba[_0x3769bd(0x134)](join,_0x54bfa5,_0x3769bd(0x143)),_0x4f6093=_0x598beb?_0x4e2bba[_0x3769bd(0x120)](join,_0x5c4908,_0x4e2bba['AhgeM']):undefined,{launchOptions:_0x4133e3,contextOptions:_0x4a5e95}=buildBrowserOptionsFromSettings(_0x41f587,{'headless':_0x39eb62?![]:_0x41f587['headless']??!![],'storageStatePath':_0x598beb});if(_0x4e2bba[_0x3769bd(0x18d)](process[_0x3769bd(0x160)]?.(),0x0)){const _0x236f4a=['--no-sandbox',_0x4e2bba[_0x3769bd(0x17b)]],_0x31c4f5=_0x4133e3['args']??[],_0x458096=_0x236f4a['filter'](_0x3f9831=>!_0x31c4f5['includes'](_0x3f9831));_0x4133e3[_0x3769bd(0x13f)]=[..._0x31c4f5,..._0x458096];}const _0x261eb2=typeof _0x4133e3[_0x3769bd(0x12e)]==='string'?_0x4133e3['executablePath']:_0x598beb?chromium['executablePath']():undefined;return{'storageStatePath':_0x598beb,'tempAuthPath':_0x1a255f,'baseUrl':_0x41f587[_0x3769bd(0x11e)],'headless':Boolean(_0x4133e3[_0x3769bd(0x173)]),'userDataDir':_0x5c4908,'browserProfilePath':_0x4f6093,'executablePath':_0x261eb2,'launchArgs':Array['isArray'](_0x4133e3['args'])?_0x4133e3[_0x3769bd(0x13f)][_0x3769bd(0x14a)](_0x474339=>typeof _0x474339==='string'):[],'userAgent':_0x4e2bba[_0x3769bd(0x16b)](typeof _0x4a5e95['userAgent'],_0x3769bd(0x127))?_0x4a5e95['userAgent']:undefined,'extraHTTPHeaders':_0x4a5e95[_0x3769bd(0x12a)],'allowInsecureLocalhost':Boolean(_0x41f587['allowInsecureLocalhost']),'safeMode':Boolean(_0x41f587['safeMode']),'cdpEndpoint':_0x41f587[_0x3769bd(0x13a)],'isCdpMode':_0x4e2bba[_0x3769bd(0x17f)](Boolean,_0x41f587['cdpEndpoint'])};}export function getNestedValue(_0xfa28a,_0x578647){const _0x499923=_0x497371,_0x137fcb={'iXcwc':function(_0x5d56b7,_0x49d129){return _0x5d56b7(_0x49d129);},'jvvMl':function(_0x4c6b26,_0x179574){return _0x4c6b26===_0x179574;},'kUbDg':function(_0x41f5ff,_0x2b385b){return _0x41f5ff===_0x2b385b;},'COKqp':_0x499923(0x137)},_0xc1e3b2=_0x137fcb['iXcwc'](parseKeyPath,_0x578647);let _0x31bf5e=_0xfa28a;for(const _0x3f1c8f of _0xc1e3b2){if(_0x137fcb['jvvMl'](_0x31bf5e,null)||_0x137fcb['kUbDg'](_0x31bf5e,undefined)||typeof _0x31bf5e!==_0x137fcb['COKqp'])return undefined;_0x31bf5e=_0x31bf5e[_0x3f1c8f];}return _0x31bf5e;}export function setNestedValue(_0x10c633,_0x2ba36f,_0x544fca){const _0x34cbd3=_0x497371,_0xb630c6={'xDdxJ':function(_0x56498a,_0x9e81a5){return _0x56498a(_0x9e81a5);},'BtUvc':function(_0x39c994,_0x563a4a){return _0x39c994-_0x563a4a;},'mApyJ':function(_0x2c26e5,_0x29849c){return _0x2c26e5 in _0x29849c;},'aFeat':function(_0x4bd1a2,_0x763a36){return _0x4bd1a2!==_0x763a36;},'ZUgDy':function(_0xc4ea85,_0x34ce4c){return _0xc4ea85-_0x34ce4c;}},_0x8623d8=_0xb630c6['xDdxJ'](parseKeyPath,_0x2ba36f);let _0xdb9174=_0x10c633;for(let _0x186b26=0x0;_0x186b26<_0xb630c6[_0x34cbd3(0x148)](_0x8623d8['length'],0x1);_0x186b26++){const _0x34d1b1=_0x8623d8[_0x186b26];(!_0xb630c6['mApyJ'](_0x34d1b1,_0xdb9174)||_0xb630c6['aFeat'](typeof _0xdb9174[_0x34d1b1],_0x34cbd3(0x137)))&&(_0xdb9174[_0x34d1b1]={}),_0xdb9174=_0xdb9174[_0x34d1b1];}_0xdb9174[_0x8623d8[_0xb630c6[_0x34cbd3(0x138)](_0x8623d8[_0x34cbd3(0x196)],0x1)]]=_0x544fca;}export function deleteNestedValue(_0x11f5a9,_0x2cc2c6){const _0x5d8e3b=_0x497371,_0x12741a={'dvuwQ':function(_0x56cc73,_0x252c62){return _0x56cc73<_0x252c62;},'GeUbu':function(_0x5c5b13,_0x1a2f9b){return _0x5c5b13===_0x1a2f9b;},'VCvLn':function(_0x1df2e1,_0x560b6f){return _0x1df2e1!==_0x560b6f;},'DGbOn':'object','hvRvB':function(_0x3fab20,_0x38e3c8){return _0x3fab20 in _0x38e3c8;}},_0x5a6df9=parseKeyPath(_0x2cc2c6);let _0x520c47=_0x11f5a9;for(let _0x52d8c3=0x0;_0x12741a[_0x5d8e3b(0x192)](_0x52d8c3,_0x5a6df9['length']-0x1);_0x52d8c3++){if(_0x520c47===null||_0x12741a[_0x5d8e3b(0x187)](_0x520c47,undefined)||_0x12741a[_0x5d8e3b(0x142)](typeof _0x520c47,_0x12741a[_0x5d8e3b(0x18e)]))return![];_0x520c47=_0x520c47[_0x5a6df9[_0x52d8c3]];}if(_0x520c47===null||_0x520c47===undefined||typeof _0x520c47!=='object')return![];const _0xdc38b7=_0x5a6df9[_0x5a6df9['length']-0x1];if(_0x12741a['hvRvB'](_0xdc38b7,_0x520c47))return delete _0x520c47[_0xdc38b7],!![];return![];}function parseKeyPath(_0x46d7e7){const _0x563245=_0x497371,_0x25da48={'yHCgF':_0x563245(0x15c),'WxnMs':function(_0x18c2ee,_0x13218c){return _0x18c2ee===_0x13218c;},'KqoqI':'setupHeaders'},_0x55cb20=_0x46d7e7[_0x563245(0x126)]('.');return _0x55cb20[0x0]===_0x563245(0x16d)&&(_0x55cb20[0x0]=_0x25da48['yHCgF']),_0x25da48['WxnMs'](_0x55cb20[0x0],'setupHeader')&&(_0x55cb20[0x0]=_0x25da48['KqoqI']),_0x55cb20;}export function formatSettings(_0x5cb7b5,_0x24ba80=0x0){const _0x46f319=_0x497371,_0x4f4b29={'KnrUz':function(_0x4e2e43,_0x2248e9){return _0x4e2e43===_0x2248e9;},'svovD':_0x46f319(0x137),'HzDWr':function(_0x504a7d,_0x10bd76){return _0x504a7d!==_0x10bd76;}},_0x2ff251=[],_0x1cab13='\x20\x20'['repeat'](_0x24ba80);for(const [_0x4f8e06,_0x210802]of Object['entries'](_0x5cb7b5)){if(_0x210802===undefined)continue;if(_0x4f4b29[_0x46f319(0x145)](typeof _0x210802,_0x4f4b29['svovD'])&&_0x4f4b29[_0x46f319(0x11d)](_0x210802,null)){_0x2ff251['push'](''+_0x1cab13+_0x4f8e06+':');for(const [_0x4970ba,_0x1888e4]of Object[_0x46f319(0x12d)](_0x210802)){_0x2ff251['push'](_0x1cab13+'\x20\x20'+_0x4970ba+':\x20'+_0x1888e4);}}else _0x2ff251['push'](''+_0x1cab13+_0x4f8e06+':\x20'+_0x210802);}return _0x2ff251[_0x46f319(0x175)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2746(){const _0x336e38=['TMrQr','3332661jHnMjp','1562275LgAdWU','4nlRskY','ranger/SKILL.md','527412IkJhOv','zPCAM','2422346TNeEuP','19432622rzYXYP','PndGo','132740CgEXAi','1035MiRTyl','4510544QRATkU','1GqeuSD','skills','56QjFmbg'];_0x2746=function(){return _0x336e38;};return _0x2746();}(function(_0xd3d240,_0x57efc3){const _0x7754bf=_0x42ad,_0x12314f=_0xd3d240();while(!![]){try{const _0x48a070=parseInt(_0x7754bf(0x189))/0x1*(parseInt(_0x7754bf(0x183))/0x2)+parseInt(_0x7754bf(0x17d))/0x3*(-parseInt(_0x7754bf(0x17f))/0x4)+-parseInt(_0x7754bf(0x17e))/0x5+parseInt(_0x7754bf(0x181))/0x6*(parseInt(_0x7754bf(0x17b))/0x7)+parseInt(_0x7754bf(0x188))/0x8+parseInt(_0x7754bf(0x187))/0x9*(parseInt(_0x7754bf(0x186))/0xa)+-parseInt(_0x7754bf(0x184))/0xb;if(_0x48a070===_0x57efc3)break;else _0x12314f['push'](_0x12314f['shift']());}catch(_0x46205f){_0x12314f['push'](_0x12314f['shift']());}}}(_0x2746,0xc6eb5));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(_0x467abb){const _0x4b325c=_0x42ad,_0x4d55d8={'zPCAM':function(_0x11b282,_0x291bac,_0x119e62,_0xdb4e00,_0x3325cd){return _0x11b282(_0x291bac,_0x119e62,_0xdb4e00,_0x3325cd);},'McGCP':_0x4b325c(0x18a),'PndGo':'utf-8'},_0x412e29=_0x4d55d8[_0x4b325c(0x182)](join,__dirname,'..','..',_0x4d55d8['McGCP']),_0x5d79d6=join(_0x412e29,_0x467abb);try{return readFileSync(_0x5d79d6,_0x4d55d8[_0x4b325c(0x185)]);}catch{return'';}}function _0x42ad(_0x546ed5,_0x57e333){_0x546ed5=_0x546ed5-0x17b;const _0x274600=_0x2746();let _0x42adae=_0x274600[_0x546ed5];return _0x42adae;}export function getRangerSkillContent(){const _0x3004ba=_0x42ad,_0x44dee2={'TMrQr':_0x3004ba(0x180)};return readSkillContent(_0x44dee2[_0x3004ba(0x17c)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3f9c7c=_0x5364;(function(_0x1f2996,_0x4b8e44){const _0x508ae2=_0x5364,_0x36b7c1=_0x1f2996();while(!![]){try{const _0x546777=parseInt(_0x508ae2(0xf1))/0x1*(parseInt(_0x508ae2(0xfa))/0x2)+-parseInt(_0x508ae2(0x10e))/0x3*(-parseInt(_0x508ae2(0xed))/0x4)+parseInt(_0x508ae2(0xff))/0x5*(-parseInt(_0x508ae2(0x10a))/0x6)+-parseInt(_0x508ae2(0xfd))/0x7*(parseInt(_0x508ae2(0xf3))/0x8)+-parseInt(_0x508ae2(0x105))/0x9*(-parseInt(_0x508ae2(0xe6))/0xa)+-parseInt(_0x508ae2(0x103))/0xb*(-parseInt(_0x508ae2(0x100))/0xc)+parseInt(_0x508ae2(0x106))/0xd*(-parseInt(_0x508ae2(0xf9))/0xe);if(_0x546777===_0x4b8e44)break;else _0x36b7c1['push'](_0x36b7c1['shift']());}catch(_0x4a3af4){_0x36b7c1['push'](_0x36b7c1['shift']());}}}(_0x25cf,0x2935a));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';function _0x5364(_0x2db094,_0x30c191){_0x2db094=_0x2db094-0xe6;const _0x25cf59=_0x25cf();let _0x5364f7=_0x25cf59[_0x2db094];return _0x5364f7;}import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x3f9c7c(0x10b),_0x3f9c7c(0xf2)];export async function installSkill(_0x2209a2,_0x40769a={}){const _0x49e1f5=_0x3f9c7c,_0x17a84c={'yWiQL':_0x49e1f5(0x108),'ThfCc':function(_0x39cbaa){return _0x39cbaa();},'jtEBv':function(_0x2b4256,_0x185b16,_0x442080){return _0x2b4256(_0x185b16,_0x442080);},'OgjvB':function(_0x52f817,_0x5da85a,_0x3a27a3){return _0x52f817(_0x5da85a,_0x3a27a3);},'yevyy':function(_0x758965,_0x426214){return _0x758965(_0x426214);},'QbOVz':function(_0x2ddd5c,_0x322224){return _0x2ddd5c(_0x322224);},'PIjWQ':_0x49e1f5(0x101),'xTJzQ':function(_0xae8143,_0x2bdf00,_0x2fae07){return _0xae8143(_0x2bdf00,_0x2fae07);},'eYFBj':function(_0xfd4f10,_0x59e21a,_0x332826){return _0xfd4f10(_0x59e21a,_0x332826);},'BAPWS':function(_0x575e8b,_0x33f921,_0xcc8675){return _0x575e8b(_0x33f921,_0xcc8675);},'IvsJs':function(_0x3824ed,_0x1f984e,_0x3c18e5){return _0x3824ed(_0x1f984e,_0x3c18e5);},'PGYsz':function(_0x114efb,_0x4afe7c,_0x4ba99f,_0x1678a7){return _0x114efb(_0x4afe7c,_0x4ba99f,_0x1678a7);}},{level:level=_0x49e1f5(0xee),cliVersion:_0xabe6cd,platform:platform=_0x17a84c['yWiQL']}=_0x40769a,_0x552347=_0x17a84c['ThfCc'](getSourceSkillsDir),_0x51598d=_0x17a84c['jtEBv'](join,_0x552347,_0x2209a2),_0xa1f926=_0x17a84c[_0x49e1f5(0x10d)](join,_0x552347,_0x2209a2+_0x49e1f5(0x104)),_0x3fa06d=existsSync(_0x51598d)&&_0x17a84c['yevyy'](statSync,_0x51598d)['isDirectory']()&&_0x17a84c['QbOVz'](existsSync,join(_0x51598d,_0x17a84c['PIjWQ'])),_0x11811d=existsSync(_0xa1f926);if(!_0x3fa06d&&!_0x11811d)return console['warn'](_0x49e1f5(0xf4)+_0x2209a2),![];const _0x4d8fb8=platform==='opencode'?getOpencodeSkillsDir(level):getSkillsDir(level),_0x5bc08e=join(_0x4d8fb8,_0x2209a2);await mkdir(_0x5bc08e,{'recursive':!![]});let _0x3d817f,_0x21d576=[];if(_0x3fa06d){const _0x53b60a=await _0x17a84c['QbOVz'](readdir,_0x51598d),_0x864e25=_0x53b60a['filter'](_0x337d89=>_0x337d89[_0x49e1f5(0x109)]('.md'));for(const _0x8e1679 of _0x864e25){const _0x226335=_0x17a84c[_0x49e1f5(0xfb)](join,_0x51598d,_0x8e1679),_0x5fb998=_0x17a84c[_0x49e1f5(0xf7)](join,_0x5bc08e,_0x8e1679);await copyFile(_0x226335,_0x5fb998),_0x21d576[_0x49e1f5(0x102)](_0x8e1679);}_0x3d817f=await _0x17a84c['xTJzQ'](readFile,_0x17a84c[_0x49e1f5(0xf5)](join,_0x51598d,_0x49e1f5(0x101)),'utf-8');}else{_0x3d817f=await _0x17a84c[_0x49e1f5(0xe9)](readFile,_0xa1f926,'utf-8');const _0x18f5f4=join(_0x5bc08e,_0x49e1f5(0x101));await writeFile(_0x18f5f4,_0x3d817f,_0x49e1f5(0xef)),_0x21d576['push'](_0x17a84c['PIjWQ']);}const {name:_0x222f65}=parseFrontmatter(_0x3d817f);return console['log'](_0x49e1f5(0xf8)+_0x222f65),console[_0x49e1f5(0xe8)](_0x49e1f5(0xeb)+_0x5bc08e),_0x21d576['length']>0x1&&console[_0x49e1f5(0xe8)]('\x20\x20Files:\x20'+_0x21d576[_0x49e1f5(0xf0)](',\x20')),_0x17a84c['PGYsz'](logLocalAgentInstallation,_0x2209a2,{'skillDisplayName':_0x222f65,'installLevel':level},_0xabe6cd)['catch'](()=>{}),!![];}function _0x25cf(){const _0x12d1ca=['163144hJApea','\x20\x20Skill\x20not\x20found:\x20','BAPWS','match','eYFBj','\x20\x20Installed\x20skill:\x20','197652NtGGSf','614252NLHchc','xTJzQ','tidQv','70ESbTAs','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','5Zwebsh','33444JmzyFu','SKILL.md','push','165vlUlii','.md','1203822DMXEpt','26VGdOYT','soFUN','claude','endsWith','1794882XlRWpL','bug-bash','RBdHI','OgjvB','652254XslvFV','10sftIjZ','warn','log','IvsJs','Htmbw','\x20\x20Location:\x20','trim','4fCvcif','project','utf-8','join','1lCTdEV','feature-tracker'];_0x25cf=function(){return _0x12d1ca;};return _0x25cf();}function getSourceSkillsDir(){const _0x1c449e=_0x3f9c7c,_0x151ab5={'tidQv':'skills','Ehgps':function(_0x2e99dc,_0x3111db){return _0x2e99dc(_0x3111db);}},_0xb6b268=[join(__dirname,'..','..',_0x151ab5['tidQv']),join(__dirname,'..','..','..',_0x151ab5[_0x1c449e(0xfc)])];for(const _0x4e2718 of _0xb6b268){if(_0x151ab5['Ehgps'](existsSync,_0x4e2718))return _0x4e2718;}return _0xb6b268[0x0];}function parseFrontmatter(_0xfcab9c){const _0x2d86b8=_0x3f9c7c,_0x467769={'soFUN':'Invalid\x20skill\x20frontmatter'},_0x54f018=_0xfcab9c['match'](/^---\n([\s\S]+?)\n---/);if(!_0x54f018)throw new Error(_0x467769[_0x2d86b8(0x107)]);const _0x2f46d5=_0x54f018[0x1],_0x17561e=_0x2f46d5[_0x2d86b8(0xf6)](/name:\s*(.+)/),_0xa8f28c=_0x2f46d5[_0x2d86b8(0xf6)](/description:\s*"?(.+?)"?\n/);return{'name':_0x17561e?.[0x1][_0x2d86b8(0xec)]()||'','description':_0xa8f28c?.[0x1]['trim']()||''};}export async function removeSkill(_0x380e70,_0x38448c){const _0x25ab8d=_0x3f9c7c,_0x2dee7f={'Htmbw':function(_0xcface9,_0x3d58f3){return _0xcface9(_0x3d58f3);},'RBdHI':function(_0xaaa8a,_0x3af0bf,_0x479cf5){return _0xaaa8a(_0x3af0bf,_0x479cf5);}},_0x36fcfb=_0x2dee7f[_0x25ab8d(0xea)](getSkillsDir,_0x38448c),_0x237fd2=_0x2dee7f[_0x25ab8d(0x10c)](join,_0x36fcfb,_0x380e70);if(!existsSync(_0x237fd2))return![];try{return await rm(_0x237fd2,{'recursive':!![]}),console[_0x25ab8d(0xe8)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x380e70),!![];}catch{return console[_0x25ab8d(0xe7)](_0x25ab8d(0xfe)+_0x380e70),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x163e52=_0x3669;(function(_0x853bcf,_0x40d96a){const _0x2b1d04=_0x3669,_0x20e72f=_0x853bcf();while(!![]){try{const _0x1925ac=-parseInt(_0x2b1d04(0x160))/0x1+parseInt(_0x2b1d04(0x150))/0x2+-parseInt(_0x2b1d04(0x162))/0x3*(parseInt(_0x2b1d04(0x155))/0x4)+-parseInt(_0x2b1d04(0x158))/0x5+parseInt(_0x2b1d04(0x173))/0x6+-parseInt(_0x2b1d04(0x16d))/0x7+parseInt(_0x2b1d04(0x16f))/0x8;if(_0x1925ac===_0x40d96a)break;else _0x20e72f['push'](_0x20e72f['shift']());}catch(_0x28dac){_0x20e72f['push'](_0x20e72f['shift']());}}}(_0x4a96,0xdc207));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(_0x4a3b85,_0x3579e6){const _0x35307f=_0x3669,_0x357b44={'VCULU':function(_0xf327b7,_0xe1fd09){return _0xf327b7>=_0xe1fd09;},'lCVON':function(_0x5a2505,_0x5e60f7){return _0x5a2505&_0x5e60f7;},'DGjCn':function(_0x5243a7,_0xdbdb1e){return _0x5243a7>_0xdbdb1e;},'pOFUb':function(_0x3ec530,_0xcc1f04){return _0x3ec530&_0xcc1f04;},'wBzGP':function(_0xe9a85c,_0x16e079){return _0xe9a85c+_0x16e079;}};if(_0x357b44[_0x35307f(0x14b)](_0x3579e6,_0x4a3b85['length']))return[0x0,0x0];const _0x5cebec=_0x4a3b85[_0x3579e6];let _0x1eedf1=0x1,_0x529767=0x80;while(_0x1eedf1<=0x8&&!_0x357b44['lCVON'](_0x5cebec,_0x529767)){_0x1eedf1++,_0x529767>>=0x1;}if(_0x357b44[_0x35307f(0x149)](_0x3579e6+_0x1eedf1,_0x4a3b85[_0x35307f(0x174)]))return[0x0,0x0];let _0x5b96bb=_0x357b44['pOFUb'](_0x5cebec,_0x529767-0x1);for(let _0xc882ac=0x1;_0xc882ac<_0x1eedf1;_0xc882ac++){_0x5b96bb=_0x5b96bb*0x100+_0x4a3b85[_0x357b44[_0x35307f(0x159)](_0x3579e6,_0xc882ac)];}return[_0x5b96bb,_0x1eedf1];}function readId(_0xa14c26,_0x5495c9){const _0x2f1535=_0x3669,_0x46a53f={'itCrE':function(_0x45a270,_0x20b658){return _0x45a270>=_0x20b658;},'wToQj':function(_0x2afecc,_0x1c5174){return _0x2afecc+_0x1c5174;},'NZwAe':function(_0x4b52d7,_0x558e5f){return _0x4b52d7*_0x558e5f;}};if(_0x5495c9>=_0xa14c26['length'])return[0x0,0x0];const _0x20adce=_0xa14c26[_0x5495c9];let _0x584f86;if(_0x46a53f[_0x2f1535(0x15d)](_0x20adce,0x80))_0x584f86=0x1;else{if(_0x20adce>=0x40)_0x584f86=0x2;else{if(_0x20adce>=0x20)_0x584f86=0x3;else{if(_0x20adce>=0x10)_0x584f86=0x4;else return[_0x20adce,0x1];}}}if(_0x46a53f['wToQj'](_0x5495c9,_0x584f86)>_0xa14c26['length'])return[0x0,0x0];let _0x1b0602=0x0;for(let _0x3f4981=0x0;_0x3f4981<_0x584f86;_0x3f4981++){_0x1b0602=_0x46a53f['NZwAe'](_0x1b0602,0x100)+_0xa14c26[_0x5495c9+_0x3f4981];}return[_0x1b0602,_0x584f86];}function readUint(_0x13b483,_0x4d1b9b,_0x342cf7){const _0x37599b=_0x3669,_0x328821={'wHTbd':function(_0x4c983e,_0x22668e){return _0x4c983e<_0x22668e;},'zyJqv':function(_0x27cc12,_0x1def53){return _0x27cc12+_0x1def53;},'raHvy':function(_0x183020,_0x18fef2){return _0x183020*_0x18fef2;}};let _0x1e8bb9=0x0;for(let _0x30ee90=0x0;_0x328821[_0x37599b(0x148)](_0x30ee90,_0x342cf7);_0x30ee90++){_0x1e8bb9=_0x328821['zyJqv'](_0x328821[_0x37599b(0x17c)](_0x1e8bb9,0x100),_0x13b483[_0x4d1b9b+_0x30ee90]);}return _0x1e8bb9;}function isUnknownSize(_0x5ad6b0,_0xab5f60){const _0x448ba9=_0x3669,_0x21625e={'ocViS':function(_0x4f5f45,_0x41efcc){return _0x4f5f45-_0x41efcc;},'SafrC':function(_0x3250e6,_0x5ef6de){return _0x3250e6*_0x5ef6de;}};return _0x5ad6b0===_0x21625e[_0x448ba9(0x179)](Math['pow'](0x2,_0x21625e['SafrC'](0x7,_0xab5f60)),0x1);}function writeVint(_0x3dc6a7,_0x57c88f){const _0xd55bff=_0x3669,_0x5ee32b={'kXBGW':function(_0x2b8293,_0x4966ee){return _0x2b8293||_0x4966ee;},'GhneD':function(_0x368cbd,_0x57fb77){return _0x368cbd<_0x57fb77;},'WeHxF':function(_0x1737c1,_0x174b64){return _0x1737c1-_0x174b64;},'kfIYA':function(_0x1f8f8b,_0x521d43){return _0x1f8f8b>=_0x521d43;},'TlKoy':function(_0x3a433b,_0x13e686){return _0x3a433b&_0x13e686;},'cKAmA':function(_0x242e3,_0x2ce5c7){return _0x242e3/_0x2ce5c7;},'mBLVv':function(_0x3f71bb,_0x3b2f1a){return _0x3f71bb<<_0x3b2f1a;}};let _0x3ab7d5=_0x5ee32b[_0xd55bff(0x172)](_0x57c88f,0x1);while(_0x5ee32b['GhneD'](_0x5ee32b[_0xd55bff(0x144)](Math['pow'](0x2,0x7*_0x3ab7d5),0x2),_0x3dc6a7))_0x3ab7d5++;const _0x107e84=Buffer['alloc'](_0x3ab7d5);for(let _0x4f385d=_0x3ab7d5-0x1;_0x5ee32b[_0xd55bff(0x16b)](_0x4f385d,0x0);_0x4f385d--){_0x107e84[_0x4f385d]=_0x5ee32b['TlKoy'](_0x3dc6a7,0xff),_0x3dc6a7=Math['floor'](_0x5ee32b[_0xd55bff(0x14e)](_0x3dc6a7,0x100));}return _0x107e84[0x0]|=_0x5ee32b['mBLVv'](0x1,0x8-_0x3ab7d5),_0x107e84;}function writeUint(_0x133e1c,_0x53a3ad){const _0x29e880={'gXjOG':function(_0x105f2f,_0xc55a91){return _0x105f2f>=_0xc55a91;},'FCCTP':function(_0x53f895,_0x5e8b33){return _0x53f895/_0x5e8b33;}},_0xd58a36=Buffer['alloc'](_0x53a3ad);for(let _0x297fe9=_0x53a3ad-0x1;_0x29e880['gXjOG'](_0x297fe9,0x0);_0x297fe9--){_0xd58a36[_0x297fe9]=_0x133e1c&0xff,_0x133e1c=Math['floor'](_0x29e880['FCCTP'](_0x133e1c,0x100));}return _0xd58a36;}function writeUnknownSizeVint(_0x8fe393){const _0x4a28a6=_0x3669,_0x4e0d3a=Buffer[_0x4a28a6(0x15a)](_0x8fe393,0xff);return _0x4e0d3a[0x0]=0xff>>_0x8fe393-0x1,_0x4e0d3a;}function _0x4a96(){const _0x57099f=['hwqbm','otwlG','kXBGW','7129380BYueAS','length','aaEel','JaThP','zGpYd','RNvtn','ocViS','pczuu','QATeT','raHvy','mkcHj','endsWith','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','bodyAfterTimestamp','QogeZ','from','bBHtx','slice','WeHxF','HsNKA','maxTicks','floor','wHTbd','DGjCn','Zocfy','VCULU','PfEur','FxRtA','cKAmA','QuaCP','1394192JhXrun','GxrRY','oZoLG','qWkPQ','concat','109772ZdTcBW','LkltG','argv','244365SteFal','wBzGP','alloc','fsjqJ','sHACt','itCrE','GApTF','header','452661PDQCOF','wqxOG','3CnbIEq','min','timestamp','clusters','push','mYzgv','BsumL','VyWQu','exit','kfIYA','xPskR','5358220CkMBQi','stitchWebmFiles.ts','2486000kMwyUA'];_0x4a96=function(){return _0x57099f;};return _0x4a96();}function uintSize(_0x1b837b){const _0x2fbb6c=_0x3669,_0x1e4e07={'FtuMO':function(_0x3c4ab2,_0x28e0cc){return _0x3c4ab2>_0x28e0cc;},'NinsH':function(_0x504e6e,_0xc51705){return _0x504e6e/_0xc51705;}};if(_0x1b837b===0x0)return 0x1;let _0x3cb567=0x0,_0x4e170c=_0x1b837b;while(_0x1e4e07['FtuMO'](_0x4e170c,0x0)){_0x3cb567++,_0x4e170c=Math[_0x2fbb6c(0x147)](_0x1e4e07['NinsH'](_0x4e170c,0x100));}return _0x3cb567;}function findTimestampScale(_0x3e7088,_0x392683){const _0x2526bf=_0x3669,_0x44f720={'xPskR':function(_0x5853cf,_0x23492b){return _0x5853cf+_0x23492b;},'GxrRY':function(_0x272468,_0x779507,_0x45111f){return _0x272468(_0x779507,_0x45111f);},'rRwae':function(_0x276094,_0x4c07ff){return _0x276094===_0x4c07ff;},'RNvtn':function(_0x49105f,_0x51ca13){return _0x49105f+_0x51ca13;},'pczuu':function(_0xb5be45,_0x575bce,_0x3851ac){return _0xb5be45(_0x575bce,_0x3851ac);},'ponYp':function(_0x33116b,_0x4e9ad7){return _0x33116b===_0x4e9ad7;},'Zocfy':function(_0x2dccfb,_0x5e4c33,_0x115739,_0xbcb318){return _0x2dccfb(_0x5e4c33,_0x115739,_0xbcb318);},'rhtDF':function(_0x137791,_0xdb40b5){return _0x137791===_0xdb40b5;}};let _0x31465d=_0x392683;const _0x35f5cf=Math[_0x2526bf(0x163)](_0x3e7088[_0x2526bf(0x174)],_0x44f720[_0x2526bf(0x16c)](_0x392683,0x2710));while(_0x31465d<_0x35f5cf){const [_0x486342,_0x154c38]=_0x44f720[_0x2526bf(0x151)](readId,_0x3e7088,_0x31465d),[_0x46bc81,_0x1ee167]=readVint(_0x3e7088,_0x44f720[_0x2526bf(0x16c)](_0x31465d,_0x154c38));if(_0x44f720['rRwae'](_0x486342,ID_INFO)){let _0x2dd160=_0x44f720['RNvtn'](_0x44f720['xPskR'](_0x31465d,_0x154c38),_0x1ee167);const _0x2d81f6=_0x2dd160+_0x46bc81;while(_0x2dd160<_0x2d81f6){const [_0x26dc1b,_0x122091]=_0x44f720[_0x2526bf(0x17a)](readId,_0x3e7088,_0x2dd160),[_0x2f31f5,_0x1f1d13]=readVint(_0x3e7088,_0x2dd160+_0x122091);if(_0x44f720['ponYp'](_0x26dc1b,ID_TIMESTAMP_SCALE))return _0x44f720[_0x2526bf(0x14a)](readUint,_0x3e7088,_0x44f720[_0x2526bf(0x178)](_0x2dd160+_0x122091,_0x1f1d13),_0x2f31f5);_0x2dd160+=_0x122091+_0x1f1d13+_0x2f31f5;}break;}if(_0x44f720['rhtDF'](_0x486342,ID_CLUSTER))break;if(isUnknownSize(_0x46bc81,_0x1ee167))break;_0x31465d+=_0x154c38+_0x1ee167+_0x46bc81;}return 0xf4240;}function findFirstClusterOffset(_0x32bdc9,_0x107b6f){const _0x5619ea=_0x3669,_0x423f4e={'BsumL':function(_0x135a48,_0x14f98c,_0x463a71){return _0x135a48(_0x14f98c,_0x463a71);},'anCeb':function(_0x593b6e,_0x208633,_0xdd1dbd){return _0x593b6e(_0x208633,_0xdd1dbd);},'fsjqJ':function(_0x21daf,_0xd022d6){return _0x21daf+_0xd022d6;}};let _0x387c4e=_0x107b6f;while(_0x387c4e<_0x32bdc9[_0x5619ea(0x174)]){const [_0x1e4539,_0x45afbd]=_0x423f4e[_0x5619ea(0x168)](readId,_0x32bdc9,_0x387c4e);if(_0x1e4539===ID_CLUSTER)return _0x387c4e;const [_0x2a4af5,_0x468206]=_0x423f4e['anCeb'](readVint,_0x32bdc9,_0x387c4e+_0x45afbd);if(isUnknownSize(_0x2a4af5,_0x468206))return _0x387c4e;_0x387c4e+=_0x423f4e[_0x5619ea(0x15b)](_0x45afbd,_0x468206)+_0x2a4af5;}return _0x32bdc9[_0x5619ea(0x174)];}function _0x3669(_0x473b60,_0x324e61){_0x473b60=_0x473b60-0x13e;const _0x4a9681=_0x4a96();let _0x36699a=_0x4a9681[_0x473b60];return _0x36699a;}function findClusterEnd(_0x49725c,_0x34f80d,_0x572766,_0x5a95b7){const _0x421943=_0x3669,_0xca782b={'sJuqS':function(_0x1e3d14,_0x25c792,_0x408cf2){return _0x1e3d14(_0x25c792,_0x408cf2);},'bnLdf':function(_0x39b11a,_0x2763e5){return _0x39b11a+_0x2763e5;},'QbGBa':function(_0xd9b609,_0x164046,_0x2ef63e){return _0xd9b609(_0x164046,_0x2ef63e);},'JaThP':function(_0x14d6a1,_0x49ed78){return _0x14d6a1+_0x49ed78;}};if(!_0xca782b['sJuqS'](isUnknownSize,_0x572766,_0x5a95b7))return _0xca782b['bnLdf'](_0x34f80d,_0x572766);const _0x3409f3=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4d450e=_0x34f80d;while(_0x4d450e<_0x49725c[_0x421943(0x174)]-0x4){const [_0x26d28c,_0x391962]=readId(_0x49725c,_0x4d450e);if(_0x3409f3['has'](_0x26d28c))return _0x4d450e;const [_0x4bc243,_0x2633d9]=readVint(_0x49725c,_0x4d450e+_0x391962);if(_0xca782b['QbGBa'](isUnknownSize,_0x4bc243,_0x2633d9))return _0x49725c[_0x421943(0x174)];_0x4d450e+=_0xca782b[_0x421943(0x176)](_0x391962,_0x2633d9)+_0x4bc243;}return _0x49725c[_0x421943(0x174)];}function extractClusters(_0x2da035,_0x1e98f4){const _0x525e3e=_0x3669,_0x45c5ff={'AeAeZ':function(_0x45bdea,_0x1af73a){return _0x45bdea<_0x1af73a;},'mkcHj':function(_0x45d4bf,_0xc43fc0){return _0x45d4bf===_0xc43fc0;},'EaFiA':function(_0x598aa5,_0x13f5bc,_0x1e0aea){return _0x598aa5(_0x13f5bc,_0x1e0aea);},'wqxOG':function(_0x29a1b3,_0x1843b6,_0x4f59d6){return _0x29a1b3(_0x1843b6,_0x4f59d6);},'PfEur':function(_0x5208bd,_0x8b77fc){return _0x5208bd+_0x8b77fc;},'Bugeu':function(_0x5eb493,_0x4d738d,_0xa590c6){return _0x5eb493(_0x4d738d,_0xa590c6);},'otwlG':function(_0x5d3e42,_0x1e84a6){return _0x5d3e42===_0x1e84a6;},'YsWwr':function(_0x1358be,_0x3ccdfd){return _0x1358be+_0x3ccdfd;},'VyWQu':function(_0x269f4a,_0x3bf86b){return _0x269f4a+_0x3bf86b;},'ExoDr':function(_0x276ccf,_0x548254){return _0x276ccf===_0x548254;},'ORrJE':function(_0x279444,_0xc058dd,_0x11fb0c){return _0x279444(_0xc058dd,_0x11fb0c);},'aaEel':function(_0x3c9cb0,_0xbaf3c6){return _0x3c9cb0>_0xbaf3c6;},'yWsrm':function(_0x5ef1d6,_0x5af689,_0x492277){return _0x5ef1d6(_0x5af689,_0x492277);}},_0x25a6f9=[],_0x514ac5=Buffer[_0x525e3e(0x141)]([0x1f,0x43,0xb6,0x75]);let _0xf24a0f=0x0;while(_0x45c5ff['AeAeZ'](_0xf24a0f,_0x2da035[_0x525e3e(0x174)])){const _0x170010=_0x2da035['indexOf'](_0x514ac5,_0xf24a0f);if(_0x45c5ff[_0x525e3e(0x17d)](_0x170010,-0x1))break;const [_0x397eea,_0x271b27]=_0x45c5ff['EaFiA'](readId,_0x2da035,_0x170010);if(_0x397eea!==ID_CLUSTER){_0xf24a0f=_0x170010+0x1;continue;}const [_0x3756fb,_0x558809]=_0x45c5ff['wqxOG'](readVint,_0x2da035,_0x45c5ff[_0x525e3e(0x14c)](_0x170010,_0x271b27)),_0x11f6ef=_0x170010+_0x271b27+_0x558809,_0x3228f5=findClusterEnd(_0x2da035,_0x11f6ef,_0x3756fb,_0x558809);let _0x67fb58=_0x11f6ef,_0x23668b=0x0,_0x2d4792=0x2,_0x341b5d=![],_0x19bf52=Buffer[_0x525e3e(0x15a)](0x0),_0x515251=Buffer[_0x525e3e(0x15a)](0x0);while(_0x67fb58<_0x3228f5){const [_0x32f097,_0x5edf44]=_0x45c5ff['Bugeu'](readId,_0x2da035,_0x67fb58),[_0x550a5b,_0xc9bd0c]=readVint(_0x2da035,_0x45c5ff[_0x525e3e(0x14c)](_0x67fb58,_0x5edf44));if(_0x45c5ff[_0x525e3e(0x171)](_0x32f097,ID_TIMESTAMP)){_0x23668b=readUint(_0x2da035,_0x45c5ff['YsWwr'](_0x67fb58,_0x5edf44)+_0xc9bd0c,_0x550a5b),_0x2d4792=_0x550a5b,_0x341b5d=!![],_0x19bf52=_0x2da035[_0x525e3e(0x143)](_0x11f6ef,_0x67fb58);const _0x5c957f=_0x45c5ff[_0x525e3e(0x14c)](_0x45c5ff['PfEur'](_0x67fb58+_0x5edf44,_0xc9bd0c),_0x550a5b);_0x515251=_0x2da035[_0x525e3e(0x143)](_0x5c957f,_0x3228f5);break;}if(_0x32f097===ID_CLUSTER)break;if(isUnknownSize(_0x550a5b,_0xc9bd0c))break;_0x67fb58+=_0x45c5ff[_0x525e3e(0x169)](_0x5edf44+_0xc9bd0c,_0x550a5b);}!_0x341b5d&&(_0x515251=_0x2da035[_0x525e3e(0x143)](_0x11f6ef,_0x3228f5));let _0x471be2=_0x23668b;_0x67fb58=_0x11f6ef;while(_0x67fb58<_0x3228f5){const [_0x55162c,_0x4bb409]=_0x45c5ff[_0x525e3e(0x161)](readId,_0x2da035,_0x67fb58),[_0x284b12,_0xb5f7a2]=_0x45c5ff['EaFiA'](readVint,_0x2da035,_0x67fb58+_0x4bb409);if(_0x45c5ff['ExoDr'](_0x55162c,ID_SIMPLE_BLOCK)&&_0x284b12>=0x4){const _0x5d1748=_0x67fb58+_0x4bb409+_0xb5f7a2,[,_0x1fbaf7]=_0x45c5ff['ORrJE'](readVint,_0x2da035,_0x5d1748),_0xb09f86=_0x2da035['readInt16BE'](_0x5d1748+_0x1fbaf7),_0x5eff58=_0x23668b+_0xb09f86;if(_0x45c5ff[_0x525e3e(0x175)](_0x5eff58,_0x471be2))_0x471be2=_0x5eff58;}if(_0x45c5ff[_0x525e3e(0x171)](_0x55162c,ID_CLUSTER))break;if(_0x45c5ff['yWsrm'](isUnknownSize,_0x284b12,_0xb5f7a2))break;_0x67fb58+=_0x4bb409+_0xb5f7a2+_0x284b12;}_0x25a6f9[_0x525e3e(0x166)]({'timestamp':_0x23668b,'maxTicks':_0x471be2,'bodyBeforeTimestamp':_0x19bf52,'bodyAfterTimestamp':_0x515251,'timestampElementSize':_0x2d4792}),_0xf24a0f=_0x3228f5;}return _0x25a6f9;}function parseWebm(_0x35d1c4){const _0x2002f4=_0x3669,_0x5f0eac={'bBHtx':function(_0x345baa,_0x4137fe){return _0x345baa+_0x4137fe;},'zGpYd':function(_0x4ebc45,_0x4f1da1,_0x4bc781){return _0x4ebc45(_0x4f1da1,_0x4bc781);},'FxRtA':function(_0x436a03,_0x196388,_0x161656){return _0x436a03(_0x196388,_0x161656);},'ofEhf':function(_0x15ca3a,_0x653eeb){return _0x15ca3a>_0x653eeb;}};let _0xb36033=0x0;const [,_0xee8eb0]=readId(_0x35d1c4,_0xb36033),[_0x395e4f,_0x3525e1]=readVint(_0x35d1c4,_0x5f0eac['bBHtx'](_0xb36033,_0xee8eb0));_0xb36033+=_0x5f0eac[_0x2002f4(0x142)](_0xee8eb0,_0x3525e1)+_0x395e4f;const [_0x34bad2,_0x465791]=_0x5f0eac[_0x2002f4(0x177)](readId,_0x35d1c4,_0xb36033);if(_0x34bad2!==ID_SEGMENT)return null;const [,_0x225f46]=_0x5f0eac['zGpYd'](readVint,_0x35d1c4,_0xb36033+_0x465791),_0x424730=_0x5f0eac['bBHtx'](_0xb36033+_0x465791,_0x225f46),_0x256534=_0x5f0eac[_0x2002f4(0x14d)](findTimestampScale,_0x35d1c4,_0x424730),_0xf97f26=findFirstClusterOffset(_0x35d1c4,_0x424730),_0x287e6d=_0x35d1c4[_0x2002f4(0x143)](0x0,_0xf97f26),_0x352825=extractClusters(_0x35d1c4,_0x256534);let _0x3ff8f5=0x0;for(const _0x136b77 of _0x352825){if(_0x5f0eac['ofEhf'](_0x136b77['maxTicks'],_0x3ff8f5))_0x3ff8f5=_0x136b77[_0x2002f4(0x146)];}return{'header':_0x287e6d,'clusters':_0x352825,'timestampScale':_0x256534,'maxTimestampTicks':_0x3ff8f5};}function buildCluster(_0x4d3885,_0x3135c3,_0x2d700c){const _0x4a3af1=_0x3669,_0x114fd1={'Iwzbu':function(_0x31494d,_0x4885c5){return _0x31494d(_0x4885c5);}},_0x432ab4=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x1bd0fa=Math['max'](0x4,uintSize(_0x4d3885)),_0x3d3d5e=Buffer['concat']([Buffer[_0x4a3af1(0x141)]([ID_TIMESTAMP]),_0x114fd1['Iwzbu'](writeVint,_0x1bd0fa),writeUint(_0x4d3885,_0x1bd0fa)]),_0x4ccb4f=Buffer[_0x4a3af1(0x154)]([_0x3135c3,_0x3d3d5e,_0x2d700c]),_0x4dadf0=writeVint(_0x4ccb4f[_0x4a3af1(0x174)]);return Buffer[_0x4a3af1(0x154)]([_0x432ab4,_0x4dadf0,_0x4ccb4f]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2ba5bc){const _0x4be6cd=_0x3669,_0x2b67c1={'QuaCP':function(_0x1e34b7,_0x38d01f,_0x48b144){return _0x1e34b7(_0x38d01f,_0x48b144);},'QATeT':function(_0x2e3926,_0x44b866){return _0x2e3926+_0x44b866;},'GApTF':function(_0x2dc460,_0x212920){return _0x2dc460+_0x212920;},'Hmcar':function(_0x54a89b,_0x443f2c){return _0x54a89b+_0x443f2c;},'HsNKA':function(_0x3391f7,_0x16a181){return _0x3391f7(_0x16a181);},'mYzgv':function(_0x4a4393,_0x29dbff){return _0x4a4393<_0x29dbff;},'oZoLG':function(_0x364d30,_0x4d8552){return _0x364d30===_0x4d8552;},'QogeZ':function(_0x4f47e7,_0x5842ca){return _0x4f47e7+_0x5842ca;},'LkltG':function(_0x2860eb,_0x3c69ef){return _0x2860eb+_0x3c69ef;},'fNcph':function(_0x284b6f,_0x407a23){return _0x284b6f+_0x407a23;},'sHACt':function(_0x574a60,_0xd2b9fd){return _0x574a60+_0xd2b9fd;},'pDjUJ':function(_0x5988ef,_0x3df41f){return _0x5988ef+_0x3df41f;},'qWkPQ':function(_0x26728b,_0x324962,_0x259f2b){return _0x26728b(_0x324962,_0x259f2b);}},_0x53b3e1=Buffer[_0x4be6cd(0x141)](_0x2ba5bc);let _0x1f39a1=0x0;const [,_0x4233d9]=_0x2b67c1[_0x4be6cd(0x14f)](readId,_0x53b3e1,_0x1f39a1),[_0x427514,_0x37fd64]=readVint(_0x53b3e1,_0x2b67c1[_0x4be6cd(0x17b)](_0x1f39a1,_0x4233d9)),_0x1b21f3=_0x2b67c1[_0x4be6cd(0x17b)](_0x2b67c1['QATeT'](_0x2b67c1[_0x4be6cd(0x15e)](_0x1f39a1,_0x4233d9),_0x37fd64),_0x427514),[,_0x478a32]=_0x2b67c1['QuaCP'](readId,_0x53b3e1,_0x1b21f3),[,_0x4326e7]=readVint(_0x53b3e1,_0x1b21f3+_0x478a32),_0x54195c=_0x2b67c1[_0x4be6cd(0x17b)](_0x2b67c1['Hmcar'](_0x1b21f3,_0x478a32),_0x4326e7),_0x8c141c=_0x2b67c1[_0x4be6cd(0x145)](writeUnknownSizeVint,_0x4326e7);_0x8c141c['copy'](_0x53b3e1,_0x1b21f3+_0x478a32);let _0x5a9e54=_0x54195c;const _0x5aa850=Math['min'](_0x53b3e1['length'],_0x54195c+0x2710);while(_0x2b67c1[_0x4be6cd(0x167)](_0x5a9e54,_0x5aa850)){const [_0x5aad4d,_0x5170b0]=_0x2b67c1['QuaCP'](readId,_0x53b3e1,_0x5a9e54),[_0x4b9ced,_0x303122]=_0x2b67c1['QuaCP'](readVint,_0x53b3e1,_0x5a9e54+_0x5170b0);if(_0x2b67c1['oZoLG'](_0x5aad4d,ID_CLUSTER))break;if(isUnknownSize(_0x4b9ced,_0x303122))break;if(_0x2b67c1[_0x4be6cd(0x152)](_0x5aad4d,ID_INFO)){const _0x4edcb4=_0x2b67c1[_0x4be6cd(0x140)](_0x2b67c1[_0x4be6cd(0x156)](_0x5a9e54,_0x5170b0),_0x303122),_0x5180d8=_0x2b67c1['fNcph'](_0x4edcb4,_0x4b9ced),_0x511a6f=[];let _0xf47aff=_0x4edcb4;while(_0x2b67c1[_0x4be6cd(0x167)](_0xf47aff,_0x5180d8)){const [_0x14858c,_0x52d80a]=readId(_0x53b3e1,_0xf47aff),[_0x1ebcb5,_0x13734f]=readVint(_0x53b3e1,_0x2b67c1[_0x4be6cd(0x15c)](_0xf47aff,_0x52d80a)),_0x57783e=_0x2b67c1['pDjUJ'](_0x52d80a+_0x13734f,_0x1ebcb5);_0x14858c!==ID_DURATION&&_0x511a6f['push'](_0x53b3e1['slice'](_0xf47aff,_0xf47aff+_0x57783e)),_0xf47aff+=_0x57783e;}const _0x44e99c=Buffer['concat'](_0x511a6f),_0x23b1c9=Buffer[_0x4be6cd(0x154)]([_0x53b3e1[_0x4be6cd(0x143)](_0x5a9e54,_0x5a9e54+_0x5170b0),_0x2b67c1[_0x4be6cd(0x153)](writeVint,_0x44e99c[_0x4be6cd(0x174)],_0x303122)]);return Buffer[_0x4be6cd(0x154)]([_0x53b3e1['slice'](0x0,_0x5a9e54),_0x23b1c9,_0x44e99c,_0x53b3e1[_0x4be6cd(0x143)](_0x5180d8)]);}_0x5a9e54+=_0x2b67c1['QATeT'](_0x5170b0,_0x303122)+_0x4b9ced;}return _0x53b3e1;}export function stitchWebmFiles(_0x20d29f,_0x50fde6){const _0x172542=_0x3669,_0x2cb48d={'hwqbm':function(_0x4087f3,_0x4b632c){return _0x4087f3<=_0x4b632c;},'vQyoy':function(_0x3f0596,_0x438dc0){return _0x3f0596(_0x438dc0);},'pKsuI':function(_0x13c207,_0x4a03fc,_0x1b433e,_0x506924){return _0x13c207(_0x4a03fc,_0x1b433e,_0x506924);},'PaBkZ':function(_0x1c3e99,_0x37047d){return _0x1c3e99+_0x37047d;},'ukjVm':function(_0x5d2aa7,_0x4c9249,_0x36784b){return _0x5d2aa7(_0x4c9249,_0x36784b);}};if(_0x2cb48d[_0x172542(0x170)](_0x20d29f[_0x172542(0x174)],0x1))return![];const _0x460edf=[];for(const _0xf833d5 of _0x20d29f){const _0x37bcd2=readFileSync(_0xf833d5),_0x4326a7=_0x2cb48d['vQyoy'](parseWebm,_0x37bcd2);if(!_0x4326a7||_0x4326a7['clusters'][_0x172542(0x174)]===0x0)return![];_0x460edf['push'](_0x4326a7);}const _0x4b3e6a=_0x460edf[0x0],_0x448348=rebuildHeaderWithoutDuration(_0x4b3e6a[_0x172542(0x15f)]),_0x3e518b=[_0x448348];let _0x42fdf8=0x0;for(let _0x13bd57=0x0;_0x13bd57<_0x460edf[_0x172542(0x174)];_0x13bd57++){const _0x3e8969=_0x460edf[_0x13bd57];for(const _0x358e60 of _0x3e8969[_0x172542(0x165)]){const _0x2cf2c8=_0x358e60[_0x172542(0x164)]+_0x42fdf8;_0x3e518b['push'](_0x2cb48d['pKsuI'](buildCluster,_0x2cf2c8,_0x358e60['bodyBeforeTimestamp'],_0x358e60[_0x172542(0x13f)]));}const _0x328128=0x1e;_0x42fdf8+=_0x2cb48d['PaBkZ'](_0x3e8969['maxTimestampTicks'],_0x328128);}return _0x2cb48d['ukjVm'](writeFileSync,_0x50fde6,Buffer[_0x172542(0x154)](_0x3e518b)),!![];}if(process[_0x163e52(0x157)][0x1]?.[_0x163e52(0x17e)](_0x163e52(0x16e))||process['argv'][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x163e52(0x143)](0x2);args[_0x163e52(0x174)]<0x3&&(console['error'](_0x163e52(0x13e)),process[_0x163e52(0x16a)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x163e52(0x174)]+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
function _0x365d(){const _0x44d795=['593185qWOKxU','cAQOO','push','endsWith','YEgLC','mvkti','170fqaoHH','AdBRa','UsoND','5486211YLIetV','maxTicks','1745555EyXzMW','8bEQQJY','from','fqEUg','readInt16BE','RCqfO','Gnbpp','jdovU','tdbKP','jaBEH','2241ATzkzv','tlnVK','noKTL','qpiIS','VZWeS','RsQeZ','wstkJ','LYbzX','clusters','Stitched\x20','FusWl','exit','lfDNM','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','GcarI','log','pow','ZVrWN','alloc','stitchWebmFiles.js','TTpHt','argv','copy','ibMVz','ZRGNj','XiQiW','slice','max','length','1043992sdXtZh','eMRRl','6109960yzZcPV','rbcWq','cvlhv','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','concat','PHXlp','giiWc','ZXANm','\x20files\x20->\x20','timestamp','2767728DGtsYV'];_0x365d=function(){return _0x44d795;};return _0x365d();}const _0x3d958c=_0x2d89;(function(_0x28a1e4,_0x184622){const _0x14b868=_0x2d89,_0x2adcb4=_0x28a1e4();while(!![]){try{const _0x1dae6e=parseInt(_0x14b868(0x152))/0x1+parseInt(_0x14b868(0x165))/0x2*(parseInt(_0x14b868(0x174))/0x3)+parseInt(_0x14b868(0x16b))/0x4*(parseInt(_0x14b868(0x15f))/0x5)+-parseInt(_0x14b868(0x15e))/0x6+parseInt(_0x14b868(0x16a))/0x7+-parseInt(_0x14b868(0x154))/0x8+parseInt(_0x14b868(0x168))/0x9;if(_0x1dae6e===_0x184622)break;else _0x2adcb4['push'](_0x2adcb4['shift']());}catch(_0x4999e1){_0x2adcb4['push'](_0x2adcb4['shift']());}}}(_0x365d,0xeeef0));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(_0x329b78,_0x2cc0a1){const _0x5d7aca=_0x2d89,_0x1d4223={'GcarI':function(_0xdb7b8a,_0x432497){return _0xdb7b8a>=_0x432497;},'rbcWq':function(_0x4e6258,_0x300153){return _0x4e6258-_0x300153;},'aahgF':function(_0xe015c9,_0x5b6395){return _0xe015c9+_0x5b6395;},'TTpHt':function(_0x384412,_0x29dfbd){return _0x384412*_0x29dfbd;}};if(_0x1d4223[_0x5d7aca(0x143)](_0x2cc0a1,_0x329b78[_0x5d7aca(0x151)]))return[0x0,0x0];const _0x5852b2=_0x329b78[_0x2cc0a1];let _0x4a2339=0x1,_0x4857ec=0x80;while(_0x4a2339<=0x8&&!(_0x5852b2&_0x4857ec)){_0x4a2339++,_0x4857ec>>=0x1;}if(_0x2cc0a1+_0x4a2339>_0x329b78['length'])return[0x0,0x0];let _0x4c1fa1=_0x5852b2&_0x1d4223[_0x5d7aca(0x155)](_0x4857ec,0x1);for(let _0x50639c=0x1;_0x50639c<_0x4a2339;_0x50639c++){_0x4c1fa1=_0x1d4223['aahgF'](_0x1d4223[_0x5d7aca(0x149)](_0x4c1fa1,0x100),_0x329b78[_0x2cc0a1+_0x50639c]);}return[_0x4c1fa1,_0x4a2339];}function readId(_0x5ba223,_0x3bcf79){const _0x3900bb=_0x2d89,_0x59890a={'wstkJ':function(_0x1c0b54,_0x168a88){return _0x1c0b54>=_0x168a88;},'PWerj':function(_0x591e3e,_0x2a71e1){return _0x591e3e>_0x2a71e1;},'giiWc':function(_0x53e9c4,_0x4a2146){return _0x53e9c4<_0x4a2146;},'PgsEo':function(_0x35f34d,_0x3723e0){return _0x35f34d*_0x3723e0;},'puxrh':function(_0x48888e,_0x91db1c){return _0x48888e+_0x91db1c;}};if(_0x59890a[_0x3900bb(0x13b)](_0x3bcf79,_0x5ba223['length']))return[0x0,0x0];const _0x1b2baf=_0x5ba223[_0x3bcf79];let _0x2bbd76;if(_0x1b2baf>=0x80)_0x2bbd76=0x1;else{if(_0x1b2baf>=0x40)_0x2bbd76=0x2;else{if(_0x59890a['wstkJ'](_0x1b2baf,0x20))_0x2bbd76=0x3;else{if(_0x59890a[_0x3900bb(0x13b)](_0x1b2baf,0x10))_0x2bbd76=0x4;else return[_0x1b2baf,0x1];}}}if(_0x59890a['PWerj'](_0x3bcf79+_0x2bbd76,_0x5ba223['length']))return[0x0,0x0];let _0x58d59=0x0;for(let _0x2f6933=0x0;_0x59890a[_0x3900bb(0x15a)](_0x2f6933,_0x2bbd76);_0x2f6933++){_0x58d59=_0x59890a['PgsEo'](_0x58d59,0x100)+_0x5ba223[_0x59890a['puxrh'](_0x3bcf79,_0x2f6933)];}return[_0x58d59,_0x2bbd76];}function _0x2d89(_0x4c8155,_0x181150){_0x4c8155=_0x4c8155-0x13a;const _0x365d8d=_0x365d();let _0x2d89c1=_0x365d8d[_0x4c8155];return _0x2d89c1;}function readUint(_0x144e71,_0x127122,_0x45e12f){const _0x45296a={'nqDvN':function(_0x59d0bd,_0x1476d5){return _0x59d0bd+_0x1476d5;},'qwDRZ':function(_0x1e434d,_0x3a93c5){return _0x1e434d*_0x3a93c5;}};let _0x293383=0x0;for(let _0x393cb4=0x0;_0x393cb4<_0x45e12f;_0x393cb4++){_0x293383=_0x45296a['nqDvN'](_0x45296a['qwDRZ'](_0x293383,0x100),_0x144e71[_0x45296a['nqDvN'](_0x127122,_0x393cb4)]);}return _0x293383;}function isUnknownSize(_0x3a96da,_0x1c882d){const _0x2ed070=_0x2d89,_0xa1f824={'FJyCT':function(_0x492740,_0x59ce66){return _0x492740===_0x59ce66;},'RsQeZ':function(_0x2560c4,_0xd0f83f){return _0x2560c4*_0xd0f83f;}};return _0xa1f824['FJyCT'](_0x3a96da,Math[_0x2ed070(0x145)](0x2,_0xa1f824[_0x2ed070(0x13a)](0x7,_0x1c882d))-0x1);}function writeVint(_0x27dccf,_0x9448a){const _0x31ad11=_0x2d89,_0x15dade={'ZXANm':function(_0x496417,_0x5f149a){return _0x496417||_0x5f149a;},'Gnbpp':function(_0x2fe785,_0x1822b6){return _0x2fe785-_0x1822b6;},'cAQOO':function(_0x180ed9,_0x35052d){return _0x180ed9-_0x35052d;},'ZVrWN':function(_0x43644c,_0x52a60b){return _0x43644c&_0x52a60b;}};let _0x4d6243=_0x15dade[_0x31ad11(0x15b)](_0x9448a,0x1);while(_0x15dade['Gnbpp'](Math[_0x31ad11(0x145)](0x2,0x7*_0x4d6243),0x2)<_0x27dccf)_0x4d6243++;const _0x36a042=Buffer['alloc'](_0x4d6243);for(let _0x1dc5d7=_0x15dade[_0x31ad11(0x160)](_0x4d6243,0x1);_0x1dc5d7>=0x0;_0x1dc5d7--){_0x36a042[_0x1dc5d7]=_0x15dade[_0x31ad11(0x146)](_0x27dccf,0xff),_0x27dccf=Math['floor'](_0x27dccf/0x100);}return _0x36a042[0x0]|=0x1<<_0x15dade[_0x31ad11(0x170)](0x8,_0x4d6243),_0x36a042;}function writeUint(_0x2ffd3f,_0x2d08c5){const _0xbafc06=_0x2d89,_0x418d3b={'QBcMl':function(_0x18254a,_0x1ed1b6){return _0x18254a/_0x1ed1b6;}},_0x1e40a2=Buffer[_0xbafc06(0x147)](_0x2d08c5);for(let _0xc4fc40=_0x2d08c5-0x1;_0xc4fc40>=0x0;_0xc4fc40--){_0x1e40a2[_0xc4fc40]=_0x2ffd3f&0xff,_0x2ffd3f=Math['floor'](_0x418d3b['QBcMl'](_0x2ffd3f,0x100));}return _0x1e40a2;}function writeUnknownSizeVint(_0x3f8043){const _0x11218a=_0x2d89,_0x34b7b0={'tdbKP':function(_0x520788,_0x13b2e9){return _0x520788-_0x13b2e9;}},_0x4fd1ff=Buffer[_0x11218a(0x147)](_0x3f8043,0xff);return _0x4fd1ff[0x0]=0xff>>_0x34b7b0[_0x11218a(0x172)](_0x3f8043,0x1),_0x4fd1ff;}function uintSize(_0xace9c9){const _0xf83687={'KHHgg':function(_0x7b555b,_0x2256e4){return _0x7b555b>_0x2256e4;}};if(_0xace9c9===0x0)return 0x1;let _0x37648c=0x0,_0x397140=_0xace9c9;while(_0xf83687['KHHgg'](_0x397140,0x0)){_0x37648c++,_0x397140=Math['floor'](_0x397140/0x100);}return _0x37648c;}function findTimestampScale(_0x67c44,_0x257fd4){const _0x37402b=_0x2d89,_0x444c12={'ibMVz':function(_0x4c407c,_0x1fbf16){return _0x4c407c+_0x1fbf16;},'YEgLC':function(_0x2b2f32,_0x3f6ce9){return _0x2b2f32===_0x3f6ce9;},'aLKlk':function(_0x398cba,_0x40e184){return _0x398cba<_0x40e184;},'ZRGNj':function(_0x2361b5,_0x10aa90,_0xc76dbd){return _0x2361b5(_0x10aa90,_0xc76dbd);},'PHXlp':function(_0x3bd44c,_0x5cc720){return _0x3bd44c+_0x5cc720;}};let _0x1a4042=_0x257fd4;const _0x283243=Math['min'](_0x67c44[_0x37402b(0x151)],_0x257fd4+0x2710);while(_0x1a4042<_0x283243){const [_0x410022,_0x3fb90d]=readId(_0x67c44,_0x1a4042),[_0x2dd16c,_0x5512ae]=readVint(_0x67c44,_0x444c12['ibMVz'](_0x1a4042,_0x3fb90d));if(_0x444c12[_0x37402b(0x163)](_0x410022,ID_INFO)){let _0xe50e13=_0x444c12[_0x37402b(0x14c)](_0x1a4042+_0x3fb90d,_0x5512ae);const _0x853efe=_0xe50e13+_0x2dd16c;while(_0x444c12['aLKlk'](_0xe50e13,_0x853efe)){const [_0x140f2c,_0x45348d]=readId(_0x67c44,_0xe50e13),[_0x4acda7,_0x50630b]=_0x444c12['ZRGNj'](readVint,_0x67c44,_0x444c12['ibMVz'](_0xe50e13,_0x45348d));if(_0x140f2c===ID_TIMESTAMP_SCALE)return readUint(_0x67c44,_0xe50e13+_0x45348d+_0x50630b,_0x4acda7);_0xe50e13+=_0x444c12['PHXlp'](_0x444c12['ibMVz'](_0x45348d,_0x50630b),_0x4acda7);}break;}if(_0x410022===ID_CLUSTER)break;if(_0x444c12[_0x37402b(0x14d)](isUnknownSize,_0x2dd16c,_0x5512ae))break;_0x1a4042+=_0x444c12['PHXlp'](_0x444c12[_0x37402b(0x159)](_0x3fb90d,_0x5512ae),_0x2dd16c);}return 0xf4240;}function findFirstClusterOffset(_0x4fe915,_0x55df81){const _0x2db7a7=_0x2d89,_0x4a002c={'tlnVK':function(_0x56b1c9,_0x26a930){return _0x56b1c9===_0x26a930;},'jaBEH':function(_0x38c82d,_0x3be826,_0x52c2cf){return _0x38c82d(_0x3be826,_0x52c2cf);}};let _0x72b89b=_0x55df81;while(_0x72b89b<_0x4fe915[_0x2db7a7(0x151)]){const [_0xf71961,_0x49b90c]=readId(_0x4fe915,_0x72b89b);if(_0x4a002c[_0x2db7a7(0x175)](_0xf71961,ID_CLUSTER))return _0x72b89b;const [_0x555272,_0x860c89]=_0x4a002c[_0x2db7a7(0x173)](readVint,_0x4fe915,_0x72b89b+_0x49b90c);if(_0x4a002c['jaBEH'](isUnknownSize,_0x555272,_0x860c89))return _0x72b89b;_0x72b89b+=_0x49b90c+_0x860c89+_0x555272;}return _0x4fe915['length'];}function findClusterEnd(_0x2b5768,_0x5533ee,_0x2daf44,_0x4d9bf1){const _0x266c04=_0x2d89,_0x53dfdd={'AdBRa':function(_0x6c3dee,_0x31cbc4){return _0x6c3dee+_0x31cbc4;},'MwEdm':function(_0x3aad48,_0x52c9e5){return _0x3aad48-_0x52c9e5;}};if(!isUnknownSize(_0x2daf44,_0x4d9bf1))return _0x53dfdd['AdBRa'](_0x5533ee,_0x2daf44);const _0x1c26a4=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x366d3d=_0x5533ee;while(_0x366d3d<_0x53dfdd['MwEdm'](_0x2b5768['length'],0x4)){const [_0x2d92a3,_0xcbfbd2]=readId(_0x2b5768,_0x366d3d);if(_0x1c26a4['has'](_0x2d92a3))return _0x366d3d;const [_0x239b8b,_0x2cac83]=readVint(_0x2b5768,_0x366d3d+_0xcbfbd2);if(isUnknownSize(_0x239b8b,_0x2cac83))return _0x2b5768[_0x266c04(0x151)];_0x366d3d+=_0x53dfdd[_0x266c04(0x166)](_0xcbfbd2+_0x2cac83,_0x239b8b);}return _0x2b5768['length'];}function extractClusters(_0x1df205,_0xbbc40){const _0x25410a=_0x2d89,_0x472535={'WjQWX':function(_0x47c724,_0xeb9b55){return _0x47c724<_0xeb9b55;},'LYbzX':function(_0x2efb50,_0x2aa094,_0x1bb148){return _0x2efb50(_0x2aa094,_0x1bb148);},'lfDNM':function(_0x265cc3,_0x36df03){return _0x265cc3+_0x36df03;},'ovAnG':function(_0x2d19e9,_0x216653){return _0x2d19e9+_0x216653;},'AupII':function(_0x3ef5da,_0x21bc8f){return _0x3ef5da===_0x21bc8f;},'SPtko':function(_0x5767c9,_0x272e7f,_0x7d7568,_0x495462){return _0x5767c9(_0x272e7f,_0x7d7568,_0x495462);},'PVldj':function(_0x3b756c,_0x50608e){return _0x3b756c+_0x50608e;},'eMRRl':function(_0x32da00,_0x2fbea6){return _0x32da00+_0x2fbea6;},'JBUfo':function(_0x53a4b3,_0x2d1cba,_0x13a1f8){return _0x53a4b3(_0x2d1cba,_0x13a1f8);},'noKTL':function(_0x351c88,_0x416bf8){return _0x351c88<_0x416bf8;},'LEXZf':function(_0x45d637,_0x43692a,_0x191c71){return _0x45d637(_0x43692a,_0x191c71);},'eLRCL':function(_0x31813,_0x3986f0){return _0x31813===_0x3986f0;},'ocwDN':function(_0x54cfdb,_0x259330){return _0x54cfdb+_0x259330;}},_0x51d1b8=[],_0x3e1304=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x2aacbe=0x0;while(_0x472535['WjQWX'](_0x2aacbe,_0x1df205['length'])){const _0x226cd7=_0x1df205['indexOf'](_0x3e1304,_0x2aacbe);if(_0x226cd7===-0x1)break;const [_0x2ecfe6,_0x58a3ac]=_0x472535['LYbzX'](readId,_0x1df205,_0x226cd7);if(_0x2ecfe6!==ID_CLUSTER){_0x2aacbe=_0x226cd7+0x1;continue;}const [_0x3eb912,_0x54b9b3]=readVint(_0x1df205,_0x226cd7+_0x58a3ac),_0x219387=_0x472535[_0x25410a(0x141)](_0x472535['ovAnG'](_0x226cd7,_0x58a3ac),_0x54b9b3),_0x3714ca=findClusterEnd(_0x1df205,_0x219387,_0x3eb912,_0x54b9b3);let _0x4d9f37=_0x219387,_0xe2c99=0x0,_0x26dfbf=0x2,_0x58100c=![],_0x10bd2e=Buffer[_0x25410a(0x147)](0x0),_0x46697e=Buffer['alloc'](0x0);while(_0x472535['WjQWX'](_0x4d9f37,_0x3714ca)){const [_0x564e8a,_0x4c6df2]=readId(_0x1df205,_0x4d9f37),[_0x839cbb,_0x2783c6]=readVint(_0x1df205,_0x4d9f37+_0x4c6df2);if(_0x472535['AupII'](_0x564e8a,ID_TIMESTAMP)){_0xe2c99=_0x472535['SPtko'](readUint,_0x1df205,_0x472535['ovAnG'](_0x4d9f37,_0x4c6df2)+_0x2783c6,_0x839cbb),_0x26dfbf=_0x839cbb,_0x58100c=!![],_0x10bd2e=_0x1df205['slice'](_0x219387,_0x4d9f37);const _0x5bba7e=_0x472535['PVldj'](_0x472535['eMRRl'](_0x4d9f37,_0x4c6df2),_0x2783c6)+_0x839cbb;_0x46697e=_0x1df205[_0x25410a(0x14f)](_0x5bba7e,_0x3714ca);break;}if(_0x564e8a===ID_CLUSTER)break;if(_0x472535['JBUfo'](isUnknownSize,_0x839cbb,_0x2783c6))break;_0x4d9f37+=_0x472535[_0x25410a(0x153)](_0x4c6df2,_0x2783c6)+_0x839cbb;}!_0x58100c&&(_0x46697e=_0x1df205['slice'](_0x219387,_0x3714ca));let _0x3c7968=_0xe2c99;_0x4d9f37=_0x219387;while(_0x472535[_0x25410a(0x176)](_0x4d9f37,_0x3714ca)){const [_0x3c5d4b,_0x5dbaa1]=_0x472535['LEXZf'](readId,_0x1df205,_0x4d9f37),[_0x22a179,_0xc44b14]=_0x472535[_0x25410a(0x13c)](readVint,_0x1df205,_0x4d9f37+_0x5dbaa1);if(_0x472535['eLRCL'](_0x3c5d4b,ID_SIMPLE_BLOCK)&&_0x22a179>=0x4){const _0x1d605a=_0x472535[_0x25410a(0x153)](_0x4d9f37,_0x5dbaa1)+_0xc44b14,[,_0x18c528]=_0x472535['JBUfo'](readVint,_0x1df205,_0x1d605a),_0x246fd2=_0x1df205[_0x25410a(0x16e)](_0x1d605a+_0x18c528),_0x3d629d=_0xe2c99+_0x246fd2;if(_0x3d629d>_0x3c7968)_0x3c7968=_0x3d629d;}if(_0x3c5d4b===ID_CLUSTER)break;if(isUnknownSize(_0x22a179,_0xc44b14))break;_0x4d9f37+=_0x472535['ocwDN'](_0x5dbaa1,_0xc44b14)+_0x22a179;}_0x51d1b8['push']({'timestamp':_0xe2c99,'maxTicks':_0x3c7968,'bodyBeforeTimestamp':_0x10bd2e,'bodyAfterTimestamp':_0x46697e,'timestampElementSize':_0x26dfbf}),_0x2aacbe=_0x3714ca;}return _0x51d1b8;}function parseWebm(_0x401de5){const _0x24a102=_0x2d89,_0x51d54b={'mvkti':function(_0x4c3723,_0x3cb113,_0x25f24d){return _0x4c3723(_0x3cb113,_0x25f24d);},'XiQiW':function(_0x2da713,_0x107c75){return _0x2da713+_0x107c75;},'jdovU':function(_0x4312d0,_0x3dd3c7,_0x209d9c){return _0x4312d0(_0x3dd3c7,_0x209d9c);},'laEqn':function(_0x522a83,_0x2d83d5,_0x5f2e7c){return _0x522a83(_0x2d83d5,_0x5f2e7c);},'iefYp':function(_0x14ebee,_0x5b26a5,_0x7e679b){return _0x14ebee(_0x5b26a5,_0x7e679b);}};let _0x2ed7d4=0x0;const [,_0x9b2b16]=_0x51d54b[_0x24a102(0x164)](readId,_0x401de5,_0x2ed7d4),[_0x587d06,_0x174d71]=readVint(_0x401de5,_0x51d54b['XiQiW'](_0x2ed7d4,_0x9b2b16));_0x2ed7d4+=_0x51d54b['XiQiW'](_0x51d54b['XiQiW'](_0x9b2b16,_0x174d71),_0x587d06);const [_0x32c164,_0x514e47]=_0x51d54b[_0x24a102(0x171)](readId,_0x401de5,_0x2ed7d4);if(_0x32c164!==ID_SEGMENT)return null;const [,_0x2714ff]=readVint(_0x401de5,_0x51d54b[_0x24a102(0x14e)](_0x2ed7d4,_0x514e47)),_0x5ef6e3=_0x2ed7d4+_0x514e47+_0x2714ff,_0x299207=_0x51d54b['laEqn'](findTimestampScale,_0x401de5,_0x5ef6e3),_0x373786=findFirstClusterOffset(_0x401de5,_0x5ef6e3),_0x422c64=_0x401de5[_0x24a102(0x14f)](0x0,_0x373786),_0x5d9173=_0x51d54b['iefYp'](extractClusters,_0x401de5,_0x299207);let _0x59c411=0x0;for(const _0x37c078 of _0x5d9173){if(_0x37c078[_0x24a102(0x169)]>_0x59c411)_0x59c411=_0x37c078[_0x24a102(0x169)];}return{'header':_0x422c64,'clusters':_0x5d9173,'timestampScale':_0x299207,'maxTimestampTicks':_0x59c411};}function buildCluster(_0x2e1a13,_0x2cdb9c,_0xba8ac7){const _0x36f241=_0x2d89,_0x136656={'MnpSE':function(_0x1e5f49,_0x36298b){return _0x1e5f49(_0x36298b);}},_0xd10c28=Buffer[_0x36f241(0x16c)]([0x1f,0x43,0xb6,0x75]),_0x5bda38=Math[_0x36f241(0x150)](0x4,_0x136656['MnpSE'](uintSize,_0x2e1a13)),_0x4329ec=Buffer[_0x36f241(0x158)]([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x5bda38),writeUint(_0x2e1a13,_0x5bda38)]),_0x1ec316=Buffer['concat']([_0x2cdb9c,_0x4329ec,_0xba8ac7]),_0x2c1583=writeVint(_0x1ec316[_0x36f241(0x151)]);return Buffer[_0x36f241(0x158)]([_0xd10c28,_0x2c1583,_0x1ec316]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3f3333){const _0x1a5ede=_0x2d89,_0x1e322b={'fqEUg':function(_0x23e28b,_0x49eeaf){return _0x23e28b+_0x49eeaf;},'qpiIS':function(_0x59fd19,_0x2e0c02){return _0x59fd19(_0x2e0c02);},'IlWke':function(_0x2c7686,_0x59f517){return _0x2c7686+_0x59f517;},'UsoND':function(_0x407e55,_0x2b0114,_0x146aa2){return _0x407e55(_0x2b0114,_0x146aa2);},'LqMZV':function(_0x4f446b,_0x26453e,_0x382811){return _0x4f446b(_0x26453e,_0x382811);},'MYuMV':function(_0x3b404f,_0x3e032c){return _0x3b404f+_0x3e032c;},'UenmT':function(_0x48c073,_0x378387){return _0x48c073===_0x378387;},'RCqfO':function(_0x2932d3,_0x2d56ee){return _0x2932d3===_0x2d56ee;},'cvlhv':function(_0x36e4c3,_0x706956){return _0x36e4c3+_0x706956;},'WQepJ':function(_0x4f0c09,_0x4d9f3c,_0x44cb35){return _0x4f0c09(_0x4d9f3c,_0x44cb35);}},_0x12fc90=Buffer['from'](_0x3f3333);let _0x3487e5=0x0;const [,_0x380494]=readId(_0x12fc90,_0x3487e5),[_0x5bb5ff,_0x4df59f]=readVint(_0x12fc90,_0x1e322b[_0x1a5ede(0x16d)](_0x3487e5,_0x380494)),_0x5e895f=_0x3487e5+_0x380494+_0x4df59f+_0x5bb5ff,[,_0x1561f0]=readId(_0x12fc90,_0x5e895f),[,_0x414515]=readVint(_0x12fc90,_0x1e322b[_0x1a5ede(0x16d)](_0x5e895f,_0x1561f0)),_0x1d85dd=_0x1e322b[_0x1a5ede(0x16d)](_0x1e322b[_0x1a5ede(0x16d)](_0x5e895f,_0x1561f0),_0x414515),_0x321af3=_0x1e322b[_0x1a5ede(0x177)](writeUnknownSizeVint,_0x414515);_0x321af3[_0x1a5ede(0x14b)](_0x12fc90,_0x1e322b['IlWke'](_0x5e895f,_0x1561f0));let _0x1685a6=_0x1d85dd;const _0x2ad11e=Math['min'](_0x12fc90[_0x1a5ede(0x151)],_0x1e322b['fqEUg'](_0x1d85dd,0x2710));while(_0x1685a6<_0x2ad11e){const [_0x82b994,_0x283e5a]=_0x1e322b[_0x1a5ede(0x167)](readId,_0x12fc90,_0x1685a6),[_0x4a045e,_0x3df864]=_0x1e322b['LqMZV'](readVint,_0x12fc90,_0x1e322b['MYuMV'](_0x1685a6,_0x283e5a));if(_0x1e322b['UenmT'](_0x82b994,ID_CLUSTER))break;if(_0x1e322b['UsoND'](isUnknownSize,_0x4a045e,_0x3df864))break;if(_0x1e322b[_0x1a5ede(0x16f)](_0x82b994,ID_INFO)){const _0x47a090=_0x1e322b[_0x1a5ede(0x156)](_0x1685a6+_0x283e5a,_0x3df864),_0x15a2a0=_0x47a090+_0x4a045e,_0x56d2b0=[];let _0x4fb163=_0x47a090;while(_0x4fb163<_0x15a2a0){const [_0xe1a3ba,_0x44ceaf]=readId(_0x12fc90,_0x4fb163),[_0x437d00,_0x465d4e]=_0x1e322b[_0x1a5ede(0x167)](readVint,_0x12fc90,_0x4fb163+_0x44ceaf),_0x1e93b7=_0x44ceaf+_0x465d4e+_0x437d00;_0xe1a3ba!==ID_DURATION&&_0x56d2b0[_0x1a5ede(0x161)](_0x12fc90['slice'](_0x4fb163,_0x4fb163+_0x1e93b7)),_0x4fb163+=_0x1e93b7;}const _0x55d5e7=Buffer['concat'](_0x56d2b0),_0x23d6b2=Buffer['concat']([_0x12fc90['slice'](_0x1685a6,_0x1685a6+_0x283e5a),_0x1e322b['WQepJ'](writeVint,_0x55d5e7['length'],_0x3df864)]);return Buffer['concat']([_0x12fc90[_0x1a5ede(0x14f)](0x0,_0x1685a6),_0x23d6b2,_0x55d5e7,_0x12fc90[_0x1a5ede(0x14f)](_0x15a2a0)]);}_0x1685a6+=_0x1e322b['fqEUg'](_0x283e5a,_0x3df864)+_0x4a045e;}return _0x12fc90;}export function stitchWebmFiles(_0x3b478a,_0x1ffb2d){const _0x1a3863=_0x2d89,_0x322977={'mRpIP':function(_0x5f1eaf,_0x212504){return _0x5f1eaf<=_0x212504;},'FusWl':function(_0x30c207,_0x1e6ba){return _0x30c207(_0x1e6ba);},'TkNZZ':function(_0x1722fd,_0x280dce,_0x2cca17,_0x23f506){return _0x1722fd(_0x280dce,_0x2cca17,_0x23f506);},'VZWeS':function(_0x4fdac1,_0x2bf2fc,_0xa9e0cf){return _0x4fdac1(_0x2bf2fc,_0xa9e0cf);}};if(_0x322977['mRpIP'](_0x3b478a[_0x1a3863(0x151)],0x1))return![];const _0x1ce944=[];for(const _0x5ab367 of _0x3b478a){const _0x442974=_0x322977[_0x1a3863(0x13f)](readFileSync,_0x5ab367),_0x5d9dfd=parseWebm(_0x442974);if(!_0x5d9dfd||_0x5d9dfd[_0x1a3863(0x13d)]['length']===0x0)return![];_0x1ce944['push'](_0x5d9dfd);}const _0x1fa2c6=_0x1ce944[0x0],_0x231d77=rebuildHeaderWithoutDuration(_0x1fa2c6['header']),_0x299a15=[_0x231d77];let _0x5b9a10=0x0;for(let _0x5dcf49=0x0;_0x5dcf49<_0x1ce944[_0x1a3863(0x151)];_0x5dcf49++){const _0x188fde=_0x1ce944[_0x5dcf49];for(const _0x1d0509 of _0x188fde['clusters']){const _0x5c49d3=_0x1d0509[_0x1a3863(0x15d)]+_0x5b9a10;_0x299a15[_0x1a3863(0x161)](_0x322977['TkNZZ'](buildCluster,_0x5c49d3,_0x1d0509['bodyBeforeTimestamp'],_0x1d0509['bodyAfterTimestamp']));}const _0x23b7bf=0x1e;_0x5b9a10+=_0x188fde['maxTimestampTicks']+_0x23b7bf;}return _0x322977[_0x1a3863(0x178)](writeFileSync,_0x1ffb2d,Buffer['concat'](_0x299a15)),!![];}if(process[_0x3d958c(0x14a)][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x3d958c(0x162)](_0x3d958c(0x148))){const args=process['argv']['slice'](0x2);args[_0x3d958c(0x151)]<0x3&&(console['error'](_0x3d958c(0x157)),process[_0x3d958c(0x140)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x3d958c(0x13e)+inputs[_0x3d958c(0x151)]+_0x3d958c(0x15c)+output):console[_0x3d958c(0x144)](_0x3d958c(0x142));}
|