@ranger-testing/ranger-cli 3.1.7-alpha.a5be4ca-60 → 3.1.7-alpha.d64f22a-65
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/actors.js +1 -0
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/build/skills/ranger/SKILL.md +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x223ab4,_0x2932c5){const _0x14a8aa=_0x131d,_0x42fe75=_0x223ab4();while(!![]){try{const _0xbac7d3=-parseInt(_0x14a8aa(0x1b5))/0x1*(-parseInt(_0x14a8aa(0x1b3))/0x2)+parseInt(_0x14a8aa(0x1cb))/0x3*(parseInt(_0x14a8aa(0x1e9))/0x4)+parseInt(_0x14a8aa(0x1cd))/0x5*(parseInt(_0x14a8aa(0x1e8))/0x6)+-parseInt(_0x14a8aa(0x1c3))/0x7*(parseInt(_0x14a8aa(0x1bb))/0x8)+-parseInt(_0x14a8aa(0x1b2))/0x9*(parseInt(_0x14a8aa(0x1de))/0xa)+parseInt(_0x14a8aa(0x1c6))/0xb+-parseInt(_0x14a8aa(0x1ae))/0xc;if(_0xbac7d3===_0x2932c5)break;else _0x42fe75['push'](_0x42fe75['shift']());}catch(_0x4ded30){_0x42fe75['push'](_0x42fe75['shift']());}}}(_0x4eca,0xc53a8));import{existsSync}from'fs';import _0x27949e from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x131d(_0x2a9a62,_0x120b79){_0x2a9a62=_0x2a9a62-0x1ad;const _0x4eca93=_0x4eca();let _0x131d04=_0x4eca93[_0x2a9a62];return _0x131d04;}import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';function _0x4eca(){const _0x4b5a78=['envBaseUrl','xlkBp','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','sRetG','oDSim','15111370XLdmIp','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','lXNmN','\x20does\x20not\x20exist.','cloud','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','length','Cloud\x20profile\x20(recommended)','WZwJV','list','11436iGtYxi','1188zrbnyx','\x20\x20Note:\x20--env\x20\x22','`ranger\x20profile\x20add`\x20to\x20create\x20one.','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','string','baseUrl','adcwu','envStartPath','4592784jnBSUt','log','authEnv','name','9mZzeiN','5090BUlKDf','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','78CxHvLp','environmentKey','\x20\x20Warning:\x20','aXaZJ','resolvedEnv','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','48tBhJRZ','trhhY','telemetry','pxPMV','profile','key','Local\x20profile','status','1159774ogbWav','WjOTy','`\x20to\x20recreate\x20it.','16747544ZgUrOv','domains','RANGER_TEST_USERNAME','env','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','5277rQzSYg','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','3810OCTFVX','settings','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','authPath','BRnxh','baseUrlSource','startPath','hKogb','rPMFi','xAuSl','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','RANGER_SESSION_STATE_PATH='];_0x4eca=function(){return _0x4b5a78;};return _0x4eca();}import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x72f6ce){const _0x58c32b=_0x131d,_0x2f0584={'WZwJV':function(_0x21047f,_0x502bea){return _0x21047f(_0x502bea);},'qtJMv':function(_0x6a8c68,_0x2a1940){return _0x6a8c68!==_0x2a1940;},'trhhY':function(_0x57ffa7,_0x206ee3){return _0x57ffa7??_0x206ee3;},'sRetG':function(_0x265924){return _0x265924();},'hKogb':function(_0x216815,_0x497944){return _0x216815===_0x497944;},'pxPMV':function(_0x389124,_0x7f137c){return _0x389124+_0x7f137c;},'ynVhm':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','aXaZJ':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','oDSim':_0x58c32b(0x1cc),'daDLF':function(_0x6cbeca,_0x1df067){return _0x6cbeca instanceof _0x1df067;},'lXNmN':function(_0x49e3ac,_0x487f16){return _0x49e3ac&&_0x487f16;},'BRnxh':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','xlkBp':_0x58c32b(0x1e7),'WjOTy':_0x58c32b(0x1e5),'YFWGI':'cloud','adcwu':'local','xAuSl':function(_0x5a3a5e,_0x331bec,_0x214b18){return _0x5a3a5e(_0x331bec,_0x214b18);},'dJIYY':function(_0x3b3c8b,_0x1efc38,_0x3177cb){return _0x3b3c8b(_0x1efc38,_0x3177cb);},'YZePC':function(_0x3804d5,_0x1861e6){return _0x3804d5(_0x1861e6);},'rPMFi':function(_0x3b11a9,_0x133c71){return _0x3b11a9(_0x133c71);},'fdkoN':function(_0x20e4c5,_0x4a4759){return _0x20e4c5(_0x4a4759);},'uMLWA':function(_0x6b219f,_0x56c12c){return _0x6b219f(_0x56c12c);},'CEpSp':function(_0x4bca59,_0x5b4b5d){return _0x4bca59(_0x5b4b5d);},'bRvzC':function(_0x2bf515,_0x1235f1){return _0x2bf515+_0x1235f1;},'lfPdo':_0x58c32b(0x1ba)},_0x26f5c1=_0x72f6ce[_0x58c32b(0x1bf)];let _0x5c3456=_0x26f5c1,_0x33fe81=null;const _0x64c45a=_0x26f5c1?null:await readActiveProfileName();if(_0x72f6ce['authEnv']&&_0x26f5c1)console[_0x58c32b(0x1af)]('\x20\x20Note:\x20--env\x20\x22'+_0x72f6ce[_0x58c32b(0x1b0)]+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x26f5c1+_0x58c32b(0x1df));else _0x72f6ce['authEnv']&&!process['env']['RANGER_TEST_USERNAME']&&console['log'](_0x58c32b(0x1ea)+_0x72f6ce['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x26f5c1&&process[_0x58c32b(0x1c9)][_0x58c32b(0x1c8)])try{const _0x47284b=await _0x2f0584[_0x58c32b(0x1e6)](resolveAdHocProfile,{'targetUrl':_0x72f6ce[_0x58c32b(0x1ee)]??readUrlEnvVars()['envBaseUrl'],'envKey':_0x72f6ce[_0x58c32b(0x1b0)]});_0x47284b&&(_0x64c45a&&_0x2f0584['qtJMv'](_0x64c45a,_0x47284b[_0x58c32b(0x1b1)])&&console['log'](_0x58c32b(0x1ca)+_0x47284b['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x64c45a+'\x22.\x20Pass\x20--profile\x20'+_0x64c45a+'\x20to\x20override.'),_0x5c3456=_0x47284b[_0x58c32b(0x1b1)],_0x33fe81=_0x47284b[_0x58c32b(0x1bf)]);}catch(_0x4ecb10){if(!_0x64c45a||_0x72f6ce[_0x58c32b(0x1b0)])throw _0x4ecb10;console[_0x58c32b(0x1af)](_0x58c32b(0x1b7)+(_0x4ecb10 instanceof Error?_0x4ecb10['message']:_0x2f0584[_0x58c32b(0x1e6)](String,_0x4ecb10))),console[_0x58c32b(0x1af)](_0x58c32b(0x1d7)+_0x64c45a+'\x22.');}if(!_0x5c3456)_0x5c3456=_0x2f0584[_0x58c32b(0x1bc)](_0x64c45a,undefined);if(!_0x5c3456)try{const _0x475eeb=await _0x2f0584[_0x58c32b(0x1dc)](listCloudProfiles);if(_0x2f0584[_0x58c32b(0x1d4)](_0x475eeb[_0x58c32b(0x1e4)],0x1)){const _0xe74efb=_0x475eeb[0x0];_0x5c3456=_0xe74efb['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0xe74efb[_0x58c32b(0x1b1)]),console[_0x58c32b(0x1af)](_0x58c32b(0x1b4));}}catch{}if(!_0x5c3456)throw new Error(_0x2f0584['pxPMV'](_0x2f0584['pxPMV'](_0x2f0584[_0x58c32b(0x1be)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a'),_0x2f0584['ynVhm']),_0x2f0584[_0x58c32b(0x1b8)])+_0x2f0584[_0x58c32b(0x1dd)]);const _0x17a964=getEnvDir(_0x5c3456),_0x1626e0=_0x2f0584[_0x58c32b(0x1e6)](existsSync,_0x17a964);let _0x21e4bd=_0x33fe81,_0x6fdd80=![];if(!_0x21e4bd)try{_0x21e4bd=await fetchCloudProfile(_0x5c3456);if(!_0x21e4bd)_0x6fdd80=!![];}catch(_0x182b14){_0x2f0584['daDLF'](_0x182b14,ApiError)&&_0x182b14[_0x58c32b(0x1c2)]===0x194&&(_0x6fdd80=!![]);}if(_0x2f0584[_0x58c32b(0x1e0)](_0x26f5c1,_0x6fdd80)&&!_0x1626e0&&!_0x21e4bd)throw new Error(_0x2f0584[_0x58c32b(0x1be)]('Profile\x20\x22'+_0x26f5c1+_0x58c32b(0x1ec)+_0x2f0584[_0x58c32b(0x1d1)],_0x58c32b(0x1eb)));if(_0x21e4bd&&_0x1626e0){let _0x3f10fe=!![];if(_0x2f0584['sRetG'](isInteractive)){const {source:_0x299eea}=await _0x27949e['prompt']([{'type':_0x2f0584[_0x58c32b(0x1da)],'name':'source','message':'Profile\x20\x22'+_0x5c3456+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x2f0584[_0x58c32b(0x1c4)],'value':_0x2f0584['YFWGI']},{'name':_0x58c32b(0x1c1),'value':_0x2f0584[_0x58c32b(0x1ef)]}],'default':_0x2f0584['YFWGI']}]);_0x3f10fe=_0x299eea===_0x58c32b(0x1e2);}if(!_0x3f10fe)_0x21e4bd=null;}const _0x4b5048=readProfileOverrides(process['cwd'](),_0x5c3456);let _0xab8d0c=null,_0x101289,_0x25c718,_0x4ef92e,_0x559d42,_0x1d2595=null,_0x5df2f2,_0x5dc2dc;const _0x5a464c=expandOverrides(_0x4b5048),_0x37e04b=_0x2f0584[_0x58c32b(0x1dc)](readUrlEnvVars);if(_0x21e4bd){_0xab8d0c=_0x21e4bd;const _0x504f25=_0x21e4bd[_0x58c32b(0x1ce)]??{},_0x3aa425=_0x2f0584['xAuSl'](mergeCloudProfileSettings,_0x504f25,_0x4b5048??undefined),_0x28c3f7={..._0x21e4bd,'settings':_0x3aa425};_0x1d2595={'baseUrl':expandString(_0x504f25[_0x58c32b(0x1ee)]),'startPath':_0x2f0584['WZwJV'](expandString,_0x504f25['startPath'])};const _0x4d3c4f=await _0x2f0584[_0x58c32b(0x1dc)](fetchAuthConfig),_0x5db2c8=_0x4d3c4f?_0x2f0584['dJIYY'](resolveAuthEnvironmentLocally,_0x4d3c4f,_0x21e4bd[_0x58c32b(0x1b6)]):null;_0x5df2f2=_0x5db2c8?.['domains']?.[0x0],_0x5dc2dc=_0x5db2c8?.['key'];const _0x530683=_0x2f0584['YZePC'](resolveProfileUrl,{'flagBaseUrl':_0x72f6ce[_0x58c32b(0x1ee)],'flagStartPath':_0x72f6ce['startPath'],'envBaseUrl':_0x37e04b[_0x58c32b(0x1d9)],'envStartPath':_0x37e04b['envStartPath'],'projectOverrides':_0x5a464c,'cloudSettings':_0x1d2595,'authEnvironmentDomain':_0x5df2f2}),_0x2dafca=process[_0x58c32b(0x1c9)]['RANGER_SESSION_STATE_PATH'];if(_0x2dafca){if(!_0x2f0584[_0x58c32b(0x1d5)](existsSync,_0x2dafca))throw new Error(_0x58c32b(0x1d8)+_0x2dafca+_0x58c32b(0x1e1));_0x101289=_0x2dafca,_0x25c718=_0x2f0584['fdkoN'](resolveEnvVars,_0x3aa425),_0x4ef92e=_0x2f0584['uMLWA'](Boolean,_0x25c718['cdpEndpoint']);}else{const _0x446f32=await _0x2f0584[_0x58c32b(0x1d6)](resolveCloudProfileSession,_0x28c3f7,{'effectiveBaseUrl':_0x530683[_0x58c32b(0x1ee)],'telemetry':_0x72f6ce[_0x58c32b(0x1bd)],'assertedEnv':_0x72f6ce[_0x58c32b(0x1b0)]});_0x101289=_0x446f32[_0x58c32b(0x1d0)],_0x25c718=resolveEnvVars(_0x446f32[_0x58c32b(0x1ce)]),_0x4ef92e=_0x2f0584['CEpSp'](Boolean,_0x25c718['cdpEndpoint']),_0x5df2f2=_0x446f32['resolvedEnv']?.[_0x58c32b(0x1c7)]?.[0x0],_0x5dc2dc=_0x446f32[_0x58c32b(0x1b9)]?.[_0x58c32b(0x1c0)];}}else{if(!_0x1626e0){const _0x4ee330=!_0x26f5c1;throw new Error(_0x4ee330?_0x2f0584['bRvzC']('Active\x20profile\x20\x22'+_0x5c3456+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x58c32b(0x1cf))+_0x2f0584['lfPdo']+(_0x58c32b(0x1db)+_0x5c3456+_0x58c32b(0x1c5)):'Profile\x20\x22'+_0x5c3456+_0x58c32b(0x1e3)+_0x5c3456);}const _0x393ded=await _0x2f0584['CEpSp'](loadSettings,_0x5c3456);_0x25c718=resolveEnvVars(_0x393ded),_0x4ef92e=_0x2f0584['fdkoN'](Boolean,_0x25c718['cdpEndpoint']),_0x559d42=_0x25c718['baseUrl'];}const _0xdc8f1c=resolveProfileUrl({'flagBaseUrl':_0x72f6ce[_0x58c32b(0x1ee)],'flagStartPath':_0x72f6ce[_0x58c32b(0x1d3)],'envBaseUrl':_0x37e04b[_0x58c32b(0x1d9)],'envStartPath':_0x37e04b[_0x58c32b(0x1ad)],'localSettingsBaseUrl':_0x559d42,'projectOverrides':_0x5a464c,'cloudSettings':_0x1d2595,'authEnvironmentDomain':_0x5df2f2}),_0x17c99f=_0xdc8f1c['url']??_0xdc8f1c[_0x58c32b(0x1ee)];if(!_0x17c99f&&!_0x4ef92e)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x5c3456+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x5c3456+'\x20baseUrl\x20<url>');return{'activeProfile':_0x5c3456,'resolvedCloudProfile':_0xab8d0c,'cloudAuthPath':_0x101289,'resolvedSettings':_0x25c718,'isCdpMode':_0x4ef92e,'url':_0x17c99f,'baseUrlSource':_0xdc8f1c[_0x58c32b(0x1d2)],'authEnvKey':_0x5dc2dc,'startPath':_0xdc8f1c['startPath']};}function expandString(_0x528650){const _0x3838a4={'PLNeh':function(_0xf67d8d,_0x3a2555){return _0xf67d8d!==_0x3a2555;},'kKNov':function(_0x4b16e3,_0x5ce528){return _0x4b16e3(_0x5ce528);}};if(_0x3838a4['PLNeh'](typeof _0x528650,'string'))return _0x528650;return _0x3838a4['kKNov'](resolveEnvVars,_0x528650);}function expandOverrides(_0x57912a){const _0x15fd27=_0x131d,_0x157e33={'WTMFZ':function(_0x4f638f,_0x38f277){return _0x4f638f(_0x38f277);},'inbsy':_0x15fd27(0x1ed)};if(!_0x57912a)return _0x57912a;const _0x48938e={..._0x57912a};return typeof _0x48938e[_0x15fd27(0x1ee)]===_0x15fd27(0x1ed)&&(_0x48938e[_0x15fd27(0x1ee)]=_0x157e33['WTMFZ'](resolveEnvVars,_0x48938e['baseUrl'])),typeof _0x48938e['startPath']===_0x157e33['inbsy']&&(_0x48938e[_0x15fd27(0x1d3)]=resolveEnvVars(_0x48938e['startPath'])),_0x48938e;}
|
|
1
|
+
(function(_0x4f2146,_0xdea6df){const _0x40b7e4=_0x46c6,_0x17c581=_0x4f2146();while(!![]){try{const _0x10806c=parseInt(_0x40b7e4(0x1b5))/0x1+-parseInt(_0x40b7e4(0x1ac))/0x2*(-parseInt(_0x40b7e4(0x1d0))/0x3)+parseInt(_0x40b7e4(0x1d1))/0x4*(-parseInt(_0x40b7e4(0x1c9))/0x5)+-parseInt(_0x40b7e4(0x1c7))/0x6+parseInt(_0x40b7e4(0x1da))/0x7+parseInt(_0x40b7e4(0x1cb))/0x8*(parseInt(_0x40b7e4(0x1d7))/0x9)+-parseInt(_0x40b7e4(0x1dc))/0xa*(parseInt(_0x40b7e4(0x1e8))/0xb);if(_0x10806c===_0xdea6df)break;else _0x17c581['push'](_0x17c581['shift']());}catch(_0xa3f182){_0x17c581['push'](_0x17c581['shift']());}}}(_0xdb82,0xb920e));import{existsSync}from'fs';import _0x41102b from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x46c6(_0x36167e,_0x51507c){_0x36167e=_0x36167e-0x1a7;const _0xdb8284=_0xdb82();let _0x46c666=_0xdb8284[_0x36167e];return _0x46c666;}import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';function _0xdb82(){const _0x4923cf=['\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','\x20\x20Warning:\x20','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','settings','cwd','143hVawab','cdpEndpoint','envBaseUrl','VJtHl','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','ErWUs','13384jSuGqP','\x20baseUrl\x20<url>','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','sFzkm','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','JDTOE','BkDDO','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','VuuYj','696521gqWPtN','log','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','JrnTO','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','profile','\x20does\x20not\x20exist.','resolvedEnv','\x20to\x20override.','status','RANGER_SESSION_STATE_PATH','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','qMUna','HWfvk','length','ZmBaJ','cOqXa','aOefa','6924090JACDgi','baseUrl','3620NgKltT','TNOEc','223144aMPdlS','name','EijwH','key','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','597tcqMep','2636gZevhp','domains','authEnv','YhwfP','QqSjO','Active\x20profile\x20\x22','108JGIDqP','source','\x20\x20Note:\x20--env\x20\x22','3195857UWRaUT','startPath','330830UBYnfI','EoRAC','\x22.\x20Pass\x20--profile\x20','RANGER_TEST_USERNAME','string','env'];_0xdb82=function(){return _0x4923cf;};return _0xdb82();}import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x410b47){const _0x4409d1=_0x46c6,_0x1beb35={'TNOEc':function(_0xe4124){return _0xe4124();},'bSNqG':function(_0x4a54df,_0x1b634f){return _0x4a54df(_0x1b634f);},'YhwfP':function(_0x3fb1d4,_0x301a89){return _0x3fb1d4===_0x301a89;},'VuuYj':function(_0x5566b8,_0x2c6f47){return _0x5566b8+_0x2c6f47;},'IQqgU':function(_0x3dbc1e,_0x12302a){return _0x3dbc1e+_0x12302a;},'HWfvk':function(_0x23c821,_0x4921e1){return _0x23c821+_0x4921e1;},'RmFrE':'Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','JrnTO':_0x4409d1(0x1e5),'qMUna':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','sFzkm':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','QqSjO':function(_0x3bd041,_0x527a46){return _0x3bd041(_0x527a46);},'DvlQU':function(_0x40c8bd,_0x4d772e){return _0x40c8bd&&_0x4d772e;},'JDTOE':function(_0x5c9899){return _0x5c9899();},'aOefa':'list','bkhoC':'Cloud\x20profile\x20(recommended)','ErWUs':'cloud','EijwH':'Local\x20profile','cOqXa':'local','FiaBy':function(_0x2745f8,_0x5913b5,_0x1829c3){return _0x2745f8(_0x5913b5,_0x1829c3);},'ZmBaJ':function(_0x1526eb,_0x5ac7a0){return _0x1526eb(_0x5ac7a0);},'EoRAC':function(_0x5b1733,_0xf70aa5,_0x2db9b4){return _0x5b1733(_0xf70aa5,_0x2db9b4);},'wXkeV':_0x4409d1(0x1aa),'ohkZz':function(_0x59b6c4,_0x3901a6){return _0x59b6c4&&_0x3901a6;}},_0x3d8dbc=_0x410b47[_0x4409d1(0x1ba)];let _0x123b37=_0x3d8dbc,_0x59cac0=null;const _0x504998=_0x3d8dbc?null:await readActiveProfileName();if(_0x410b47[_0x4409d1(0x1d3)]&&_0x3d8dbc)console[_0x4409d1(0x1b6)]('\x20\x20Note:\x20--env\x20\x22'+_0x410b47['authEnv']+_0x4409d1(0x1e4)+_0x3d8dbc+_0x4409d1(0x1b3));else _0x410b47['authEnv']&&!process[_0x4409d1(0x1e1)][_0x4409d1(0x1df)]&&console['log'](_0x4409d1(0x1d9)+_0x410b47[_0x4409d1(0x1d3)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x3d8dbc&&process['env']['RANGER_TEST_USERNAME'])try{const _0x10a671=await resolveAdHocProfile({'targetUrl':_0x410b47['baseUrl']??_0x1beb35[_0x4409d1(0x1ca)](readUrlEnvVars)[_0x4409d1(0x1a7)],'envKey':_0x410b47['authEnv']});_0x10a671&&(_0x504998&&_0x504998!==_0x10a671['name']&&console['log'](_0x4409d1(0x1c0)+_0x10a671[_0x4409d1(0x1cc)]+_0x4409d1(0x1a9)+_0x504998+_0x4409d1(0x1de)+_0x504998+_0x4409d1(0x1bd)),_0x123b37=_0x10a671['name'],_0x59cac0=_0x10a671['profile']);}catch(_0x11b18b){if(!_0x504998||_0x410b47['authEnv'])throw _0x11b18b;console['log'](_0x4409d1(0x1e3)+(_0x11b18b instanceof Error?_0x11b18b['message']:_0x1beb35['bSNqG'](String,_0x11b18b))),console[_0x4409d1(0x1b6)](_0x4409d1(0x1b0)+_0x504998+'\x22.');}if(!_0x123b37)_0x123b37=_0x504998??undefined;if(!_0x123b37)try{const _0x3a8948=await _0x1beb35[_0x4409d1(0x1ca)](listCloudProfiles);if(_0x1beb35['YhwfP'](_0x3a8948[_0x4409d1(0x1c3)],0x1)){const _0x51e21e=_0x3a8948[0x0];_0x123b37=_0x51e21e['name'],console['log'](_0x4409d1(0x1cf)+_0x51e21e[_0x4409d1(0x1cc)]),console['log'](_0x4409d1(0x1ae));}}catch{}if(!_0x123b37)throw new Error(_0x1beb35['VuuYj'](_0x1beb35['IQqgU'](_0x1beb35[_0x4409d1(0x1c2)](_0x1beb35['RmFrE'],_0x1beb35[_0x4409d1(0x1b8)]),_0x4409d1(0x1e2)),_0x1beb35[_0x4409d1(0x1c1)])+_0x1beb35[_0x4409d1(0x1af)]);const _0x394be7=getEnvDir(_0x123b37),_0x3466ed=_0x1beb35[_0x4409d1(0x1d5)](existsSync,_0x394be7);let _0x43272b=_0x59cac0,_0x4f1d7c=![];if(!_0x43272b)try{_0x43272b=await fetchCloudProfile(_0x123b37);if(!_0x43272b)_0x4f1d7c=!![];}catch(_0x1d8c19){_0x1d8c19 instanceof ApiError&&_0x1d8c19[_0x4409d1(0x1be)]===0x194&&(_0x4f1d7c=!![]);}if(_0x1beb35['DvlQU'](_0x3d8dbc,_0x4f1d7c)&&!_0x3466ed&&!_0x43272b)throw new Error('Profile\x20\x22'+_0x3d8dbc+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x4409d1(0x1b7)+'`ranger\x20profile\x20add`\x20to\x20create\x20one.');if(_0x43272b&&_0x3466ed){let _0x3a2dac=!![];if(_0x1beb35[_0x4409d1(0x1b1)](isInteractive)){const {source:_0x13e94c}=await _0x41102b['prompt']([{'type':_0x1beb35[_0x4409d1(0x1c6)],'name':_0x4409d1(0x1d8),'message':'Profile\x20\x22'+_0x123b37+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x1beb35['bkhoC'],'value':_0x1beb35['ErWUs']},{'name':_0x1beb35[_0x4409d1(0x1cd)],'value':_0x1beb35[_0x4409d1(0x1c5)]}],'default':'cloud'}]);_0x3a2dac=_0x1beb35[_0x4409d1(0x1d4)](_0x13e94c,_0x1beb35[_0x4409d1(0x1ab)]);}if(!_0x3a2dac)_0x43272b=null;}const _0x2d42b9=readProfileOverrides(process[_0x4409d1(0x1e7)](),_0x123b37);let _0x4d3991=null,_0x1f424f,_0x562775,_0x56629c,_0x12df8e,_0xe3cf16=null,_0x4b83c1,_0x358f64;const _0x129e2f=expandOverrides(_0x2d42b9),_0xbfa20d=readUrlEnvVars();if(_0x43272b){_0x4d3991=_0x43272b;const _0x161007=_0x43272b['settings']??{},_0x3771f9=mergeCloudProfileSettings(_0x161007,_0x2d42b9??undefined),_0x5a5e8c={..._0x43272b,'settings':_0x3771f9};_0xe3cf16={'baseUrl':_0x1beb35['bSNqG'](expandString,_0x161007[_0x4409d1(0x1c8)]),'startPath':_0x1beb35['QqSjO'](expandString,_0x161007[_0x4409d1(0x1db)])};const _0x3a2a8d=await fetchAuthConfig(),_0x231992=_0x3a2a8d?_0x1beb35['FiaBy'](resolveAuthEnvironmentLocally,_0x3a2a8d,_0x43272b['environmentKey']):null;_0x4b83c1=_0x231992?.[_0x4409d1(0x1d2)]?.[0x0],_0x358f64=_0x231992?.[_0x4409d1(0x1ce)];const _0x8d89ff=resolveProfileUrl({'flagBaseUrl':_0x410b47[_0x4409d1(0x1c8)],'flagStartPath':_0x410b47['startPath'],'envBaseUrl':_0xbfa20d[_0x4409d1(0x1a7)],'envStartPath':_0xbfa20d['envStartPath'],'projectOverrides':_0x129e2f,'cloudSettings':_0xe3cf16,'authEnvironmentDomain':_0x4b83c1}),_0x1cba97=process[_0x4409d1(0x1e1)][_0x4409d1(0x1bf)];if(_0x1cba97){if(!_0x1beb35[_0x4409d1(0x1c4)](existsSync,_0x1cba97))throw new Error('RANGER_SESSION_STATE_PATH='+_0x1cba97+_0x4409d1(0x1bb));_0x1f424f=_0x1cba97,_0x562775=resolveEnvVars(_0x3771f9),_0x56629c=Boolean(_0x562775['cdpEndpoint']);}else{const _0x5b74d3=await _0x1beb35[_0x4409d1(0x1dd)](resolveCloudProfileSession,_0x5a5e8c,{'effectiveBaseUrl':_0x8d89ff['baseUrl'],'telemetry':_0x410b47['telemetry'],'assertedEnv':_0x410b47[_0x4409d1(0x1d3)]});_0x1f424f=_0x5b74d3['authPath'],_0x562775=resolveEnvVars(_0x5b74d3[_0x4409d1(0x1e6)]),_0x56629c=_0x1beb35[_0x4409d1(0x1c4)](Boolean,_0x562775['cdpEndpoint']),_0x4b83c1=_0x5b74d3['resolvedEnv']?.[_0x4409d1(0x1d2)]?.[0x0],_0x358f64=_0x5b74d3[_0x4409d1(0x1bc)]?.[_0x4409d1(0x1ce)];}}else{if(!_0x3466ed){const _0x1b537a=!_0x3d8dbc;throw new Error(_0x1b537a?_0x1beb35[_0x4409d1(0x1b4)](_0x1beb35[_0x4409d1(0x1c2)](_0x4409d1(0x1d6)+_0x123b37+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x1beb35['wXkeV'])+'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x123b37+'`\x20to\x20recreate\x20it.'):'Profile\x20\x22'+_0x123b37+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x123b37);}const _0x4832fd=await loadSettings(_0x123b37);_0x562775=resolveEnvVars(_0x4832fd),_0x56629c=Boolean(_0x562775[_0x4409d1(0x1e9)]),_0x12df8e=_0x562775['baseUrl'];}const _0x1a4201=resolveProfileUrl({'flagBaseUrl':_0x410b47['baseUrl'],'flagStartPath':_0x410b47[_0x4409d1(0x1db)],'envBaseUrl':_0xbfa20d[_0x4409d1(0x1a7)],'envStartPath':_0xbfa20d['envStartPath'],'localSettingsBaseUrl':_0x12df8e,'projectOverrides':_0x129e2f,'cloudSettings':_0xe3cf16,'authEnvironmentDomain':_0x4b83c1}),_0x5b6390=_0x1a4201['url']??_0x1a4201['baseUrl'];if(_0x1beb35['ohkZz'](!_0x5b6390,!_0x56629c))throw new Error(_0x4409d1(0x1b9)+_0x123b37+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x123b37+_0x4409d1(0x1ad));return{'activeProfile':_0x123b37,'resolvedCloudProfile':_0x4d3991,'cloudAuthPath':_0x1f424f,'resolvedSettings':_0x562775,'isCdpMode':_0x56629c,'url':_0x5b6390,'baseUrlSource':_0x1a4201['baseUrlSource'],'authEnvKey':_0x358f64,'startPath':_0x1a4201['startPath']};}function expandString(_0x4fdab8){const _0x360d51=_0x46c6,_0x20df6f={'Cgxpy':_0x360d51(0x1e0),'BkDDO':function(_0x11bbba,_0x318fe2){return _0x11bbba(_0x318fe2);}};if(typeof _0x4fdab8!==_0x20df6f['Cgxpy'])return _0x4fdab8;return _0x20df6f[_0x360d51(0x1b2)](resolveEnvVars,_0x4fdab8);}function expandOverrides(_0xe36a99){const _0x77a3ac=_0x46c6,_0x526768={'GFPWx':'string','VJtHl':function(_0x26d2d0,_0x4e3f8a){return _0x26d2d0(_0x4e3f8a);}};if(!_0xe36a99)return _0xe36a99;const _0x69e76e={..._0xe36a99};return typeof _0x69e76e['baseUrl']===_0x526768['GFPWx']&&(_0x69e76e[_0x77a3ac(0x1c8)]=resolveEnvVars(_0x69e76e['baseUrl'])),typeof _0x69e76e[_0x77a3ac(0x1db)]===_0x526768['GFPWx']&&(_0x69e76e['startPath']=_0x526768[_0x77a3ac(0x1a8)](resolveEnvVars,_0x69e76e[_0x77a3ac(0x1db)])),_0x69e76e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ba6bd,_0x10224a){const _0x6cd3b5=_0x1c0a,_0x373706=_0x4ba6bd();while(!![]){try{const _0x183f5c=-parseInt(_0x6cd3b5(0x109))/0x1*(parseInt(_0x6cd3b5(0x119))/0x2)+parseInt(_0x6cd3b5(0x10c))/0x3*(-parseInt(_0x6cd3b5(0x10a))/0x4)+-parseInt(_0x6cd3b5(0x103))/0x5*(-parseInt(_0x6cd3b5(0x107))/0x6)+parseInt(_0x6cd3b5(0x116))/0x7+-parseInt(_0x6cd3b5(0x104))/0x8+parseInt(_0x6cd3b5(0x105))/0x9+parseInt(_0x6cd3b5(0x108))/0xa;if(_0x183f5c===_0x10224a)break;else _0x373706['push'](_0x373706['shift']());}catch(_0x3ea2e3){_0x373706['push'](_0x373706['shift']());}}}(_0xadf2,0x4439e));function firstDefined(..._0x5a3908){const _0x10baf2=_0x1c0a,_0x39bd45={'LVrxK':function(_0x13c79e,_0x9e98ad){return _0x13c79e!==_0x9e98ad;},'sUcGG':function(_0x8239b7,_0x14fe12){return _0x8239b7!==_0x14fe12;}};for(const _0xbf012c of _0x5a3908){if(_0x39bd45[_0x10baf2(0x101)](_0xbf012c,undefined)&&_0xbf012c!==null&&_0x39bd45[_0x10baf2(0x10f)](_0xbf012c,''))return _0xbf012c;}return undefined;}function normalizeAuthEnvironmentDomain(_0x4b64aa){if(!_0x4b64aa)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x4b64aa))return _0x4b64aa;return'https://'+_0x4b64aa;}export function resolveBaseUrlWithSource(_0x169c2e){const _0x2f9226=_0x1c0a,_0x22798d={'iHCJc':function(_0x502dde,_0x362437){return _0x502dde in _0x362437;},'FCUvF':_0x2f9226(0x114),'atGfp':function(_0x4de5f4,_0x5dffa7){return _0x4de5f4===_0x5dffa7;},'SNdOR':_0x2f9226(0x11b),'qEceQ':_0x2f9226(0xfe),'WZSTN':'string','AMOmu':_0x2f9226(0x111),'xQaQa':_0x2f9226(0x113),'jsCPg':function(_0x2bbe79,_0x3c5816){return _0x2bbe79!==_0x3c5816;}},_0x570f3f=_0x169c2e[_0x2f9226(0x102)],_0x2eee46=!!_0x570f3f&&_0x22798d[_0x2f9226(0xfd)](_0x22798d[_0x2f9226(0x106)],_0x570f3f),_0x2133e8=_0x570f3f?.[_0x2f9226(0x114)],_0x544d06=!(_0x2eee46&&_0x22798d['atGfp'](_0x2133e8,null)),_0x58a30e=[[_0x169c2e['flagBaseUrl'],_0x22798d[_0x2f9226(0x10d)]],[_0x169c2e[_0x2f9226(0x117)],_0x22798d[_0x2f9226(0x112)]],[_0x169c2e['localSettingsBaseUrl'],_0x2f9226(0x115)],[typeof _0x2133e8===_0x22798d[_0x2f9226(0x118)]?_0x2133e8:undefined,_0x22798d['AMOmu']],[_0x544d06?_0x169c2e['cloudSettings']?.[_0x2f9226(0x114)]:undefined,_0x2f9226(0x10b)],[_0x544d06?normalizeAuthEnvironmentDomain(_0x169c2e['authEnvironmentDomain']):undefined,_0x22798d['xQaQa']]];for(const [_0x5b8c99,_0x21670b]of _0x58a30e){if(_0x5b8c99!==undefined&&_0x5b8c99!==null&&_0x22798d['jsCPg'](_0x5b8c99,''))return{'baseUrl':_0x5b8c99,'source':_0x21670b};}return{};}export function resolveBaseUrl(_0x568601){const _0x3f5daf=_0x1c0a,_0x397e3a={'DbwyM':function(_0xf1a3e8,_0x4ac250){return _0xf1a3e8(_0x4ac250);}};return _0x397e3a[_0x3f5daf(0x10e)](resolveBaseUrlWithSource,_0x568601)[_0x3f5daf(0x114)];}export function resolveStartPath(_0xe20e21){const _0x1e8d28=_0x1c0a,_0x2d3548={'UvLAk':function(_0x332126,_0x81914b){return _0x332126 in _0x81914b;},'CgrPK':function(_0x330db1,_0x14408c){return _0x330db1===_0x14408c;}},_0x2a6e27=_0xe20e21[_0x1e8d28(0x102)],_0x12b656=!!_0x2a6e27&&_0x2d3548['UvLAk']('startPath',_0x2a6e27),_0x44bd0e=_0x2a6e27?.['startPath'],_0x598f66=!(_0x12b656&&_0x2d3548['CgrPK'](_0x44bd0e,null));return firstDefined(_0xe20e21[_0x1e8d28(0x11a)],_0xe20e21['envStartPath'],typeof _0x44bd0e==='string'?_0x44bd0e:undefined,_0x598f66?_0xe20e21['cloudSettings']?.['startPath']:undefined);}function _0xadf2(){const _0x1b2623=['iHCJc','RANGER_BASE_URL','RANGER_START_PATH','slice','LVrxK','projectOverrides','1394735oBQNHz','2657416oLHVjG','1184040gtBqjn','FCUvF','6INrWPG','8585190EgEFdo','11oGvfQu','4feEJGF','cloud\x20profile\x20settings','1209927ICHLvz','SNdOR','DbwyM','sUcGG','uxfHR','projects.json\x20override','qEceQ','auth\x20environment\x20domain','baseUrl','local\x20profile\x20settings','816529tvyXgm','envBaseUrl','WZSTN','67406qLFGdA','flagStartPath','--base-url'];_0xadf2=function(){return _0x1b2623;};return _0xadf2();}function _0x1c0a(_0x51d20c,_0x1e1cbb){_0x51d20c=_0x51d20c-0xfd;const _0xadf28=_0xadf2();let _0x1c0a96=_0xadf28[_0x51d20c];return _0x1c0a96;}export function joinBaseAndPath(_0x5a5c33,_0x41c476){const _0x4fffa3=_0x1c0a,_0x644dd0={'uxfHR':function(_0x542998,_0x177d71){return _0x542998+_0x177d71;}};if(!_0x5a5c33)return undefined;if(!_0x41c476)return _0x5a5c33;const _0x51d8d6=_0x5a5c33['endsWith']('/')?_0x5a5c33[_0x4fffa3(0x100)](0x0,-0x1):_0x5a5c33,_0x41076a=_0x41c476['startsWith']('/')?_0x41c476:_0x644dd0[_0x4fffa3(0x110)]('/',_0x41c476);return _0x51d8d6+_0x41076a;}export function resolveProfileUrl(_0x5ea043){const _0xc5d278={'lXPpF':function(_0x12af78,_0x16599d){return _0x12af78(_0x16599d);}},{baseUrl:_0x2bc45a,source:_0x52416a}=resolveBaseUrlWithSource(_0x5ea043),_0x36a169=_0xc5d278['lXPpF'](resolveStartPath,_0x5ea043);return{'baseUrl':_0x2bc45a,'baseUrlSource':_0x52416a,'startPath':_0x36a169,'url':joinBaseAndPath(_0x2bc45a,_0x36a169)};}export function readUrlEnvVars(_0x52ddd6=process['env']){const _0x5199e7=_0x1c0a;return{'envBaseUrl':_0x52ddd6[_0x5199e7(0xfe)],'envStartPath':_0x52ddd6[_0x5199e7(0xff)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e5515,_0xa6a3ad){const _0x1c357a=_0x27e7,_0x2a0b5b=_0x4e5515();while(!![]){try{const _0xd59e6=parseInt(_0x1c357a(0x95))/0x1*(-parseInt(_0x1c357a(0x9c))/0x2)+parseInt(_0x1c357a(0x93))/0x3+-parseInt(_0x1c357a(0x98))/0x4+parseInt(_0x1c357a(0x99))/0x5+-parseInt(_0x1c357a(0x94))/0x6*(-parseInt(_0x1c357a(0x92))/0x7)+parseInt(_0x1c357a(0x9b))/0x8*(parseInt(_0x1c357a(0x9d))/0x9)+parseInt(_0x1c357a(0x96))/0xa;if(_0xd59e6===_0xa6a3ad)break;else _0x2a0b5b['push'](_0x2a0b5b['shift']());}catch(_0x151118){_0x2a0b5b['push'](_0x2a0b5b['shift']());}}}(_0x1e69,0x3dbf6));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x27e7(_0x1e5c03,_0x4f829a){_0x1e5c03=_0x1e5c03-0x92;const _0x1e694e=_0x1e69();let _0x27e71e=_0x1e694e[_0x1e5c03];return _0x27e71e;}export async function withRetry(_0x9379e5,_0x4253b9){const _0x24144c=_0x27e7,_0x30e3a2={'PjVBa':function(_0x19f633,_0x5efa3b){return _0x19f633+_0x5efa3b;}},_0xd48b2b=_0x4253b9?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x21919c=_0x4253b9?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x49bcff;for(let _0x504113=0x0;_0x504113<=_0xd48b2b;_0x504113++){try{return await _0x9379e5();}catch(_0x3c0f2){_0x49bcff=_0x3c0f2 instanceof Error?_0x3c0f2:new Error(String(_0x3c0f2));if(_0x504113<_0xd48b2b){const _0x56a569=_0x21919c*Math[_0x24144c(0x97)](0x2,_0x504113);_0x4253b9?.['label']&&console['error'](_0x4253b9[_0x24144c(0x9a)]+'\x20failed\x20(attempt\x20'+(_0x504113+0x1)+'/'+_0x30e3a2['PjVBa'](_0xd48b2b,0x1)+'),\x20retrying\x20in\x20'+_0x56a569+'ms...'),await new Promise(_0x1283f7=>setTimeout(_0x1283f7,_0x56a569));}}}throw _0x49bcff;}function _0x1e69(){const _0xf957a1=['440940aVJxGV','label','3816JlJNxA','26fYLSpo','6687LsBXND','133dSInQd','788598ClBcuI','156858pCjmBj','36133iwxIgX','224060CpzwJo','pow','2007764KQgKFF'];_0x1e69=function(){return _0xf957a1;};return _0x1e69();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0xf344(){const _0x346fda=['matchAll','15065964cFnxsW','3468374ACyibm','replace','30MqjAkd','origin','2533302oCNSyr','4007900VaISFl','5594592VdHudo','38954dAgQoW','443555iKkMLG','2aryVXa'];_0xf344=function(){return _0x346fda;};return _0xf344();}(function(_0x36787c,_0x54de2f){const _0x55fd23=_0xbe7b,_0x4085da=_0x36787c();while(!![]){try{const _0x394133=-parseInt(_0x55fd23(0x1fd))/0x1*(-parseInt(_0x55fd23(0x1f3))/0x2)+-parseInt(_0x55fd23(0x1fa))/0x3+-parseInt(_0x55fd23(0x1fb))/0x4+parseInt(_0x55fd23(0x1fe))/0x5*(-parseInt(_0x55fd23(0x1f8))/0x6)+parseInt(_0x55fd23(0x1f6))/0x7+parseInt(_0x55fd23(0x1fc))/0x8+parseInt(_0x55fd23(0x1f5))/0x9;if(_0x394133===_0x54de2f)break;else _0x4085da['push'](_0x4085da['shift']());}catch(_0x40cd0e){_0x4085da['push'](_0x4085da['shift']());}}}(_0xf344,0x96d40));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x5ea67f){const _0x1eb371=_0xbe7b,_0x1c0780=new Set();for(const _0x5c45db of _0x5ea67f[_0x1eb371(0x1f4)](ABSOLUTE_URL_PATTERN)){const _0x4b7e45=_0x5c45db[0x0][_0x1eb371(0x1f7)](/[.,;:!?]+$/,'');try{_0x1c0780['add'](new URL(_0x4b7e45)['origin']);}catch{}}return[..._0x1c0780];}function _0xbe7b(_0x3654df,_0x137a87){_0x3654df=_0x3654df-0x1f3;const _0xf344df=_0xf344();let _0xbe7b82=_0xf344df[_0x3654df];return _0xbe7b82;}export function findScenarioOriginMismatches(_0x2059c8,_0x559682){const _0x15bc68=_0xbe7b;let _0x3bbe25;try{_0x3bbe25=new URL(_0x559682)[_0x15bc68(0x1f9)];}catch{return[];}return extractUrlOrigins(_0x2059c8)['filter'](_0x24528c=>_0x24528c!==_0x3bbe25);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x549b38=_0x1cbf;(function(_0x57842c,_0x384826){const _0x2ca912=_0x1cbf,_0x1d548b=_0x57842c();while(!![]){try{const _0x595258=-parseInt(_0x2ca912(0xc9))/0x1+-parseInt(_0x2ca912(0xc4))/0x2*(parseInt(_0x2ca912(0xc6))/0x3)+parseInt(_0x2ca912(0xc8))/0x4+parseInt(_0x2ca912(0xbe))/0x5*(parseInt(_0x2ca912(0xa7))/0x6)+parseInt(_0x2ca912(0xbf))/0x7+-parseInt(_0x2ca912(0xba))/0x8*(-parseInt(_0x2ca912(0xc3))/0x9)+parseInt(_0x2ca912(0xd1))/0xa*(parseInt(_0x2ca912(0xb0))/0xb);if(_0x595258===_0x384826)break;else _0x1d548b['push'](_0x1d548b['shift']());}catch(_0x4a50d7){_0x1d548b['push'](_0x1d548b['shift']());}}}(_0x5c2a,0x5606b));import*as _0x1a10f2 from'fs';import*as _0x277256 from'path';import*as _0x49e90b from'os';import{execSync}from'child_process';const CACHE_FILE=_0x277256['join'](_0x49e90b[_0x549b38(0xcf)](),'.claude',_0x549b38(0xbc));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x58468d=_0x549b38,_0x59775b={'pPXJH':'utf-8','ZqdlW':function(_0x1d27ec){return _0x1d27ec();}};try{if(_0x1a10f2[_0x58468d(0xb8)](CACHE_FILE)){const _0x48e218=JSON['parse'](_0x1a10f2['readFileSync'](CACHE_FILE,_0x59775b[_0x58468d(0xaf)]));return{'version':0x3,'sessions':_0x48e218[_0x58468d(0xae)]||{},'branches':_0x48e218['branches']||{},'lastEnabledSessionClearedAt':_0x48e218[_0x58468d(0xca)]};}}catch{}return _0x59775b['ZqdlW'](createEmptyCache);}function saveCache(_0x1f3f41){const _0x5a14e8=_0x549b38;try{const _0x1abd51=_0x277256['dirname'](CACHE_FILE);!_0x1a10f2[_0x5a14e8(0xb8)](_0x1abd51)&&_0x1a10f2['mkdirSync'](_0x1abd51,{'recursive':!![]}),_0x1a10f2['writeFileSync'](CACHE_FILE,JSON[_0x5a14e8(0xa9)](_0x1f3f41,null,0x2));}catch{}}export function getCurrentBranch(){const _0x30b067=_0x549b38,_0x1168ce={'IgUVs':function(_0xe42b4f,_0x13b2ef,_0x1aefa9){return _0xe42b4f(_0x13b2ef,_0x1aefa9);},'obkJb':_0x30b067(0xb3),'QhCmQ':_0x30b067(0xb1),'QRIgH':function(_0x516b0a,_0x5307c8){return _0x516b0a===_0x5307c8;},'KrAdu':'HEAD'};try{const _0x57d75f=_0x1168ce[_0x30b067(0xc0)](execSync,_0x1168ce['obkJb'],{'encoding':_0x30b067(0xcc),'stdio':[_0x1168ce['QhCmQ'],_0x30b067(0xb1),_0x1168ce[_0x30b067(0xa3)]]})[_0x30b067(0xa1)]();if(!_0x57d75f||_0x1168ce[_0x30b067(0xd2)](_0x57d75f,_0x1168ce[_0x30b067(0xaa)]))return null;return _0x57d75f;}catch{return null;}}export function enableBranch(_0x5b081b){const _0x17b345=_0x549b38,_0xc3383={'xWxzu':function(_0x17cef2){return _0x17cef2();}},_0x5c93be=_0xc3383[_0x17b345(0xc5)](loadCache);_0x5c93be[_0x17b345(0xa4)][_0x5b081b]=!![],saveCache(_0x5c93be);}export function disableBranch(_0x522b0d){const _0x513adb=_0x549b38,_0x16e10b={'vNTEQ':function(_0x122755){return _0x122755();}},_0x28794c=_0x16e10b['vNTEQ'](loadCache);delete _0x28794c[_0x513adb(0xa4)][_0x522b0d],saveCache(_0x28794c);}export function isBranchEnabled(_0x480458){const _0x55d09c=loadCache();return _0x55d09c['branches'][_0x480458]===!![];}function getOrCreateSession(_0x35e40f,_0x549665){const _0x43224d=_0x549b38;return!_0x35e40f[_0x43224d(0xae)][_0x549665]&&(_0x35e40f[_0x43224d(0xae)][_0x549665]={}),_0x35e40f[_0x43224d(0xae)][_0x549665];}export function enableSession(_0x593b7a){const _0x56bed4=_0x549b38,_0x52bd4f={'wSVHB':function(_0x5f4346){return _0x5f4346();},'tnqxD':function(_0x53e186,_0x2d0aae,_0x16e769){return _0x53e186(_0x2d0aae,_0x16e769);},'kBrxH':_0x56bed4(0xa6),'UqnCg':function(_0x32754e,_0x1690ad){return _0x32754e!==_0x1690ad;},'QspGl':'master'},_0x3922f3=_0x52bd4f['wSVHB'](loadCache),_0x468770=_0x52bd4f['tnqxD'](getOrCreateSession,_0x3922f3,_0x593b7a);_0x468770[_0x56bed4(0xce)]=!![];const _0x419f31=_0x52bd4f[_0x56bed4(0xc1)](getCurrentBranch);_0x419f31&&_0x419f31!==_0x52bd4f['kBrxH']&&_0x52bd4f['UqnCg'](_0x419f31,_0x52bd4f['QspGl'])&&(_0x3922f3['branches'][_0x419f31]=!![],_0x468770['currentBranch']=_0x419f31),saveCache(_0x3922f3);}export function isSessionEnabled(_0x42510d){const _0x3e619a=_0x549b38,_0x28f9f4={'DdyGe':function(_0x57007d){return _0x57007d();},'uqMcr':_0x3e619a(0xbb),'QIheT':function(_0x20e0da,_0x30741e){return _0x20e0da===_0x30741e;}},_0x5ceb0f=loadCache(),_0x5b48a=_0x28f9f4['DdyGe'](getCurrentBranch);if(!_0x5b48a||_0x5b48a==='main'||_0x5b48a===_0x28f9f4['uqMcr'])return _0x28f9f4['QIheT'](_0x5ceb0f['sessions'][_0x42510d]?.['enabled'],!![]);const _0x2eff3f=_0x5ceb0f[_0x3e619a(0xa4)][_0x5b48a]===!![],_0x5eea0b=_0x28f9f4['QIheT'](_0x5ceb0f['sessions'][_0x42510d]?.['enabled'],!![]);return _0x2eff3f||_0x5eea0b;}export function disableSession(_0x112c63){const _0x5bfb36=_0x549b38,_0x4e4b38={'Ijsey':function(_0x2553c5){return _0x2553c5();},'nPJrj':function(_0x1ee86e,_0x5e36bf,_0x7294e4){return _0x1ee86e(_0x5e36bf,_0x7294e4);}},_0x51166f=_0x4e4b38[_0x5bfb36(0xb2)](loadCache),_0xdb718a=_0x4e4b38[_0x5bfb36(0xb4)](getOrCreateSession,_0x51166f,_0x112c63);_0xdb718a['enabled']=![],saveCache(_0x51166f);}export function updateBranchTracking(_0x1b647c){const _0x5aec07=_0x549b38,_0x23cb01={'RkWOJ':function(_0x31181d){return _0x31181d();},'eoUTm':function(_0x52a17c,_0x260aeb){return _0x52a17c===_0x260aeb;},'zHLeO':_0x5aec07(0xa6),'TKfQT':function(_0x1501de,_0x3db720){return _0x1501de===_0x3db720;},'Reurs':function(_0x18139d,_0x43ac5d){return _0x18139d!==_0x43ac5d;},'BMiIG':function(_0x2a3751,_0xf92690){return _0x2a3751(_0xf92690);}},_0x8f8cc4=loadCache(),_0x17a670=_0x8f8cc4['sessions'][_0x1b647c];if(!_0x17a670?.[_0x5aec07(0xce)])return;const _0x2b9762=_0x23cb01['RkWOJ'](getCurrentBranch);if(!_0x2b9762||_0x23cb01[_0x5aec07(0xab)](_0x2b9762,_0x23cb01['zHLeO'])||_0x23cb01['TKfQT'](_0x2b9762,_0x5aec07(0xbb)))return;_0x23cb01['Reurs'](_0x17a670['currentBranch'],_0x2b9762)&&(_0x8f8cc4[_0x5aec07(0xa4)][_0x2b9762]=!![],_0x17a670['currentBranch']=_0x2b9762,_0x23cb01[_0x5aec07(0xc7)](saveCache,_0x8f8cc4));}function _0x1cbf(_0xa03484,_0x27a25e){_0xa03484=_0xa03484-0xa1;const _0x5c2af7=_0x5c2a();let _0x1cbf59=_0x5c2af7[_0xa03484];return _0x1cbf59;}export function initBranchTracking(_0x3fa426){const _0x21ba13=_0x549b38,_0x3fac8a={'pILPk':function(_0x50b5fa){return _0x50b5fa();},'IPYDU':function(_0x597190,_0x373d1e){return _0x597190===_0x373d1e;},'uTxaL':_0x21ba13(0xbb),'XyGvb':function(_0x5d0010,_0x4f63d3){return _0x5d0010===_0x4f63d3;},'sLZOd':function(_0x2eee5e,_0xdce963,_0x3f3188){return _0x2eee5e(_0xdce963,_0x3f3188);},'CYwIt':function(_0x11cbc3,_0x3d58d6){return _0x11cbc3(_0x3d58d6);}},_0x41d518=loadCache(),_0x9d22fe=_0x3fac8a[_0x21ba13(0xcd)](getCurrentBranch);if(!_0x9d22fe||_0x9d22fe===_0x21ba13(0xa6)||_0x3fac8a['IPYDU'](_0x9d22fe,_0x3fac8a['uTxaL']))return;if(_0x3fac8a['XyGvb'](_0x41d518['branches'][_0x9d22fe],!![])){const _0x5f38be=_0x3fac8a[_0x21ba13(0xad)](getOrCreateSession,_0x41d518,_0x3fa426);_0x5f38be['enabled']=!![],_0x5f38be[_0x21ba13(0xb6)]=_0x9d22fe,_0x3fac8a[_0x21ba13(0xa5)](saveCache,_0x41d518);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x27b212){const _0x173c57=_0x549b38,_0xc1e732={'AcrdP':function(_0x2131e1){return _0x2131e1();}},_0x587832=_0xc1e732['AcrdP'](loadCache),_0x1f89ab=_0x587832['sessions'][_0x27b212];_0x1f89ab?.[_0x173c57(0xce)]&&(_0x587832['lastEnabledSessionClearedAt']=Date[_0x173c57(0xd0)](),saveCache(_0x587832));}export function shouldAutoEnableAfterClear(_0x37e10d){const _0x2e77c7=_0x549b38,_0x196b26={'VXmPm':function(_0xcc7c4e,_0x27cff7){return _0xcc7c4e!==_0x27cff7;},'SdBro':_0x2e77c7(0xac),'tVUjs':function(_0x5336d7,_0x3f26ba){return _0x5336d7-_0x3f26ba;},'eNmKL':function(_0x4800fa,_0x119cc5){return _0x4800fa<=_0x119cc5;}};if(_0x196b26['VXmPm'](_0x37e10d,_0x196b26['SdBro']))return![];const _0x492a32=loadCache(),_0x278a1a=_0x492a32[_0x2e77c7(0xca)];if(!_0x278a1a)return![];const _0x4144f8=_0x196b26['tVUjs'](Date[_0x2e77c7(0xd0)](),_0x278a1a);return _0x196b26[_0x2e77c7(0xc2)](_0x4144f8,CLEAR_AUTO_ENABLE_WINDOW_MS);}function _0x5c2a(){const _0x28b150=['homedir','now','138610mTNcJo','QRIgH','trim','featureId','QhCmQ','branches','CYwIt','main','2133654HBhOrj','zKPwA','stringify','KrAdu','eoUTm','clear','sLZOd','sessions','pPXJH','88qJEKGM','pipe','Ijsey','git\x20rev-parse\x20--abbrev-ref\x20HEAD','nPJrj','TLanx','currentBranch','rTqeo','existsSync','IMzLI','8bODQmJ','master','.ranger_cache.json','prompted','5WqJObV','754257TFIlaQ','IgUVs','wSVHB','eNmKL','173934KXReLF','833324qErrPi','xWxzu','3USnNic','BMiIG','2621316leEkKA','479878QJMCGl','lastEnabledSessionClearedAt','xALro','utf-8','pILPk','enabled'];_0x5c2a=function(){return _0x28b150;};return _0x5c2a();}export function autoEnableAfterClear(_0x3a701e){const _0x340e5b=_0x549b38,_0x4da57d={'TLanx':function(_0x2e7b74){return _0x2e7b74();},'qMGvt':'main','CETpb':function(_0x3a0293,_0x5c7a43){return _0x3a0293!==_0x5c7a43;},'PQsqO':_0x340e5b(0xbb)},_0xe32a7c=_0x4da57d[_0x340e5b(0xb5)](loadCache),_0x208788=getOrCreateSession(_0xe32a7c,_0x3a701e);_0x208788['enabled']=!![];const _0x204a20=_0x4da57d[_0x340e5b(0xb5)](getCurrentBranch);_0x204a20&&_0x204a20!==_0x4da57d['qMGvt']&&_0x4da57d['CETpb'](_0x204a20,_0x4da57d['PQsqO'])&&(_0x208788[_0x340e5b(0xb6)]=_0x204a20),delete _0xe32a7c[_0x340e5b(0xca)],saveCache(_0xe32a7c);}export function registerSession(_0x43c0db,_0x5e5533){const _0x255f72={'LtJUk':function(_0xe1f2ec){return _0xe1f2ec();},'jAhge':function(_0x182c63,_0x3f8b2b,_0x1ce0aa){return _0x182c63(_0x3f8b2b,_0x1ce0aa);}},_0x4c7296=_0x255f72['LtJUk'](loadCache),_0x5988e6=_0x255f72['jAhge'](getOrCreateSession,_0x4c7296,_0x43c0db);_0x5988e6['featureId']=_0x5e5533,_0x5988e6['registeredAt']=new Date()['toISOString'](),saveCache(_0x4c7296);}export function getSessionEntry(_0x293c6d){const _0x31bb07=_0x549b38,_0xbc293d=loadCache(),_0x593ed0=_0xbc293d[_0x31bb07(0xae)][_0x293c6d];if(_0x593ed0?.['featureId']&&_0x593ed0?.['registeredAt'])return{'featureId':_0x593ed0['featureId'],'registeredAt':_0x593ed0['registeredAt']};return null;}export function unregisterSession(_0x625c11){const _0x59519a=_0x549b38,_0xe7a546={'rTqeo':function(_0x26af60){return _0x26af60();}},_0x34236f=_0xe7a546[_0x59519a(0xb7)](loadCache),_0x546507=_0x34236f['sessions'][_0x625c11];_0x546507&&(delete _0x546507[_0x59519a(0xa2)],delete _0x546507['registeredAt'],saveCache(_0x34236f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xc0f06d){const _0x5a78b0=_0x549b38,_0x53741b={'IMzLI':function(_0x5f3045,_0x38a452,_0x1bf438){return _0x5f3045(_0x38a452,_0x1bf438);},'FSKBr':function(_0x33cea6,_0x3d497f){return _0x33cea6>=_0x3d497f;},'xALro':function(_0x47ea13,_0x389ef2){return _0x47ea13-_0x389ef2;},'Ufpjy':function(_0x5ad77a,_0x555db5){return _0x5ad77a(_0x555db5);}},_0x5b9087=loadCache(),_0x4a31ab=_0x53741b[_0x5a78b0(0xb9)](getOrCreateSession,_0x5b9087,_0xc0f06d),_0x29daed=_0x4a31ab['lastPlanReminderAt']||0x0,_0x500954=Date[_0x5a78b0(0xd0)]();if(_0x53741b['FSKBr'](_0x53741b[_0x5a78b0(0xcb)](_0x500954,_0x29daed),PLAN_REMINDER_INTERVAL_MS))return _0x4a31ab['lastPlanReminderAt']=_0x500954,_0x53741b['Ufpjy'](saveCache,_0x5b9087),!![];return![];}export function shouldShowStopReminder(_0x566fd7){const _0xa9e31b=_0x549b38,_0x2ed39a={'zKPwA':function(_0x106f5f){return _0x106f5f();},'WOIVu':function(_0x2dad81,_0x10b9fc,_0x4304d9){return _0x2dad81(_0x10b9fc,_0x4304d9);},'Ikepc':function(_0x43c182,_0x4b20f9){return _0x43c182-_0x4b20f9;}},_0x1628dc=_0x2ed39a[_0xa9e31b(0xa8)](loadCache),_0x1b8736=_0x2ed39a['WOIVu'](getOrCreateSession,_0x1628dc,_0x566fd7),_0x4e8673=_0x1b8736['lastStopReminderAt']||0x0,_0x4b8133=Date[_0xa9e31b(0xd0)]();if(_0x2ed39a['Ikepc'](_0x4b8133,_0x4e8673)>=STOP_REMINDER_INTERVAL_MS)return _0x1b8736['lastStopReminderAt']=_0x4b8133,saveCache(_0x1628dc),!![];return![];}export function hasSessionBeenPrompted(_0x4e2ffe){const _0xb3e142=_0x549b38,_0x4df3b8={'Ipjsg':function(_0x1dfa65,_0x14952d){return _0x1dfa65===_0x14952d;}},_0x459a9b=loadCache();return _0x4df3b8['Ipjsg'](_0x459a9b[_0xb3e142(0xae)][_0x4e2ffe]?.['prompted'],!![]);}export function markSessionPrompted(_0x49dca0){const _0x4cf6e2=_0x549b38,_0x1d2de5=loadCache(),_0x47c1f1=getOrCreateSession(_0x1d2de5,_0x49dca0);_0x47c1f1[_0x4cf6e2(0xbd)]=!![],saveCache(_0x1d2de5);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
function _0x1abe(_0x355b40,_0x5685b0){_0x355b40=_0x355b40-0x11a;const _0x33cfe6=_0x33cf();let _0x1abe7b=_0x33cfe6[_0x355b40];return _0x1abe7b;}const _0x2b69a7=_0x1abe;(function(_0x790c8c,_0x585344){const _0x1f6171=_0x1abe,_0x3732be=_0x790c8c();while(!![]){try{const _0x1be2f6=parseInt(_0x1f6171(0x126))/0x1*(-parseInt(_0x1f6171(0x137))/0x2)+-parseInt(_0x1f6171(0x141))/0x3*(-parseInt(_0x1f6171(0x123))/0x4)+parseInt(_0x1f6171(0x12b))/0x5*(parseInt(_0x1f6171(0x12e))/0x6)+-parseInt(_0x1f6171(0x14c))/0x7*(parseInt(_0x1f6171(0x12c))/0x8)+-parseInt(_0x1f6171(0x11a))/0x9*(-parseInt(_0x1f6171(0x144))/0xa)+-parseInt(_0x1f6171(0x125))/0xb*(parseInt(_0x1f6171(0x133))/0xc)+parseInt(_0x1f6171(0x136))/0xd*(-parseInt(_0x1f6171(0x151))/0xe);if(_0x1be2f6===_0x585344)break;else _0x3732be['push'](_0x3732be['shift']());}catch(_0x2df0ff){_0x3732be['push'](_0x3732be['shift']());}}}(_0x33cf,0x74d18));import*as _0x50089f from'fs';import*as _0x56a952 from'path';import*as _0x3400db from'os';import{execSync}from'child_process';const CACHE_FILE=_0x56a952['join'](_0x3400db[_0x2b69a7(0x152)](),_0x2b69a7(0x13b),_0x2b69a7(0x131));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x2f43e2=_0x2b69a7;try{if(_0x50089f[_0x2f43e2(0x14b)](CACHE_FILE)){const _0x532dcd=JSON['parse'](_0x50089f[_0x2f43e2(0x122)](CACHE_FILE,_0x2f43e2(0x145)));return{'version':0x3,'sessions':_0x532dcd['sessions']||{},'branches':_0x532dcd['branches']||{},'lastEnabledSessionClearedAt':_0x532dcd[_0x2f43e2(0x127)]};}}catch{}return createEmptyCache();}function saveCache(_0x2da964){const _0x3aeef7=_0x2b69a7;try{const _0x136543=_0x56a952['dirname'](CACHE_FILE);!_0x50089f[_0x3aeef7(0x14b)](_0x136543)&&_0x50089f['mkdirSync'](_0x136543,{'recursive':!![]}),_0x50089f[_0x3aeef7(0x11b)](CACHE_FILE,JSON['stringify'](_0x2da964,null,0x2));}catch{}}export function getCurrentBranch(){const _0x5b8f59=_0x2b69a7,_0x55f497={'SKpVN':function(_0x22cb0d,_0x14a2e0,_0x1214c6){return _0x22cb0d(_0x14a2e0,_0x1214c6);},'DwBuc':'pipe','gxLBf':function(_0x32936f,_0x2b3e48){return _0x32936f===_0x2b3e48;},'bADKp':_0x5b8f59(0x14f)};try{const _0x10bdcc=_0x55f497['SKpVN'](execSync,_0x5b8f59(0x14a),{'encoding':_0x5b8f59(0x145),'stdio':['pipe',_0x55f497['DwBuc'],_0x55f497[_0x5b8f59(0x11f)]]})['trim']();if(!_0x10bdcc||_0x55f497[_0x5b8f59(0x148)](_0x10bdcc,_0x55f497['bADKp']))return null;return _0x10bdcc;}catch{return null;}}export function enableBranch(_0x322b4c){const _0x25f704=_0x2b69a7,_0x4f8ffc={'qFLHr':function(_0x14793d){return _0x14793d();}},_0x5098c5=_0x4f8ffc['qFLHr'](loadCache);_0x5098c5[_0x25f704(0x13d)][_0x322b4c]=!![],saveCache(_0x5098c5);}export function disableBranch(_0x2465a1){const _0x3bfc60=_0x2b69a7,_0x2f6ccd={'aWseH':function(_0x423dff,_0x2de4f4){return _0x423dff(_0x2de4f4);}},_0x5558f4=loadCache();delete _0x5558f4[_0x3bfc60(0x13d)][_0x2465a1],_0x2f6ccd[_0x3bfc60(0x12d)](saveCache,_0x5558f4);}export function isBranchEnabled(_0x3b6d32){const _0x2c853f=_0x2b69a7,_0x17d27e={'vMHNJ':function(_0x24cd9a){return _0x24cd9a();},'uXPAP':function(_0x59596d,_0x208edb){return _0x59596d===_0x208edb;}},_0x538e3d=_0x17d27e['vMHNJ'](loadCache);return _0x17d27e['uXPAP'](_0x538e3d[_0x2c853f(0x13d)][_0x3b6d32],!![]);}function getOrCreateSession(_0x453485,_0x43b235){const _0x561958=_0x2b69a7;return!_0x453485['sessions'][_0x43b235]&&(_0x453485[_0x561958(0x13c)][_0x43b235]={}),_0x453485['sessions'][_0x43b235];}export function enableSession(_0x36f005){const _0x1d85fc=_0x2b69a7,_0x5d9bbd={'OMYwg':function(_0x3e3a0d){return _0x3e3a0d();},'ONXar':function(_0x1dafbd,_0x150603,_0x515748){return _0x1dafbd(_0x150603,_0x515748);},'JVDuq':function(_0x5d3718,_0x577e60){return _0x5d3718!==_0x577e60;},'rkrvu':function(_0x25752c,_0x45a524){return _0x25752c(_0x45a524);}},_0x10b319=_0x5d9bbd['OMYwg'](loadCache),_0x1f9f78=_0x5d9bbd[_0x1d85fc(0x14d)](getOrCreateSession,_0x10b319,_0x36f005);_0x1f9f78[_0x1d85fc(0x11e)]=!![];const _0x1e9618=getCurrentBranch();_0x1e9618&&_0x5d9bbd['JVDuq'](_0x1e9618,_0x1d85fc(0x140))&&_0x5d9bbd[_0x1d85fc(0x14e)](_0x1e9618,'master')&&(_0x10b319[_0x1d85fc(0x13d)][_0x1e9618]=!![],_0x1f9f78[_0x1d85fc(0x143)]=_0x1e9618),_0x5d9bbd[_0x1d85fc(0x11c)](saveCache,_0x10b319);}function _0x33cf(){const _0x5f5015=['tDJOk','VndIJ','WBfbJ','365MNUray','383816cHmRrE','aWseH','31140pnRKTA','pJLqm','now','.ranger_cache.json','fsBiq','12xLPzOz','XBLow','featureId','13Rjtnnc','1052JejjrG','QKxQd','PkLRh','master','.claude','sessions','branches','CJBGe','LFucW','main','11046ZutBMj','AHAeE','currentBranch','70fFhXBm','utf-8','TpBoa','lastPlanReminderAt','gxLBf','TezKb','git\x20rev-parse\x20--abbrev-ref\x20HEAD','existsSync','35DWznSP','ONXar','JVDuq','HEAD','registeredAt','6448414awURTe','homedir','wwcop','932598OOFznh','writeFileSync','rkrvu','lastStopReminderAt','enabled','DwBuc','MNLHH','lpZbi','readFileSync','924zjzsbM','kMOSI','809402oMZQxA','1335nZPool','lastEnabledSessionClearedAt'];_0x33cf=function(){return _0x5f5015;};return _0x33cf();}export function isSessionEnabled(_0x24d6ec){const _0x217cf5=_0x2b69a7,_0x3a99ff={'MNLHH':function(_0x43a20b){return _0x43a20b();},'oeQAq':function(_0x314f36,_0x30bb2a){return _0x314f36===_0x30bb2a;},'WUoka':_0x217cf5(0x13a)},_0x28c868=loadCache(),_0x2935a0=_0x3a99ff[_0x217cf5(0x120)](getCurrentBranch);if(!_0x2935a0||_0x3a99ff['oeQAq'](_0x2935a0,_0x217cf5(0x140))||_0x2935a0===_0x3a99ff['WUoka'])return _0x28c868['sessions'][_0x24d6ec]?.[_0x217cf5(0x11e)]===!![];const _0xd0b8e2=_0x28c868[_0x217cf5(0x13d)][_0x2935a0]===!![],_0x1e51ab=_0x28c868['sessions'][_0x24d6ec]?.['enabled']===!![];return _0xd0b8e2||_0x1e51ab;}export function disableSession(_0x41fca3){const _0x38b516=_0x2b69a7,_0x3b9d23={'rQAPO':function(_0x5ad4a5){return _0x5ad4a5();}},_0x545c8f=_0x3b9d23['rQAPO'](loadCache),_0x53c112=getOrCreateSession(_0x545c8f,_0x41fca3);_0x53c112[_0x38b516(0x11e)]=![],saveCache(_0x545c8f);}export function updateBranchTracking(_0x172157){const _0x5b1023=_0x2b69a7,_0x6cc10f={'rvmdV':function(_0x5ad6cc){return _0x5ad6cc();},'TpBoa':function(_0x2fd06c){return _0x2fd06c();},'klqeq':_0x5b1023(0x140),'AHAeE':_0x5b1023(0x13a),'fbyVR':function(_0x1e89ba,_0x40aa79){return _0x1e89ba!==_0x40aa79;}},_0x345869=_0x6cc10f['rvmdV'](loadCache),_0x4e8d92=_0x345869['sessions'][_0x172157];if(!_0x4e8d92?.[_0x5b1023(0x11e)])return;const _0x134b87=_0x6cc10f[_0x5b1023(0x146)](getCurrentBranch);if(!_0x134b87||_0x134b87===_0x6cc10f['klqeq']||_0x134b87===_0x6cc10f[_0x5b1023(0x142)])return;_0x6cc10f['fbyVR'](_0x4e8d92[_0x5b1023(0x143)],_0x134b87)&&(_0x345869[_0x5b1023(0x13d)][_0x134b87]=!![],_0x4e8d92[_0x5b1023(0x143)]=_0x134b87,saveCache(_0x345869));}export function initBranchTracking(_0x4600ce){const _0x8b6626=_0x2b69a7,_0x1f9859={'JjePH':'main','BMyta':function(_0x57f43c,_0x33968b){return _0x57f43c===_0x33968b;},'WBfbJ':function(_0x44b660,_0x5980e0,_0x2cc008){return _0x44b660(_0x5980e0,_0x2cc008);}},_0x5e598e=loadCache(),_0x17184f=getCurrentBranch();if(!_0x17184f||_0x17184f===_0x1f9859['JjePH']||_0x17184f==='master')return;if(_0x1f9859['BMyta'](_0x5e598e['branches'][_0x17184f],!![])){const _0x29b500=_0x1f9859[_0x8b6626(0x12a)](getOrCreateSession,_0x5e598e,_0x4600ce);_0x29b500[_0x8b6626(0x11e)]=!![],_0x29b500[_0x8b6626(0x143)]=_0x17184f,saveCache(_0x5e598e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x222e2e){const _0x2ae134=_0x2b69a7,_0x5e3f41={'VndIJ':function(_0x132052){return _0x132052();},'TezKb':function(_0x456263,_0x2e2fa8){return _0x456263(_0x2e2fa8);}},_0x3404ea=_0x5e3f41[_0x2ae134(0x129)](loadCache),_0x21da7c=_0x3404ea[_0x2ae134(0x13c)][_0x222e2e];_0x21da7c?.['enabled']&&(_0x3404ea['lastEnabledSessionClearedAt']=Date[_0x2ae134(0x130)](),_0x5e3f41[_0x2ae134(0x149)](saveCache,_0x3404ea));}export function shouldAutoEnableAfterClear(_0x5cb5b3){const _0x2d5a9b=_0x2b69a7,_0x1b4b4c={'VbLNl':function(_0x212d23,_0xc18aef){return _0x212d23-_0xc18aef;},'XBLow':function(_0xbc7d64,_0x380a81){return _0xbc7d64<=_0x380a81;}};if(_0x5cb5b3!=='clear')return![];const _0xe735cc=loadCache(),_0x2eca2c=_0xe735cc['lastEnabledSessionClearedAt'];if(!_0x2eca2c)return![];const _0x37119a=_0x1b4b4c['VbLNl'](Date['now'](),_0x2eca2c);return _0x1b4b4c[_0x2d5a9b(0x134)](_0x37119a,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x21170e){const _0x2e7ad7=_0x2b69a7,_0x5b2522={'PkLRh':function(_0x2d22c5){return _0x2d22c5();},'csorD':function(_0x4f81b8,_0x50ef50,_0x2d4bfc){return _0x4f81b8(_0x50ef50,_0x2d4bfc);},'qdkMs':function(_0x37f462,_0x5c7f3b){return _0x37f462!==_0x5c7f3b;},'nCKJM':'main','TYniC':_0x2e7ad7(0x13a),'LFucW':function(_0x175a30,_0xcad815){return _0x175a30(_0xcad815);}},_0x2f0a59=_0x5b2522[_0x2e7ad7(0x139)](loadCache),_0xb7e5a8=_0x5b2522['csorD'](getOrCreateSession,_0x2f0a59,_0x21170e);_0xb7e5a8['enabled']=!![];const _0x44e334=_0x5b2522[_0x2e7ad7(0x139)](getCurrentBranch);_0x44e334&&_0x5b2522['qdkMs'](_0x44e334,_0x5b2522['nCKJM'])&&_0x44e334!==_0x5b2522['TYniC']&&(_0xb7e5a8[_0x2e7ad7(0x143)]=_0x44e334),delete _0x2f0a59[_0x2e7ad7(0x127)],_0x5b2522[_0x2e7ad7(0x13f)](saveCache,_0x2f0a59);}export function registerSession(_0x21ff3f,_0x33fc88){const _0x3eb3b0=_0x2b69a7,_0x4d9539={'gymRI':function(_0x2d3d3a){return _0x2d3d3a();},'kMOSI':function(_0x26615a,_0x215b65){return _0x26615a(_0x215b65);}},_0x537bad=_0x4d9539['gymRI'](loadCache),_0x46eee8=getOrCreateSession(_0x537bad,_0x21ff3f);_0x46eee8[_0x3eb3b0(0x135)]=_0x33fc88,_0x46eee8[_0x3eb3b0(0x150)]=new Date()['toISOString'](),_0x4d9539[_0x3eb3b0(0x124)](saveCache,_0x537bad);}export function getSessionEntry(_0x2ed449){const _0x4ab743=_0x2b69a7,_0x48db0e=loadCache(),_0x4fa66e=_0x48db0e['sessions'][_0x2ed449];if(_0x4fa66e?.['featureId']&&_0x4fa66e?.['registeredAt'])return{'featureId':_0x4fa66e['featureId'],'registeredAt':_0x4fa66e[_0x4ab743(0x150)]};return null;}export function unregisterSession(_0x5873f5){const _0x2161d5=_0x2b69a7,_0x2bcb09=loadCache(),_0x294838=_0x2bcb09['sessions'][_0x5873f5];_0x294838&&(delete _0x294838[_0x2161d5(0x135)],delete _0x294838[_0x2161d5(0x150)],saveCache(_0x2bcb09));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x278620){const _0x3013e5=_0x2b69a7,_0x131b91={'lpZbi':function(_0x51dd7e,_0x4e5cbf,_0x18d9ac){return _0x51dd7e(_0x4e5cbf,_0x18d9ac);},'CJBGe':function(_0xf6a266,_0x4fd8b3){return _0xf6a266>=_0x4fd8b3;},'tDJOk':function(_0x122c7a,_0x25620b){return _0x122c7a-_0x25620b;},'QKxQd':function(_0x288381,_0x55de1d){return _0x288381(_0x55de1d);}},_0x23a043=loadCache(),_0x152bdc=_0x131b91[_0x3013e5(0x121)](getOrCreateSession,_0x23a043,_0x278620),_0x48ce76=_0x152bdc[_0x3013e5(0x147)]||0x0,_0xd37e8a=Date['now']();if(_0x131b91[_0x3013e5(0x13e)](_0x131b91[_0x3013e5(0x128)](_0xd37e8a,_0x48ce76),PLAN_REMINDER_INTERVAL_MS))return _0x152bdc['lastPlanReminderAt']=_0xd37e8a,_0x131b91[_0x3013e5(0x138)](saveCache,_0x23a043),!![];return![];}export function shouldShowStopReminder(_0x306f8b){const _0xa4e000=_0x2b69a7,_0x49eaaa={'wwcop':function(_0xabbc10){return _0xabbc10();},'pJLqm':function(_0x1ae8f9,_0x2ee772,_0x119419){return _0x1ae8f9(_0x2ee772,_0x119419);},'fsBiq':function(_0x1743d2,_0x1704a5){return _0x1743d2>=_0x1704a5;},'nCQVv':function(_0x3f098a,_0x5563cc){return _0x3f098a-_0x5563cc;}},_0x14bc54=_0x49eaaa[_0xa4e000(0x153)](loadCache),_0x2f2f24=_0x49eaaa[_0xa4e000(0x12f)](getOrCreateSession,_0x14bc54,_0x306f8b),_0x1932a3=_0x2f2f24[_0xa4e000(0x11d)]||0x0,_0x3e0568=Date['now']();if(_0x49eaaa[_0xa4e000(0x132)](_0x49eaaa['nCQVv'](_0x3e0568,_0x1932a3),STOP_REMINDER_INTERVAL_MS))return _0x2f2f24[_0xa4e000(0x11d)]=_0x3e0568,saveCache(_0x14bc54),!![];return![];}export function hasSessionBeenPrompted(_0x2e8ff9){const _0x45f403=_0x2b69a7,_0x1a5161={'CKIZJ':function(_0x3aede0){return _0x3aede0();}},_0x1c15c0=_0x1a5161['CKIZJ'](loadCache);return _0x1c15c0[_0x45f403(0x13c)][_0x2e8ff9]?.['prompted']===!![];}export function markSessionPrompted(_0x10168b){const _0x2361c3=loadCache(),_0x4ed2f7=getOrCreateSession(_0x2361c3,_0x10168b);_0x4ed2f7['prompted']=!![],saveCache(_0x2361c3);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xf14d6=_0x40ab;(function(_0xd6b125,_0x3e526e){const _0x5d16c0=_0x40ab,_0x253a19=_0xd6b125();while(!![]){try{const _0x5ebcf0=parseInt(_0x5d16c0(0x1c4))/0x1*(parseInt(_0x5d16c0(0x1ef))/0x2)+parseInt(_0x5d16c0(0x209))/0x3+-parseInt(_0x5d16c0(0x246))/0x4+-parseInt(_0x5d16c0(0x1c6))/0x5+-parseInt(_0x5d16c0(0x1dd))/0x6*(parseInt(_0x5d16c0(0x1ff))/0x7)+-parseInt(_0x5d16c0(0x243))/0x8+-parseInt(_0x5d16c0(0x1e6))/0x9*(-parseInt(_0x5d16c0(0x1c3))/0xa);if(_0x5ebcf0===_0x3e526e)break;else _0x253a19['push'](_0x253a19['shift']());}catch(_0x29b2ae){_0x253a19['push'](_0x253a19['shift']());}}}(_0x355e,0xe344d));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';function _0x40ab(_0x535315,_0x587872){_0x535315=_0x535315-0x1bf;const _0x355e7b=_0x355e();let _0x40abc1=_0x355e7b[_0x535315];return _0x40abc1;}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(_0x247abd,_0x244276){const _0x2a458f=_0x40ab,_0x146bf4={'EPDKm':_0x2a458f(0x24c),'xNcmP':function(_0x3235d4,_0x49f52b,_0x785994){return _0x3235d4(_0x49f52b,_0x785994);},'OoJoU':function(_0x4f8008,_0x329962,_0x2accde){return _0x4f8008(_0x329962,_0x2accde);},'dDCBU':function(_0x4364d7,_0x1b57fb){return _0x4364d7(_0x1b57fb);}},_0xa955fa=join(_0x244276,'ci',_0x247abd),_0x6aa6f1=join(_0x244276,_0x146bf4['EPDKm'],_0x247abd),_0x166415=_0x146bf4[_0x2a458f(0x215)](join,_0x244276,_0x247abd),_0x116469=join(_0x244276,_0x2a458f(0x24c)),_0x17fc0f=_0x146bf4['OoJoU'](join,_0x244276,'ci');if(existsSync(_0xa955fa))return _0xa955fa;if(_0x146bf4['dDCBU'](existsSync,_0x6aa6f1))return _0x6aa6f1;if(existsSync(_0x166415)&&(_0x166415!==_0x116469&&_0x166415!==_0x17fc0f?!![]:_0x146bf4[_0x2a458f(0x1e7)](hasLegacyProfileFiles,_0x166415)))return _0x166415;return null;}export function getEnvDir(_0x4b2f8d,_0x32e105={}){const _0x42a11c=_0x40ab,_0x1642ee={'JkTol':function(_0x413d51,_0x8fbdaf,_0x3d7c7c){return _0x413d51(_0x8fbdaf,_0x3d7c7c);},'XxkvC':function(_0x2a24e2,_0x2a52c7){return _0x2a24e2!==_0x2a52c7;},'CkVIY':function(_0x30774c,_0x90af48,_0xdba4e3,_0x37d33d){return _0x30774c(_0x90af48,_0xdba4e3,_0x37d33d);},'GwlQF':'local','pNInb':function(_0x22ab34,_0x224a2f,_0x298393){return _0x22ab34(_0x224a2f,_0x298393);}},_0x1d97e5=getRangerDir(),_0x53208a=_0x1642ee['JkTol'](findEnvInRoot,_0x4b2f8d,_0x1d97e5);if(_0x53208a){if(_0x32e105['forWrite']&&isLegacyEnvPath(_0x53208a))throw _0x1642ee[_0x42a11c(0x238)](legacyWriteError,_0x4b2f8d,_0x53208a);return _0x53208a;}const _0xcb6630=getRangerHomeDir();if(_0x1642ee['XxkvC'](_0xcb6630,_0x1d97e5)){const _0x58a390=findEnvInRoot(_0x4b2f8d,_0xcb6630);if(_0x58a390){if(_0x32e105[_0x42a11c(0x242)]&&isLegacyEnvPath(_0x58a390))throw legacyWriteError(_0x4b2f8d,_0x58a390);return _0x58a390;}}const _0xf9396c=_0x1642ee['CkVIY'](join,_0xcb6630,_0x1642ee[_0x42a11c(0x1d7)],_0x4b2f8d);if(_0x32e105[_0x42a11c(0x242)])throw _0x1642ee[_0x42a11c(0x248)](legacyWriteError,_0x4b2f8d,_0xf9396c);return _0xf9396c;}function isLegacyEnvPath(_0x1880e6){const _0x35ea59=_0x40ab,_0x3dc4a3={'yqhIy':function(_0x4bab9b){return _0x4bab9b();},'HhuBb':function(_0x10771b){return _0x10771b();},'lUrOP':function(_0x53f5d7,_0x4ea407){return _0x53f5d7===_0x4ea407;}},_0x1eb556=_0x3dc4a3['yqhIy'](getRangerDir),_0x1ff378=_0x3dc4a3[_0x35ea59(0x235)](getRangerHomeDir);for(const _0x5f067e of new Set([_0x1eb556,_0x1ff378])){const _0x156620=_0x5f067e['endsWith']('/')?_0x5f067e:_0x5f067e+'/';if(_0x3dc4a3[_0x35ea59(0x20a)](_0x1880e6,_0x5f067e)||_0x1880e6[_0x35ea59(0x1cd)](_0x156620))return!![];}return![];}function legacyWriteError(_0x4f0a9a,_0x410be1){const _0xb8f976=_0x40ab,_0x41d547={'NSxmi':function(_0x5ce0ae,_0x32f340){return _0x5ce0ae+_0x32f340;}};return new Error(_0x41d547[_0xb8f976(0x21c)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x4f0a9a+_0xb8f976(0x1bf)+_0x410be1+'.\x0a'+_0xb8f976(0x23c),_0xb8f976(0x233))+_0xb8f976(0x1f2));}export function findExistingEnv(_0x54f2a6,_0x53c6bc){const _0x3c49f5=_0x40ab,_0x4ade6e={'OYueU':function(_0x35c207){return _0x35c207();},'oGXXt':function(_0x251930){return _0x251930();},'wwszK':'local','BxLKo':'legacy','yNkkR':function(_0x342fa6,_0x51819b,_0x13f0a9){return _0x342fa6(_0x51819b,_0x13f0a9);},'AYExU':function(_0x151bd1,_0x163156){return _0x151bd1===_0x163156;},'SDjDx':function(_0x4338cd,_0x5d197d){return _0x4338cd(_0x5d197d);}},_0x474ebf=_0x53c6bc?.['rangerDir'],_0x230e42=_0x474ebf?[_0x474ebf]:[_0x4ade6e[_0x3c49f5(0x1ec)](getRangerDir),_0x4ade6e['oGXXt'](getRangerHomeDir)]['filter']((_0x5248b8,_0xc2b990,_0x4fc539)=>_0x4fc539['indexOf'](_0x5248b8)===_0xc2b990),_0x2e5353=_0x53c6bc?.['locations']??['ci',_0x4ade6e[_0x3c49f5(0x1f0)],_0x4ade6e[_0x3c49f5(0x1c0)]];for(const _0x473a85 of _0x230e42){const _0xa7787a=_0x4ade6e[_0x3c49f5(0x225)](join,_0x473a85,_0x3c49f5(0x24c)),_0x5f1279=join(_0x473a85,'ci'),_0x58a01f=[{'location':'ci','path':join(_0x473a85,'ci',_0x54f2a6)},{'location':_0x3c49f5(0x24c),'path':join(_0x473a85,_0x4ade6e[_0x3c49f5(0x1f0)],_0x54f2a6)},{'location':_0x3c49f5(0x1c1),'path':join(_0x473a85,_0x54f2a6)}];for(const _0x4676e0 of _0x58a01f){if(_0x2e5353['includes'](_0x4676e0[_0x3c49f5(0x1ea)])&&existsSync(_0x4676e0[_0x3c49f5(0x220)])){if(_0x4ade6e['AYExU'](_0x4676e0['location'],_0x3c49f5(0x1c1))&&(_0x4676e0['path']===_0xa7787a||_0x4676e0['path']===_0x5f1279)&&!_0x4ade6e['SDjDx'](hasLegacyProfileFiles,_0x4676e0['path']))continue;return{'path':_0x4676e0[_0x3c49f5(0x220)],'location':_0x4676e0['location']};}}}return null;}function hasLegacyProfileFiles(_0x3512bb){const _0x29c5ff=_0x40ab,_0x169d44={'lngLW':function(_0x2916d4,_0x1395c8){return _0x2916d4(_0x1395c8);},'tbreH':function(_0x59dbd9,_0x460873){return _0x59dbd9(_0x460873);},'soOGG':function(_0x66d57e,_0x395a7a,_0x3027b1){return _0x66d57e(_0x395a7a,_0x3027b1);},'elRcm':_0x29c5ff(0x212),'zlAKE':function(_0x307621,_0x4dec05,_0x4ea6b3){return _0x307621(_0x4dec05,_0x4ea6b3);},'XDhpB':_0x29c5ff(0x1f6)};return _0x169d44['lngLW'](existsSync,join(_0x3512bb,'settings.json'))||_0x169d44[_0x29c5ff(0x1f3)](existsSync,_0x169d44[_0x29c5ff(0x1f9)](join,_0x3512bb,_0x169d44[_0x29c5ff(0x1c7)]))||_0x169d44['lngLW'](existsSync,_0x169d44['zlAKE'](join,_0x3512bb,_0x169d44[_0x29c5ff(0x1d0)]));}export function isEnvCi(_0x12ff06){const _0x3b1bae={'ZKctb':function(_0x3e1f46,_0x2e7a28){return _0x3e1f46(_0x2e7a28);},'CODVI':function(_0x4cc362){return _0x4cc362();},'rCbRK':function(_0x843ac7,_0x18faf3){return _0x843ac7(_0x18faf3);}};if(_0x3b1bae['ZKctb'](existsSync,join(_0x3b1bae['CODVI'](getRangerDir),'ci',_0x12ff06)))return!![];const _0x507a8a=getRangerHomeDir();if(_0x507a8a!==getRangerDir()&&_0x3b1bae['rCbRK'](existsSync,join(_0x507a8a,'ci',_0x12ff06)))return!![];return![];}export async function cleanupTempFiles(_0x24f9b6){const _0x260769=_0x40ab,_0x2b46c4={'OgFjY':function(_0x2faf99,_0x27c491){return _0x2faf99!==_0x27c491;},'dthxu':_0x260769(0x21d)},_0x22227f=[_0x24f9b6['tempAuthPath'],_0x24f9b6[_0x260769(0x204)]]['filter'](Boolean);await Promise['all'](_0x22227f['map'](_0x48fe1d=>unlink(_0x48fe1d)[_0x260769(0x1f7)](_0xeadc27=>{const _0x1a6f1c=_0x260769;_0x2b46c4['OgFjY'](_0xeadc27[_0x1a6f1c(0x1ee)],_0x2b46c4[_0x1a6f1c(0x224)])&&console['warn'](_0x1a6f1c(0x1e0)+_0x48fe1d+':',_0xeadc27['message']);})));}export function getSettingsPath(_0x60cd9){const _0x1d71e1=_0x40ab,_0x1b511b={'IOIOC':function(_0x214d91,_0x1653b2,_0x19c395){return _0x214d91(_0x1653b2,_0x19c395);},'aosLA':function(_0x52bf60,_0x5c900a){return _0x52bf60(_0x5c900a);}};return _0x1b511b['IOIOC'](join,_0x1b511b[_0x1d71e1(0x1d4)](getEnvDir,_0x60cd9),_0x1d71e1(0x201));}export async function loadSettings(_0x31c479){const _0x442b46=_0x40ab,_0xf430dd={'MrEee':function(_0x45b6d0,_0x407e27){return _0x45b6d0(_0x407e27);},'XGdIp':function(_0x1ec9fd,_0x4100ad,_0x1628ea){return _0x1ec9fd(_0x4100ad,_0x1628ea);}},_0x4d9bd8=_0xf430dd['MrEee'](getSettingsPath,_0x31c479);if(!existsSync(_0x4d9bd8))return{};try{const _0x5147ef=await _0xf430dd[_0x442b46(0x1de)](readFile,_0x4d9bd8,'utf-8');return JSON[_0x442b46(0x226)](_0x5147ef);}catch{return{};}}export async function saveSettings(_0x246de1,_0x38a1da){const _0x152073=_0x40ab,_0x37d1b6={'jJqUi':function(_0x102e89,_0x43b014){return _0x102e89(_0x43b014);},'XXvLk':function(_0x5265f9,_0x19574a,_0x282c42){return _0x5265f9(_0x19574a,_0x282c42);}},_0x3fa79b=getSettingsPath(_0x246de1),_0x553d8e=_0x37d1b6['jJqUi'](dirname,_0x3fa79b);!existsSync(_0x553d8e)&&await _0x37d1b6[_0x152073(0x1d1)](mkdir,_0x553d8e,{'recursive':!![]}),await _0x37d1b6[_0x152073(0x1d1)](writeFile,_0x3fa79b,JSON[_0x152073(0x23f)](_0x38a1da,null,0x2));}export function resolveEnvVars(_0x44a577){const _0x35cb2a=_0x40ab,_0x37e55e={'PtyWl':function(_0x43d948,_0xc607f0){return _0x43d948===_0xc607f0;},'qlCKK':_0x35cb2a(0x22b)};if(typeof _0x44a577===_0x37e55e['qlCKK'])return _0x44a577[_0x35cb2a(0x214)](/\$\{(\w+)\}/g,(_0x3f0b59,_0x173ad6)=>{const _0x4ab849=_0x35cb2a,_0x5482ba=process['env'][_0x173ad6];if(_0x37e55e[_0x4ab849(0x222)](_0x5482ba,undefined))throw new Error('Environment\x20variable\x20'+_0x173ad6+_0x4ab849(0x234));return _0x5482ba;});if(Array[_0x35cb2a(0x23d)](_0x44a577))return _0x44a577[_0x35cb2a(0x20c)](resolveEnvVars);if(_0x44a577&&typeof _0x44a577===_0x35cb2a(0x236))return Object[_0x35cb2a(0x239)](Object[_0x35cb2a(0x1dc)](_0x44a577)['map'](([_0x47d581,_0x2be022])=>[_0x47d581,resolveEnvVars(_0x2be022)]));return _0x44a577;}const isRecord=_0xa3634c=>typeof _0xa3634c===_0xf14d6(0x236)&&_0xa3634c!==null&&!Array['isArray'](_0xa3634c),asRecord=_0x44ae28=>isRecord(_0x44ae28)?_0x44ae28:undefined,mergeHeaders=(_0x4f2efb,_0x2dc2dd)=>{const _0x30c0f3=_0xf14d6,_0x5df38b={'rbOOt':function(_0x3c9914,_0x34a34c){return _0x3c9914??_0x34a34c;}},_0x2b187e={..._0x5df38b[_0x30c0f3(0x21b)](_0x4f2efb,{}),..._0x2dc2dd??{}};return Object[_0x30c0f3(0x23b)](_0x2b187e)[_0x30c0f3(0x23e)]?_0x2b187e: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','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x2973c0,_0x31c4c2={}){const _0x2b555b=_0xf14d6,_0x57b9d3={'oNYqy':function(_0xf77bca,_0x42b2b5){return _0xf77bca(_0x42b2b5);},'EyVvo':'boolean','aQHua':function(_0x49559f,_0x30e87c){return _0x49559f(_0x30e87c);},'qhBwN':function(_0x4c7a86,_0x516640){return _0x4c7a86===_0x516640;},'FlUxO':'string'},_0x1ce99a=asRecord(_0x2973c0['browser']),_0x6eba62={..._0x57b9d3[_0x2b555b(0x1f1)](asRecord,_0x1ce99a?.[_0x2b555b(0x1d6)])??{}};typeof _0x31c4c2['headless']===_0x57b9d3['EyVvo']&&(_0x6eba62[_0x2b555b(0x1d8)]=_0x31c4c2[_0x2b555b(0x1d8)]);if(_0x2973c0['safeMode']){const _0xb6548e=_0x6eba62[_0x2b555b(0x22c)]??[],_0x5a4943=SAFE_MODE_ARGS[_0x2b555b(0x22f)](_0x551c63=>!_0xb6548e['includes'](_0x551c63));_0x6eba62[_0x2b555b(0x22c)]=[..._0xb6548e,..._0x5a4943];}if(_0x2973c0['allowInsecureLocalhost']){const _0x5365e4=_0x6eba62['args']??[],_0xbc49c0=ALLOW_LOCALHOST_ARGS['filter'](_0x4c0069=>!_0x5365e4['includes'](_0x4c0069));_0x6eba62['args']=[..._0x5365e4,..._0xbc49c0];}const _0x43615a={..._0x57b9d3[_0x2b555b(0x23a)](asRecord,_0x1ce99a?.['contextOptions'])??{}};_0x43615a[_0x2b555b(0x1c9)]=!![];_0x57b9d3['qhBwN'](typeof _0x2973c0[_0x2b555b(0x213)],_0x57b9d3[_0x2b555b(0x1d2)])&&(_0x43615a['userAgent']=_0x2973c0['userAgent']);const _0x48cf9b=mergeHeaders(_0x57b9d3['aQHua'](asRecord,_0x43615a[_0x2b555b(0x223)]),asRecord(_0x2973c0['headers']));return _0x48cf9b?_0x43615a['extraHTTPHeaders']=_0x48cf9b:delete _0x43615a[_0x2b555b(0x223)],_0x31c4c2[_0x2b555b(0x1ed)]&&(_0x43615a['storageState']=_0x31c4c2['storageStatePath']),{'launchOptions':_0x6eba62,'contextOptions':_0x43615a};}export async function resolveProfileStorageState(_0x1e2336){const _0x486785=_0xf14d6,_0x1af0c5={'CVuYb':function(_0x123883,_0x2d50d3){return _0x123883(_0x2d50d3);},'kblMe':function(_0x51a222,_0x21b2eb){return _0x51a222(_0x21b2eb);}};return _0x1af0c5[_0x486785(0x1e1)](resolveLocalAuthPath,_0x1af0c5['kblMe'](getEnvDir,_0x1e2336));}async function resolveLocalAuthPath(_0x6d7ba6){const _0x576a3f=_0xf14d6,_0x33370f={'lnYve':function(_0x4a8a87,_0x5a787d,_0x12fc13){return _0x4a8a87(_0x5a787d,_0x12fc13);},'sIEXn':_0x576a3f(0x1f6),'xnncQ':function(_0x212981,_0x444aaf,_0x34d9f5){return _0x212981(_0x444aaf,_0x34d9f5);},'ERqKD':function(_0x1b39be){return _0x1b39be();},'lhKcy':_0x576a3f(0x218),'Vrdqi':function(_0x19929c,_0xfa775f){return _0x19929c(_0xfa775f);},'pVkaa':function(_0x30abb0,_0x4a9334,_0x4cec13){return _0x30abb0(_0x4a9334,_0x4cec13);},'RYfMt':function(_0x11157a,_0x440543){return _0x11157a instanceof _0x440543;}},_0x103aa0=_0x33370f[_0x576a3f(0x216)](join,_0x6d7ba6,_0x33370f['sIEXn']),_0x2e7ea1=_0x33370f['xnncQ'](join,_0x6d7ba6,'auth.json');if(existsSync(_0x103aa0))try{const _0x4e6663=await _0x33370f['ERqKD'](getToken);if(!_0x4e6663)throw new Error(_0x33370f['lhKcy']);const _0x1e69c5=await _0x33370f[_0x576a3f(0x1eb)](readFile,_0x103aa0),_0x4c7f10=decrypt(_0x1e69c5,_0x4e6663),_0xc7a1bc=_0x33370f['lnYve'](join,tmpdir(),'ranger-auth-'+Date['now']()+'.json');return await _0x33370f[_0x576a3f(0x1f4)](writeFile,_0xc7a1bc,_0x4c7f10),{'storageStatePath':_0xc7a1bc,'tempAuthPath':_0xc7a1bc};}catch(_0x119d1e){const _0x54782b=_0x33370f[_0x576a3f(0x240)](_0x119d1e,Error)?_0x119d1e['message']:_0x33370f[_0x576a3f(0x1eb)](String,_0x119d1e);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x54782b);}if(existsSync(_0x2e7ea1))return{'storageStatePath':_0x2e7ea1};return{};}export async function buildPlaywrightConfig(_0x1418ca,_0x599b73,_0x3c4739,_0x2c304a,_0xd041f6){const _0x2e6200=_0xf14d6,_0x59947e={'sbZji':function(_0x591751,_0x4fca44,_0x38add2,_0x22dce5,_0x3ad3ec,_0x25f313,_0xf8b92){return _0x591751(_0x4fca44,_0x38add2,_0x22dce5,_0x3ad3ec,_0x25f313,_0xf8b92);},'RenIJ':function(_0x328210,_0x23f175){return _0x328210(_0x23f175);},'LbMQN':_0x2e6200(0x1c2)};if(_0xd041f6)return _0x59947e['sbZji'](buildPlaywrightConfigCore,_0x1418ca,_0xd041f6,_0x599b73,_0x3c4739,_0x2c304a,_0x2e6200(0x1c2));const {storageStatePath:_0x104487,tempAuthPath:_0x1a1492}=await _0x59947e['RenIJ'](resolveLocalAuthPath,getEnvDir(_0x599b73));try{const _0x436b42=await buildPlaywrightConfigCore(_0x1418ca,_0x104487,_0x599b73,_0x3c4739,_0x2c304a,_0x59947e['LbMQN']);return{..._0x436b42,'tempAuthPath':_0x1a1492};}catch(_0x227625){_0x1a1492&&await unlink(_0x1a1492)[_0x2e6200(0x1f7)](()=>{});throw _0x227625;}}export async function buildPlaywrightConfigCore(_0x37ed0b,_0x37c135,_0x3e1829,_0x72618,_0x7deec1,_0x8560='stagehand'){const _0xc9b0bd=_0xf14d6,_0x2e70e4={'maFHP':_0xc9b0bd(0x229),'Koxhz':'--disable-setuid-sandbox','OFTRP':'chromium','zbTky':_0xc9b0bd(0x211),'gGqoL':'clipboard-write','isdTA':function(_0x520228){return _0x520228();},'pXeyI':function(_0x258dd5,_0x33cd73,_0xfc2304,_0x43d1fc){return _0x258dd5(_0x33cd73,_0xfc2304,_0x43d1fc);},'NQdky':function(_0x5a6290,_0x1c03f6){return _0x5a6290(_0x1c03f6);},'QwwkR':'playwright-cli','eVPSn':'file','hDUoH':'none','KZkCq':_0xc9b0bd(0x200),'LFHma':_0xc9b0bd(0x241),'nFZiJ':function(_0x5cfdf8,_0x110873,_0x29f5ed){return _0x5cfdf8(_0x110873,_0x29f5ed);},'Jzmrp':'ranger-config','cVQos':function(_0x38f309,_0xf04c40){return _0x38f309(_0xf04c40);},'ADkFF':_0xc9b0bd(0x228)},_0x3ce812=_0x72618||_0x2e70e4[_0xc9b0bd(0x1e5)](randomUUID),_0x2cb635=_0x2e70e4[_0xc9b0bd(0x20e)](join,getRangerDir(),'sessions',_0x3ce812),_0xe938d3=_0x2e70e4[_0xc9b0bd(0x1e8)](Boolean,_0x37ed0b['cdpEndpoint']),_0xfd42c2=_0xe938d3?{'browserName':_0x2e70e4[_0xc9b0bd(0x24a)],'cdpEndpoint':_0x37ed0b[_0xc9b0bd(0x1c5)]}:((()=>{const _0x26ec0c=_0xc9b0bd,{launchOptions:_0xe00b65,contextOptions:_0x12747a}=buildBrowserOptionsFromSettings(_0x37ed0b,{'headless':_0x7deec1?![]:_0x37ed0b[_0x26ec0c(0x1d8)]??!![],'storageStatePath':_0x37c135});if(process[_0x26ec0c(0x22e)]?.()===0x0){const _0x3cb30c=[_0x2e70e4['maFHP'],_0x2e70e4['Koxhz']],_0x16e1bf=_0xe00b65[_0x26ec0c(0x22c)]??[],_0x48cefe=_0x3cb30c['filter'](_0x4e853d=>!_0x16e1bf['includes'](_0x4e853d));_0xe00b65[_0x26ec0c(0x22c)]=[..._0x16e1bf,..._0x48cefe];}return{'isolated':!![],'browserName':_0x2e70e4[_0x26ec0c(0x24a)],'launchOptions':_0xe00b65,'contextOptions':{..._0x12747a,'permissions':[_0x2e70e4['zbTky'],_0x2e70e4['gGqoL']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1ef078=_0x8560===_0x2e70e4[_0xc9b0bd(0x1df)]?{'browser':_0xfd42c2,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x2cb635,'outputMode':_0x2e70e4['eVPSn'],'codegen':_0x2e70e4[_0xc9b0bd(0x1fb)]}:{'name':_0x3e1829,'browser':_0xfd42c2,'capabilities':[_0x2e70e4[_0xc9b0bd(0x20f)],_0xc9b0bd(0x1d3),'vision',_0x2e70e4[_0xc9b0bd(0x247)]],'imageResponses':_0xc9b0bd(0x1db),'outputDir':_0x2cb635};if(!_0xe938d3){const _0x626057=_0x1ef078[_0xc9b0bd(0x1fe)],_0x34c6d1=_0x626057[_0xc9b0bd(0x1d9)];if(_0x34c6d1[_0xc9b0bd(0x213)]===undefined)delete _0x34c6d1['userAgent'];if(_0x34c6d1['storageState']===undefined)delete _0x34c6d1['storageState'];}const _0x3fbf73=_0x2e70e4[_0xc9b0bd(0x1f8)](join,tmpdir(),_0x2e70e4['Jzmrp']);!_0x2e70e4['cVQos'](existsSync,_0x3fbf73)&&await _0x2e70e4['nFZiJ'](mkdir,_0x3fbf73,{'recursive':!![]});const _0x285902=_0x8560==='playwright-cli'?_0x2e70e4['ADkFF']:'',_0x4b8c56=_0x2e70e4['nFZiJ'](join,_0x3fbf73,_0x3e1829+'-'+Date['now']()+_0x285902+'.json');return await writeFile(_0x4b8c56,JSON[_0xc9b0bd(0x23f)](_0x1ef078,null,0x2)),{'configPath':_0x4b8c56,'storageStatePath':_0x37c135};}export async function buildPlaywrightCliConfig(_0x1b16d9,_0x37d5d4,_0x3b03ba,_0x5eb7f5,_0x2a079c){const _0x26686b=_0xf14d6,_0x529328={'vUduB':function(_0xe89441,_0x4a3796){return _0xe89441(_0x4a3796);},'QFBZq':function(_0x2bc725,_0x40d5f2){return _0x2bc725(_0x40d5f2);},'vcJbY':function(_0x155a62,_0x2bd98d,_0x15ed39,_0x345270,_0x30af13,_0x3622d6,_0x11bb01){return _0x155a62(_0x2bd98d,_0x15ed39,_0x345270,_0x30af13,_0x3622d6,_0x11bb01);},'FrYpe':'playwright-cli'};if(_0x2a079c)return buildPlaywrightConfigCore(_0x1b16d9,_0x2a079c,_0x37d5d4,_0x3b03ba,_0x5eb7f5,_0x26686b(0x1cc));const {storageStatePath:_0x5376b4,tempAuthPath:_0x17d45e}=await _0x529328[_0x26686b(0x230)](resolveLocalAuthPath,_0x529328['QFBZq'](getEnvDir,_0x37d5d4));try{const _0x3c45b5=await _0x529328['vcJbY'](buildPlaywrightConfigCore,_0x1b16d9,_0x5376b4,_0x37d5d4,_0x3b03ba,_0x5eb7f5,_0x529328[_0x26686b(0x208)]);return{..._0x3c45b5,'tempAuthPath':_0x17d45e};}catch(_0x5256a3){_0x17d45e&&await _0x529328[_0x26686b(0x232)](unlink,_0x17d45e)['catch'](()=>{});throw _0x5256a3;}}export async function buildRangerwrightCliConfig(_0xb377a7,_0x579a26,_0x21ba9f,_0x33952d,_0xe755da){const _0x2f4136=_0xf14d6,_0xa5ac66={'DwChG':function(_0x343d8d,_0x2888c4){return _0x343d8d===_0x2888c4;},'EuwrT':_0x2f4136(0x1fc),'ZPwNg':'clipboard-read','TbUCN':function(_0x16223c,_0x431cf6){return _0x16223c(_0x431cf6);},'OEwTb':'sessions','RgQnn':_0x2f4136(0x203),'kqKOa':function(_0x1d52a2,_0x418a40,_0x4fd816){return _0x1d52a2(_0x418a40,_0x4fd816);},'UHlNz':_0x2f4136(0x1fd),'LAhQF':function(_0x38fed9,_0x2c28c0){return _0x38fed9(_0x2c28c0);}},{storageStatePath:_0x2875e7,tempAuthPath:_0x46ee06}=_0xe755da?{'storageStatePath':_0xe755da,'tempAuthPath':undefined}:await _0xa5ac66[_0x2f4136(0x206)](resolveLocalAuthPath,getEnvDir(_0x579a26)),_0x36b90f=_0x21ba9f||randomUUID(),_0x2779a7=join(getRangerDir(),_0xa5ac66[_0x2f4136(0x237)],_0x36b90f),_0x23e6f4=_0xa5ac66['TbUCN'](Boolean,_0xb377a7['cdpEndpoint']),_0x1bfeba=_0x23e6f4?{'browserName':_0xa5ac66['RgQnn'],'cdpEndpoint':_0xb377a7['cdpEndpoint']}:((()=>{const _0xf6dcd1=_0x2f4136,{launchOptions:_0x406c6e,contextOptions:_0x1389ab}=buildBrowserOptionsFromSettings(_0xb377a7,{'headless':_0x33952d?![]:_0xb377a7['headless']??!![],'storageStatePath':_0x2875e7});if(_0xa5ac66[_0xf6dcd1(0x1cf)](process[_0xf6dcd1(0x22e)]?.(),0x0)){const _0x5df41f=[_0xf6dcd1(0x229),_0xa5ac66['EuwrT']],_0x246540=_0x406c6e[_0xf6dcd1(0x22c)]??[],_0x46c827=_0x5df41f['filter'](_0x1e5311=>!_0x246540[_0xf6dcd1(0x205)](_0x1e5311));_0x406c6e['args']=[..._0x246540,..._0x46c827];}return{'browserName':'chromium','launchOptions':_0x406c6e,'contextOptions':{..._0x1389ab,'permissions':[_0xa5ac66['ZPwNg'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x23e6f4){const _0x53fa4d=_0x1bfeba['contextOptions'];if(_0x53fa4d){if(_0xa5ac66['DwChG'](_0x53fa4d['userAgent'],undefined))delete _0x53fa4d[_0x2f4136(0x213)];if(_0xa5ac66['DwChG'](_0x53fa4d[_0x2f4136(0x1fa)],undefined))delete _0x53fa4d[_0x2f4136(0x1fa)];}}const _0x806b8e={'browser':_0x1bfeba,'outputDir':_0x2779a7,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x1ebbbf;try{const _0x10d56b=_0xa5ac66[_0x2f4136(0x245)](join,tmpdir(),_0xa5ac66['UHlNz']);!existsSync(_0x10d56b)&&await mkdir(_0x10d56b,{'recursive':!![]}),_0x1ebbbf=_0xa5ac66[_0x2f4136(0x245)](join,_0x10d56b,_0x579a26+'-'+Date[_0x2f4136(0x24b)]()+'-rangerwright.json'),await writeFile(_0x1ebbbf,JSON['stringify'](_0x806b8e,null,0x2));}catch(_0x4dc0e1){_0x46ee06&&await _0xa5ac66['LAhQF'](unlink,_0x46ee06)['catch'](()=>{});throw _0x4dc0e1;}return{'configPath':_0x1ebbbf,'storageStatePath':_0x2875e7,'tempAuthPath':_0x46ee06,'outputDir':_0x2779a7};}export async function buildNovaActCliConfig(_0x248dca,_0x41ed30,_0x5899a3,_0x4f1a34,_0x1fdf61){const _0x3f99fb=_0xf14d6,_0x551bfa={'CgYQs':function(_0x2cddc0){return _0x2cddc0();},'JuvHL':_0x3f99fb(0x20d),'lxOGf':function(_0x51c07c,_0x4cd150,_0xe3ffcd){return _0x51c07c(_0x4cd150,_0xe3ffcd);},'KlfyT':function(_0x528cb8,_0x3baf8e,_0x3d69ff){return _0x528cb8(_0x3baf8e,_0x3d69ff);},'ONCun':function(_0x2a9056,_0xbdf2f7){return _0x2a9056(_0xbdf2f7);}},{storageStatePath:_0x2b46bd,tempAuthPath:_0x2ab7b3}=_0x1fdf61?{'storageStatePath':_0x1fdf61,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x41ed30)),_0x324d44=_0x5899a3||_0x551bfa['CgYQs'](randomUUID),_0x179eeb=join(getRangerDir(),_0x551bfa[_0x3f99fb(0x1f5)],_0x324d44),_0x232a04=join(_0x179eeb,_0x3f99fb(0x207)),_0x4bfeb6=_0x2b46bd?_0x551bfa[_0x3f99fb(0x21f)](join,_0x232a04,_0x3f99fb(0x1e4)):undefined,{launchOptions:_0x3f91cf,contextOptions:_0x4634a5}=_0x551bfa['KlfyT'](buildBrowserOptionsFromSettings,_0x248dca,{'headless':_0x4f1a34?![]:_0x248dca['headless']??!![],'storageStatePath':_0x2b46bd});if(process[_0x3f99fb(0x22e)]?.()===0x0){const _0x4eeb98=[_0x3f99fb(0x229),'--disable-setuid-sandbox'],_0x123a8c=_0x3f91cf['args']??[],_0x53bf83=_0x4eeb98['filter'](_0x461320=>!_0x123a8c[_0x3f99fb(0x205)](_0x461320));_0x3f91cf[_0x3f99fb(0x22c)]=[..._0x123a8c,..._0x53bf83];}const _0x429fa8=typeof _0x3f91cf[_0x3f99fb(0x227)]===_0x3f99fb(0x22b)?_0x3f91cf[_0x3f99fb(0x227)]:_0x2b46bd?chromium['executablePath']():undefined;return{'storageStatePath':_0x2b46bd,'tempAuthPath':_0x2ab7b3,'baseUrl':_0x248dca['baseUrl'],'headless':_0x551bfa['ONCun'](Boolean,_0x3f91cf[_0x3f99fb(0x1d8)]),'userDataDir':_0x232a04,'browserProfilePath':_0x4bfeb6,'executablePath':_0x429fa8,'launchArgs':Array['isArray'](_0x3f91cf['args'])?_0x3f91cf['args']['filter'](_0x117b8e=>typeof _0x117b8e==='string'):[],'userAgent':typeof _0x4634a5['userAgent']==='string'?_0x4634a5['userAgent']:undefined,'extraHTTPHeaders':_0x4634a5[_0x3f99fb(0x223)],'allowInsecureLocalhost':Boolean(_0x248dca[_0x3f99fb(0x1e2)]),'safeMode':Boolean(_0x248dca[_0x3f99fb(0x1c8)]),'cdpEndpoint':_0x248dca[_0x3f99fb(0x1c5)],'isCdpMode':_0x551bfa['ONCun'](Boolean,_0x248dca['cdpEndpoint'])};}export function getNestedValue(_0x59ba94,_0x1e86dd){const _0x2c1377=_0xf14d6,_0x51973a={'DKDLP':function(_0x9184b1,_0x4416f7){return _0x9184b1(_0x4416f7);},'shOAr':function(_0x3f6aa2,_0x19b566){return _0x3f6aa2===_0x19b566;},'GeDhb':function(_0x414cda,_0x4e0222){return _0x414cda!==_0x4e0222;}},_0x4c82a3=_0x51973a[_0x2c1377(0x22a)](parseKeyPath,_0x1e86dd);let _0x4cedde=_0x59ba94;for(const _0x108d95 of _0x4c82a3){if(_0x4cedde===null||_0x51973a['shOAr'](_0x4cedde,undefined)||_0x51973a[_0x2c1377(0x1cb)](typeof _0x4cedde,_0x2c1377(0x236)))return undefined;_0x4cedde=_0x4cedde[_0x108d95];}return _0x4cedde;}export function setNestedValue(_0x54462f,_0x3851b6,_0x205253){const _0x3fb9f2=_0xf14d6,_0x47dede={'ysXGy':function(_0xed8c1d,_0x47bc58){return _0xed8c1d(_0x47bc58);},'ZTWqW':function(_0x36a47a,_0x40dd09){return _0x36a47a<_0x40dd09;},'DnnTo':function(_0x3c6ff0,_0x386445){return _0x3c6ff0-_0x386445;},'PsPGf':function(_0x2bd4be,_0x5ee4c6){return _0x2bd4be in _0x5ee4c6;},'zoQes':function(_0x36c4a4,_0x7c0cf1){return _0x36c4a4!==_0x7c0cf1;},'UCbYi':'object'},_0x2349ac=_0x47dede[_0x3fb9f2(0x219)](parseKeyPath,_0x3851b6);let _0x422250=_0x54462f;for(let _0xe8dbb9=0x0;_0x47dede[_0x3fb9f2(0x21a)](_0xe8dbb9,_0x47dede[_0x3fb9f2(0x202)](_0x2349ac['length'],0x1));_0xe8dbb9++){const _0x100e83=_0x2349ac[_0xe8dbb9];(!_0x47dede[_0x3fb9f2(0x221)](_0x100e83,_0x422250)||_0x47dede[_0x3fb9f2(0x210)](typeof _0x422250[_0x100e83],_0x47dede['UCbYi']))&&(_0x422250[_0x100e83]={}),_0x422250=_0x422250[_0x100e83];}_0x422250[_0x2349ac[_0x47dede[_0x3fb9f2(0x202)](_0x2349ac[_0x3fb9f2(0x23e)],0x1)]]=_0x205253;}function _0x355e(){const _0x2e846a=['pXeyI','KZkCq','zoQes','clipboard-read','auth.json','userAgent','replace','xNcmP','lnYve','setupHeader','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','ysXGy','ZTWqW','rbOOt','NSxmi','ENOENT','gWzMc','lxOGf','path','PsPGf','PtyWl','extraHTTPHeaders','dthxu','yNkkR','parse','executablePath','-cli','--no-sandbox','DKDLP','string','args','TiLDC','getuid','filter','vUduB','FSVjD','QFBZq','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x20is\x20not\x20set','HhuBb','object','OEwTb','JkTol','fromEntries','aQHua','keys','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','isArray','length','stringify','RYfMt','devtools','forWrite','4384032RCsKWr','mbJyL','kqKOa','5655152XWEyge','LFHma','pNInb','push','OFTRP','now','local','\x22\x20to\x20legacy\x20path\x20','BxLKo','legacy','stagehand','38410daHbwT','19156XnmoVr','cdpEndpoint','5133300hvTlsS','elRcm','safeMode','ignoreHTTPSErrors','mkyiI','GeDhb','playwright-cli','startsWith','YhJsz','DwChG','XDhpB','XXvLk','FlUxO','pdf','aosLA','join','launchOptions','GwlQF','headless','contextOptions','zVtms','allow','entries','6cIxrLl','XGdIp','QwwkR','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','CVuYb','allowInsecureLocalhost','header','Default','isdTA','7839mGDIyR','dDCBU','NQdky','nEPvU','location','Vrdqi','OYueU','storageStatePath','code','66xSgSvW','wwszK','oNYqy','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','tbreH','pVkaa','JuvHL','auth.json.enc','catch','nFZiJ','soOGG','storageState','hDUoH','--disable-setuid-sandbox','ranger-config','browser','8196468xaqaoU','core','settings.json','DnnTo','chromium','configPath','includes','TbUCN','nova-user-data','FrYpe','3337830qcuAIC','lUrOP','repeat','map','sessions'];_0x355e=function(){return _0x2e846a;};return _0x355e();}export function deleteNestedValue(_0x2313d9,_0x293347){const _0x3b9cb6=_0xf14d6,_0x5dea7f={'GorZw':function(_0x3743d3,_0x57f928){return _0x3743d3(_0x57f928);},'gWzMc':function(_0x4f023b,_0x22c776){return _0x4f023b<_0x22c776;},'FSVjD':function(_0x1f07c6,_0x4ad0f1){return _0x1f07c6!==_0x4ad0f1;},'mbJyL':'object','zVtms':function(_0x15ef73,_0x3a0be3){return _0x15ef73===_0x3a0be3;},'wlIaN':function(_0x130db4,_0x45ea17){return _0x130db4-_0x45ea17;}},_0x13d6a5=_0x5dea7f['GorZw'](parseKeyPath,_0x293347);let _0x5828b9=_0x2313d9;for(let _0x35bdc8=0x0;_0x5dea7f[_0x3b9cb6(0x21e)](_0x35bdc8,_0x13d6a5[_0x3b9cb6(0x23e)]-0x1);_0x35bdc8++){if(_0x5828b9===null||_0x5828b9===undefined||_0x5dea7f[_0x3b9cb6(0x231)](typeof _0x5828b9,_0x5dea7f['mbJyL']))return![];_0x5828b9=_0x5828b9[_0x13d6a5[_0x35bdc8]];}if(_0x5828b9===null||_0x5dea7f[_0x3b9cb6(0x1da)](_0x5828b9,undefined)||_0x5dea7f[_0x3b9cb6(0x231)](typeof _0x5828b9,_0x5dea7f[_0x3b9cb6(0x244)]))return![];const _0x5893fb=_0x13d6a5[_0x5dea7f['wlIaN'](_0x13d6a5[_0x3b9cb6(0x23e)],0x1)];if(_0x5893fb in _0x5828b9)return delete _0x5828b9[_0x5893fb],!![];return![];}function parseKeyPath(_0x5902f2){const _0x250eb3=_0xf14d6,_0xdf767e={'TiLDC':'headers','rwHVn':function(_0x47fce5,_0x166cd0){return _0x47fce5===_0x166cd0;},'TurbV':_0x250eb3(0x217),'mkyiI':'setupHeaders'},_0x33a8ff=_0x5902f2['split']('.');return _0x33a8ff[0x0]===_0x250eb3(0x1e3)&&(_0x33a8ff[0x0]=_0xdf767e[_0x250eb3(0x22d)]),_0xdf767e['rwHVn'](_0x33a8ff[0x0],_0xdf767e['TurbV'])&&(_0x33a8ff[0x0]=_0xdf767e[_0x250eb3(0x1ca)]),_0x33a8ff;}export function formatSettings(_0x3a3a9b,_0x6bcecd=0x0){const _0x2da8a8=_0xf14d6,_0x5e61ab={'YhJsz':function(_0x2331cb,_0x1fadfc){return _0x2331cb===_0x1fadfc;},'nEPvU':function(_0xbdfcd1,_0xfbabf3){return _0xbdfcd1!==_0xfbabf3;}},_0x876121=[],_0x24d933='\x20\x20'[_0x2da8a8(0x20b)](_0x6bcecd);for(const [_0x47596d,_0x297f5e]of Object[_0x2da8a8(0x1dc)](_0x3a3a9b)){if(_0x5e61ab[_0x2da8a8(0x1ce)](_0x297f5e,undefined))continue;if(_0x5e61ab['YhJsz'](typeof _0x297f5e,'object')&&_0x5e61ab[_0x2da8a8(0x1e9)](_0x297f5e,null)){_0x876121[_0x2da8a8(0x249)](''+_0x24d933+_0x47596d+':');for(const [_0x39ac8d,_0x10f8b6]of Object['entries'](_0x297f5e)){_0x876121[_0x2da8a8(0x249)](_0x24d933+'\x20\x20'+_0x39ac8d+':\x20'+_0x10f8b6);}}else _0x876121['push'](''+_0x24d933+_0x47596d+':\x20'+_0x297f5e);}return _0x876121[_0x2da8a8(0x1d5)]('\x0a');}
|
|
1
|
+
const _0x57680a=_0x55e5;(function(_0x1145ed,_0x192833){const _0x4b83dd=_0x55e5,_0x320ca1=_0x1145ed();while(!![]){try{const _0x4b952c=-parseInt(_0x4b83dd(0x184))/0x1*(-parseInt(_0x4b83dd(0x138))/0x2)+parseInt(_0x4b83dd(0x182))/0x3+-parseInt(_0x4b83dd(0x137))/0x4*(parseInt(_0x4b83dd(0x146))/0x5)+-parseInt(_0x4b83dd(0x186))/0x6*(parseInt(_0x4b83dd(0x127))/0x7)+parseInt(_0x4b83dd(0x12c))/0x8+-parseInt(_0x4b83dd(0x149))/0x9*(-parseInt(_0x4b83dd(0x13a))/0xa)+-parseInt(_0x4b83dd(0x14b))/0xb;if(_0x4b952c===_0x192833)break;else _0x320ca1['push'](_0x320ca1['shift']());}catch(_0x59c024){_0x320ca1['push'](_0x320ca1['shift']());}}}(_0x167e,0xb1806));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(_0x2090dd,_0x5f1d32){const _0x1b27d4=_0x55e5,_0x57df8a={'JxkcT':function(_0x3ad1c0,_0x16beda,_0x5237ce,_0x12fb30){return _0x3ad1c0(_0x16beda,_0x5237ce,_0x12fb30);},'kOmYK':function(_0x46d612,_0x54f006,_0x43ef36){return _0x46d612(_0x54f006,_0x43ef36);},'xqJtu':_0x1b27d4(0x114),'ehcWe':function(_0x2aa80a,_0x5e3905,_0x132d06){return _0x2aa80a(_0x5e3905,_0x132d06);},'oiNsl':function(_0x3c99e4,_0x5c26f3){return _0x3c99e4(_0x5c26f3);}},_0x509de4=join(_0x5f1d32,'ci',_0x2090dd),_0x1508f0=_0x57df8a[_0x1b27d4(0x142)](join,_0x5f1d32,_0x1b27d4(0x114),_0x2090dd),_0x5532a5=join(_0x5f1d32,_0x2090dd),_0x577135=_0x57df8a[_0x1b27d4(0x15f)](join,_0x5f1d32,_0x57df8a['xqJtu']),_0x19bbad=_0x57df8a['ehcWe'](join,_0x5f1d32,'ci');if(existsSync(_0x509de4))return _0x509de4;if(existsSync(_0x1508f0))return _0x1508f0;if(existsSync(_0x5532a5)&&(_0x5532a5!==_0x577135&&_0x5532a5!==_0x19bbad?!![]:_0x57df8a['oiNsl'](hasLegacyProfileFiles,_0x5532a5)))return _0x5532a5;return null;}export function getEnvDir(_0x430267,_0x51c97b={}){const _0x36f6b4=_0x55e5,_0x1841df={'mdyPO':function(_0xb0d728){return _0xb0d728();},'eLCHw':function(_0x72e383,_0x38ba3b,_0x1f3297){return _0x72e383(_0x38ba3b,_0x1f3297);},'OQiRq':function(_0x4d3b38,_0x1fbfac){return _0x4d3b38!==_0x1fbfac;},'agZvc':function(_0x1cef19,_0x5724f3,_0x458021){return _0x1cef19(_0x5724f3,_0x458021);},'XKkcJ':function(_0x2fe5de,_0x2a28ce,_0x3cc58b){return _0x2fe5de(_0x2a28ce,_0x3cc58b);},'xmsfs':_0x36f6b4(0x114),'uRVCq':function(_0x54ac7c,_0x5e427c,_0x4cef13){return _0x54ac7c(_0x5e427c,_0x4cef13);}},_0xb5aaf7=_0x1841df[_0x36f6b4(0x10f)](getRangerDir),_0x483216=_0x1841df[_0x36f6b4(0x141)](findEnvInRoot,_0x430267,_0xb5aaf7);if(_0x483216){if(_0x51c97b['forWrite']&&isLegacyEnvPath(_0x483216))throw legacyWriteError(_0x430267,_0x483216);return _0x483216;}const _0xcc974e=getRangerHomeDir();if(_0x1841df[_0x36f6b4(0x10b)](_0xcc974e,_0xb5aaf7)){const _0xe87099=_0x1841df['agZvc'](findEnvInRoot,_0x430267,_0xcc974e);if(_0xe87099){if(_0x51c97b['forWrite']&&isLegacyEnvPath(_0xe87099))throw _0x1841df['XKkcJ'](legacyWriteError,_0x430267,_0xe87099);return _0xe87099;}}const _0x1db494=join(_0xcc974e,_0x1841df[_0x36f6b4(0x18a)],_0x430267);if(_0x51c97b['forWrite'])throw _0x1841df['uRVCq'](legacyWriteError,_0x430267,_0x1db494);return _0x1db494;}function isLegacyEnvPath(_0x40421f){const _0x2b8cc4=_0x55e5,_0x5c93a7={'KMCpJ':function(_0x57e023){return _0x57e023();},'dCKZq':function(_0x4ff42f,_0x86fb8b){return _0x4ff42f+_0x86fb8b;},'ZiIZu':function(_0x2ab11b,_0x299ec1){return _0x2ab11b===_0x299ec1;}},_0x4e3d99=_0x5c93a7[_0x2b8cc4(0x179)](getRangerDir),_0x35ebf0=getRangerHomeDir();for(const _0x325d01 of new Set([_0x4e3d99,_0x35ebf0])){const _0x1c0ad1=_0x325d01[_0x2b8cc4(0x157)]('/')?_0x325d01:_0x5c93a7['dCKZq'](_0x325d01,'/');if(_0x5c93a7['ZiIZu'](_0x40421f,_0x325d01)||_0x40421f['startsWith'](_0x1c0ad1))return!![];}return![];}function legacyWriteError(_0x11f358,_0x385b5c){const _0x177b8a=_0x55e5,_0x4edbdd={'fqmPB':function(_0x3ec89,_0x1c49c9){return _0x3ec89+_0x1c49c9;}};return new Error(_0x4edbdd[_0x177b8a(0x110)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x11f358+_0x177b8a(0x163)+_0x385b5c+'.\x0a',_0x177b8a(0x16e))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+_0x177b8a(0x13d));}export function findExistingEnv(_0x356fcc,_0xd0e00c){const _0x5ebec5=_0x55e5,_0x3e80c1={'KtlJu':function(_0x17ff77){return _0x17ff77();},'HXpFS':_0x5ebec5(0x114),'sfHOq':function(_0x39e4ff,_0x702b10,_0x501064){return _0x39e4ff(_0x702b10,_0x501064);},'MhFLl':function(_0x22e611,_0x38615c,_0x9673cf){return _0x22e611(_0x38615c,_0x9673cf);},'mvcsa':function(_0xc5eb77,_0x388086,_0x55695d,_0x50497f){return _0xc5eb77(_0x388086,_0x55695d,_0x50497f);},'FFslz':function(_0x5e1e73,_0x13baae){return _0x5e1e73===_0x13baae;},'nQYph':_0x5ebec5(0x153),'jArKL':function(_0x3eecbb,_0x1c640d){return _0x3eecbb===_0x1c640d;}},_0xbdade0=_0xd0e00c?.[_0x5ebec5(0x130)],_0x4cc817=_0xbdade0?[_0xbdade0]:[getRangerDir(),_0x3e80c1['KtlJu'](getRangerHomeDir)]['filter']((_0x45cb91,_0x138ea5,_0x414eb3)=>_0x414eb3[_0x5ebec5(0x171)](_0x45cb91)===_0x138ea5),_0x2d4f4f=_0xd0e00c?.[_0x5ebec5(0x17a)]??['ci',_0x3e80c1[_0x5ebec5(0x143)],_0x5ebec5(0x153)];for(const _0x53f069 of _0x4cc817){const _0x432d4e=_0x3e80c1['sfHOq'](join,_0x53f069,'local'),_0x1dd83f=_0x3e80c1['MhFLl'](join,_0x53f069,'ci'),_0x54d235=[{'location':'ci','path':_0x3e80c1[_0x5ebec5(0x15b)](join,_0x53f069,'ci',_0x356fcc)},{'location':_0x3e80c1[_0x5ebec5(0x143)],'path':_0x3e80c1['mvcsa'](join,_0x53f069,_0x3e80c1[_0x5ebec5(0x143)],_0x356fcc)},{'location':_0x5ebec5(0x153),'path':join(_0x53f069,_0x356fcc)}];for(const _0x205289 of _0x54d235){if(_0x2d4f4f['includes'](_0x205289['location'])&&existsSync(_0x205289['path'])){if(_0x3e80c1['FFslz'](_0x205289['location'],_0x3e80c1[_0x5ebec5(0x17e)])&&(_0x3e80c1['jArKL'](_0x205289[_0x5ebec5(0x178)],_0x432d4e)||_0x205289['path']===_0x1dd83f)&&!hasLegacyProfileFiles(_0x205289[_0x5ebec5(0x178)]))continue;return{'path':_0x205289[_0x5ebec5(0x178)],'location':_0x205289[_0x5ebec5(0x115)]};}}}return null;}function hasLegacyProfileFiles(_0x57dcc4){const _0x3d9bbd=_0x55e5,_0x25d683={'sLFVn':function(_0x4c2e38,_0x1ff96f){return _0x4c2e38(_0x1ff96f);}};return _0x25d683['sLFVn'](existsSync,join(_0x57dcc4,'settings.json'))||_0x25d683[_0x3d9bbd(0x112)](existsSync,join(_0x57dcc4,_0x3d9bbd(0x147)))||_0x25d683[_0x3d9bbd(0x112)](existsSync,join(_0x57dcc4,_0x3d9bbd(0x176)));}export function isEnvCi(_0x2528d4){const _0x1a752e=_0x55e5,_0x18e4a9={'MFtjo':function(_0x4a129c){return _0x4a129c();}};if(existsSync(join(getRangerDir(),'ci',_0x2528d4)))return!![];const _0x4ccc17=getRangerHomeDir();if(_0x4ccc17!==_0x18e4a9[_0x1a752e(0x129)](getRangerDir)&&existsSync(join(_0x4ccc17,'ci',_0x2528d4)))return!![];return![];}export async function cleanupTempFiles(_0x479841){const _0xed9b8=_0x55e5,_0x5aa4dd={'PJzie':function(_0x239859,_0x980471){return _0x239859!==_0x980471;},'eOYrc':_0xed9b8(0x173)},_0x48bb18=[_0x479841[_0xed9b8(0x14a)],_0x479841[_0xed9b8(0x10d)]][_0xed9b8(0x16b)](Boolean);await Promise['all'](_0x48bb18['map'](_0x2f9cb3=>unlink(_0x2f9cb3)[_0xed9b8(0x131)](_0x3096a2=>{const _0x335c3e=_0xed9b8;_0x5aa4dd[_0x335c3e(0x128)](_0x3096a2['code'],_0x5aa4dd[_0x335c3e(0x10e)])&&console[_0x335c3e(0x11a)](_0x335c3e(0x16a)+_0x2f9cb3+':',_0x3096a2['message']);})));}export function getSettingsPath(_0x53a66a){const _0x239221=_0x55e5,_0x1d3576={'ZRoom':function(_0x5d6406,_0x5cc4d3,_0x3cd688){return _0x5d6406(_0x5cc4d3,_0x3cd688);},'xbjHH':'settings.json'};return _0x1d3576['ZRoom'](join,getEnvDir(_0x53a66a),_0x1d3576[_0x239221(0x185)]);}export async function loadSettings(_0x10a98d){const _0x3b0684=_0x55e5,_0x328e24={'Cjwuy':function(_0x5795c7,_0x502cd0){return _0x5795c7(_0x502cd0);},'Dxvfb':function(_0x4ebd16,_0x5f3874,_0x4c90b1){return _0x4ebd16(_0x5f3874,_0x4c90b1);}},_0x1c4851=_0x328e24[_0x3b0684(0x11e)](getSettingsPath,_0x10a98d);if(!_0x328e24[_0x3b0684(0x11e)](existsSync,_0x1c4851))return{};try{const _0x24a6b6=await _0x328e24[_0x3b0684(0x145)](readFile,_0x1c4851,'utf-8');return JSON[_0x3b0684(0x181)](_0x24a6b6);}catch{return{};}}export async function saveSettings(_0x1ea240,_0xb7a64){const _0x238bf7=_0x55e5,_0x412aed={'EOvtu':function(_0x326c2f,_0xecf496){return _0x326c2f(_0xecf496);},'auzuz':function(_0x3d268e,_0x412cc0){return _0x3d268e(_0x412cc0);},'XUqgY':function(_0x513a91,_0x8bc1a9,_0x1e3937){return _0x513a91(_0x8bc1a9,_0x1e3937);}},_0x1cbdd4=_0x412aed['EOvtu'](getSettingsPath,_0x1ea240),_0x122cee=dirname(_0x1cbdd4);!_0x412aed[_0x238bf7(0x15c)](existsSync,_0x122cee)&&await mkdir(_0x122cee,{'recursive':!![]}),await _0x412aed['XUqgY'](writeFile,_0x1cbdd4,JSON[_0x238bf7(0x11c)](_0xb7a64,null,0x2));}export function resolveEnvVars(_0x4df5e8){const _0xd81e05=_0x55e5,_0x11dce3={'dcMcP':function(_0x5417ae,_0x33645b){return _0x5417ae===_0x33645b;},'xjRUx':function(_0x24c3dd,_0x4a3d66){return _0x24c3dd===_0x4a3d66;},'NdSQa':_0xd81e05(0x151)};if(_0x11dce3['xjRUx'](typeof _0x4df5e8,_0x11dce3['NdSQa']))return _0x4df5e8[_0xd81e05(0x124)](/\$\{(\w+)\}/g,(_0x23b1e9,_0x489765)=>{const _0x473778=_0xd81e05,_0x1289db=process[_0x473778(0x13c)][_0x489765];if(_0x11dce3[_0x473778(0x108)](_0x1289db,undefined))throw new Error(_0x473778(0x134)+_0x489765+'\x20is\x20not\x20set');return _0x1289db;});if(Array[_0xd81e05(0x133)](_0x4df5e8))return _0x4df5e8['map'](resolveEnvVars);if(_0x4df5e8&&typeof _0x4df5e8==='object')return Object['fromEntries'](Object['entries'](_0x4df5e8)['map'](([_0x1f06c5,_0x362411])=>[_0x1f06c5,resolveEnvVars(_0x362411)]));return _0x4df5e8;}function _0x167e(){const _0x1acb9d=['Cjwuy','Kdccp','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','kfEbc','entries','-rangerwright.json','replace','JfuSd','BhzcS','124327WxNBJP','PJzie','MFtjo','userAgent','xmsKA','3706864hUzdMi','VpvCS','OafUU','hcQvK','rangerDir','catch','--disable-features=WebBluetooth','isArray','Environment\x20variable\x20','kWzra','cdpEndpoint','12ZQfTYH','4yzaEpH','WQhOq','10rAPEjR','now','env','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','executablePath','KqOFH','CEmxP','eLCHw','JxkcT','HXpFS','devtools','Dxvfb','1737510qtefTy','auth.json','headless','11948049IkmcUM','tempAuthPath','6203219QgZckU','Default','adXvf','getuid','--disable-web-security','ranger-config','string','object','legacy','VAwAd','Ycltn','browser','endsWith','playwright-cli','--disable-setuid-sandbox','bKJxF','mvcsa','auzuz','sbWuv','ovhrY','kOmYK','none','ilxgE','header','\x22\x20to\x20legacy\x20path\x20','VysVl','PJjml','rCtHu','length','yKSeY','boolean','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','filter','ktETj','args','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','DlWkd','chromium','indexOf','JDQls','ENOENT','BdQli','.json','auth.json.enc','pdf','path','KMCpJ','locations','oSure','contextOptions','includes','nQYph','keys','stagehand','parse','3778818QOXydd','storageState','156547ZsNmmh','xbjHH','348aZLzgu','allowInsecureLocalhost','QIqKg','vision','xmsfs','headers','dcMcP','SXwiG','oQDAo','OQiRq','aBTMh','configPath','eOYrc','mdyPO','fqmPB','gVSxn','sLFVn','extraHTTPHeaders','local','location','adRGx','HdPYY','plNYH','KtICT','warn','fckSI','stringify','join'];_0x167e=function(){return _0x1acb9d;};return _0x167e();}const isRecord=_0x4484c4=>typeof _0x4484c4==='object'&&_0x4484c4!==null&&!Array[_0x57680a(0x133)](_0x4484c4),asRecord=_0x2e40ed=>isRecord(_0x2e40ed)?_0x2e40ed:undefined,mergeHeaders=(_0x3a6794,_0x13570b)=>{const _0x1c881b=_0x57680a,_0x2e85cf={'dOSYc':function(_0x2c1a64,_0x46e6bb){return _0x2c1a64??_0x46e6bb;}},_0x451107={..._0x2e85cf['dOSYc'](_0x3a6794,{}),..._0x13570b??{}};return Object[_0x1c881b(0x17f)](_0x451107)[_0x1c881b(0x167)]?_0x451107:undefined;},SAFE_MODE_ARGS=[_0x57680a(0x132)],ALLOW_LOCALHOST_ARGS=[_0x57680a(0x14f),'--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0xaa5d47,_0x5ad0df={}){const _0x47fb91=_0x57680a,_0x576c04={'Kdccp':function(_0x5367e3,_0x3db19e){return _0x5367e3(_0x3db19e);},'oSure':function(_0x2401a9,_0x3a2d16){return _0x2401a9===_0x3a2d16;},'VgWAX':function(_0x472656,_0x10ade4){return _0x472656(_0x10ade4);},'plNYH':function(_0x5eddb2,_0x26ae1d){return _0x5eddb2===_0x26ae1d;},'JQakx':'string','SXwiG':function(_0x402ca9,_0x49c05d){return _0x402ca9(_0x49c05d);}},_0x51a78c=_0x576c04[_0x47fb91(0x11f)](asRecord,_0xaa5d47[_0x47fb91(0x156)]),_0x146c04={...asRecord(_0x51a78c?.['launchOptions'])??{}};_0x576c04[_0x47fb91(0x17b)](typeof _0x5ad0df[_0x47fb91(0x148)],_0x47fb91(0x169))&&(_0x146c04['headless']=_0x5ad0df[_0x47fb91(0x148)]);if(_0xaa5d47['safeMode']){const _0x3ab216=_0x146c04['args']??[],_0x18b66b=SAFE_MODE_ARGS[_0x47fb91(0x16b)](_0x528142=>!_0x3ab216[_0x47fb91(0x17d)](_0x528142));_0x146c04['args']=[..._0x3ab216,..._0x18b66b];}if(_0xaa5d47['allowInsecureLocalhost']){const _0x474bdb=_0x146c04['args']??[],_0x1802a0=ALLOW_LOCALHOST_ARGS['filter'](_0xb81d4b=>!_0x474bdb[_0x47fb91(0x17d)](_0xb81d4b));_0x146c04[_0x47fb91(0x16d)]=[..._0x474bdb,..._0x1802a0];}const _0x15164f={..._0x576c04['VgWAX'](asRecord,_0x51a78c?.['contextOptions'])??{}};_0x15164f['ignoreHTTPSErrors']=!![];_0x576c04[_0x47fb91(0x118)](typeof _0xaa5d47[_0x47fb91(0x12a)],_0x576c04['JQakx'])&&(_0x15164f[_0x47fb91(0x12a)]=_0xaa5d47['userAgent']);const _0x5cfcab=mergeHeaders(_0x576c04[_0x47fb91(0x109)](asRecord,_0x15164f[_0x47fb91(0x113)]),asRecord(_0xaa5d47[_0x47fb91(0x107)]));return _0x5cfcab?_0x15164f[_0x47fb91(0x113)]=_0x5cfcab:delete _0x15164f[_0x47fb91(0x113)],_0x5ad0df['storageStatePath']&&(_0x15164f[_0x47fb91(0x183)]=_0x5ad0df['storageStatePath']),{'launchOptions':_0x146c04,'contextOptions':_0x15164f};}export async function resolveProfileStorageState(_0x4104f3){const _0x57f783=_0x57680a,_0x21c5c7={'CEmxP':function(_0xf3bf8b,_0x23aea1){return _0xf3bf8b(_0x23aea1);}};return _0x21c5c7[_0x57f783(0x140)](resolveLocalAuthPath,getEnvDir(_0x4104f3));}async function resolveLocalAuthPath(_0x1bfd60){const _0x4f0204=_0x57680a,_0x345a66={'xmsKA':function(_0x21089a,_0x4e9732,_0x526fe3){return _0x21089a(_0x4e9732,_0x526fe3);},'adRGx':'auth.json','wZAvl':function(_0x1f40c6){return _0x1f40c6();}},_0x1d0aee=_0x345a66[_0x4f0204(0x12b)](join,_0x1bfd60,'auth.json.enc'),_0x813f50=_0x345a66[_0x4f0204(0x12b)](join,_0x1bfd60,_0x345a66[_0x4f0204(0x116)]);if(existsSync(_0x1d0aee))try{const _0x406726=await getToken();if(!_0x406726)throw new Error(_0x4f0204(0x120));const _0x40154b=await readFile(_0x1d0aee),_0x1c9668=_0x345a66[_0x4f0204(0x12b)](decrypt,_0x40154b,_0x406726),_0x76d93d=_0x345a66['xmsKA'](join,_0x345a66['wZAvl'](tmpdir),'ranger-auth-'+Date[_0x4f0204(0x13b)]()+_0x4f0204(0x175));return await _0x345a66[_0x4f0204(0x12b)](writeFile,_0x76d93d,_0x1c9668),{'storageStatePath':_0x76d93d,'tempAuthPath':_0x76d93d};}catch(_0x44ade8){const _0x2b2d43=_0x44ade8 instanceof Error?_0x44ade8['message']:String(_0x44ade8);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x2b2d43);}if(existsSync(_0x813f50))return{'storageStatePath':_0x813f50};return{};}function _0x55e5(_0x55372d,_0x477687){_0x55372d=_0x55372d-0x107;const _0x167e3f=_0x167e();let _0x55e510=_0x167e3f[_0x55372d];return _0x55e510;}export async function buildPlaywrightConfig(_0x965564,_0x45f4ab,_0x7086e9,_0x53c9cf,_0x4dc93d){const _0x4d3501=_0x57680a,_0x5dda5f={'PJjml':function(_0xf3eb28,_0x693c21){return _0xf3eb28(_0x693c21);}};if(_0x4dc93d)return buildPlaywrightConfigCore(_0x965564,_0x4dc93d,_0x45f4ab,_0x7086e9,_0x53c9cf,'stagehand');const {storageStatePath:_0x5c91a3,tempAuthPath:_0x4702d8}=await resolveLocalAuthPath(getEnvDir(_0x45f4ab));try{const _0x3972c5=await buildPlaywrightConfigCore(_0x965564,_0x5c91a3,_0x45f4ab,_0x7086e9,_0x53c9cf,'stagehand');return{..._0x3972c5,'tempAuthPath':_0x4702d8};}catch(_0x3315eb){_0x4702d8&&await _0x5dda5f[_0x4d3501(0x165)](unlink,_0x4702d8)['catch'](()=>{});throw _0x3315eb;}}export async function buildPlaywrightConfigCore(_0x2273c1,_0x3e2a2f,_0x152e90,_0x409c6d,_0x1f8b30,_0x38fe5b=_0x57680a(0x180)){const _0x242aca=_0x57680a,_0x29d9bc={'xFvNA':function(_0x39c35d,_0x50ff50){return _0x39c35d===_0x50ff50;},'adXvf':_0x242aca(0x159),'AvDZX':'clipboard-read','HdPYY':'clipboard-write','YpVXq':function(_0x28e342){return _0x28e342();},'oQDAo':function(_0x2ab2b7,_0x5e5ab7,_0x3e071e,_0x23f8f4){return _0x2ab2b7(_0x5e5ab7,_0x3e071e,_0x23f8f4);},'ovhrY':function(_0x3b7e98){return _0x3b7e98();},'jcbWe':'chromium','VpvCS':'core','PMcgj':_0x242aca(0x177),'Jkyap':'allow','ktETj':function(_0x3f7e88,_0x45839a){return _0x3f7e88===_0x45839a;},'KqOFH':function(_0x4a9126,_0x58f926,_0x37b2d6){return _0x4a9126(_0x58f926,_0x37b2d6);},'bKJxF':_0x242aca(0x150),'sbWuv':function(_0x1170ec,_0x32def4){return _0x1170ec(_0x32def4);},'hcQvK':function(_0x37490b,_0x3155f7){return _0x37490b===_0x3155f7;},'XgZLZ':function(_0x14b916,_0x2ab352,_0x4c62e4){return _0x14b916(_0x2ab352,_0x4c62e4);}},_0x1ea195=_0x409c6d||_0x29d9bc['YpVXq'](randomUUID),_0x5f2d43=_0x29d9bc[_0x242aca(0x10a)](join,_0x29d9bc[_0x242aca(0x15e)](getRangerDir),'sessions',_0x1ea195),_0x4b4f40=Boolean(_0x2273c1[_0x242aca(0x136)]),_0x116948=_0x4b4f40?{'browserName':_0x29d9bc['jcbWe'],'cdpEndpoint':_0x2273c1[_0x242aca(0x136)]}:((()=>{const _0x345848=_0x242aca,{launchOptions:_0xa25d9a,contextOptions:_0x536b0b}=buildBrowserOptionsFromSettings(_0x2273c1,{'headless':_0x1f8b30?![]:_0x2273c1[_0x345848(0x148)]??!![],'storageStatePath':_0x3e2a2f});if(_0x29d9bc['xFvNA'](process['getuid']?.(),0x0)){const _0x32e0db=['--no-sandbox',_0x29d9bc[_0x345848(0x14d)]],_0x5461c2=_0xa25d9a[_0x345848(0x16d)]??[],_0x5c3a36=_0x32e0db[_0x345848(0x16b)](_0x2521c6=>!_0x5461c2['includes'](_0x2521c6));_0xa25d9a['args']=[..._0x5461c2,..._0x5c3a36];}return{'isolated':!![],'browserName':_0x345848(0x170),'launchOptions':_0xa25d9a,'contextOptions':{..._0x536b0b,'permissions':[_0x29d9bc['AvDZX'],_0x29d9bc[_0x345848(0x117)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x584ecd=_0x38fe5b===_0x242aca(0x158)?{'browser':_0x116948,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5f2d43,'outputMode':'file','codegen':_0x242aca(0x160)}:{'name':_0x152e90,'browser':_0x116948,'capabilities':[_0x29d9bc[_0x242aca(0x12d)],_0x29d9bc['PMcgj'],_0x242aca(0x189),_0x242aca(0x144)],'imageResponses':_0x29d9bc['Jkyap'],'outputDir':_0x5f2d43};if(!_0x4b4f40){const _0x516523=_0x584ecd[_0x242aca(0x156)],_0x34d3ae=_0x516523[_0x242aca(0x17c)];if(_0x34d3ae['userAgent']===undefined)delete _0x34d3ae[_0x242aca(0x12a)];if(_0x29d9bc[_0x242aca(0x16c)](_0x34d3ae['storageState'],undefined))delete _0x34d3ae[_0x242aca(0x183)];}const _0x208582=_0x29d9bc[_0x242aca(0x13f)](join,tmpdir(),_0x29d9bc[_0x242aca(0x15a)]);!_0x29d9bc[_0x242aca(0x15d)](existsSync,_0x208582)&&await _0x29d9bc['KqOFH'](mkdir,_0x208582,{'recursive':!![]});const _0x1162b5=_0x29d9bc[_0x242aca(0x12f)](_0x38fe5b,_0x242aca(0x158))?'-cli':'',_0x3250a0=_0x29d9bc['XgZLZ'](join,_0x208582,_0x152e90+'-'+Date['now']()+_0x1162b5+'.json');return await writeFile(_0x3250a0,JSON[_0x242aca(0x11c)](_0x584ecd,null,0x2)),{'configPath':_0x3250a0,'storageStatePath':_0x3e2a2f};}export async function buildPlaywrightCliConfig(_0x7ba54,_0x3a2ce5,_0x1d0943,_0x2097d5,_0x299abb){const _0xe59c7e=_0x57680a,_0xbe7f79={'kWzra':function(_0x2e3409,_0x2c9175,_0x30f1ce,_0x5af527,_0x4a6b41,_0x592f30,_0x31668b){return _0x2e3409(_0x2c9175,_0x30f1ce,_0x5af527,_0x4a6b41,_0x592f30,_0x31668b);},'fckSI':'playwright-cli','VysVl':function(_0x309028,_0x1cb94f){return _0x309028(_0x1cb94f);},'GmRjm':function(_0xeffbb6,_0x5e3474){return _0xeffbb6(_0x5e3474);}};if(_0x299abb)return _0xbe7f79[_0xe59c7e(0x135)](buildPlaywrightConfigCore,_0x7ba54,_0x299abb,_0x3a2ce5,_0x1d0943,_0x2097d5,_0xbe7f79[_0xe59c7e(0x11b)]);const {storageStatePath:_0x410caa,tempAuthPath:_0x173e98}=await _0xbe7f79['VysVl'](resolveLocalAuthPath,_0xbe7f79['GmRjm'](getEnvDir,_0x3a2ce5));try{const _0x594b29=await buildPlaywrightConfigCore(_0x7ba54,_0x410caa,_0x3a2ce5,_0x1d0943,_0x2097d5,'playwright-cli');return{..._0x594b29,'tempAuthPath':_0x173e98};}catch(_0x5b7515){_0x173e98&&await _0xbe7f79[_0xe59c7e(0x164)](unlink,_0x173e98)['catch'](()=>{});throw _0x5b7515;}}export async function buildRangerwrightCliConfig(_0x5ca723,_0x4b7870,_0x2abc32,_0x4f3d65,_0x85b31f){const _0x413331=_0x57680a,_0x33b88d={'WSmcg':function(_0x36d37e,_0x49400b){return _0x36d37e===_0x49400b;},'PJAtW':'--no-sandbox','PlznJ':_0x413331(0x170),'kxeCX':function(_0xc0bd9e,_0x53acba){return _0xc0bd9e(_0x53acba);},'SpOfd':function(_0x58cdbe,_0x3ebe67){return _0x58cdbe(_0x3ebe67);},'kfEbc':function(_0x47188f){return _0x47188f();},'BdQli':function(_0x20289e){return _0x20289e();},'GaWUf':function(_0x43518c,_0x166325){return _0x43518c(_0x166325);},'QIqKg':function(_0x35cf57,_0x5a3f2c,_0x25758f){return _0x35cf57(_0x5a3f2c,_0x25758f);},'tMNSz':function(_0x2cafc6,_0x5174c8){return _0x2cafc6(_0x5174c8);}},{storageStatePath:_0x484be1,tempAuthPath:_0x38709e}=_0x85b31f?{'storageStatePath':_0x85b31f,'tempAuthPath':undefined}:await _0x33b88d['kxeCX'](resolveLocalAuthPath,_0x33b88d['SpOfd'](getEnvDir,_0x4b7870)),_0x1807f8=_0x2abc32||_0x33b88d[_0x413331(0x121)](randomUUID),_0x5898d1=join(_0x33b88d[_0x413331(0x174)](getRangerDir),'sessions',_0x1807f8),_0x469c0f=_0x33b88d['GaWUf'](Boolean,_0x5ca723[_0x413331(0x136)]),_0x1df98c=_0x469c0f?{'browserName':_0x413331(0x170),'cdpEndpoint':_0x5ca723['cdpEndpoint']}:((()=>{const _0x199ad4=_0x413331,{launchOptions:_0x2f28a5,contextOptions:_0x50dfeb}=buildBrowserOptionsFromSettings(_0x5ca723,{'headless':_0x4f3d65?![]:_0x5ca723[_0x199ad4(0x148)]??!![],'storageStatePath':_0x484be1});if(_0x33b88d['WSmcg'](process[_0x199ad4(0x14e)]?.(),0x0)){const _0x246ea3=[_0x33b88d['PJAtW'],_0x199ad4(0x159)],_0x3d127e=_0x2f28a5[_0x199ad4(0x16d)]??[],_0x24dd81=_0x246ea3['filter'](_0x2e3aa4=>!_0x3d127e['includes'](_0x2e3aa4));_0x2f28a5[_0x199ad4(0x16d)]=[..._0x3d127e,..._0x24dd81];}return{'browserName':_0x33b88d['PlznJ'],'launchOptions':_0x2f28a5,'contextOptions':{..._0x50dfeb,'permissions':['clipboard-read','clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x469c0f){const _0x23bc7a=_0x1df98c['contextOptions'];if(_0x23bc7a){if(_0x23bc7a[_0x413331(0x12a)]===undefined)delete _0x23bc7a[_0x413331(0x12a)];if(_0x23bc7a['storageState']===undefined)delete _0x23bc7a[_0x413331(0x183)];}}const _0x4e691d={'browser':_0x1df98c,'outputDir':_0x5898d1,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x1266dd;try{const _0x1ffb2c=_0x33b88d['QIqKg'](join,tmpdir(),'ranger-config');!_0x33b88d['tMNSz'](existsSync,_0x1ffb2c)&&await _0x33b88d[_0x413331(0x188)](mkdir,_0x1ffb2c,{'recursive':!![]}),_0x1266dd=_0x33b88d['QIqKg'](join,_0x1ffb2c,_0x4b7870+'-'+Date['now']()+_0x413331(0x123)),await _0x33b88d[_0x413331(0x188)](writeFile,_0x1266dd,JSON['stringify'](_0x4e691d,null,0x2));}catch(_0x2f5964){_0x38709e&&await unlink(_0x38709e)['catch'](()=>{});throw _0x2f5964;}return{'configPath':_0x1266dd,'storageStatePath':_0x484be1,'tempAuthPath':_0x38709e,'outputDir':_0x5898d1};}export async function buildNovaActCliConfig(_0xae3505,_0x44ac27,_0x5e0b32,_0x524ddd,_0x5de50b){const _0x4d1c31=_0x57680a,_0x5124c8={'rCtHu':function(_0x20defc,_0x264691){return _0x20defc(_0x264691);},'DhgBM':function(_0x1798e9){return _0x1798e9();},'DlWkd':'--no-sandbox','vhpEl':_0x4d1c31(0x159),'wUSAQ':_0x4d1c31(0x151),'WQhOq':function(_0x54424d,_0x2ee075){return _0x54424d===_0x2ee075;},'PPSBJ':function(_0x45a31a,_0x1316b5){return _0x45a31a(_0x1316b5);},'Ycltn':function(_0x3a5cdf,_0x513931){return _0x3a5cdf(_0x513931);}},{storageStatePath:_0x596ffd,tempAuthPath:_0x490d10}=_0x5de50b?{'storageStatePath':_0x5de50b,'tempAuthPath':undefined}:await _0x5124c8['rCtHu'](resolveLocalAuthPath,getEnvDir(_0x44ac27)),_0x1b89cc=_0x5e0b32||_0x5124c8['DhgBM'](randomUUID),_0x34dfbb=join(_0x5124c8['DhgBM'](getRangerDir),'sessions',_0x1b89cc),_0x28cf37=join(_0x34dfbb,'nova-user-data'),_0x472bff=_0x596ffd?join(_0x28cf37,_0x4d1c31(0x14c)):undefined,{launchOptions:_0x393449,contextOptions:_0x13ee8d}=buildBrowserOptionsFromSettings(_0xae3505,{'headless':_0x524ddd?![]:_0xae3505[_0x4d1c31(0x148)]??!![],'storageStatePath':_0x596ffd});if(process['getuid']?.()===0x0){const _0x31dbbf=[_0x5124c8[_0x4d1c31(0x16f)],_0x5124c8['vhpEl']],_0x36a9c4=_0x393449['args']??[],_0x74d12a=_0x31dbbf['filter'](_0x54cf81=>!_0x36a9c4[_0x4d1c31(0x17d)](_0x54cf81));_0x393449['args']=[..._0x36a9c4,..._0x74d12a];}const _0x1724ef=typeof _0x393449[_0x4d1c31(0x13e)]===_0x5124c8['wUSAQ']?_0x393449[_0x4d1c31(0x13e)]:_0x596ffd?chromium['executablePath']():undefined;return{'storageStatePath':_0x596ffd,'tempAuthPath':_0x490d10,'baseUrl':_0xae3505['baseUrl'],'headless':_0x5124c8[_0x4d1c31(0x166)](Boolean,_0x393449[_0x4d1c31(0x148)]),'userDataDir':_0x28cf37,'browserProfilePath':_0x472bff,'executablePath':_0x1724ef,'launchArgs':Array[_0x4d1c31(0x133)](_0x393449[_0x4d1c31(0x16d)])?_0x393449['args']['filter'](_0x560534=>typeof _0x560534===_0x4d1c31(0x151)):[],'userAgent':_0x5124c8[_0x4d1c31(0x139)](typeof _0x13ee8d[_0x4d1c31(0x12a)],_0x4d1c31(0x151))?_0x13ee8d['userAgent']:undefined,'extraHTTPHeaders':_0x13ee8d[_0x4d1c31(0x113)],'allowInsecureLocalhost':_0x5124c8['PPSBJ'](Boolean,_0xae3505[_0x4d1c31(0x187)]),'safeMode':Boolean(_0xae3505['safeMode']),'cdpEndpoint':_0xae3505[_0x4d1c31(0x136)],'isCdpMode':_0x5124c8[_0x4d1c31(0x155)](Boolean,_0xae3505[_0x4d1c31(0x136)])};}export function getNestedValue(_0xf1fc05,_0x4fb022){const _0x2c5a63=_0x57680a,_0x2743bf={'KtICT':function(_0x6f9b91,_0x39a404){return _0x6f9b91(_0x39a404);},'CnHMl':function(_0x36635f,_0x563eee){return _0x36635f===_0x563eee;}},_0x4aed4e=_0x2743bf[_0x2c5a63(0x119)](parseKeyPath,_0x4fb022);let _0x1a7d9f=_0xf1fc05;for(const _0x321e4f of _0x4aed4e){if(_0x1a7d9f===null||_0x2743bf['CnHMl'](_0x1a7d9f,undefined)||typeof _0x1a7d9f!==_0x2c5a63(0x152))return undefined;_0x1a7d9f=_0x1a7d9f[_0x321e4f];}return _0x1a7d9f;}export function setNestedValue(_0x3093fb,_0x398509,_0x24b495){const _0x28c879=_0x57680a,_0x1002c4={'sxUGt':function(_0xf059d,_0x112748){return _0xf059d(_0x112748);},'MtFMp':function(_0x1aa4e6,_0x51305d){return _0x1aa4e6 in _0x51305d;}},_0xba906d=_0x1002c4['sxUGt'](parseKeyPath,_0x398509);let _0x197283=_0x3093fb;for(let _0x4ea26a=0x0;_0x4ea26a<_0xba906d[_0x28c879(0x167)]-0x1;_0x4ea26a++){const _0x23b5e3=_0xba906d[_0x4ea26a];(!_0x1002c4['MtFMp'](_0x23b5e3,_0x197283)||typeof _0x197283[_0x23b5e3]!==_0x28c879(0x152))&&(_0x197283[_0x23b5e3]={}),_0x197283=_0x197283[_0x23b5e3];}_0x197283[_0xba906d[_0xba906d['length']-0x1]]=_0x24b495;}export function deleteNestedValue(_0x272e38,_0x1a4785){const _0x147571=_0x57680a,_0x2adb68={'VAwAd':function(_0x4a440e,_0xa271a1){return _0x4a440e(_0xa271a1);},'xkCZp':function(_0x432ea5,_0x592e8b){return _0x432ea5<_0x592e8b;},'yKSeY':function(_0x5eda1c,_0x48d675){return _0x5eda1c===_0x48d675;},'ilxgE':function(_0x1ac7d5,_0x1299be){return _0x1ac7d5!==_0x1299be;}},_0x39818c=_0x2adb68[_0x147571(0x154)](parseKeyPath,_0x1a4785);let _0x6f8850=_0x272e38;for(let _0x2a0522=0x0;_0x2adb68['xkCZp'](_0x2a0522,_0x39818c[_0x147571(0x167)]-0x1);_0x2a0522++){if(_0x2adb68['yKSeY'](_0x6f8850,null)||_0x6f8850===undefined||_0x2adb68[_0x147571(0x161)](typeof _0x6f8850,_0x147571(0x152)))return![];_0x6f8850=_0x6f8850[_0x39818c[_0x2a0522]];}if(_0x2adb68[_0x147571(0x168)](_0x6f8850,null)||_0x2adb68[_0x147571(0x168)](_0x6f8850,undefined)||_0x2adb68['ilxgE'](typeof _0x6f8850,'object'))return![];const _0x2fa3e0=_0x39818c[_0x39818c['length']-0x1];if(_0x2fa3e0 in _0x6f8850)return delete _0x6f8850[_0x2fa3e0],!![];return![];}function parseKeyPath(_0x3860da){const _0x4d5bf1=_0x57680a,_0x1f8691={'OafUU':function(_0x37c609,_0x6f41bb){return _0x37c609===_0x6f41bb;},'aBTMh':_0x4d5bf1(0x162),'BhzcS':'headers','JDQls':function(_0x565990,_0x3d5c42){return _0x565990===_0x3d5c42;},'JfuSd':'setupHeader','Gwutd':'setupHeaders'},_0x424b0b=_0x3860da['split']('.');return _0x1f8691[_0x4d5bf1(0x12e)](_0x424b0b[0x0],_0x1f8691[_0x4d5bf1(0x10c)])&&(_0x424b0b[0x0]=_0x1f8691[_0x4d5bf1(0x126)]),_0x1f8691[_0x4d5bf1(0x172)](_0x424b0b[0x0],_0x1f8691[_0x4d5bf1(0x125)])&&(_0x424b0b[0x0]=_0x1f8691['Gwutd']),_0x424b0b;}export function formatSettings(_0xabc46,_0x14c216=0x0){const _0x23c0e3=_0x57680a,_0x2092bd={'gVSxn':function(_0x1c12a6,_0x5a89eb){return _0x1c12a6===_0x5a89eb;},'QPykI':function(_0x7a19f3,_0x519f9f){return _0x7a19f3!==_0x519f9f;}},_0x75be36=[],_0x4c2715='\x20\x20'['repeat'](_0x14c216);for(const [_0x3561c2,_0x474fca]of Object[_0x23c0e3(0x122)](_0xabc46)){if(_0x2092bd[_0x23c0e3(0x111)](_0x474fca,undefined))continue;if(typeof _0x474fca==='object'&&_0x2092bd['QPykI'](_0x474fca,null)){_0x75be36['push'](''+_0x4c2715+_0x3561c2+':');for(const [_0x246cd2,_0x32a793]of Object['entries'](_0x474fca)){_0x75be36['push'](_0x4c2715+'\x20\x20'+_0x246cd2+':\x20'+_0x32a793);}}else _0x75be36['push'](''+_0x4c2715+_0x3561c2+':\x20'+_0x474fca);}return _0x75be36[_0x23c0e3(0x11d)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4686(){const _0xc160a=['783096eNUZSQ','Tyrgp','1706200QJnvsc','ranger/SKILL.md','KteUu','304354WOQjsG','3163374UDTqzf','4425645vIxLOU','2274336rKWzoW','136590qYolrC'];_0x4686=function(){return _0xc160a;};return _0x4686();}(function(_0x384693,_0xf04478){const _0xdb15b6=_0x4619,_0x2812c1=_0x384693();while(!![]){try{const _0x3fec69=parseInt(_0xdb15b6(0x18e))/0x1+parseInt(_0xdb15b6(0x192))/0x2+-parseInt(_0xdb15b6(0x193))/0x3+parseInt(_0xdb15b6(0x191))/0x4+-parseInt(_0xdb15b6(0x18b))/0x5+-parseInt(_0xdb15b6(0x18f))/0x6+parseInt(_0xdb15b6(0x190))/0x7;if(_0x3fec69===_0xf04478)break;else _0x2812c1['push'](_0x2812c1['shift']());}catch(_0x2a7809){_0x2812c1['push'](_0x2812c1['shift']());}}}(_0x4686,0x6c63f));import{readFileSync}from'fs';import{dirname,join}from'path';function _0x4619(_0x1e85e6,_0x11d0c9){_0x1e85e6=_0x1e85e6-0x18a;const _0x468662=_0x4686();let _0x4619b0=_0x468662[_0x1e85e6];return _0x4619b0;}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x41404d){const _0x4cd77a=_0x4619,_0x45c320={'KteUu':function(_0x39b241,_0x4dc6ad,_0x418531,_0x1447e0,_0x99296d){return _0x39b241(_0x4dc6ad,_0x418531,_0x1447e0,_0x99296d);},'Tyrgp':'skills','bSETT':function(_0x207b3b,_0xaf2886,_0x225aae){return _0x207b3b(_0xaf2886,_0x225aae);},'YllLa':'utf-8'},_0x5394c2=_0x45c320[_0x4cd77a(0x18d)](join,__dirname,'..','..',_0x45c320[_0x4cd77a(0x18a)]),_0x2eae42=join(_0x5394c2,_0x41404d);try{return _0x45c320['bSETT'](readFileSync,_0x2eae42,_0x45c320['YllLa']);}catch{return'';}}export function getRangerSkillContent(){const _0xf051c0=_0x4619;return readSkillContent(_0xf051c0(0x18c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3fb747=_0x1432;(function(_0x15db98,_0x597726){const _0x3b63d6=_0x1432,_0x53e3f9=_0x15db98();while(!![]){try{const _0x1e7eac=-parseInt(_0x3b63d6(0x153))/0x1+parseInt(_0x3b63d6(0x142))/0x2*(-parseInt(_0x3b63d6(0x152))/0x3)+parseInt(_0x3b63d6(0x136))/0x4+parseInt(_0x3b63d6(0x13c))/0x5*(parseInt(_0x3b63d6(0x137))/0x6)+-parseInt(_0x3b63d6(0x141))/0x7+-parseInt(_0x3b63d6(0x155))/0x8+parseInt(_0x3b63d6(0x146))/0x9;if(_0x1e7eac===_0x597726)break;else _0x53e3f9['push'](_0x53e3f9['shift']());}catch(_0x386b54){_0x53e3f9['push'](_0x53e3f9['shift']());}}}(_0x3185,0x84a1d));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 _0x1432(_0xe1d368,_0x2cc953){_0xe1d368=_0xe1d368-0x133;const _0x3185dc=_0x3185();let _0x143213=_0x3185dc[_0xe1d368];return _0x143213;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x3185(){const _0x48e74b=['WgPBE','lHhBE','\x20\x20Files:\x20','wOAKG','skills','endsWith','JYfgG','filter','878499sMABsD','621796pQpwZv','Invalid\x20skill\x20frontmatter','1710848zFdpqB','JuVYJ','e2e-test-recommender','match','1840548uQWFua','1562322NLAxqz','SKILL.md','warn','bug-bash','stWwM','20WHSwXK','project','push','yFGwt','dGgCG','2880136lspSUy','4JBKHAN','log','join','fPUKh','7869078odfFRS','length','fYdwi','claude'];_0x3185=function(){return _0x48e74b;};return _0x3185();}export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x3fb747(0x134),_0x3fb747(0x13a),'feature-tracker'];export async function installSkill(_0x1f843a,_0x478706={}){const _0x4c7cfb=_0x3fb747,_0x989ba3={'yFGwt':_0x4c7cfb(0x149),'WgPBE':function(_0x3ab6dc,_0x39f600,_0x420c02){return _0x3ab6dc(_0x39f600,_0x420c02);},'wOAKG':'SKILL.md','LIAuQ':function(_0x3f991c,_0x9e849){return _0x3f991c&&_0x9e849;},'VQXuz':function(_0x46a1d4,_0x4f3ab1){return _0x46a1d4===_0x4f3ab1;},'apgua':function(_0x3c1dca,_0x3a2e6c){return _0x3c1dca(_0x3a2e6c);},'dGgCG':function(_0x50ff3f,_0xb8e10a){return _0x50ff3f(_0xb8e10a);},'stWwM':function(_0x312fdc,_0x1ca2e8,_0x766ccb){return _0x312fdc(_0x1ca2e8,_0x766ccb);},'JYfgG':function(_0x44922f,_0x2dacf4,_0x4a0c14){return _0x44922f(_0x2dacf4,_0x4a0c14);},'fPUKh':function(_0x35bfd0,_0x3db17c){return _0x35bfd0>_0x3db17c;}},{level:level=_0x4c7cfb(0x13d),cliVersion:_0x3799f5,platform:platform=_0x989ba3[_0x4c7cfb(0x13f)]}=_0x478706,_0x3e11a1=getSourceSkillsDir(),_0x30c5ce=join(_0x3e11a1,_0x1f843a),_0x286aa1=join(_0x3e11a1,_0x1f843a+'.md'),_0x251146=existsSync(_0x30c5ce)&&statSync(_0x30c5ce)['isDirectory']()&&existsSync(_0x989ba3[_0x4c7cfb(0x14a)](join,_0x30c5ce,_0x989ba3['wOAKG'])),_0x2360a5=existsSync(_0x286aa1);if(_0x989ba3['LIAuQ'](!_0x251146,!_0x2360a5))return console[_0x4c7cfb(0x139)]('\x20\x20Skill\x20not\x20found:\x20'+_0x1f843a),![];const _0x35136c=_0x989ba3['VQXuz'](platform,'opencode')?getOpencodeSkillsDir(level):_0x989ba3['apgua'](getSkillsDir,level),_0x33f59a=_0x989ba3[_0x4c7cfb(0x14a)](join,_0x35136c,_0x1f843a);await _0x989ba3['WgPBE'](mkdir,_0x33f59a,{'recursive':!![]});let _0x3dcb7a,_0x2c36d4=[];if(_0x251146){const _0x1baf13=await _0x989ba3[_0x4c7cfb(0x140)](readdir,_0x30c5ce),_0x14985f=_0x1baf13[_0x4c7cfb(0x151)](_0x45673f=>_0x45673f[_0x4c7cfb(0x14f)]('.md'));for(const _0xfcd4df of _0x14985f){const _0xf06fc2=_0x989ba3[_0x4c7cfb(0x13b)](join,_0x30c5ce,_0xfcd4df),_0x2df21f=_0x989ba3[_0x4c7cfb(0x13b)](join,_0x33f59a,_0xfcd4df);await copyFile(_0xf06fc2,_0x2df21f),_0x2c36d4[_0x4c7cfb(0x13e)](_0xfcd4df);}_0x3dcb7a=await _0x989ba3['stWwM'](readFile,join(_0x30c5ce,_0x4c7cfb(0x138)),'utf-8');}else{_0x3dcb7a=await _0x989ba3[_0x4c7cfb(0x150)](readFile,_0x286aa1,'utf-8');const _0x41fe41=_0x989ba3[_0x4c7cfb(0x13b)](join,_0x33f59a,_0x989ba3[_0x4c7cfb(0x14d)]);await writeFile(_0x41fe41,_0x3dcb7a,'utf-8'),_0x2c36d4['push'](_0x989ba3['wOAKG']);}const {name:_0x5ca36d}=parseFrontmatter(_0x3dcb7a);return console[_0x4c7cfb(0x143)]('\x20\x20Installed\x20skill:\x20'+_0x5ca36d),console[_0x4c7cfb(0x143)]('\x20\x20Location:\x20'+_0x33f59a),_0x989ba3[_0x4c7cfb(0x145)](_0x2c36d4[_0x4c7cfb(0x147)],0x1)&&console[_0x4c7cfb(0x143)](_0x4c7cfb(0x14c)+_0x2c36d4[_0x4c7cfb(0x144)](',\x20')),logLocalAgentInstallation(_0x1f843a,{'skillDisplayName':_0x5ca36d,'installLevel':level},_0x3799f5)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x12fd76=_0x3fb747,_0x1a9535={'fYdwi':function(_0x5cd45b,_0x4da04f,_0x2d1493,_0x11b2ec,_0x16d949){return _0x5cd45b(_0x4da04f,_0x2d1493,_0x11b2ec,_0x16d949);},'lHhBE':function(_0x1d1056,_0x539ff9,_0x2a89c5,_0x143120,_0x58fcaa,_0x3a1694){return _0x1d1056(_0x539ff9,_0x2a89c5,_0x143120,_0x58fcaa,_0x3a1694);},'JuVYJ':_0x12fd76(0x14e)},_0xf0ac43=[_0x1a9535[_0x12fd76(0x148)](join,__dirname,'..','..','skills'),_0x1a9535[_0x12fd76(0x14b)](join,__dirname,'..','..','..',_0x1a9535[_0x12fd76(0x133)])];for(const _0xe366b8 of _0xf0ac43){if(existsSync(_0xe366b8))return _0xe366b8;}return _0xf0ac43[0x0];}function parseFrontmatter(_0x26d0cd){const _0x8053a2=_0x3fb747,_0x194451={'KIZUw':_0x8053a2(0x154)},_0x736558=_0x26d0cd[_0x8053a2(0x135)](/^---\n([\s\S]+?)\n---/);if(!_0x736558)throw new Error(_0x194451['KIZUw']);const _0x2aa139=_0x736558[0x1],_0x5aefb1=_0x2aa139['match'](/name:\s*(.+)/),_0x426b2b=_0x2aa139['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x5aefb1?.[0x1]['trim']()||'','description':_0x426b2b?.[0x1]['trim']()||''};}export async function removeSkill(_0x133d7f,_0x4c68ce){const _0x511a85=_0x3fb747,_0x3a12d9={'POgDi':function(_0x3b3251,_0x199030){return _0x3b3251(_0x199030);}},_0x151c51=_0x3a12d9['POgDi'](getSkillsDir,_0x4c68ce),_0x120834=join(_0x151c51,_0x133d7f);if(!existsSync(_0x120834))return![];try{return await rm(_0x120834,{'recursive':!![]}),console[_0x511a85(0x143)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x133d7f),!![];}catch{return console[_0x511a85(0x139)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x133d7f),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5f060a=_0x58b5;(function(_0x548839,_0xf1e330){const _0x19274c=_0x58b5,_0x3bf47d=_0x548839();while(!![]){try{const _0x4a036f=parseInt(_0x19274c(0x96))/0x1+parseInt(_0x19274c(0xac))/0x2+parseInt(_0x19274c(0xc0))/0x3+-parseInt(_0x19274c(0x9b))/0x4*(parseInt(_0x19274c(0x85))/0x5)+-parseInt(_0x19274c(0x89))/0x6*(parseInt(_0x19274c(0x97))/0x7)+parseInt(_0x19274c(0x98))/0x8+-parseInt(_0x19274c(0x9e))/0x9*(-parseInt(_0x19274c(0x9c))/0xa);if(_0x4a036f===_0xf1e330)break;else _0x3bf47d['push'](_0x3bf47d['shift']());}catch(_0x5e8cce){_0x3bf47d['push'](_0x3bf47d['shift']());}}}(_0x4fa7,0x749fb));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(_0x25172a,_0x49f3b0){const _0xa4c51e=_0x58b5,_0x327a1c={'jflns':function(_0x49a1a2,_0xdc42f3){return _0x49a1a2&_0xdc42f3;},'WzJmE':function(_0xf40e45,_0x112c11){return _0xf40e45-_0x112c11;},'tneCd':function(_0x28fbb3,_0x16017b){return _0x28fbb3<_0x16017b;}};if(_0x49f3b0>=_0x25172a[_0xa4c51e(0xbe)])return[0x0,0x0];const _0xa1ae07=_0x25172a[_0x49f3b0];let _0x315b37=0x1,_0x602ece=0x80;while(_0x315b37<=0x8&&!(_0xa1ae07&_0x602ece)){_0x315b37++,_0x602ece>>=0x1;}if(_0x49f3b0+_0x315b37>_0x25172a['length'])return[0x0,0x0];let _0x2c1cf6=_0x327a1c['jflns'](_0xa1ae07,_0x327a1c['WzJmE'](_0x602ece,0x1));for(let _0x590e63=0x1;_0x327a1c[_0xa4c51e(0xab)](_0x590e63,_0x315b37);_0x590e63++){_0x2c1cf6=_0x2c1cf6*0x100+_0x25172a[_0x49f3b0+_0x590e63];}return[_0x2c1cf6,_0x315b37];}function readId(_0x11d981,_0x992884){const _0x318e8a=_0x58b5,_0x2468ef={'HFiLA':function(_0x1e0f06,_0x5c2d74){return _0x1e0f06>=_0x5c2d74;},'Yaezp':function(_0x52b0e2,_0x1aab6c){return _0x52b0e2+_0x1aab6c;},'KwECD':function(_0x24af0a,_0x173ec3){return _0x24af0a<_0x173ec3;},'hsiNE':function(_0x21f6ae,_0x78c4f8){return _0x21f6ae+_0x78c4f8;}};if(_0x2468ef[_0x318e8a(0x87)](_0x992884,_0x11d981[_0x318e8a(0xbe)]))return[0x0,0x0];const _0x3bd679=_0x11d981[_0x992884];let _0x1dd5dd;if(_0x3bd679>=0x80)_0x1dd5dd=0x1;else{if(_0x3bd679>=0x40)_0x1dd5dd=0x2;else{if(_0x2468ef[_0x318e8a(0x87)](_0x3bd679,0x20))_0x1dd5dd=0x3;else{if(_0x3bd679>=0x10)_0x1dd5dd=0x4;else return[_0x3bd679,0x1];}}}if(_0x2468ef[_0x318e8a(0xad)](_0x992884,_0x1dd5dd)>_0x11d981['length'])return[0x0,0x0];let _0x17b512=0x0;for(let _0x359206=0x0;_0x2468ef['KwECD'](_0x359206,_0x1dd5dd);_0x359206++){_0x17b512=_0x2468ef['hsiNE'](_0x17b512*0x100,_0x11d981[_0x992884+_0x359206]);}return[_0x17b512,_0x1dd5dd];}function _0x58b5(_0x240bc2,_0x1eadf1){_0x240bc2=_0x240bc2-0x7f;const _0x4fa734=_0x4fa7();let _0x58b5d7=_0x4fa734[_0x240bc2];return _0x58b5d7;}function readUint(_0x37233d,_0x27a7c5,_0x7d40ce){const _0x56f71d=_0x58b5,_0x301e76={'QqcUs':function(_0xe9eaa0,_0x57bd0f){return _0xe9eaa0<_0x57bd0f;},'XfRav':function(_0x5017b7,_0x3893ee){return _0x5017b7+_0x3893ee;},'HmDMw':function(_0xf87af,_0x21b227){return _0xf87af*_0x21b227;}};let _0x206aa4=0x0;for(let _0x11f0b5=0x0;_0x301e76[_0x56f71d(0xae)](_0x11f0b5,_0x7d40ce);_0x11f0b5++){_0x206aa4=_0x301e76['XfRav'](_0x301e76[_0x56f71d(0xb5)](_0x206aa4,0x100),_0x37233d[_0x27a7c5+_0x11f0b5]);}return _0x206aa4;}function isUnknownSize(_0x586b4f,_0x1d929a){const _0x32860e=_0x58b5,_0x40e1b7={'HGvYf':function(_0x1efd77,_0x1fdbfb){return _0x1efd77===_0x1fdbfb;},'KrfJz':function(_0x264e2a,_0x3b3c18){return _0x264e2a-_0x3b3c18;},'pHybv':function(_0x3e8b91,_0x5ee203){return _0x3e8b91*_0x5ee203;}};return _0x40e1b7[_0x32860e(0xb9)](_0x586b4f,_0x40e1b7['KrfJz'](Math['pow'](0x2,_0x40e1b7[_0x32860e(0xbb)](0x7,_0x1d929a)),0x1));}function writeVint(_0x1854ce,_0x2e816f){const _0x1047e9=_0x58b5,_0x297d4e={'pXXYH':function(_0x41d7c5,_0xfec521){return _0x41d7c5||_0xfec521;},'lLVsl':function(_0x11a34c,_0x2420b7){return _0x11a34c<_0x2420b7;},'cNZEk':function(_0x4af4af,_0x194815){return _0x4af4af*_0x194815;},'lAbRG':function(_0x1d8b8e,_0x2a91b1){return _0x1d8b8e>=_0x2a91b1;},'PoXqd':function(_0x5cb883,_0x11d638){return _0x5cb883/_0x11d638;},'jgRGx':function(_0x71fee3,_0x258a80){return _0x71fee3-_0x258a80;}};let _0x579dfc=_0x297d4e['pXXYH'](_0x2e816f,0x1);while(_0x297d4e[_0x1047e9(0xa0)](Math['pow'](0x2,_0x297d4e['cNZEk'](0x7,_0x579dfc))-0x2,_0x1854ce))_0x579dfc++;const _0x99cf04=Buffer['alloc'](_0x579dfc);for(let _0x231441=_0x579dfc-0x1;_0x297d4e[_0x1047e9(0x92)](_0x231441,0x0);_0x231441--){_0x99cf04[_0x231441]=_0x1854ce&0xff,_0x1854ce=Math['floor'](_0x297d4e['PoXqd'](_0x1854ce,0x100));}return _0x99cf04[0x0]|=0x1<<_0x297d4e['jgRGx'](0x8,_0x579dfc),_0x99cf04;}function writeUint(_0x361a88,_0x53d6a6){const _0x40f359=_0x58b5,_0x5a9e33={'sEJKv':function(_0x118baa,_0x163016){return _0x118baa-_0x163016;},'NSrmV':function(_0x83d8c5,_0x43c43f){return _0x83d8c5>=_0x43c43f;},'GMLBK':function(_0x43adf9,_0x5c7468){return _0x43adf9/_0x5c7468;}},_0x4e63bc=Buffer[_0x40f359(0xa5)](_0x53d6a6);for(let _0x24a38f=_0x5a9e33['sEJKv'](_0x53d6a6,0x1);_0x5a9e33[_0x40f359(0x8c)](_0x24a38f,0x0);_0x24a38f--){_0x4e63bc[_0x24a38f]=_0x361a88&0xff,_0x361a88=Math['floor'](_0x5a9e33['GMLBK'](_0x361a88,0x100));}return _0x4e63bc;}function writeUnknownSizeVint(_0x5b2a99){const _0x3f0d9={'IlfpA':function(_0x584084,_0x2627fe){return _0x584084-_0x2627fe;}},_0x498b52=Buffer['alloc'](_0x5b2a99,0xff);return _0x498b52[0x0]=0xff>>_0x3f0d9['IlfpA'](_0x5b2a99,0x1),_0x498b52;}function uintSize(_0x53d7ba){const _0x211141=_0x58b5,_0x210da6={'lCEcP':function(_0xfa86a8,_0xaca3cf){return _0xfa86a8===_0xaca3cf;},'bjTVr':function(_0xaeeb54,_0x1bbd1c){return _0xaeeb54/_0x1bbd1c;}};if(_0x210da6[_0x211141(0xaa)](_0x53d7ba,0x0))return 0x1;let _0x3abaed=0x0,_0x46c377=_0x53d7ba;while(_0x46c377>0x0){_0x3abaed++,_0x46c377=Math['floor'](_0x210da6['bjTVr'](_0x46c377,0x100));}return _0x3abaed;}function findTimestampScale(_0x495681,_0x17b7c4){const _0x1341df=_0x58b5,_0x3edcb3={'yhbMZ':function(_0xeb432f,_0x2311e1){return _0xeb432f+_0x2311e1;},'scNVa':function(_0x3ed114,_0x493c6f){return _0x3ed114<_0x493c6f;},'RxelO':function(_0x551170,_0x2920c3,_0x2179d7){return _0x551170(_0x2920c3,_0x2179d7);},'JsyEY':function(_0x4466c1,_0x4a55e8){return _0x4466c1===_0x4a55e8;},'JtJIR':function(_0x57a015,_0xce5009){return _0x57a015+_0xce5009;},'hAafe':function(_0x1fc668,_0x430831){return _0x1fc668===_0x430831;},'csJKc':function(_0x3c5e3e,_0x3c180f,_0x583d66){return _0x3c5e3e(_0x3c180f,_0x583d66);},'CJAuV':function(_0x162ff6,_0x50702d){return _0x162ff6+_0x50702d;}};let _0x5c76ee=_0x17b7c4;const _0xcfaae3=Math['min'](_0x495681['length'],_0x3edcb3['yhbMZ'](_0x17b7c4,0x2710));while(_0x3edcb3[_0x1341df(0x99)](_0x5c76ee,_0xcfaae3)){const [_0xc74a67,_0x6655b]=readId(_0x495681,_0x5c76ee),[_0x39333f,_0x178e88]=_0x3edcb3['RxelO'](readVint,_0x495681,_0x3edcb3['yhbMZ'](_0x5c76ee,_0x6655b));if(_0x3edcb3[_0x1341df(0x91)](_0xc74a67,ID_INFO)){let _0x4af613=_0x5c76ee+_0x6655b+_0x178e88;const _0x336aca=_0x3edcb3[_0x1341df(0x90)](_0x4af613,_0x39333f);while(_0x3edcb3['scNVa'](_0x4af613,_0x336aca)){const [_0x2374a7,_0x2ea468]=readId(_0x495681,_0x4af613),[_0x4e460c,_0x3e8a42]=_0x3edcb3['RxelO'](readVint,_0x495681,_0x3edcb3['yhbMZ'](_0x4af613,_0x2ea468));if(_0x3edcb3['JsyEY'](_0x2374a7,ID_TIMESTAMP_SCALE))return readUint(_0x495681,_0x4af613+_0x2ea468+_0x3e8a42,_0x4e460c);_0x4af613+=_0x3edcb3['JtJIR'](_0x3edcb3[_0x1341df(0x90)](_0x2ea468,_0x3e8a42),_0x4e460c);}break;}if(_0x3edcb3['hAafe'](_0xc74a67,ID_CLUSTER))break;if(_0x3edcb3[_0x1341df(0xb1)](isUnknownSize,_0x39333f,_0x178e88))break;_0x5c76ee+=_0x3edcb3[_0x1341df(0x90)](_0x3edcb3[_0x1341df(0xb0)](_0x6655b,_0x178e88),_0x39333f);}return 0xf4240;}function _0x4fa7(){const _0x47c804=['HGvYf','Dujsa','pHybv','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','PiykF','length','argv','747933IXgDqa','qZGJD','jLcUa','from','readInt16BE','header','indexOf','log','MCXNU','5NoBznu','clusters','HFiLA','concat','60042PNssgV','ymFqV','igkRj','NSrmV','BbZZe','has','GQwtx','JtJIR','JsyEY','lAbRG','endsWith','bodyBeforeTimestamp','gBLTz','537932TnTqsW','413ZdpwXJ','1491952eWxNgb','scNVa','Stitched\x20','3155868GQBdsX','42380UUmIEf','bXHWx','1863yuIbuI','oWjdH','lLVsl','DBAWh','ohuHF','bodyAfterTimestamp','fGxvo','alloc','qXbGY','ZVOLb','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','BMTDK','lCEcP','tneCd','12136BIUdUj','Yaezp','QqcUs','uNcse','CJAuV','csJKc','slice','pabFA','stitchWebmFiles.ts','HmDMw','DdQYF','dnASp','bwigm'];_0x4fa7=function(){return _0x47c804;};return _0x4fa7();}function findFirstClusterOffset(_0x503ade,_0x20192d){const _0x4877e4=_0x58b5,_0x30b23f={'Mcwgk':function(_0x558cb5,_0x42666e){return _0x558cb5===_0x42666e;},'uGcCU':function(_0x16c772,_0x3b1ebf,_0x4c66fe){return _0x16c772(_0x3b1ebf,_0x4c66fe);},'jLcUa':function(_0x36246e,_0x2851c5,_0x34d681){return _0x36246e(_0x2851c5,_0x34d681);},'nWEVn':function(_0x4636b2,_0x44d762){return _0x4636b2+_0x44d762;}};let _0x249c3a=_0x20192d;while(_0x249c3a<_0x503ade['length']){const [_0x32122a,_0x1ba723]=readId(_0x503ade,_0x249c3a);if(_0x30b23f['Mcwgk'](_0x32122a,ID_CLUSTER))return _0x249c3a;const [_0x537d7e,_0x5a6bef]=_0x30b23f['uGcCU'](readVint,_0x503ade,_0x249c3a+_0x1ba723);if(_0x30b23f[_0x4877e4(0xc2)](isUnknownSize,_0x537d7e,_0x5a6bef))return _0x249c3a;_0x249c3a+=_0x30b23f['nWEVn'](_0x30b23f['nWEVn'](_0x1ba723,_0x5a6bef),_0x537d7e);}return _0x503ade[_0x4877e4(0xbe)];}function findClusterEnd(_0x4d7f38,_0x7640b5,_0x569b32,_0x5c904b){const _0x1e087b=_0x58b5,_0x113c38={'ymFqV':function(_0x221382,_0x3d2e4c){return _0x221382+_0x3d2e4c;},'QAntq':function(_0x1e0d4f,_0x565745){return _0x1e0d4f-_0x565745;},'JKdVV':function(_0x10fd3a,_0x32e9cc,_0x53b9ed){return _0x10fd3a(_0x32e9cc,_0x53b9ed);}};if(!isUnknownSize(_0x569b32,_0x5c904b))return _0x113c38[_0x1e087b(0x8a)](_0x7640b5,_0x569b32);const _0x13e7d9=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4f8b0e=_0x7640b5;while(_0x4f8b0e<_0x113c38['QAntq'](_0x4d7f38[_0x1e087b(0xbe)],0x4)){const [_0x43ddad,_0x2ccfc2]=readId(_0x4d7f38,_0x4f8b0e);if(_0x13e7d9[_0x1e087b(0x8e)](_0x43ddad))return _0x4f8b0e;const [_0x1b6a18,_0x3b4fc0]=_0x113c38['JKdVV'](readVint,_0x4d7f38,_0x4f8b0e+_0x2ccfc2);if(isUnknownSize(_0x1b6a18,_0x3b4fc0))return _0x4d7f38[_0x1e087b(0xbe)];_0x4f8b0e+=_0x2ccfc2+_0x3b4fc0+_0x1b6a18;}return _0x4d7f38['length'];}function extractClusters(_0xffcd6,_0x2aa02d){const _0x260af1=_0x58b5,_0x50947f={'Dujsa':function(_0x486556,_0x4d8f3c){return _0x486556===_0x4d8f3c;},'vHmQC':function(_0x4efa81,_0x31fbf1){return _0x4efa81!==_0x31fbf1;},'MCXNU':function(_0x4b66aa,_0x1b6c77){return _0x4b66aa+_0x1b6c77;},'ZVOLb':function(_0x4839de,_0x382a80,_0x41532d){return _0x4839de(_0x382a80,_0x41532d);},'IfTba':function(_0x95fe4a,_0x5cb9cc,_0x424475,_0x130370,_0x382460){return _0x95fe4a(_0x5cb9cc,_0x424475,_0x130370,_0x382460);},'TmtNt':function(_0x171f99,_0x17e96a){return _0x171f99+_0x17e96a;},'pabFA':function(_0xaab7ba,_0x2aeb6e){return _0xaab7ba+_0x2aeb6e;},'vgFxM':function(_0x42eeee,_0x340c65){return _0x42eeee<_0x340c65;},'GQwtx':function(_0x167ea5,_0x3d232c,_0x4b415b){return _0x167ea5(_0x3d232c,_0x4b415b);},'bwigm':function(_0x5b9aa7,_0xcac29f){return _0x5b9aa7>=_0xcac29f;},'bXHWx':function(_0xa40c20,_0x5034e4){return _0xa40c20+_0x5034e4;},'ECXMG':function(_0x3193ee,_0x432d89){return _0x3193ee+_0x432d89;},'uCiZi':function(_0x52f220,_0x4217b9){return _0x52f220>_0x4217b9;},'cOpCg':function(_0x25da28,_0x207141){return _0x25da28===_0x207141;}},_0x24a71e=[],_0x13e387=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x423d75=0x0;while(_0x423d75<_0xffcd6['length']){const _0xb45c3=_0xffcd6[_0x260af1(0x82)](_0x13e387,_0x423d75);if(_0x50947f[_0x260af1(0xba)](_0xb45c3,-0x1))break;const [_0x5653e4,_0xd8b7f4]=readId(_0xffcd6,_0xb45c3);if(_0x50947f['vHmQC'](_0x5653e4,ID_CLUSTER)){_0x423d75=_0x50947f[_0x260af1(0x84)](_0xb45c3,0x1);continue;}const [_0x1897ee,_0x9addf4]=_0x50947f[_0x260af1(0xa7)](readVint,_0xffcd6,_0xb45c3+_0xd8b7f4),_0x126117=_0xb45c3+_0xd8b7f4+_0x9addf4,_0x39b11d=_0x50947f['IfTba'](findClusterEnd,_0xffcd6,_0x126117,_0x1897ee,_0x9addf4);let _0x4f127e=_0x126117,_0x3ec65c=0x0,_0x582563=0x2,_0x42e38a=![],_0x3c8f64=Buffer['alloc'](0x0),_0x377656=Buffer['alloc'](0x0);while(_0x4f127e<_0x39b11d){const [_0x2fee3c,_0x5b8865]=_0x50947f[_0x260af1(0xa7)](readId,_0xffcd6,_0x4f127e),[_0x5c89b2,_0x351b94]=readVint(_0xffcd6,_0x4f127e+_0x5b8865);if(_0x2fee3c===ID_TIMESTAMP){_0x3ec65c=readUint(_0xffcd6,_0x50947f['TmtNt'](_0x4f127e,_0x5b8865)+_0x351b94,_0x5c89b2),_0x582563=_0x5c89b2,_0x42e38a=!![],_0x3c8f64=_0xffcd6[_0x260af1(0xb2)](_0x126117,_0x4f127e);const _0x26a871=_0x50947f['pabFA'](_0x4f127e+_0x5b8865+_0x351b94,_0x5c89b2);_0x377656=_0xffcd6[_0x260af1(0xb2)](_0x26a871,_0x39b11d);break;}if(_0x2fee3c===ID_CLUSTER)break;if(_0x50947f[_0x260af1(0xa7)](isUnknownSize,_0x5c89b2,_0x351b94))break;_0x4f127e+=_0x50947f[_0x260af1(0xb3)](_0x50947f[_0x260af1(0xb3)](_0x5b8865,_0x351b94),_0x5c89b2);}!_0x42e38a&&(_0x377656=_0xffcd6['slice'](_0x126117,_0x39b11d));let _0x4ca69c=_0x3ec65c;_0x4f127e=_0x126117;while(_0x50947f['vgFxM'](_0x4f127e,_0x39b11d)){const [_0x3ee838,_0x4129a1]=readId(_0xffcd6,_0x4f127e),[_0x3d8891,_0xf20636]=_0x50947f[_0x260af1(0x8f)](readVint,_0xffcd6,_0x50947f[_0x260af1(0xb3)](_0x4f127e,_0x4129a1));if(_0x3ee838===ID_SIMPLE_BLOCK&&_0x50947f[_0x260af1(0xb8)](_0x3d8891,0x4)){const _0x13972c=_0x50947f[_0x260af1(0x9d)](_0x50947f[_0x260af1(0xb3)](_0x4f127e,_0x4129a1),_0xf20636),[,_0x29eba2]=readVint(_0xffcd6,_0x13972c),_0x46e136=_0xffcd6[_0x260af1(0x80)](_0x50947f['ECXMG'](_0x13972c,_0x29eba2)),_0x201e7e=_0x3ec65c+_0x46e136;if(_0x50947f['uCiZi'](_0x201e7e,_0x4ca69c))_0x4ca69c=_0x201e7e;}if(_0x50947f['cOpCg'](_0x3ee838,ID_CLUSTER))break;if(isUnknownSize(_0x3d8891,_0xf20636))break;_0x4f127e+=_0x50947f[_0x260af1(0xb3)](_0x4129a1,_0xf20636)+_0x3d8891;}_0x24a71e['push']({'timestamp':_0x3ec65c,'maxTicks':_0x4ca69c,'bodyBeforeTimestamp':_0x3c8f64,'bodyAfterTimestamp':_0x377656,'timestampElementSize':_0x582563}),_0x423d75=_0x39b11d;}return _0x24a71e;}function parseWebm(_0x3f2e0b){const _0x204c88=_0x58b5,_0x1e9ed5={'ulePv':function(_0x5d8385,_0x176827,_0x340ca2){return _0x5d8385(_0x176827,_0x340ca2);},'dnASp':function(_0x3e3990,_0x1585ba){return _0x3e3990+_0x1585ba;},'Djwtv':function(_0x36be8c,_0xf77444){return _0x36be8c+_0xf77444;},'DdQYF':function(_0x41246b,_0x1e8117){return _0x41246b+_0x1e8117;},'PTrNn':function(_0x32ca1d,_0x1089de){return _0x32ca1d+_0x1089de;},'qZGJD':function(_0x3d7a20,_0x30bec5,_0x3aaacc){return _0x3d7a20(_0x30bec5,_0x3aaacc);},'vkviR':function(_0x42a431,_0x13b6f1){return _0x42a431>_0x13b6f1;}};let _0x226fd3=0x0;const [,_0x2782f4]=_0x1e9ed5['ulePv'](readId,_0x3f2e0b,_0x226fd3),[_0x5f0241,_0x24bd72]=readVint(_0x3f2e0b,_0x1e9ed5[_0x204c88(0xb7)](_0x226fd3,_0x2782f4));_0x226fd3+=_0x1e9ed5['Djwtv'](_0x1e9ed5[_0x204c88(0xb6)](_0x2782f4,_0x24bd72),_0x5f0241);const [_0x1e35bb,_0x1eae9b]=_0x1e9ed5['ulePv'](readId,_0x3f2e0b,_0x226fd3);if(_0x1e35bb!==ID_SEGMENT)return null;const [,_0x52f047]=readVint(_0x3f2e0b,_0x226fd3+_0x1eae9b),_0x533855=_0x1e9ed5['PTrNn'](_0x226fd3+_0x1eae9b,_0x52f047),_0x3825d6=findTimestampScale(_0x3f2e0b,_0x533855),_0x2f7452=findFirstClusterOffset(_0x3f2e0b,_0x533855),_0x1f84bb=_0x3f2e0b[_0x204c88(0xb2)](0x0,_0x2f7452),_0x3da2b0=_0x1e9ed5[_0x204c88(0xc1)](extractClusters,_0x3f2e0b,_0x3825d6);let _0x3ad2ba=0x0;for(const _0x334a1b of _0x3da2b0){if(_0x1e9ed5['vkviR'](_0x334a1b['maxTicks'],_0x3ad2ba))_0x3ad2ba=_0x334a1b['maxTicks'];}return{'header':_0x1f84bb,'clusters':_0x3da2b0,'timestampScale':_0x3825d6,'maxTimestampTicks':_0x3ad2ba};}function buildCluster(_0x3f878e,_0x3ae18c,_0xd35373){const _0x5ea0b5=_0x58b5,_0x356962={'BMTDK':function(_0xe86ad7,_0x1c0f44){return _0xe86ad7(_0x1c0f44);},'yMkcm':function(_0x21de00,_0x3c9947,_0x52daa9){return _0x21de00(_0x3c9947,_0x52daa9);}},_0x111040=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x388c2f=Math['max'](0x4,_0x356962['BMTDK'](uintSize,_0x3f878e)),_0x15d176=Buffer['concat']([Buffer[_0x5ea0b5(0x7f)]([ID_TIMESTAMP]),_0x356962['BMTDK'](writeVint,_0x388c2f),_0x356962['yMkcm'](writeUint,_0x3f878e,_0x388c2f)]),_0x422440=Buffer['concat']([_0x3ae18c,_0x15d176,_0xd35373]),_0x4f19b6=_0x356962[_0x5ea0b5(0xa9)](writeVint,_0x422440[_0x5ea0b5(0xbe)]);return Buffer['concat']([_0x111040,_0x4f19b6,_0x422440]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x53f71b){const _0x4f05e4=_0x58b5,_0x501c30={'DBAWh':function(_0x265309,_0x6d5c60,_0x5f14f1){return _0x265309(_0x6d5c60,_0x5f14f1);},'ohuHF':function(_0x20e763,_0x2f0200){return _0x20e763(_0x2f0200);},'qXbGY':function(_0x16cbfa,_0x299eb1){return _0x16cbfa+_0x299eb1;},'igkRj':function(_0x7e53e4,_0x38b94c){return _0x7e53e4===_0x38b94c;},'BbZZe':function(_0x5c8a17,_0x5420c9){return _0x5c8a17+_0x5420c9;},'uNcse':function(_0x373bf1,_0x47a12c){return _0x373bf1+_0x47a12c;},'gBLTz':function(_0xa58bc0,_0x1cef53,_0x57f1b3){return _0xa58bc0(_0x1cef53,_0x57f1b3);},'WvKjE':function(_0x268c39,_0x1e60a3,_0x56fa83){return _0x268c39(_0x1e60a3,_0x56fa83);},'AJJkj':function(_0x395212,_0x23a088){return _0x395212!==_0x23a088;}},_0x34dd1a=Buffer[_0x4f05e4(0x7f)](_0x53f71b);let _0x3bf198=0x0;const [,_0x18089e]=readId(_0x34dd1a,_0x3bf198),[_0x120997,_0x574f51]=readVint(_0x34dd1a,_0x3bf198+_0x18089e),_0x3c1a84=_0x3bf198+_0x18089e+_0x574f51+_0x120997,[,_0x478b88]=_0x501c30[_0x4f05e4(0xa1)](readId,_0x34dd1a,_0x3c1a84),[,_0x45a6ee]=readVint(_0x34dd1a,_0x3c1a84+_0x478b88),_0x5873ff=_0x3c1a84+_0x478b88+_0x45a6ee,_0x2ecb47=_0x501c30[_0x4f05e4(0xa2)](writeUnknownSizeVint,_0x45a6ee);_0x2ecb47['copy'](_0x34dd1a,_0x3c1a84+_0x478b88);let _0x514bf3=_0x5873ff;const _0x49616a=Math['min'](_0x34dd1a[_0x4f05e4(0xbe)],_0x501c30['qXbGY'](_0x5873ff,0x2710));while(_0x514bf3<_0x49616a){const [_0x1a3c82,_0x8e1465]=readId(_0x34dd1a,_0x514bf3),[_0xb45857,_0x4a7d42]=_0x501c30['DBAWh'](readVint,_0x34dd1a,_0x514bf3+_0x8e1465);if(_0x501c30[_0x4f05e4(0x8b)](_0x1a3c82,ID_CLUSTER))break;if(isUnknownSize(_0xb45857,_0x4a7d42))break;if(_0x1a3c82===ID_INFO){const _0x40bc76=_0x501c30[_0x4f05e4(0x8d)](_0x501c30[_0x4f05e4(0xaf)](_0x514bf3,_0x8e1465),_0x4a7d42),_0x1e6f95=_0x501c30['qXbGY'](_0x40bc76,_0xb45857),_0x50185e=[];let _0x5700ed=_0x40bc76;while(_0x5700ed<_0x1e6f95){const [_0x5d40f7,_0x5278ee]=_0x501c30[_0x4f05e4(0x95)](readId,_0x34dd1a,_0x5700ed),[_0xdbc505,_0x15314c]=_0x501c30['WvKjE'](readVint,_0x34dd1a,_0x5700ed+_0x5278ee),_0x447bd9=_0x501c30[_0x4f05e4(0x8d)](_0x501c30[_0x4f05e4(0xa6)](_0x5278ee,_0x15314c),_0xdbc505);_0x501c30['AJJkj'](_0x5d40f7,ID_DURATION)&&_0x50185e['push'](_0x34dd1a[_0x4f05e4(0xb2)](_0x5700ed,_0x5700ed+_0x447bd9)),_0x5700ed+=_0x447bd9;}const _0x2cb543=Buffer[_0x4f05e4(0x88)](_0x50185e),_0x13c8e8=Buffer['concat']([_0x34dd1a['slice'](_0x514bf3,_0x514bf3+_0x8e1465),writeVint(_0x2cb543['length'],_0x4a7d42)]);return Buffer[_0x4f05e4(0x88)]([_0x34dd1a['slice'](0x0,_0x514bf3),_0x13c8e8,_0x2cb543,_0x34dd1a[_0x4f05e4(0xb2)](_0x1e6f95)]);}_0x514bf3+=_0x8e1465+_0x4a7d42+_0xb45857;}return _0x34dd1a;}export function stitchWebmFiles(_0x357204,_0x1ada94){const _0x37f490=_0x58b5,_0x112c51={'fGxvo':function(_0x324789,_0xd0b1db){return _0x324789<=_0xd0b1db;},'PiykF':function(_0x139632,_0x5eaf87){return _0x139632(_0x5eaf87);},'oWjdH':function(_0x2f774d,_0x413206){return _0x2f774d===_0x413206;},'ONIiw':function(_0x22bdf9,_0x5e0e71,_0x4688dd){return _0x22bdf9(_0x5e0e71,_0x4688dd);}};if(_0x112c51[_0x37f490(0xa4)](_0x357204['length'],0x1))return![];const _0x344df8=[];for(const _0x24eb77 of _0x357204){const _0x25c8ef=readFileSync(_0x24eb77),_0x5232f8=_0x112c51[_0x37f490(0xbd)](parseWebm,_0x25c8ef);if(!_0x5232f8||_0x112c51[_0x37f490(0x9f)](_0x5232f8[_0x37f490(0x86)][_0x37f490(0xbe)],0x0))return![];_0x344df8['push'](_0x5232f8);}const _0x1e8a9a=_0x344df8[0x0],_0x28ee90=_0x112c51['PiykF'](rebuildHeaderWithoutDuration,_0x1e8a9a[_0x37f490(0x81)]),_0x2b4e53=[_0x28ee90];let _0x596fc7=0x0;for(let _0x11a093=0x0;_0x11a093<_0x344df8[_0x37f490(0xbe)];_0x11a093++){const _0x58ee79=_0x344df8[_0x11a093];for(const _0x44f489 of _0x58ee79[_0x37f490(0x86)]){const _0x2bfe1f=_0x44f489['timestamp']+_0x596fc7;_0x2b4e53['push'](buildCluster(_0x2bfe1f,_0x44f489[_0x37f490(0x94)],_0x44f489[_0x37f490(0xa3)]));}const _0x3eb602=0x1e;_0x596fc7+=_0x58ee79['maxTimestampTicks']+_0x3eb602;}return _0x112c51['ONIiw'](writeFileSync,_0x1ada94,Buffer['concat'](_0x2b4e53)),!![];}if(process[_0x5f060a(0xbf)][0x1]?.[_0x5f060a(0x93)](_0x5f060a(0xb4))||process[_0x5f060a(0xbf)][0x1]?.[_0x5f060a(0x93)]('stitchWebmFiles.js')){const args=process['argv'][_0x5f060a(0xb2)](0x2);args[_0x5f060a(0xbe)]<0x3&&(console['error'](_0x5f060a(0xa8)),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x5f060a(0x9a)+inputs[_0x5f060a(0xbe)]+'\x20files\x20->\x20'+output):console[_0x5f060a(0x83)](_0x5f060a(0xbc));}
|
|
1
|
+
const _0x53e737=_0xe9fa;(function(_0x12978c,_0x498022){const _0x3a5c26=_0xe9fa,_0x1fc973=_0x12978c();while(!![]){try{const _0x2a6be7=-parseInt(_0x3a5c26(0xaf))/0x1+parseInt(_0x3a5c26(0x85))/0x2*(parseInt(_0x3a5c26(0x8f))/0x3)+parseInt(_0x3a5c26(0x7a))/0x4*(-parseInt(_0x3a5c26(0x91))/0x5)+-parseInt(_0x3a5c26(0x95))/0x6+-parseInt(_0x3a5c26(0x96))/0x7*(-parseInt(_0x3a5c26(0x94))/0x8)+-parseInt(_0x3a5c26(0x98))/0x9+parseInt(_0x3a5c26(0x8e))/0xa*(parseInt(_0x3a5c26(0xb6))/0xb);if(_0x2a6be7===_0x498022)break;else _0x1fc973['push'](_0x1fc973['shift']());}catch(_0x595478){_0x1fc973['push'](_0x1fc973['shift']());}}}(_0x1d9a,0xa2484));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(_0x33eedd,_0x4862f2){const _0x1b1adb=_0xe9fa,_0x277162={'akGax':function(_0x23fedd,_0x2aff25){return _0x23fedd<=_0x2aff25;},'tMVpb':function(_0x3dbe3b,_0x4e66d7){return _0x3dbe3b>_0x4e66d7;},'iUMSh':function(_0x159f20,_0x859304){return _0x159f20+_0x859304;},'kVzTS':function(_0x5a4eb2,_0x4cd24a){return _0x5a4eb2&_0x4cd24a;},'WutJc':function(_0x5d48df,_0x59801c){return _0x5d48df-_0x59801c;},'LBpqp':function(_0x3e2949,_0x348abb){return _0x3e2949*_0x348abb;},'YbaAI':function(_0x51f5ba,_0x2db717){return _0x51f5ba+_0x2db717;}};if(_0x4862f2>=_0x33eedd['length'])return[0x0,0x0];const _0x595ea1=_0x33eedd[_0x4862f2];let _0x13214b=0x1,_0xdf7d28=0x80;while(_0x277162['akGax'](_0x13214b,0x8)&&!(_0x595ea1&_0xdf7d28)){_0x13214b++,_0xdf7d28>>=0x1;}if(_0x277162['tMVpb'](_0x277162[_0x1b1adb(0xab)](_0x4862f2,_0x13214b),_0x33eedd['length']))return[0x0,0x0];let _0x4dbaf2=_0x277162[_0x1b1adb(0x89)](_0x595ea1,_0x277162['WutJc'](_0xdf7d28,0x1));for(let _0x22f78e=0x1;_0x22f78e<_0x13214b;_0x22f78e++){_0x4dbaf2=_0x277162['iUMSh'](_0x277162['LBpqp'](_0x4dbaf2,0x100),_0x33eedd[_0x277162['YbaAI'](_0x4862f2,_0x22f78e)]);}return[_0x4dbaf2,_0x13214b];}function readId(_0x1cfcb8,_0x1e86e1){const _0x537fcb=_0xe9fa,_0xbb3a45={'FmPmZ':function(_0x491e32,_0x523fff){return _0x491e32>_0x523fff;},'SyWAD':function(_0x39b75b,_0x5dcac5){return _0x39b75b*_0x5dcac5;},'XJQHv':function(_0x57c019,_0x3e5af9){return _0x57c019+_0x3e5af9;}};if(_0x1e86e1>=_0x1cfcb8[_0x537fcb(0x7c)])return[0x0,0x0];const _0x232da5=_0x1cfcb8[_0x1e86e1];let _0x1489f4;if(_0x232da5>=0x80)_0x1489f4=0x1;else{if(_0x232da5>=0x40)_0x1489f4=0x2;else{if(_0x232da5>=0x20)_0x1489f4=0x3;else{if(_0x232da5>=0x10)_0x1489f4=0x4;else return[_0x232da5,0x1];}}}if(_0xbb3a45['FmPmZ'](_0x1e86e1+_0x1489f4,_0x1cfcb8['length']))return[0x0,0x0];let _0x336e60=0x0;for(let _0x1d3c4e=0x0;_0x1d3c4e<_0x1489f4;_0x1d3c4e++){_0x336e60=_0xbb3a45['SyWAD'](_0x336e60,0x100)+_0x1cfcb8[_0xbb3a45[_0x537fcb(0xb9)](_0x1e86e1,_0x1d3c4e)];}return[_0x336e60,_0x1489f4];}function readUint(_0xbc864,_0x50b2a6,_0x5d2643){const _0x1d7f9a=_0xe9fa,_0x4af1b4={'ivOvC':function(_0xd87607,_0x3784ba){return _0xd87607<_0x3784ba;},'IsnvQ':function(_0x1d15a4,_0x56fe84){return _0x1d15a4+_0x56fe84;},'EPAal':function(_0x5bda1d,_0x11f114){return _0x5bda1d+_0x11f114;}};let _0x3239e6=0x0;for(let _0x4f350e=0x0;_0x4af1b4['ivOvC'](_0x4f350e,_0x5d2643);_0x4f350e++){_0x3239e6=_0x4af1b4['IsnvQ'](_0x3239e6*0x100,_0xbc864[_0x4af1b4[_0x1d7f9a(0x7b)](_0x50b2a6,_0x4f350e)]);}return _0x3239e6;}function isUnknownSize(_0xb35a57,_0x13b074){const _0x26d60a=_0xe9fa,_0x1c8d3b={'RBNOI':function(_0x4e56c5,_0x32e424){return _0x4e56c5===_0x32e424;},'Zmczj':function(_0x22db0d,_0x388cab){return _0x22db0d-_0x388cab;}};return _0x1c8d3b['RBNOI'](_0xb35a57,_0x1c8d3b[_0x26d60a(0xa0)](Math[_0x26d60a(0xaa)](0x2,0x7*_0x13b074),0x1));}function writeVint(_0x1898e6,_0x3c6913){const _0x5e02cc=_0xe9fa,_0x330c05={'zkwSb':function(_0x4bbecf,_0x4884f8){return _0x4bbecf||_0x4884f8;},'jhplC':function(_0x51f628,_0x22f709){return _0x51f628<_0x22f709;},'ARfXR':function(_0x49b40d,_0x19bf9a){return _0x49b40d-_0x19bf9a;},'VuBoo':function(_0x5bd07d,_0x490887){return _0x5bd07d*_0x490887;},'cozrY':function(_0x3cb7c8,_0x2cc77f){return _0x3cb7c8>=_0x2cc77f;},'EYPzy':function(_0x302d1b,_0x4b2b95){return _0x302d1b<<_0x4b2b95;}};let _0x176283=_0x330c05[_0x5e02cc(0x97)](_0x3c6913,0x1);while(_0x330c05[_0x5e02cc(0xbf)](_0x330c05[_0x5e02cc(0xa9)](Math[_0x5e02cc(0xaa)](0x2,_0x330c05['VuBoo'](0x7,_0x176283)),0x2),_0x1898e6))_0x176283++;const _0x3b25fd=Buffer['alloc'](_0x176283);for(let _0x204895=_0x176283-0x1;_0x330c05['cozrY'](_0x204895,0x0);_0x204895--){_0x3b25fd[_0x204895]=_0x1898e6&0xff,_0x1898e6=Math[_0x5e02cc(0x8a)](_0x1898e6/0x100);}return _0x3b25fd[0x0]|=_0x330c05['EYPzy'](0x1,0x8-_0x176283),_0x3b25fd;}function writeUint(_0x47712a,_0x3ac9f5){const _0x1789b2=_0xe9fa,_0x258f2e={'YUZaT':function(_0x1a8265,_0x4060f3){return _0x1a8265>=_0x4060f3;},'Blfcs':function(_0x291d90,_0x527574){return _0x291d90&_0x527574;}},_0x4e37e1=Buffer[_0x1789b2(0xa1)](_0x3ac9f5);for(let _0x31ff6e=_0x3ac9f5-0x1;_0x258f2e['YUZaT'](_0x31ff6e,0x0);_0x31ff6e--){_0x4e37e1[_0x31ff6e]=_0x258f2e[_0x1789b2(0xad)](_0x47712a,0xff),_0x47712a=Math['floor'](_0x47712a/0x100);}return _0x4e37e1;}function writeUnknownSizeVint(_0x525341){const _0xad4af2=_0xe9fa,_0x152bf2={'mQXyb':function(_0x6f53a8,_0x355e58){return _0x6f53a8>>_0x355e58;},'WPuDf':function(_0x1d6723,_0xd211ef){return _0x1d6723-_0xd211ef;}},_0x7407b0=Buffer['alloc'](_0x525341,0xff);return _0x7407b0[0x0]=_0x152bf2[_0xad4af2(0xb8)](0xff,_0x152bf2[_0xad4af2(0xa4)](_0x525341,0x1)),_0x7407b0;}function uintSize(_0x1377e0){const _0x583a65=_0xe9fa,_0x1d7a14={'qhYGh':function(_0x1563d2,_0x5815fb){return _0x1563d2>_0x5815fb;},'gmIHr':function(_0x10fdc8,_0x5b5063){return _0x10fdc8/_0x5b5063;}};if(_0x1377e0===0x0)return 0x1;let _0x31d027=0x0,_0x4d0134=_0x1377e0;while(_0x1d7a14[_0x583a65(0xbb)](_0x4d0134,0x0)){_0x31d027++,_0x4d0134=Math['floor'](_0x1d7a14['gmIHr'](_0x4d0134,0x100));}return _0x31d027;}function findTimestampScale(_0x38d285,_0x571d4c){const _0xb19f2c=_0xe9fa,_0x430391={'XcwLu':function(_0x142851,_0x4b8467){return _0x142851+_0x4b8467;},'wKnkd':function(_0x33c4f4,_0x1130f3,_0x31dc31){return _0x33c4f4(_0x1130f3,_0x31dc31);},'ZQkhn':function(_0x558919,_0x442074,_0x232adb){return _0x558919(_0x442074,_0x232adb);},'YZDvt':function(_0x4dacf7,_0x373040){return _0x4dacf7+_0x373040;},'LNJGc':function(_0x393d41,_0x3f118b){return _0x393d41===_0x3f118b;},'GMsOU':function(_0x4b0e8a,_0x29e732){return _0x4b0e8a<_0x29e732;},'sjMJQ':function(_0x25f493,_0xa164da,_0x1c35e1){return _0x25f493(_0xa164da,_0x1c35e1);},'WPIPA':function(_0x24054a,_0x2dea2d){return _0x24054a+_0x2dea2d;}};let _0x4dba30=_0x571d4c;const _0x1e73ba=Math['min'](_0x38d285['length'],_0x430391['XcwLu'](_0x571d4c,0x2710));while(_0x4dba30<_0x1e73ba){const [_0x497316,_0x16552d]=_0x430391[_0xb19f2c(0x9b)](readId,_0x38d285,_0x4dba30),[_0xda2fa2,_0x1ba1ed]=_0x430391[_0xb19f2c(0x7f)](readVint,_0x38d285,_0x430391['YZDvt'](_0x4dba30,_0x16552d));if(_0x430391['LNJGc'](_0x497316,ID_INFO)){let _0x1f2f7a=_0x430391[_0xb19f2c(0xb0)](_0x4dba30+_0x16552d,_0x1ba1ed);const _0x61a898=_0x1f2f7a+_0xda2fa2;while(_0x430391[_0xb19f2c(0x84)](_0x1f2f7a,_0x61a898)){const [_0x724742,_0xc9416a]=_0x430391[_0xb19f2c(0x9b)](readId,_0x38d285,_0x1f2f7a),[_0x14a51d,_0xaf6037]=_0x430391['sjMJQ'](readVint,_0x38d285,_0x1f2f7a+_0xc9416a);if(_0x724742===ID_TIMESTAMP_SCALE)return readUint(_0x38d285,_0x430391[_0xb19f2c(0xbe)](_0x1f2f7a+_0xc9416a,_0xaf6037),_0x14a51d);_0x1f2f7a+=_0x430391[_0xb19f2c(0xb3)](_0xc9416a,_0xaf6037)+_0x14a51d;}break;}if(_0x497316===ID_CLUSTER)break;if(isUnknownSize(_0xda2fa2,_0x1ba1ed))break;_0x4dba30+=_0x16552d+_0x1ba1ed+_0xda2fa2;}return 0xf4240;}function findFirstClusterOffset(_0x55d9a2,_0x13f225){const _0x18be5f=_0xe9fa,_0x26b129={'JxCnC':function(_0x53e19a,_0x3e2e09){return _0x53e19a<_0x3e2e09;},'wozUM':function(_0x16052d,_0x360aa6,_0x10c0c5){return _0x16052d(_0x360aa6,_0x10c0c5);},'fKkSU':function(_0x3e5225,_0xf12dcc){return _0x3e5225===_0xf12dcc;},'FClLR':function(_0x3b86c4,_0x5cdef7){return _0x3b86c4+_0x5cdef7;}};let _0x4b2dad=_0x13f225;while(_0x26b129[_0x18be5f(0xbc)](_0x4b2dad,_0x55d9a2[_0x18be5f(0x7c)])){const [_0x41f665,_0x12c6fb]=_0x26b129[_0x18be5f(0x81)](readId,_0x55d9a2,_0x4b2dad);if(_0x26b129[_0x18be5f(0x8d)](_0x41f665,ID_CLUSTER))return _0x4b2dad;const [_0x5b8b0c,_0x9d7c04]=readVint(_0x55d9a2,_0x4b2dad+_0x12c6fb);if(isUnknownSize(_0x5b8b0c,_0x9d7c04))return _0x4b2dad;_0x4b2dad+=_0x26b129['FClLR'](_0x12c6fb,_0x9d7c04)+_0x5b8b0c;}return _0x55d9a2[_0x18be5f(0x7c)];}function findClusterEnd(_0x531fbc,_0x3959f3,_0x521379,_0x3d0ff3){const _0x374bfc=_0xe9fa,_0x231f65={'MZavk':function(_0x1d32ad,_0x421f59){return _0x1d32ad+_0x421f59;},'eXlGa':function(_0x1d53b9,_0x302946){return _0x1d53b9<_0x302946;},'sgNDk':function(_0x373cc4,_0x22d00c){return _0x373cc4-_0x22d00c;},'BNACL':function(_0x19435d,_0x52faef,_0x13b901){return _0x19435d(_0x52faef,_0x13b901);},'TjsUn':function(_0x3badfb,_0x1b09c8){return _0x3badfb+_0x1b09c8;}};if(!isUnknownSize(_0x521379,_0x3d0ff3))return _0x231f65['MZavk'](_0x3959f3,_0x521379);const _0x138ad5=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0xa14c25=_0x3959f3;while(_0x231f65['eXlGa'](_0xa14c25,_0x231f65['sgNDk'](_0x531fbc['length'],0x4))){const [_0x7b6d8e,_0x1425b7]=_0x231f65['BNACL'](readId,_0x531fbc,_0xa14c25);if(_0x138ad5[_0x374bfc(0x86)](_0x7b6d8e))return _0xa14c25;const [_0x5a3f80,_0x3d7c89]=readVint(_0x531fbc,_0xa14c25+_0x1425b7);if(isUnknownSize(_0x5a3f80,_0x3d7c89))return _0x531fbc[_0x374bfc(0x7c)];_0xa14c25+=_0x231f65['TjsUn'](_0x1425b7,_0x3d7c89)+_0x5a3f80;}return _0x531fbc['length'];}function extractClusters(_0x4403fa,_0x3f3b33){const _0x156146=_0xe9fa,_0x131020={'KFRek':function(_0x4577b9,_0x4c844b,_0x22ad4f){return _0x4577b9(_0x4c844b,_0x22ad4f);},'WRfjV':function(_0x210a99,_0x3c29fb,_0xf3b69c){return _0x210a99(_0x3c29fb,_0xf3b69c);},'tngKM':function(_0x5b94bc,_0x3292c3){return _0x5b94bc+_0x3292c3;},'MWgJt':function(_0x415668,_0x267921){return _0x415668+_0x267921;},'VQFGe':function(_0x3f0698,_0x34abc4,_0x449229){return _0x3f0698(_0x34abc4,_0x449229);},'EDCky':function(_0x59f0a4,_0x4a165b){return _0x59f0a4+_0x4a165b;},'ZtYjl':function(_0x17f049,_0x2784f6){return _0x17f049===_0x2784f6;},'eOaPE':function(_0xf4aeac,_0x5d3af9){return _0xf4aeac===_0x5d3af9;},'KnEtq':function(_0x153f9d,_0x7010f1,_0x116808){return _0x153f9d(_0x7010f1,_0x116808);},'IIJll':function(_0x3d7009,_0x571a3e){return _0x3d7009+_0x571a3e;},'YzNjc':function(_0x5b7a4e,_0x4a339e){return _0x5b7a4e>_0x4a339e;},'WyzJH':function(_0x58b222,_0x1fa36a,_0x1377b3){return _0x58b222(_0x1fa36a,_0x1377b3);},'IpTPy':function(_0x29e01f,_0x1fc881){return _0x29e01f+_0x1fc881;}},_0x323a44=[],_0x448f24=Buffer[_0x156146(0xae)]([0x1f,0x43,0xb6,0x75]);let _0x29aae0=0x0;while(_0x29aae0<_0x4403fa[_0x156146(0x7c)]){const _0x4a90f1=_0x4403fa['indexOf'](_0x448f24,_0x29aae0);if(_0x4a90f1===-0x1)break;const [_0x2d604d,_0x2fd6b0]=_0x131020[_0x156146(0x9d)](readId,_0x4403fa,_0x4a90f1);if(_0x2d604d!==ID_CLUSTER){_0x29aae0=_0x4a90f1+0x1;continue;}const [_0x2f8a71,_0x787bc3]=_0x131020['WRfjV'](readVint,_0x4403fa,_0x4a90f1+_0x2fd6b0),_0x452f3f=_0x131020['tngKM'](_0x131020['MWgJt'](_0x4a90f1,_0x2fd6b0),_0x787bc3),_0x48aeb8=findClusterEnd(_0x4403fa,_0x452f3f,_0x2f8a71,_0x787bc3);let _0x51e37c=_0x452f3f,_0x21eaf3=0x0,_0x332182=0x2,_0x453794=![],_0x4e4912=Buffer[_0x156146(0xa1)](0x0),_0x19d946=Buffer[_0x156146(0xa1)](0x0);while(_0x51e37c<_0x48aeb8){const [_0xbeb964,_0x1493c8]=_0x131020['VQFGe'](readId,_0x4403fa,_0x51e37c),[_0x1d80c8,_0x40c4ca]=readVint(_0x4403fa,_0x131020['tngKM'](_0x51e37c,_0x1493c8));if(_0xbeb964===ID_TIMESTAMP){_0x21eaf3=readUint(_0x4403fa,_0x131020['EDCky'](_0x51e37c,_0x1493c8)+_0x40c4ca,_0x1d80c8),_0x332182=_0x1d80c8,_0x453794=!![],_0x4e4912=_0x4403fa['slice'](_0x452f3f,_0x51e37c);const _0xf4c263=_0x131020['EDCky'](_0x51e37c+_0x1493c8+_0x40c4ca,_0x1d80c8);_0x19d946=_0x4403fa[_0x156146(0x83)](_0xf4c263,_0x48aeb8);break;}if(_0x131020[_0x156146(0x88)](_0xbeb964,ID_CLUSTER))break;if(_0x131020['VQFGe'](isUnknownSize,_0x1d80c8,_0x40c4ca))break;_0x51e37c+=_0x131020['tngKM'](_0x1493c8+_0x40c4ca,_0x1d80c8);}!_0x453794&&(_0x19d946=_0x4403fa['slice'](_0x452f3f,_0x48aeb8));let _0x137254=_0x21eaf3;_0x51e37c=_0x452f3f;while(_0x51e37c<_0x48aeb8){const [_0x4e9b49,_0x175574]=readId(_0x4403fa,_0x51e37c),[_0x56c056,_0x3f2deb]=readVint(_0x4403fa,_0x51e37c+_0x175574);if(_0x131020[_0x156146(0x9a)](_0x4e9b49,ID_SIMPLE_BLOCK)&&_0x56c056>=0x4){const _0x5e689b=_0x131020[_0x156146(0xa3)](_0x51e37c+_0x175574,_0x3f2deb),[,_0x47fcf5]=_0x131020['KnEtq'](readVint,_0x4403fa,_0x5e689b),_0x1ec3d1=_0x4403fa['readInt16BE'](_0x131020['IIJll'](_0x5e689b,_0x47fcf5)),_0x529d23=_0x131020['EDCky'](_0x21eaf3,_0x1ec3d1);if(_0x131020[_0x156146(0x92)](_0x529d23,_0x137254))_0x137254=_0x529d23;}if(_0x4e9b49===ID_CLUSTER)break;if(_0x131020['WyzJH'](isUnknownSize,_0x56c056,_0x3f2deb))break;_0x51e37c+=_0x131020['IpTPy'](_0x131020[_0x156146(0x9f)](_0x175574,_0x3f2deb),_0x56c056);}_0x323a44[_0x156146(0x80)]({'timestamp':_0x21eaf3,'maxTicks':_0x137254,'bodyBeforeTimestamp':_0x4e4912,'bodyAfterTimestamp':_0x19d946,'timestampElementSize':_0x332182}),_0x29aae0=_0x48aeb8;}return _0x323a44;}function parseWebm(_0x16c38e){const _0x135a34=_0xe9fa,_0x30acb1={'wtRHm':function(_0x3cb851,_0x2668aa,_0x2542ce){return _0x3cb851(_0x2668aa,_0x2542ce);},'dGxdA':function(_0x1b450b,_0x5814d8,_0x1b0138){return _0x1b450b(_0x5814d8,_0x1b0138);},'wnyQW':function(_0x56a8d6,_0x59eb2b){return _0x56a8d6+_0x59eb2b;},'waHDg':function(_0x423a22,_0x59d623){return _0x423a22+_0x59d623;},'KwMTT':function(_0x59f93b,_0x487f1f,_0x3bd691){return _0x59f93b(_0x487f1f,_0x3bd691);}};let _0x3487c0=0x0;const [,_0x59b8d1]=_0x30acb1[_0x135a34(0xa2)](readId,_0x16c38e,_0x3487c0),[_0x3c70fd,_0x32bc05]=_0x30acb1[_0x135a34(0x93)](readVint,_0x16c38e,_0x30acb1['wnyQW'](_0x3487c0,_0x59b8d1));_0x3487c0+=_0x30acb1['waHDg'](_0x59b8d1+_0x32bc05,_0x3c70fd);const [_0x4239a1,_0x32ea69]=readId(_0x16c38e,_0x3487c0);if(_0x4239a1!==ID_SEGMENT)return null;const [,_0x325d5a]=_0x30acb1['KwMTT'](readVint,_0x16c38e,_0x3487c0+_0x32ea69),_0x2e9622=_0x30acb1['wnyQW'](_0x30acb1['waHDg'](_0x3487c0,_0x32ea69),_0x325d5a),_0x1276a4=findTimestampScale(_0x16c38e,_0x2e9622),_0x5a45b6=_0x30acb1['dGxdA'](findFirstClusterOffset,_0x16c38e,_0x2e9622),_0x3abd73=_0x16c38e['slice'](0x0,_0x5a45b6),_0x595147=extractClusters(_0x16c38e,_0x1276a4);let _0x4570c5=0x0;for(const _0x9564ca of _0x595147){if(_0x9564ca[_0x135a34(0x99)]>_0x4570c5)_0x4570c5=_0x9564ca[_0x135a34(0x99)];}return{'header':_0x3abd73,'clusters':_0x595147,'timestampScale':_0x1276a4,'maxTimestampTicks':_0x4570c5};}function buildCluster(_0x2e0278,_0x98917a,_0x1bc83a){const _0x315216=_0xe9fa,_0x348cc3={'fSvre':function(_0x41208a,_0xd0907a){return _0x41208a(_0xd0907a);},'TSqVa':function(_0x8c4e87,_0x4b1cd6){return _0x8c4e87(_0x4b1cd6);}},_0x26b66d=Buffer[_0x315216(0xae)]([0x1f,0x43,0xb6,0x75]),_0x578c44=Math['max'](0x4,_0x348cc3[_0x315216(0xa8)](uintSize,_0x2e0278)),_0x1410cf=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x348cc3[_0x315216(0xbd)](writeVint,_0x578c44),writeUint(_0x2e0278,_0x578c44)]),_0x2c8e11=Buffer[_0x315216(0x7e)]([_0x98917a,_0x1410cf,_0x1bc83a]),_0x96084e=_0x348cc3[_0x315216(0xbd)](writeVint,_0x2c8e11['length']);return Buffer[_0x315216(0x7e)]([_0x26b66d,_0x96084e,_0x2c8e11]);}const ID_DURATION=0x4489;function _0x1d9a(){const _0x33b34b=['kVzTS','floor','dEjEc','enLQY','fKkSU','490tORjaF','119673TUjTOZ','kTszN','5DLdOLD','YzNjc','dGxdA','3005536lWiuvL','105012tYFYpM','14UnlTpl','zkwSb','7866702rxBTuV','maxTicks','eOaPE','wKnkd','wCRir','KFRek','dPKpP','IpTPy','Zmczj','alloc','wtRHm','tngKM','WPuDf','oSyOc','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','rHdfk','fSvre','ARfXR','pow','iUMSh','exit','Blfcs','from','51015fcGnue','YZDvt','copy','endsWith','WPIPA','argv','maxTimestampTicks','165627JQEUpW','ZXtBZ','mQXyb','XJQHv','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','qhYGh','JxCnC','TSqVa','XcwLu','jhplC','4154852iMTsxp','EPAal','length','DrAJW','concat','ZQkhn','push','wozUM','LCqQE','slice','GMsOU','58EOWTxs','has','Stitched\x20','ZtYjl'];_0x1d9a=function(){return _0x33b34b;};return _0x1d9a();}function _0xe9fa(_0x1d6f1b,_0x2f199a){_0x1d6f1b=_0x1d6f1b-0x7a;const _0x1d9a29=_0x1d9a();let _0xe9fa6a=_0x1d9a29[_0x1d6f1b];return _0xe9fa6a;}function rebuildHeaderWithoutDuration(_0x3b3dfe){const _0x1058f2=_0xe9fa,_0x21fb13={'wCRir':function(_0x46398c,_0x57d42d,_0x1a0f20){return _0x46398c(_0x57d42d,_0x1a0f20);},'shQyD':function(_0x5cf929,_0x43258e,_0x36dfee){return _0x5cf929(_0x43258e,_0x36dfee);},'xbVDe':function(_0x3a5eaf,_0x1254e7){return _0x3a5eaf+_0x1254e7;},'rHdfk':function(_0x2243ef,_0x41e448){return _0x2243ef+_0x41e448;},'oSyOc':function(_0xf96579,_0xde847b){return _0xf96579+_0xde847b;},'kTszN':function(_0x350434,_0x177af2,_0x543469){return _0x350434(_0x177af2,_0x543469);},'TgzLu':function(_0x30e7d1,_0x5b30fa){return _0x30e7d1+_0x5b30fa;},'dEjEc':function(_0x4bd3c5,_0x242173){return _0x4bd3c5(_0x242173);},'RAaKe':function(_0x535b18,_0x5bc461){return _0x535b18<_0x5bc461;},'pfTdT':function(_0x1b8f5d,_0x352ee4,_0x5b5787){return _0x1b8f5d(_0x352ee4,_0x5b5787);},'QwRTR':function(_0x869102,_0x5e6eb8,_0x21aa66){return _0x869102(_0x5e6eb8,_0x21aa66);},'eHtji':function(_0x1a8c1d,_0x198b74,_0x18b476){return _0x1a8c1d(_0x198b74,_0x18b476);},'YgIhf':function(_0x207ced,_0x23d206){return _0x207ced===_0x23d206;},'WLrpY':function(_0xcc415c,_0x467130){return _0xcc415c+_0x467130;},'dPKpP':function(_0x2aa800,_0x154856){return _0x2aa800+_0x154856;},'LCqQE':function(_0x46a6e5,_0x25ec17){return _0x46a6e5+_0x25ec17;},'enLQY':function(_0xdd3213,_0x503b5b){return _0xdd3213+_0x503b5b;}},_0x83bd2e=Buffer[_0x1058f2(0xae)](_0x3b3dfe);let _0x37f53b=0x0;const [,_0x3fe832]=_0x21fb13[_0x1058f2(0x9c)](readId,_0x83bd2e,_0x37f53b),[_0x1bb3ba,_0x39f44b]=_0x21fb13['shQyD'](readVint,_0x83bd2e,_0x21fb13['xbVDe'](_0x37f53b,_0x3fe832)),_0x2bddfc=_0x21fb13[_0x1058f2(0xa7)](_0x21fb13[_0x1058f2(0xa5)](_0x37f53b,_0x3fe832)+_0x39f44b,_0x1bb3ba),[,_0xb543e1]=_0x21fb13[_0x1058f2(0x90)](readId,_0x83bd2e,_0x2bddfc),[,_0x389f49]=readVint(_0x83bd2e,_0x21fb13[_0x1058f2(0xa7)](_0x2bddfc,_0xb543e1)),_0x3a233a=_0x21fb13['TgzLu'](_0x2bddfc+_0xb543e1,_0x389f49),_0x15d66c=_0x21fb13[_0x1058f2(0x8b)](writeUnknownSizeVint,_0x389f49);_0x15d66c[_0x1058f2(0xb1)](_0x83bd2e,_0x2bddfc+_0xb543e1);let _0x2580ba=_0x3a233a;const _0x418e1d=Math['min'](_0x83bd2e[_0x1058f2(0x7c)],_0x3a233a+0x2710);while(_0x21fb13['RAaKe'](_0x2580ba,_0x418e1d)){const [_0x146c45,_0x24845e]=_0x21fb13['pfTdT'](readId,_0x83bd2e,_0x2580ba),[_0x32b200,_0x2434d5]=_0x21fb13['QwRTR'](readVint,_0x83bd2e,_0x21fb13[_0x1058f2(0xa5)](_0x2580ba,_0x24845e));if(_0x146c45===ID_CLUSTER)break;if(_0x21fb13['eHtji'](isUnknownSize,_0x32b200,_0x2434d5))break;if(_0x21fb13['YgIhf'](_0x146c45,ID_INFO)){const _0x26caf5=_0x21fb13['WLrpY'](_0x2580ba+_0x24845e,_0x2434d5),_0x25e60d=_0x21fb13[_0x1058f2(0xa5)](_0x26caf5,_0x32b200),_0x217ea2=[];let _0x28b421=_0x26caf5;while(_0x28b421<_0x25e60d){const [_0x4a293e,_0x4f3eb3]=readId(_0x83bd2e,_0x28b421),[_0x4491e0,_0x1ddb41]=readVint(_0x83bd2e,_0x28b421+_0x4f3eb3),_0x33d496=_0x21fb13[_0x1058f2(0x9e)](_0x21fb13['oSyOc'](_0x4f3eb3,_0x1ddb41),_0x4491e0);_0x4a293e!==ID_DURATION&&_0x217ea2['push'](_0x83bd2e['slice'](_0x28b421,_0x21fb13['xbVDe'](_0x28b421,_0x33d496))),_0x28b421+=_0x33d496;}const _0x25342e=Buffer['concat'](_0x217ea2),_0x3270e5=Buffer[_0x1058f2(0x7e)]([_0x83bd2e['slice'](_0x2580ba,_0x21fb13[_0x1058f2(0x9e)](_0x2580ba,_0x24845e)),writeVint(_0x25342e['length'],_0x2434d5)]);return Buffer['concat']([_0x83bd2e[_0x1058f2(0x83)](0x0,_0x2580ba),_0x3270e5,_0x25342e,_0x83bd2e['slice'](_0x25e60d)]);}_0x2580ba+=_0x21fb13[_0x1058f2(0x82)](_0x21fb13[_0x1058f2(0x8c)](_0x24845e,_0x2434d5),_0x32b200);}return _0x83bd2e;}export function stitchWebmFiles(_0xf75f6b,_0x5993dc){const _0x86e3fc=_0xe9fa,_0x1b8c2c={'ZXtBZ':function(_0xc009c4,_0x164ea6){return _0xc009c4<_0x164ea6;},'DrAJW':function(_0x5d17b0,_0x11a1fb,_0xa818a7){return _0x5d17b0(_0x11a1fb,_0xa818a7);}};if(_0xf75f6b['length']<=0x1)return![];const _0x49f9d5=[];for(const _0x56832d of _0xf75f6b){const _0x1403a9=readFileSync(_0x56832d),_0x42fd63=parseWebm(_0x1403a9);if(!_0x42fd63||_0x42fd63['clusters']['length']===0x0)return![];_0x49f9d5[_0x86e3fc(0x80)](_0x42fd63);}const _0x56ee03=_0x49f9d5[0x0],_0x46a92e=rebuildHeaderWithoutDuration(_0x56ee03['header']),_0x4e125b=[_0x46a92e];let _0x55cc13=0x0;for(let _0x39df8d=0x0;_0x1b8c2c[_0x86e3fc(0xb7)](_0x39df8d,_0x49f9d5['length']);_0x39df8d++){const _0x4836bb=_0x49f9d5[_0x39df8d];for(const _0x5581a4 of _0x4836bb['clusters']){const _0x1c6959=_0x5581a4['timestamp']+_0x55cc13;_0x4e125b[_0x86e3fc(0x80)](buildCluster(_0x1c6959,_0x5581a4['bodyBeforeTimestamp'],_0x5581a4['bodyAfterTimestamp']));}const _0x3200bc=0x1e;_0x55cc13+=_0x4836bb[_0x86e3fc(0xb5)]+_0x3200bc;}return _0x1b8c2c[_0x86e3fc(0x7d)](writeFileSync,_0x5993dc,Buffer['concat'](_0x4e125b)),!![];}if(process[_0x53e737(0xb4)][0x1]?.[_0x53e737(0xb2)]('stitchWebmFiles.ts')||process[_0x53e737(0xb4)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process[_0x53e737(0xb4)][_0x53e737(0x83)](0x2);args['length']<0x3&&(console['error'](_0x53e737(0xba)),process[_0x53e737(0xac)](0x1));const output=args[args[_0x53e737(0x7c)]-0x1],inputs=args[_0x53e737(0x83)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x53e737(0x87)+inputs[_0x53e737(0x7c)]+'\x20files\x20->\x20'+output):console['log'](_0x53e737(0xa6));}
|