@ranger-testing/ranger-cli 3.0.1-alpha.bb18058-34 → 3.0.1-alpha.c0b290b-36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -0
- 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 +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c8113,_0x55771d){const _0x43ecba=_0x2b3b,_0x330a76=_0x3c8113();while(!![]){try{const _0xbc5358=parseInt(_0x43ecba(0x137))/0x1+parseInt(_0x43ecba(0x13d))/0x2*(parseInt(_0x43ecba(0x133))/0x3)+-parseInt(_0x43ecba(0x14e))/0x4*(-parseInt(_0x43ecba(0x147))/0x5)+-parseInt(_0x43ecba(0x149))/0x6+parseInt(_0x43ecba(0x148))/0x7*(parseInt(_0x43ecba(0x161))/0x8)+parseInt(_0x43ecba(0x146))/0x9*(parseInt(_0x43ecba(0x135))/0xa)+-parseInt(_0x43ecba(0x143))/0xb;if(_0xbc5358===_0x55771d)break;else _0x330a76['push'](_0x330a76['shift']());}catch(_0x5762fe){_0x330a76['push'](_0x330a76['shift']());}}}(_0x4ee5,0x4bac3));import{existsSync}from'fs';import _0x390260 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x2b3b(_0x54d9e8,_0x320d03){_0x54d9e8=_0x54d9e8-0x133;const _0x4ee528=_0x4ee5();let _0x2b3b4d=_0x4ee528[_0x54d9e8];return _0x2b3b4d;}import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';function _0x4ee5(){const _0x2ff628=['51150ixqxdM','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','4225660pRqjMs','dupKP','424395mtzyvr','\x20baseUrl\x20<url>','envBaseUrl','cdpEndpoint','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','name','40BCLhBA','local','settings','startPath','list','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','12127489yeEPDL','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','myRrP','9BhyDOp','5BkITLh','3149734kbXSdG','2152380FpzvnH','domains','RANGER_SESSION_STATE_PATH=','ZmBeP','mGMpL','533044ZmbINJ','GshVA','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','source','yZXTO','QRPan','LjUVS','zMdTx','baseUrl','Profile\x20\x22','Local\x20profile','VTfgt','\x20does\x20not\x20exist.','ekQLi','profile','RANGER_TEST_USERNAME','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','TXTxT','ADXBu','8pRJjAM','length','cloud','AJhBm','log','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','env','string'];_0x4ee5=function(){return _0x2ff628;};return _0x4ee5();}export async function resolveProfileContext(_0x736add){const _0x39f39d=_0x2b3b,_0x3424d9={'LyIFv':function(_0x9257d5){return _0x9257d5();},'myRrP':function(_0x56c118,_0x1456bb){return _0x56c118===_0x1456bb;},'yZXTO':function(_0x1ea04a,_0x1f1110){return _0x1ea04a+_0x1f1110;},'mGMpL':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','zMdTx':function(_0x3acaa8,_0x5a6b20){return _0x3acaa8(_0x5a6b20);},'TXTxT':function(_0x4bfd8f,_0x376048){return _0x4bfd8f(_0x376048);},'ZmBeP':function(_0x33af28,_0x5f2cee){return _0x33af28 instanceof _0x5f2cee;},'MFFqg':function(_0x4d75ef,_0x142b18){return _0x4d75ef+_0x142b18;},'QRPan':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','AJhBm':'cloud','LjUVS':_0x39f39d(0x158),'YjMXu':function(_0x1ce483){return _0x1ce483();},'VTfgt':function(_0x44e84e,_0x7f500a){return _0x44e84e(_0x7f500a);},'ekQLi':function(_0x37f910,_0x2dafc9){return _0x37f910(_0x2dafc9);},'ADXBu':function(_0x15f422,_0x167c59){return _0x15f422(_0x167c59);},'GshVA':function(_0x356754,_0x4ada4c,_0x2de1de){return _0x356754(_0x4ada4c,_0x2de1de);},'uYArD':function(_0x35af72,_0x45a3e6){return _0x35af72(_0x45a3e6);}},_0x47cb26=_0x736add['profile'];let _0x5c60cc=_0x736add[_0x39f39d(0x15c)]??await readActiveProfileName(),_0x537044=null;if(!_0x5c60cc&&process[_0x39f39d(0x167)][_0x39f39d(0x15d)]){const _0x1aee3c=await _0x3424d9['LyIFv'](resolveAdHocProfile);_0x1aee3c&&(_0x5c60cc=_0x1aee3c['name'],_0x537044=_0x1aee3c[_0x39f39d(0x15c)]);}if(!_0x5c60cc)try{const _0x866e22=await listCloudProfiles();if(_0x3424d9[_0x39f39d(0x145)](_0x866e22[_0x39f39d(0x162)],0x1)){const _0x43c83e=_0x866e22[0x0];_0x5c60cc=_0x43c83e['name'],console['log'](_0x39f39d(0x166)+_0x43c83e[_0x39f39d(0x13c)]),console[_0x39f39d(0x165)](_0x39f39d(0x144));}}catch{}if(!_0x5c60cc)throw new Error(_0x3424d9['yZXTO'](_0x3424d9['yZXTO'](_0x3424d9[_0x39f39d(0x152)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x39f39d(0x15e)),'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a')+_0x3424d9[_0x39f39d(0x14d)],'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.'));const _0x5b8de2=getEnvDir(_0x5c60cc),_0x20c959=_0x3424d9[_0x39f39d(0x155)](existsSync,_0x5b8de2);let _0x4bead6=_0x537044,_0x493ade=![];if(!_0x4bead6)try{_0x4bead6=await _0x3424d9[_0x39f39d(0x15f)](fetchCloudProfile,_0x5c60cc);if(!_0x4bead6)_0x493ade=!![];}catch(_0x3c6a6d){_0x3424d9[_0x39f39d(0x14c)](_0x3c6a6d,ApiError)&&_0x3c6a6d['status']===0x194&&(_0x493ade=!![]);}if(_0x47cb26&&_0x493ade&&!_0x20c959&&!_0x4bead6)throw new Error(_0x3424d9['yZXTO'](_0x3424d9['MFFqg']('Profile\x20\x22'+_0x47cb26+_0x39f39d(0x13b),_0x39f39d(0x142)),_0x3424d9[_0x39f39d(0x153)]));if(_0x4bead6&&_0x20c959){let _0x5ed2b7=!![];if(isInteractive()){const {source:_0x4c3e3d}=await _0x390260['prompt']([{'type':_0x39f39d(0x141),'name':_0x39f39d(0x151),'message':_0x39f39d(0x157)+_0x5c60cc+_0x39f39d(0x134),'choices':[{'name':'Cloud\x20profile\x20(recommended)','value':_0x3424d9[_0x39f39d(0x164)]},{'name':_0x3424d9[_0x39f39d(0x154)],'value':_0x39f39d(0x13e)}],'default':_0x39f39d(0x163)}]);_0x5ed2b7=_0x3424d9['myRrP'](_0x4c3e3d,_0x3424d9[_0x39f39d(0x164)]);}if(!_0x5ed2b7)_0x4bead6=null;}const _0xfa8f6d=readProfileOverrides(process['cwd'](),_0x5c60cc);let _0x4bf965=null,_0x5dad7a,_0x37268a,_0x1db04,_0x4520ce,_0x46a57c=null,_0x564a23;const _0x4a318b=expandOverrides(_0xfa8f6d),_0x3a3334=_0x3424d9['YjMXu'](readUrlEnvVars);if(_0x4bead6){_0x4bf965=_0x4bead6;const _0x1952eb=_0x4bead6[_0x39f39d(0x13f)]??{},_0x12a482=mergeCloudProfileSettings(_0x1952eb,_0xfa8f6d??undefined),_0x119e21={..._0x4bead6,'settings':_0x12a482};_0x46a57c={'baseUrl':_0x3424d9[_0x39f39d(0x159)](expandString,_0x1952eb['baseUrl']),'startPath':expandString(_0x1952eb[_0x39f39d(0x140)])};const _0x49a4be=await fetchAuthConfig(),_0x4824e5=_0x49a4be?resolveAuthEnvironmentLocally(_0x49a4be,_0x4bead6['environmentKey']):null;_0x564a23=_0x4824e5?.[_0x39f39d(0x14a)]?.[0x0];const _0x5bdb43=resolveProfileUrl({'flagBaseUrl':_0x736add['baseUrl'],'flagStartPath':_0x736add['startPath'],'envBaseUrl':_0x3a3334[_0x39f39d(0x139)],'envStartPath':_0x3a3334['envStartPath'],'projectOverrides':_0x4a318b,'cloudSettings':_0x46a57c,'authEnvironmentDomain':_0x564a23}),_0x29ec8b=process[_0x39f39d(0x167)]['RANGER_SESSION_STATE_PATH'];if(_0x29ec8b){if(!_0x3424d9[_0x39f39d(0x15b)](existsSync,_0x29ec8b))throw new Error(_0x39f39d(0x14b)+_0x29ec8b+_0x39f39d(0x15a));_0x5dad7a=_0x29ec8b,_0x37268a=_0x3424d9['ADXBu'](resolveEnvVars,_0x12a482),_0x1db04=_0x3424d9['ekQLi'](Boolean,_0x37268a[_0x39f39d(0x13a)]);}else{const _0x31e99e=await _0x3424d9[_0x39f39d(0x14f)](resolveCloudProfileSession,_0x119e21,{'effectiveBaseUrl':_0x5bdb43[_0x39f39d(0x156)]});_0x5dad7a=_0x31e99e['authPath'],_0x37268a=resolveEnvVars(_0x31e99e[_0x39f39d(0x13f)]),_0x1db04=Boolean(_0x37268a['cdpEndpoint']),_0x564a23=_0x31e99e['resolvedEnv']?.[_0x39f39d(0x14a)]?.[0x0];}}else{if(!_0x20c959)throw new Error('Profile\x20\x22'+_0x5c60cc+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x5c60cc);const _0x577fc2=await _0x3424d9[_0x39f39d(0x160)](loadSettings,_0x5c60cc);_0x37268a=resolveEnvVars(_0x577fc2),_0x1db04=_0x3424d9[_0x39f39d(0x15b)](Boolean,_0x37268a[_0x39f39d(0x13a)]),_0x4520ce=_0x37268a['baseUrl'];}const _0x187a3a=_0x3424d9['uYArD'](resolveProfileUrl,{'flagBaseUrl':_0x736add[_0x39f39d(0x156)],'flagStartPath':_0x736add['startPath'],'envBaseUrl':_0x3a3334[_0x39f39d(0x139)],'envStartPath':_0x3a3334['envStartPath'],'localSettingsBaseUrl':_0x4520ce,'projectOverrides':_0x4a318b,'cloudSettings':_0x46a57c,'authEnvironmentDomain':_0x564a23}),_0x167ab9=_0x187a3a['url']??_0x187a3a['baseUrl'];if(!_0x167ab9&&!_0x1db04)throw new Error(_0x39f39d(0x150)+_0x5c60cc+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x5c60cc+_0x39f39d(0x138));return{'activeProfile':_0x5c60cc,'resolvedCloudProfile':_0x4bf965,'cloudAuthPath':_0x5dad7a,'resolvedSettings':_0x37268a,'isCdpMode':_0x1db04,'url':_0x167ab9,'startPath':_0x187a3a['startPath']};}function expandString(_0x317fc2){const _0x2ba990=_0x2b3b,_0x13bb0d={'SXhkF':function(_0x47b25f,_0x3f6525){return _0x47b25f!==_0x3f6525;},'VEjLj':function(_0x1f7d8b,_0x46b765){return _0x1f7d8b(_0x46b765);}};if(_0x13bb0d['SXhkF'](typeof _0x317fc2,_0x2ba990(0x168)))return _0x317fc2;return _0x13bb0d['VEjLj'](resolveEnvVars,_0x317fc2);}function expandOverrides(_0x4e7e95){const _0x3b3ced=_0x2b3b,_0xbea8fe={'lBzHB':function(_0x2177a5,_0x46330d){return _0x2177a5===_0x46330d;},'dupKP':_0x3b3ced(0x168),'osIfh':function(_0x284eb3,_0xdca657){return _0x284eb3(_0xdca657);}};if(!_0x4e7e95)return _0x4e7e95;const _0x72525a={..._0x4e7e95};return _0xbea8fe['lBzHB'](typeof _0x72525a['baseUrl'],_0xbea8fe[_0x3b3ced(0x136)])&&(_0x72525a[_0x3b3ced(0x156)]=resolveEnvVars(_0x72525a[_0x3b3ced(0x156)])),typeof _0x72525a[_0x3b3ced(0x140)]===_0xbea8fe['dupKP']&&(_0x72525a[_0x3b3ced(0x140)]=_0xbea8fe['osIfh'](resolveEnvVars,_0x72525a[_0x3b3ced(0x140)])),_0x72525a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x25694f=_0x23e0;(function(_0x27bc9a,_0x7271c7){const _0x2ae9ef=_0x23e0,_0x3f286b=_0x27bc9a();while(!![]){try{const _0x4d318f=-parseInt(_0x2ae9ef(0x1d2))/0x1+parseInt(_0x2ae9ef(0x1c5))/0x2*(-parseInt(_0x2ae9ef(0x1b6))/0x3)+parseInt(_0x2ae9ef(0x1b4))/0x4+parseInt(_0x2ae9ef(0x1ba))/0x5+parseInt(_0x2ae9ef(0x1c1))/0x6*(parseInt(_0x2ae9ef(0x1c9))/0x7)+parseInt(_0x2ae9ef(0x1c2))/0x8*(-parseInt(_0x2ae9ef(0x1c7))/0x9)+parseInt(_0x2ae9ef(0x1b7))/0xa*(parseInt(_0x2ae9ef(0x1ce))/0xb);if(_0x4d318f===_0x7271c7)break;else _0x3f286b['push'](_0x3f286b['shift']());}catch(_0x1341cc){_0x3f286b['push'](_0x3f286b['shift']());}}}(_0x4a74,0x1a0c1));function _0x4a74(){const _0x33505d=['ZKOjU','8ahrCZV','DnyRP','60111DmVIjk','localSettingsBaseUrl','112KmbcNF','rmdTl','RANGER_START_PATH','startsWith','projectOverrides','33YLxmzD','HqWKu','flagStartPath','aOUtt','115084YMOCbI','syFTZ','envBaseUrl','envStartPath','203220YfZgjg','endsWith','28182BJDWhI','204810PHBrOK','string','flagBaseUrl','175820bdSVSu','startPath','iQXxO','RANGER_BASE_URL','env','KRRLx','JbVoe','64518qfXGow','72YMGYiZ','baseUrl'];_0x4a74=function(){return _0x33505d;};return _0x4a74();}function _0x23e0(_0x339319,_0x2e907b){_0x339319=_0x339319-0x1b2;const _0x4a74ba=_0x4a74();let _0x23e047=_0x4a74ba[_0x339319];return _0x23e047;}function firstDefined(..._0x44eddd){const _0x545f07=_0x23e0,_0x22bd41={'NRRwY':function(_0xd30ebd,_0x5872d2){return _0xd30ebd!==_0x5872d2;},'iQXxO':function(_0x4da7a0,_0x335648){return _0x4da7a0!==_0x335648;}};for(const _0xedcf90 of _0x44eddd){if(_0xedcf90!==undefined&&_0x22bd41['NRRwY'](_0xedcf90,null)&&_0x22bd41[_0x545f07(0x1bc)](_0xedcf90,''))return _0xedcf90;}return undefined;}function normalizeAuthEnvironmentDomain(_0x720646){if(!_0x720646)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x720646))return _0x720646;return'https://'+_0x720646;}export function resolveBaseUrl(_0x2b76a1){const _0x2018da=_0x23e0,_0x153b6d={'rmdTl':function(_0x46d3aa,_0x456ec0){return _0x46d3aa===_0x456ec0;},'KRRLx':function(_0x4ba3f2,_0x4b57d4,_0x3c7fbd,_0x58eeec,_0x47a2bc,_0x1ca051,_0x1fb3b0){return _0x4ba3f2(_0x4b57d4,_0x3c7fbd,_0x58eeec,_0x47a2bc,_0x1ca051,_0x1fb3b0);},'JbVoe':function(_0x1a6214,_0xc7371){return _0x1a6214===_0xc7371;}},_0x59013c=_0x2b76a1[_0x2018da(0x1cd)],_0x3b0c7d=!!_0x59013c&&_0x2018da(0x1c3)in _0x59013c,_0xa8e026=_0x59013c?.[_0x2018da(0x1c3)],_0x168921=!(_0x3b0c7d&&_0x153b6d[_0x2018da(0x1ca)](_0xa8e026,null));return _0x153b6d[_0x2018da(0x1bf)](firstDefined,_0x2b76a1[_0x2018da(0x1b9)],_0x2b76a1[_0x2018da(0x1b2)],_0x2b76a1[_0x2018da(0x1c8)],_0x153b6d[_0x2018da(0x1c0)](typeof _0xa8e026,_0x2018da(0x1b8))?_0xa8e026:undefined,_0x168921?_0x2b76a1['cloudSettings']?.[_0x2018da(0x1c3)]:undefined,_0x168921?normalizeAuthEnvironmentDomain(_0x2b76a1['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x2cf3dd){const _0x533c5b=_0x23e0,_0x1a3309={'ZKOjU':_0x533c5b(0x1bb),'syFTZ':function(_0x5af260,_0x2aba06){return _0x5af260===_0x2aba06;},'HqWKu':function(_0x5ba279,_0x190068,_0x148114,_0x1c325d,_0x2a3dfd){return _0x5ba279(_0x190068,_0x148114,_0x1c325d,_0x2a3dfd);}},_0xfff946=_0x2cf3dd[_0x533c5b(0x1cd)],_0xbbf188=!!_0xfff946&&_0x1a3309[_0x533c5b(0x1c4)]in _0xfff946,_0x139715=_0xfff946?.[_0x533c5b(0x1bb)],_0x581444=!(_0xbbf188&&_0x1a3309[_0x533c5b(0x1d3)](_0x139715,null));return _0x1a3309[_0x533c5b(0x1cf)](firstDefined,_0x2cf3dd[_0x533c5b(0x1d0)],_0x2cf3dd[_0x533c5b(0x1b3)],_0x1a3309['syFTZ'](typeof _0x139715,_0x533c5b(0x1b8))?_0x139715:undefined,_0x581444?_0x2cf3dd['cloudSettings']?.['startPath']:undefined);}export function joinBaseAndPath(_0x33b6d3,_0x41b866){const _0x599694=_0x23e0;if(!_0x33b6d3)return undefined;if(!_0x41b866)return _0x33b6d3;const _0xa19925=_0x33b6d3[_0x599694(0x1b5)]('/')?_0x33b6d3['slice'](0x0,-0x1):_0x33b6d3,_0x4246b5=_0x41b866[_0x599694(0x1cc)]('/')?_0x41b866:'/'+_0x41b866;return _0xa19925+_0x4246b5;}export function resolveProfileUrl(_0x1c6e04){const _0x28d489=_0x23e0,_0x408224={'aOUtt':function(_0x20a58c,_0x19b887){return _0x20a58c(_0x19b887);},'DnyRP':function(_0x5ead72,_0x5de426,_0x168c9e){return _0x5ead72(_0x5de426,_0x168c9e);}},_0xa2ad88=_0x408224[_0x28d489(0x1d1)](resolveBaseUrl,_0x1c6e04),_0xb32e97=resolveStartPath(_0x1c6e04);return{'baseUrl':_0xa2ad88,'startPath':_0xb32e97,'url':_0x408224[_0x28d489(0x1c6)](joinBaseAndPath,_0xa2ad88,_0xb32e97)};}export function readUrlEnvVars(_0x19eebe=process[_0x25694f(0x1be)]){const _0x274ebc=_0x25694f;return{'envBaseUrl':_0x19eebe[_0x274ebc(0x1bd)],'envStartPath':_0x19eebe[_0x274ebc(0x1cb)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f85d7,_0xd4ab6){const _0x1226ea=_0xd8bc,_0x25b38e=_0x3f85d7();while(!![]){try{const _0x43db97=-parseInt(_0x1226ea(0x153))/0x1+parseInt(_0x1226ea(0x151))/0x2+parseInt(_0x1226ea(0x152))/0x3+-parseInt(_0x1226ea(0x156))/0x4*(-parseInt(_0x1226ea(0x15e))/0x5)+parseInt(_0x1226ea(0x15b))/0x6+-parseInt(_0x1226ea(0x15a))/0x7+-parseInt(_0x1226ea(0x155))/0x8*(parseInt(_0x1226ea(0x15c))/0x9);if(_0x43db97===_0xd4ab6)break;else _0x25b38e['push'](_0x25b38e['shift']());}catch(_0x552477){_0x25b38e['push'](_0x25b38e['shift']());}}}(_0x2614,0x404c4));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0xd8bc(_0x5b2018,_0x594bb5){_0x5b2018=_0x5b2018-0x150;const _0x26142d=_0x2614();let _0xd8bc1f=_0x26142d[_0x5b2018];return _0xd8bc1f;}export async function withRetry(_0xe65a04,_0x580837){const _0x4a9db0=_0xd8bc,_0x97ab90={'BvPVs':function(_0xe4a4d6,_0x970443){return _0xe4a4d6<=_0x970443;},'TjjGC':function(_0x44db33){return _0x44db33();},'FwZxt':function(_0xb96820,_0x1d11ff){return _0xb96820<_0x1d11ff;},'dBlmr':function(_0x100edd,_0x1c1cf9){return _0x100edd+_0x1c1cf9;}},_0x1eeff8=_0x580837?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x586273=_0x580837?.[_0x4a9db0(0x154)]??DEFAULT_BASE_DELAY_MS;let _0xe22694;for(let _0x4b7823=0x0;_0x97ab90[_0x4a9db0(0x159)](_0x4b7823,_0x1eeff8);_0x4b7823++){try{return await _0x97ab90['TjjGC'](_0xe65a04);}catch(_0x559f51){_0xe22694=_0x559f51 instanceof Error?_0x559f51:new Error(String(_0x559f51));if(_0x97ab90['FwZxt'](_0x4b7823,_0x1eeff8)){const _0x41bb3b=_0x586273*Math['pow'](0x2,_0x4b7823);_0x580837?.['label']&&console[_0x4a9db0(0x158)](_0x580837['label']+_0x4a9db0(0x157)+_0x97ab90[_0x4a9db0(0x15d)](_0x4b7823,0x1)+'/'+(_0x1eeff8+0x1)+_0x4a9db0(0x150)+_0x41bb3b+'ms...'),await new Promise(_0x3d824f=>setTimeout(_0x3d824f,_0x41bb3b));}}}throw _0xe22694;}function _0x2614(){const _0x16b903=['\x20failed\x20(attempt\x20','error','BvPVs','2578478KmwYUR','141876wiDkTl','7803QGZEVD','dBlmr','1666545ropsvB','),\x20retrying\x20in\x20','377490RAtmWN','1075776jORjoH','269973KsZmWI','baseDelayMs','24DofdXO','4NuXSfo'];_0x2614=function(){return _0x16b903;};return _0x2614();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x582ff1=_0x1586;(function(_0x24333c,_0x57c671){const _0x58a672=_0x1586,_0x4df608=_0x24333c();while(!![]){try{const _0x1fbda0=-parseInt(_0x58a672(0x90))/0x1*(-parseInt(_0x58a672(0x88))/0x2)+-parseInt(_0x58a672(0xa5))/0x3*(parseInt(_0x58a672(0x73))/0x4)+-parseInt(_0x58a672(0x87))/0x5*(parseInt(_0x58a672(0x98))/0x6)+parseInt(_0x58a672(0x7b))/0x7*(-parseInt(_0x58a672(0xa0))/0x8)+-parseInt(_0x58a672(0x95))/0x9*(parseInt(_0x58a672(0x7d))/0xa)+parseInt(_0x58a672(0x7e))/0xb+parseInt(_0x58a672(0xaa))/0xc;if(_0x1fbda0===_0x57c671)break;else _0x4df608['push'](_0x4df608['shift']());}catch(_0x2d179c){_0x4df608['push'](_0x4df608['shift']());}}}(_0x3308,0xb4e64));import*as _0x32d4d2 from'fs';import*as _0x16497f from'path';import*as _0x48cda2 from'os';function _0x1586(_0xc8c32e,_0x2fe24b){_0xc8c32e=_0xc8c32e-0x6f;const _0x3308b8=_0x3308();let _0x1586b1=_0x3308b8[_0xc8c32e];return _0x1586b1;}function _0x3308(){const _0x30b62e=['wrZLQ','lastEnabledSessionClearedAt','zSldp','enabled','1119moXTdH','master','readFileSync','Xvwid','mqtJI','45207120EgjnxR','prompted','pipe','ZzgWx','mRQbo','dirname','11084YjTHvk','utf-8','parse','branches','RlmBK','qEhPi','main','JYTez','28JxPKOz','homedir','4478990IVfNmX','12458435pREFIX','currentBranch','now','mkdirSync','stringify','sessions','BoKyM','wQbLw','existsSync','5CvoWDD','376490kAKoJv','featureId','tZdAO','wiUaY','IZmSy','lastStopReminderAt','FFruW','xxccN','3kQEEWH','WnWcA','LqbBE','writeFileSync','join','18GKEbXZ','HEAD','registeredAt','8176722JBMukh','JMXvT','upjVO','QSUog','clear','gVRaG','rnyRZ','txllG','2862896VgbXUA'];_0x3308=function(){return _0x30b62e;};return _0x3308();}import{execSync}from'child_process';const CACHE_FILE=_0x16497f[_0x582ff1(0x94)](_0x48cda2[_0x582ff1(0x7c)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x55d9b3=_0x582ff1;try{if(_0x32d4d2[_0x55d9b3(0x86)](CACHE_FILE)){const _0x16c992=JSON[_0x55d9b3(0x75)](_0x32d4d2[_0x55d9b3(0xa7)](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x16c992[_0x55d9b3(0x83)]||{},'branches':_0x16c992['branches']||{},'lastEnabledSessionClearedAt':_0x16c992[_0x55d9b3(0xa2)]};}}catch{}return createEmptyCache();}function saveCache(_0x42425c){const _0x5602d7=_0x582ff1;try{const _0x4f9b85=_0x16497f[_0x5602d7(0x72)](CACHE_FILE);!_0x32d4d2['existsSync'](_0x4f9b85)&&_0x32d4d2[_0x5602d7(0x81)](_0x4f9b85,{'recursive':!![]}),_0x32d4d2[_0x5602d7(0x93)](CACHE_FILE,JSON[_0x5602d7(0x82)](_0x42425c,null,0x2));}catch{}}export function getCurrentBranch(){const _0x107c11=_0x582ff1,_0x564c66={'wrZLQ':function(_0x51612f,_0x45ef49,_0x17ce9e){return _0x51612f(_0x45ef49,_0x17ce9e);},'Xvwid':_0x107c11(0x74),'PHjzt':_0x107c11(0x6f),'LqbBE':function(_0x259000,_0x6a6a7f){return _0x259000===_0x6a6a7f;}};try{const _0x574332=_0x564c66[_0x107c11(0xa1)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x564c66[_0x107c11(0xa8)],'stdio':[_0x564c66['PHjzt'],'pipe','pipe']})['trim']();if(!_0x574332||_0x564c66[_0x107c11(0x92)](_0x574332,_0x107c11(0x96)))return null;return _0x574332;}catch{return null;}}export function enableBranch(_0x3d8bb2){const _0x888178=_0x582ff1,_0x41bf4e={'wQbLw':function(_0xfbe02a,_0x2587b5){return _0xfbe02a(_0x2587b5);}},_0x1f5f3f=loadCache();_0x1f5f3f[_0x888178(0x76)][_0x3d8bb2]=!![],_0x41bf4e[_0x888178(0x85)](saveCache,_0x1f5f3f);}export function disableBranch(_0x2c7d23){const _0x6d6b61=_0x582ff1,_0x362ffc={'tZdAO':function(_0x235c3f){return _0x235c3f();}},_0x4472d0=_0x362ffc[_0x6d6b61(0x8a)](loadCache);delete _0x4472d0[_0x6d6b61(0x76)][_0x2c7d23],saveCache(_0x4472d0);}export function isBranchEnabled(_0x14284c){const _0x5105c3=_0x582ff1,_0x35c6b7=loadCache();return _0x35c6b7[_0x5105c3(0x76)][_0x14284c]===!![];}function getOrCreateSession(_0x2f76e8,_0x2c232c){const _0xfa0e28=_0x582ff1;return!_0x2f76e8[_0xfa0e28(0x83)][_0x2c232c]&&(_0x2f76e8['sessions'][_0x2c232c]={}),_0x2f76e8['sessions'][_0x2c232c];}export function enableSession(_0x1f1316){const _0x242d85=_0x582ff1,_0x131839={'UDVZQ':function(_0x2625d2,_0x594bc3){return _0x2625d2!==_0x594bc3;},'gVRaG':_0x242d85(0x79),'gdePp':'master','rnyRZ':function(_0xa7e7dc,_0xba66f9){return _0xa7e7dc(_0xba66f9);}},_0x5130f7=loadCache(),_0x355c0c=getOrCreateSession(_0x5130f7,_0x1f1316);_0x355c0c['enabled']=!![];const _0x348fa9=getCurrentBranch();_0x348fa9&&_0x131839['UDVZQ'](_0x348fa9,_0x131839[_0x242d85(0x9d)])&&_0x131839['UDVZQ'](_0x348fa9,_0x131839['gdePp'])&&(_0x5130f7[_0x242d85(0x76)][_0x348fa9]=!![],_0x355c0c['currentBranch']=_0x348fa9),_0x131839[_0x242d85(0x9e)](saveCache,_0x5130f7);}export function isSessionEnabled(_0x34434d){const _0x75b4c=_0x582ff1,_0x4730d1={'ZzgWx':function(_0x3935f9,_0x34f8b7){return _0x3935f9===_0x34f8b7;},'WnWcA':function(_0x17d520,_0x17154d){return _0x17d520||_0x17154d;}},_0x1af731=loadCache(),_0xdc59a3=getCurrentBranch();if(!_0xdc59a3||_0x4730d1[_0x75b4c(0x70)](_0xdc59a3,_0x75b4c(0x79))||_0x4730d1[_0x75b4c(0x70)](_0xdc59a3,_0x75b4c(0xa6)))return _0x1af731['sessions'][_0x34434d]?.['enabled']===!![];const _0x275504=_0x1af731['branches'][_0xdc59a3]===!![],_0x581678=_0x1af731[_0x75b4c(0x83)][_0x34434d]?.[_0x75b4c(0xa4)]===!![];return _0x4730d1[_0x75b4c(0x91)](_0x275504,_0x581678);}export function disableSession(_0x4a46cc){const _0xb049bc=_0x582ff1,_0x416a47={'RymEA':function(_0x2c08f2,_0x1afe5f){return _0x2c08f2(_0x1afe5f);}},_0x1a1bfa=loadCache(),_0x746684=getOrCreateSession(_0x1a1bfa,_0x4a46cc);_0x746684[_0xb049bc(0xa4)]=![],_0x416a47['RymEA'](saveCache,_0x1a1bfa);}export function updateBranchTracking(_0x5c11a5){const _0x2b84b7=_0x582ff1,_0x50fe37={'nnAhv':function(_0x2363d8){return _0x2363d8();},'qEhPi':function(_0x26a538,_0x141894){return _0x26a538===_0x141894;},'JMXvT':function(_0x430b66,_0xa9e0e5){return _0x430b66===_0xa9e0e5;}},_0x215d3b=_0x50fe37['nnAhv'](loadCache),_0x994a36=_0x215d3b[_0x2b84b7(0x83)][_0x5c11a5];if(!_0x994a36?.['enabled'])return;const _0x244dcb=getCurrentBranch();if(!_0x244dcb||_0x50fe37[_0x2b84b7(0x78)](_0x244dcb,'main')||_0x50fe37[_0x2b84b7(0x99)](_0x244dcb,_0x2b84b7(0xa6)))return;_0x994a36[_0x2b84b7(0x7f)]!==_0x244dcb&&(_0x215d3b['branches'][_0x244dcb]=!![],_0x994a36[_0x2b84b7(0x7f)]=_0x244dcb,saveCache(_0x215d3b));}export function initBranchTracking(_0x59be4e){const _0x2f129e=_0x582ff1,_0x2d1f4a={'upjVO':function(_0x52244a){return _0x52244a();},'mqtJI':function(_0x5b7f23,_0x239c62){return _0x5b7f23===_0x239c62;},'sXMDB':_0x2f129e(0x79),'gmUDp':_0x2f129e(0xa6),'xxccN':function(_0x5b0e1f,_0x2c77c5){return _0x5b0e1f===_0x2c77c5;}},_0x4fafb7=_0x2d1f4a[_0x2f129e(0x9a)](loadCache),_0x5a6055=getCurrentBranch();if(!_0x5a6055||_0x2d1f4a['mqtJI'](_0x5a6055,_0x2d1f4a['sXMDB'])||_0x2d1f4a[_0x2f129e(0xa9)](_0x5a6055,_0x2d1f4a['gmUDp']))return;if(_0x2d1f4a[_0x2f129e(0x8f)](_0x4fafb7[_0x2f129e(0x76)][_0x5a6055],!![])){const _0xf7b37b=getOrCreateSession(_0x4fafb7,_0x59be4e);_0xf7b37b[_0x2f129e(0xa4)]=!![],_0xf7b37b[_0x2f129e(0x7f)]=_0x5a6055,saveCache(_0x4fafb7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2df59c){const _0x202e5c=_0x582ff1,_0x3bcf02={'zANhT':function(_0x49ac54){return _0x49ac54();}},_0x22bcc7=_0x3bcf02['zANhT'](loadCache),_0x1cd4d4=_0x22bcc7[_0x202e5c(0x83)][_0x2df59c];_0x1cd4d4?.['enabled']&&(_0x22bcc7['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x22bcc7));}export function shouldAutoEnableAfterClear(_0xf40649){const _0x14b44e=_0x582ff1,_0x4fc3f4={'xMUif':_0x14b44e(0x9c),'JYTez':function(_0x3a14f1){return _0x3a14f1();},'wiUaY':function(_0x51635c,_0x4dc4e7){return _0x51635c-_0x4dc4e7;},'kKbAK':function(_0x2d1987,_0x408e5b){return _0x2d1987<=_0x408e5b;}};if(_0xf40649!==_0x4fc3f4['xMUif'])return![];const _0x44b82b=_0x4fc3f4[_0x14b44e(0x7a)](loadCache),_0x471f45=_0x44b82b['lastEnabledSessionClearedAt'];if(!_0x471f45)return![];const _0x4eff40=_0x4fc3f4[_0x14b44e(0x8b)](Date[_0x14b44e(0x80)](),_0x471f45);return _0x4fc3f4['kKbAK'](_0x4eff40,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x35c2ec){const _0x179b57=_0x582ff1,_0x183230={'GXcHe':function(_0x2e3e2b){return _0x2e3e2b();},'FFruW':function(_0x1f3902,_0x9fd5a8){return _0x1f3902!==_0x9fd5a8;},'celeO':'main','txllG':'master','AJqqZ':function(_0x1f1418,_0xb73a54){return _0x1f1418(_0xb73a54);}},_0x32b8da=loadCache(),_0x1c38d9=getOrCreateSession(_0x32b8da,_0x35c2ec);_0x1c38d9['enabled']=!![];const _0x246c5c=_0x183230['GXcHe'](getCurrentBranch);_0x246c5c&&_0x183230[_0x179b57(0x8e)](_0x246c5c,_0x183230['celeO'])&&_0x246c5c!==_0x183230[_0x179b57(0x9f)]&&(_0x1c38d9[_0x179b57(0x7f)]=_0x246c5c),delete _0x32b8da['lastEnabledSessionClearedAt'],_0x183230['AJqqZ'](saveCache,_0x32b8da);}export function registerSession(_0x29e987,_0x5a36c7){const _0x1fea3b=_0x582ff1,_0x866d80={'XMfES':function(_0x5e85b8){return _0x5e85b8();},'RlmBK':function(_0x479de5,_0x121dc0,_0x41aece){return _0x479de5(_0x121dc0,_0x41aece);},'YBZlh':function(_0x2097c3,_0x139535){return _0x2097c3(_0x139535);}},_0xc3389a=_0x866d80['XMfES'](loadCache),_0x37081c=_0x866d80[_0x1fea3b(0x77)](getOrCreateSession,_0xc3389a,_0x29e987);_0x37081c[_0x1fea3b(0x89)]=_0x5a36c7,_0x37081c[_0x1fea3b(0x97)]=new Date()['toISOString'](),_0x866d80['YBZlh'](saveCache,_0xc3389a);}export function getSessionEntry(_0x19a7ab){const _0x5db3b7=_0x582ff1,_0x12c138=loadCache(),_0x2848d8=_0x12c138['sessions'][_0x19a7ab];if(_0x2848d8?.['featureId']&&_0x2848d8?.[_0x5db3b7(0x97)])return{'featureId':_0x2848d8['featureId'],'registeredAt':_0x2848d8['registeredAt']};return null;}export function unregisterSession(_0xf620f8){const _0x5e008e=_0x582ff1,_0x11c36f={'BoKyM':function(_0x46374e,_0x24f888){return _0x46374e(_0x24f888);}},_0x270f5d=loadCache(),_0x45f129=_0x270f5d[_0x5e008e(0x83)][_0xf620f8];_0x45f129&&(delete _0x45f129[_0x5e008e(0x89)],delete _0x45f129['registeredAt'],_0x11c36f[_0x5e008e(0x84)](saveCache,_0x270f5d));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x110a4f){const _0x19b258=_0x582ff1,_0x9cdf11={'QSUog':function(_0x490542){return _0x490542();},'yIbBN':function(_0x301d34,_0x17cd29){return _0x301d34>=_0x17cd29;}},_0x4f39bb=_0x9cdf11[_0x19b258(0x9b)](loadCache),_0x1219b8=getOrCreateSession(_0x4f39bb,_0x110a4f),_0x4a3b02=_0x1219b8['lastPlanReminderAt']||0x0,_0x4626dd=Date[_0x19b258(0x80)]();if(_0x9cdf11['yIbBN'](_0x4626dd-_0x4a3b02,PLAN_REMINDER_INTERVAL_MS))return _0x1219b8['lastPlanReminderAt']=_0x4626dd,saveCache(_0x4f39bb),!![];return![];}export function shouldShowStopReminder(_0x228ba7){const _0x3dfaa2=_0x582ff1,_0x5ce397={'UucKS':function(_0x4abb13){return _0x4abb13();},'IZmSy':function(_0x35ceee,_0x33bd04,_0x3f5feb){return _0x35ceee(_0x33bd04,_0x3f5feb);},'zSldp':function(_0x33fe18,_0x3e4296){return _0x33fe18>=_0x3e4296;}},_0x998501=_0x5ce397['UucKS'](loadCache),_0x1e3a5f=_0x5ce397[_0x3dfaa2(0x8c)](getOrCreateSession,_0x998501,_0x228ba7),_0x4d066e=_0x1e3a5f[_0x3dfaa2(0x8d)]||0x0,_0x677157=Date['now']();if(_0x5ce397[_0x3dfaa2(0xa3)](_0x677157-_0x4d066e,STOP_REMINDER_INTERVAL_MS))return _0x1e3a5f['lastStopReminderAt']=_0x677157,saveCache(_0x998501),!![];return![];}export function hasSessionBeenPrompted(_0x5e5b3b){const _0x2458b6=_0x582ff1,_0x382888=loadCache();return _0x382888[_0x2458b6(0x83)][_0x5e5b3b]?.['prompted']===!![];}export function markSessionPrompted(_0x1865da){const _0x5e61ba=_0x582ff1,_0x50f9ef={'mRQbo':function(_0x289eb7){return _0x289eb7();},'whIBn':function(_0x211e32,_0x4ab414){return _0x211e32(_0x4ab414);}},_0x5d4827=_0x50f9ef[_0x5e61ba(0x71)](loadCache),_0x1f8aee=getOrCreateSession(_0x5d4827,_0x1865da);_0x1f8aee[_0x5e61ba(0xab)]=!![],_0x50f9ef['whIBn'](saveCache,_0x5d4827);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x23dc31=_0x31c9;(function(_0x205446,_0x4b525f){const _0x357bbc=_0x31c9,_0x326cc9=_0x205446();while(!![]){try{const _0xa2af29=-parseInt(_0x357bbc(0x118))/0x1*(-parseInt(_0x357bbc(0xe8))/0x2)+parseInt(_0x357bbc(0x11a))/0x3*(-parseInt(_0x357bbc(0xf3))/0x4)+-parseInt(_0x357bbc(0xf8))/0x5*(parseInt(_0x357bbc(0x103))/0x6)+parseInt(_0x357bbc(0xfd))/0x7*(-parseInt(_0x357bbc(0x104))/0x8)+parseInt(_0x357bbc(0x113))/0x9+parseInt(_0x357bbc(0x116))/0xa*(parseInt(_0x357bbc(0xe4))/0xb)+-parseInt(_0x357bbc(0x10b))/0xc;if(_0xa2af29===_0x4b525f)break;else _0x326cc9['push'](_0x326cc9['shift']());}catch(_0x2bf09a){_0x326cc9['push'](_0x326cc9['shift']());}}}(_0x20a9,0x2399e));import*as _0x84c60d from'fs';function _0x31c9(_0x205deb,_0x220696){_0x205deb=_0x205deb-0xe4;const _0x20a925=_0x20a9();let _0x31c90b=_0x20a925[_0x205deb];return _0x31c90b;}import*as _0x1e52ca from'path';import*as _0x40d74e from'os';import{execSync}from'child_process';const CACHE_FILE=_0x1e52ca[_0x23dc31(0x110)](_0x40d74e[_0x23dc31(0x100)](),_0x23dc31(0x10a),_0x23dc31(0x111));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x53dd6a=_0x23dc31,_0xc584c9={'wgIrW':_0x53dd6a(0x108),'WlUZL':function(_0x5c2064){return _0x5c2064();}};try{if(_0x84c60d['existsSync'](CACHE_FILE)){const _0x1d230f=JSON['parse'](_0x84c60d['readFileSync'](CACHE_FILE,_0xc584c9[_0x53dd6a(0xea)]));return{'version':0x3,'sessions':_0x1d230f['sessions']||{},'branches':_0x1d230f[_0x53dd6a(0x112)]||{},'lastEnabledSessionClearedAt':_0x1d230f['lastEnabledSessionClearedAt']};}}catch{}return _0xc584c9[_0x53dd6a(0x11b)](createEmptyCache);}function saveCache(_0x135e84){const _0x3b80fb=_0x23dc31;try{const _0x2ba4e1=_0x1e52ca[_0x3b80fb(0x119)](CACHE_FILE);!_0x84c60d['existsSync'](_0x2ba4e1)&&_0x84c60d['mkdirSync'](_0x2ba4e1,{'recursive':!![]}),_0x84c60d['writeFileSync'](CACHE_FILE,JSON[_0x3b80fb(0xe9)](_0x135e84,null,0x2));}catch{}}export function getCurrentBranch(){const _0x53f2de=_0x23dc31,_0x2919c9={'mUffC':'utf-8','fQHsm':'pipe','RhKbz':function(_0x2ef14c,_0x3f7d30){return _0x2ef14c===_0x3f7d30;}};try{const _0x2ae50f=execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x2919c9['mUffC'],'stdio':[_0x2919c9[_0x53f2de(0x109)],_0x53f2de(0x10c),_0x2919c9[_0x53f2de(0x109)]]})[_0x53f2de(0xf9)]();if(!_0x2ae50f||_0x2919c9[_0x53f2de(0x106)](_0x2ae50f,_0x53f2de(0x105)))return null;return _0x2ae50f;}catch{return null;}}export function enableBranch(_0x1bd141){const _0x544e44=loadCache();_0x544e44['branches'][_0x1bd141]=!![],saveCache(_0x544e44);}export function disableBranch(_0x432a2f){const _0x4b03e2=_0x23dc31,_0x45360a={'BadLe':function(_0x26496f,_0x1fe736){return _0x26496f(_0x1fe736);}},_0x153a83=loadCache();delete _0x153a83['branches'][_0x432a2f],_0x45360a[_0x4b03e2(0xf1)](saveCache,_0x153a83);}export function isBranchEnabled(_0x5020fa){const _0x4ff627={'RbVBh':function(_0x1ed22e){return _0x1ed22e();}},_0x3c2623=_0x4ff627['RbVBh'](loadCache);return _0x3c2623['branches'][_0x5020fa]===!![];}function getOrCreateSession(_0x333b8a,_0x57153f){const _0x578d89=_0x23dc31;return!_0x333b8a[_0x578d89(0x101)][_0x57153f]&&(_0x333b8a['sessions'][_0x57153f]={}),_0x333b8a['sessions'][_0x57153f];}export function enableSession(_0x4ba026){const _0xfe01aa=_0x23dc31,_0x1df080={'mzWkK':_0xfe01aa(0xfa),'OIred':function(_0x477cc2,_0x4d1cb6){return _0x477cc2!==_0x4d1cb6;}},_0xa39de3=loadCache(),_0x2f3482=getOrCreateSession(_0xa39de3,_0x4ba026);_0x2f3482['enabled']=!![];const _0x4285b6=getCurrentBranch();_0x4285b6&&_0x4285b6!==_0x1df080['mzWkK']&&_0x1df080[_0xfe01aa(0xfe)](_0x4285b6,'master')&&(_0xa39de3['branches'][_0x4285b6]=!![],_0x2f3482[_0xfe01aa(0xf6)]=_0x4285b6),saveCache(_0xa39de3);}export function isSessionEnabled(_0x14143d){const _0x1871b2=_0x23dc31,_0x30cbfd={'IpzOp':function(_0x4cb2c1,_0x44d7f8){return _0x4cb2c1===_0x44d7f8;},'hVeOS':function(_0x510108,_0x191ce1){return _0x510108===_0x191ce1;},'hLHLb':function(_0x2e7420,_0x35bffd){return _0x2e7420===_0x35bffd;}},_0x230f3e=loadCache(),_0x3a1699=getCurrentBranch();if(!_0x3a1699||_0x3a1699===_0x1871b2(0xfa)||_0x30cbfd['IpzOp'](_0x3a1699,_0x1871b2(0xe6)))return _0x30cbfd['hVeOS'](_0x230f3e['sessions'][_0x14143d]?.['enabled'],!![]);const _0x596f32=_0x230f3e['branches'][_0x3a1699]===!![],_0x52dab6=_0x30cbfd[_0x1871b2(0x10f)](_0x230f3e['sessions'][_0x14143d]?.[_0x1871b2(0x11c)],!![]);return _0x596f32||_0x52dab6;}export function disableSession(_0x1c364b){const _0x4d45b9={'YCpSA':function(_0x17e839,_0x1dc785,_0x306b6e){return _0x17e839(_0x1dc785,_0x306b6e);}},_0x14de4c=loadCache(),_0x20301e=_0x4d45b9['YCpSA'](getOrCreateSession,_0x14de4c,_0x1c364b);_0x20301e['enabled']=![],saveCache(_0x14de4c);}export function updateBranchTracking(_0x3cfb76){const _0x460fd2=_0x23dc31,_0x3edd80={'YsDmv':'main','cuOjK':function(_0x64cc3b,_0x26b543){return _0x64cc3b===_0x26b543;}},_0x3566f2=loadCache(),_0x1c1356=_0x3566f2[_0x460fd2(0x101)][_0x3cfb76];if(!_0x1c1356?.[_0x460fd2(0x11c)])return;const _0x26c7cf=getCurrentBranch();if(!_0x26c7cf||_0x26c7cf===_0x3edd80['YsDmv']||_0x3edd80['cuOjK'](_0x26c7cf,_0x460fd2(0xe6)))return;_0x1c1356[_0x460fd2(0xf6)]!==_0x26c7cf&&(_0x3566f2['branches'][_0x26c7cf]=!![],_0x1c1356['currentBranch']=_0x26c7cf,saveCache(_0x3566f2));}export function initBranchTracking(_0x30da93){const _0x316880=_0x23dc31,_0x137819={'FIWXr':function(_0x457438){return _0x457438();},'oHvLn':_0x316880(0xfa),'JuHKY':function(_0x5881d7,_0x2512eb){return _0x5881d7===_0x2512eb;},'Mfjco':function(_0x4dd0b5,_0x1a1069,_0x3b5473){return _0x4dd0b5(_0x1a1069,_0x3b5473);}},_0x59cf09=loadCache(),_0x315aa8=_0x137819[_0x316880(0xf7)](getCurrentBranch);if(!_0x315aa8||_0x315aa8===_0x137819[_0x316880(0xf2)]||_0x137819['JuHKY'](_0x315aa8,'master'))return;if(_0x137819['JuHKY'](_0x59cf09['branches'][_0x315aa8],!![])){const _0x1efadd=_0x137819[_0x316880(0xf5)](getOrCreateSession,_0x59cf09,_0x30da93);_0x1efadd[_0x316880(0x11c)]=!![],_0x1efadd[_0x316880(0xf6)]=_0x315aa8,saveCache(_0x59cf09);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5ce3c){const _0x3d6fe9=_0x23dc31,_0x5a5119={'gGjSD':function(_0x4584b3){return _0x4584b3();},'yVwNs':function(_0x5cb97f,_0x363c72){return _0x5cb97f(_0x363c72);}},_0x474e9b=_0x5a5119[_0x3d6fe9(0xed)](loadCache),_0x23160f=_0x474e9b['sessions'][_0x5ce3c];_0x23160f?.['enabled']&&(_0x474e9b[_0x3d6fe9(0xf4)]=Date['now'](),_0x5a5119['yVwNs'](saveCache,_0x474e9b));}export function shouldAutoEnableAfterClear(_0x1721d7){const _0x23d292=_0x23dc31,_0x13ec35={'SvkjC':function(_0x36c831,_0x2aadcf){return _0x36c831!==_0x2aadcf;},'fBcNS':'clear','sgSFY':function(_0x291230){return _0x291230();},'vXZiY':function(_0x26531c,_0x5e0739){return _0x26531c-_0x5e0739;}};if(_0x13ec35[_0x23d292(0xe7)](_0x1721d7,_0x13ec35[_0x23d292(0x11d)]))return![];const _0x321275=_0x13ec35[_0x23d292(0xff)](loadCache),_0x558f46=_0x321275[_0x23d292(0xf4)];if(!_0x558f46)return![];const _0x3414f4=_0x13ec35['vXZiY'](Date['now'](),_0x558f46);return _0x3414f4<=CLEAR_AUTO_ENABLE_WINDOW_MS;}function _0x20a9(){const _0x100e9f=['gGjSD','yvPZh','ctSMr','lastPlanReminderAt','BadLe','oHvLn','251288LjIrXi','lastEnabledSessionClearedAt','Mfjco','currentBranch','FIWXr','1084255lglmsl','trim','main','SfOFp','whnNJ','683389urRPKY','OIred','sgSFY','homedir','sessions','prompted','6YNUYWB','8fmKMbg','HEAD','RhKbz','registeredAt','utf-8','fQHsm','.claude','474552MmOMwq','pipe','UDQyr','PDmXw','hLHLb','join','.ranger_cache.json','branches','2596617hUBjxz','orlrP','lastStopReminderAt','10neNLbm','FewLo','76343gApvzR','dirname','6IaTtcJ','WlUZL','enabled','fBcNS','1187428snKlii','toISOString','master','SvkjC','6PkxHUI','stringify','wgIrW','VuzBo','featureId'];_0x20a9=function(){return _0x100e9f;};return _0x20a9();}export function autoEnableAfterClear(_0x653087){const _0x412e0c=_0x23dc31,_0xf125c7={'VuzBo':function(_0x522d7d){return _0x522d7d();},'DiVzd':function(_0x4cee9e,_0x527565){return _0x4cee9e!==_0x527565;},'ctSMr':'main','orlrP':'master'},_0x202395=_0xf125c7[_0x412e0c(0xeb)](loadCache),_0x15bbdf=getOrCreateSession(_0x202395,_0x653087);_0x15bbdf['enabled']=!![];const _0x3e02f5=getCurrentBranch();_0x3e02f5&&_0xf125c7['DiVzd'](_0x3e02f5,_0xf125c7[_0x412e0c(0xef)])&&_0x3e02f5!==_0xf125c7[_0x412e0c(0x114)]&&(_0x15bbdf[_0x412e0c(0xf6)]=_0x3e02f5),delete _0x202395[_0x412e0c(0xf4)],saveCache(_0x202395);}export function registerSession(_0xc9fb8d,_0x2ea936){const _0x34caa5=_0x23dc31,_0x3e160e={'UDQyr':function(_0x870f3a){return _0x870f3a();}},_0x34405a=_0x3e160e[_0x34caa5(0x10d)](loadCache),_0x191f2d=getOrCreateSession(_0x34405a,_0xc9fb8d);_0x191f2d['featureId']=_0x2ea936,_0x191f2d[_0x34caa5(0x107)]=new Date()[_0x34caa5(0xe5)](),saveCache(_0x34405a);}export function getSessionEntry(_0x2e91bf){const _0x62275a=loadCache(),_0x384a38=_0x62275a['sessions'][_0x2e91bf];if(_0x384a38?.['featureId']&&_0x384a38?.['registeredAt'])return{'featureId':_0x384a38['featureId'],'registeredAt':_0x384a38['registeredAt']};return null;}export function unregisterSession(_0x1585ea){const _0x277b46=_0x23dc31,_0x4c2616=loadCache(),_0x4e0960=_0x4c2616['sessions'][_0x1585ea];_0x4e0960&&(delete _0x4e0960[_0x277b46(0xec)],delete _0x4e0960[_0x277b46(0x107)],saveCache(_0x4c2616));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x35117f){const _0x2875b7=_0x23dc31,_0x3f0c54={'whnNJ':function(_0x4c4825,_0x4f0e18,_0x291e55){return _0x4c4825(_0x4f0e18,_0x291e55);},'yvPZh':function(_0x43cc0d,_0x379483){return _0x43cc0d>=_0x379483;},'PDmXw':function(_0x19d0af,_0x13369a){return _0x19d0af-_0x13369a;},'zTxQA':function(_0x3840e5,_0x55a92f){return _0x3840e5(_0x55a92f);}},_0x5d82a3=loadCache(),_0x175d2d=_0x3f0c54[_0x2875b7(0xfc)](getOrCreateSession,_0x5d82a3,_0x35117f),_0x14c803=_0x175d2d[_0x2875b7(0xf0)]||0x0,_0x58bf9a=Date['now']();if(_0x3f0c54[_0x2875b7(0xee)](_0x3f0c54[_0x2875b7(0x10e)](_0x58bf9a,_0x14c803),PLAN_REMINDER_INTERVAL_MS))return _0x175d2d[_0x2875b7(0xf0)]=_0x58bf9a,_0x3f0c54['zTxQA'](saveCache,_0x5d82a3),!![];return![];}export function shouldShowStopReminder(_0x20ff95){const _0x2c8d8b=_0x23dc31,_0x10d0ac={'tJNWB':function(_0x255750){return _0x255750();},'eZIJD':function(_0x397a70,_0x469722,_0x32243c){return _0x397a70(_0x469722,_0x32243c);},'FewLo':function(_0x315c72,_0x4f0b94){return _0x315c72-_0x4f0b94;},'oSDxZ':function(_0x16022a,_0x474683){return _0x16022a(_0x474683);}},_0x17ef48=_0x10d0ac['tJNWB'](loadCache),_0x173d7f=_0x10d0ac['eZIJD'](getOrCreateSession,_0x17ef48,_0x20ff95),_0x15c3d8=_0x173d7f[_0x2c8d8b(0x115)]||0x0,_0x4a7a3c=Date['now']();if(_0x10d0ac[_0x2c8d8b(0x117)](_0x4a7a3c,_0x15c3d8)>=STOP_REMINDER_INTERVAL_MS)return _0x173d7f[_0x2c8d8b(0x115)]=_0x4a7a3c,_0x10d0ac['oSDxZ'](saveCache,_0x17ef48),!![];return![];}export function hasSessionBeenPrompted(_0x3d18ff){const _0x5f1b61=_0x23dc31,_0x782157={'SfOFp':function(_0x4dd0c8,_0x4a964e){return _0x4dd0c8===_0x4a964e;}},_0x5d74a6=loadCache();return _0x782157[_0x5f1b61(0xfb)](_0x5d74a6['sessions'][_0x3d18ff]?.[_0x5f1b61(0x102)],!![]);}export function markSessionPrompted(_0x280781){const _0xcae59a=loadCache(),_0x5de98a=getOrCreateSession(_0xcae59a,_0x280781);_0x5de98a['prompted']=!![],saveCache(_0xcae59a);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4a59(_0x1b8738,_0x505dca){_0x1b8738=_0x1b8738-0x93;const _0x308202=_0x3082();let _0x4a5909=_0x308202[_0x1b8738];return _0x4a5909;}const _0xde5ba5=_0x4a59;(function(_0x679405,_0x5b5026){const _0x3829ac=_0x4a59,_0x58c794=_0x679405();while(!![]){try{const _0x42277c=parseInt(_0x3829ac(0x115))/0x1+-parseInt(_0x3829ac(0xcf))/0x2+parseInt(_0x3829ac(0xcc))/0x3+parseInt(_0x3829ac(0xd9))/0x4*(parseInt(_0x3829ac(0xf9))/0x5)+parseInt(_0x3829ac(0xfa))/0x6+-parseInt(_0x3829ac(0xf3))/0x7*(-parseInt(_0x3829ac(0xcd))/0x8)+-parseInt(_0x3829ac(0xd6))/0x9*(parseInt(_0x3829ac(0x97))/0xa);if(_0x42277c===_0x5b5026)break;else _0x58c794['push'](_0x58c794['shift']());}catch(_0x1e4b1c){_0x58c794['push'](_0x58c794['shift']());}}}(_0x3082,0x3940e));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(_0x9bc691,_0x5b8a2b){const _0x3bb001=_0x4a59,_0x2c93f1={'iEzbX':function(_0x3486c8,_0x11b660,_0x1b4f55,_0x3587be){return _0x3486c8(_0x11b660,_0x1b4f55,_0x3587be);},'UygMX':_0x3bb001(0x9a),'IKjNJ':function(_0x1d5892,_0x2dd875,_0x3f2584){return _0x1d5892(_0x2dd875,_0x3f2584);},'MOfEI':function(_0x419c2d,_0x4c6843){return _0x419c2d(_0x4c6843);},'cWjdq':function(_0x48fe97,_0x6db609){return _0x48fe97!==_0x6db609;}},_0x205917=join(_0x5b8a2b,'ci',_0x9bc691),_0x15a137=_0x2c93f1[_0x3bb001(0xec)](join,_0x5b8a2b,_0x3bb001(0x9a),_0x9bc691),_0x265bf6=join(_0x5b8a2b,_0x9bc691),_0x3c0502=join(_0x5b8a2b,_0x2c93f1['UygMX']),_0x348f92=_0x2c93f1[_0x3bb001(0xa1)](join,_0x5b8a2b,'ci');if(_0x2c93f1[_0x3bb001(0xc9)](existsSync,_0x205917))return _0x205917;if(existsSync(_0x15a137))return _0x15a137;if(_0x2c93f1[_0x3bb001(0xc9)](existsSync,_0x265bf6)&&(_0x265bf6!==_0x3c0502&&_0x2c93f1['cWjdq'](_0x265bf6,_0x348f92)?!![]:hasLegacyProfileFiles(_0x265bf6)))return _0x265bf6;return null;}export function getEnvDir(_0x3dc637,_0x2ec9af={}){const _0x2110eb=_0x4a59,_0xb7c7c={'bNhsn':function(_0x19f8c2){return _0x19f8c2();},'RgwXW':function(_0x5ded6d,_0x2a2d9d){return _0x5ded6d(_0x2a2d9d);},'idjGg':function(_0x4dc57d,_0x546b35,_0x4c1753){return _0x4dc57d(_0x546b35,_0x4c1753);},'SoipM':function(_0x450d82,_0x329c15,_0x17ffd4){return _0x450d82(_0x329c15,_0x17ffd4);},'sfwjy':'local'},_0x2d4d67=_0xb7c7c[_0x2110eb(0xf2)](getRangerDir),_0x4c80fd=findEnvInRoot(_0x3dc637,_0x2d4d67);if(_0x4c80fd){if(_0x2ec9af[_0x2110eb(0xff)]&&_0xb7c7c[_0x2110eb(0xc0)](isLegacyEnvPath,_0x4c80fd))throw legacyWriteError(_0x3dc637,_0x4c80fd);return _0x4c80fd;}const _0x8af3bd=_0xb7c7c['bNhsn'](getRangerHomeDir);if(_0x8af3bd!==_0x2d4d67){const _0x321118=_0xb7c7c['idjGg'](findEnvInRoot,_0x3dc637,_0x8af3bd);if(_0x321118){if(_0x2ec9af[_0x2110eb(0xff)]&&_0xb7c7c['RgwXW'](isLegacyEnvPath,_0x321118))throw _0xb7c7c['SoipM'](legacyWriteError,_0x3dc637,_0x321118);return _0x321118;}}const _0x2fb6d5=join(_0x8af3bd,_0xb7c7c[_0x2110eb(0xce)],_0x3dc637);if(_0x2ec9af['forWrite'])throw legacyWriteError(_0x3dc637,_0x2fb6d5);return _0x2fb6d5;}function isLegacyEnvPath(_0x39f8a3){const _0x4f4234=_0x4a59,_0x196421={'eHlIm':function(_0x499984,_0x9bb99e){return _0x499984+_0x9bb99e;},'xyPfU':function(_0x33aa90,_0x5d71d0){return _0x33aa90===_0x5d71d0;}},_0x14a886=getRangerDir(),_0x410cd9=getRangerHomeDir();for(const _0x49f9fe of new Set([_0x14a886,_0x410cd9])){const _0x270071=_0x49f9fe['endsWith']('/')?_0x49f9fe:_0x196421[_0x4f4234(0xa7)](_0x49f9fe,'/');if(_0x196421[_0x4f4234(0xac)](_0x39f8a3,_0x49f9fe)||_0x39f8a3['startsWith'](_0x270071))return!![];}return![];}function legacyWriteError(_0x10ea12,_0x31b638){const _0x12f3e3=_0x4a59,_0x2f7295={'fBVYm':function(_0x3470b4,_0x409288){return _0x3470b4+_0x409288;},'VZmnD':function(_0x3f270b,_0x3ea5f9){return _0x3f270b+_0x3ea5f9;},'fqgcp':function(_0x31273f,_0x3ff6dc){return _0x31273f+_0x3ff6dc;}};return new Error(_0x2f7295[_0x12f3e3(0xdd)](_0x2f7295[_0x12f3e3(0xb1)](_0x2f7295[_0x12f3e3(0xd8)](_0x12f3e3(0xba)+_0x10ea12+'\x22\x20to\x20legacy\x20path\x20'+_0x31b638+'.\x0a',_0x12f3e3(0x98)),_0x12f3e3(0xd1)),_0x12f3e3(0xbf)));}export function findExistingEnv(_0x5e1ede,_0x494b99){const _0x3966d5=_0x4a59,_0x5652fa={'hkEtA':function(_0x177be1){return _0x177be1();},'xHZvz':'local','JfDUj':_0x3966d5(0xe0),'JogbY':function(_0xb19c9e,_0x2e28e9,_0x52e708){return _0xb19c9e(_0x2e28e9,_0x52e708);},'AGBNN':function(_0x4bba65,_0x2e699c,_0xf17552,_0x5736a7){return _0x4bba65(_0x2e699c,_0xf17552,_0x5736a7);},'yZXjX':function(_0x564a0a,_0x1f59d2){return _0x564a0a(_0x1f59d2);}},_0x5b471d=_0x494b99?.['rangerDir'],_0x3bb302=_0x5b471d?[_0x5b471d]:[_0x5652fa['hkEtA'](getRangerDir),_0x5652fa['hkEtA'](getRangerHomeDir)][_0x3966d5(0x107)]((_0x3698b2,_0x4cf7be,_0x19e6e4)=>_0x19e6e4[_0x3966d5(0xb5)](_0x3698b2)===_0x4cf7be),_0x40c421=_0x494b99?.[_0x3966d5(0x9c)]??['ci',_0x5652fa['xHZvz'],_0x5652fa[_0x3966d5(0xc7)]];for(const _0x41674b of _0x3bb302){const _0xa216d2=join(_0x41674b,_0x5652fa[_0x3966d5(0xb2)]),_0x462eb5=_0x5652fa['JogbY'](join,_0x41674b,'ci'),_0x364340=[{'location':'ci','path':_0x5652fa['AGBNN'](join,_0x41674b,'ci',_0x5e1ede)},{'location':'local','path':_0x5652fa[_0x3966d5(0x106)](join,_0x41674b,'local',_0x5e1ede)},{'location':_0x5652fa['JfDUj'],'path':join(_0x41674b,_0x5e1ede)}];for(const _0x2d1695 of _0x364340){if(_0x40c421['includes'](_0x2d1695[_0x3966d5(0xa0)])&&existsSync(_0x2d1695[_0x3966d5(0xf1)])){if(_0x2d1695[_0x3966d5(0xa0)]===_0x5652fa[_0x3966d5(0xc7)]&&(_0x2d1695['path']===_0xa216d2||_0x2d1695[_0x3966d5(0xf1)]===_0x462eb5)&&!_0x5652fa['yZXjX'](hasLegacyProfileFiles,_0x2d1695['path']))continue;return{'path':_0x2d1695['path'],'location':_0x2d1695[_0x3966d5(0xa0)]};}}}return null;}function hasLegacyProfileFiles(_0x211c36){const _0x45643f=_0x4a59,_0x4b3ec8={'GddcU':function(_0x552f8c,_0x413069){return _0x552f8c(_0x413069);},'ZzXMA':'auth.json'};return existsSync(join(_0x211c36,_0x45643f(0xe9)))||_0x4b3ec8[_0x45643f(0xcb)](existsSync,join(_0x211c36,_0x4b3ec8['ZzXMA']))||existsSync(join(_0x211c36,'auth.json.enc'));}export function isEnvCi(_0x283a58){const _0x21966a=_0x4a59,_0x52a768={'nJnYs':function(_0x413deb,_0x255202){return _0x413deb(_0x255202);},'pKrIn':function(_0x4d9c68){return _0x4d9c68();}};if(_0x52a768[_0x21966a(0xca)](existsSync,join(_0x52a768[_0x21966a(0xe5)](getRangerDir),'ci',_0x283a58)))return!![];const _0x344ddf=getRangerHomeDir();if(_0x344ddf!==getRangerDir()&&existsSync(join(_0x344ddf,'ci',_0x283a58)))return!![];return![];}export async function cleanupTempFiles(_0x4569b1){const _0x41b8f5=_0x4a59,_0x1f4ee2=[_0x4569b1['tempAuthPath'],_0x4569b1[_0x41b8f5(0xf5)]][_0x41b8f5(0x107)](Boolean);await Promise['all'](_0x1f4ee2['map'](_0x5a0b2d=>unlink(_0x5a0b2d)['catch'](_0x16acee=>{const _0x379791=_0x41b8f5;_0x16acee['code']!==_0x379791(0xbb)&&console[_0x379791(0xa9)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5a0b2d+':',_0x16acee['message']);})));}export function getSettingsPath(_0x5a5450){const _0x1449df=_0x4a59,_0x6f2dda={'KDBJG':function(_0xd36a09,_0x5d1f09,_0x49d800){return _0xd36a09(_0x5d1f09,_0x49d800);},'BRVaC':function(_0x1fc767,_0x5daaf8){return _0x1fc767(_0x5daaf8);}};return _0x6f2dda['KDBJG'](join,_0x6f2dda[_0x1449df(0xbd)](getEnvDir,_0x5a5450),'settings.json');}export async function loadSettings(_0x5bc8db){const _0x624004=_0x4a59,_0x58cd6d={'BlHQL':function(_0x123f04,_0x2a2312){return _0x123f04(_0x2a2312);}},_0x5bd53e=_0x58cd6d['BlHQL'](getSettingsPath,_0x5bc8db);if(!existsSync(_0x5bd53e))return{};try{const _0x146fa9=await readFile(_0x5bd53e,_0x624004(0xc6));return JSON[_0x624004(0xa4)](_0x146fa9);}catch{return{};}}function _0x3082(){const _0x2cde09=['warn','clipboard-write','djXUu','xyPfU','AuGng','playwright-cli','--no-sandbox','pVkoy','VZmnD','xHZvz','pdf','storageStatePath','indexOf','setupHeader','extraHTTPHeaders','storageState','MpwDG','Refusing\x20to\x20write\x20profile\x20\x22','ENOENT','file','BRVaC','nova-user-data','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','RgwXW','replace','install','getuid','cjqoJ','isArray','utf-8','JfDUj','chromium','MOfEI','nJnYs','GddcU','435984TtApya','1688BgrNVc','sfwjy','775702rIFjDT','stagehand','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ranger-config','YdFSt','TJXwi','\x20is\x20not\x20set','936ZhpkyR','mGCsH','fqgcp','4AcfdRk','vUagh','dBldS','entries','fBVYm','userAgent','header','legacy','auth.json','OWgKL','--allow-insecure-localhost','TDtPa','pKrIn','none','ELajm','args','settings.json','UYMYa','split','iEzbX','contextOptions','auth.json.enc','sessions','kYbhv','path','bNhsn','9345plrbUJ','rczTl','configPath','catch','UDjyU','boolean','760510EHQAtR','987492UyDIIB','headers','now','--disable-setuid-sandbox','TIMeV','forWrite','keys','oDeiJ','string','-cli','object','qIhoJ','AGBNN','filter','Environment\x20variable\x20','UrQpv','browser','executablePath','push','cNyvX','repeat','ysAfL','TVBGu','.json','map','includes','length','337720SWhnvU','LPLnO','join','core','yfFPB','-rangerwright.json','xSJBb','Gjczi','44140YvYCUF','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','pRllx','local','allowInsecureLocalhost','locations','clipboard-read','zZLEr','TGcKl','location','IKjNJ','hgVwj','cdpEndpoint','parse','safeMode','LpyYc','eHlIm','JSNeS'];_0x3082=function(){return _0x2cde09;};return _0x3082();}export async function saveSettings(_0x7e0037,_0x25c31d){const _0x19b6ec=_0x4a59,_0x4042c2={'yfFPB':function(_0x328cbd,_0x39346d){return _0x328cbd(_0x39346d);},'XCgHe':function(_0x40c0a5,_0x307ecb){return _0x40c0a5(_0x307ecb);},'FStqy':function(_0x24f562,_0x3139fc,_0x5e71e){return _0x24f562(_0x3139fc,_0x5e71e);}},_0x4530c6=_0x4042c2[_0x19b6ec(0x93)](getSettingsPath,_0x7e0037),_0x1a64de=dirname(_0x4530c6);!_0x4042c2['XCgHe'](existsSync,_0x1a64de)&&await _0x4042c2['FStqy'](mkdir,_0x1a64de,{'recursive':!![]}),await writeFile(_0x4530c6,JSON['stringify'](_0x25c31d,null,0x2));}export function resolveEnvVars(_0x1d1928){const _0x506cc7=_0x4a59,_0x27eb6a={'ysAfL':'string','aijDz':function(_0x2b0177,_0xc52da0){return _0x2b0177===_0xc52da0;},'pRhuC':'object'};if(typeof _0x1d1928===_0x27eb6a[_0x506cc7(0x10f)])return _0x1d1928[_0x506cc7(0xc1)](/\$\{(\w+)\}/g,(_0x545061,_0x5c66b1)=>{const _0x206889=_0x506cc7,_0x313775=process['env'][_0x5c66b1];if(_0x313775===undefined)throw new Error(_0x206889(0x108)+_0x5c66b1+_0x206889(0xd5));return _0x313775;});if(Array[_0x506cc7(0xc5)](_0x1d1928))return _0x1d1928[_0x506cc7(0x112)](resolveEnvVars);if(_0x1d1928&&_0x27eb6a['aijDz'](typeof _0x1d1928,_0x27eb6a['pRhuC']))return Object['fromEntries'](Object[_0x506cc7(0xdc)](_0x1d1928)['map'](([_0x151f8d,_0x490a18])=>[_0x151f8d,resolveEnvVars(_0x490a18)]));return _0x1d1928;}const isRecord=_0x1701d7=>typeof _0x1701d7===_0xde5ba5(0x104)&&_0x1701d7!==null&&!Array[_0xde5ba5(0xc5)](_0x1701d7),asRecord=_0x5da3db=>isRecord(_0x5da3db)?_0x5da3db:undefined,mergeHeaders=(_0x1fed5f,_0x6e5fb8)=>{const _0x3d17c9=_0xde5ba5,_0x7cb561={'UrQpv':function(_0x39dd7d,_0x125f01){return _0x39dd7d??_0x125f01;}},_0x1245d7={..._0x1fed5f??{},..._0x7cb561[_0x3d17c9(0x109)](_0x6e5fb8,{})};return Object[_0x3d17c9(0x100)](_0x1245d7)[_0x3d17c9(0x114)]?_0x1245d7:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0xde5ba5(0xe3)];export function buildBrowserOptionsFromSettings(_0x496b79,_0x5dad54={}){const _0x437993=_0xde5ba5,_0x3ed7cc={'UDjyU':function(_0x5f4486,_0x48f37){return _0x5f4486===_0x48f37;},'qdvCd':function(_0x448044,_0x2c173b){return _0x448044(_0x2c173b);}},_0x1a638f=asRecord(_0x496b79[_0x437993(0x10a)]),_0x3a9280={...asRecord(_0x1a638f?.['launchOptions'])??{}};typeof _0x5dad54['headless']===_0x437993(0xf8)&&(_0x3a9280['headless']=_0x5dad54['headless']);if(_0x496b79[_0x437993(0xa5)]){const _0x1e1854=_0x3a9280['args']??[],_0x13abda=SAFE_MODE_ARGS['filter'](_0x56f25e=>!_0x1e1854[_0x437993(0x113)](_0x56f25e));_0x3a9280['args']=[..._0x1e1854,..._0x13abda];}if(_0x496b79[_0x437993(0x9b)]){const _0x25f62e=_0x3a9280['args']??[],_0x2e7e28=ALLOW_LOCALHOST_ARGS[_0x437993(0x107)](_0x51e9c1=>!_0x25f62e['includes'](_0x51e9c1));_0x3a9280[_0x437993(0xe8)]=[..._0x25f62e,..._0x2e7e28];}const _0x158ec8={...asRecord(_0x1a638f?.['contextOptions'])??{}};_0x158ec8['ignoreHTTPSErrors']=!![];_0x3ed7cc[_0x437993(0xf7)](typeof _0x496b79['userAgent'],'string')&&(_0x158ec8['userAgent']=_0x496b79[_0x437993(0xde)]);const _0x2064d0=mergeHeaders(asRecord(_0x158ec8['extraHTTPHeaders']),_0x3ed7cc['qdvCd'](asRecord,_0x496b79['headers']));return _0x2064d0?_0x158ec8['extraHTTPHeaders']=_0x2064d0:delete _0x158ec8['extraHTTPHeaders'],_0x5dad54['storageStatePath']&&(_0x158ec8[_0x437993(0xb8)]=_0x5dad54[_0x437993(0xb4)]),{'launchOptions':_0x3a9280,'contextOptions':_0x158ec8};}export async function resolveProfileStorageState(_0x1820fd){const _0x191315={'fNDGQ':function(_0x178c8f,_0x42fb38){return _0x178c8f(_0x42fb38);}};return _0x191315['fNDGQ'](resolveLocalAuthPath,getEnvDir(_0x1820fd));}async function resolveLocalAuthPath(_0x410cf6){const _0x297afe=_0xde5ba5,_0x19c1ec={'ccGjU':function(_0x3abcfa,_0x292ec5,_0x3866d8){return _0x3abcfa(_0x292ec5,_0x3866d8);},'AuGng':function(_0x33bd7a,_0x26a245){return _0x33bd7a(_0x26a245);},'TGcKl':function(_0x2e4f0d,_0x109e85,_0x4b4ebf){return _0x2e4f0d(_0x109e85,_0x4b4ebf);},'azrRC':function(_0x4ef593,_0x18d55d,_0x24aa79){return _0x4ef593(_0x18d55d,_0x24aa79);}},_0x1fbd8c=_0x19c1ec['ccGjU'](join,_0x410cf6,_0x297afe(0xee)),_0x5bcbc0=join(_0x410cf6,_0x297afe(0xe1));if(_0x19c1ec['AuGng'](existsSync,_0x1fbd8c))try{const _0x6aa9bd=await getToken();if(!_0x6aa9bd)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x51361f=await _0x19c1ec[_0x297afe(0xad)](readFile,_0x1fbd8c),_0x5e3772=_0x19c1ec[_0x297afe(0x9f)](decrypt,_0x51361f,_0x6aa9bd),_0x2f83da=_0x19c1ec['azrRC'](join,tmpdir(),'ranger-auth-'+Date[_0x297afe(0xfc)]()+_0x297afe(0x111));return await writeFile(_0x2f83da,_0x5e3772),{'storageStatePath':_0x2f83da,'tempAuthPath':_0x2f83da};}catch(_0x5c644a){const _0x19dfc5=_0x5c644a instanceof Error?_0x5c644a['message']:String(_0x5c644a);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x19dfc5);}if(existsSync(_0x5bcbc0))return{'storageStatePath':_0x5bcbc0};return{};}export async function buildPlaywrightConfig(_0x2cae39,_0x4c7219,_0x3a3267,_0x4a3d37,_0x5c248e){const _0x5b8e29=_0xde5ba5,_0x212f6b={'SFuej':function(_0x2fb233,_0x1c1975,_0x337726,_0x205c57,_0x33d8d8,_0x51f84a,_0x27fe8f){return _0x2fb233(_0x1c1975,_0x337726,_0x205c57,_0x33d8d8,_0x51f84a,_0x27fe8f);},'MpwDG':'stagehand','vUagh':function(_0x384705,_0x2a932d){return _0x384705(_0x2a932d);}};if(_0x5c248e)return _0x212f6b['SFuej'](buildPlaywrightConfigCore,_0x2cae39,_0x5c248e,_0x4c7219,_0x3a3267,_0x4a3d37,_0x212f6b[_0x5b8e29(0xb9)]);const {storageStatePath:_0x145473,tempAuthPath:_0x177814}=await _0x212f6b['vUagh'](resolveLocalAuthPath,getEnvDir(_0x4c7219));try{const _0x1f29bb=await _0x212f6b['SFuej'](buildPlaywrightConfigCore,_0x2cae39,_0x145473,_0x4c7219,_0x3a3267,_0x4a3d37,_0x5b8e29(0xd0));return{..._0x1f29bb,'tempAuthPath':_0x177814};}catch(_0x2397cb){_0x177814&&await _0x212f6b[_0x5b8e29(0xda)](unlink,_0x177814)['catch'](()=>{});throw _0x2397cb;}}export async function buildPlaywrightConfigCore(_0x32be43,_0x15cee0,_0x1c0e5a,_0x14b1ef,_0x359ac9,_0x49198a=_0xde5ba5(0xd0)){const _0x3eab1d=_0xde5ba5,_0x53ef14={'pRllx':'--no-sandbox','cNyvX':_0x3eab1d(0x9d),'oDeiJ':'chromium','iaQou':_0x3eab1d(0xe6),'rczTl':_0x3eab1d(0x118),'UYMYa':_0x3eab1d(0xb3),'qIhoJ':function(_0x2d1a62,_0x1f6253){return _0x2d1a62===_0x1f6253;},'kYbhv':_0x3eab1d(0xd2),'wCEsa':_0x3eab1d(0xae),'LPLnO':_0x3eab1d(0x103),'SyHqm':function(_0x1561d5,_0x43a94b,_0x2cb5c0){return _0x1561d5(_0x43a94b,_0x2cb5c0);}},_0x4b211e=_0x14b1ef||randomUUID(),_0x4a19f0=join(getRangerDir(),'sessions',_0x4b211e),_0x26508b=Boolean(_0x32be43['cdpEndpoint']),_0x3761f2=_0x26508b?{'browserName':_0x53ef14[_0x3eab1d(0x101)],'cdpEndpoint':_0x32be43[_0x3eab1d(0xa3)]}:((()=>{const _0xf62177=_0x3eab1d,{launchOptions:_0x50e04a,contextOptions:_0x208902}=buildBrowserOptionsFromSettings(_0x32be43,{'headless':_0x359ac9?![]:_0x32be43['headless']??!![],'storageStatePath':_0x15cee0});if(process['getuid']?.()===0x0){const _0x1c13c4=[_0x53ef14[_0xf62177(0x99)],_0xf62177(0xfd)],_0x3aea94=_0x50e04a['args']??[],_0x455430=_0x1c13c4[_0xf62177(0x107)](_0x50cfd7=>!_0x3aea94[_0xf62177(0x113)](_0x50cfd7));_0x50e04a['args']=[..._0x3aea94,..._0x455430];}return{'isolated':!![],'browserName':_0xf62177(0xc8),'launchOptions':_0x50e04a,'contextOptions':{..._0x208902,'permissions':[_0x53ef14[_0xf62177(0x10d)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3a16e2=_0x49198a==='playwright-cli'?{'browser':_0x3761f2,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4a19f0,'outputMode':_0x3eab1d(0xbc),'codegen':_0x53ef14['iaQou']}:{'name':_0x1c0e5a,'browser':_0x3761f2,'capabilities':[_0x53ef14[_0x3eab1d(0xf4)],'tabs',_0x3eab1d(0xc2),_0x53ef14[_0x3eab1d(0xea)],'vision'],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4a19f0};if(!_0x26508b){const _0x4b3439=_0x3a16e2[_0x3eab1d(0x10a)],_0x544444=_0x4b3439[_0x3eab1d(0xed)];if(_0x544444[_0x3eab1d(0xde)]===undefined)delete _0x544444['userAgent'];if(_0x53ef14[_0x3eab1d(0x105)](_0x544444[_0x3eab1d(0xb8)],undefined))delete _0x544444['storageState'];}const _0x556ecd=join(tmpdir(),_0x53ef14[_0x3eab1d(0xf0)]);!existsSync(_0x556ecd)&&await mkdir(_0x556ecd,{'recursive':!![]});const _0x1e0b5a=_0x49198a===_0x53ef14['wCEsa']?_0x53ef14[_0x3eab1d(0x116)]:'',_0xfe9f09=_0x53ef14['SyHqm'](join,_0x556ecd,_0x1c0e5a+'-'+Date[_0x3eab1d(0xfc)]()+_0x1e0b5a+'.json');return await writeFile(_0xfe9f09,JSON['stringify'](_0x3a16e2,null,0x2)),{'configPath':_0xfe9f09,'storageStatePath':_0x15cee0};}export async function buildPlaywrightCliConfig(_0x150d8d,_0x3f8dbf,_0x43d8aa,_0x54528c,_0x1e4820){const _0x5c2e1d=_0xde5ba5,_0xf41039={'Midcz':function(_0x4a3ff2,_0x36ae2e,_0x2395a5,_0x4c9b86,_0x1086ef,_0x288945,_0x5b7cf9){return _0x4a3ff2(_0x36ae2e,_0x2395a5,_0x4c9b86,_0x1086ef,_0x288945,_0x5b7cf9);},'mGCsH':'playwright-cli'};if(_0x1e4820)return _0xf41039['Midcz'](buildPlaywrightConfigCore,_0x150d8d,_0x1e4820,_0x3f8dbf,_0x43d8aa,_0x54528c,_0xf41039[_0x5c2e1d(0xd7)]);const {storageStatePath:_0x3c90e4,tempAuthPath:_0x5e7a07}=await resolveLocalAuthPath(getEnvDir(_0x3f8dbf));try{const _0x24ba90=await _0xf41039['Midcz'](buildPlaywrightConfigCore,_0x150d8d,_0x3c90e4,_0x3f8dbf,_0x43d8aa,_0x54528c,'playwright-cli');return{..._0x24ba90,'tempAuthPath':_0x5e7a07};}catch(_0x5a2a9d){_0x5e7a07&&await unlink(_0x5e7a07)[_0x5c2e1d(0xf6)](()=>{});throw _0x5a2a9d;}}export async function buildRangerwrightCliConfig(_0x16e33b,_0x44b95a,_0x147432,_0x50171d,_0x2baed4){const _0xb9bace=_0xde5ba5,_0x30f7c3={'TJXwi':function(_0x19fad1,_0x33b75d,_0x1b508d){return _0x19fad1(_0x33b75d,_0x1b508d);},'HzOXz':function(_0x4343b3,_0x523026){return _0x4343b3===_0x523026;},'cjqoJ':_0xb9bace(0xaf),'ibVed':'--disable-setuid-sandbox','TIMeV':_0xb9bace(0xc8),'IxUqy':_0xb9bace(0x9d),'hgVwj':_0xb9bace(0xaa),'OWgKL':function(_0x388773,_0x3cba54){return _0x388773(_0x3cba54);},'ELajm':function(_0x569064,_0x27dfaf,_0x109209){return _0x569064(_0x27dfaf,_0x109209);}},{storageStatePath:_0x38fd36,tempAuthPath:_0xf90767}=_0x2baed4?{'storageStatePath':_0x2baed4,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x30f7c3['OWgKL'](getEnvDir,_0x44b95a)),_0xba6d8c=_0x147432||randomUUID(),_0x2ca35a=join(getRangerDir(),_0xb9bace(0xef),_0xba6d8c),_0x44656a=Boolean(_0x16e33b['cdpEndpoint']),_0x59498a=_0x44656a?{'browserName':_0xb9bace(0xc8),'cdpEndpoint':_0x16e33b['cdpEndpoint']}:((()=>{const _0x18ef58=_0xb9bace,{launchOptions:_0x18782a,contextOptions:_0x56df03}=_0x30f7c3['TJXwi'](buildBrowserOptionsFromSettings,_0x16e33b,{'headless':_0x50171d?![]:_0x16e33b['headless']??!![],'storageStatePath':_0x38fd36});if(_0x30f7c3['HzOXz'](process[_0x18ef58(0xc3)]?.(),0x0)){const _0x14e14a=[_0x30f7c3[_0x18ef58(0xc4)],_0x30f7c3['ibVed']],_0x32c280=_0x18782a['args']??[],_0x4087c3=_0x14e14a[_0x18ef58(0x107)](_0x3709fd=>!_0x32c280['includes'](_0x3709fd));_0x18782a[_0x18ef58(0xe8)]=[..._0x32c280,..._0x4087c3];}return{'browserName':_0x30f7c3[_0x18ef58(0xfe)],'launchOptions':_0x18782a,'contextOptions':{..._0x56df03,'permissions':[_0x30f7c3['IxUqy'],_0x30f7c3[_0x18ef58(0xa2)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x44656a){const _0xcc029f=_0x59498a[_0xb9bace(0xed)];if(_0xcc029f){if(_0xcc029f[_0xb9bace(0xde)]===undefined)delete _0xcc029f['userAgent'];if(_0xcc029f[_0xb9bace(0xb8)]===undefined)delete _0xcc029f['storageState'];}}const _0x273019={'browser':_0x59498a,'outputDir':_0x2ca35a,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3cee1b;try{const _0x32cbf9=_0x30f7c3[_0xb9bace(0xd4)](join,tmpdir(),'ranger-config');!_0x30f7c3[_0xb9bace(0xe2)](existsSync,_0x32cbf9)&&await _0x30f7c3['ELajm'](mkdir,_0x32cbf9,{'recursive':!![]}),_0x3cee1b=join(_0x32cbf9,_0x44b95a+'-'+Date[_0xb9bace(0xfc)]()+_0xb9bace(0x94)),await _0x30f7c3[_0xb9bace(0xe7)](writeFile,_0x3cee1b,JSON['stringify'](_0x273019,null,0x2));}catch(_0x26ca0f){_0xf90767&&await unlink(_0xf90767)[_0xb9bace(0xf6)](()=>{});throw _0x26ca0f;}return{'configPath':_0x3cee1b,'storageStatePath':_0x38fd36,'tempAuthPath':_0xf90767,'outputDir':_0x2ca35a};}export async function buildNovaActCliConfig(_0x53876f,_0x4beadb,_0x6ea91,_0x14890a,_0x209e1f){const _0x267cf3=_0xde5ba5,_0x42e1e4={'TDtPa':function(_0x886479,_0x49e652,_0x3cf16b,_0x5c6b75){return _0x886479(_0x49e652,_0x3cf16b,_0x5c6b75);},'jRUoB':function(_0x2f36cd){return _0x2f36cd();},'dTYVh':'sessions','Gearm':_0x267cf3(0xbe),'mmbzt':function(_0x18ca57,_0x3a21f7,_0x1c57e4){return _0x18ca57(_0x3a21f7,_0x1c57e4);},'tiwyi':'Default','Jvdzk':function(_0x3d6dfb,_0x1bcc5d,_0x53f276){return _0x3d6dfb(_0x1bcc5d,_0x53f276);},'zZLEr':function(_0x492342,_0x515147){return _0x492342===_0x515147;},'svqLr':function(_0x4843d7,_0x5014d4){return _0x4843d7===_0x5014d4;},'ymYlH':_0x267cf3(0x102),'YBjcV':function(_0xfe827d,_0x2693e2){return _0xfe827d(_0x2693e2);},'SWUeh':function(_0x4e6c73,_0x5c623e){return _0x4e6c73(_0x5c623e);},'TVBGu':function(_0x3dfeb8,_0x4c65b2){return _0x3dfeb8(_0x4c65b2);}},{storageStatePath:_0x343ddf,tempAuthPath:_0x523d35}=_0x209e1f?{'storageStatePath':_0x209e1f,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4beadb)),_0x467e5a=_0x6ea91||randomUUID(),_0x3d821e=_0x42e1e4[_0x267cf3(0xe4)](join,_0x42e1e4['jRUoB'](getRangerDir),_0x42e1e4['dTYVh'],_0x467e5a),_0x2c9905=join(_0x3d821e,_0x42e1e4['Gearm']),_0x4b489a=_0x343ddf?_0x42e1e4['mmbzt'](join,_0x2c9905,_0x42e1e4['tiwyi']):undefined,{launchOptions:_0x212f37,contextOptions:_0x3ac303}=_0x42e1e4['Jvdzk'](buildBrowserOptionsFromSettings,_0x53876f,{'headless':_0x14890a?![]:_0x53876f['headless']??!![],'storageStatePath':_0x343ddf});if(_0x42e1e4[_0x267cf3(0x9e)](process[_0x267cf3(0xc3)]?.(),0x0)){const _0x3dddee=[_0x267cf3(0xaf),'--disable-setuid-sandbox'],_0xde22a0=_0x212f37['args']??[],_0x5155fa=_0x3dddee[_0x267cf3(0x107)](_0x4cf96b=>!_0xde22a0['includes'](_0x4cf96b));_0x212f37['args']=[..._0xde22a0,..._0x5155fa];}const _0x2f706e=_0x42e1e4['svqLr'](typeof _0x212f37[_0x267cf3(0x10b)],_0x42e1e4['ymYlH'])?_0x212f37[_0x267cf3(0x10b)]:_0x343ddf?chromium[_0x267cf3(0x10b)]():undefined;return{'storageStatePath':_0x343ddf,'tempAuthPath':_0x523d35,'baseUrl':_0x53876f['baseUrl'],'headless':Boolean(_0x212f37['headless']),'userDataDir':_0x2c9905,'browserProfilePath':_0x4b489a,'executablePath':_0x2f706e,'launchArgs':Array['isArray'](_0x212f37[_0x267cf3(0xe8)])?_0x212f37[_0x267cf3(0xe8)]['filter'](_0x544cdf=>typeof _0x544cdf===_0x267cf3(0x102)):[],'userAgent':typeof _0x3ac303[_0x267cf3(0xde)]===_0x267cf3(0x102)?_0x3ac303['userAgent']:undefined,'extraHTTPHeaders':_0x3ac303[_0x267cf3(0xb7)],'allowInsecureLocalhost':_0x42e1e4['YBjcV'](Boolean,_0x53876f[_0x267cf3(0x9b)]),'safeMode':_0x42e1e4['SWUeh'](Boolean,_0x53876f[_0x267cf3(0xa5)]),'cdpEndpoint':_0x53876f[_0x267cf3(0xa3)],'isCdpMode':_0x42e1e4[_0x267cf3(0x110)](Boolean,_0x53876f[_0x267cf3(0xa3)])};}export function getNestedValue(_0x4f33f8,_0x4ce92b){const _0xaf9f48=_0xde5ba5,_0x531245={'Gjczi':function(_0x53cc28,_0x316c7f){return _0x53cc28(_0x316c7f);},'jXdro':function(_0x30ce9c,_0x31ffac){return _0x30ce9c===_0x31ffac;},'jLGAU':_0xaf9f48(0x104)},_0x20bab8=_0x531245[_0xaf9f48(0x96)](parseKeyPath,_0x4ce92b);let _0x11a21f=_0x4f33f8;for(const _0x3e5dd6 of _0x20bab8){if(_0x531245['jXdro'](_0x11a21f,null)||_0x11a21f===undefined||typeof _0x11a21f!==_0x531245['jLGAU'])return undefined;_0x11a21f=_0x11a21f[_0x3e5dd6];}return _0x11a21f;}export function setNestedValue(_0x3d43b2,_0x24db3f,_0x1c3de8){const _0xa9fcf6=_0xde5ba5,_0x34c81c={'pVkoy':function(_0x445d2a,_0x2ffe0b){return _0x445d2a<_0x2ffe0b;},'xSJBb':'object'},_0x35bc99=parseKeyPath(_0x24db3f);let _0x42c201=_0x3d43b2;for(let _0x3852ac=0x0;_0x34c81c[_0xa9fcf6(0xb0)](_0x3852ac,_0x35bc99[_0xa9fcf6(0x114)]-0x1);_0x3852ac++){const _0x326bfa=_0x35bc99[_0x3852ac];(!(_0x326bfa in _0x42c201)||typeof _0x42c201[_0x326bfa]!==_0x34c81c[_0xa9fcf6(0x95)])&&(_0x42c201[_0x326bfa]={}),_0x42c201=_0x42c201[_0x326bfa];}_0x42c201[_0x35bc99[_0x35bc99[_0xa9fcf6(0x114)]-0x1]]=_0x1c3de8;}export function deleteNestedValue(_0x330b60,_0x3b81d2){const _0x1b2887=_0xde5ba5,_0x34bfb0={'sCEwS':function(_0x20bbc4,_0x37ceac){return _0x20bbc4(_0x37ceac);},'qTgto':function(_0x484124,_0x229ed5){return _0x484124<_0x229ed5;},'LpyYc':function(_0xe996b8,_0xa22be9){return _0xe996b8!==_0xa22be9;},'vplWG':'object','JSNeS':function(_0x58919c,_0x2cd809){return _0x58919c===_0x2cd809;}},_0x3fe7e9=_0x34bfb0['sCEwS'](parseKeyPath,_0x3b81d2);let _0x126f67=_0x330b60;for(let _0x431a7f=0x0;_0x34bfb0['qTgto'](_0x431a7f,_0x3fe7e9['length']-0x1);_0x431a7f++){if(_0x126f67===null||_0x126f67===undefined||_0x34bfb0[_0x1b2887(0xa6)](typeof _0x126f67,_0x34bfb0['vplWG']))return![];_0x126f67=_0x126f67[_0x3fe7e9[_0x431a7f]];}if(_0x126f67===null||_0x34bfb0[_0x1b2887(0xa8)](_0x126f67,undefined)||_0x34bfb0[_0x1b2887(0xa6)](typeof _0x126f67,'object'))return![];const _0x2f3a04=_0x3fe7e9[_0x3fe7e9[_0x1b2887(0x114)]-0x1];if(_0x2f3a04 in _0x126f67)return delete _0x126f67[_0x2f3a04],!![];return![];}function parseKeyPath(_0x592732){const _0x194605=_0xde5ba5,_0x5b9428={'YdFSt':_0x194605(0xdf),'tUvyb':_0x194605(0xfb),'djXUu':_0x194605(0xb6)},_0x529078=_0x592732[_0x194605(0xeb)]('.');return _0x529078[0x0]===_0x5b9428[_0x194605(0xd3)]&&(_0x529078[0x0]=_0x5b9428['tUvyb']),_0x529078[0x0]===_0x5b9428[_0x194605(0xab)]&&(_0x529078[0x0]='setupHeaders'),_0x529078;}export function formatSettings(_0x5d3059,_0x24f9c2=0x0){const _0x2e64af=_0xde5ba5,_0x860f30={'dBldS':function(_0x4f49c0,_0x52d1e6){return _0x4f49c0!==_0x52d1e6;}},_0x288cb1=[],_0x29d5a8='\x20\x20'[_0x2e64af(0x10e)](_0x24f9c2);for(const [_0x39efcc,_0x1673c0]of Object['entries'](_0x5d3059)){if(_0x1673c0===undefined)continue;if(typeof _0x1673c0===_0x2e64af(0x104)&&_0x860f30[_0x2e64af(0xdb)](_0x1673c0,null)){_0x288cb1[_0x2e64af(0x10c)](''+_0x29d5a8+_0x39efcc+':');for(const [_0x5b41ab,_0x391b58]of Object[_0x2e64af(0xdc)](_0x1673c0)){_0x288cb1['push'](_0x29d5a8+'\x20\x20'+_0x5b41ab+':\x20'+_0x391b58);}}else _0x288cb1['push'](''+_0x29d5a8+_0x39efcc+':\x20'+_0x1673c0);}return _0x288cb1[_0x2e64af(0x117)]('\x0a');}
|
|
1
|
+
const _0x1f5ae2=_0x229b;(function(_0x172002,_0x48fe7a){const _0x405074=_0x229b,_0x110fe5=_0x172002();while(!![]){try{const _0x3a65d1=-parseInt(_0x405074(0x109))/0x1*(parseInt(_0x405074(0x17c))/0x2)+-parseInt(_0x405074(0x14d))/0x3*(parseInt(_0x405074(0x17b))/0x4)+-parseInt(_0x405074(0x15c))/0x5*(parseInt(_0x405074(0x15e))/0x6)+parseInt(_0x405074(0x10b))/0x7*(-parseInt(_0x405074(0x11f))/0x8)+-parseInt(_0x405074(0x124))/0x9*(parseInt(_0x405074(0x120))/0xa)+-parseInt(_0x405074(0x11d))/0xb+parseInt(_0x405074(0x13b))/0xc*(parseInt(_0x405074(0x159))/0xd);if(_0x3a65d1===_0x48fe7a)break;else _0x110fe5['push'](_0x110fe5['shift']());}catch(_0x5afbfb){_0x110fe5['push'](_0x110fe5['shift']());}}}(_0x4e99,0xcd2b7));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';function _0x229b(_0x2b1856,_0x57e032){_0x2b1856=_0x2b1856-0x103;const _0x4e9976=_0x4e99();let _0x229be2=_0x4e9976[_0x2b1856];return _0x229be2;}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(_0x4e92bb,_0x4291c2){const _0x34107e=_0x229b,_0x441295={'BrQva':function(_0x4808aa,_0x5c0c40){return _0x4808aa(_0x5c0c40);}},_0x218c41=join(_0x4291c2,'ci',_0x4e92bb),_0x50bc5c=join(_0x4291c2,'local',_0x4e92bb),_0x2b9406=join(_0x4291c2,_0x4e92bb),_0x4fe812=join(_0x4291c2,'local'),_0x5006d8=join(_0x4291c2,'ci');if(_0x441295['BrQva'](existsSync,_0x218c41))return _0x218c41;if(existsSync(_0x50bc5c))return _0x50bc5c;if(_0x441295[_0x34107e(0x14c)](existsSync,_0x2b9406)&&(_0x2b9406!==_0x4fe812&&_0x2b9406!==_0x5006d8?!![]:hasLegacyProfileFiles(_0x2b9406)))return _0x2b9406;return null;}export function getEnvDir(_0x53ef0a,_0x6b36d7={}){const _0x57dd58=_0x229b,_0x2528b5=getRangerDir(),_0xf5d34a=findEnvInRoot(_0x53ef0a,_0x2528b5);if(_0xf5d34a){if(_0x6b36d7[_0x57dd58(0x173)]&&isLegacyEnvPath(_0xf5d34a))throw legacyWriteError(_0x53ef0a,_0xf5d34a);return _0xf5d34a;}const _0x2aa670=getRangerHomeDir();if(_0x2aa670!==_0x2528b5){const _0x1d3966=findEnvInRoot(_0x53ef0a,_0x2aa670);if(_0x1d3966){if(_0x6b36d7['forWrite']&&isLegacyEnvPath(_0x1d3966))throw legacyWriteError(_0x53ef0a,_0x1d3966);return _0x1d3966;}}const _0x24c192=join(_0x2aa670,'local',_0x53ef0a);if(_0x6b36d7[_0x57dd58(0x173)])throw legacyWriteError(_0x53ef0a,_0x24c192);return _0x24c192;}function isLegacyEnvPath(_0x40d26a){const _0x428397=_0x229b,_0x40e80e={'BmaDH':function(_0x2011d5){return _0x2011d5();},'IgNiq':function(_0x24adda,_0x4eb207){return _0x24adda===_0x4eb207;}},_0x642ced=getRangerDir(),_0x557580=_0x40e80e[_0x428397(0x175)](getRangerHomeDir);for(const _0x46729d of new Set([_0x642ced,_0x557580])){const _0x3146dd=_0x46729d['endsWith']('/')?_0x46729d:_0x46729d+'/';if(_0x40e80e[_0x428397(0x177)](_0x40d26a,_0x46729d)||_0x40d26a[_0x428397(0x164)](_0x3146dd))return!![];}return![];}function _0x4e99(){const _0x165e6a=['4omlvts','904NYdamO','object','OFymY','Failed\x20to\x20decrypt\x20auth\x20state:\x20','HVCtb','cdpEndpoint','KUmsM','JfJFn','length','auth.json.enc','nUkvi','location','allow','EoUSw','1549sueDhu','headers','2053079zBfcty','UtgSR','ENOENT','psWpe','includes','NhCyS','entries','--unsafely-treat-insecure-origin-as-secure=http://localhost','zXjWv','DacPh','warn','safeMode','pQqLI','locations','vmhvc','XDzIJ','join','wpAVV','2704845NUxAzL','XYeCO','40FQcCEz','1850mdgIwb','uDkVQ','ubALL','playwright-cli','25587mIIalc','auth.json','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','RUnLZ','zJSZq','njrGC','configPath','clipboard-write','stringify','NYnHG','Refusing\x20to\x20write\x20profile\x20\x22','WeDxr','push','browser','ILlWJ','getuid','faODc','zLwtG','replace','extraHTTPHeaders','-cli','rTALg','tHKoK','696YERvtT','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','catch','qhyLl','ignoreHTTPSErrors','map','NOYvv','install','headless','UEdMY','chromium','now','MlVMU','dJnJv','legacy','sessions','OfjSn','BrQva','1386759Nvjvuh','userAgent','DksFE','OPTbG','fTWXe','filter','DkRiS','GAPpj','all','CRmKP','--no-sandbox','SddED','1063842PkmXbM','vision','CpckI','5iHHbvG','storageState','3031566aymKqS','soKOu','args','amFyb','Zpzrb','qkxdT','startsWith','tabs','--disable-setuid-sandbox','local','PbqkN','LhWpl','QcsZy','xNWbK','setupHeader','SEhZO','message','string','QYQhk','cFahT','ranger-config','forWrite','path','BmaDH','tempAuthPath','IgNiq','contextOptions','--disable-features=WebBluetooth','stagehand'];_0x4e99=function(){return _0x165e6a;};return _0x4e99();}function legacyWriteError(_0x5f0551,_0x147e1a){const _0x4b70a7=_0x229b,_0x4ec00e={'cGlMO':function(_0x2dc75f,_0x2f076a){return _0x2dc75f+_0x2f076a;},'mxboy':function(_0x51840a,_0x40a0c4){return _0x51840a+_0x40a0c4;}};return new Error(_0x4ec00e['cGlMO'](_0x4ec00e['mxboy'](_0x4b70a7(0x12e)+_0x5f0551+'\x22\x20to\x20legacy\x20path\x20'+_0x147e1a+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x4b70a7(0x126),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x2b512c,_0xb649df){const _0x21cbaf=_0x229b,_0x3a3310={'tHKoK':function(_0x361753,_0x361e56,_0x438da9){return _0x361753(_0x361e56,_0x438da9);},'YwYYT':_0x21cbaf(0x167),'aKACG':function(_0x521c22,_0x17807d,_0x5f3925,_0x2ef12d){return _0x521c22(_0x17807d,_0x5f3925,_0x2ef12d);},'njrGC':_0x21cbaf(0x149),'DacPh':function(_0x48a34c,_0x45d2d1,_0xd447e8){return _0x48a34c(_0x45d2d1,_0xd447e8);},'RUnLZ':function(_0x165fc7,_0x3fb550){return _0x165fc7===_0x3fb550;},'MlVMU':function(_0x3aa4ab,_0x3a8206){return _0x3aa4ab(_0x3a8206);}},_0x201297=_0xb649df?.['rangerDir'],_0x2f9e20=_0x201297?[_0x201297]:[getRangerDir(),getRangerHomeDir()][_0x21cbaf(0x152)]((_0x47b171,_0x3c2deb,_0x3aff9f)=>_0x3aff9f['indexOf'](_0x47b171)===_0x3c2deb),_0x3dbb21=_0xb649df?.[_0x21cbaf(0x118)]??['ci','local','legacy'];for(const _0x182440 of _0x2f9e20){const _0x4dc448=_0x3a3310['tHKoK'](join,_0x182440,_0x3a3310['YwYYT']),_0x5264e5=_0x3a3310[_0x21cbaf(0x13a)](join,_0x182440,'ci'),_0x1ca088=[{'location':'ci','path':_0x3a3310['aKACG'](join,_0x182440,'ci',_0x2b512c)},{'location':'local','path':_0x3a3310['aKACG'](join,_0x182440,_0x3a3310['YwYYT'],_0x2b512c)},{'location':_0x3a3310[_0x21cbaf(0x129)],'path':_0x3a3310[_0x21cbaf(0x114)](join,_0x182440,_0x2b512c)}];for(const _0x15c716 of _0x1ca088){if(_0x3dbb21[_0x21cbaf(0x10f)](_0x15c716[_0x21cbaf(0x106)])&&existsSync(_0x15c716['path'])){if(_0x15c716[_0x21cbaf(0x106)]===_0x3a3310[_0x21cbaf(0x129)]&&(_0x3a3310[_0x21cbaf(0x127)](_0x15c716[_0x21cbaf(0x174)],_0x4dc448)||_0x15c716['path']===_0x5264e5)&&!_0x3a3310[_0x21cbaf(0x147)](hasLegacyProfileFiles,_0x15c716['path']))continue;return{'path':_0x15c716['path'],'location':_0x15c716[_0x21cbaf(0x106)]};}}}return null;}function hasLegacyProfileFiles(_0x5a94b7){const _0x5374c6=_0x229b,_0x36d49e={'VUTKy':function(_0x1c9f48,_0x2d4c5c,_0x4f1161){return _0x1c9f48(_0x2d4c5c,_0x4f1161);},'mXlNA':function(_0x4bdf2d,_0x457d5f){return _0x4bdf2d(_0x457d5f);},'wpAVV':function(_0x1645b9,_0x5de80e,_0x20dda8){return _0x1645b9(_0x5de80e,_0x20dda8);},'JFrsJ':'auth.json.enc'};return existsSync(_0x36d49e['VUTKy'](join,_0x5a94b7,'settings.json'))||existsSync(join(_0x5a94b7,_0x5374c6(0x125)))||_0x36d49e['mXlNA'](existsSync,_0x36d49e[_0x5374c6(0x11c)](join,_0x5a94b7,_0x36d49e['JFrsJ']));}export function isEnvCi(_0x2ecf8b){const _0x2457f3=_0x229b,_0x3df9c2={'nmlzj':function(_0x363b9c,_0x5a6ae2){return _0x363b9c(_0x5a6ae2);},'wapUE':function(_0x51dd6a){return _0x51dd6a();},'amFyb':function(_0x3b569c,_0x47b5a4){return _0x3b569c(_0x47b5a4);},'nUkvi':function(_0x2e16ea,_0x27d960,_0x3b1d88,_0x3ab84f){return _0x2e16ea(_0x27d960,_0x3b1d88,_0x3ab84f);}};if(_0x3df9c2['nmlzj'](existsSync,join(_0x3df9c2['wapUE'](getRangerDir),'ci',_0x2ecf8b)))return!![];const _0x439dc9=getRangerHomeDir();if(_0x439dc9!==_0x3df9c2['wapUE'](getRangerDir)&&_0x3df9c2[_0x2457f3(0x161)](existsSync,_0x3df9c2[_0x2457f3(0x105)](join,_0x439dc9,'ci',_0x2ecf8b)))return!![];return![];}export async function cleanupTempFiles(_0x3b50a3){const _0x47cf85=_0x229b,_0x5b95fe=[_0x3b50a3[_0x47cf85(0x176)],_0x3b50a3[_0x47cf85(0x12a)]][_0x47cf85(0x152)](Boolean);await Promise[_0x47cf85(0x155)](_0x5b95fe['map'](_0x49f1f7=>unlink(_0x49f1f7)['catch'](_0x2ee55b=>{const _0x4bc779=_0x47cf85;_0x2ee55b['code']!==_0x4bc779(0x10d)&&console[_0x4bc779(0x115)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x49f1f7+':',_0x2ee55b[_0x4bc779(0x16e)]);})));}export function getSettingsPath(_0x27a5d7){return join(getEnvDir(_0x27a5d7),'settings.json');}export async function loadSettings(_0x26bb23){const _0x204ffc=_0x229b,_0x3c06a6={'Zpzrb':function(_0x55d614,_0xe1adbf){return _0x55d614(_0xe1adbf);},'zVazb':function(_0x30925e,_0x5e62bc,_0x3e3fd5){return _0x30925e(_0x5e62bc,_0x3e3fd5);}},_0x1427a3=getSettingsPath(_0x26bb23);if(!_0x3c06a6[_0x204ffc(0x162)](existsSync,_0x1427a3))return{};try{const _0x32daee=await _0x3c06a6['zVazb'](readFile,_0x1427a3,'utf-8');return JSON['parse'](_0x32daee);}catch{return{};}}export async function saveSettings(_0x2eeff0,_0x1810b8){const _0x159d1e=_0x229b,_0x5e5cbe={'ubALL':function(_0x38677a,_0x96e4f){return _0x38677a(_0x96e4f);},'QmSzv':function(_0x12b428,_0x2bdf8a){return _0x12b428(_0x2bdf8a);},'CVuWG':function(_0x420ffd,_0x4758e0,_0x5e66fc){return _0x420ffd(_0x4758e0,_0x5e66fc);}},_0x4215fc=_0x5e5cbe[_0x159d1e(0x122)](getSettingsPath,_0x2eeff0),_0x5ce65a=dirname(_0x4215fc);!_0x5e5cbe['QmSzv'](existsSync,_0x5ce65a)&&await mkdir(_0x5ce65a,{'recursive':!![]}),await _0x5e5cbe['CVuWG'](writeFile,_0x4215fc,JSON['stringify'](_0x1810b8,null,0x2));}export function resolveEnvVars(_0x69e56a){const _0x4b0b83=_0x229b,_0x4d9614={'EoUSw':'string','UEdMY':_0x4b0b83(0x17d)};if(typeof _0x69e56a===_0x4d9614[_0x4b0b83(0x108)])return _0x69e56a[_0x4b0b83(0x136)](/\$\{(\w+)\}/g,(_0x42bb8a,_0x4f5bab)=>{const _0x5f0549=process['env'][_0x4f5bab];if(_0x5f0549===undefined)throw new Error('Environment\x20variable\x20'+_0x4f5bab+'\x20is\x20not\x20set');return _0x5f0549;});if(Array['isArray'](_0x69e56a))return _0x69e56a[_0x4b0b83(0x140)](resolveEnvVars);if(_0x69e56a&&typeof _0x69e56a===_0x4d9614[_0x4b0b83(0x144)])return Object['fromEntries'](Object[_0x4b0b83(0x111)](_0x69e56a)['map'](([_0xf63e0c,_0x433ce2])=>[_0xf63e0c,resolveEnvVars(_0x433ce2)]));return _0x69e56a;}const isRecord=_0x416737=>typeof _0x416737==='object'&&_0x416737!==null&&!Array['isArray'](_0x416737),asRecord=_0x388e03=>isRecord(_0x388e03)?_0x388e03:undefined,mergeHeaders=(_0x368def,_0x358efe)=>{const _0x3cdd71=_0x229b,_0x5865eb={..._0x368def??{},..._0x358efe??{}};return Object['keys'](_0x5865eb)[_0x3cdd71(0x103)]?_0x5865eb:undefined;},SAFE_MODE_ARGS=[_0x1f5ae2(0x179)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0x1f5ae2(0x112),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x100fc1,_0x5bf86e={}){const _0x5a5f53=_0x1f5ae2,_0x14be94={'wqmzF':'boolean','HgbLX':function(_0x427cd9,_0x5b055b){return _0x427cd9(_0x5b055b);},'uyuRe':function(_0x27575c,_0x13fd74){return _0x27575c===_0x13fd74;},'UtgSR':_0x5a5f53(0x16f)},_0x12a863=asRecord(_0x100fc1[_0x5a5f53(0x131)]),_0x3ede32={...asRecord(_0x12a863?.['launchOptions'])??{}};typeof _0x5bf86e[_0x5a5f53(0x143)]===_0x14be94['wqmzF']&&(_0x3ede32[_0x5a5f53(0x143)]=_0x5bf86e[_0x5a5f53(0x143)]);if(_0x100fc1[_0x5a5f53(0x116)]){const _0x30d59b=_0x3ede32[_0x5a5f53(0x160)]??[],_0x5bb36a=SAFE_MODE_ARGS['filter'](_0x45cc86=>!_0x30d59b[_0x5a5f53(0x10f)](_0x45cc86));_0x3ede32[_0x5a5f53(0x160)]=[..._0x30d59b,..._0x5bb36a];}if(_0x100fc1['allowInsecureLocalhost']){const _0x2d9d6d=_0x3ede32[_0x5a5f53(0x160)]??[],_0x49a7be=ALLOW_LOCALHOST_ARGS[_0x5a5f53(0x152)](_0x244ba0=>!_0x2d9d6d[_0x5a5f53(0x10f)](_0x244ba0));_0x3ede32['args']=[..._0x2d9d6d,..._0x49a7be];}const _0x4d0afb={..._0x14be94['HgbLX'](asRecord,_0x12a863?.[_0x5a5f53(0x178)])??{}};_0x4d0afb[_0x5a5f53(0x13f)]=!![];_0x14be94['uyuRe'](typeof _0x100fc1[_0x5a5f53(0x14e)],_0x14be94[_0x5a5f53(0x10c)])&&(_0x4d0afb[_0x5a5f53(0x14e)]=_0x100fc1[_0x5a5f53(0x14e)]);const _0x47d4b4=mergeHeaders(asRecord(_0x4d0afb[_0x5a5f53(0x137)]),_0x14be94['HgbLX'](asRecord,_0x100fc1['headers']));return _0x47d4b4?_0x4d0afb['extraHTTPHeaders']=_0x47d4b4:delete _0x4d0afb[_0x5a5f53(0x137)],_0x5bf86e['storageStatePath']&&(_0x4d0afb[_0x5a5f53(0x15d)]=_0x5bf86e['storageStatePath']),{'launchOptions':_0x3ede32,'contextOptions':_0x4d0afb};}export async function resolveProfileStorageState(_0x1c1615){const _0x7d2be4=_0x1f5ae2,_0xbc0427={'psWpe':function(_0x12f740,_0x4e5b6a){return _0x12f740(_0x4e5b6a);}};return resolveLocalAuthPath(_0xbc0427[_0x7d2be4(0x10e)](getEnvDir,_0x1c1615));}async function resolveLocalAuthPath(_0x5094ec){const _0x133e0f=_0x1f5ae2,_0x2df851={'dJnJv':function(_0x4f3b85,_0x40d6af,_0x30dc12){return _0x4f3b85(_0x40d6af,_0x30dc12);},'VkDqh':function(_0x57b8d9,_0x1c380f,_0x193b3a){return _0x57b8d9(_0x1c380f,_0x193b3a);},'PbqkN':function(_0x1c9d1b){return _0x1c9d1b();},'rTALg':_0x133e0f(0x13c),'SddED':function(_0x213b23,_0x2ddc71,_0xc034c7){return _0x213b23(_0x2ddc71,_0xc034c7);},'qeWlO':function(_0x41db8f,_0x40fb2e){return _0x41db8f(_0x40fb2e);}},_0x3e6883=_0x2df851[_0x133e0f(0x148)](join,_0x5094ec,_0x133e0f(0x104)),_0x280eeb=_0x2df851['VkDqh'](join,_0x5094ec,_0x133e0f(0x125));if(existsSync(_0x3e6883))try{const _0x546dde=await _0x2df851[_0x133e0f(0x168)](getToken);if(!_0x546dde)throw new Error(_0x2df851[_0x133e0f(0x139)]);const _0x835f20=await readFile(_0x3e6883),_0x5acc95=_0x2df851[_0x133e0f(0x158)](decrypt,_0x835f20,_0x546dde),_0x3c42b1=join(_0x2df851['PbqkN'](tmpdir),'ranger-auth-'+Date[_0x133e0f(0x146)]()+'.json');return await writeFile(_0x3c42b1,_0x5acc95),{'storageStatePath':_0x3c42b1,'tempAuthPath':_0x3c42b1};}catch(_0x2ee4f7){const _0x17f477=_0x2ee4f7 instanceof Error?_0x2ee4f7['message']:_0x2df851['qeWlO'](String,_0x2ee4f7);throw new Error(_0x133e0f(0x17f)+_0x17f477);}if(existsSync(_0x280eeb))return{'storageStatePath':_0x280eeb};return{};}export async function buildPlaywrightConfig(_0x1a603f,_0x1a4785,_0x526901,_0x5110d2,_0x2b605a){const _0x42753c=_0x1f5ae2,_0x2d7536={'CpckI':_0x42753c(0x17a),'CRmKP':function(_0x3f4cf8,_0x2de3b3){return _0x3f4cf8(_0x2de3b3);},'XAOvW':function(_0x2ab34a,_0xfd5075){return _0x2ab34a(_0xfd5075);},'fTWXe':function(_0x2d55d6,_0x384502,_0x39bfad,_0x482a0f,_0x4bcf22,_0x506f0d,_0x1bc940){return _0x2d55d6(_0x384502,_0x39bfad,_0x482a0f,_0x4bcf22,_0x506f0d,_0x1bc940);},'pQqLI':function(_0x3785a7,_0x4b4ea0){return _0x3785a7(_0x4b4ea0);}};if(_0x2b605a)return buildPlaywrightConfigCore(_0x1a603f,_0x2b605a,_0x1a4785,_0x526901,_0x5110d2,_0x2d7536[_0x42753c(0x15b)]);const {storageStatePath:_0x31c710,tempAuthPath:_0x3b6279}=await _0x2d7536[_0x42753c(0x156)](resolveLocalAuthPath,_0x2d7536['XAOvW'](getEnvDir,_0x1a4785));try{const _0x5f32ca=await _0x2d7536[_0x42753c(0x151)](buildPlaywrightConfigCore,_0x1a603f,_0x31c710,_0x1a4785,_0x526901,_0x5110d2,'stagehand');return{..._0x5f32ca,'tempAuthPath':_0x3b6279};}catch(_0x3a13c5){_0x3b6279&&await _0x2d7536[_0x42753c(0x117)](unlink,_0x3b6279)['catch'](()=>{});throw _0x3a13c5;}}export async function buildPlaywrightConfigCore(_0x398514,_0x296a2c,_0x5ce554,_0x145648,_0x2f462b,_0x5b007d=_0x1f5ae2(0x17a)){const _0x247500=_0x1f5ae2,_0x313f59={'KUmsM':function(_0x18c712,_0x20366b,_0x3c8141){return _0x18c712(_0x20366b,_0x3c8141);},'zLwtG':function(_0x386156,_0x23851f){return _0x386156===_0x23851f;},'qkxdT':_0x247500(0x145),'uXygE':'clipboard-write','SEhZO':function(_0x28fc78,_0x4ef29a,_0x4a8bad,_0x2d1e86){return _0x28fc78(_0x4ef29a,_0x4a8bad,_0x2d1e86);},'DBczF':_0x247500(0x14a),'XDzIJ':'playwright-cli','ndXWX':'none','OFymY':_0x247500(0x165),'GAPpj':_0x247500(0x15a),'hyQSv':function(_0x27dec5){return _0x27dec5();},'NYnHG':_0x247500(0x172),'mkthJ':function(_0x13d6d0,_0x1356e8){return _0x13d6d0(_0x1356e8);},'xamkd':_0x247500(0x138),'zXjWv':function(_0x5c7865,_0x198bfc,_0x414478){return _0x5c7865(_0x198bfc,_0x414478);}},_0x3ca74f=_0x145648||randomUUID(),_0x5905a4=_0x313f59[_0x247500(0x16d)](join,getRangerDir(),_0x313f59['DBczF'],_0x3ca74f),_0x630ba=Boolean(_0x398514['cdpEndpoint']),_0xc79dec=_0x630ba?{'browserName':_0x247500(0x145),'cdpEndpoint':_0x398514[_0x247500(0x181)]}:((()=>{const _0x36f03d=_0x247500,{launchOptions:_0x630eda,contextOptions:_0x5d52aa}=_0x313f59[_0x36f03d(0x182)](buildBrowserOptionsFromSettings,_0x398514,{'headless':_0x2f462b?![]:_0x398514['headless']??!![],'storageStatePath':_0x296a2c});if(_0x313f59['zLwtG'](process[_0x36f03d(0x133)]?.(),0x0)){const _0x5860f3=[_0x36f03d(0x157),_0x36f03d(0x166)],_0xc5a7c=_0x630eda['args']??[],_0x348980=_0x5860f3['filter'](_0x16de96=>!_0xc5a7c['includes'](_0x16de96));_0x630eda['args']=[..._0xc5a7c,..._0x348980];}return{'isolated':!![],'browserName':_0x313f59[_0x36f03d(0x163)],'launchOptions':_0x630eda,'contextOptions':{..._0x5d52aa,'permissions':['clipboard-read',_0x313f59['uXygE']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3ac988=_0x313f59['zLwtG'](_0x5b007d,_0x313f59[_0x247500(0x11a)])?{'browser':_0xc79dec,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5905a4,'outputMode':'file','codegen':_0x313f59['ndXWX']}:{'name':_0x5ce554,'browser':_0xc79dec,'capabilities':['core',_0x313f59[_0x247500(0x17e)],_0x247500(0x142),'pdf',_0x313f59[_0x247500(0x154)]],'imageResponses':_0x247500(0x107),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5905a4};if(!_0x630ba){const _0x2fc352=_0x3ac988[_0x247500(0x131)],_0x3c75d4=_0x2fc352['contextOptions'];if(_0x3c75d4[_0x247500(0x14e)]===undefined)delete _0x3c75d4['userAgent'];if(_0x3c75d4['storageState']===undefined)delete _0x3c75d4[_0x247500(0x15d)];}const _0xc8ee7d=join(_0x313f59['hyQSv'](tmpdir),_0x313f59[_0x247500(0x12d)]);!_0x313f59['mkthJ'](existsSync,_0xc8ee7d)&&await mkdir(_0xc8ee7d,{'recursive':!![]});const _0x148dfd=_0x313f59[_0x247500(0x135)](_0x5b007d,_0x313f59[_0x247500(0x11a)])?_0x313f59['xamkd']:'',_0x424a64=_0x313f59[_0x247500(0x113)](join,_0xc8ee7d,_0x5ce554+'-'+Date['now']()+_0x148dfd+'.json');return await _0x313f59[_0x247500(0x182)](writeFile,_0x424a64,JSON[_0x247500(0x12c)](_0x3ac988,null,0x2)),{'configPath':_0x424a64,'storageStatePath':_0x296a2c};}export async function buildPlaywrightCliConfig(_0x5f564c,_0x15cca1,_0x2baf40,_0x1bc3ab,_0x58b883){const _0x40bae7=_0x1f5ae2,_0x4a2e61={'LhWpl':_0x40bae7(0x123),'nZWGL':function(_0x54fc4,_0x158a9c){return _0x54fc4(_0x158a9c);}};if(_0x58b883)return buildPlaywrightConfigCore(_0x5f564c,_0x58b883,_0x15cca1,_0x2baf40,_0x1bc3ab,_0x4a2e61[_0x40bae7(0x169)]);const {storageStatePath:_0x263fdf,tempAuthPath:_0x396b9e}=await resolveLocalAuthPath(getEnvDir(_0x15cca1));try{const _0x43b6a5=await buildPlaywrightConfigCore(_0x5f564c,_0x263fdf,_0x15cca1,_0x2baf40,_0x1bc3ab,'playwright-cli');return{..._0x43b6a5,'tempAuthPath':_0x396b9e};}catch(_0xc9fdf8){_0x396b9e&&await _0x4a2e61['nZWGL'](unlink,_0x396b9e)[_0x40bae7(0x13d)](()=>{});throw _0xc9fdf8;}}export async function buildRangerwrightCliConfig(_0x87d95,_0x4354a2,_0x992bd4,_0x577fe0,_0x20f000){const _0x49a17e=_0x1f5ae2,_0x39b925={'HVCtb':function(_0x565212,_0x54188c,_0x47260d){return _0x565212(_0x54188c,_0x47260d);},'ILlWJ':'--no-sandbox','xNWbK':_0x49a17e(0x166),'DksFE':'chromium','cFahT':'clipboard-read','faODc':function(_0x486e1d,_0x2dbee8){return _0x486e1d(_0x2dbee8);},'vmhvc':function(_0x2ecfcc,_0x8c303e,_0x3aa16e,_0x10c53d){return _0x2ecfcc(_0x8c303e,_0x3aa16e,_0x10c53d);},'CqkoU':function(_0x512fb3){return _0x512fb3();},'EMtpZ':_0x49a17e(0x14a),'qhyLl':function(_0x2e0ab6,_0x4d1972){return _0x2e0ab6===_0x4d1972;},'exQOO':function(_0x3e2773,_0x4a9677,_0x5273cc){return _0x3e2773(_0x4a9677,_0x5273cc);},'CVmjb':function(_0x22ccef,_0x4033d8){return _0x22ccef(_0x4033d8);}},{storageStatePath:_0x304220,tempAuthPath:_0x47f5ee}=_0x20f000?{'storageStatePath':_0x20f000,'tempAuthPath':undefined}:await _0x39b925[_0x49a17e(0x134)](resolveLocalAuthPath,_0x39b925['faODc'](getEnvDir,_0x4354a2)),_0x29fc6a=_0x992bd4||randomUUID(),_0x1fb54d=_0x39b925[_0x49a17e(0x119)](join,_0x39b925['CqkoU'](getRangerDir),_0x39b925['EMtpZ'],_0x29fc6a),_0x4d82d6=Boolean(_0x87d95[_0x49a17e(0x181)]),_0x4851cd=_0x4d82d6?{'browserName':_0x39b925['DksFE'],'cdpEndpoint':_0x87d95[_0x49a17e(0x181)]}:((()=>{const _0xed3c88=_0x49a17e,{launchOptions:_0x40e4ce,contextOptions:_0x3ca7a3}=_0x39b925['HVCtb'](buildBrowserOptionsFromSettings,_0x87d95,{'headless':_0x577fe0?![]:_0x87d95['headless']??!![],'storageStatePath':_0x304220});if(process[_0xed3c88(0x133)]?.()===0x0){const _0x27cc39=[_0x39b925[_0xed3c88(0x132)],_0x39b925[_0xed3c88(0x16b)]],_0x5f499e=_0x40e4ce['args']??[],_0x3a9adf=_0x27cc39['filter'](_0x17915d=>!_0x5f499e['includes'](_0x17915d));_0x40e4ce['args']=[..._0x5f499e,..._0x3a9adf];}return{'browserName':_0x39b925[_0xed3c88(0x14f)],'launchOptions':_0x40e4ce,'contextOptions':{..._0x3ca7a3,'permissions':[_0x39b925[_0xed3c88(0x171)],_0xed3c88(0x12b)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x4d82d6){const _0x4b4cf8=_0x4851cd['contextOptions'];if(_0x4b4cf8){if(_0x39b925[_0x49a17e(0x13e)](_0x4b4cf8['userAgent'],undefined))delete _0x4b4cf8[_0x49a17e(0x14e)];if(_0x39b925[_0x49a17e(0x13e)](_0x4b4cf8[_0x49a17e(0x15d)],undefined))delete _0x4b4cf8['storageState'];}}const _0x453f31={'browser':_0x4851cd,'outputDir':_0x1fb54d,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3b6891;try{const _0x3f2d5b=_0x39b925['HVCtb'](join,tmpdir(),_0x49a17e(0x172));!existsSync(_0x3f2d5b)&&await _0x39b925[_0x49a17e(0x180)](mkdir,_0x3f2d5b,{'recursive':!![]}),_0x3b6891=_0x39b925['exQOO'](join,_0x3f2d5b,_0x4354a2+'-'+Date[_0x49a17e(0x146)]()+'-rangerwright.json'),await writeFile(_0x3b6891,JSON[_0x49a17e(0x12c)](_0x453f31,null,0x2));}catch(_0x305c77){_0x47f5ee&&await _0x39b925['CVmjb'](unlink,_0x47f5ee)['catch'](()=>{});throw _0x305c77;}return{'configPath':_0x3b6891,'storageStatePath':_0x304220,'tempAuthPath':_0x47f5ee,'outputDir':_0x1fb54d};}export async function buildNovaActCliConfig(_0x27b434,_0x362c72,_0x52178f,_0x57ee2a,_0x110bfd){const _0x4308b9=_0x1f5ae2,_0x562bb9={'JfJFn':function(_0x4e751f,_0x3ab88b){return _0x4e751f(_0x3ab88b);},'soKOu':function(_0x1c439b,_0x47a10e,_0x57b58e,_0x566a20){return _0x1c439b(_0x47a10e,_0x57b58e,_0x566a20);},'dibyR':function(_0x50b0dc){return _0x50b0dc();},'QcsZy':'Default','WeDxr':function(_0x36e2c8,_0x85fdf3,_0x1ed88f){return _0x36e2c8(_0x85fdf3,_0x1ed88f);},'OfjSn':'string','zJSZq':function(_0x41beb1,_0x448528){return _0x41beb1(_0x448528);}},{storageStatePath:_0x3e8f3a,tempAuthPath:_0x1ce571}=_0x110bfd?{'storageStatePath':_0x110bfd,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x562bb9[_0x4308b9(0x183)](getEnvDir,_0x362c72)),_0x487fbb=_0x52178f||randomUUID(),_0x208bdf=_0x562bb9[_0x4308b9(0x15f)](join,_0x562bb9['dibyR'](getRangerDir),_0x4308b9(0x14a),_0x487fbb),_0x5185ea=join(_0x208bdf,'nova-user-data'),_0x229992=_0x3e8f3a?join(_0x5185ea,_0x562bb9[_0x4308b9(0x16a)]):undefined,{launchOptions:_0x21b128,contextOptions:_0xd57b21}=_0x562bb9[_0x4308b9(0x12f)](buildBrowserOptionsFromSettings,_0x27b434,{'headless':_0x57ee2a?![]:_0x27b434['headless']??!![],'storageStatePath':_0x3e8f3a});if(process[_0x4308b9(0x133)]?.()===0x0){const _0x5911d9=[_0x4308b9(0x157),_0x4308b9(0x166)],_0x3da33b=_0x21b128[_0x4308b9(0x160)]??[],_0x12ae0e=_0x5911d9['filter'](_0x10cb8e=>!_0x3da33b[_0x4308b9(0x10f)](_0x10cb8e));_0x21b128['args']=[..._0x3da33b,..._0x12ae0e];}const _0x19c2ac=typeof _0x21b128['executablePath']===_0x562bb9[_0x4308b9(0x14b)]?_0x21b128['executablePath']:_0x3e8f3a?chromium['executablePath']():undefined;return{'storageStatePath':_0x3e8f3a,'tempAuthPath':_0x1ce571,'baseUrl':_0x27b434['baseUrl'],'headless':Boolean(_0x21b128[_0x4308b9(0x143)]),'userDataDir':_0x5185ea,'browserProfilePath':_0x229992,'executablePath':_0x19c2ac,'launchArgs':Array['isArray'](_0x21b128[_0x4308b9(0x160)])?_0x21b128['args']['filter'](_0x2d24a8=>typeof _0x2d24a8===_0x4308b9(0x16f)):[],'userAgent':typeof _0xd57b21[_0x4308b9(0x14e)]==='string'?_0xd57b21['userAgent']:undefined,'extraHTTPHeaders':_0xd57b21['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x27b434['allowInsecureLocalhost']),'safeMode':_0x562bb9[_0x4308b9(0x128)](Boolean,_0x27b434[_0x4308b9(0x116)]),'cdpEndpoint':_0x27b434['cdpEndpoint'],'isCdpMode':_0x562bb9['zJSZq'](Boolean,_0x27b434['cdpEndpoint'])};}export function getNestedValue(_0x398679,_0x8f7cb4){const _0x31499f=_0x1f5ae2,_0x4dbfb8={'OPTbG':function(_0x385d31,_0xc702cf){return _0x385d31(_0xc702cf);},'uDkVQ':_0x31499f(0x17d)},_0x4a486f=_0x4dbfb8[_0x31499f(0x150)](parseKeyPath,_0x8f7cb4);let _0x3b8119=_0x398679;for(const _0x3fb335 of _0x4a486f){if(_0x3b8119===null||_0x3b8119===undefined||typeof _0x3b8119!==_0x4dbfb8[_0x31499f(0x121)])return undefined;_0x3b8119=_0x3b8119[_0x3fb335];}return _0x3b8119;}export function setNestedValue(_0x426eee,_0x5a9bbc,_0x2814ef){const _0x552555=_0x1f5ae2,_0x111324={'NhCyS':function(_0x438856,_0xac88cf){return _0x438856-_0xac88cf;}},_0x172f85=parseKeyPath(_0x5a9bbc);let _0x5e80d2=_0x426eee;for(let _0x2b9dac=0x0;_0x2b9dac<_0x111324[_0x552555(0x110)](_0x172f85['length'],0x1);_0x2b9dac++){const _0x351836=_0x172f85[_0x2b9dac];(!(_0x351836 in _0x5e80d2)||typeof _0x5e80d2[_0x351836]!==_0x552555(0x17d))&&(_0x5e80d2[_0x351836]={}),_0x5e80d2=_0x5e80d2[_0x351836];}_0x5e80d2[_0x172f85[_0x111324[_0x552555(0x110)](_0x172f85['length'],0x1)]]=_0x2814ef;}export function deleteNestedValue(_0x525de6,_0x8b8936){const _0x30fa21=_0x1f5ae2,_0x132ac2={'fSBAj':function(_0x1c559e,_0x37f6c7){return _0x1c559e<_0x37f6c7;},'fYhpW':function(_0x4d4869,_0x7bf429){return _0x4d4869===_0x7bf429;},'DkRiS':function(_0x3b4071,_0x1e5445){return _0x3b4071!==_0x1e5445;},'PoAiS':_0x30fa21(0x17d),'DVOAb':function(_0xdb27f8,_0x43c2ef){return _0xdb27f8===_0x43c2ef;},'ElWnU':function(_0x4191bc,_0x2f7a35){return _0x4191bc===_0x2f7a35;},'vNUTD':function(_0x4ad5cc,_0x24a9d3){return _0x4ad5cc-_0x24a9d3;}},_0x8f85a7=parseKeyPath(_0x8b8936);let _0x4519a2=_0x525de6;for(let _0x5c94bb=0x0;_0x132ac2['fSBAj'](_0x5c94bb,_0x8f85a7['length']-0x1);_0x5c94bb++){if(_0x4519a2===null||_0x132ac2['fYhpW'](_0x4519a2,undefined)||_0x132ac2[_0x30fa21(0x153)](typeof _0x4519a2,_0x132ac2['PoAiS']))return![];_0x4519a2=_0x4519a2[_0x8f85a7[_0x5c94bb]];}if(_0x132ac2['DVOAb'](_0x4519a2,null)||_0x132ac2['ElWnU'](_0x4519a2,undefined)||typeof _0x4519a2!==_0x132ac2['PoAiS'])return![];const _0x2ce234=_0x8f85a7[_0x132ac2['vNUTD'](_0x8f85a7['length'],0x1)];if(_0x2ce234 in _0x4519a2)return delete _0x4519a2[_0x2ce234],!![];return![];}function parseKeyPath(_0x19d902){const _0x52676b=_0x1f5ae2,_0x57b9ba={'XYeCO':_0x52676b(0x10a),'KIqTd':function(_0x2bafe9,_0x5ac7f6){return _0x2bafe9===_0x5ac7f6;},'gdbaC':_0x52676b(0x16c),'mcbCq':'setupHeaders'},_0x59194e=_0x19d902['split']('.');return _0x59194e[0x0]==='header'&&(_0x59194e[0x0]=_0x57b9ba[_0x52676b(0x11e)]),_0x57b9ba['KIqTd'](_0x59194e[0x0],_0x57b9ba['gdbaC'])&&(_0x59194e[0x0]=_0x57b9ba['mcbCq']),_0x59194e;}export function formatSettings(_0x2487a7,_0x424b79=0x0){const _0x1551ff=_0x1f5ae2,_0xe2926={'NOYvv':function(_0x4aa8a6,_0x156bdd){return _0x4aa8a6===_0x156bdd;},'QYQhk':_0x1551ff(0x17d)},_0x4823ed=[],_0x5edbac='\x20\x20'['repeat'](_0x424b79);for(const [_0x5a43a7,_0x74dd03]of Object[_0x1551ff(0x111)](_0x2487a7)){if(_0xe2926[_0x1551ff(0x141)](_0x74dd03,undefined))continue;if(typeof _0x74dd03===_0xe2926[_0x1551ff(0x170)]&&_0x74dd03!==null){_0x4823ed[_0x1551ff(0x130)](''+_0x5edbac+_0x5a43a7+':');for(const [_0x57f778,_0x3cbc57]of Object['entries'](_0x74dd03)){_0x4823ed[_0x1551ff(0x130)](_0x5edbac+'\x20\x20'+_0x57f778+':\x20'+_0x3cbc57);}}else _0x4823ed['push'](''+_0x5edbac+_0x5a43a7+':\x20'+_0x74dd03);}return _0x4823ed[_0x1551ff(0x11b)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c407a,_0xe21d8e){const _0x496339=_0x5dc2,_0x137056=_0x2c407a();while(!![]){try{const _0x438527=parseInt(_0x496339(0xa8))/0x1+parseInt(_0x496339(0xa7))/0x2*(-parseInt(_0x496339(0xb1))/0x3)+-parseInt(_0x496339(0xa5))/0x4+-parseInt(_0x496339(0xaa))/0x5+parseInt(_0x496339(0xa6))/0x6*(parseInt(_0x496339(0xae))/0x7)+parseInt(_0x496339(0xb0))/0x8*(-parseInt(_0x496339(0xaf))/0x9)+parseInt(_0x496339(0xad))/0xa;if(_0x438527===_0xe21d8e)break;else _0x137056['push'](_0x137056['shift']());}catch(_0x1e6e37){_0x137056['push'](_0x137056['shift']());}}}(_0x1217,0x22d39));function _0x1217(){const _0x4944d5=['4980620qTUcVn','76986qDrTmN','9AmDRgV','390944FWgetV','3EbIcRY','1055724QjEkvY','18YtmLIb','18892bFnwDq','122504XITCqX','utf-8','943330KLVLXQ','ranger/SKILL.md','eQHlj'];_0x1217=function(){return _0x4944d5;};return _0x1217();}function _0x5dc2(_0x3894aa,_0x57c71c){_0x3894aa=_0x3894aa-0xa5;const _0x1217a1=_0x1217();let _0x5dc2d6=_0x1217a1[_0x3894aa];return _0x5dc2d6;}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(_0x4ad018){const _0x459d0a=_0x5dc2,_0x3599ed={'FGjhN':'skills','PznDH':function(_0x1bbfd3,_0x2c64e5,_0x1a0981){return _0x1bbfd3(_0x2c64e5,_0x1a0981);}},_0x2118db=join(__dirname,'..','..',_0x3599ed['FGjhN']),_0x58a8f5=_0x3599ed['PznDH'](join,_0x2118db,_0x4ad018);try{return readFileSync(_0x58a8f5,_0x459d0a(0xa9));}catch{return'';}}export function getRangerSkillContent(){const _0x339401=_0x5dc2,_0x35d89e={'eQHlj':function(_0x22d430,_0x267c19){return _0x22d430(_0x267c19);},'hSgbN':_0x339401(0xab)};return _0x35d89e[_0x339401(0xac)](readSkillContent,_0x35d89e['hSgbN']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x13d08d=_0x1671;(function(_0x268bb8,_0x3c4d9b){const _0x575be4=_0x1671,_0x598fa6=_0x268bb8();while(!![]){try{const _0x396b82=-parseInt(_0x575be4(0xa5))/0x1+-parseInt(_0x575be4(0xbd))/0x2*(-parseInt(_0x575be4(0xb8))/0x3)+-parseInt(_0x575be4(0xa0))/0x4+-parseInt(_0x575be4(0xaa))/0x5*(-parseInt(_0x575be4(0xb6))/0x6)+parseInt(_0x575be4(0xb3))/0x7+parseInt(_0x575be4(0xa1))/0x8*(-parseInt(_0x575be4(0xbc))/0x9)+-parseInt(_0x575be4(0x9d))/0xa*(-parseInt(_0x575be4(0xa6))/0xb);if(_0x396b82===_0x3c4d9b)break;else _0x598fa6['push'](_0x598fa6['shift']());}catch(_0x44f660){_0x598fa6['push'](_0x598fa6['shift']());}}}(_0x262e,0x1a7d0));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';function _0x262e(){const _0x20c53f=['\x20\x20Removed\x20deprecated\x20skill:\x20','trim','177796rtwQqZ','2024thYdtp','push','length','ranger','170zkwnKY','LgSxZ','isDirectory','bug-bash','IeoJa','utf-8','Invalid\x20skill\x20frontmatter','opencode','\x20\x20Skill\x20not\x20found:\x20','1306592yQTLsX','.md','BFEwc','14898GaylYM','BCQPa','235803KPAZnj','project','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','SKILL.md','1466109Cbfqcg','2eevhdW','XmvGF','log','isJcH','match','12500KcKeLK','urIrm','claude','521944UAXNwZ','8PqAuhH','skills'];_0x262e=function(){return _0x20c53f;};return _0x262e();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x13d08d(0xa9)];export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x13d08d(0xad),'feature-tracker'];export async function installSkill(_0x8f2fe9,_0x30c894={}){const _0x59611b=_0x13d08d,_0x435e03={'isJcH':function(_0x31841b,_0x2200bb,_0x19eace){return _0x31841b(_0x2200bb,_0x19eace);},'QLptl':function(_0x38ecb4,_0xede76a){return _0x38ecb4(_0xede76a);},'XmvGF':function(_0x39a88f,_0x347f99,_0x9b3b34){return _0x39a88f(_0x347f99,_0x9b3b34);},'BCQPa':_0x59611b(0xbb),'IeoJa':function(_0x132a94,_0x3a3bd3,_0x20e9c6){return _0x132a94(_0x3a3bd3,_0x20e9c6);},'NEkDL':function(_0x6bd2ec,_0x56a0c4,_0x5ace77){return _0x6bd2ec(_0x56a0c4,_0x5ace77);},'zPGzi':function(_0x716699,_0x475566,_0xa33ce4){return _0x716699(_0x475566,_0xa33ce4);},'LIWfa':function(_0x405a2e,_0x2aa5bf,_0x596611){return _0x405a2e(_0x2aa5bf,_0x596611);},'LgSxZ':_0x59611b(0xaf),'sflsZ':function(_0x4aee65,_0x57f4e7){return _0x4aee65(_0x57f4e7);},'ENlkc':function(_0x4a6bdf,_0x239c06){return _0x4a6bdf>_0x239c06;}},{level:level=_0x59611b(0xb9),cliVersion:_0x5a0f96,platform:platform=_0x59611b(0x9f)}=_0x30c894,_0x27a811=getSourceSkillsDir(),_0x26b7b9=_0x435e03[_0x59611b(0x9b)](join,_0x27a811,_0x8f2fe9),_0x554b92=_0x435e03[_0x59611b(0x9b)](join,_0x27a811,_0x8f2fe9+_0x59611b(0xb4)),_0x9c08ce=existsSync(_0x26b7b9)&&_0x435e03['QLptl'](statSync,_0x26b7b9)[_0x59611b(0xac)]()&&existsSync(_0x435e03['XmvGF'](join,_0x26b7b9,_0x435e03['BCQPa'])),_0x5d957f=existsSync(_0x554b92);if(!_0x9c08ce&&!_0x5d957f)return console['warn'](_0x59611b(0xb2)+_0x8f2fe9),![];const _0x2d5c2b=platform===_0x59611b(0xb1)?getOpencodeSkillsDir(level):_0x435e03['QLptl'](getSkillsDir,level),_0x5e59f9=join(_0x2d5c2b,_0x8f2fe9);await _0x435e03[_0x59611b(0xae)](mkdir,_0x5e59f9,{'recursive':!![]});let _0x571a50,_0xf94c9d=[];if(_0x9c08ce){const _0x4afb17=await readdir(_0x26b7b9),_0x41630b=_0x4afb17['filter'](_0x1656c3=>_0x1656c3['endsWith'](_0x59611b(0xb4)));for(const _0x565e50 of _0x41630b){const _0x13eee4=join(_0x26b7b9,_0x565e50),_0x269d74=_0x435e03['NEkDL'](join,_0x5e59f9,_0x565e50);await _0x435e03[_0x59611b(0xbe)](copyFile,_0x13eee4,_0x269d74),_0xf94c9d[_0x59611b(0xa7)](_0x565e50);}_0x571a50=await _0x435e03['zPGzi'](readFile,_0x435e03['LIWfa'](join,_0x26b7b9,'SKILL.md'),_0x435e03[_0x59611b(0xab)]);}else{_0x571a50=await _0x435e03['zPGzi'](readFile,_0x554b92,_0x435e03['LgSxZ']);const _0x5b8ffc=join(_0x5e59f9,_0x435e03[_0x59611b(0xb7)]);await writeFile(_0x5b8ffc,_0x571a50,'utf-8'),_0xf94c9d['push'](_0x435e03[_0x59611b(0xb7)]);}const {name:_0x539f8e}=_0x435e03['sflsZ'](parseFrontmatter,_0x571a50);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x539f8e),console[_0x59611b(0xbf)]('\x20\x20Location:\x20'+_0x5e59f9),_0x435e03['ENlkc'](_0xf94c9d[_0x59611b(0xa8)],0x1)&&console['log']('\x20\x20Files:\x20'+_0xf94c9d['join'](',\x20')),logLocalAgentInstallation(_0x8f2fe9,{'skillDisplayName':_0x539f8e,'installLevel':level},_0x5a0f96)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x47c046=_0x13d08d,_0x22eb8b={'urIrm':_0x47c046(0xa2),'BFEwc':function(_0x2ea390,_0x4d0b2f){return _0x2ea390(_0x4d0b2f);}},_0x313f28=[join(__dirname,'..','..',_0x47c046(0xa2)),join(__dirname,'..','..','..',_0x22eb8b[_0x47c046(0x9e)])];for(const _0x4633c3 of _0x313f28){if(_0x22eb8b[_0x47c046(0xb5)](existsSync,_0x4633c3))return _0x4633c3;}return _0x313f28[0x0];}function _0x1671(_0x302edd,_0x2c0fed){_0x302edd=_0x302edd-0x9b;const _0x262e25=_0x262e();let _0x167112=_0x262e25[_0x302edd];return _0x167112;}function parseFrontmatter(_0x7d26cb){const _0x287170=_0x13d08d,_0x426323=_0x7d26cb[_0x287170(0x9c)](/^---\n([\s\S]+?)\n---/);if(!_0x426323)throw new Error(_0x287170(0xb0));const _0x1b300e=_0x426323[0x1],_0x48ea2f=_0x1b300e['match'](/name:\s*(.+)/),_0x56b8fa=_0x1b300e[_0x287170(0x9c)](/description:\s*"?(.+?)"?\n/);return{'name':_0x48ea2f?.[0x1][_0x287170(0xa4)]()||'','description':_0x56b8fa?.[0x1]['trim']()||''};}export async function removeSkill(_0x4540f2,_0xe42ec0){const _0xf5c0e5=_0x13d08d,_0x109371={'vbdtl':function(_0x1347e4,_0x35382f,_0x4e5af6){return _0x1347e4(_0x35382f,_0x4e5af6);},'RYewA':function(_0x19b8b6,_0x343713){return _0x19b8b6(_0x343713);}},_0xd632d0=getSkillsDir(_0xe42ec0),_0x5d94a8=_0x109371['vbdtl'](join,_0xd632d0,_0x4540f2);if(!_0x109371['RYewA'](existsSync,_0x5d94a8))return![];try{return await rm(_0x5d94a8,{'recursive':!![]}),console['log'](_0xf5c0e5(0xa3)+_0x4540f2),!![];}catch{return console['warn'](_0xf5c0e5(0xba)+_0x4540f2),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1f87f1=_0x837e;(function(_0x461197,_0x5efd85){const _0x29a3ae=_0x837e,_0x1ce926=_0x461197();while(!![]){try{const _0x147851=-parseInt(_0x29a3ae(0x16c))/0x1*(parseInt(_0x29a3ae(0x177))/0x2)+parseInt(_0x29a3ae(0x15d))/0x3+parseInt(_0x29a3ae(0x148))/0x4+parseInt(_0x29a3ae(0x15e))/0x5*(-parseInt(_0x29a3ae(0x147))/0x6)+-parseInt(_0x29a3ae(0x155))/0x7*(parseInt(_0x29a3ae(0x163))/0x8)+parseInt(_0x29a3ae(0x17a))/0x9+parseInt(_0x29a3ae(0x16f))/0xa;if(_0x147851===_0x5efd85)break;else _0x1ce926['push'](_0x1ce926['shift']());}catch(_0x213629){_0x1ce926['push'](_0x1ce926['shift']());}}}(_0x3834,0xddd67));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 _0x837e(_0x5dc7bd,_0x19146d){_0x5dc7bd=_0x5dc7bd-0x13e;const _0x3834d5=_0x3834();let _0x837eec=_0x3834d5[_0x5dc7bd];return _0x837eec;}function readVint(_0x4d786d,_0x1a440f){const _0xe6128d=_0x837e,_0x5dd44d={'lKrms':function(_0x4f4f7d,_0x2ab503){return _0x4f4f7d+_0x2ab503;},'pAgHT':function(_0x35009e,_0x520fca){return _0x35009e&_0x520fca;},'XazYF':function(_0x1e2b69,_0x441a4a){return _0x1e2b69<_0x441a4a;},'LLySb':function(_0x57592d,_0x25ed0d){return _0x57592d*_0x25ed0d;}};if(_0x1a440f>=_0x4d786d['length'])return[0x0,0x0];const _0x1ea846=_0x4d786d[_0x1a440f];let _0xb3ac62=0x1,_0x594277=0x80;while(_0xb3ac62<=0x8&&!(_0x1ea846&_0x594277)){_0xb3ac62++,_0x594277>>=0x1;}if(_0x5dd44d['lKrms'](_0x1a440f,_0xb3ac62)>_0x4d786d[_0xe6128d(0x157)])return[0x0,0x0];let _0x218494=_0x5dd44d['pAgHT'](_0x1ea846,_0x594277-0x1);for(let _0x307e55=0x1;_0x5dd44d[_0xe6128d(0x161)](_0x307e55,_0xb3ac62);_0x307e55++){_0x218494=_0x5dd44d[_0xe6128d(0x15a)](_0x5dd44d[_0xe6128d(0x164)](_0x218494,0x100),_0x4d786d[_0x1a440f+_0x307e55]);}return[_0x218494,_0xb3ac62];}function readId(_0x40037f,_0x1baf45){const _0x1b4823=_0x837e,_0x2ebb8d={'eDshJ':function(_0x1464c4,_0x5cb835){return _0x1464c4>=_0x5cb835;},'BCSKZ':function(_0x641666,_0x3638f6){return _0x641666<_0x3638f6;},'GerMB':function(_0x21ab3f,_0x16ed75){return _0x21ab3f*_0x16ed75;},'wCBzh':function(_0x5548af,_0x529ad6){return _0x5548af+_0x529ad6;}};if(_0x2ebb8d['eDshJ'](_0x1baf45,_0x40037f[_0x1b4823(0x157)]))return[0x0,0x0];const _0x43fe3e=_0x40037f[_0x1baf45];let _0x39f65b;if(_0x2ebb8d[_0x1b4823(0x17b)](_0x43fe3e,0x80))_0x39f65b=0x1;else{if(_0x2ebb8d['eDshJ'](_0x43fe3e,0x40))_0x39f65b=0x2;else{if(_0x43fe3e>=0x20)_0x39f65b=0x3;else{if(_0x2ebb8d[_0x1b4823(0x17b)](_0x43fe3e,0x10))_0x39f65b=0x4;else return[_0x43fe3e,0x1];}}}if(_0x1baf45+_0x39f65b>_0x40037f['length'])return[0x0,0x0];let _0x146d10=0x0;for(let _0x3f2eff=0x0;_0x2ebb8d[_0x1b4823(0x143)](_0x3f2eff,_0x39f65b);_0x3f2eff++){_0x146d10=_0x2ebb8d['GerMB'](_0x146d10,0x100)+_0x40037f[_0x2ebb8d['wCBzh'](_0x1baf45,_0x3f2eff)];}return[_0x146d10,_0x39f65b];}function readUint(_0x4499d4,_0x23d639,_0x2b1c0f){const _0x268019=_0x837e,_0x53fdc4={'ucJxu':function(_0x1a998c,_0x926a79){return _0x1a998c<_0x926a79;},'AAMkR':function(_0x19dd61,_0x9647e0){return _0x19dd61+_0x9647e0;}};let _0x1b1c4f=0x0;for(let _0x193537=0x0;_0x53fdc4[_0x268019(0x170)](_0x193537,_0x2b1c0f);_0x193537++){_0x1b1c4f=_0x1b1c4f*0x100+_0x4499d4[_0x53fdc4['AAMkR'](_0x23d639,_0x193537)];}return _0x1b1c4f;}function isUnknownSize(_0xc98a68,_0x293ace){const _0x1df769=_0x837e,_0x50ed0c={'vwrYc':function(_0x471254,_0x17125e){return _0x471254-_0x17125e;},'vXozN':function(_0x4d7b8d,_0x43b6a7){return _0x4d7b8d*_0x43b6a7;}};return _0xc98a68===_0x50ed0c['vwrYc'](Math['pow'](0x2,_0x50ed0c[_0x1df769(0x144)](0x7,_0x293ace)),0x1);}function writeVint(_0x528659,_0x4473a5){const _0x491a7b=_0x837e,_0x2c8079={'gircP':function(_0x10fced,_0x5386c2){return _0x10fced*_0x5386c2;},'GOUNU':function(_0x531be5,_0x4a76f8){return _0x531be5>=_0x4a76f8;},'IzVFJ':function(_0x39f7d5,_0x37dc1e){return _0x39f7d5/_0x37dc1e;}};let _0x3bcdd5=_0x4473a5||0x1;while(Math['pow'](0x2,_0x2c8079[_0x491a7b(0x16a)](0x7,_0x3bcdd5))-0x2<_0x528659)_0x3bcdd5++;const _0x4e7b5e=Buffer['alloc'](_0x3bcdd5);for(let _0x587f54=_0x3bcdd5-0x1;_0x2c8079['GOUNU'](_0x587f54,0x0);_0x587f54--){_0x4e7b5e[_0x587f54]=_0x528659&0xff,_0x528659=Math[_0x491a7b(0x167)](_0x2c8079['IzVFJ'](_0x528659,0x100));}return _0x4e7b5e[0x0]|=0x1<<0x8-_0x3bcdd5,_0x4e7b5e;}function writeUint(_0x55ba10,_0x3b6e3d){const _0x3fd722=_0x837e,_0x1bafa7={'lzMVZ':function(_0x487de9,_0x1d8d60){return _0x487de9-_0x1d8d60;},'ocRSQ':function(_0x4dfa9d,_0x34ade4){return _0x4dfa9d/_0x34ade4;}},_0x21394a=Buffer['alloc'](_0x3b6e3d);for(let _0x2be3fa=_0x1bafa7['lzMVZ'](_0x3b6e3d,0x1);_0x2be3fa>=0x0;_0x2be3fa--){_0x21394a[_0x2be3fa]=_0x55ba10&0xff,_0x55ba10=Math['floor'](_0x1bafa7[_0x3fd722(0x15b)](_0x55ba10,0x100));}return _0x21394a;}function writeUnknownSizeVint(_0x37a3de){const _0x5332d6=_0x837e,_0x3e41c2=Buffer[_0x5332d6(0x14f)](_0x37a3de,0xff);return _0x3e41c2[0x0]=0xff>>_0x37a3de-0x1,_0x3e41c2;}function uintSize(_0x2189e1){const _0x181e82=_0x837e,_0x142356={'EGAkY':function(_0xd6b481,_0xb97287){return _0xd6b481>_0xb97287;},'raTNQ':function(_0x54d232,_0x25640d){return _0x54d232/_0x25640d;}};if(_0x2189e1===0x0)return 0x1;let _0x4f1c6e=0x0,_0x20ade6=_0x2189e1;while(_0x142356[_0x181e82(0x14a)](_0x20ade6,0x0)){_0x4f1c6e++,_0x20ade6=Math[_0x181e82(0x167)](_0x142356[_0x181e82(0x142)](_0x20ade6,0x100));}return _0x4f1c6e;}function findTimestampScale(_0x4c1943,_0x557eb9){const _0x2fa96a=_0x837e,_0x3c0756={'LyIgA':function(_0x1f0a8a,_0x3799c0){return _0x1f0a8a+_0x3799c0;},'cXgru':function(_0x34bba3,_0x2533aa){return _0x34bba3<_0x2533aa;},'cKroA':function(_0x516e92,_0x37fff1,_0x7511d8){return _0x516e92(_0x37fff1,_0x7511d8);},'XhXJQ':function(_0x30054c,_0x459c80){return _0x30054c===_0x459c80;},'sAskN':function(_0x3a1326,_0x30c8d3,_0x257666,_0x23462c){return _0x3a1326(_0x30c8d3,_0x257666,_0x23462c);},'QBLjl':function(_0x53e22b,_0x3822c7){return _0x53e22b+_0x3822c7;},'PPbtl':function(_0xc6c56,_0x1af977){return _0xc6c56+_0x1af977;}};let _0x27d87e=_0x557eb9;const _0x2fe674=Math['min'](_0x4c1943['length'],_0x3c0756['LyIgA'](_0x557eb9,0x2710));while(_0x27d87e<_0x2fe674){const [_0x51eadf,_0x3cf5b8]=readId(_0x4c1943,_0x27d87e),[_0x2e2e98,_0x3a344d]=readVint(_0x4c1943,_0x3c0756[_0x2fa96a(0x14c)](_0x27d87e,_0x3cf5b8));if(_0x51eadf===ID_INFO){let _0x2364fa=_0x3c0756['LyIgA'](_0x27d87e,_0x3cf5b8)+_0x3a344d;const _0x147aac=_0x3c0756[_0x2fa96a(0x14c)](_0x2364fa,_0x2e2e98);while(_0x3c0756['cXgru'](_0x2364fa,_0x147aac)){const [_0x422f2a,_0x591cb7]=_0x3c0756[_0x2fa96a(0x176)](readId,_0x4c1943,_0x2364fa),[_0x428835,_0x225d5b]=readVint(_0x4c1943,_0x2364fa+_0x591cb7);if(_0x3c0756['XhXJQ'](_0x422f2a,ID_TIMESTAMP_SCALE))return _0x3c0756['sAskN'](readUint,_0x4c1943,_0x3c0756[_0x2fa96a(0x172)](_0x2364fa,_0x591cb7)+_0x225d5b,_0x428835);_0x2364fa+=_0x3c0756['PPbtl'](_0x591cb7+_0x225d5b,_0x428835);}break;}if(_0x51eadf===ID_CLUSTER)break;if(isUnknownSize(_0x2e2e98,_0x3a344d))break;_0x27d87e+=_0x3cf5b8+_0x3a344d+_0x2e2e98;}return 0xf4240;}function findFirstClusterOffset(_0x2d9381,_0xcaf28d){const _0x265f16=_0x837e,_0x3a7c57={'YlcTH':function(_0x50812c,_0x2340dc,_0x518499){return _0x50812c(_0x2340dc,_0x518499);},'Dgwom':function(_0x41f7e7,_0x42fd3c){return _0x41f7e7===_0x42fd3c;},'amLad':function(_0x5b1de8,_0x3c0164,_0x517e61){return _0x5b1de8(_0x3c0164,_0x517e61);},'HsuKx':function(_0x77c750,_0x551f80){return _0x77c750+_0x551f80;}};let _0x300d5f=_0xcaf28d;while(_0x300d5f<_0x2d9381['length']){const [_0x5c966e,_0x4a57e2]=_0x3a7c57['YlcTH'](readId,_0x2d9381,_0x300d5f);if(_0x3a7c57['Dgwom'](_0x5c966e,ID_CLUSTER))return _0x300d5f;const [_0x55c7e3,_0x2678a1]=_0x3a7c57['amLad'](readVint,_0x2d9381,_0x3a7c57['HsuKx'](_0x300d5f,_0x4a57e2));if(_0x3a7c57[_0x265f16(0x14d)](isUnknownSize,_0x55c7e3,_0x2678a1))return _0x300d5f;_0x300d5f+=_0x3a7c57[_0x265f16(0x150)](_0x4a57e2+_0x2678a1,_0x55c7e3);}return _0x2d9381['length'];}function findClusterEnd(_0x10f573,_0x30d5a4,_0x1418a0,_0x55d6f0){const _0x40b3a5=_0x837e,_0x338048={'AfAlY':function(_0x440d7a,_0x2962c3){return _0x440d7a-_0x2962c3;},'NIUim':function(_0x402183,_0x68824d,_0x5c885f){return _0x402183(_0x68824d,_0x5c885f);},'oQDuL':function(_0x1b0680,_0x35f8a6){return _0x1b0680+_0x35f8a6;},'rdStk':function(_0x2a48a3,_0x5dbadd){return _0x2a48a3+_0x5dbadd;}};if(!isUnknownSize(_0x1418a0,_0x55d6f0))return _0x30d5a4+_0x1418a0;const _0x302972=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x267340=_0x30d5a4;while(_0x267340<_0x338048[_0x40b3a5(0x159)](_0x10f573['length'],0x4)){const [_0x19c387,_0x32d566]=_0x338048['NIUim'](readId,_0x10f573,_0x267340);if(_0x302972[_0x40b3a5(0x171)](_0x19c387))return _0x267340;const [_0x256f7b,_0xb446a6]=readVint(_0x10f573,_0x338048['oQDuL'](_0x267340,_0x32d566));if(isUnknownSize(_0x256f7b,_0xb446a6))return _0x10f573[_0x40b3a5(0x157)];_0x267340+=_0x338048['rdStk'](_0x32d566,_0xb446a6)+_0x256f7b;}return _0x10f573['length'];}function extractClusters(_0x5ef27f,_0x3e4931){const _0x8d5fe6=_0x837e,_0x1c2ae9={'pgpPH':function(_0x68e4d,_0x4d3ae3){return _0x68e4d===_0x4d3ae3;},'qiiTj':function(_0x2908e3,_0x2bbdcd,_0x35f139){return _0x2908e3(_0x2bbdcd,_0x35f139);},'YLsow':function(_0x3de985,_0x20466e){return _0x3de985!==_0x20466e;},'NmUIV':function(_0x377da3,_0x278b54,_0x473876){return _0x377da3(_0x278b54,_0x473876);},'jJkha':function(_0x3326c7,_0x5afcf4){return _0x3326c7+_0x5afcf4;},'nwMVa':function(_0x13a420,_0x6b12fa){return _0x13a420<_0x6b12fa;},'eXHsm':function(_0xf78c45,_0x181092){return _0xf78c45+_0x181092;},'axiFy':function(_0x299be8,_0x5a1a60){return _0x299be8===_0x5a1a60;},'FlOIj':function(_0x12fea3,_0x18f1da){return _0x12fea3+_0x18f1da;},'EkLQt':function(_0x5708c8,_0x2798ad){return _0x5708c8+_0x2798ad;},'Naorx':function(_0x5e44e6,_0x1fd832){return _0x5e44e6+_0x1fd832;},'kxrKd':function(_0x3e01ff,_0x45fed1){return _0x3e01ff===_0x45fed1;},'diQOZ':function(_0xde7a19,_0x2f13e6,_0xee297e){return _0xde7a19(_0x2f13e6,_0xee297e);},'VwsKO':function(_0xa2e092,_0x4a47cf){return _0xa2e092<_0x4a47cf;},'RHgup':function(_0xf96750,_0x1999ee,_0x1b0cdf){return _0xf96750(_0x1999ee,_0x1b0cdf);},'udzBH':function(_0x2320a2,_0x498fc7){return _0x2320a2>=_0x498fc7;},'MuxKP':function(_0x2bc241,_0x1eb962){return _0x2bc241+_0x1eb962;},'XaZpQ':function(_0x41694c,_0x5641e2){return _0x41694c>_0x5641e2;},'sPGGH':function(_0x248150,_0x31edc4,_0x12dcaa){return _0x248150(_0x31edc4,_0x12dcaa);}},_0x3581e0=[],_0x28c942=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x1a88ea=0x0;while(_0x1a88ea<_0x5ef27f['length']){const _0xcdc01c=_0x5ef27f['indexOf'](_0x28c942,_0x1a88ea);if(_0x1c2ae9['pgpPH'](_0xcdc01c,-0x1))break;const [_0x1d7772,_0x4437b5]=_0x1c2ae9['qiiTj'](readId,_0x5ef27f,_0xcdc01c);if(_0x1c2ae9['YLsow'](_0x1d7772,ID_CLUSTER)){_0x1a88ea=_0xcdc01c+0x1;continue;}const [_0x5ef887,_0x36ab5d]=_0x1c2ae9['NmUIV'](readVint,_0x5ef27f,_0x1c2ae9[_0x8d5fe6(0x153)](_0xcdc01c,_0x4437b5)),_0x19accf=_0x1c2ae9[_0x8d5fe6(0x153)](_0xcdc01c+_0x4437b5,_0x36ab5d),_0x532829=findClusterEnd(_0x5ef27f,_0x19accf,_0x5ef887,_0x36ab5d);let _0x105c15=_0x19accf,_0x232197=0x0,_0x48d24d=0x2,_0x299cfb=![],_0x48218e=Buffer['alloc'](0x0),_0x30fb52=Buffer['alloc'](0x0);while(_0x1c2ae9['nwMVa'](_0x105c15,_0x532829)){const [_0x4eb615,_0x329e33]=readId(_0x5ef27f,_0x105c15),[_0x4a7012,_0x2627da]=_0x1c2ae9['qiiTj'](readVint,_0x5ef27f,_0x1c2ae9[_0x8d5fe6(0x162)](_0x105c15,_0x329e33));if(_0x1c2ae9['axiFy'](_0x4eb615,ID_TIMESTAMP)){_0x232197=readUint(_0x5ef27f,_0x1c2ae9['FlOIj'](_0x105c15,_0x329e33)+_0x2627da,_0x4a7012),_0x48d24d=_0x4a7012,_0x299cfb=!![],_0x48218e=_0x5ef27f[_0x8d5fe6(0x156)](_0x19accf,_0x105c15);const _0x1f5a74=_0x1c2ae9['EkLQt'](_0x1c2ae9[_0x8d5fe6(0x17c)](_0x105c15+_0x329e33,_0x2627da),_0x4a7012);_0x30fb52=_0x5ef27f['slice'](_0x1f5a74,_0x532829);break;}if(_0x1c2ae9[_0x8d5fe6(0x13f)](_0x4eb615,ID_CLUSTER))break;if(_0x1c2ae9['diQOZ'](isUnknownSize,_0x4a7012,_0x2627da))break;_0x105c15+=_0x1c2ae9['Naorx'](_0x1c2ae9[_0x8d5fe6(0x153)](_0x329e33,_0x2627da),_0x4a7012);}!_0x299cfb&&(_0x30fb52=_0x5ef27f['slice'](_0x19accf,_0x532829));let _0x8a52b7=_0x232197;_0x105c15=_0x19accf;while(_0x1c2ae9['VwsKO'](_0x105c15,_0x532829)){const [_0x339a7a,_0x2d97a7]=readId(_0x5ef27f,_0x105c15),[_0x29a4ee,_0x24f054]=_0x1c2ae9[_0x8d5fe6(0x141)](readVint,_0x5ef27f,_0x105c15+_0x2d97a7);if(_0x1c2ae9['kxrKd'](_0x339a7a,ID_SIMPLE_BLOCK)&&_0x1c2ae9['udzBH'](_0x29a4ee,0x4)){const _0x304299=_0x1c2ae9[_0x8d5fe6(0x13e)](_0x105c15,_0x2d97a7)+_0x24f054,[,_0x334d0e]=readVint(_0x5ef27f,_0x304299),_0x4fe087=_0x5ef27f[_0x8d5fe6(0x16e)](_0x304299+_0x334d0e),_0x2ae870=_0x232197+_0x4fe087;if(_0x1c2ae9[_0x8d5fe6(0x17f)](_0x2ae870,_0x8a52b7))_0x8a52b7=_0x2ae870;}if(_0x1c2ae9[_0x8d5fe6(0x17e)](_0x339a7a,ID_CLUSTER))break;if(_0x1c2ae9['sPGGH'](isUnknownSize,_0x29a4ee,_0x24f054))break;_0x105c15+=_0x1c2ae9[_0x8d5fe6(0x17c)](_0x2d97a7,_0x24f054)+_0x29a4ee;}_0x3581e0[_0x8d5fe6(0x173)]({'timestamp':_0x232197,'maxTicks':_0x8a52b7,'bodyBeforeTimestamp':_0x48218e,'bodyAfterTimestamp':_0x30fb52,'timestampElementSize':_0x48d24d}),_0x1a88ea=_0x532829;}return _0x3581e0;}function parseWebm(_0x2b7289){const _0x24584b=_0x837e,_0x4d00e6={'wuguh':function(_0x513f5b,_0x340950,_0x5ef7ac){return _0x513f5b(_0x340950,_0x5ef7ac);},'Sdzca':function(_0x2ead38,_0x48d457){return _0x2ead38+_0x48d457;},'tMKxw':function(_0x36c874,_0x25e77b){return _0x36c874>_0x25e77b;}};let _0x40b724=0x0;const [,_0x629926]=readId(_0x2b7289,_0x40b724),[_0x379263,_0x4e2bbf]=readVint(_0x2b7289,_0x40b724+_0x629926);_0x40b724+=_0x629926+_0x4e2bbf+_0x379263;const [_0x1b039a,_0x51e03c]=_0x4d00e6[_0x24584b(0x158)](readId,_0x2b7289,_0x40b724);if(_0x1b039a!==ID_SEGMENT)return null;const [,_0x145526]=_0x4d00e6[_0x24584b(0x158)](readVint,_0x2b7289,_0x4d00e6['Sdzca'](_0x40b724,_0x51e03c)),_0x5ca21e=_0x40b724+_0x51e03c+_0x145526,_0x332992=findTimestampScale(_0x2b7289,_0x5ca21e),_0x438249=findFirstClusterOffset(_0x2b7289,_0x5ca21e),_0xa2cb70=_0x2b7289[_0x24584b(0x156)](0x0,_0x438249),_0x3675f0=_0x4d00e6['wuguh'](extractClusters,_0x2b7289,_0x332992);let _0x4a5c3a=0x0;for(const _0x207539 of _0x3675f0){if(_0x4d00e6['tMKxw'](_0x207539['maxTicks'],_0x4a5c3a))_0x4a5c3a=_0x207539['maxTicks'];}return{'header':_0xa2cb70,'clusters':_0x3675f0,'timestampScale':_0x332992,'maxTimestampTicks':_0x4a5c3a};}function buildCluster(_0x138573,_0x1e04fd,_0x56dbb4){const _0x1b8803=_0x837e,_0x4d081a=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x5a92f1=Math['max'](0x4,uintSize(_0x138573)),_0x47feeb=Buffer['concat']([Buffer[_0x1b8803(0x14e)]([ID_TIMESTAMP]),writeVint(_0x5a92f1),writeUint(_0x138573,_0x5a92f1)]),_0x18fc81=Buffer['concat']([_0x1e04fd,_0x47feeb,_0x56dbb4]),_0x236bb8=writeVint(_0x18fc81[_0x1b8803(0x157)]);return Buffer[_0x1b8803(0x15c)]([_0x4d081a,_0x236bb8,_0x18fc81]);}const ID_DURATION=0x4489;function _0x3834(){const _0x14b857=['lKrms','ocRSQ','concat','2359524UGhUvZ','590btYDAf','log','clusters','XazYF','eXHsm','5224NbHqPB','LLySb','copy','lUYZs','floor','error','argv','gircP','stitchWebmFiles.ts','804157wpjESM','min','readInt16BE','7162350bbSedD','ucJxu','has','QBLjl','push','uqrnV','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','cKroA','2rlcNWe','JFJzn','header','1222506wISIJk','eDshJ','Naorx','\x20files\x20->\x20','pgpPH','XaZpQ','zPsRO','MuxKP','kxrKd','YtiRM','RHgup','raTNQ','BCSKZ','vXozN','endsWith','vyOAD','4266pdpYtd','5848664lHUDzJ','fTfim','EGAkY','KnPUY','LyIgA','amLad','from','alloc','HsuKx','WaiMr','czQvc','jJkha','bodyAfterTimestamp','13979RxyGHw','slice','length','wuguh','AfAlY'];_0x3834=function(){return _0x14b857;};return _0x3834();}function rebuildHeaderWithoutDuration(_0x58f718){const _0x2b54f5=_0x837e,_0x5e7796={'uqrnV':function(_0x311724,_0x56e7c0,_0x291ce9){return _0x311724(_0x56e7c0,_0x291ce9);},'lUYZs':function(_0x9b5e48,_0x4bfa7d){return _0x9b5e48+_0x4bfa7d;},'zPsRO':function(_0x424c30,_0xf73a07,_0x5c876d){return _0x424c30(_0xf73a07,_0x5c876d);},'WaiMr':function(_0x32bf0a,_0x44b684){return _0x32bf0a<_0x44b684;},'wXlGj':function(_0x55fcca,_0x57b54b,_0x17693b){return _0x55fcca(_0x57b54b,_0x17693b);},'CVgTO':function(_0x41124c,_0x46ee4c,_0x3472f4){return _0x41124c(_0x46ee4c,_0x3472f4);},'czQvc':function(_0x439eb5,_0xd9d90c,_0x8c7a28){return _0x439eb5(_0xd9d90c,_0x8c7a28);},'vyOAD':function(_0x3395b5,_0x54eefb){return _0x3395b5+_0x54eefb;}},_0xda9db1=Buffer['from'](_0x58f718);let _0x27fbc5=0x0;const [,_0x22a858]=readId(_0xda9db1,_0x27fbc5),[_0x1ad6fe,_0x5df183]=_0x5e7796[_0x2b54f5(0x174)](readVint,_0xda9db1,_0x27fbc5+_0x22a858),_0x58dbe3=_0x5e7796['lUYZs'](_0x5e7796[_0x2b54f5(0x166)](_0x27fbc5,_0x22a858)+_0x5df183,_0x1ad6fe),[,_0x47be70]=_0x5e7796['zPsRO'](readId,_0xda9db1,_0x58dbe3),[,_0x4809fa]=_0x5e7796[_0x2b54f5(0x180)](readVint,_0xda9db1,_0x5e7796[_0x2b54f5(0x166)](_0x58dbe3,_0x47be70)),_0x2f1d5a=_0x58dbe3+_0x47be70+_0x4809fa,_0x33205c=writeUnknownSizeVint(_0x4809fa);_0x33205c[_0x2b54f5(0x165)](_0xda9db1,_0x5e7796[_0x2b54f5(0x166)](_0x58dbe3,_0x47be70));let _0x35d90d=_0x2f1d5a;const _0x33fc4b=Math[_0x2b54f5(0x16d)](_0xda9db1['length'],_0x5e7796['lUYZs'](_0x2f1d5a,0x2710));while(_0x5e7796[_0x2b54f5(0x151)](_0x35d90d,_0x33fc4b)){const [_0x4e60f4,_0x594aa7]=_0x5e7796['wXlGj'](readId,_0xda9db1,_0x35d90d),[_0x3ff0b4,_0x5cffc5]=_0x5e7796['CVgTO'](readVint,_0xda9db1,_0x35d90d+_0x594aa7);if(_0x4e60f4===ID_CLUSTER)break;if(_0x5e7796[_0x2b54f5(0x152)](isUnknownSize,_0x3ff0b4,_0x5cffc5))break;if(_0x4e60f4===ID_INFO){const _0x57e817=_0x5e7796[_0x2b54f5(0x166)](_0x35d90d+_0x594aa7,_0x5cffc5),_0xbe695d=_0x57e817+_0x3ff0b4,_0x9359a9=[];let _0x2024cb=_0x57e817;while(_0x2024cb<_0xbe695d){const [_0x14584e,_0x1a17f3]=readId(_0xda9db1,_0x2024cb),[_0x30c3db,_0x28f30c]=readVint(_0xda9db1,_0x5e7796[_0x2b54f5(0x146)](_0x2024cb,_0x1a17f3)),_0x4e2f48=_0x1a17f3+_0x28f30c+_0x30c3db;_0x14584e!==ID_DURATION&&_0x9359a9[_0x2b54f5(0x173)](_0xda9db1['slice'](_0x2024cb,_0x5e7796[_0x2b54f5(0x146)](_0x2024cb,_0x4e2f48))),_0x2024cb+=_0x4e2f48;}const _0x154230=Buffer['concat'](_0x9359a9),_0x5beacb=Buffer['concat']([_0xda9db1[_0x2b54f5(0x156)](_0x35d90d,_0x35d90d+_0x594aa7),writeVint(_0x154230['length'],_0x5cffc5)]);return Buffer[_0x2b54f5(0x15c)]([_0xda9db1['slice'](0x0,_0x35d90d),_0x5beacb,_0x154230,_0xda9db1['slice'](_0xbe695d)]);}_0x35d90d+=_0x594aa7+_0x5cffc5+_0x3ff0b4;}return _0xda9db1;}export function stitchWebmFiles(_0x4bf8fe,_0xbdc058){const _0x4b5217=_0x837e,_0x20c1e9={'gGTxF':function(_0x286c05,_0x1e1bfa){return _0x286c05(_0x1e1bfa);},'fTfim':function(_0x405621,_0x46a58a){return _0x405621(_0x46a58a);},'YtiRM':function(_0xe7bef4,_0x2b5dd1){return _0xe7bef4<_0x2b5dd1;},'KnPUY':function(_0x5e5e03,_0x1c3f85,_0x7f9aff,_0x265d6b){return _0x5e5e03(_0x1c3f85,_0x7f9aff,_0x265d6b);},'JFJzn':function(_0x23e900,_0x4d175c){return _0x23e900+_0x4d175c;},'DKzuL':function(_0x5cedd3,_0x5e0e63,_0x2999ee){return _0x5cedd3(_0x5e0e63,_0x2999ee);}};if(_0x4bf8fe['length']<=0x1)return![];const _0x42f6eb=[];for(const _0xb9fc0e of _0x4bf8fe){const _0x37b718=readFileSync(_0xb9fc0e),_0x397835=_0x20c1e9['gGTxF'](parseWebm,_0x37b718);if(!_0x397835||_0x397835[_0x4b5217(0x160)]['length']===0x0)return![];_0x42f6eb[_0x4b5217(0x173)](_0x397835);}const _0x438a6b=_0x42f6eb[0x0],_0x28490a=_0x20c1e9[_0x4b5217(0x149)](rebuildHeaderWithoutDuration,_0x438a6b[_0x4b5217(0x179)]),_0x312dce=[_0x28490a];let _0x3b7cc5=0x0;for(let _0x537503=0x0;_0x20c1e9[_0x4b5217(0x140)](_0x537503,_0x42f6eb['length']);_0x537503++){const _0x1237c9=_0x42f6eb[_0x537503];for(const _0x4794df of _0x1237c9[_0x4b5217(0x160)]){const _0x425a50=_0x4794df['timestamp']+_0x3b7cc5;_0x312dce['push'](_0x20c1e9[_0x4b5217(0x14b)](buildCluster,_0x425a50,_0x4794df['bodyBeforeTimestamp'],_0x4794df[_0x4b5217(0x154)]));}const _0x291983=0x1e;_0x3b7cc5+=_0x20c1e9[_0x4b5217(0x178)](_0x1237c9['maxTimestampTicks'],_0x291983);}return _0x20c1e9['DKzuL'](writeFileSync,_0xbdc058,Buffer['concat'](_0x312dce)),!![];}if(process['argv'][0x1]?.[_0x1f87f1(0x145)](_0x1f87f1(0x16b))||process[_0x1f87f1(0x169)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process[_0x1f87f1(0x169)][_0x1f87f1(0x156)](0x2);args['length']<0x3&&(console[_0x1f87f1(0x168)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x1f87f1(0x157)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs['length']+_0x1f87f1(0x17d)+output):console[_0x1f87f1(0x15f)](_0x1f87f1(0x175));}
|
|
1
|
+
const _0x54be51=_0x4be4;(function(_0x124c7a,_0x515e87){const _0x4c9f5c=_0x4be4,_0x14b418=_0x124c7a();while(!![]){try{const _0x209e3f=-parseInt(_0x4c9f5c(0x1c8))/0x1*(parseInt(_0x4c9f5c(0x1b3))/0x2)+-parseInt(_0x4c9f5c(0x1c0))/0x3+-parseInt(_0x4c9f5c(0x1c2))/0x4*(parseInt(_0x4c9f5c(0x1c3))/0x5)+parseInt(_0x4c9f5c(0x1bf))/0x6*(parseInt(_0x4c9f5c(0x19f))/0x7)+parseInt(_0x4c9f5c(0x1be))/0x8+parseInt(_0x4c9f5c(0x198))/0x9+parseInt(_0x4c9f5c(0x1b1))/0xa*(parseInt(_0x4c9f5c(0x1bb))/0xb);if(_0x209e3f===_0x515e87)break;else _0x14b418['push'](_0x14b418['shift']());}catch(_0x20c552){_0x14b418['push'](_0x14b418['shift']());}}}(_0x432d,0x1bc54));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(_0x3dbb5d,_0x588bcc){const _0xb60a65=_0x4be4,_0x5bb21e={'Agszb':function(_0x132f2a,_0x34d0df){return _0x132f2a<=_0x34d0df;},'WsczF':function(_0x412550,_0x2f6c6a){return _0x412550>_0x2f6c6a;},'acAeP':function(_0x1896da,_0x3ae4da){return _0x1896da&_0x3ae4da;},'OgDTD':function(_0x2c894c,_0x2bb8c5){return _0x2c894c<_0x2bb8c5;},'Fsmvw':function(_0x427bd7,_0x569e7b){return _0x427bd7+_0x569e7b;},'lNXBk':function(_0x30ba75,_0x1c2e30){return _0x30ba75*_0x1c2e30;},'wiCle':function(_0x52d866,_0x5a20c3){return _0x52d866+_0x5a20c3;}};if(_0x588bcc>=_0x3dbb5d['length'])return[0x0,0x0];const _0x4c012b=_0x3dbb5d[_0x588bcc];let _0x3ca29a=0x1,_0x55d398=0x80;while(_0x5bb21e[_0xb60a65(0x1ae)](_0x3ca29a,0x8)&&!(_0x4c012b&_0x55d398)){_0x3ca29a++,_0x55d398>>=0x1;}if(_0x5bb21e['WsczF'](_0x588bcc+_0x3ca29a,_0x3dbb5d['length']))return[0x0,0x0];let _0x56474f=_0x5bb21e['acAeP'](_0x4c012b,_0x55d398-0x1);for(let _0x11b12d=0x1;_0x5bb21e['OgDTD'](_0x11b12d,_0x3ca29a);_0x11b12d++){_0x56474f=_0x5bb21e['Fsmvw'](_0x5bb21e['lNXBk'](_0x56474f,0x100),_0x3dbb5d[_0x5bb21e[_0xb60a65(0x1b2)](_0x588bcc,_0x11b12d)]);}return[_0x56474f,_0x3ca29a];}function readId(_0x28f130,_0x3ca7da){const _0xc64cd6=_0x4be4,_0xc141e9={'eKYiS':function(_0x1fcb44,_0x4db1ca){return _0x1fcb44>=_0x4db1ca;},'Nhbmy':function(_0x2be916,_0xab1c93){return _0x2be916>=_0xab1c93;},'mAGyI':function(_0x76c77,_0x3a5596){return _0x76c77>=_0x3a5596;},'jwStw':function(_0x1e522c,_0x55ce33){return _0x1e522c>=_0x55ce33;},'bKIlB':function(_0x2b4eb4,_0x4de40f){return _0x2b4eb4<_0x4de40f;}};if(_0xc141e9[_0xc64cd6(0x1ad)](_0x3ca7da,_0x28f130['length']))return[0x0,0x0];const _0x11f9ff=_0x28f130[_0x3ca7da];let _0x18eb4f;if(_0xc141e9[_0xc64cd6(0x192)](_0x11f9ff,0x80))_0x18eb4f=0x1;else{if(_0xc141e9['mAGyI'](_0x11f9ff,0x40))_0x18eb4f=0x2;else{if(_0x11f9ff>=0x20)_0x18eb4f=0x3;else{if(_0xc141e9[_0xc64cd6(0x194)](_0x11f9ff,0x10))_0x18eb4f=0x4;else return[_0x11f9ff,0x1];}}}if(_0x3ca7da+_0x18eb4f>_0x28f130[_0xc64cd6(0x1b0)])return[0x0,0x0];let _0x4e91fa=0x0;for(let _0x44ecff=0x0;_0xc141e9['bKIlB'](_0x44ecff,_0x18eb4f);_0x44ecff++){_0x4e91fa=_0x4e91fa*0x100+_0x28f130[_0x3ca7da+_0x44ecff];}return[_0x4e91fa,_0x18eb4f];}function readUint(_0x2f14c0,_0x5d1e8c,_0x11cac5){const _0x5ef0a6=_0x4be4,_0x4df53c={'uyiJC':function(_0x563bba,_0x14bdd5){return _0x563bba+_0x14bdd5;}};let _0xed84c7=0x0;for(let _0x20ee3d=0x0;_0x20ee3d<_0x11cac5;_0x20ee3d++){_0xed84c7=_0x4df53c[_0x5ef0a6(0x18f)](_0xed84c7*0x100,_0x2f14c0[_0x5d1e8c+_0x20ee3d]);}return _0xed84c7;}function isUnknownSize(_0x3c765b,_0x1220db){const _0x39670b=_0x4be4,_0x5485c5={'gECrV':function(_0x1be764,_0x1a4f02){return _0x1be764===_0x1a4f02;},'WexMe':function(_0x495bd3,_0x10757e){return _0x495bd3-_0x10757e;}};return _0x5485c5[_0x39670b(0x18e)](_0x3c765b,_0x5485c5['WexMe'](Math[_0x39670b(0x191)](0x2,0x7*_0x1220db),0x1));}function writeVint(_0x3b600d,_0x1a9e39){const _0x5bd33c=_0x4be4,_0x59dc59={'oAZXf':function(_0x51e1af,_0x49e68b){return _0x51e1af<_0x49e68b;},'BVyxf':function(_0x2353c2,_0x19c39c){return _0x2353c2*_0x19c39c;},'oFaUT':function(_0x40763b,_0x3ffe96){return _0x40763b>=_0x3ffe96;}};let _0x2f4387=_0x1a9e39||0x1;while(_0x59dc59[_0x5bd33c(0x1a4)](Math[_0x5bd33c(0x191)](0x2,_0x59dc59[_0x5bd33c(0x1cb)](0x7,_0x2f4387))-0x2,_0x3b600d))_0x2f4387++;const _0xd492a6=Buffer[_0x5bd33c(0x1b6)](_0x2f4387);for(let _0x3d74da=_0x2f4387-0x1;_0x59dc59[_0x5bd33c(0x195)](_0x3d74da,0x0);_0x3d74da--){_0xd492a6[_0x3d74da]=_0x3b600d&0xff,_0x3b600d=Math['floor'](_0x3b600d/0x100);}return _0xd492a6[0x0]|=0x1<<0x8-_0x2f4387,_0xd492a6;}function writeUint(_0x1e44e,_0x594b2b){const _0x3866e2=_0x4be4,_0x26dc37={'aKHKB':function(_0xadc44e,_0x43d1d3){return _0xadc44e-_0x43d1d3;},'vIyip':function(_0xba86b9,_0x4bdb70){return _0xba86b9&_0x4bdb70;},'KlHEK':function(_0x1da0c6,_0x3e6558){return _0x1da0c6/_0x3e6558;}},_0x446291=Buffer['alloc'](_0x594b2b);for(let _0x3d991f=_0x26dc37['aKHKB'](_0x594b2b,0x1);_0x3d991f>=0x0;_0x3d991f--){_0x446291[_0x3d991f]=_0x26dc37['vIyip'](_0x1e44e,0xff),_0x1e44e=Math[_0x3866e2(0x19e)](_0x26dc37[_0x3866e2(0x1aa)](_0x1e44e,0x100));}return _0x446291;}function writeUnknownSizeVint(_0xe81225){const _0x5530bc=Buffer['alloc'](_0xe81225,0xff);return _0x5530bc[0x0]=0xff>>_0xe81225-0x1,_0x5530bc;}function uintSize(_0x4652c6){const _0x28cf97=_0x4be4,_0x2da16e={'FGThb':function(_0x4a8b07,_0x5a7dac){return _0x4a8b07>_0x5a7dac;},'XxIgy':function(_0x19077b,_0x15138b){return _0x19077b/_0x15138b;}};if(_0x4652c6===0x0)return 0x1;let _0x4bdccf=0x0,_0x237c6e=_0x4652c6;while(_0x2da16e[_0x28cf97(0x1b7)](_0x237c6e,0x0)){_0x4bdccf++,_0x237c6e=Math[_0x28cf97(0x19e)](_0x2da16e['XxIgy'](_0x237c6e,0x100));}return _0x4bdccf;}function _0x432d(){const _0x54ab2c=['UqWTl','alloc','FGThb','TnbnK','Stitched\x20','TwonF','5203AJgHlC','UkoOd','CSodk','510208JHaNqv','12198gLqIai','114504YSmhDL','BjLRJ','13676NoMRDV','160GxiCjY','FZZUn','slice','jXYIX','Pdcuc','3lSFbHH','lSbvo','Jkygl','BVyxf','log','from','mjIOa','Dfvaf','cGJdv','SzjlF','jdqje','gECrV','uyiJC','kybCO','pow','Nhbmy','has','jwStw','oFaUT','YepqM','readInt16BE','604179YjfzKY','rivFW','svhkk','tBbSK','lbnHB','vouno','floor','392GKhSqZ','stitchWebmFiles.ts','bodyBeforeTimestamp','jIwiG','KnJay','oAZXf','endsWith','concat','timestamp','indexOf','push','KlHEK','min','jymZi','eKYiS','Agszb','ZARXS','length','1140fLuJPY','wiCle','24902qQUGZY','uzTxI'];_0x432d=function(){return _0x54ab2c;};return _0x432d();}function findTimestampScale(_0xe60b67,_0x4da6a9){const _0x14b51b=_0x4be4,_0x5bf6ea={'svhkk':function(_0x48452f,_0x58964f){return _0x48452f+_0x58964f;},'BDnzp':function(_0x5ce5af,_0x4831a8,_0x9879b5){return _0x5ce5af(_0x4831a8,_0x9879b5);},'lbnHB':function(_0x5d3a72,_0x1f1820,_0x36db10){return _0x5d3a72(_0x1f1820,_0x36db10);},'TwonF':function(_0x30f64d,_0x36025a,_0x5450b9){return _0x30f64d(_0x36025a,_0x5450b9);},'xTrjZ':function(_0x42cb41,_0x40642d){return _0x42cb41+_0x40642d;},'VKXKn':function(_0x4f1539,_0x2d55c5){return _0x4f1539+_0x2d55c5;},'WqSnM':function(_0x45f00a,_0x3dc040,_0x4eb871){return _0x45f00a(_0x3dc040,_0x4eb871);},'mjIOa':function(_0x445d27,_0x27b304){return _0x445d27+_0x27b304;}};let _0x3ccc3b=_0x4da6a9;const _0x23cc72=Math[_0x14b51b(0x1ab)](_0xe60b67['length'],_0x5bf6ea['svhkk'](_0x4da6a9,0x2710));while(_0x3ccc3b<_0x23cc72){const [_0x1c9467,_0x3ba764]=_0x5bf6ea['BDnzp'](readId,_0xe60b67,_0x3ccc3b),[_0x2ad789,_0x5dde39]=readVint(_0xe60b67,_0x5bf6ea[_0x14b51b(0x19a)](_0x3ccc3b,_0x3ba764));if(_0x1c9467===ID_INFO){let _0x4fb8f=_0x5bf6ea['svhkk'](_0x3ccc3b,_0x3ba764)+_0x5dde39;const _0x3300d4=_0x4fb8f+_0x2ad789;while(_0x4fb8f<_0x3300d4){const [_0x1b6983,_0xa9d663]=_0x5bf6ea[_0x14b51b(0x19c)](readId,_0xe60b67,_0x4fb8f),[_0x58ea0c,_0x3bba59]=_0x5bf6ea[_0x14b51b(0x1ba)](readVint,_0xe60b67,_0x4fb8f+_0xa9d663);if(_0x1b6983===ID_TIMESTAMP_SCALE)return readUint(_0xe60b67,_0x5bf6ea['svhkk'](_0x4fb8f+_0xa9d663,_0x3bba59),_0x58ea0c);_0x4fb8f+=_0x5bf6ea['xTrjZ'](_0x5bf6ea['VKXKn'](_0xa9d663,_0x3bba59),_0x58ea0c);}break;}if(_0x1c9467===ID_CLUSTER)break;if(_0x5bf6ea['WqSnM'](isUnknownSize,_0x2ad789,_0x5dde39))break;_0x3ccc3b+=_0x5bf6ea[_0x14b51b(0x189)](_0x3ba764+_0x5dde39,_0x2ad789);}return 0xf4240;}function _0x4be4(_0x2974cc,_0x20c99c){_0x2974cc=_0x2974cc-0x187;const _0x432d9c=_0x432d();let _0x4be47a=_0x432d9c[_0x2974cc];return _0x4be47a;}function findFirstClusterOffset(_0x293802,_0x3482fc){const _0x4e3063=_0x4be4,_0x5f4d76={'uzTxI':function(_0x517fdc,_0x9efc5b){return _0x517fdc===_0x9efc5b;},'FZZUn':function(_0xf705f9,_0x5a2187,_0x17915a){return _0xf705f9(_0x5a2187,_0x17915a);},'jfQhX':function(_0x255ac9,_0x198cff){return _0x255ac9+_0x198cff;},'hLvMN':function(_0x3f2c7e,_0x57f46d){return _0x3f2c7e+_0x57f46d;}};let _0x35f703=_0x3482fc;while(_0x35f703<_0x293802['length']){const [_0x5e1564,_0x160fad]=readId(_0x293802,_0x35f703);if(_0x5f4d76[_0x4e3063(0x1b4)](_0x5e1564,ID_CLUSTER))return _0x35f703;const [_0x5de5dc,_0x3e9929]=_0x5f4d76[_0x4e3063(0x1c4)](readVint,_0x293802,_0x5f4d76['jfQhX'](_0x35f703,_0x160fad));if(_0x5f4d76['FZZUn'](isUnknownSize,_0x5de5dc,_0x3e9929))return _0x35f703;_0x35f703+=_0x5f4d76['hLvMN'](_0x160fad+_0x3e9929,_0x5de5dc);}return _0x293802['length'];}function findClusterEnd(_0x42b968,_0x2ad624,_0x36e180,_0x23835f){const _0x468406=_0x4be4,_0x727d52={'CZnUl':function(_0x5cf614,_0x18a77b,_0x20b02c){return _0x5cf614(_0x18a77b,_0x20b02c);},'jIwiG':function(_0x4387ba,_0x4f9ea8){return _0x4387ba<_0x4f9ea8;},'VGuqL':function(_0x295e9f,_0x3b76a9,_0x3fcb42){return _0x295e9f(_0x3b76a9,_0x3fcb42);},'cCMIZ':function(_0x44e5e2,_0x58ef31){return _0x44e5e2+_0x58ef31;}};if(!_0x727d52['CZnUl'](isUnknownSize,_0x36e180,_0x23835f))return _0x2ad624+_0x36e180;const _0x348a12=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x467b0a=_0x2ad624;while(_0x727d52[_0x468406(0x1a2)](_0x467b0a,_0x42b968[_0x468406(0x1b0)]-0x4)){const [_0x48d027,_0x161bc6]=readId(_0x42b968,_0x467b0a);if(_0x348a12[_0x468406(0x193)](_0x48d027))return _0x467b0a;const [_0x452432,_0x15a126]=_0x727d52['VGuqL'](readVint,_0x42b968,_0x467b0a+_0x161bc6);if(isUnknownSize(_0x452432,_0x15a126))return _0x42b968['length'];_0x467b0a+=_0x727d52['cCMIZ'](_0x161bc6+_0x15a126,_0x452432);}return _0x42b968['length'];}function extractClusters(_0x5a9fa3,_0x4596da){const _0x520364=_0x4be4,_0x1bb86c={'ZARXS':function(_0x1d8614,_0x4b777c,_0x5bdac0,_0x21433c,_0x2e5b47){return _0x1d8614(_0x4b777c,_0x5bdac0,_0x21433c,_0x2e5b47);},'Pdcuc':function(_0x34523b,_0x3bcc5f){return _0x34523b<_0x3bcc5f;},'oPgDV':function(_0x208de4,_0x302a31,_0x400719){return _0x208de4(_0x302a31,_0x400719);},'TnbnK':function(_0x5ed398,_0x152fd3,_0x208e65){return _0x5ed398(_0x152fd3,_0x208e65);},'QeOUg':function(_0x73b595,_0x3ba192){return _0x73b595+_0x3ba192;},'Dfvaf':function(_0x1a22ca,_0x49f0c2,_0x25660d,_0x1c26b5){return _0x1a22ca(_0x49f0c2,_0x25660d,_0x1c26b5);},'UkoOd':function(_0x1abbcf,_0x31a32e){return _0x1abbcf+_0x31a32e;},'Jkygl':function(_0x45250c,_0x1a4840){return _0x45250c+_0x1a4840;},'KmoqE':function(_0x4c9eba,_0x341507){return _0x4c9eba+_0x341507;},'sUFlu':function(_0x1e2688,_0x27609d,_0x4b441c){return _0x1e2688(_0x27609d,_0x4b441c);},'ffqdk':function(_0x5235ce,_0x4d2713){return _0x5235ce+_0x4d2713;},'hiUFS':function(_0x2ce1f8,_0x1b6ba1){return _0x2ce1f8+_0x1b6ba1;},'jGWVL':function(_0x322ed8,_0x10bace){return _0x322ed8===_0x10bace;}},_0x24768f=[],_0x452b0b=Buffer[_0x520364(0x188)]([0x1f,0x43,0xb6,0x75]);let _0x1b3ec8=0x0;while(_0x1b3ec8<_0x5a9fa3[_0x520364(0x1b0)]){const _0x3997b9=_0x5a9fa3[_0x520364(0x1a8)](_0x452b0b,_0x1b3ec8);if(_0x3997b9===-0x1)break;const [_0x7fe7a5,_0x337203]=readId(_0x5a9fa3,_0x3997b9);if(_0x7fe7a5!==ID_CLUSTER){_0x1b3ec8=_0x3997b9+0x1;continue;}const [_0x35c8c5,_0x4b675b]=readVint(_0x5a9fa3,_0x3997b9+_0x337203),_0x2e1a52=_0x3997b9+_0x337203+_0x4b675b,_0x124ef4=_0x1bb86c[_0x520364(0x1af)](findClusterEnd,_0x5a9fa3,_0x2e1a52,_0x35c8c5,_0x4b675b);let _0x3a711c=_0x2e1a52,_0x578776=0x0,_0x473cc6=0x2,_0x5c74c1=![],_0x370b02=Buffer[_0x520364(0x1b6)](0x0),_0x2d1fe7=Buffer[_0x520364(0x1b6)](0x0);while(_0x1bb86c[_0x520364(0x1c7)](_0x3a711c,_0x124ef4)){const [_0x242975,_0x5e73c5]=_0x1bb86c['oPgDV'](readId,_0x5a9fa3,_0x3a711c),[_0x532820,_0x55806f]=_0x1bb86c[_0x520364(0x1b8)](readVint,_0x5a9fa3,_0x1bb86c['QeOUg'](_0x3a711c,_0x5e73c5));if(_0x242975===ID_TIMESTAMP){_0x578776=_0x1bb86c[_0x520364(0x18a)](readUint,_0x5a9fa3,_0x1bb86c['QeOUg'](_0x3a711c+_0x5e73c5,_0x55806f),_0x532820),_0x473cc6=_0x532820,_0x5c74c1=!![],_0x370b02=_0x5a9fa3[_0x520364(0x1c5)](_0x2e1a52,_0x3a711c);const _0x45a9d5=_0x1bb86c[_0x520364(0x1bc)](_0x1bb86c[_0x520364(0x1ca)](_0x1bb86c['KmoqE'](_0x3a711c,_0x5e73c5),_0x55806f),_0x532820);_0x2d1fe7=_0x5a9fa3[_0x520364(0x1c5)](_0x45a9d5,_0x124ef4);break;}if(_0x242975===ID_CLUSTER)break;if(_0x1bb86c[_0x520364(0x1b8)](isUnknownSize,_0x532820,_0x55806f))break;_0x3a711c+=_0x5e73c5+_0x55806f+_0x532820;}!_0x5c74c1&&(_0x2d1fe7=_0x5a9fa3['slice'](_0x2e1a52,_0x124ef4));let _0x58596c=_0x578776;_0x3a711c=_0x2e1a52;while(_0x1bb86c['Pdcuc'](_0x3a711c,_0x124ef4)){const [_0x55a6a4,_0x2a4214]=readId(_0x5a9fa3,_0x3a711c),[_0x3f4a25,_0x196cb4]=_0x1bb86c['sUFlu'](readVint,_0x5a9fa3,_0x3a711c+_0x2a4214);if(_0x55a6a4===ID_SIMPLE_BLOCK&&_0x3f4a25>=0x4){const _0x2ad473=_0x3a711c+_0x2a4214+_0x196cb4,[,_0x52c4b3]=readVint(_0x5a9fa3,_0x2ad473),_0x4e505c=_0x5a9fa3[_0x520364(0x197)](_0x1bb86c['ffqdk'](_0x2ad473,_0x52c4b3)),_0x2581b8=_0x1bb86c['hiUFS'](_0x578776,_0x4e505c);if(_0x2581b8>_0x58596c)_0x58596c=_0x2581b8;}if(_0x1bb86c['jGWVL'](_0x55a6a4,ID_CLUSTER))break;if(isUnknownSize(_0x3f4a25,_0x196cb4))break;_0x3a711c+=_0x2a4214+_0x196cb4+_0x3f4a25;}_0x24768f[_0x520364(0x1a9)]({'timestamp':_0x578776,'maxTicks':_0x58596c,'bodyBeforeTimestamp':_0x370b02,'bodyAfterTimestamp':_0x2d1fe7,'timestampElementSize':_0x473cc6}),_0x1b3ec8=_0x124ef4;}return _0x24768f;}function parseWebm(_0x38f70c){const _0xe542de=_0x4be4,_0x11ee5e={'lSbvo':function(_0x34bc9f,_0x37f6c4,_0x55e345){return _0x34bc9f(_0x37f6c4,_0x55e345);},'SzjlF':function(_0x35a91c,_0x8e0739){return _0x35a91c!==_0x8e0739;},'YepqM':function(_0x5ba3b2,_0xe10f4e,_0x448491){return _0x5ba3b2(_0xe10f4e,_0x448491);},'cUkGb':function(_0x3ceb9f,_0xa4e366){return _0x3ceb9f+_0xa4e366;},'MXWvJ':function(_0x586abc,_0x1a2c11,_0x5372db){return _0x586abc(_0x1a2c11,_0x5372db);},'tBbSK':function(_0x401ecc,_0x50dc0b){return _0x401ecc>_0x50dc0b;}};let _0x584c19=0x0;const [,_0x2e1c03]=readId(_0x38f70c,_0x584c19),[_0x305eb8,_0x2e4237]=readVint(_0x38f70c,_0x584c19+_0x2e1c03);_0x584c19+=_0x2e1c03+_0x2e4237+_0x305eb8;const [_0x59cd2e,_0x40403e]=_0x11ee5e[_0xe542de(0x1c9)](readId,_0x38f70c,_0x584c19);if(_0x11ee5e[_0xe542de(0x18c)](_0x59cd2e,ID_SEGMENT))return null;const [,_0x3580f1]=_0x11ee5e[_0xe542de(0x196)](readVint,_0x38f70c,_0x584c19+_0x40403e),_0x150f36=_0x11ee5e['cUkGb'](_0x584c19,_0x40403e)+_0x3580f1,_0xb8cfcb=_0x11ee5e['MXWvJ'](findTimestampScale,_0x38f70c,_0x150f36),_0x923164=findFirstClusterOffset(_0x38f70c,_0x150f36),_0x240c97=_0x38f70c[_0xe542de(0x1c5)](0x0,_0x923164),_0x18be09=extractClusters(_0x38f70c,_0xb8cfcb);let _0x4cf037=0x0;for(const _0x4650b4 of _0x18be09){if(_0x11ee5e[_0xe542de(0x19b)](_0x4650b4['maxTicks'],_0x4cf037))_0x4cf037=_0x4650b4['maxTicks'];}return{'header':_0x240c97,'clusters':_0x18be09,'timestampScale':_0xb8cfcb,'maxTimestampTicks':_0x4cf037};}function buildCluster(_0x3ac606,_0x4bb4dc,_0x406701){const _0x575816=_0x4be4,_0x25017b={'CSodk':function(_0x122cd4,_0x31c71c){return _0x122cd4(_0x31c71c);}},_0x57c486=Buffer[_0x575816(0x188)]([0x1f,0x43,0xb6,0x75]),_0x1b4374=Math['max'](0x4,_0x25017b['CSodk'](uintSize,_0x3ac606)),_0x1ac0da=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x1b4374),writeUint(_0x3ac606,_0x1b4374)]),_0x2f6ae7=Buffer['concat']([_0x4bb4dc,_0x1ac0da,_0x406701]),_0x4669b7=_0x25017b[_0x575816(0x1bd)](writeVint,_0x2f6ae7['length']);return Buffer['concat']([_0x57c486,_0x4669b7,_0x2f6ae7]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2d1484){const _0x5a0057=_0x4be4,_0xd6499f={'jXYIX':function(_0x5762be,_0x27af47,_0x40ce98){return _0x5762be(_0x27af47,_0x40ce98);},'gouHN':function(_0x59e441,_0x46c615){return _0x59e441+_0x46c615;},'UqWTl':function(_0x2f0535,_0x3b1aa3){return _0x2f0535+_0x3b1aa3;},'aTtiP':function(_0x469542,_0x15fad1){return _0x469542(_0x15fad1);},'IqIfL':function(_0x1a3ac9,_0x452df4){return _0x1a3ac9+_0x452df4;},'ZgTvT':function(_0x35cd42,_0x445902){return _0x35cd42<_0x445902;},'cGJdv':function(_0x318eeb,_0x36960a,_0x25f6e7){return _0x318eeb(_0x36960a,_0x25f6e7);},'KnJay':function(_0xd6c3e,_0x25860d){return _0xd6c3e===_0x25860d;},'jymZi':function(_0x186834,_0x11f098){return _0x186834+_0x11f098;},'tqQCh':function(_0x5bed7f,_0x473602){return _0x5bed7f<_0x473602;},'DZPDF':function(_0x4d3b5e,_0x48de5d){return _0x4d3b5e!==_0x48de5d;},'nckdJ':function(_0x608031,_0x7c1822){return _0x608031+_0x7c1822;},'SvyFs':function(_0x7e760d,_0x195f30){return _0x7e760d+_0x195f30;}},_0x2744c8=Buffer['from'](_0x2d1484);let _0x27097a=0x0;const [,_0x366b49]=readId(_0x2744c8,_0x27097a),[_0x136481,_0xbd8669]=_0xd6499f[_0x5a0057(0x1c6)](readVint,_0x2744c8,_0x27097a+_0x366b49),_0x30aea3=_0xd6499f['gouHN'](_0xd6499f['UqWTl'](_0x27097a,_0x366b49),_0xbd8669)+_0x136481,[,_0xfd945]=readId(_0x2744c8,_0x30aea3),[,_0x444220]=readVint(_0x2744c8,_0x30aea3+_0xfd945),_0x118b72=_0xd6499f[_0x5a0057(0x1b5)](_0x30aea3+_0xfd945,_0x444220),_0x4970f3=_0xd6499f['aTtiP'](writeUnknownSizeVint,_0x444220);_0x4970f3['copy'](_0x2744c8,_0x30aea3+_0xfd945);let _0x2e70af=_0x118b72;const _0x4d6cc0=Math[_0x5a0057(0x1ab)](_0x2744c8[_0x5a0057(0x1b0)],_0xd6499f['IqIfL'](_0x118b72,0x2710));while(_0xd6499f['ZgTvT'](_0x2e70af,_0x4d6cc0)){const [_0x48dc35,_0x5a0350]=_0xd6499f[_0x5a0057(0x18b)](readId,_0x2744c8,_0x2e70af),[_0x332b5c,_0x271e61]=_0xd6499f['jXYIX'](readVint,_0x2744c8,_0x2e70af+_0x5a0350);if(_0xd6499f[_0x5a0057(0x1a3)](_0x48dc35,ID_CLUSTER))break;if(_0xd6499f['cGJdv'](isUnknownSize,_0x332b5c,_0x271e61))break;if(_0xd6499f['KnJay'](_0x48dc35,ID_INFO)){const _0xdaaa0a=_0x2e70af+_0x5a0350+_0x271e61,_0x5e1c41=_0xd6499f[_0x5a0057(0x1ac)](_0xdaaa0a,_0x332b5c),_0x510fd0=[];let _0x3f6c47=_0xdaaa0a;while(_0xd6499f['tqQCh'](_0x3f6c47,_0x5e1c41)){const [_0x128ede,_0x438727]=readId(_0x2744c8,_0x3f6c47),[_0x592c8e,_0x31ab66]=readVint(_0x2744c8,_0x3f6c47+_0x438727),_0x2a8769=_0xd6499f[_0x5a0057(0x1ac)](_0x438727+_0x31ab66,_0x592c8e);_0xd6499f['DZPDF'](_0x128ede,ID_DURATION)&&_0x510fd0[_0x5a0057(0x1a9)](_0x2744c8['slice'](_0x3f6c47,_0xd6499f['nckdJ'](_0x3f6c47,_0x2a8769))),_0x3f6c47+=_0x2a8769;}const _0xc1e12f=Buffer['concat'](_0x510fd0),_0x332e54=Buffer['concat']([_0x2744c8['slice'](_0x2e70af,_0xd6499f['SvyFs'](_0x2e70af,_0x5a0350)),_0xd6499f[_0x5a0057(0x1c6)](writeVint,_0xc1e12f[_0x5a0057(0x1b0)],_0x271e61)]);return Buffer['concat']([_0x2744c8[_0x5a0057(0x1c5)](0x0,_0x2e70af),_0x332e54,_0xc1e12f,_0x2744c8['slice'](_0x5e1c41)]);}_0x2e70af+=_0x5a0350+_0x271e61+_0x332b5c;}return _0x2744c8;}export function stitchWebmFiles(_0x3dd853,_0x49c5cf){const _0x3c59ac=_0x4be4,_0x59d8dd={'fZbCA':function(_0x14052d,_0x13a4d8){return _0x14052d<=_0x13a4d8;},'vouno':function(_0x27f9f4,_0x3a8d37){return _0x27f9f4(_0x3a8d37);},'BjLRJ':function(_0x4e6933,_0x362dca){return _0x4e6933===_0x362dca;},'kybCO':function(_0x68743,_0x3fa1){return _0x68743<_0x3fa1;},'rivFW':function(_0x8454b2,_0x1fb5bb){return _0x8454b2+_0x1fb5bb;},'jdqje':function(_0x11da8f,_0x51f7c8,_0x2a84e4){return _0x11da8f(_0x51f7c8,_0x2a84e4);}};if(_0x59d8dd['fZbCA'](_0x3dd853[_0x3c59ac(0x1b0)],0x1))return![];const _0x4fcfef=[];for(const _0x1ca901 of _0x3dd853){const _0x1fc31c=_0x59d8dd[_0x3c59ac(0x19d)](readFileSync,_0x1ca901),_0x3cfc89=parseWebm(_0x1fc31c);if(!_0x3cfc89||_0x59d8dd[_0x3c59ac(0x1c1)](_0x3cfc89['clusters'][_0x3c59ac(0x1b0)],0x0))return![];_0x4fcfef[_0x3c59ac(0x1a9)](_0x3cfc89);}const _0x288ad7=_0x4fcfef[0x0],_0x143adb=rebuildHeaderWithoutDuration(_0x288ad7['header']),_0x2c5c9d=[_0x143adb];let _0x35d60d=0x0;for(let _0x161cf3=0x0;_0x59d8dd[_0x3c59ac(0x190)](_0x161cf3,_0x4fcfef[_0x3c59ac(0x1b0)]);_0x161cf3++){const _0x5b53b3=_0x4fcfef[_0x161cf3];for(const _0x461324 of _0x5b53b3['clusters']){const _0x683a65=_0x461324[_0x3c59ac(0x1a7)]+_0x35d60d;_0x2c5c9d['push'](buildCluster(_0x683a65,_0x461324[_0x3c59ac(0x1a1)],_0x461324['bodyAfterTimestamp']));}const _0x5b147a=0x1e;_0x35d60d+=_0x59d8dd[_0x3c59ac(0x199)](_0x5b53b3['maxTimestampTicks'],_0x5b147a);}return _0x59d8dd[_0x3c59ac(0x18d)](writeFileSync,_0x49c5cf,Buffer[_0x3c59ac(0x1a6)](_0x2c5c9d)),!![];}if(process['argv'][0x1]?.[_0x54be51(0x1a5)](_0x54be51(0x1a0))||process['argv'][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x54be51(0x1c5)](0x2);args[_0x54be51(0x1b0)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x54be51(0x187)](_0x54be51(0x1b9)+inputs[_0x54be51(0x1b0)]+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|