@ranger-testing/ranger-cli 3.1.1-alpha.b22d278-38 → 3.1.2-alpha.059c7a3-40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3bab42,_0x1de976){const _0x45e4f9=_0x1fe2,_0x4b604c=_0x3bab42();while(!![]){try{const _0x2904cb=-parseInt(_0x45e4f9(0x174))/0x1+-parseInt(_0x45e4f9(0x18a))/0x2+-parseInt(_0x45e4f9(0x18c))/0x3*(-parseInt(_0x45e4f9(0x197))/0x4)+-parseInt(_0x45e4f9(0x185))/0x5*(parseInt(_0x45e4f9(0x18b))/0x6)+parseInt(_0x45e4f9(0x19b))/0x7*(parseInt(_0x45e4f9(0x176))/0x8)+-parseInt(_0x45e4f9(0x172))/0x9*(-parseInt(_0x45e4f9(0x17f))/0xa)+parseInt(_0x45e4f9(0x178))/0xb*(-parseInt(_0x45e4f9(0x182))/0xc);if(_0x2904cb===_0x1de976)break;else _0x4b604c['push'](_0x4b604c['shift']());}catch(_0x499961){_0x4b604c['push'](_0x4b604c['shift']());}}}(_0x39f6,0x5a6a2));import{existsSync}from'fs';import _0x4f0646 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';function _0x1fe2(_0x461060,_0x15d32a){_0x461060=_0x461060-0x16b;const _0x39f6e1=_0x39f6();let _0x1fe2e1=_0x39f6e1[_0x461060];return _0x1fe2e1;}import{readActiveProfileName}from'./activeProfile.js';function _0x39f6(){const _0x1abd65=['EeIWP','174060vncCPq','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','160657JlgLUT','xUiTf','4860808cPomAR','\x20does\x20not\x20exist.','77fYYzzw','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','name','Profile\x20\x22','kNoQC','ElGXS','luRnP','270NklfMW','log','profile','1477524hAvRqG','joEyY','domains','6585cJgShR','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','authPath','settings','KJomY','607632aWtkIR','498UWEzgB','30LxCEHl','QAUMF','resolvedEnv','prompt','aAuVf','CQbCH','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','Cloud\x20profile\x20(recommended)','startPath','string','url','270492JquWGE','RANGER_SESSION_STATE_PATH=','env','envStartPath','7xjnKHf','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','FdqnX','envBaseUrl','baseUrl','environmentKey','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','QpPtY','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'];_0x39f6=function(){return _0x1abd65;};return _0x39f6();}export async function resolveProfileContext(_0x247bca){const _0x9b3141=_0x1fe2,_0x131117={'FKiFA':function(_0xfb50b){return _0xfb50b();},'jBBdR':function(_0xf03329){return _0xf03329();},'gDfzW':function(_0x1cd818,_0x5c4473){return _0x1cd818+_0x5c4473;},'luRnP':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','aZErp':_0x9b3141(0x179),'CQbCH':function(_0x392705,_0xdb5512){return _0x392705(_0xdb5512);},'aAuVf':function(_0x51bd52,_0x2f8693){return _0x51bd52(_0x2f8693);},'vuHjO':function(_0x1d017f,_0x450d33){return _0x1d017f instanceof _0x450d33;},'FdqnX':function(_0x26c1c4,_0x5f14be){return _0x26c1c4===_0x5f14be;},'fqzZr':function(_0x4066ec,_0x1a9bc3){return _0x4066ec+_0x1a9bc3;},'IGrjJ':_0x9b3141(0x170),'joEyY':'source','DlRZx':'Local\x20profile','QAUMF':'local','xUiTf':'cloud','KJomY':function(_0x4badc9,_0x4f60c1){return _0x4badc9(_0x4f60c1);},'QpPtY':function(_0x1b34a2,_0x4ef632,_0x4e6d3f){return _0x1b34a2(_0x4ef632,_0x4e6d3f);},'ElGXS':function(_0x22da39,_0xfa493d){return _0x22da39(_0xfa493d);},'JKQIf':function(_0x2bec29,_0x3606be){return _0x2bec29(_0x3606be);}},_0x5d9886=_0x247bca['profile'];let _0x4d065b=_0x247bca[_0x9b3141(0x181)]??await _0x131117['FKiFA'](readActiveProfileName),_0x740fd2=null;if(!_0x4d065b&&process[_0x9b3141(0x199)]['RANGER_TEST_USERNAME']){const _0x47828d=await resolveAdHocProfile();_0x47828d&&(_0x4d065b=_0x47828d[_0x9b3141(0x17a)],_0x740fd2=_0x47828d['profile']);}if(!_0x4d065b)try{const _0x16253e=await _0x131117['jBBdR'](listCloudProfiles);if(_0x16253e['length']===0x1){const _0x3a2245=_0x16253e[0x0];_0x4d065b=_0x3a2245[_0x9b3141(0x17a)],console[_0x9b3141(0x180)](_0x9b3141(0x16e)+_0x3a2245['name']),console[_0x9b3141(0x180)](_0x9b3141(0x192));}}catch{}if(!_0x4d065b)throw new Error(_0x131117['gDfzW']('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x131117[_0x9b3141(0x17e)])+_0x131117['aZErp']+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x9b3141(0x19d));const _0x3abaff=_0x131117[_0x9b3141(0x191)](getEnvDir,_0x4d065b),_0x551244=existsSync(_0x3abaff);let _0x3df394=_0x740fd2,_0x1385e4=![];if(!_0x3df394)try{_0x3df394=await _0x131117[_0x9b3141(0x190)](fetchCloudProfile,_0x4d065b);if(!_0x3df394)_0x1385e4=!![];}catch(_0x3f143c){_0x131117['vuHjO'](_0x3f143c,ApiError)&&_0x131117['FdqnX'](_0x3f143c['status'],0x194)&&(_0x1385e4=!![]);}if(_0x5d9886&&_0x1385e4&&!_0x551244&&!_0x3df394)throw new Error(_0x131117['fqzZr']('Profile\x20\x22'+_0x5d9886+_0x9b3141(0x173)+_0x131117['IGrjJ'],'`ranger\x20profile\x20add`\x20to\x20create\x20one.'));if(_0x3df394&&_0x551244){let _0xb8a0d7=!![];if(isInteractive()){const {source:_0x5cb0da}=await _0x4f0646[_0x9b3141(0x18f)]([{'type':'list','name':_0x131117[_0x9b3141(0x183)],'message':'Profile\x20\x22'+_0x4d065b+_0x9b3141(0x19c),'choices':[{'name':_0x9b3141(0x193),'value':'cloud'},{'name':_0x131117['DlRZx'],'value':_0x131117[_0x9b3141(0x18d)]}],'default':_0x131117[_0x9b3141(0x175)]}]);_0xb8a0d7=_0x131117[_0x9b3141(0x19e)](_0x5cb0da,'cloud');}if(!_0xb8a0d7)_0x3df394=null;}const _0x56061a=readProfileOverrides(process['cwd'](),_0x4d065b);let _0x5bbbae=null,_0x34a5af,_0x2e4bbe,_0x3d3569,_0x1720fb,_0x1ef511=null,_0xbc9dd4;const _0x4dbc93=expandOverrides(_0x56061a),_0x54a1f8=readUrlEnvVars();if(_0x3df394){_0x5bbbae=_0x3df394;const _0x5895ba=_0x3df394[_0x9b3141(0x188)]??{},_0x2cd0c4=mergeCloudProfileSettings(_0x5895ba,_0x56061a??undefined),_0x32c7b9={..._0x3df394,'settings':_0x2cd0c4};_0x1ef511={'baseUrl':_0x131117[_0x9b3141(0x189)](expandString,_0x5895ba['baseUrl']),'startPath':expandString(_0x5895ba['startPath'])};const _0x24d7a2=await fetchAuthConfig(),_0x5f2244=_0x24d7a2?_0x131117[_0x9b3141(0x16f)](resolveAuthEnvironmentLocally,_0x24d7a2,_0x3df394[_0x9b3141(0x16d)]):null;_0xbc9dd4=_0x5f2244?.['domains']?.[0x0];const _0x29c752=resolveProfileUrl({'flagBaseUrl':_0x247bca[_0x9b3141(0x16c)],'flagStartPath':_0x247bca['startPath'],'envBaseUrl':_0x54a1f8[_0x9b3141(0x16b)],'envStartPath':_0x54a1f8['envStartPath'],'projectOverrides':_0x4dbc93,'cloudSettings':_0x1ef511,'authEnvironmentDomain':_0xbc9dd4}),_0x4cf8c3=process[_0x9b3141(0x199)]['RANGER_SESSION_STATE_PATH'];if(_0x4cf8c3){if(!existsSync(_0x4cf8c3))throw new Error(_0x9b3141(0x198)+_0x4cf8c3+_0x9b3141(0x177));_0x34a5af=_0x4cf8c3,_0x2e4bbe=resolveEnvVars(_0x2cd0c4),_0x3d3569=Boolean(_0x2e4bbe['cdpEndpoint']);}else{const _0x9c7f00=await resolveCloudProfileSession(_0x32c7b9,{'effectiveBaseUrl':_0x29c752['baseUrl']});_0x34a5af=_0x9c7f00[_0x9b3141(0x187)],_0x2e4bbe=_0x131117[_0x9b3141(0x17d)](resolveEnvVars,_0x9c7f00['settings']),_0x3d3569=Boolean(_0x2e4bbe['cdpEndpoint']),_0xbc9dd4=_0x9c7f00[_0x9b3141(0x18e)]?.[_0x9b3141(0x184)]?.[0x0];}}else{if(!_0x551244)throw new Error(_0x9b3141(0x17b)+_0x4d065b+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4d065b);const _0x45ce1b=await _0x131117['JKQIf'](loadSettings,_0x4d065b);_0x2e4bbe=_0x131117['ElGXS'](resolveEnvVars,_0x45ce1b),_0x3d3569=Boolean(_0x2e4bbe['cdpEndpoint']),_0x1720fb=_0x2e4bbe[_0x9b3141(0x16c)];}const _0x38e211=resolveProfileUrl({'flagBaseUrl':_0x247bca['baseUrl'],'flagStartPath':_0x247bca['startPath'],'envBaseUrl':_0x54a1f8['envBaseUrl'],'envStartPath':_0x54a1f8[_0x9b3141(0x19a)],'localSettingsBaseUrl':_0x1720fb,'projectOverrides':_0x4dbc93,'cloudSettings':_0x1ef511,'authEnvironmentDomain':_0xbc9dd4}),_0x29a98a=_0x38e211[_0x9b3141(0x196)]??_0x38e211[_0x9b3141(0x16c)];if(!_0x29a98a&&!_0x3d3569)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x4d065b+_0x9b3141(0x186)+_0x4d065b+'\x20baseUrl\x20<url>');return{'activeProfile':_0x4d065b,'resolvedCloudProfile':_0x5bbbae,'cloudAuthPath':_0x34a5af,'resolvedSettings':_0x2e4bbe,'isCdpMode':_0x3d3569,'url':_0x29a98a,'startPath':_0x38e211['startPath']};}function expandString(_0x341ac6){const _0x5960f9={'hlSKU':function(_0x26ab36,_0x13d1b7){return _0x26ab36!==_0x13d1b7;}};if(_0x5960f9['hlSKU'](typeof _0x341ac6,'string'))return _0x341ac6;return resolveEnvVars(_0x341ac6);}function expandOverrides(_0x188072){const _0x120c15=_0x1fe2,_0x502d9a={'EeIWP':function(_0x54961f,_0x2700c8){return _0x54961f===_0x2700c8;},'mMOlS':_0x120c15(0x195),'kNoQC':function(_0x5aca3c,_0xc11878){return _0x5aca3c(_0xc11878);}};if(!_0x188072)return _0x188072;const _0xa827e6={..._0x188072};return _0x502d9a[_0x120c15(0x171)](typeof _0xa827e6[_0x120c15(0x16c)],'string')&&(_0xa827e6[_0x120c15(0x16c)]=resolveEnvVars(_0xa827e6['baseUrl'])),typeof _0xa827e6['startPath']===_0x502d9a['mMOlS']&&(_0xa827e6[_0x120c15(0x194)]=_0x502d9a[_0x120c15(0x17c)](resolveEnvVars,_0xa827e6[_0x120c15(0x194)])),_0xa827e6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2973d0,_0x29f054){const _0x584250=_0x352d,_0x362c40=_0x2973d0();while(!![]){try{const _0x37464b=parseInt(_0x584250(0x1be))/0x1*(-parseInt(_0x584250(0x1cd))/0x2)+-parseInt(_0x584250(0x1c4))/0x3*(-parseInt(_0x584250(0x1ca))/0x4)+-parseInt(_0x584250(0x1c7))/0x5+-parseInt(_0x584250(0x1c3))/0x6*(-parseInt(_0x584250(0x1c2))/0x7)+parseInt(_0x584250(0x1d4))/0x8*(-parseInt(_0x584250(0x1d2))/0x9)+-parseInt(_0x584250(0x1da))/0xa+parseInt(_0x584250(0x1d7))/0xb*(parseInt(_0x584250(0x1d9))/0xc);if(_0x37464b===_0x29f054)break;else _0x362c40['push'](_0x362c40['shift']());}catch(_0x481550){_0x362c40['push'](_0x362c40['shift']());}}}(_0x33ab,0xbb4bb));function _0x352d(_0x3756d4,_0x2508e6){_0x3756d4=_0x3756d4-0x1bd;const _0x33ab40=_0x33ab();let _0x352d5b=_0x33ab40[_0x3756d4];return _0x352d5b;}function firstDefined(..._0x326127){const _0x4dc182=_0x352d,_0x2db25b={'BvggV':function(_0x229eba,_0x4f8b0d){return _0x229eba!==_0x4f8b0d;},'PnXdW':function(_0x5a78d0,_0x10b1d8){return _0x5a78d0!==_0x10b1d8;}};for(const _0x2b295c of _0x326127){if(_0x2db25b[_0x4dc182(0x1cb)](_0x2b295c,undefined)&&_0x2b295c!==null&&_0x2db25b[_0x4dc182(0x1d0)](_0x2b295c,''))return _0x2b295c;}return undefined;}function normalizeAuthEnvironmentDomain(_0x57d975){const _0x10b8f1=_0x352d;if(!_0x57d975)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x57d975))return _0x57d975;return _0x10b8f1(0x1bf)+_0x57d975;}export function resolveBaseUrl(_0x56b340){const _0x190649=_0x352d,_0x53c78c={'upHsj':function(_0x136c6c,_0x42e237){return _0x136c6c in _0x42e237;},'IUwin':function(_0x49bf3a,_0x305e94){return _0x49bf3a===_0x305e94;},'nCpmj':function(_0x167934,_0x4a34bb){return _0x167934(_0x4a34bb);}},_0x123ead=_0x56b340['projectOverrides'],_0x59e333=!!_0x123ead&&_0x53c78c[_0x190649(0x1c8)](_0x190649(0x1d1),_0x123ead),_0x567d9c=_0x123ead?.[_0x190649(0x1d1)],_0x4b65b5=!(_0x59e333&&_0x53c78c['IUwin'](_0x567d9c,null));return firstDefined(_0x56b340[_0x190649(0x1d5)],_0x56b340[_0x190649(0x1cf)],_0x56b340['localSettingsBaseUrl'],typeof _0x567d9c===_0x190649(0x1db)?_0x567d9c:undefined,_0x4b65b5?_0x56b340['cloudSettings']?.['baseUrl']:undefined,_0x4b65b5?_0x53c78c['nCpmj'](normalizeAuthEnvironmentDomain,_0x56b340['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x582842){const _0x4a4427=_0x352d,_0x4dee34={'lcRWe':function(_0x123cdc,_0x63ec9a){return _0x123cdc in _0x63ec9a;},'vcoEO':function(_0x54f086,_0x3eb74d){return _0x54f086===_0x3eb74d;},'fwKSl':'string'},_0x58e8b5=_0x582842['projectOverrides'],_0x527e73=!!_0x58e8b5&&_0x4dee34[_0x4a4427(0x1d3)](_0x4a4427(0x1c6),_0x58e8b5),_0x7801cd=_0x58e8b5?.[_0x4a4427(0x1c6)],_0xf7f482=!(_0x527e73&&_0x4dee34[_0x4a4427(0x1c0)](_0x7801cd,null));return firstDefined(_0x582842[_0x4a4427(0x1d6)],_0x582842[_0x4a4427(0x1cc)],typeof _0x7801cd===_0x4dee34['fwKSl']?_0x7801cd:undefined,_0xf7f482?_0x582842[_0x4a4427(0x1bd)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x1ef2b2,_0x15f185){const _0xd3b189=_0x352d,_0x2180b9={'gLfyB':function(_0x7df68d,_0x272fdf){return _0x7df68d+_0x272fdf;}};if(!_0x1ef2b2)return undefined;if(!_0x15f185)return _0x1ef2b2;const _0x21e428=_0x1ef2b2['endsWith']('/')?_0x1ef2b2[_0xd3b189(0x1c1)](0x0,-0x1):_0x1ef2b2,_0x251d3a=_0x15f185[_0xd3b189(0x1c5)]('/')?_0x15f185:_0x2180b9['gLfyB']('/',_0x15f185);return _0x2180b9[_0xd3b189(0x1ce)](_0x21e428,_0x251d3a);}export function resolveProfileUrl(_0x49bc40){const _0x105e1d=_0x352d,_0x4bc73e={'nAiSU':function(_0x1d5807,_0xc6a086){return _0x1d5807(_0xc6a086);}},_0x3a435e=_0x4bc73e[_0x105e1d(0x1c9)](resolveBaseUrl,_0x49bc40),_0x16a31b=_0x4bc73e[_0x105e1d(0x1c9)](resolveStartPath,_0x49bc40);return{'baseUrl':_0x3a435e,'startPath':_0x16a31b,'url':joinBaseAndPath(_0x3a435e,_0x16a31b)};}function _0x33ab(){const _0x1f6f0f=['vcoEO','slice','4438056RAdJmy','6zZqpVh','3skXKiP','startsWith','startPath','277425lXgrOc','upHsj','nAiSU','4589804oNLozc','BvggV','envStartPath','55282CKQdmp','gLfyB','envBaseUrl','PnXdW','baseUrl','11156337qlIwgt','lcRWe','8vIqdTH','flagBaseUrl','flagStartPath','17699xfKBCI','RANGER_BASE_URL','12588STpFOJ','6607520BDgjsD','string','cloudSettings','27XekGCE','https://'];_0x33ab=function(){return _0x1f6f0f;};return _0x33ab();}export function readUrlEnvVars(_0x506de2=process['env']){const _0x5f3b65=_0x352d;return{'envBaseUrl':_0x506de2[_0x5f3b65(0x1d8)],'envStartPath':_0x506de2['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5cca(_0x2427ef,_0x490185){_0x2427ef=_0x2427ef-0x99;const _0x5c8c0d=_0x5c8c();let _0x5cca21=_0x5c8c0d[_0x2427ef];return _0x5cca21;}(function(_0x536716,_0x2059d8){const _0x22e98e=_0x5cca,_0x38471d=_0x536716();while(!![]){try{const _0x3cb535=parseInt(_0x22e98e(0xa2))/0x1*(-parseInt(_0x22e98e(0xa9))/0x2)+-parseInt(_0x22e98e(0x9d))/0x3*(-parseInt(_0x22e98e(0x9a))/0x4)+parseInt(_0x22e98e(0xac))/0x5*(-parseInt(_0x22e98e(0xa6))/0x6)+-parseInt(_0x22e98e(0x9e))/0x7+parseInt(_0x22e98e(0xa8))/0x8*(parseInt(_0x22e98e(0xa1))/0x9)+parseInt(_0x22e98e(0xa5))/0xa*(-parseInt(_0x22e98e(0x99))/0xb)+-parseInt(_0x22e98e(0xab))/0xc*(-parseInt(_0x22e98e(0xa0))/0xd);if(_0x3cb535===_0x2059d8)break;else _0x38471d['push'](_0x38471d['shift']());}catch(_0x1837eb){_0x38471d['push'](_0x38471d['shift']());}}}(_0x5c8c,0xed6c1));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x5c8c(){const _0xf10da1=['33489BjIFvC','121621lMcbpu','pcYAq','),\x20retrying\x20in\x20','20OBGLsa','23364CFJqTi','label','1096asZLzo','2OxyKXu','ms...','1740HtXUDY','2290AqBarH','7037305eCxFGn','8zSbXSB','maxRetries','error','1959387KCZaAh','9194857oxHpZO','\x20failed\x20(attempt\x20','327652jqekXY'];_0x5c8c=function(){return _0xf10da1;};return _0x5c8c();}export async function withRetry(_0x233448,_0x46e080){const _0x317299=_0x5cca,_0x2c2946={'XPILA':function(_0x38e14c,_0x269a38){return _0x38e14c(_0x269a38);},'pcYAq':function(_0x119507,_0x3cf63c){return _0x119507<_0x3cf63c;}},_0x4d450d=_0x46e080?.[_0x317299(0x9b)]??DEFAULT_MAX_RETRIES,_0x317fea=_0x46e080?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x3f0db9;for(let _0x1832ba=0x0;_0x1832ba<=_0x4d450d;_0x1832ba++){try{return await _0x233448();}catch(_0x14b2db){_0x3f0db9=_0x14b2db instanceof Error?_0x14b2db:new Error(_0x2c2946['XPILA'](String,_0x14b2db));if(_0x2c2946[_0x317299(0xa3)](_0x1832ba,_0x4d450d)){const _0x3bb509=_0x317fea*Math['pow'](0x2,_0x1832ba);_0x46e080?.[_0x317299(0xa7)]&&console[_0x317299(0x9c)](_0x46e080['label']+_0x317299(0x9f)+(_0x1832ba+0x1)+'/'+(_0x4d450d+0x1)+_0x317299(0xa4)+_0x3bb509+_0x317299(0xaa)),await new Promise(_0x10d78e=>setTimeout(_0x10d78e,_0x3bb509));}}}throw _0x3f0db9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4841bd=_0x1f55;(function(_0x10948e,_0xd652a4){const _0x1ee298=_0x1f55,_0x1dba3c=_0x10948e();while(!![]){try{const _0x37a61b=-parseInt(_0x1ee298(0xef))/0x1*(parseInt(_0x1ee298(0xd4))/0x2)+-parseInt(_0x1ee298(0xf5))/0x3+parseInt(_0x1ee298(0xf4))/0x4*(-parseInt(_0x1ee298(0xf1))/0x5)+-parseInt(_0x1ee298(0xe9))/0x6*(-parseInt(_0x1ee298(0xf6))/0x7)+-parseInt(_0x1ee298(0xd9))/0x8+parseInt(_0x1ee298(0xe0))/0x9*(-parseInt(_0x1ee298(0xd1))/0xa)+-parseInt(_0x1ee298(0xcc))/0xb*(-parseInt(_0x1ee298(0xe3))/0xc);if(_0x37a61b===_0xd652a4)break;else _0x1dba3c['push'](_0x1dba3c['shift']());}catch(_0x4dffee){_0x1dba3c['push'](_0x1dba3c['shift']());}}}(_0x261b,0x7ab45));import*as _0x49ca79 from'fs';import*as _0x5eb65e from'path';function _0x1f55(_0x1d83bf,_0x5ce56){_0x1d83bf=_0x1d83bf-0xbf;const _0x261b6a=_0x261b();let _0x1f5590=_0x261b6a[_0x1d83bf];return _0x1f5590;}import*as _0x1fc079 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x5eb65e[_0x4841bd(0xdf)](_0x1fc079['homedir'](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x15b0e2=_0x4841bd,_0x510d41={'yZBbZ':_0x15b0e2(0xe7),'rkmTw':function(_0x612385){return _0x612385();}};try{if(_0x49ca79[_0x15b0e2(0xea)](CACHE_FILE)){const _0x15d7bb=JSON[_0x15b0e2(0xe6)](_0x49ca79[_0x15b0e2(0xc3)](CACHE_FILE,_0x510d41['yZBbZ']));return{'version':0x3,'sessions':_0x15d7bb['sessions']||{},'branches':_0x15d7bb['branches']||{},'lastEnabledSessionClearedAt':_0x15d7bb[_0x15b0e2(0xdd)]};}}catch{}return _0x510d41[_0x15b0e2(0xbf)](createEmptyCache);}function saveCache(_0x117310){const _0x41c292=_0x4841bd;try{const _0x4c48d3=_0x5eb65e['dirname'](CACHE_FILE);!_0x49ca79['existsSync'](_0x4c48d3)&&_0x49ca79[_0x41c292(0xd8)](_0x4c48d3,{'recursive':!![]}),_0x49ca79[_0x41c292(0xd6)](CACHE_FILE,JSON['stringify'](_0x117310,null,0x2));}catch{}}export function getCurrentBranch(){const _0x5ac976=_0x4841bd,_0x32ee12={'WQLJt':_0x5ac976(0xdb),'eIHKf':'pipe','zzFJU':function(_0x1224cd,_0x2ba455){return _0x1224cd===_0x2ba455;},'AvAsM':_0x5ac976(0xd3)};try{const _0x1313b9=execSync(_0x32ee12[_0x5ac976(0xeb)],{'encoding':'utf-8','stdio':[_0x32ee12[_0x5ac976(0xde)],_0x32ee12[_0x5ac976(0xde)],_0x5ac976(0xce)]})[_0x5ac976(0xc5)]();if(!_0x1313b9||_0x32ee12['zzFJU'](_0x1313b9,_0x32ee12['AvAsM']))return null;return _0x1313b9;}catch{return null;}}export function enableBranch(_0x400a6d){const _0x193a4a=_0x4841bd,_0x1fb944={'JkfGN':function(_0x5687cc,_0x384428){return _0x5687cc(_0x384428);}},_0x3d94e6=loadCache();_0x3d94e6['branches'][_0x400a6d]=!![],_0x1fb944[_0x193a4a(0xd0)](saveCache,_0x3d94e6);}export function disableBranch(_0x342ecc){const _0x12f452=loadCache();delete _0x12f452['branches'][_0x342ecc],saveCache(_0x12f452);}export function isBranchEnabled(_0x2f35c4){const _0x4efb74={'NoMhg':function(_0x1f2120){return _0x1f2120();},'vFkyw':function(_0x4bc1ed,_0x4c8e16){return _0x4bc1ed===_0x4c8e16;}},_0x179cf0=_0x4efb74['NoMhg'](loadCache);return _0x4efb74['vFkyw'](_0x179cf0['branches'][_0x2f35c4],!![]);}function getOrCreateSession(_0x22ff48,_0x533858){return!_0x22ff48['sessions'][_0x533858]&&(_0x22ff48['sessions'][_0x533858]={}),_0x22ff48['sessions'][_0x533858];}export function enableSession(_0x938a51){const _0x12ff30=_0x4841bd,_0x46dba2={'ORYuj':function(_0x1d6723,_0x40f5f8){return _0x1d6723!==_0x40f5f8;}},_0x85fb50=loadCache(),_0x4d6401=getOrCreateSession(_0x85fb50,_0x938a51);_0x4d6401[_0x12ff30(0xc2)]=!![];const _0x258d21=getCurrentBranch();_0x258d21&&_0x46dba2['ORYuj'](_0x258d21,'main')&&_0x258d21!==_0x12ff30(0xcb)&&(_0x85fb50[_0x12ff30(0xed)][_0x258d21]=!![],_0x4d6401[_0x12ff30(0xc1)]=_0x258d21),saveCache(_0x85fb50);}export function isSessionEnabled(_0x578364){const _0x348432=_0x4841bd,_0x148889={'kaiHC':function(_0x36a5f4){return _0x36a5f4();},'ZXeyc':function(_0x3646ba,_0x51ab9d){return _0x3646ba===_0x51ab9d;},'SaMcK':_0x348432(0xf0)},_0x1c4115=_0x148889[_0x348432(0xca)](loadCache),_0x175a0a=getCurrentBranch();if(!_0x175a0a||_0x148889[_0x348432(0xc0)](_0x175a0a,_0x148889['SaMcK'])||_0x175a0a==='master')return _0x1c4115[_0x348432(0xda)][_0x578364]?.['enabled']===!![];const _0x40a319=_0x1c4115['branches'][_0x175a0a]===!![],_0x4c89b6=_0x1c4115[_0x348432(0xda)][_0x578364]?.['enabled']===!![];return _0x40a319||_0x4c89b6;}export function disableSession(_0x10be2c){const _0x3907a0=_0x4841bd,_0x3818a9={'rJHNd':function(_0x55e17a,_0x4bc66a,_0xe9b530){return _0x55e17a(_0x4bc66a,_0xe9b530);},'bcvLK':function(_0x5bf7e8,_0x1b220a){return _0x5bf7e8(_0x1b220a);}},_0x46bcc7=loadCache(),_0x335ff2=_0x3818a9[_0x3907a0(0xcd)](getOrCreateSession,_0x46bcc7,_0x10be2c);_0x335ff2['enabled']=![],_0x3818a9['bcvLK'](saveCache,_0x46bcc7);}export function updateBranchTracking(_0x3f95ec){const _0x3857f5=_0x4841bd,_0x5db091={'VNadH':function(_0x592962){return _0x592962();},'yqMuu':function(_0x44d190){return _0x44d190();},'fKltZ':function(_0x21c4e4,_0x5d8991){return _0x21c4e4===_0x5d8991;},'YdPnL':function(_0x48c9e1,_0x50bfad){return _0x48c9e1(_0x50bfad);}},_0xc77bd2=_0x5db091['VNadH'](loadCache),_0x249a0e=_0xc77bd2['sessions'][_0x3f95ec];if(!_0x249a0e?.[_0x3857f5(0xc2)])return;const _0x39d8e9=_0x5db091[_0x3857f5(0xd2)](getCurrentBranch);if(!_0x39d8e9||_0x5db091[_0x3857f5(0xe1)](_0x39d8e9,_0x3857f5(0xf0))||_0x39d8e9==='master')return;_0x249a0e['currentBranch']!==_0x39d8e9&&(_0xc77bd2['branches'][_0x39d8e9]=!![],_0x249a0e[_0x3857f5(0xc1)]=_0x39d8e9,_0x5db091[_0x3857f5(0xf2)](saveCache,_0xc77bd2));}export function initBranchTracking(_0x3f7544){const _0x382cbc=_0x4841bd,_0x5343af={'FGTBh':function(_0x1ae6bf){return _0x1ae6bf();},'DjBAk':function(_0xfef20c,_0x167cb4){return _0xfef20c===_0x167cb4;},'MTyvz':_0x382cbc(0xf0),'GPVyc':function(_0x23d65b,_0xeaf372,_0xd19105){return _0x23d65b(_0xeaf372,_0xd19105);},'fHAzw':function(_0x7b84d6,_0x3e55fe){return _0x7b84d6(_0x3e55fe);}},_0x5dc29e=_0x5343af['FGTBh'](loadCache),_0x21a7a5=_0x5343af['FGTBh'](getCurrentBranch);if(!_0x21a7a5||_0x5343af[_0x382cbc(0xe4)](_0x21a7a5,_0x5343af['MTyvz'])||_0x5343af[_0x382cbc(0xe4)](_0x21a7a5,'master'))return;if(_0x5dc29e['branches'][_0x21a7a5]===!![]){const _0x99a497=_0x5343af[_0x382cbc(0xee)](getOrCreateSession,_0x5dc29e,_0x3f7544);_0x99a497[_0x382cbc(0xc2)]=!![],_0x99a497['currentBranch']=_0x21a7a5,_0x5343af[_0x382cbc(0xc6)](saveCache,_0x5dc29e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x3e6496){const _0x4bd592=_0x4841bd,_0x1761b4=loadCache(),_0x16daad=_0x1761b4['sessions'][_0x3e6496];_0x16daad?.['enabled']&&(_0x1761b4['lastEnabledSessionClearedAt']=Date[_0x4bd592(0xc4)](),saveCache(_0x1761b4));}export function shouldAutoEnableAfterClear(_0x40a064){const _0x2fb464=_0x4841bd,_0x36acfd={'FKsvL':'clear','xfigr':function(_0x16b7ad){return _0x16b7ad();}};if(_0x40a064!==_0x36acfd[_0x2fb464(0xe8)])return![];const _0x45c2c0=_0x36acfd[_0x2fb464(0xe2)](loadCache),_0x36918f=_0x45c2c0[_0x2fb464(0xdd)];if(!_0x36918f)return![];const _0x1e3166=Date[_0x2fb464(0xc4)]()-_0x36918f;return _0x1e3166<=CLEAR_AUTO_ENABLE_WINDOW_MS;}function _0x261b(){const _0x2cdf78=['7rBtNRW','rkmTw','ZXeyc','currentBranch','enabled','readFileSync','now','trim','fHAzw','arWja','ayXKS','prompted','kaiHC','master','165kWIXQt','rJHNd','pipe','DNStU','JkfGN','5130mipsQk','yqMuu','HEAD','6LdQvdP','RahMG','writeFileSync','featureId','mkdirSync','107312JVRYNX','sessions','git\x20rev-parse\x20--abbrev-ref\x20HEAD','registeredAt','lastEnabledSessionClearedAt','eIHKf','join','5022tJYlLq','fKltZ','xfigr','1336932wVCMuH','DjBAk','hveQx','parse','utf-8','FKsvL','3931428oFTLTu','existsSync','WQLJt','zucvz','branches','GPVyc','137577RafJtx','main','327185eeEtvi','YdPnL','zDVqP','28TflEoX','1960044todXOw'];_0x261b=function(){return _0x2cdf78;};return _0x261b();}export function autoEnableAfterClear(_0x1c3830){const _0x526429=_0x4841bd,_0x11a410={'UAOnJ':function(_0x4fb418){return _0x4fb418();},'zucvz':function(_0x390ae5,_0x62b979){return _0x390ae5!==_0x62b979;},'vmria':'master'},_0x418e6a=loadCache(),_0xe8cbe4=getOrCreateSession(_0x418e6a,_0x1c3830);_0xe8cbe4['enabled']=!![];const _0x26afe6=_0x11a410['UAOnJ'](getCurrentBranch);_0x26afe6&&_0x11a410[_0x526429(0xec)](_0x26afe6,_0x526429(0xf0))&&_0x26afe6!==_0x11a410['vmria']&&(_0xe8cbe4[_0x526429(0xc1)]=_0x26afe6),delete _0x418e6a[_0x526429(0xdd)],saveCache(_0x418e6a);}export function registerSession(_0x482d86,_0x1eaa27){const _0x4b01cd=_0x4841bd,_0x1d8abf={'ayXKS':function(_0x89c4ef){return _0x89c4ef();},'CoErM':function(_0x350cb3,_0x520a31){return _0x350cb3(_0x520a31);}},_0x577338=_0x1d8abf[_0x4b01cd(0xc8)](loadCache),_0x3965f5=getOrCreateSession(_0x577338,_0x482d86);_0x3965f5[_0x4b01cd(0xd7)]=_0x1eaa27,_0x3965f5['registeredAt']=new Date()['toISOString'](),_0x1d8abf['CoErM'](saveCache,_0x577338);}export function getSessionEntry(_0x1c1537){const _0x1d6717=_0x4841bd,_0x31d939=loadCache(),_0x427733=_0x31d939[_0x1d6717(0xda)][_0x1c1537];if(_0x427733?.['featureId']&&_0x427733?.[_0x1d6717(0xdc)])return{'featureId':_0x427733['featureId'],'registeredAt':_0x427733['registeredAt']};return null;}export function unregisterSession(_0x3e9e46){const _0x156375=_0x4841bd,_0x29f3a2=loadCache(),_0x274892=_0x29f3a2[_0x156375(0xda)][_0x3e9e46];_0x274892&&(delete _0x274892[_0x156375(0xd7)],delete _0x274892['registeredAt'],saveCache(_0x29f3a2));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3c479f){const _0x21cdec=_0x4841bd,_0x862f0e={'zDVqP':function(_0x5c8b29){return _0x5c8b29();},'RahMG':function(_0x47f7f8,_0x334182){return _0x47f7f8(_0x334182);}},_0x38cefe=_0x862f0e[_0x21cdec(0xf3)](loadCache),_0x364a5b=getOrCreateSession(_0x38cefe,_0x3c479f),_0xe42d07=_0x364a5b['lastPlanReminderAt']||0x0,_0x275d6=Date[_0x21cdec(0xc4)]();if(_0x275d6-_0xe42d07>=PLAN_REMINDER_INTERVAL_MS)return _0x364a5b['lastPlanReminderAt']=_0x275d6,_0x862f0e[_0x21cdec(0xd5)](saveCache,_0x38cefe),!![];return![];}export function shouldShowStopReminder(_0x5414cb){const _0x45a664=_0x4841bd,_0x395833={'arWja':function(_0x398107,_0x1eae8d){return _0x398107-_0x1eae8d;},'cwVAh':function(_0x51caa1,_0x362bde){return _0x51caa1(_0x362bde);}},_0x5ecf41=loadCache(),_0x319978=getOrCreateSession(_0x5ecf41,_0x5414cb),_0xa63a81=_0x319978['lastStopReminderAt']||0x0,_0x3391e4=Date['now']();if(_0x395833[_0x45a664(0xc7)](_0x3391e4,_0xa63a81)>=STOP_REMINDER_INTERVAL_MS)return _0x319978['lastStopReminderAt']=_0x3391e4,_0x395833['cwVAh'](saveCache,_0x5ecf41),!![];return![];}export function hasSessionBeenPrompted(_0x50857a){const _0x32a2ff=_0x4841bd,_0x414d45={'hveQx':function(_0x1c98d9){return _0x1c98d9();}},_0xffcedd=_0x414d45[_0x32a2ff(0xe5)](loadCache);return _0xffcedd['sessions'][_0x50857a]?.[_0x32a2ff(0xc9)]===!![];}export function markSessionPrompted(_0x9e4865){const _0x1ab042=_0x4841bd,_0x42506b={'DNStU':function(_0x4b2d73,_0x37aebe){return _0x4b2d73(_0x37aebe);}},_0x3fa3bc=loadCache(),_0x2e0e48=getOrCreateSession(_0x3fa3bc,_0x9e4865);_0x2e0e48['prompted']=!![],_0x42506b[_0x1ab042(0xcf)](saveCache,_0x3fa3bc);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x1847b2=_0x4723;(function(_0x18e435,_0x4d4c64){const _0x1fb6b6=_0x4723,_0x4a20bd=_0x18e435();while(!![]){try{const _0x16687b=parseInt(_0x1fb6b6(0xda))/0x1+-parseInt(_0x1fb6b6(0xb2))/0x2+parseInt(_0x1fb6b6(0xad))/0x3*(parseInt(_0x1fb6b6(0xb3))/0x4)+-parseInt(_0x1fb6b6(0xb4))/0x5*(-parseInt(_0x1fb6b6(0xbe))/0x6)+-parseInt(_0x1fb6b6(0xcb))/0x7+parseInt(_0x1fb6b6(0xdc))/0x8+-parseInt(_0x1fb6b6(0xd7))/0x9;if(_0x16687b===_0x4d4c64)break;else _0x4a20bd['push'](_0x4a20bd['shift']());}catch(_0x2d8002){_0x4a20bd['push'](_0x4a20bd['shift']());}}}(_0x487a,0x436c6));import*as _0x1a8a80 from'fs';import*as _0x281bda from'path';import*as _0x28838d from'os';import{execSync}from'child_process';function _0x4723(_0x401d77,_0x2a3b0b){_0x401d77=_0x401d77-0xad;const _0x487acc=_0x487a();let _0x47239f=_0x487acc[_0x401d77];return _0x47239f;}const CACHE_FILE=_0x281bda['join'](_0x28838d[_0x1847b2(0xbc)](),'.claude',_0x1847b2(0xb0));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x31b541=_0x1847b2;try{if(_0x1a8a80['existsSync'](CACHE_FILE)){const _0x1f2b6f=JSON[_0x31b541(0xc4)](_0x1a8a80['readFileSync'](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x1f2b6f['sessions']||{},'branches':_0x1f2b6f[_0x31b541(0xc6)]||{},'lastEnabledSessionClearedAt':_0x1f2b6f['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x3b1fbf){const _0x5cc8b3=_0x1847b2;try{const _0x56707f=_0x281bda[_0x5cc8b3(0xb6)](CACHE_FILE);!_0x1a8a80[_0x5cc8b3(0xc7)](_0x56707f)&&_0x1a8a80['mkdirSync'](_0x56707f,{'recursive':!![]}),_0x1a8a80[_0x5cc8b3(0xcc)](CACHE_FILE,JSON['stringify'](_0x3b1fbf,null,0x2));}catch{}}export function getCurrentBranch(){const _0x42398b=_0x1847b2,_0x4faafb={'BaBQd':function(_0x2fb1eb,_0x1081d6,_0x3ab773){return _0x2fb1eb(_0x1081d6,_0x3ab773);},'wUDYO':_0x42398b(0xc2),'buokn':_0x42398b(0xd8)};try{const _0xe4bc59=_0x4faafb[_0x42398b(0xb5)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x42398b(0xd1),'stdio':[_0x4faafb[_0x42398b(0xaf)],'pipe','pipe']})[_0x42398b(0xd3)]();if(!_0xe4bc59||_0xe4bc59===_0x4faafb[_0x42398b(0xae)])return null;return _0xe4bc59;}catch{return null;}}export function enableBranch(_0x2c7981){const _0x4b22e1=loadCache();_0x4b22e1['branches'][_0x2c7981]=!![],saveCache(_0x4b22e1);}function _0x487a(){const _0x1e322a=['6841053DNtGXL','HEAD','pHVRV','90620LdSEFM','lastStopReminderAt','482872FCpQoY','now','GOflp','5550Ursldp','buokn','wUDYO','.ranger_cache.json','odsUU','1066WNJhVA','988qOOVLL','1510sugoMU','BaBQd','dirname','registeredAt','prompted','xKcBu','GheuP','qkkPb','homedir','enabled','9690urFVCp','lastEnabledSessionClearedAt','CyRuM','QANnh','pipe','featureId','parse','toISOString','branches','existsSync','DLKtK','qnWqg','Viinr','411901FwQcnO','writeFileSync','RlPqy','kVVAZ','sessions','currentBranch','utf-8','SRzXr','trim','master','gWAKm','main'];_0x487a=function(){return _0x1e322a;};return _0x487a();}export function disableBranch(_0x1b0c53){const _0x50bf30=_0x1847b2,_0x5323a8={'nsAnQ':function(_0x1536fd){return _0x1536fd();}},_0x2ee9e0=_0x5323a8['nsAnQ'](loadCache);delete _0x2ee9e0[_0x50bf30(0xc6)][_0x1b0c53],saveCache(_0x2ee9e0);}export function isBranchEnabled(_0x4afe98){const _0x54a895=_0x1847b2,_0x12bc30={'kVVAZ':function(_0x2d4573){return _0x2d4573();},'qnWqg':function(_0x176692,_0x1a96e5){return _0x176692===_0x1a96e5;}},_0x908241=_0x12bc30[_0x54a895(0xce)](loadCache);return _0x12bc30[_0x54a895(0xc9)](_0x908241['branches'][_0x4afe98],!![]);}function getOrCreateSession(_0x300b74,_0xcc92fe){const _0x1b9d25=_0x1847b2;return!_0x300b74['sessions'][_0xcc92fe]&&(_0x300b74[_0x1b9d25(0xcf)][_0xcc92fe]={}),_0x300b74['sessions'][_0xcc92fe];}export function enableSession(_0x54c810){const _0x4ff6c4=_0x1847b2,_0x936cc3={'XtDas':function(_0x48817d){return _0x48817d();},'iJWAX':function(_0x277d3f,_0xe67644,_0x92c25f){return _0x277d3f(_0xe67644,_0x92c25f);},'ayrlb':function(_0x57355f,_0x23be5a){return _0x57355f!==_0x23be5a;},'SwIeZ':'main'},_0x42a3a0=_0x936cc3['XtDas'](loadCache),_0x2a45d8=_0x936cc3['iJWAX'](getOrCreateSession,_0x42a3a0,_0x54c810);_0x2a45d8[_0x4ff6c4(0xbd)]=!![];const _0x35586a=getCurrentBranch();_0x35586a&&_0x936cc3['ayrlb'](_0x35586a,_0x936cc3['SwIeZ'])&&_0x35586a!=='master'&&(_0x42a3a0[_0x4ff6c4(0xc6)][_0x35586a]=!![],_0x2a45d8[_0x4ff6c4(0xd0)]=_0x35586a),saveCache(_0x42a3a0);}export function isSessionEnabled(_0xf86ce0){const _0x547795=_0x1847b2,_0x3776e1={'Viinr':function(_0x5f4b45,_0x35c9bb){return _0x5f4b45===_0x35c9bb;},'lKlGb':function(_0x16236c,_0x3d3fba){return _0x16236c||_0x3d3fba;}},_0x46f546=loadCache(),_0x29ebc9=getCurrentBranch();if(!_0x29ebc9||_0x3776e1['Viinr'](_0x29ebc9,'main')||_0x29ebc9==='master')return _0x3776e1['Viinr'](_0x46f546['sessions'][_0xf86ce0]?.[_0x547795(0xbd)],!![]);const _0x45623a=_0x3776e1[_0x547795(0xca)](_0x46f546['branches'][_0x29ebc9],!![]),_0x14de21=_0x46f546[_0x547795(0xcf)][_0xf86ce0]?.[_0x547795(0xbd)]===!![];return _0x3776e1['lKlGb'](_0x45623a,_0x14de21);}export function disableSession(_0x52dfb9){const _0x352f7b=_0x1847b2,_0x33d828={'RlPqy':function(_0x17066a){return _0x17066a();}},_0xf72eb0=_0x33d828[_0x352f7b(0xcd)](loadCache),_0x1448f5=getOrCreateSession(_0xf72eb0,_0x52dfb9);_0x1448f5[_0x352f7b(0xbd)]=![],saveCache(_0xf72eb0);}export function updateBranchTracking(_0x4decb6){const _0x2680f6=_0x1847b2,_0x18b564={'hkCfT':function(_0x4b5867){return _0x4b5867();},'pXQiM':function(_0x1b8770,_0x1af38d){return _0x1b8770===_0x1af38d;},'ccwir':function(_0x3d5746,_0x1e5a09){return _0x3d5746!==_0x1e5a09;}},_0x13189d=_0x18b564['hkCfT'](loadCache),_0x5d36d8=_0x13189d[_0x2680f6(0xcf)][_0x4decb6];if(!_0x5d36d8?.['enabled'])return;const _0x3faccf=getCurrentBranch();if(!_0x3faccf||_0x18b564['pXQiM'](_0x3faccf,'main')||_0x3faccf==='master')return;_0x18b564['ccwir'](_0x5d36d8['currentBranch'],_0x3faccf)&&(_0x13189d['branches'][_0x3faccf]=!![],_0x5d36d8['currentBranch']=_0x3faccf,saveCache(_0x13189d));}export function initBranchTracking(_0x48024f){const _0x354e9f=_0x1847b2,_0xfc81f7={'pHVRV':function(_0x2d11f5){return _0x2d11f5();},'GOflp':function(_0x547f2c,_0x13cf7c){return _0x547f2c===_0x13cf7c;},'GheuP':_0x354e9f(0xd4)},_0x14c902=loadCache(),_0x5946f2=_0xfc81f7[_0x354e9f(0xd9)](getCurrentBranch);if(!_0x5946f2||_0x5946f2===_0x354e9f(0xd6)||_0xfc81f7[_0x354e9f(0xde)](_0x5946f2,_0xfc81f7[_0x354e9f(0xba)]))return;if(_0x14c902['branches'][_0x5946f2]===!![]){const _0x16b004=getOrCreateSession(_0x14c902,_0x48024f);_0x16b004['enabled']=!![],_0x16b004['currentBranch']=_0x5946f2,saveCache(_0x14c902);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x267e8b){const _0x3d0811=_0x1847b2,_0x20bdf3={'odsUU':function(_0x4cd673){return _0x4cd673();}},_0x410490=_0x20bdf3[_0x3d0811(0xb1)](loadCache),_0x189617=_0x410490['sessions'][_0x267e8b];_0x189617?.['enabled']&&(_0x410490['lastEnabledSessionClearedAt']=Date[_0x3d0811(0xdd)](),saveCache(_0x410490));}export function shouldAutoEnableAfterClear(_0x1a0f8d){const _0x45538b=_0x1847b2,_0x2549be={'DLKtK':'clear','gGuoQ':function(_0x1c0e4b,_0x3b9072){return _0x1c0e4b<=_0x3b9072;}};if(_0x1a0f8d!==_0x2549be[_0x45538b(0xc8)])return![];const _0x2db194=loadCache(),_0x37a468=_0x2db194['lastEnabledSessionClearedAt'];if(!_0x37a468)return![];const _0x364852=Date[_0x45538b(0xdd)]()-_0x37a468;return _0x2549be['gGuoQ'](_0x364852,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0xccda33){const _0x58a0ae=_0x1847b2,_0x4de94d={'QANnh':function(_0x4e092c){return _0x4e092c();},'CyRuM':_0x58a0ae(0xd6),'CBuXt':function(_0x19bc07,_0xf7796f){return _0x19bc07!==_0xf7796f;}},_0x11ce5c=_0x4de94d[_0x58a0ae(0xc1)](loadCache),_0x1dcb38=getOrCreateSession(_0x11ce5c,_0xccda33);_0x1dcb38['enabled']=!![];const _0x9b564d=getCurrentBranch();_0x9b564d&&_0x9b564d!==_0x4de94d[_0x58a0ae(0xc0)]&&_0x4de94d['CBuXt'](_0x9b564d,_0x58a0ae(0xd4))&&(_0x1dcb38['currentBranch']=_0x9b564d),delete _0x11ce5c[_0x58a0ae(0xbf)],saveCache(_0x11ce5c);}export function registerSession(_0x5a90d5,_0xb9358f){const _0x150ebc=_0x1847b2,_0x118d36={'ISvMf':function(_0x4f6960,_0x59dda2,_0x4a8102){return _0x4f6960(_0x59dda2,_0x4a8102);},'tvVFW':function(_0xfd15c4,_0xc617be){return _0xfd15c4(_0xc617be);}},_0x668934=loadCache(),_0x2567cb=_0x118d36['ISvMf'](getOrCreateSession,_0x668934,_0x5a90d5);_0x2567cb['featureId']=_0xb9358f,_0x2567cb[_0x150ebc(0xb7)]=new Date()[_0x150ebc(0xc5)](),_0x118d36['tvVFW'](saveCache,_0x668934);}export function getSessionEntry(_0x1c7b89){const _0x59aa77=_0x1847b2,_0x545464=loadCache(),_0x3d9269=_0x545464['sessions'][_0x1c7b89];if(_0x3d9269?.[_0x59aa77(0xc3)]&&_0x3d9269?.['registeredAt'])return{'featureId':_0x3d9269['featureId'],'registeredAt':_0x3d9269['registeredAt']};return null;}export function unregisterSession(_0x8dd1ae){const _0x54cde6=_0x1847b2,_0x14145e={'qkkPb':function(_0x124375){return _0x124375();}},_0x136887=_0x14145e[_0x54cde6(0xbb)](loadCache),_0x27b5ad=_0x136887['sessions'][_0x8dd1ae];_0x27b5ad&&(delete _0x27b5ad['featureId'],delete _0x27b5ad['registeredAt'],saveCache(_0x136887));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1d7c03){const _0x158ca4=_0x1847b2,_0x426fbe={'HEKVc':function(_0x22036a){return _0x22036a();},'KljsW':function(_0x51f719,_0x573b59,_0x25172d){return _0x51f719(_0x573b59,_0x25172d);},'SRzXr':function(_0x2d0a5d,_0x8746ae){return _0x2d0a5d>=_0x8746ae;},'xKcBu':function(_0x8a78aa,_0x11c136){return _0x8a78aa-_0x11c136;},'TtxCr':function(_0x218cb6,_0xb3c968){return _0x218cb6(_0xb3c968);}},_0x52d096=_0x426fbe['HEKVc'](loadCache),_0x48f731=_0x426fbe['KljsW'](getOrCreateSession,_0x52d096,_0x1d7c03),_0x277896=_0x48f731['lastPlanReminderAt']||0x0,_0x446c47=Date[_0x158ca4(0xdd)]();if(_0x426fbe[_0x158ca4(0xd2)](_0x426fbe[_0x158ca4(0xb9)](_0x446c47,_0x277896),PLAN_REMINDER_INTERVAL_MS))return _0x48f731['lastPlanReminderAt']=_0x446c47,_0x426fbe['TtxCr'](saveCache,_0x52d096),!![];return![];}export function shouldShowStopReminder(_0x580f98){const _0x5c16cf=_0x1847b2,_0x30cd6c={'LHzQt':function(_0x10104e){return _0x10104e();},'YBdsI':function(_0x3a0231,_0x9e05e){return _0x3a0231-_0x9e05e;},'wwREv':function(_0x278092,_0x33d2a0){return _0x278092(_0x33d2a0);}},_0x560c06=_0x30cd6c['LHzQt'](loadCache),_0x9ea201=getOrCreateSession(_0x560c06,_0x580f98),_0x491360=_0x9ea201[_0x5c16cf(0xdb)]||0x0,_0x635b9f=Date[_0x5c16cf(0xdd)]();if(_0x30cd6c['YBdsI'](_0x635b9f,_0x491360)>=STOP_REMINDER_INTERVAL_MS)return _0x9ea201[_0x5c16cf(0xdb)]=_0x635b9f,_0x30cd6c['wwREv'](saveCache,_0x560c06),!![];return![];}export function hasSessionBeenPrompted(_0x14b484){const _0x422904=_0x1847b2,_0x455e75={'sTiTS':function(_0x49f33e,_0x4b2627){return _0x49f33e===_0x4b2627;}},_0x6062fc=loadCache();return _0x455e75['sTiTS'](_0x6062fc['sessions'][_0x14b484]?.[_0x422904(0xb8)],!![]);}export function markSessionPrompted(_0x263c58){const _0x20acc8=_0x1847b2,_0x3ce4ef={'Nijlv':function(_0x370697){return _0x370697();},'gWAKm':function(_0x5bf789,_0x11e529,_0x4a20ac){return _0x5bf789(_0x11e529,_0x4a20ac);}},_0x5798ca=_0x3ce4ef['Nijlv'](loadCache),_0x3a52da=_0x3ce4ef[_0x20acc8(0xd5)](getOrCreateSession,_0x5798ca,_0x263c58);_0x3a52da[_0x20acc8(0xb8)]=!![],saveCache(_0x5798ca);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5ebd86=_0x38c9;(function(_0x5ccb95,_0x7363ae){const _0x2e030d=_0x38c9,_0x5a758c=_0x5ccb95();while(!![]){try{const _0x1c713c=parseInt(_0x2e030d(0x216))/0x1*(parseInt(_0x2e030d(0x207))/0x2)+-parseInt(_0x2e030d(0x215))/0x3+parseInt(_0x2e030d(0x201))/0x4+-parseInt(_0x2e030d(0x1b6))/0x5+-parseInt(_0x2e030d(0x1d4))/0x6*(parseInt(_0x2e030d(0x230))/0x7)+parseInt(_0x2e030d(0x214))/0x8*(-parseInt(_0x2e030d(0x1c2))/0x9)+-parseInt(_0x2e030d(0x22a))/0xa*(-parseInt(_0x2e030d(0x209))/0xb);if(_0x1c713c===_0x7363ae)break;else _0x5a758c['push'](_0x5a758c['shift']());}catch(_0x4b8100){_0x5a758c['push'](_0x5a758c['shift']());}}}(_0x167e,0xa75e2));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(_0x11d910,_0x389d06){const _0x1b2924=_0x38c9,_0x3c0893={'egSJz':function(_0x591a5d,_0x2a71b5,_0x280091,_0x5ceabb){return _0x591a5d(_0x2a71b5,_0x280091,_0x5ceabb);},'nlmuA':_0x1b2924(0x20c),'dFtRu':function(_0x15ccc4,_0x3b8459,_0x83005){return _0x15ccc4(_0x3b8459,_0x83005);},'SgcGK':function(_0x4aefb4,_0x43e79d){return _0x4aefb4(_0x43e79d);},'JvRto':function(_0x1c44cc,_0x3d0312){return _0x1c44cc(_0x3d0312);},'tXsyZ':function(_0x266860,_0x50bc9d){return _0x266860!==_0x50bc9d;}},_0x5f0cd5=join(_0x389d06,'ci',_0x11d910),_0x251814=_0x3c0893[_0x1b2924(0x1e8)](join,_0x389d06,_0x3c0893[_0x1b2924(0x1ef)],_0x11d910),_0x2a42f9=_0x3c0893[_0x1b2924(0x1f1)](join,_0x389d06,_0x11d910),_0x2e995a=join(_0x389d06,'local'),_0x1cb43b=_0x3c0893['dFtRu'](join,_0x389d06,'ci');if(existsSync(_0x5f0cd5))return _0x5f0cd5;if(_0x3c0893['SgcGK'](existsSync,_0x251814))return _0x251814;if(_0x3c0893[_0x1b2924(0x205)](existsSync,_0x2a42f9)&&(_0x2a42f9!==_0x2e995a&&_0x3c0893[_0x1b2924(0x1dd)](_0x2a42f9,_0x1cb43b)?!![]:_0x3c0893['JvRto'](hasLegacyProfileFiles,_0x2a42f9)))return _0x2a42f9;return null;}export function getEnvDir(_0xe83d48,_0x408ec5={}){const _0x21e947=_0x38c9,_0x4a949d={'XkPKp':function(_0x55fc70,_0x5d42d8,_0x355b0a){return _0x55fc70(_0x5d42d8,_0x355b0a);},'ZQbCp':function(_0x59cf29,_0x452e35){return _0x59cf29(_0x452e35);},'Daljm':function(_0x4932ec,_0x2313f8,_0x17bb0a){return _0x4932ec(_0x2313f8,_0x17bb0a);},'wdNWz':function(_0x30ced6,_0x3a15d6,_0x1436b8){return _0x30ced6(_0x3a15d6,_0x1436b8);}},_0x1c38f5=getRangerDir(),_0x32a98c=_0x4a949d['XkPKp'](findEnvInRoot,_0xe83d48,_0x1c38f5);if(_0x32a98c){if(_0x408ec5['forWrite']&&_0x4a949d['ZQbCp'](isLegacyEnvPath,_0x32a98c))throw legacyWriteError(_0xe83d48,_0x32a98c);return _0x32a98c;}const _0xf93737=getRangerHomeDir();if(_0xf93737!==_0x1c38f5){const _0x3ebfa6=_0x4a949d['Daljm'](findEnvInRoot,_0xe83d48,_0xf93737);if(_0x3ebfa6){if(_0x408ec5['forWrite']&&isLegacyEnvPath(_0x3ebfa6))throw _0x4a949d['XkPKp'](legacyWriteError,_0xe83d48,_0x3ebfa6);return _0x3ebfa6;}}const _0x20be90=join(_0xf93737,'local',_0xe83d48);if(_0x408ec5['forWrite'])throw _0x4a949d[_0x21e947(0x1d5)](legacyWriteError,_0xe83d48,_0x20be90);return _0x20be90;}function isLegacyEnvPath(_0x517029){const _0x2cde70=_0x38c9,_0x405144={'MQKXI':function(_0x2eb190){return _0x2eb190();}},_0x4f6788=_0x405144['MQKXI'](getRangerDir),_0x2e3ea6=_0x405144[_0x2cde70(0x1e6)](getRangerHomeDir);for(const _0x5ef5b1 of new Set([_0x4f6788,_0x2e3ea6])){const _0x29d214=_0x5ef5b1['endsWith']('/')?_0x5ef5b1:_0x5ef5b1+'/';if(_0x517029===_0x5ef5b1||_0x517029[_0x2cde70(0x1a9)](_0x29d214))return!![];}return![];}function legacyWriteError(_0x10d2b1,_0x4a85dd){const _0x4610cf=_0x38c9,_0x762c72={'nBPLN':function(_0x562f30,_0x4b9abb){return _0x562f30+_0x4b9abb;}};return new Error(_0x762c72[_0x4610cf(0x1e4)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x10d2b1+'\x22\x20to\x20legacy\x20path\x20'+_0x4a85dd+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x4610cf(0x232)+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x396f6d,_0x40c81b){const _0x30fdc3=_0x38c9,_0x43268e={'JWBsd':'local','LARHl':function(_0x20870a,_0x19affb,_0x125020,_0x3537a4){return _0x20870a(_0x19affb,_0x125020,_0x3537a4);},'GmNOM':function(_0x51d49d,_0x277fac){return _0x51d49d(_0x277fac);},'VLuNc':function(_0x38dc11,_0x17b54a){return _0x38dc11===_0x17b54a;}},_0x5e4a21=_0x40c81b?.['rangerDir'],_0x493c89=_0x5e4a21?[_0x5e4a21]:[getRangerDir(),getRangerHomeDir()][_0x30fdc3(0x1c4)]((_0x68df4c,_0x152666,_0x5aa67c)=>_0x5aa67c[_0x30fdc3(0x1cd)](_0x68df4c)===_0x152666),_0x2a25fd=_0x40c81b?.['locations']??['ci','local','legacy'];for(const _0x52069f of _0x493c89){const _0x22feaf=join(_0x52069f,_0x43268e['JWBsd']),_0x160654=join(_0x52069f,'ci'),_0x467c81=[{'location':'ci','path':_0x43268e['LARHl'](join,_0x52069f,'ci',_0x396f6d)},{'location':'local','path':_0x43268e['LARHl'](join,_0x52069f,_0x30fdc3(0x20c),_0x396f6d)},{'location':'legacy','path':join(_0x52069f,_0x396f6d)}];for(const _0x1db298 of _0x467c81){if(_0x2a25fd['includes'](_0x1db298['location'])&&_0x43268e[_0x30fdc3(0x1bb)](existsSync,_0x1db298[_0x30fdc3(0x1f2)])){if(_0x43268e[_0x30fdc3(0x1e5)](_0x1db298[_0x30fdc3(0x1c7)],_0x30fdc3(0x1d9))&&(_0x1db298[_0x30fdc3(0x1f2)]===_0x22feaf||_0x1db298[_0x30fdc3(0x1f2)]===_0x160654)&&!hasLegacyProfileFiles(_0x1db298[_0x30fdc3(0x1f2)]))continue;return{'path':_0x1db298['path'],'location':_0x1db298['location']};}}}return null;}function hasLegacyProfileFiles(_0xfee4a8){const _0x59796a=_0x38c9,_0x164a1b={'towsN':function(_0x21fc78,_0x478859){return _0x21fc78(_0x478859);},'oIUJl':function(_0x8529b9,_0x16e1c4,_0x5ca69a){return _0x8529b9(_0x16e1c4,_0x5ca69a);},'fxLqq':'settings.json','LcrTD':'auth.json.enc'};return _0x164a1b[_0x59796a(0x21c)](existsSync,_0x164a1b[_0x59796a(0x204)](join,_0xfee4a8,_0x164a1b[_0x59796a(0x1b4)]))||_0x164a1b['towsN'](existsSync,join(_0xfee4a8,'auth.json'))||existsSync(join(_0xfee4a8,_0x164a1b[_0x59796a(0x1fe)]));}export function isEnvCi(_0x1fd21f){const _0x55d908=_0x38c9,_0x560cd8={'GhYPw':function(_0x456251,_0x29a72f){return _0x456251(_0x29a72f);},'YjxKR':function(_0x611ea9,_0x1ae73a,_0x5ed145,_0x13f086){return _0x611ea9(_0x1ae73a,_0x5ed145,_0x13f086);},'IIQKF':function(_0x9b01f4){return _0x9b01f4();},'yJfyd':function(_0x46d196){return _0x46d196();}};if(_0x560cd8['GhYPw'](existsSync,_0x560cd8[_0x55d908(0x1ed)](join,_0x560cd8[_0x55d908(0x1ba)](getRangerDir),'ci',_0x1fd21f)))return!![];const _0x3ea716=_0x560cd8[_0x55d908(0x1f8)](getRangerHomeDir);if(_0x3ea716!==_0x560cd8['IIQKF'](getRangerDir)&&existsSync(join(_0x3ea716,'ci',_0x1fd21f)))return!![];return![];}export async function cleanupTempFiles(_0x25ad70){const _0xfb3f70=_0x38c9,_0x46f6a9={'DnRiq':'ENOENT'},_0x16b01f=[_0x25ad70['tempAuthPath'],_0x25ad70[_0xfb3f70(0x20e)]]['filter'](Boolean);await Promise[_0xfb3f70(0x1c6)](_0x16b01f[_0xfb3f70(0x1e9)](_0x377d04=>unlink(_0x377d04)[_0xfb3f70(0x1f3)](_0x2d2ba3=>{const _0x4af945=_0xfb3f70;_0x2d2ba3['code']!==_0x46f6a9['DnRiq']&&console[_0x4af945(0x1da)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x377d04+':',_0x2d2ba3[_0x4af945(0x1b8)]);})));}export function getSettingsPath(_0x1bc0f9){const _0x39cf0d=_0x38c9,_0x27a2ac={'xxdjz':function(_0x37e885,_0x59cf12,_0x10b53e){return _0x37e885(_0x59cf12,_0x10b53e);},'TGUFY':function(_0x52524b,_0x429627){return _0x52524b(_0x429627);},'ZdHoT':_0x39cf0d(0x1bd)};return _0x27a2ac[_0x39cf0d(0x1ce)](join,_0x27a2ac[_0x39cf0d(0x1c0)](getEnvDir,_0x1bc0f9),_0x27a2ac['ZdHoT']);}export async function loadSettings(_0x456a1a){const _0x107b09=_0x38c9,_0xeaffcc={'KPYRh':function(_0x255ba2,_0x5a8271){return _0x255ba2(_0x5a8271);},'HQhEh':function(_0x3071a3,_0x286964,_0x1ad445){return _0x3071a3(_0x286964,_0x1ad445);},'bUbrE':'utf-8'},_0x15af2f=getSettingsPath(_0x456a1a);if(!_0xeaffcc[_0x107b09(0x1db)](existsSync,_0x15af2f))return{};try{const _0x329660=await _0xeaffcc[_0x107b09(0x228)](readFile,_0x15af2f,_0xeaffcc[_0x107b09(0x1dc)]);return JSON[_0x107b09(0x208)](_0x329660);}catch{return{};}}export async function saveSettings(_0xf4ae43,_0x3b3664){const _0x19c84b=_0x38c9,_0x1348ff={'DnqMq':function(_0x49be28,_0x5e8657){return _0x49be28(_0x5e8657);}},_0x44e389=getSettingsPath(_0xf4ae43),_0x9c1e9f=_0x1348ff[_0x19c84b(0x1f4)](dirname,_0x44e389);!_0x1348ff[_0x19c84b(0x1f4)](existsSync,_0x9c1e9f)&&await mkdir(_0x9c1e9f,{'recursive':!![]}),await writeFile(_0x44e389,JSON['stringify'](_0x3b3664,null,0x2));}function _0x167e(){const _0x1cd010=['xxdjz','browser','GYqaG','sfSiz','extraHTTPHeaders','header','3807978vJULCB','wdNWz','ZrSPR','ranger-config','xBBqH','legacy','warn','KPYRh','bUbrE','tXsyZ','tabs','SJCHO','auth.json','sessions','wzhVY','--no-sandbox','nBPLN','VLuNc','MQKXI','lWxmX','egSJz','map','WFNjW','contextOptions','storageState','YjxKR','length','nlmuA','storageStatePath','dFtRu','path','catch','DnqMq','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','--disable-features=WebBluetooth','auth.json.enc','yJfyd','YvQCt','repeat','getuid','.json','ewfuG','LcrTD','whwur','now','2011112gdzLZy','--disable-setuid-sandbox','includes','oIUJl','JvRto','install','4682XcFLrI','parse','6500736iQdtss','QjTLB','ToOMC','local','tlFqm','configPath','fnVSL','kUDis','clipboard-write','kMNmw','string','25936tQBVRP','2025864QmnnLS','101HVIVOI','kTAeg','cdpEndpoint','SseCn','ZAVWB','UuHTo','towsN','isArray','MkKsH','LmaZo','env','PssQs','Abnml','setupHeader','setupHeaders','GNzwd','none','entries','HQhEh','IoAPz','50VyHXlr','args','--allow-insecure-localhost','gVdsD','Xfvqj','gOvCU','7RMsWYo','executablePath','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','playwright-cli','startsWith','safeMode','push','ranger-auth-','RcPYi','stagehand','headless','WdBKL','allowInsecureLocalhost','file','chromium','fxLqq','Environment\x20variable\x20','5267260vpaeNK','-cli','message','core','IIQKF','GmNOM','headers','settings.json','object','userAgent','TGUFY','LlKSe','1791PMYMaH','LGwij','filter','--unsafely-treat-insecure-origin-as-secure=http://localhost','all','location','kZAbb','replace','uVicu','gTbzO','keys','indexOf'];_0x167e=function(){return _0x1cd010;};return _0x167e();}export function resolveEnvVars(_0x438030){const _0x497d12=_0x38c9;if(typeof _0x438030==='string')return _0x438030[_0x497d12(0x1c9)](/\$\{(\w+)\}/g,(_0x34534d,_0x43da82)=>{const _0x3c1f24=_0x497d12,_0x44c066=process[_0x3c1f24(0x220)][_0x43da82];if(_0x44c066===undefined)throw new Error(_0x3c1f24(0x1b5)+_0x43da82+'\x20is\x20not\x20set');return _0x44c066;});if(Array['isArray'](_0x438030))return _0x438030[_0x497d12(0x1e9)](resolveEnvVars);if(_0x438030&&typeof _0x438030==='object')return Object['fromEntries'](Object['entries'](_0x438030)['map'](([_0x4fba76,_0x50e8e6])=>[_0x4fba76,resolveEnvVars(_0x50e8e6)]));return _0x438030;}const isRecord=_0xd97882=>typeof _0xd97882==='object'&&_0xd97882!==null&&!Array['isArray'](_0xd97882),asRecord=_0x2d3879=>isRecord(_0x2d3879)?_0x2d3879:undefined,mergeHeaders=(_0x363dd6,_0x5751c0)=>{const _0x1d02ee=_0x38c9,_0x3f5952={'ToOMC':function(_0x48ba6f,_0x44041f){return _0x48ba6f??_0x44041f;}},_0x1a7ab7={..._0x363dd6??{},..._0x3f5952[_0x1d02ee(0x20b)](_0x5751c0,{})};return Object[_0x1d02ee(0x1cc)](_0x1a7ab7)[_0x1d02ee(0x1ee)]?_0x1a7ab7:undefined;},SAFE_MODE_ARGS=[_0x5ebd86(0x1f6)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0x5ebd86(0x1c5),_0x5ebd86(0x22c)];export function buildBrowserOptionsFromSettings(_0x5de666,_0x1bc322={}){const _0x5bd727=_0x5ebd86,_0x2e4f2b={'YvQCt':function(_0x546230,_0x3e6354){return _0x546230(_0x3e6354);},'DqONK':function(_0x3a8601,_0x4bd5ef){return _0x3a8601===_0x4bd5ef;},'LWYOA':'boolean','uVicu':'string','lxVLO':function(_0x315fb1,_0x5777e2,_0xed0101){return _0x315fb1(_0x5777e2,_0xed0101);}},_0x2f8f2a=_0x2e4f2b[_0x5bd727(0x1f9)](asRecord,_0x5de666[_0x5bd727(0x1cf)]),_0xa01d65={..._0x2e4f2b['YvQCt'](asRecord,_0x2f8f2a?.['launchOptions'])??{}};_0x2e4f2b['DqONK'](typeof _0x1bc322[_0x5bd727(0x1af)],_0x2e4f2b['LWYOA'])&&(_0xa01d65[_0x5bd727(0x1af)]=_0x1bc322['headless']);if(_0x5de666[_0x5bd727(0x1aa)]){const _0x170806=_0xa01d65['args']??[],_0x209f95=SAFE_MODE_ARGS[_0x5bd727(0x1c4)](_0x41fc4c=>!_0x170806['includes'](_0x41fc4c));_0xa01d65['args']=[..._0x170806,..._0x209f95];}if(_0x5de666[_0x5bd727(0x1b1)]){const _0x175782=_0xa01d65['args']??[],_0x4a28eb=ALLOW_LOCALHOST_ARGS[_0x5bd727(0x1c4)](_0x3c7572=>!_0x175782[_0x5bd727(0x203)](_0x3c7572));_0xa01d65[_0x5bd727(0x22b)]=[..._0x175782,..._0x4a28eb];}const _0x54ba64={..._0x2e4f2b['YvQCt'](asRecord,_0x2f8f2a?.[_0x5bd727(0x1eb)])??{}};_0x54ba64['ignoreHTTPSErrors']=!![];typeof _0x5de666[_0x5bd727(0x1bf)]===_0x2e4f2b[_0x5bd727(0x1ca)]&&(_0x54ba64['userAgent']=_0x5de666[_0x5bd727(0x1bf)]);const _0x1ec14a=_0x2e4f2b['lxVLO'](mergeHeaders,_0x2e4f2b['YvQCt'](asRecord,_0x54ba64[_0x5bd727(0x1d2)]),asRecord(_0x5de666['headers']));return _0x1ec14a?_0x54ba64[_0x5bd727(0x1d2)]=_0x1ec14a:delete _0x54ba64['extraHTTPHeaders'],_0x1bc322['storageStatePath']&&(_0x54ba64['storageState']=_0x1bc322[_0x5bd727(0x1f0)]),{'launchOptions':_0xa01d65,'contextOptions':_0x54ba64};}export async function resolveProfileStorageState(_0x1cfe14){const _0x49e5c7=_0x5ebd86,_0x1ffc25={'kUDis':function(_0x3c7367,_0x2a8e29){return _0x3c7367(_0x2a8e29);}};return _0x1ffc25['kUDis'](resolveLocalAuthPath,_0x1ffc25[_0x49e5c7(0x210)](getEnvDir,_0x1cfe14));}async function resolveLocalAuthPath(_0x1e7de8){const _0x3493ac=_0x5ebd86,_0x583df7={'fnVSL':_0x3493ac(0x1f7),'gOvCU':function(_0x4da001,_0x2062e7,_0x2c0cb0){return _0x4da001(_0x2062e7,_0x2c0cb0);},'PssQs':_0x3493ac(0x1f5),'LGwij':function(_0x168563,_0x40cded,_0x4d2b12){return _0x168563(_0x40cded,_0x4d2b12);},'APWhB':function(_0x3aa39a){return _0x3aa39a();},'RXPrF':function(_0x53a36d,_0x4b750e,_0x167fff){return _0x53a36d(_0x4b750e,_0x167fff);},'DZWKa':function(_0x159f4f,_0x143787){return _0x159f4f(_0x143787);}},_0x3e7d39=join(_0x1e7de8,_0x583df7[_0x3493ac(0x20f)]),_0x4a46bd=_0x583df7['gOvCU'](join,_0x1e7de8,_0x3493ac(0x1e0));if(existsSync(_0x3e7d39))try{const _0x44df25=await getToken();if(!_0x44df25)throw new Error(_0x583df7[_0x3493ac(0x221)]);const _0x3714c4=await readFile(_0x3e7d39),_0x2fce8f=_0x583df7[_0x3493ac(0x22f)](decrypt,_0x3714c4,_0x44df25),_0x295b50=_0x583df7[_0x3493ac(0x1c3)](join,_0x583df7['APWhB'](tmpdir),_0x3493ac(0x1ac)+Date[_0x3493ac(0x200)]()+_0x3493ac(0x1fc));return await _0x583df7['RXPrF'](writeFile,_0x295b50,_0x2fce8f),{'storageStatePath':_0x295b50,'tempAuthPath':_0x295b50};}catch(_0x3a3ac5){const _0x4e1865=_0x3a3ac5 instanceof Error?_0x3a3ac5[_0x3493ac(0x1b8)]:_0x583df7['DZWKa'](String,_0x3a3ac5);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x4e1865);}if(existsSync(_0x4a46bd))return{'storageStatePath':_0x4a46bd};return{};}export async function buildPlaywrightConfig(_0x512a95,_0x328e9d,_0x689d2c,_0x506b7b,_0x545531){const _0x5b2376=_0x5ebd86,_0x27de1c={'IoAPz':function(_0x99f8c6,_0x2e23bd,_0x4f9d68,_0x461e7b,_0x27c4e7,_0x3cf5c7,_0xbf7884){return _0x99f8c6(_0x2e23bd,_0x4f9d68,_0x461e7b,_0x27c4e7,_0x3cf5c7,_0xbf7884);},'LlKSe':'stagehand','SJCHO':function(_0x476ae2,_0x2b0b5d,_0x3f128f,_0x4bd10e,_0x57a0d7,_0x4cfae0,_0x29d742){return _0x476ae2(_0x2b0b5d,_0x3f128f,_0x4bd10e,_0x57a0d7,_0x4cfae0,_0x29d742);}};if(_0x545531)return _0x27de1c[_0x5b2376(0x229)](buildPlaywrightConfigCore,_0x512a95,_0x545531,_0x328e9d,_0x689d2c,_0x506b7b,_0x27de1c['LlKSe']);const {storageStatePath:_0x2e9cbe,tempAuthPath:_0x312375}=await resolveLocalAuthPath(getEnvDir(_0x328e9d));try{const _0x3afda6=await _0x27de1c[_0x5b2376(0x1df)](buildPlaywrightConfigCore,_0x512a95,_0x2e9cbe,_0x328e9d,_0x689d2c,_0x506b7b,_0x27de1c[_0x5b2376(0x1c1)]);return{..._0x3afda6,'tempAuthPath':_0x312375};}catch(_0x4bbfb1){_0x312375&&await unlink(_0x312375)[_0x5b2376(0x1f3)](()=>{});throw _0x4bbfb1;}}export async function buildPlaywrightConfigCore(_0x15b770,_0x2250f7,_0x58ab0c,_0x4b296c,_0x49a91b,_0x523b17=_0x5ebd86(0x1ae)){const _0x278317=_0x5ebd86,_0x3612e4={'ZrSPR':function(_0x24b9d5,_0x501287,_0x2ab7f4){return _0x24b9d5(_0x501287,_0x2ab7f4);},'sfSiz':'chromium','QjTLB':_0x278317(0x211),'isvXr':function(_0x54e1a3){return _0x54e1a3();},'OuLOo':_0x278317(0x1e1),'lWxmX':_0x278317(0x1b2),'kZAbb':_0x278317(0x206),'Abnml':'pdf','leMdb':'vision','veATM':'allow','xBBqH':function(_0x626378,_0x4cfef5){return _0x626378===_0x4cfef5;},'gVdsD':_0x278317(0x1d7),'ZAVWB':function(_0x232084,_0x2a0dbd){return _0x232084(_0x2a0dbd);},'gTbzO':_0x278317(0x1b7),'TYpLl':function(_0x3731ba,_0x416b7f,_0x1f5ab2){return _0x3731ba(_0x416b7f,_0x1f5ab2);}},_0x28c720=_0x4b296c||randomUUID(),_0x15d01f=join(_0x3612e4['isvXr'](getRangerDir),_0x3612e4['OuLOo'],_0x28c720),_0x5826bd=Boolean(_0x15b770[_0x278317(0x218)]),_0x58e65c=_0x5826bd?{'browserName':'chromium','cdpEndpoint':_0x15b770['cdpEndpoint']}:((()=>{const _0x317f07=_0x278317,{launchOptions:_0x30d8a9,contextOptions:_0x382765}=_0x3612e4[_0x317f07(0x1d6)](buildBrowserOptionsFromSettings,_0x15b770,{'headless':_0x49a91b?![]:_0x15b770[_0x317f07(0x1af)]??!![],'storageStatePath':_0x2250f7});if(process[_0x317f07(0x1fb)]?.()===0x0){const _0x4fcf58=['--no-sandbox','--disable-setuid-sandbox'],_0x318b2a=_0x30d8a9[_0x317f07(0x22b)]??[],_0x52f488=_0x4fcf58['filter'](_0x24e908=>!_0x318b2a['includes'](_0x24e908));_0x30d8a9['args']=[..._0x318b2a,..._0x52f488];}return{'isolated':!![],'browserName':_0x3612e4[_0x317f07(0x1d1)],'launchOptions':_0x30d8a9,'contextOptions':{..._0x382765,'permissions':['clipboard-read',_0x3612e4[_0x317f07(0x20a)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x356c68=_0x523b17==='playwright-cli'?{'browser':_0x58e65c,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x15d01f,'outputMode':_0x3612e4[_0x278317(0x1e7)],'codegen':_0x278317(0x226)}:{'name':_0x58ab0c,'browser':_0x58e65c,'capabilities':[_0x278317(0x1b9),_0x278317(0x1de),_0x3612e4[_0x278317(0x1c8)],_0x3612e4[_0x278317(0x222)],_0x3612e4['leMdb']],'imageResponses':_0x3612e4['veATM'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x15d01f};if(!_0x5826bd){const _0x107ccf=_0x356c68['browser'],_0x2f0511=_0x107ccf[_0x278317(0x1eb)];if(_0x3612e4[_0x278317(0x1d8)](_0x2f0511['userAgent'],undefined))delete _0x2f0511['userAgent'];if(_0x2f0511[_0x278317(0x1ec)]===undefined)delete _0x2f0511[_0x278317(0x1ec)];}const _0x2564d9=join(_0x3612e4['isvXr'](tmpdir),_0x3612e4[_0x278317(0x22d)]);!_0x3612e4[_0x278317(0x21a)](existsSync,_0x2564d9)&&await mkdir(_0x2564d9,{'recursive':!![]});const _0x38c8bf=_0x523b17==='playwright-cli'?_0x3612e4[_0x278317(0x1cb)]:'',_0x4f112d=_0x3612e4[_0x278317(0x1d6)](join,_0x2564d9,_0x58ab0c+'-'+Date[_0x278317(0x200)]()+_0x38c8bf+'.json');return await _0x3612e4['TYpLl'](writeFile,_0x4f112d,JSON['stringify'](_0x356c68,null,0x2)),{'configPath':_0x4f112d,'storageStatePath':_0x2250f7};}export async function buildPlaywrightCliConfig(_0x492806,_0x27fb70,_0x5ae325,_0x4a4e14,_0x4b8a3d){const _0x22e495=_0x5ebd86,_0x194e20={'WTPbE':function(_0xf0b494,_0x247bec,_0x1b5993,_0x5e6016,_0x55baba,_0x32e532,_0x37dedd){return _0xf0b494(_0x247bec,_0x1b5993,_0x5e6016,_0x55baba,_0x32e532,_0x37dedd);},'kTAeg':_0x22e495(0x233),'tlFqm':function(_0x56b667,_0x3d2e79){return _0x56b667(_0x3d2e79);}};if(_0x4b8a3d)return _0x194e20['WTPbE'](buildPlaywrightConfigCore,_0x492806,_0x4b8a3d,_0x27fb70,_0x5ae325,_0x4a4e14,'playwright-cli');const {storageStatePath:_0x3141b4,tempAuthPath:_0x6db336}=await resolveLocalAuthPath(getEnvDir(_0x27fb70));try{const _0x1738b3=await buildPlaywrightConfigCore(_0x492806,_0x3141b4,_0x27fb70,_0x5ae325,_0x4a4e14,_0x194e20[_0x22e495(0x217)]);return{..._0x1738b3,'tempAuthPath':_0x6db336};}catch(_0x38c442){_0x6db336&&await _0x194e20[_0x22e495(0x20d)](unlink,_0x6db336)[_0x22e495(0x1f3)](()=>{});throw _0x38c442;}}export async function buildRangerwrightCliConfig(_0x424886,_0x2f99e9,_0x46d890,_0x545961,_0x3ca960){const _0x2d419f=_0x5ebd86,_0x3ab4cd={'sZJxm':function(_0x31b234,_0x4a63e9,_0x58757f){return _0x31b234(_0x4a63e9,_0x58757f);},'GYqaG':function(_0x5d4887,_0x239f3b){return _0x5d4887===_0x239f3b;},'Xfvqj':'clipboard-read','UuHTo':function(_0x1a964d,_0x2da779){return _0x1a964d(_0x2da779);},'fOJnt':function(_0x5837d7,_0xa7e80e){return _0x5837d7===_0xa7e80e;},'JIxOS':function(_0x16f2e6){return _0x16f2e6();},'WdBKL':'ranger-config','QjjtF':function(_0x5ab253,_0x543d86){return _0x5ab253(_0x543d86);}},{storageStatePath:_0x593d64,tempAuthPath:_0x535066}=_0x3ca960?{'storageStatePath':_0x3ca960,'tempAuthPath':undefined}:await _0x3ab4cd[_0x2d419f(0x21b)](resolveLocalAuthPath,getEnvDir(_0x2f99e9)),_0x3567d6=_0x46d890||randomUUID(),_0x14208a=join(getRangerDir(),'sessions',_0x3567d6),_0x2c0b69=_0x3ab4cd[_0x2d419f(0x21b)](Boolean,_0x424886['cdpEndpoint']),_0x2d5ac8=_0x2c0b69?{'browserName':_0x2d419f(0x1b3),'cdpEndpoint':_0x424886['cdpEndpoint']}:((()=>{const _0x1b841f=_0x2d419f,{launchOptions:_0x290156,contextOptions:_0x46fd6b}=_0x3ab4cd['sZJxm'](buildBrowserOptionsFromSettings,_0x424886,{'headless':_0x545961?![]:_0x424886['headless']??!![],'storageStatePath':_0x593d64});if(_0x3ab4cd[_0x1b841f(0x1d0)](process[_0x1b841f(0x1fb)]?.(),0x0)){const _0x386b4e=[_0x1b841f(0x1e3),_0x1b841f(0x202)],_0x39fabd=_0x290156['args']??[],_0x26f01e=_0x386b4e['filter'](_0x44141c=>!_0x39fabd[_0x1b841f(0x203)](_0x44141c));_0x290156['args']=[..._0x39fabd,..._0x26f01e];}return{'browserName':'chromium','launchOptions':_0x290156,'contextOptions':{..._0x46fd6b,'permissions':[_0x3ab4cd[_0x1b841f(0x22e)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x2c0b69){const _0x386c39=_0x2d5ac8['contextOptions'];if(_0x386c39){if(_0x386c39[_0x2d419f(0x1bf)]===undefined)delete _0x386c39[_0x2d419f(0x1bf)];if(_0x3ab4cd['fOJnt'](_0x386c39[_0x2d419f(0x1ec)],undefined))delete _0x386c39['storageState'];}}const _0x2ef632={'browser':_0x2d5ac8,'outputDir':_0x14208a,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x32da9c;try{const _0x3bc554=join(_0x3ab4cd['JIxOS'](tmpdir),_0x3ab4cd[_0x2d419f(0x1b0)]);!_0x3ab4cd['QjjtF'](existsSync,_0x3bc554)&&await mkdir(_0x3bc554,{'recursive':!![]}),_0x32da9c=join(_0x3bc554,_0x2f99e9+'-'+Date['now']()+'-rangerwright.json'),await _0x3ab4cd['sZJxm'](writeFile,_0x32da9c,JSON['stringify'](_0x2ef632,null,0x2));}catch(_0x39bb93){_0x535066&&await unlink(_0x535066)['catch'](()=>{});throw _0x39bb93;}return{'configPath':_0x32da9c,'storageStatePath':_0x593d64,'tempAuthPath':_0x535066,'outputDir':_0x14208a};}export async function buildNovaActCliConfig(_0x4a8ee6,_0x5bb05a,_0x556e40,_0xfb6cd2,_0xa321a){const _0x284c21=_0x5ebd86,_0x4f2816={'wzhVY':function(_0x4a69bc,_0xbfb40c){return _0x4a69bc(_0xbfb40c);},'LmaZo':function(_0x58c52d){return _0x58c52d();},'GNzwd':function(_0x4a1124,_0x2c499e,_0x1d9ce0){return _0x4a1124(_0x2c499e,_0x1d9ce0);},'MkKsH':function(_0x2cf85b,_0x538455,_0x4d39ac){return _0x2cf85b(_0x538455,_0x4d39ac);},'UiBRb':function(_0x985e42,_0x2a9c01){return _0x985e42===_0x2a9c01;},'gLgHQ':'--disable-setuid-sandbox','whwur':function(_0x3ff337,_0x314d10){return _0x3ff337(_0x314d10);}},{storageStatePath:_0x55b8ef,tempAuthPath:_0x365938}=_0xa321a?{'storageStatePath':_0xa321a,'tempAuthPath':undefined}:await _0x4f2816['wzhVY'](resolveLocalAuthPath,getEnvDir(_0x5bb05a)),_0x2f0a64=_0x556e40||_0x4f2816[_0x284c21(0x21f)](randomUUID),_0x48e9e5=join(_0x4f2816['LmaZo'](getRangerDir),_0x284c21(0x1e1),_0x2f0a64),_0x204d06=_0x4f2816[_0x284c21(0x225)](join,_0x48e9e5,'nova-user-data'),_0x1f557a=_0x55b8ef?_0x4f2816[_0x284c21(0x21e)](join,_0x204d06,'Default'):undefined,{launchOptions:_0x501b1c,contextOptions:_0x57fa08}=_0x4f2816['GNzwd'](buildBrowserOptionsFromSettings,_0x4a8ee6,{'headless':_0xfb6cd2?![]:_0x4a8ee6['headless']??!![],'storageStatePath':_0x55b8ef});if(_0x4f2816['UiBRb'](process['getuid']?.(),0x0)){const _0x35afb1=['--no-sandbox',_0x4f2816['gLgHQ']],_0x4b92d2=_0x501b1c[_0x284c21(0x22b)]??[],_0x54b0c6=_0x35afb1[_0x284c21(0x1c4)](_0x4005e8=>!_0x4b92d2[_0x284c21(0x203)](_0x4005e8));_0x501b1c['args']=[..._0x4b92d2,..._0x54b0c6];}const _0x4ed5d3=typeof _0x501b1c['executablePath']===_0x284c21(0x213)?_0x501b1c['executablePath']:_0x55b8ef?chromium[_0x284c21(0x231)]():undefined;return{'storageStatePath':_0x55b8ef,'tempAuthPath':_0x365938,'baseUrl':_0x4a8ee6['baseUrl'],'headless':_0x4f2816[_0x284c21(0x1e2)](Boolean,_0x501b1c['headless']),'userDataDir':_0x204d06,'browserProfilePath':_0x1f557a,'executablePath':_0x4ed5d3,'launchArgs':Array[_0x284c21(0x21d)](_0x501b1c[_0x284c21(0x22b)])?_0x501b1c[_0x284c21(0x22b)]['filter'](_0x484b43=>typeof _0x484b43===_0x284c21(0x213)):[],'userAgent':typeof _0x57fa08['userAgent']===_0x284c21(0x213)?_0x57fa08[_0x284c21(0x1bf)]:undefined,'extraHTTPHeaders':_0x57fa08[_0x284c21(0x1d2)],'allowInsecureLocalhost':Boolean(_0x4a8ee6['allowInsecureLocalhost']),'safeMode':Boolean(_0x4a8ee6['safeMode']),'cdpEndpoint':_0x4a8ee6[_0x284c21(0x218)],'isCdpMode':_0x4f2816[_0x284c21(0x1ff)](Boolean,_0x4a8ee6[_0x284c21(0x218)])};}export function getNestedValue(_0x1d16d2,_0x14dd2e){const _0x3b1278={'VHDpr':function(_0x24ead5,_0x2f7a6d){return _0x24ead5(_0x2f7a6d);},'aJHvJ':function(_0x5a3170,_0x363896){return _0x5a3170===_0x363896;}},_0x4903c2=_0x3b1278['VHDpr'](parseKeyPath,_0x14dd2e);let _0x9187e9=_0x1d16d2;for(const _0x4b09c3 of _0x4903c2){if(_0x9187e9===null||_0x3b1278['aJHvJ'](_0x9187e9,undefined)||typeof _0x9187e9!=='object')return undefined;_0x9187e9=_0x9187e9[_0x4b09c3];}return _0x9187e9;}export function setNestedValue(_0x5819d6,_0x28f617,_0x29d255){const _0x461dd8=_0x5ebd86,_0x105bab={'tuboF':function(_0x1af239,_0x3cfcb6){return _0x1af239(_0x3cfcb6);},'ewfuG':'object','SseCn':function(_0x595895,_0x42419e){return _0x595895-_0x42419e;}},_0x11e81c=_0x105bab['tuboF'](parseKeyPath,_0x28f617);let _0x22a775=_0x5819d6;for(let _0x419501=0x0;_0x419501<_0x11e81c[_0x461dd8(0x1ee)]-0x1;_0x419501++){const _0x3330fa=_0x11e81c[_0x419501];(!(_0x3330fa in _0x22a775)||typeof _0x22a775[_0x3330fa]!==_0x105bab[_0x461dd8(0x1fd)])&&(_0x22a775[_0x3330fa]={}),_0x22a775=_0x22a775[_0x3330fa];}_0x22a775[_0x11e81c[_0x105bab[_0x461dd8(0x219)](_0x11e81c[_0x461dd8(0x1ee)],0x1)]]=_0x29d255;}function _0x38c9(_0x3f64c3,_0x47845c){_0x3f64c3=_0x3f64c3-0x1a9;const _0x167e02=_0x167e();let _0x38c98c=_0x167e02[_0x3f64c3];return _0x38c98c;}export function deleteNestedValue(_0x27843d,_0x4871eb){const _0x180273=_0x5ebd86,_0x476bd3={'xdYah':function(_0x27eda2,_0x5392dc){return _0x27eda2<_0x5392dc;},'bJGIz':function(_0x23c2d4,_0x4c9ff2){return _0x23c2d4===_0x4c9ff2;},'RcPYi':'object','hQTlZ':function(_0x2106c9,_0x29639e){return _0x2106c9!==_0x29639e;}},_0x2864f9=parseKeyPath(_0x4871eb);let _0x251d3b=_0x27843d;for(let _0x359ad1=0x0;_0x476bd3['xdYah'](_0x359ad1,_0x2864f9['length']-0x1);_0x359ad1++){if(_0x251d3b===null||_0x476bd3['bJGIz'](_0x251d3b,undefined)||typeof _0x251d3b!==_0x476bd3[_0x180273(0x1ad)])return![];_0x251d3b=_0x251d3b[_0x2864f9[_0x359ad1]];}if(_0x251d3b===null||_0x251d3b===undefined||_0x476bd3['hQTlZ'](typeof _0x251d3b,_0x180273(0x1be)))return![];const _0x2accc2=_0x2864f9[_0x2864f9[_0x180273(0x1ee)]-0x1];if(_0x2accc2 in _0x251d3b)return delete _0x251d3b[_0x2accc2],!![];return![];}function parseKeyPath(_0xe68038){const _0x3fd1d2=_0x5ebd86,_0x517d45={'iaqlT':_0x3fd1d2(0x1bc),'WFNjW':_0x3fd1d2(0x223),'kMNmw':_0x3fd1d2(0x224)},_0x193682=_0xe68038['split']('.');return _0x193682[0x0]===_0x3fd1d2(0x1d3)&&(_0x193682[0x0]=_0x517d45['iaqlT']),_0x193682[0x0]===_0x517d45[_0x3fd1d2(0x1ea)]&&(_0x193682[0x0]=_0x517d45[_0x3fd1d2(0x212)]),_0x193682;}export function formatSettings(_0x4ad0e9,_0x2f2a2e=0x0){const _0x554124=_0x5ebd86,_0x4ae6a1={'jzXGw':function(_0xd3cb8c,_0x519442){return _0xd3cb8c===_0x519442;},'fdmlq':function(_0x10915d,_0x2849c0){return _0x10915d!==_0x2849c0;}},_0x299083=[],_0x368c3f='\x20\x20'[_0x554124(0x1fa)](_0x2f2a2e);for(const [_0x1c074d,_0x1a6aeb]of Object[_0x554124(0x227)](_0x4ad0e9)){if(_0x4ae6a1['jzXGw'](_0x1a6aeb,undefined))continue;if(typeof _0x1a6aeb==='object'&&_0x4ae6a1['fdmlq'](_0x1a6aeb,null)){_0x299083['push'](''+_0x368c3f+_0x1c074d+':');for(const [_0x43d07f,_0x101b0b]of Object['entries'](_0x1a6aeb)){_0x299083[_0x554124(0x1ab)](_0x368c3f+'\x20\x20'+_0x43d07f+':\x20'+_0x101b0b);}}else _0x299083['push'](''+_0x368c3f+_0x1c074d+':\x20'+_0x1a6aeb);}return _0x299083['join']('\x0a');}
|
|
1
|
+
const _0x245011=_0x2870;(function(_0x1ac588,_0x4ee0b1){const _0x3e8a54=_0x2870,_0x993b03=_0x1ac588();while(!![]){try{const _0x38b995=parseInt(_0x3e8a54(0x1f6))/0x1+parseInt(_0x3e8a54(0x1b2))/0x2*(parseInt(_0x3e8a54(0x1a8))/0x3)+-parseInt(_0x3e8a54(0x209))/0x4+parseInt(_0x3e8a54(0x1dd))/0x5*(-parseInt(_0x3e8a54(0x1b8))/0x6)+parseInt(_0x3e8a54(0x19d))/0x7*(parseInt(_0x3e8a54(0x1b4))/0x8)+-parseInt(_0x3e8a54(0x185))/0x9+-parseInt(_0x3e8a54(0x1da))/0xa;if(_0x38b995===_0x4ee0b1)break;else _0x993b03['push'](_0x993b03['shift']());}catch(_0x5f0ccf){_0x993b03['push'](_0x993b03['shift']());}}}(_0x1faf,0x43dff));function _0x2870(_0x37d75d,_0x581386){_0x37d75d=_0x37d75d-0x185;const _0x1faf30=_0x1faf();let _0x287071=_0x1faf30[_0x37d75d];return _0x287071;}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(_0x12605c,_0x3ed754){const _0x5edf47=_0x2870,_0x2bc208={'AigSE':function(_0x4c4f80,_0x179d99,_0x58b8b0,_0x46f359){return _0x4c4f80(_0x179d99,_0x58b8b0,_0x46f359);},'jFGrg':function(_0x466fb1,_0x28b651,_0x52a2b4){return _0x466fb1(_0x28b651,_0x52a2b4);},'vYXIA':function(_0xe85846,_0x229bff){return _0xe85846(_0x229bff);},'zqnsL':function(_0x358376,_0x1a8c5f){return _0x358376(_0x1a8c5f);},'HmsuO':function(_0x3b55a4,_0x7a5e62){return _0x3b55a4!==_0x7a5e62;},'gbhqo':function(_0x437097,_0x1a2d57){return _0x437097!==_0x1a2d57;}},_0x317d77=_0x2bc208[_0x5edf47(0x1cc)](join,_0x3ed754,'ci',_0x12605c),_0x2bdf61=join(_0x3ed754,'local',_0x12605c),_0x12a6a6=_0x2bc208[_0x5edf47(0x1c4)](join,_0x3ed754,_0x12605c),_0x1b904d=_0x2bc208['jFGrg'](join,_0x3ed754,_0x5edf47(0x1a5)),_0x29e3ae=_0x2bc208[_0x5edf47(0x1c4)](join,_0x3ed754,'ci');if(_0x2bc208['vYXIA'](existsSync,_0x317d77))return _0x317d77;if(_0x2bc208['zqnsL'](existsSync,_0x2bdf61))return _0x2bdf61;if(existsSync(_0x12a6a6)&&(_0x2bc208[_0x5edf47(0x1e6)](_0x12a6a6,_0x1b904d)&&_0x2bc208[_0x5edf47(0x1f7)](_0x12a6a6,_0x29e3ae)?!![]:_0x2bc208['zqnsL'](hasLegacyProfileFiles,_0x12a6a6)))return _0x12a6a6;return null;}export function getEnvDir(_0x313347,_0x14ec30={}){const _0x3d77de=_0x2870,_0x2eaaab={'RwFIW':function(_0x1d1c67){return _0x1d1c67();},'CLjAC':function(_0x5550ad,_0x2a074b,_0x19eab6){return _0x5550ad(_0x2a074b,_0x19eab6);},'neFDI':function(_0x60b5ba,_0x5223b2){return _0x60b5ba(_0x5223b2);},'OXsJU':function(_0x4bdf77,_0x1e2c24,_0x20c8a0){return _0x4bdf77(_0x1e2c24,_0x20c8a0);},'RcArc':function(_0x2a180c,_0x3d9de8,_0x4520e2,_0x586ad7){return _0x2a180c(_0x3d9de8,_0x4520e2,_0x586ad7);},'LSwRw':'local','NczgF':function(_0x46b230,_0x571fe4,_0x3ebac7){return _0x46b230(_0x571fe4,_0x3ebac7);}},_0x16a7bd=_0x2eaaab['RwFIW'](getRangerDir),_0x553a83=_0x2eaaab[_0x3d77de(0x1f4)](findEnvInRoot,_0x313347,_0x16a7bd);if(_0x553a83){if(_0x14ec30[_0x3d77de(0x1c2)]&&_0x2eaaab['neFDI'](isLegacyEnvPath,_0x553a83))throw legacyWriteError(_0x313347,_0x553a83);return _0x553a83;}const _0x2a381b=getRangerHomeDir();if(_0x2a381b!==_0x16a7bd){const _0x1119c6=_0x2eaaab[_0x3d77de(0x1f4)](findEnvInRoot,_0x313347,_0x2a381b);if(_0x1119c6){if(_0x14ec30['forWrite']&&isLegacyEnvPath(_0x1119c6))throw _0x2eaaab[_0x3d77de(0x1ce)](legacyWriteError,_0x313347,_0x1119c6);return _0x1119c6;}}const _0x14d68b=_0x2eaaab['RcArc'](join,_0x2a381b,_0x2eaaab['LSwRw'],_0x313347);if(_0x14ec30['forWrite'])throw _0x2eaaab['NczgF'](legacyWriteError,_0x313347,_0x14d68b);return _0x14d68b;}function isLegacyEnvPath(_0x21f39c){const _0x8c70e6=_0x2870,_0x251f3a={'Fvygz':function(_0x55b490){return _0x55b490();},'vsQNn':function(_0x442259,_0x35245c){return _0x442259===_0x35245c;}},_0x4166f3=_0x251f3a[_0x8c70e6(0x18d)](getRangerDir),_0x513153=getRangerHomeDir();for(const _0x18372a of new Set([_0x4166f3,_0x513153])){const _0x479017=_0x18372a[_0x8c70e6(0x203)]('/')?_0x18372a:_0x18372a+'/';if(_0x251f3a[_0x8c70e6(0x1b9)](_0x21f39c,_0x18372a)||_0x21f39c[_0x8c70e6(0x204)](_0x479017))return!![];}return![];}function legacyWriteError(_0x484d1b,_0x537903){const _0x424511=_0x2870,_0x36d5b6={'skhxd':function(_0x3cd95b,_0x1b6216){return _0x3cd95b+_0x1b6216;}};return new Error(_0x36d5b6['skhxd']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x484d1b+'\x22\x20to\x20legacy\x20path\x20'+_0x537903+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x424511(0x19e)+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x5d4a60,_0x40c3c1){const _0x594295=_0x2870,_0xc1f0b0={'sFNRz':function(_0x4bb975){return _0x4bb975();},'MffLf':function(_0x434c73){return _0x434c73();},'NZnIa':function(_0x5bd782,_0x228889,_0xeb6493){return _0x5bd782(_0x228889,_0xeb6493);},'JLJPE':_0x594295(0x1a5),'rcLwM':function(_0x2a8769,_0x54f559){return _0x2a8769===_0x54f559;},'kRcFB':function(_0x3b068f,_0x44d2db){return _0x3b068f(_0x44d2db);}},_0x64b94e=_0x40c3c1?.[_0x594295(0x1e7)],_0x14bda5=_0x64b94e?[_0x64b94e]:[_0xc1f0b0['sFNRz'](getRangerDir),_0xc1f0b0[_0x594295(0x18a)](getRangerHomeDir)][_0x594295(0x1c6)]((_0xb65ffe,_0x13950d,_0x4a35bc)=>_0x4a35bc['indexOf'](_0xb65ffe)===_0x13950d),_0x5a3855=_0x40c3c1?.[_0x594295(0x1cf)]??['ci','local','legacy'];for(const _0x370d34 of _0x14bda5){const _0x4133fe=_0xc1f0b0[_0x594295(0x1df)](join,_0x370d34,_0xc1f0b0[_0x594295(0x20f)]),_0x2c3c4c=join(_0x370d34,'ci'),_0x3caef2=[{'location':'ci','path':join(_0x370d34,'ci',_0x5d4a60)},{'location':_0xc1f0b0[_0x594295(0x20f)],'path':join(_0x370d34,_0xc1f0b0[_0x594295(0x20f)],_0x5d4a60)},{'location':'legacy','path':join(_0x370d34,_0x5d4a60)}];for(const _0x1f7efb of _0x3caef2){if(_0x5a3855[_0x594295(0x1a3)](_0x1f7efb['location'])&&existsSync(_0x1f7efb[_0x594295(0x199)])){if(_0xc1f0b0['rcLwM'](_0x1f7efb[_0x594295(0x1ec)],_0x594295(0x1cb))&&(_0x1f7efb[_0x594295(0x199)]===_0x4133fe||_0xc1f0b0['rcLwM'](_0x1f7efb['path'],_0x2c3c4c))&&!_0xc1f0b0[_0x594295(0x1c7)](hasLegacyProfileFiles,_0x1f7efb['path']))continue;return{'path':_0x1f7efb[_0x594295(0x199)],'location':_0x1f7efb['location']};}}}return null;}function hasLegacyProfileFiles(_0x303132){const _0x2b76b4=_0x2870,_0x1c0c80={'bWMFT':function(_0x497558,_0x173bc2,_0x270ded){return _0x497558(_0x173bc2,_0x270ded);},'XMBlV':function(_0x27da21,_0x535de9){return _0x27da21(_0x535de9);},'hSnUG':'auth.json','NNbGD':function(_0x13c3b9,_0x54fe1b,_0x3708a0){return _0x13c3b9(_0x54fe1b,_0x3708a0);}};return existsSync(_0x1c0c80[_0x2b76b4(0x1fe)](join,_0x303132,_0x2b76b4(0x1a6)))||_0x1c0c80['XMBlV'](existsSync,_0x1c0c80['bWMFT'](join,_0x303132,_0x1c0c80[_0x2b76b4(0x187)]))||existsSync(_0x1c0c80[_0x2b76b4(0x1f2)](join,_0x303132,'auth.json.enc'));}export function isEnvCi(_0x5e5b32){const _0xb1a315=_0x2870,_0x4ca43e={'NwyWJ':function(_0x2cf9f1,_0x224d6d){return _0x2cf9f1(_0x224d6d);},'feJaF':function(_0x413655){return _0x413655();},'AXESz':function(_0x49e186){return _0x49e186();},'HBpEY':function(_0x1455f2,_0x44471c){return _0x1455f2(_0x44471c);},'oSeIR':function(_0x10f3e3,_0x29cc39,_0x59eec7,_0x37a2a0){return _0x10f3e3(_0x29cc39,_0x59eec7,_0x37a2a0);}};if(_0x4ca43e[_0xb1a315(0x1f5)](existsSync,join(_0x4ca43e[_0xb1a315(0x186)](getRangerDir),'ci',_0x5e5b32)))return!![];const _0x1ae2e1=_0x4ca43e[_0xb1a315(0x1bc)](getRangerHomeDir);if(_0x1ae2e1!==getRangerDir()&&_0x4ca43e[_0xb1a315(0x1ad)](existsSync,_0x4ca43e[_0xb1a315(0x195)](join,_0x1ae2e1,'ci',_0x5e5b32)))return!![];return![];}export async function cleanupTempFiles(_0x249131){const _0x521e43=_0x2870,_0x2d77ad={'QBCbA':_0x521e43(0x189)},_0x20570a=[_0x249131['tempAuthPath'],_0x249131[_0x521e43(0x1bf)]][_0x521e43(0x1c6)](Boolean);await Promise[_0x521e43(0x1f9)](_0x20570a[_0x521e43(0x1ef)](_0x449657=>unlink(_0x449657)[_0x521e43(0x194)](_0x90415d=>{_0x90415d['code']!==_0x2d77ad['QBCbA']&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x449657+':',_0x90415d['message']);})));}export function getSettingsPath(_0x52e049){return join(getEnvDir(_0x52e049),'settings.json');}export async function loadSettings(_0x4042d5){const _0x38f22a=_0x2870,_0x1ba57b={'mbWbt':function(_0x40766e,_0x5e8d7c){return _0x40766e(_0x5e8d7c);},'NrVgD':function(_0x427967,_0x3b4353){return _0x427967(_0x3b4353);}},_0x245660=_0x1ba57b[_0x38f22a(0x1a4)](getSettingsPath,_0x4042d5);if(!_0x1ba57b[_0x38f22a(0x1d4)](existsSync,_0x245660))return{};try{const _0x4af592=await readFile(_0x245660,'utf-8');return JSON['parse'](_0x4af592);}catch{return{};}}function _0x1faf(){const _0xcb0a1=['697359dNDggY','ukQxz','wyOSE','cxCjn','env','HBpEY','Failed\x20to\x20decrypt\x20auth\x20state:\x20','storageState','sessions','ubGBj','4LkuMee','allowInsecureLocalhost','11920QNahSD','nsyav','ivvKQ','Lnlfa','6xtCykN','vsQNn','baseUrl','UequY','AXESz','storageStatePath','string','configPath','zzwXo','jGpRp','forWrite','length','jFGrg','.json','filter','kRcFB','nJeBz','BOUdU','GpBMt','legacy','AigSE','ujKCd','OXsJU','locations','DFYMk','stagehand','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','--allow-running-insecure-content','NrVgD','headers','Nbcut','KqkKm','--no-sandbox','hYlEf','1126190HZIdTe','getuid','stringify','40345OnpfMS','entries','NZnIa','auth.json','xWydL','--disable-setuid-sandbox','QhWoK','TmRNF','awkdQ','HmsuO','rangerDir','ZpDuc','setupHeaders','chromium','FoPcg','location','LgvKV','clipboard-read','map','uAKlT','OQohJ','NNbGD','UvLeI','CLjAC','NwyWJ','363414hpsJAF','gbhqo','VlWHB','all','cdpEndpoint','executablePath','-rangerwright.json','abVvB','bWMFT','AvvtT','setupHeader','push','QWljt','endsWith','startsWith','isArray','safeMode','SogKM','bGxJo','1318940OvJxTA','repeat','-cli','extraHTTPHeaders','--allow-insecure-localhost','KxeRT','JLJPE','object','Environment\x20variable\x20','now','userAgent','sWtFm','3098178UFwtzn','feJaF','hSnUG','vision','ENOENT','MffLf','IkxZP','allow','Fvygz','install','GSdMz','sGAUl','none','ZedCK','tkkJO','catch','oSeIR','headless','ranger-auth-','iOjyF','path','IJgBN','tabs','BIYMc','1148PsicjH','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','browser','playwright-cli','args','contextOptions','includes','mbWbt','local','settings.json','OeIfu'];_0x1faf=function(){return _0xcb0a1;};return _0x1faf();}export async function saveSettings(_0x1d7c91,_0x1c5052){const _0x42a7d1=_0x2870,_0x278029={'tkkJO':function(_0xd5a8f9,_0x4c1137){return _0xd5a8f9(_0x4c1137);},'xqZtT':function(_0x2ea1ea,_0x34e6db){return _0x2ea1ea(_0x34e6db);},'zzwXo':function(_0x22f193,_0x47a237,_0x423040){return _0x22f193(_0x47a237,_0x423040);}},_0x713a2f=_0x278029[_0x42a7d1(0x193)](getSettingsPath,_0x1d7c91),_0x5bf5c6=_0x278029['tkkJO'](dirname,_0x713a2f);!_0x278029['xqZtT'](existsSync,_0x5bf5c6)&&await mkdir(_0x5bf5c6,{'recursive':!![]}),await _0x278029[_0x42a7d1(0x1c0)](writeFile,_0x713a2f,JSON['stringify'](_0x1c5052,null,0x2));}export function resolveEnvVars(_0x38969e){const _0x669bd8=_0x2870,_0x3f08d4={'iOjyF':function(_0x3d4779,_0x1e1975){return _0x3d4779===_0x1e1975;}};if(_0x3f08d4['iOjyF'](typeof _0x38969e,'string'))return _0x38969e['replace'](/\$\{(\w+)\}/g,(_0x2afdf5,_0x1ff54b)=>{const _0x5daab8=_0x2870,_0x1cb0d1=process[_0x5daab8(0x1ac)][_0x1ff54b];if(_0x1cb0d1===undefined)throw new Error(_0x5daab8(0x211)+_0x1ff54b+'\x20is\x20not\x20set');return _0x1cb0d1;});if(Array['isArray'](_0x38969e))return _0x38969e['map'](resolveEnvVars);if(_0x38969e&&_0x3f08d4[_0x669bd8(0x198)](typeof _0x38969e,_0x669bd8(0x210)))return Object['fromEntries'](Object['entries'](_0x38969e)[_0x669bd8(0x1ef)](([_0x1e338f,_0x1b8715])=>[_0x1e338f,resolveEnvVars(_0x1b8715)]));return _0x38969e;}const isRecord=_0x5ea167=>typeof _0x5ea167==='object'&&_0x5ea167!==null&&!Array[_0x245011(0x205)](_0x5ea167),asRecord=_0x8a90f4=>isRecord(_0x8a90f4)?_0x8a90f4:undefined,mergeHeaders=(_0x725aec,_0x2b9e70)=>{const _0x2e507e=_0x245011,_0x3f7178={..._0x725aec??{},..._0x2b9e70??{}};return Object['keys'](_0x3f7178)[_0x2e507e(0x1c3)]?_0x3f7178:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x245011(0x1d3),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x245011(0x20d)];export function buildBrowserOptionsFromSettings(_0x3489d8,_0xbfa70b={}){const _0xb7ec9f=_0x245011,_0x42322b={'ubGBj':function(_0x52e639,_0xfd4e57){return _0x52e639(_0xfd4e57);},'uAKlT':function(_0x330f9a,_0x1db025){return _0x330f9a(_0x1db025);},'vTzfe':function(_0x4703c0,_0x50d11c){return _0x4703c0===_0x50d11c;},'XeVKF':function(_0x25469f,_0x11def6){return _0x25469f===_0x11def6;},'kSCJS':function(_0x351496,_0x5afe2e){return _0x351496(_0x5afe2e);}},_0x5b3506=_0x42322b[_0xb7ec9f(0x1b1)](asRecord,_0x3489d8['browser']),_0x4b601b={..._0x42322b[_0xb7ec9f(0x1f0)](asRecord,_0x5b3506?.['launchOptions'])??{}};_0x42322b['vTzfe'](typeof _0xbfa70b['headless'],'boolean')&&(_0x4b601b[_0xb7ec9f(0x196)]=_0xbfa70b['headless']);if(_0x3489d8[_0xb7ec9f(0x206)]){const _0xa52093=_0x4b601b['args']??[],_0x5f073f=SAFE_MODE_ARGS[_0xb7ec9f(0x1c6)](_0x2e0f65=>!_0xa52093['includes'](_0x2e0f65));_0x4b601b['args']=[..._0xa52093,..._0x5f073f];}if(_0x3489d8[_0xb7ec9f(0x1b3)]){const _0x1eedf7=_0x4b601b['args']??[],_0x5af466=ALLOW_LOCALHOST_ARGS['filter'](_0x598e97=>!_0x1eedf7['includes'](_0x598e97));_0x4b601b[_0xb7ec9f(0x1a1)]=[..._0x1eedf7,..._0x5af466];}const _0x1e6511={...asRecord(_0x5b3506?.['contextOptions'])??{}};_0x1e6511['ignoreHTTPSErrors']=!![];_0x42322b['XeVKF'](typeof _0x3489d8[_0xb7ec9f(0x213)],_0xb7ec9f(0x1be))&&(_0x1e6511[_0xb7ec9f(0x213)]=_0x3489d8[_0xb7ec9f(0x213)]);const _0x2c021f=mergeHeaders(_0x42322b['kSCJS'](asRecord,_0x1e6511[_0xb7ec9f(0x20c)]),asRecord(_0x3489d8['headers']));return _0x2c021f?_0x1e6511[_0xb7ec9f(0x20c)]=_0x2c021f:delete _0x1e6511[_0xb7ec9f(0x20c)],_0xbfa70b[_0xb7ec9f(0x1bd)]&&(_0x1e6511['storageState']=_0xbfa70b[_0xb7ec9f(0x1bd)]),{'launchOptions':_0x4b601b,'contextOptions':_0x1e6511};}export async function resolveProfileStorageState(_0x590b24){const _0x20f26d=_0x245011,_0x3e493a={'QhWoK':function(_0x1fc690,_0x1d05a8){return _0x1fc690(_0x1d05a8);}};return resolveLocalAuthPath(_0x3e493a[_0x20f26d(0x1e3)](getEnvDir,_0x590b24));}async function resolveLocalAuthPath(_0x23b542){const _0x434ea3=_0x245011,_0x40415a={'JyJPb':function(_0x5c3eca,_0x259ae3,_0x2e185b){return _0x5c3eca(_0x259ae3,_0x2e185b);},'ujKCd':_0x434ea3(0x1e0),'VlWHB':function(_0x41d6ec,_0x30782b){return _0x41d6ec(_0x30782b);},'hYlEf':function(_0x29e7ec){return _0x29e7ec();},'gcNmO':_0x434ea3(0x1d2),'LTtid':function(_0x7e139b,_0x39cf78){return _0x7e139b(_0x39cf78);},'Lnlfa':function(_0x54ef1e,_0x3193f5,_0x59e32f){return _0x54ef1e(_0x3193f5,_0x59e32f);},'LgvKV':function(_0x186a73){return _0x186a73();},'ukQxz':function(_0x5ed2f8,_0x4ef47d){return _0x5ed2f8(_0x4ef47d);}},_0xb51773=_0x40415a['JyJPb'](join,_0x23b542,'auth.json.enc'),_0x47efdd=join(_0x23b542,_0x40415a[_0x434ea3(0x1cd)]);if(_0x40415a[_0x434ea3(0x1f8)](existsSync,_0xb51773))try{const _0x54fbb9=await _0x40415a[_0x434ea3(0x1d9)](getToken);if(!_0x54fbb9)throw new Error(_0x40415a['gcNmO']);const _0x1b8bde=await _0x40415a['LTtid'](readFile,_0xb51773),_0x4d6664=decrypt(_0x1b8bde,_0x54fbb9),_0x2bc63f=_0x40415a[_0x434ea3(0x1b7)](join,_0x40415a[_0x434ea3(0x1ed)](tmpdir),_0x434ea3(0x197)+Date[_0x434ea3(0x212)]()+_0x434ea3(0x1c5));return await writeFile(_0x2bc63f,_0x4d6664),{'storageStatePath':_0x2bc63f,'tempAuthPath':_0x2bc63f};}catch(_0x5bf784){const _0x36f846=_0x5bf784 instanceof Error?_0x5bf784['message']:_0x40415a[_0x434ea3(0x1a9)](String,_0x5bf784);throw new Error(_0x434ea3(0x1ae)+_0x36f846);}if(existsSync(_0x47efdd))return{'storageStatePath':_0x47efdd};return{};}export async function buildPlaywrightConfig(_0x4cbe19,_0x3c880d,_0xdbf531,_0x14c480,_0x10fa18){const _0xbe6e59=_0x245011,_0x1ba448={'KqkKm':'stagehand','ZedCK':function(_0xc54b65,_0x4af536){return _0xc54b65(_0x4af536);}};if(_0x10fa18)return buildPlaywrightConfigCore(_0x4cbe19,_0x10fa18,_0x3c880d,_0xdbf531,_0x14c480,_0x1ba448[_0xbe6e59(0x1d7)]);const {storageStatePath:_0x317888,tempAuthPath:_0x1c7975}=await resolveLocalAuthPath(getEnvDir(_0x3c880d));try{const _0x2fda45=await buildPlaywrightConfigCore(_0x4cbe19,_0x317888,_0x3c880d,_0xdbf531,_0x14c480,_0x1ba448[_0xbe6e59(0x1d7)]);return{..._0x2fda45,'tempAuthPath':_0x1c7975};}catch(_0x5085ff){_0x1c7975&&await _0x1ba448[_0xbe6e59(0x192)](unlink,_0x1c7975)[_0xbe6e59(0x194)](()=>{});throw _0x5085ff;}}export async function buildPlaywrightConfigCore(_0x2aa8a9,_0x65095c,_0x437a89,_0xc7acb3,_0xe08db6,_0x177b24=_0x245011(0x1d1)){const _0x54a4c5=_0x245011,_0x37daa5={'QWljt':function(_0x404d7b,_0x3348c8,_0x2c35d8){return _0x404d7b(_0x3348c8,_0x2c35d8);},'XLuQi':'--no-sandbox','cvQLu':'clipboard-read','PhcRG':function(_0xbd53c){return _0xbd53c();},'usHkJ':function(_0xe5ee,_0xa6e8bf,_0xed84ef,_0x1841e8){return _0xe5ee(_0xa6e8bf,_0xed84ef,_0x1841e8);},'GbtSz':_0x54a4c5(0x1b0),'TmRNF':'chromium','Nbcut':_0x54a4c5(0x191),'GgRyw':'core','aHZTk':_0x54a4c5(0x19b),'IJgBN':_0x54a4c5(0x18e),'nsyav':'pdf','UUiqz':_0x54a4c5(0x188),'SogKM':_0x54a4c5(0x18c),'KAiQu':function(_0x3f42e7,_0x5de651,_0x50203f){return _0x3f42e7(_0x5de651,_0x50203f);},'Qcrgq':'ranger-config','GpBMt':_0x54a4c5(0x20b)},_0x5db899=_0xc7acb3||_0x37daa5['PhcRG'](randomUUID),_0x19ef48=_0x37daa5['usHkJ'](join,_0x37daa5['PhcRG'](getRangerDir),_0x37daa5['GbtSz'],_0x5db899),_0x2eb7c9=Boolean(_0x2aa8a9['cdpEndpoint']),_0x199f7c=_0x2eb7c9?{'browserName':_0x37daa5[_0x54a4c5(0x1e4)],'cdpEndpoint':_0x2aa8a9[_0x54a4c5(0x1fa)]}:((()=>{const _0x36fa7b=_0x54a4c5,{launchOptions:_0x196a30,contextOptions:_0x34823d}=_0x37daa5[_0x36fa7b(0x202)](buildBrowserOptionsFromSettings,_0x2aa8a9,{'headless':_0xe08db6?![]:_0x2aa8a9['headless']??!![],'storageStatePath':_0x65095c});if(process[_0x36fa7b(0x1db)]?.()===0x0){const _0x44a95f=[_0x37daa5['XLuQi'],_0x36fa7b(0x1e2)],_0x25a8d9=_0x196a30['args']??[],_0x539200=_0x44a95f[_0x36fa7b(0x1c6)](_0x2970a3=>!_0x25a8d9[_0x36fa7b(0x1a3)](_0x2970a3));_0x196a30['args']=[..._0x25a8d9,..._0x539200];}return{'isolated':!![],'browserName':_0x36fa7b(0x1ea),'launchOptions':_0x196a30,'contextOptions':{..._0x34823d,'permissions':[_0x37daa5['cvQLu'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x46bfd0=_0x177b24==='playwright-cli'?{'browser':_0x199f7c,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x19ef48,'outputMode':'file','codegen':_0x37daa5[_0x54a4c5(0x1d6)]}:{'name':_0x437a89,'browser':_0x199f7c,'capabilities':[_0x37daa5['GgRyw'],_0x37daa5['aHZTk'],_0x37daa5[_0x54a4c5(0x19a)],_0x37daa5[_0x54a4c5(0x1b5)],_0x37daa5['UUiqz']],'imageResponses':_0x37daa5[_0x54a4c5(0x207)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x19ef48};if(!_0x2eb7c9){const _0x30516c=_0x46bfd0[_0x54a4c5(0x19f)],_0x528640=_0x30516c['contextOptions'];if(_0x528640['userAgent']===undefined)delete _0x528640[_0x54a4c5(0x213)];if(_0x528640['storageState']===undefined)delete _0x528640[_0x54a4c5(0x1af)];}const _0x5502bb=_0x37daa5['KAiQu'](join,tmpdir(),_0x37daa5['Qcrgq']);!existsSync(_0x5502bb)&&await mkdir(_0x5502bb,{'recursive':!![]});const _0x5badff=_0x177b24===_0x54a4c5(0x1a0)?_0x37daa5[_0x54a4c5(0x1ca)]:'',_0x38c3f4=join(_0x5502bb,_0x437a89+'-'+Date[_0x54a4c5(0x212)]()+_0x5badff+_0x54a4c5(0x1c5));return await _0x37daa5[_0x54a4c5(0x202)](writeFile,_0x38c3f4,JSON['stringify'](_0x46bfd0,null,0x2)),{'configPath':_0x38c3f4,'storageStatePath':_0x65095c};}export async function buildPlaywrightCliConfig(_0x498957,_0x2832c5,_0x54d81f,_0x340e4b,_0x5c61be){const _0x25dd1e=_0x245011,_0x2637c4={'BIYMc':'playwright-cli','AvvtT':function(_0x568544,_0x409c20,_0x2c3207,_0x3ef11a,_0x3cb98c,_0x1582b5,_0x7ef7b){return _0x568544(_0x409c20,_0x2c3207,_0x3ef11a,_0x3cb98c,_0x1582b5,_0x7ef7b);},'BOUdU':function(_0x2e0e7d,_0x1e2b09){return _0x2e0e7d(_0x1e2b09);}};if(_0x5c61be)return buildPlaywrightConfigCore(_0x498957,_0x5c61be,_0x2832c5,_0x54d81f,_0x340e4b,_0x2637c4['BIYMc']);const {storageStatePath:_0x4bfafd,tempAuthPath:_0x143b96}=await resolveLocalAuthPath(getEnvDir(_0x2832c5));try{const _0x30e0e2=await _0x2637c4[_0x25dd1e(0x1ff)](buildPlaywrightConfigCore,_0x498957,_0x4bfafd,_0x2832c5,_0x54d81f,_0x340e4b,_0x2637c4[_0x25dd1e(0x19c)]);return{..._0x30e0e2,'tempAuthPath':_0x143b96};}catch(_0x5e4c8d){_0x143b96&&await _0x2637c4[_0x25dd1e(0x1c9)](unlink,_0x143b96)[_0x25dd1e(0x194)](()=>{});throw _0x5e4c8d;}}export async function buildRangerwrightCliConfig(_0x218278,_0x5195f9,_0x4385b6,_0x18bc7f,_0x485c1d){const _0x13854b=_0x245011,_0x1a7e46={'JgIqS':'--no-sandbox','sGAUl':_0x13854b(0x1ee),'UequY':function(_0x2af4c5){return _0x2af4c5();},'wyOSE':function(_0x2b2bd6,_0x3077ad){return _0x2b2bd6(_0x3077ad);},'OeIfu':function(_0x1821eb,_0x20b840){return _0x1821eb===_0x20b840;},'nJeBz':function(_0x2a2de6,_0x5b72e3,_0x6e7810){return _0x2a2de6(_0x5b72e3,_0x6e7810);},'zulrJ':'ranger-config','RbdhW':function(_0x434de3,_0x3e1d25,_0x5d3823){return _0x434de3(_0x3e1d25,_0x5d3823);}},{storageStatePath:_0x5a2c99,tempAuthPath:_0x330971}=_0x485c1d?{'storageStatePath':_0x485c1d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x5195f9)),_0x3cdb66=_0x4385b6||_0x1a7e46['UequY'](randomUUID),_0x422fb0=join(_0x1a7e46[_0x13854b(0x1bb)](getRangerDir),_0x13854b(0x1b0),_0x3cdb66),_0x8ae689=_0x1a7e46['wyOSE'](Boolean,_0x218278[_0x13854b(0x1fa)]),_0x1df5e4=_0x8ae689?{'browserName':'chromium','cdpEndpoint':_0x218278['cdpEndpoint']}:((()=>{const _0x3ec180=_0x13854b,{launchOptions:_0x340fac,contextOptions:_0x22a6d1}=buildBrowserOptionsFromSettings(_0x218278,{'headless':_0x18bc7f?![]:_0x218278[_0x3ec180(0x196)]??!![],'storageStatePath':_0x5a2c99});if(process[_0x3ec180(0x1db)]?.()===0x0){const _0x2ecf91=[_0x1a7e46['JgIqS'],'--disable-setuid-sandbox'],_0x35b0fe=_0x340fac[_0x3ec180(0x1a1)]??[],_0x2938fd=_0x2ecf91['filter'](_0x25606f=>!_0x35b0fe['includes'](_0x25606f));_0x340fac['args']=[..._0x35b0fe,..._0x2938fd];}return{'browserName':'chromium','launchOptions':_0x340fac,'contextOptions':{..._0x22a6d1,'permissions':[_0x1a7e46[_0x3ec180(0x190)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x8ae689){const _0x3f95ac=_0x1df5e4[_0x13854b(0x1a2)];if(_0x3f95ac){if(_0x1a7e46['OeIfu'](_0x3f95ac[_0x13854b(0x213)],undefined))delete _0x3f95ac[_0x13854b(0x213)];if(_0x1a7e46[_0x13854b(0x1a7)](_0x3f95ac['storageState'],undefined))delete _0x3f95ac[_0x13854b(0x1af)];}}const _0x51233d={'browser':_0x1df5e4,'outputDir':_0x422fb0,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5d0cda;try{const _0x5c9701=_0x1a7e46[_0x13854b(0x1c8)](join,_0x1a7e46['UequY'](tmpdir),_0x1a7e46['zulrJ']);!_0x1a7e46['wyOSE'](existsSync,_0x5c9701)&&await _0x1a7e46['RbdhW'](mkdir,_0x5c9701,{'recursive':!![]}),_0x5d0cda=_0x1a7e46['nJeBz'](join,_0x5c9701,_0x5195f9+'-'+Date[_0x13854b(0x212)]()+_0x13854b(0x1fc)),await writeFile(_0x5d0cda,JSON[_0x13854b(0x1dc)](_0x51233d,null,0x2));}catch(_0x5a31be){_0x330971&&await _0x1a7e46[_0x13854b(0x1aa)](unlink,_0x330971)[_0x13854b(0x194)](()=>{});throw _0x5a31be;}return{'configPath':_0x5d0cda,'storageStatePath':_0x5a2c99,'tempAuthPath':_0x330971,'outputDir':_0x422fb0};}export async function buildNovaActCliConfig(_0x3eda15,_0x3fd44f,_0x3a1de4,_0x40542c,_0x1d6807){const _0x4d7a5d=_0x245011,_0x1958d2={'bGxJo':function(_0x2a0778,_0x1ae3fb){return _0x2a0778(_0x1ae3fb);},'GSdMz':function(_0x2392c5,_0x1a750c){return _0x2392c5(_0x1a750c);},'abVvB':function(_0x3b59d4,_0x421538,_0x3ba59f){return _0x3b59d4(_0x421538,_0x3ba59f);},'KSHoW':'nova-user-data','DFYMk':'Default','yDSnH':function(_0x433263,_0x58b9af){return _0x433263===_0x58b9af;},'ivvKQ':_0x4d7a5d(0x1d8),'UvLeI':_0x4d7a5d(0x1e2),'FoPcg':_0x4d7a5d(0x1be),'awkdQ':function(_0x1348c8,_0xb147f){return _0x1348c8(_0xb147f);}},{storageStatePath:_0x33190b,tempAuthPath:_0x40f812}=_0x1d6807?{'storageStatePath':_0x1d6807,'tempAuthPath':undefined}:await _0x1958d2[_0x4d7a5d(0x208)](resolveLocalAuthPath,_0x1958d2[_0x4d7a5d(0x18f)](getEnvDir,_0x3fd44f)),_0x520971=_0x3a1de4||randomUUID(),_0x555eb9=join(getRangerDir(),_0x4d7a5d(0x1b0),_0x520971),_0x3f5b33=_0x1958d2[_0x4d7a5d(0x1fd)](join,_0x555eb9,_0x1958d2['KSHoW']),_0x2516c6=_0x33190b?join(_0x3f5b33,_0x1958d2[_0x4d7a5d(0x1d0)]):undefined,{launchOptions:_0x41fc58,contextOptions:_0x4f49c2}=_0x1958d2[_0x4d7a5d(0x1fd)](buildBrowserOptionsFromSettings,_0x3eda15,{'headless':_0x40542c?![]:_0x3eda15['headless']??!![],'storageStatePath':_0x33190b});if(_0x1958d2['yDSnH'](process[_0x4d7a5d(0x1db)]?.(),0x0)){const _0x3c5a18=[_0x1958d2[_0x4d7a5d(0x1b6)],_0x1958d2[_0x4d7a5d(0x1f3)]],_0x2b9cbf=_0x41fc58[_0x4d7a5d(0x1a1)]??[],_0x237bce=_0x3c5a18['filter'](_0x11adb0=>!_0x2b9cbf[_0x4d7a5d(0x1a3)](_0x11adb0));_0x41fc58['args']=[..._0x2b9cbf,..._0x237bce];}const _0x2921b2=typeof _0x41fc58[_0x4d7a5d(0x1fb)]===_0x1958d2['FoPcg']?_0x41fc58[_0x4d7a5d(0x1fb)]:_0x33190b?chromium['executablePath']():undefined;return{'storageStatePath':_0x33190b,'tempAuthPath':_0x40f812,'baseUrl':_0x3eda15[_0x4d7a5d(0x1ba)],'headless':_0x1958d2['awkdQ'](Boolean,_0x41fc58[_0x4d7a5d(0x196)]),'userDataDir':_0x3f5b33,'browserProfilePath':_0x2516c6,'executablePath':_0x2921b2,'launchArgs':Array['isArray'](_0x41fc58[_0x4d7a5d(0x1a1)])?_0x41fc58['args'][_0x4d7a5d(0x1c6)](_0x8b6544=>typeof _0x8b6544===_0x4d7a5d(0x1be)):[],'userAgent':typeof _0x4f49c2['userAgent']===_0x1958d2[_0x4d7a5d(0x1eb)]?_0x4f49c2[_0x4d7a5d(0x213)]:undefined,'extraHTTPHeaders':_0x4f49c2[_0x4d7a5d(0x20c)],'allowInsecureLocalhost':_0x1958d2[_0x4d7a5d(0x1e5)](Boolean,_0x3eda15[_0x4d7a5d(0x1b3)]),'safeMode':_0x1958d2[_0x4d7a5d(0x1e5)](Boolean,_0x3eda15['safeMode']),'cdpEndpoint':_0x3eda15[_0x4d7a5d(0x1fa)],'isCdpMode':Boolean(_0x3eda15['cdpEndpoint'])};}export function getNestedValue(_0x2c4c33,_0x23c41d){const _0x5cb340=_0x245011,_0x13b7ff={'IkxZP':function(_0x38ff27,_0x2f8b27){return _0x38ff27!==_0x2f8b27;},'wuOFZ':_0x5cb340(0x210)},_0x2c5aab=parseKeyPath(_0x23c41d);let _0x462f2e=_0x2c4c33;for(const _0x17cba0 of _0x2c5aab){if(_0x462f2e===null||_0x462f2e===undefined||_0x13b7ff[_0x5cb340(0x18b)](typeof _0x462f2e,_0x13b7ff['wuOFZ']))return undefined;_0x462f2e=_0x462f2e[_0x17cba0];}return _0x462f2e;}export function setNestedValue(_0x2a7593,_0x209444,_0x412994){const _0x35b915=_0x245011,_0x345143={'xWydL':function(_0x3b383c,_0x3b2ef8){return _0x3b383c!==_0x3b2ef8;},'KxeRT':_0x35b915(0x210)},_0x1e2f46=parseKeyPath(_0x209444);let _0x25e9f5=_0x2a7593;for(let _0x12ba25=0x0;_0x12ba25<_0x1e2f46[_0x35b915(0x1c3)]-0x1;_0x12ba25++){const _0x486e98=_0x1e2f46[_0x12ba25];(!(_0x486e98 in _0x25e9f5)||_0x345143[_0x35b915(0x1e1)](typeof _0x25e9f5[_0x486e98],_0x345143[_0x35b915(0x20e)]))&&(_0x25e9f5[_0x486e98]={}),_0x25e9f5=_0x25e9f5[_0x486e98];}_0x25e9f5[_0x1e2f46[_0x1e2f46[_0x35b915(0x1c3)]-0x1]]=_0x412994;}export function deleteNestedValue(_0x61fa19,_0x12209a){const _0x137986=_0x245011,_0x1de019={'antuo':function(_0x26af7f,_0x280eae){return _0x26af7f(_0x280eae);},'dfPhf':function(_0x1f7d7c,_0x241be3){return _0x1f7d7c-_0x241be3;},'sWtFm':function(_0x58e2d8,_0x107fcf){return _0x58e2d8===_0x107fcf;},'cxCjn':_0x137986(0x210),'jGpRp':function(_0x560085,_0x82ed15){return _0x560085-_0x82ed15;}},_0x2c7924=_0x1de019['antuo'](parseKeyPath,_0x12209a);let _0x3a6725=_0x61fa19;for(let _0x653919=0x0;_0x653919<_0x1de019['dfPhf'](_0x2c7924[_0x137986(0x1c3)],0x1);_0x653919++){if(_0x3a6725===null||_0x3a6725===undefined||typeof _0x3a6725!==_0x137986(0x210))return![];_0x3a6725=_0x3a6725[_0x2c7924[_0x653919]];}if(_0x1de019[_0x137986(0x214)](_0x3a6725,null)||_0x3a6725===undefined||typeof _0x3a6725!==_0x1de019[_0x137986(0x1ab)])return![];const _0x30cd95=_0x2c7924[_0x1de019[_0x137986(0x1c1)](_0x2c7924[_0x137986(0x1c3)],0x1)];if(_0x30cd95 in _0x3a6725)return delete _0x3a6725[_0x30cd95],!![];return![];}function parseKeyPath(_0x4b3d33){const _0x147fbb=_0x245011,_0x26fc1f={'ZpDuc':function(_0x2160c2,_0x48b11a){return _0x2160c2===_0x48b11a;},'OQohJ':_0x147fbb(0x200)},_0x314c23=_0x4b3d33['split']('.');return _0x26fc1f['ZpDuc'](_0x314c23[0x0],'header')&&(_0x314c23[0x0]=_0x147fbb(0x1d5)),_0x26fc1f[_0x147fbb(0x1e8)](_0x314c23[0x0],_0x26fc1f[_0x147fbb(0x1f1)])&&(_0x314c23[0x0]=_0x147fbb(0x1e9)),_0x314c23;}export function formatSettings(_0x68df3b,_0x490ec6=0x0){const _0x209688=_0x245011,_0x3aee1e={'NNKbl':function(_0x2ea62a,_0x34ca43){return _0x2ea62a===_0x34ca43;}},_0x264a85=[],_0x1ad45a='\x20\x20'[_0x209688(0x20a)](_0x490ec6);for(const [_0x236fb7,_0x3d7236]of Object['entries'](_0x68df3b)){if(_0x3d7236===undefined)continue;if(_0x3aee1e['NNKbl'](typeof _0x3d7236,'object')&&_0x3d7236!==null){_0x264a85[_0x209688(0x201)](''+_0x1ad45a+_0x236fb7+':');for(const [_0x5bb9ac,_0x48e0c9]of Object[_0x209688(0x1de)](_0x3d7236)){_0x264a85['push'](_0x1ad45a+'\x20\x20'+_0x5bb9ac+':\x20'+_0x48e0c9);}}else _0x264a85['push'](''+_0x1ad45a+_0x236fb7+':\x20'+_0x3d7236);}return _0x264a85['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54d108,_0x3e6245){const _0x3d385c=_0xa5d1,_0xb23fce=_0x54d108();while(!![]){try{const _0x1ed2f6=-parseInt(_0x3d385c(0x133))/0x1+-parseInt(_0x3d385c(0x13b))/0x2*(parseInt(_0x3d385c(0x13a))/0x3)+-parseInt(_0x3d385c(0x132))/0x4*(parseInt(_0x3d385c(0x134))/0x5)+-parseInt(_0x3d385c(0x131))/0x6+-parseInt(_0x3d385c(0x135))/0x7*(parseInt(_0x3d385c(0x136))/0x8)+parseInt(_0x3d385c(0x139))/0x9+parseInt(_0x3d385c(0x137))/0xa;if(_0x1ed2f6===_0x3e6245)break;else _0xb23fce['push'](_0xb23fce['shift']());}catch(_0x2cc92e){_0xb23fce['push'](_0xb23fce['shift']());}}}(_0xb9f9,0x4501c));function _0xa5d1(_0x806742,_0x1863af){_0x806742=_0x806742-0x12f;const _0xb9f96c=_0xb9f9();let _0xa5d115=_0xb9f96c[_0x806742];return _0xa5d115;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x9650c4){const _0x457851=_0xa5d1,_0x4d162b={'jucLa':_0x457851(0x12f),'skWbY':function(_0x142da8,_0x42018c,_0x432c33){return _0x142da8(_0x42018c,_0x432c33);},'PFvII':'utf-8'},_0x13e51b=join(__dirname,'..','..',_0x4d162b[_0x457851(0x138)]),_0x503b9d=_0x4d162b['skWbY'](join,_0x13e51b,_0x9650c4);try{return readFileSync(_0x503b9d,_0x4d162b['PFvII']);}catch{return'';}}export function getRangerSkillContent(){const _0x4b077d=_0xa5d1,_0xfce820={'rraTl':function(_0x45cce0,_0x2f1863){return _0x45cce0(_0x2f1863);},'YskPK':'ranger/SKILL.md'};return _0xfce820[_0x4b077d(0x130)](readSkillContent,_0xfce820['YskPK']);}function _0xb9f9(){const _0x1d0472=['37064CoBldL','16228940aAglsZ','jucLa','4110111bnKOvL','183357Xxkrky','16kfdgfQ','skills','rraTl','1334676RFQmQX','168MneeNc','332414bEkddP','39465utFQGc','637LNXYvO'];_0xb9f9=function(){return _0x1d0472;};return _0xb9f9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x23f516=_0x1060;function _0x1060(_0x124d14,_0x19dc6f){_0x124d14=_0x124d14-0x1b4;const _0xd6c284=_0xd6c2();let _0x106087=_0xd6c284[_0x124d14];return _0x106087;}(function(_0x132e7b,_0x4d118d){const _0x5e5633=_0x1060,_0x2b7243=_0x132e7b();while(!![]){try{const _0x478932=parseInt(_0x5e5633(0x1d4))/0x1*(-parseInt(_0x5e5633(0x1bd))/0x2)+-parseInt(_0x5e5633(0x1d3))/0x3*(-parseInt(_0x5e5633(0x1b7))/0x4)+-parseInt(_0x5e5633(0x1b6))/0x5+-parseInt(_0x5e5633(0x1d9))/0x6+parseInt(_0x5e5633(0x1c7))/0x7*(-parseInt(_0x5e5633(0x1c8))/0x8)+parseInt(_0x5e5633(0x1be))/0x9*(parseInt(_0x5e5633(0x1bb))/0xa)+-parseInt(_0x5e5633(0x1bf))/0xb*(-parseInt(_0x5e5633(0x1c3))/0xc);if(_0x478932===_0x4d118d)break;else _0x2b7243['push'](_0x2b7243['shift']());}catch(_0x4c013f){_0x2b7243['push'](_0x2b7243['shift']());}}}(_0xd6c2,0xca1dd));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x23f516(0x1cd)];export const DEPRECATED_SKILLS=[_0x23f516(0x1cf),'bug-bash','feature-tracker'];export async function installSkill(_0x25ab5e,_0x3b4fcd={}){const _0x44ca35=_0x23f516,_0x57242d={'wPGOz':function(_0x1b82da){return _0x1b82da();},'nduWS':function(_0x22aa52,_0x3c6730){return _0x22aa52(_0x3c6730);},'JxnOx':function(_0x2383fa,_0x25d464,_0x249f01){return _0x2383fa(_0x25d464,_0x249f01);},'GcyVt':function(_0x4ec7e0,_0x2570e2){return _0x4ec7e0&&_0x2570e2;},'LGTIW':function(_0x457810,_0x1cd8ee){return _0x457810===_0x1cd8ee;},'wVzBM':function(_0x1a2789,_0x508400){return _0x1a2789(_0x508400);},'BQBUO':function(_0x431949,_0x43bed5,_0x4135e6){return _0x431949(_0x43bed5,_0x4135e6);},'PrcCf':function(_0x3becc9,_0x3e46ff,_0x24cab2){return _0x3becc9(_0x3e46ff,_0x24cab2);},'UfWMK':_0x44ca35(0x1ce),'UUaan':'utf-8','VZqcn':function(_0x4648f4,_0x88bf51,_0x59f0bb,_0x15124a){return _0x4648f4(_0x88bf51,_0x59f0bb,_0x15124a);}},{level:level=_0x44ca35(0x1d8),cliVersion:_0x39c601,platform:platform='claude'}=_0x3b4fcd,_0x42c8df=_0x57242d[_0x44ca35(0x1c1)](getSourceSkillsDir),_0x141bd7=join(_0x42c8df,_0x25ab5e),_0x1bdb39=join(_0x42c8df,_0x25ab5e+'.md'),_0x259097=existsSync(_0x141bd7)&&_0x57242d['nduWS'](statSync,_0x141bd7)[_0x44ca35(0x1cb)]()&&_0x57242d[_0x44ca35(0x1c9)](existsSync,_0x57242d['JxnOx'](join,_0x141bd7,_0x44ca35(0x1ce))),_0x343297=existsSync(_0x1bdb39);if(_0x57242d['GcyVt'](!_0x259097,!_0x343297))return console[_0x44ca35(0x1b8)](_0x44ca35(0x1c2)+_0x25ab5e),![];const _0x923603=_0x57242d[_0x44ca35(0x1cc)](platform,'opencode')?getOpencodeSkillsDir(level):_0x57242d[_0x44ca35(0x1bc)](getSkillsDir,level),_0x1abb87=join(_0x923603,_0x25ab5e);await _0x57242d['BQBUO'](mkdir,_0x1abb87,{'recursive':!![]});let _0x83eda5,_0x5d640d=[];if(_0x259097){const _0x4aee41=await _0x57242d[_0x44ca35(0x1c9)](readdir,_0x141bd7),_0x400d4a=_0x4aee41[_0x44ca35(0x1b5)](_0x19d0e3=>_0x19d0e3[_0x44ca35(0x1b4)]('.md'));for(const _0x550d27 of _0x400d4a){const _0x4f7ab7=_0x57242d[_0x44ca35(0x1c6)](join,_0x141bd7,_0x550d27),_0x185718=join(_0x1abb87,_0x550d27);await copyFile(_0x4f7ab7,_0x185718),_0x5d640d[_0x44ca35(0x1ca)](_0x550d27);}_0x83eda5=await _0x57242d['BQBUO'](readFile,_0x57242d['PrcCf'](join,_0x141bd7,_0x57242d[_0x44ca35(0x1d5)]),_0x44ca35(0x1c0));}else{_0x83eda5=await readFile(_0x1bdb39,_0x57242d['UUaan']);const _0x449e30=join(_0x1abb87,_0x57242d[_0x44ca35(0x1d5)]);await _0x57242d[_0x44ca35(0x1c5)](writeFile,_0x449e30,_0x83eda5,_0x57242d['UUaan']),_0x5d640d['push'](_0x57242d['UfWMK']);}const {name:_0x3f3615}=_0x57242d['nduWS'](parseFrontmatter,_0x83eda5);return console[_0x44ca35(0x1d2)]('\x20\x20Installed\x20skill:\x20'+_0x3f3615),console[_0x44ca35(0x1d2)](_0x44ca35(0x1d7)+_0x1abb87),_0x5d640d['length']>0x1&&console[_0x44ca35(0x1d2)]('\x20\x20Files:\x20'+_0x5d640d['join'](',\x20')),_0x57242d[_0x44ca35(0x1c5)](logLocalAgentInstallation,_0x25ab5e,{'skillDisplayName':_0x3f3615,'installLevel':level},_0x39c601)['catch'](()=>{}),!![];}function _0xd6c2(){const _0x5b2f17=['10022556ZyYhZq','trim','VZqcn','JxnOx','14COqSAT','2158088ZpFNES','nduWS','push','isDirectory','LGTIW','ranger','SKILL.md','e2e-test-recommender','NbZNh','skills','log','878415JLLmgm','4SXsqFj','UfWMK','QsLEM','\x20\x20Location:\x20','project','5782794cwAIkP','endsWith','filter','1365940yvMYfJ','20sHgyqY','warn','\x20\x20Removed\x20deprecated\x20skill:\x20','match','10870jcEqjx','wVzBM','424282QxksIv','2637tnlBbs','22TpRWtb','utf-8','wPGOz','\x20\x20Skill\x20not\x20found:\x20'];_0xd6c2=function(){return _0x5b2f17;};return _0xd6c2();}function getSourceSkillsDir(){const _0x537e01=_0x23f516,_0x292119={'aaQvt':function(_0x322f06,_0x3de0e7,_0x5ec947,_0x3341b4,_0x28b758){return _0x322f06(_0x3de0e7,_0x5ec947,_0x3341b4,_0x28b758);},'NbZNh':function(_0x3408a1,_0x36f5e5){return _0x3408a1(_0x36f5e5);}},_0x418813=[_0x292119['aaQvt'](join,__dirname,'..','..',_0x537e01(0x1d1)),join(__dirname,'..','..','..',_0x537e01(0x1d1))];for(const _0x34a13e of _0x418813){if(_0x292119[_0x537e01(0x1d0)](existsSync,_0x34a13e))return _0x34a13e;}return _0x418813[0x0];}function parseFrontmatter(_0x44758){const _0x18c200=_0x23f516,_0x4b2943={'fbSQP':'Invalid\x20skill\x20frontmatter'},_0x29dde7=_0x44758['match'](/^---\n([\s\S]+?)\n---/);if(!_0x29dde7)throw new Error(_0x4b2943['fbSQP']);const _0x531648=_0x29dde7[0x1],_0x5a76c5=_0x531648['match'](/name:\s*(.+)/),_0x1ff23a=_0x531648[_0x18c200(0x1ba)](/description:\s*"?(.+?)"?\n/);return{'name':_0x5a76c5?.[0x1]['trim']()||'','description':_0x1ff23a?.[0x1][_0x18c200(0x1c4)]()||''};}export async function removeSkill(_0x31e94e,_0x4d9072){const _0x57e597=_0x23f516,_0x4121e5={'CtydY':function(_0x135ebe,_0xc01f6a){return _0x135ebe(_0xc01f6a);},'QsLEM':function(_0xe43b1d,_0x2821ea){return _0xe43b1d(_0x2821ea);}},_0x4b7d4a=_0x4121e5['CtydY'](getSkillsDir,_0x4d9072),_0x2fb471=join(_0x4b7d4a,_0x31e94e);if(!_0x4121e5[_0x57e597(0x1d6)](existsSync,_0x2fb471))return![];try{return await rm(_0x2fb471,{'recursive':!![]}),console['log'](_0x57e597(0x1b9)+_0x31e94e),!![];}catch{return console[_0x57e597(0x1b8)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x31e94e),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x168b9e=_0x3edf;(function(_0x1897de,_0x43128b){const _0x5f0b01=_0x3edf,_0x538ef7=_0x1897de();while(!![]){try{const _0x47b4e3=parseInt(_0x5f0b01(0x212))/0x1*(-parseInt(_0x5f0b01(0x1fe))/0x2)+parseInt(_0x5f0b01(0x1eb))/0x3+-parseInt(_0x5f0b01(0x1fb))/0x4*(parseInt(_0x5f0b01(0x1f4))/0x5)+-parseInt(_0x5f0b01(0x1d6))/0x6+-parseInt(_0x5f0b01(0x1db))/0x7+parseInt(_0x5f0b01(0x218))/0x8+-parseInt(_0x5f0b01(0x213))/0x9*(-parseInt(_0x5f0b01(0x208))/0xa);if(_0x47b4e3===_0x43128b)break;else _0x538ef7['push'](_0x538ef7['shift']());}catch(_0x14b82){_0x538ef7['push'](_0x538ef7['shift']());}}}(_0x1881,0xcd172));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(_0xc5e68b,_0x356fc4){const _0x527c1e=_0x3edf,_0x5c094e={'RpDXj':function(_0x295af2,_0x2b558d){return _0x295af2>=_0x2b558d;},'quGZg':function(_0x388a71,_0x2096dc){return _0x388a71<=_0x2096dc;},'VTEic':function(_0x14672f,_0x192400){return _0x14672f&_0x192400;},'eqUMK':function(_0x4a8db7,_0x381f1a){return _0x4a8db7>_0x381f1a;},'EulbX':function(_0x2ad09b,_0x177e7d){return _0x2ad09b&_0x177e7d;},'QCVMH':function(_0x6e72bc,_0x1bee51){return _0x6e72bc-_0x1bee51;},'CbFyB':function(_0x500cc0,_0x10b8b9){return _0x500cc0+_0x10b8b9;},'rOiqi':function(_0x4fb298,_0x207fff){return _0x4fb298*_0x207fff;}};if(_0x5c094e['RpDXj'](_0x356fc4,_0xc5e68b['length']))return[0x0,0x0];const _0x3dd345=_0xc5e68b[_0x356fc4];let _0x5afe60=0x1,_0x38bc19=0x80;while(_0x5c094e['quGZg'](_0x5afe60,0x8)&&!_0x5c094e['VTEic'](_0x3dd345,_0x38bc19)){_0x5afe60++,_0x38bc19>>=0x1;}if(_0x5c094e[_0x527c1e(0x204)](_0x356fc4+_0x5afe60,_0xc5e68b['length']))return[0x0,0x0];let _0x97df55=_0x5c094e[_0x527c1e(0x20c)](_0x3dd345,_0x5c094e['QCVMH'](_0x38bc19,0x1));for(let _0x3de62b=0x1;_0x3de62b<_0x5afe60;_0x3de62b++){_0x97df55=_0x5c094e[_0x527c1e(0x1dc)](_0x5c094e[_0x527c1e(0x206)](_0x97df55,0x100),_0xc5e68b[_0x5c094e[_0x527c1e(0x1dc)](_0x356fc4,_0x3de62b)]);}return[_0x97df55,_0x5afe60];}function readId(_0xcc6f2,_0x121a18){const _0xf2501=_0x3edf,_0x9ef45d={'svBNx':function(_0x4ee6a0,_0x7a3b2e){return _0x4ee6a0>=_0x7a3b2e;},'fvRwn':function(_0x101fa9,_0x28ac30){return _0x101fa9*_0x28ac30;},'bcHBv':function(_0x1271be,_0x5c563b){return _0x1271be+_0x5c563b;}};if(_0x121a18>=_0xcc6f2['length'])return[0x0,0x0];const _0x5421e2=_0xcc6f2[_0x121a18];let _0x571329;if(_0x5421e2>=0x80)_0x571329=0x1;else{if(_0x5421e2>=0x40)_0x571329=0x2;else{if(_0x5421e2>=0x20)_0x571329=0x3;else{if(_0x9ef45d[_0xf2501(0x209)](_0x5421e2,0x10))_0x571329=0x4;else return[_0x5421e2,0x1];}}}if(_0x121a18+_0x571329>_0xcc6f2['length'])return[0x0,0x0];let _0x21df9b=0x0;for(let _0x16009f=0x0;_0x16009f<_0x571329;_0x16009f++){_0x21df9b=_0x9ef45d[_0xf2501(0x1e6)](_0x21df9b,0x100)+_0xcc6f2[_0x9ef45d[_0xf2501(0x1f6)](_0x121a18,_0x16009f)];}return[_0x21df9b,_0x571329];}function readUint(_0xb9153a,_0x4805ae,_0x534c66){const _0x370afb=_0x3edf,_0x4baea6={'UiqpU':function(_0x281313,_0x318e3e){return _0x281313*_0x318e3e;},'iKXbk':function(_0x1f3142,_0x468c02){return _0x1f3142+_0x468c02;}};let _0x120320=0x0;for(let _0x4dec5b=0x0;_0x4dec5b<_0x534c66;_0x4dec5b++){_0x120320=_0x4baea6['UiqpU'](_0x120320,0x100)+_0xb9153a[_0x4baea6[_0x370afb(0x211)](_0x4805ae,_0x4dec5b)];}return _0x120320;}function isUnknownSize(_0x1aad58,_0x27b495){const _0x5b3882=_0x3edf,_0x5a50bd={'VOSeq':function(_0xf93055,_0x3da11a){return _0xf93055===_0x3da11a;}};return _0x5a50bd['VOSeq'](_0x1aad58,Math[_0x5b3882(0x1fc)](0x2,0x7*_0x27b495)-0x1);}function writeVint(_0x2f8542,_0x244cf6){const _0x512031=_0x3edf,_0x12fd94={'zvPEb':function(_0x182423,_0x2477e1){return _0x182423&_0x2477e1;},'DLwKM':function(_0x3561cf,_0x2c55ea){return _0x3561cf-_0x2c55ea;}};let _0x1fcb85=_0x244cf6||0x1;while(Math[_0x512031(0x1fc)](0x2,0x7*_0x1fcb85)-0x2<_0x2f8542)_0x1fcb85++;const _0x25fee6=Buffer[_0x512031(0x1e5)](_0x1fcb85);for(let _0x2466c4=_0x1fcb85-0x1;_0x2466c4>=0x0;_0x2466c4--){_0x25fee6[_0x2466c4]=_0x12fd94[_0x512031(0x1e3)](_0x2f8542,0xff),_0x2f8542=Math[_0x512031(0x1e8)](_0x2f8542/0x100);}return _0x25fee6[0x0]|=0x1<<_0x12fd94[_0x512031(0x1fd)](0x8,_0x1fcb85),_0x25fee6;}function writeUint(_0x48f498,_0x53fdb4){const _0x3317ba=_0x3edf,_0x19181b={'VNRPw':function(_0x4664b8,_0x2b02f7){return _0x4664b8>=_0x2b02f7;}},_0x5cff66=Buffer[_0x3317ba(0x1e5)](_0x53fdb4);for(let _0x2b857f=_0x53fdb4-0x1;_0x19181b[_0x3317ba(0x202)](_0x2b857f,0x0);_0x2b857f--){_0x5cff66[_0x2b857f]=_0x48f498&0xff,_0x48f498=Math['floor'](_0x48f498/0x100);}return _0x5cff66;}function writeUnknownSizeVint(_0x55685c){const _0x386881={'usZSN':function(_0x44aee3,_0x3f0e7a){return _0x44aee3>>_0x3f0e7a;}},_0x4dfd75=Buffer['alloc'](_0x55685c,0xff);return _0x4dfd75[0x0]=_0x386881['usZSN'](0xff,_0x55685c-0x1),_0x4dfd75;}function uintSize(_0x2f6217){const _0x33007c=_0x3edf,_0x30d13f={'gUCat':function(_0x73e9a0,_0x2fb36f){return _0x73e9a0===_0x2fb36f;}};if(_0x30d13f[_0x33007c(0x219)](_0x2f6217,0x0))return 0x1;let _0x2c270e=0x0,_0x4a1baf=_0x2f6217;while(_0x4a1baf>0x0){_0x2c270e++,_0x4a1baf=Math['floor'](_0x4a1baf/0x100);}return _0x2c270e;}function findTimestampScale(_0x3f21f7,_0x3209bc){const _0x4975cd=_0x3edf,_0x67666c={'swtnu':function(_0x37948c,_0x25b609){return _0x37948c+_0x25b609;},'CqlOH':function(_0x2807c7,_0x28421e){return _0x2807c7<_0x28421e;},'vZQoR':function(_0x4d004d,_0x3539ac){return _0x4d004d<_0x3539ac;},'WviNO':function(_0x28e7b9,_0x2215f1,_0xfd9336){return _0x28e7b9(_0x2215f1,_0xfd9336);},'TaoGx':function(_0x4db7ff,_0x4c444b,_0x3901c6){return _0x4db7ff(_0x4c444b,_0x3901c6);},'JYZrF':function(_0x1e5c8b,_0x1343c8){return _0x1e5c8b===_0x1343c8;},'mnOwi':function(_0x517ecc,_0x687541){return _0x517ecc+_0x687541;},'qIWrb':function(_0x44f2a4,_0xd942aa){return _0x44f2a4+_0xd942aa;}};let _0x9eac46=_0x3209bc;const _0x3ea0be=Math['min'](_0x3f21f7['length'],_0x67666c[_0x4975cd(0x205)](_0x3209bc,0x2710));while(_0x67666c['CqlOH'](_0x9eac46,_0x3ea0be)){const [_0x3146ea,_0x1f1453]=readId(_0x3f21f7,_0x9eac46),[_0x2339a5,_0x555174]=readVint(_0x3f21f7,_0x67666c[_0x4975cd(0x205)](_0x9eac46,_0x1f1453));if(_0x3146ea===ID_INFO){let _0x29269e=_0x67666c[_0x4975cd(0x205)](_0x9eac46,_0x1f1453)+_0x555174;const _0x58968d=_0x29269e+_0x2339a5;while(_0x67666c['vZQoR'](_0x29269e,_0x58968d)){const [_0x3121ad,_0x55cbed]=_0x67666c[_0x4975cd(0x20d)](readId,_0x3f21f7,_0x29269e),[_0x1cb2b5,_0x23a354]=_0x67666c[_0x4975cd(0x1f0)](readVint,_0x3f21f7,_0x29269e+_0x55cbed);if(_0x67666c['JYZrF'](_0x3121ad,ID_TIMESTAMP_SCALE))return readUint(_0x3f21f7,_0x67666c['swtnu'](_0x29269e,_0x55cbed)+_0x23a354,_0x1cb2b5);_0x29269e+=_0x67666c['mnOwi'](_0x67666c[_0x4975cd(0x216)](_0x55cbed,_0x23a354),_0x1cb2b5);}break;}if(_0x67666c[_0x4975cd(0x1e7)](_0x3146ea,ID_CLUSTER))break;if(isUnknownSize(_0x2339a5,_0x555174))break;_0x9eac46+=_0x1f1453+_0x555174+_0x2339a5;}return 0xf4240;}function _0x1881(){const _0x428dad=['slice','\x20files\x20->\x20','iKXbk','7151RfjUeH','24300819yIssGx','readInt16BE','max','qIWrb','qLYPK','12821944qmIEps','gUCat','concat','UdTru','sajCy','CeoXf','4841730oFdfTE','JObwx','log','Stitched\x20','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','2366756NGYLCN','CbFyB','from','jbKYP','clusters','JmQgo','mlrdL','uwnXq','zvPEb','vROHz','alloc','fvRwn','JYZrF','floor','NYEzV','aSyzc','1332975RTPNNU','Vhgou','length','lMvYT','XZrzQ','TaoGx','LSOpX','bodyBeforeTimestamp','VtsxC','7302820aZBRNj','maxTimestampTicks','bcHBv','JyydD','exit','odsdv','stitchWebmFiles.ts','4zGKPhr','pow','DLwKM','364VudiFj','LkdAr','push','fklRb','VNRPw','error','eqUMK','swtnu','rOiqi','UWvta','10mlOJNo','svBNx','indexOf','XVJMx','EulbX','WviNO','endsWith'];_0x1881=function(){return _0x428dad;};return _0x1881();}function findFirstClusterOffset(_0xb59eba,_0x3c6d1a){const _0x2ebb0c=_0x3edf,_0x112b5c={'XZrzQ':function(_0x51f622,_0x48f73b,_0x3fa2f8){return _0x51f622(_0x48f73b,_0x3fa2f8);},'sajCy':function(_0xa1b2ec,_0x1dbc44){return _0xa1b2ec===_0x1dbc44;},'cQHRP':function(_0x3bc0fb,_0x38c163,_0x33698c){return _0x3bc0fb(_0x38c163,_0x33698c);},'UWvta':function(_0x55fa83,_0x5d1946){return _0x55fa83+_0x5d1946;},'lMvYT':function(_0x4b12d4,_0x2af46c,_0x57ed1d){return _0x4b12d4(_0x2af46c,_0x57ed1d);},'LSOpX':function(_0x1d6f8a,_0x5e4557){return _0x1d6f8a+_0x5e4557;}};let _0x9c6291=_0x3c6d1a;while(_0x9c6291<_0xb59eba[_0x2ebb0c(0x1ed)]){const [_0x24570b,_0x2f6a95]=_0x112b5c[_0x2ebb0c(0x1ef)](readId,_0xb59eba,_0x9c6291);if(_0x112b5c[_0x2ebb0c(0x21c)](_0x24570b,ID_CLUSTER))return _0x9c6291;const [_0x3bd314,_0x54c8a0]=_0x112b5c['cQHRP'](readVint,_0xb59eba,_0x112b5c[_0x2ebb0c(0x207)](_0x9c6291,_0x2f6a95));if(_0x112b5c[_0x2ebb0c(0x1ee)](isUnknownSize,_0x3bd314,_0x54c8a0))return _0x9c6291;_0x9c6291+=_0x112b5c[_0x2ebb0c(0x1f1)](_0x2f6a95+_0x54c8a0,_0x3bd314);}return _0xb59eba[_0x2ebb0c(0x1ed)];}function findClusterEnd(_0x533cb3,_0x280103,_0x11fcca,_0x511d14){const _0x3a6b3b=_0x3edf,_0x12d46d={'qLYPK':function(_0x1aca96,_0x48e7da,_0x2019fa){return _0x1aca96(_0x48e7da,_0x2019fa);},'odsdv':function(_0x3cfc15,_0x120d4d){return _0x3cfc15+_0x120d4d;}};if(!_0x12d46d[_0x3a6b3b(0x217)](isUnknownSize,_0x11fcca,_0x511d14))return _0x12d46d['odsdv'](_0x280103,_0x11fcca);const _0x4c9f27=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x45466f=_0x280103;while(_0x45466f<_0x533cb3['length']-0x4){const [_0x45de97,_0x3b0135]=readId(_0x533cb3,_0x45466f);if(_0x4c9f27['has'](_0x45de97))return _0x45466f;const [_0x45198d,_0x1e7ebb]=_0x12d46d[_0x3a6b3b(0x217)](readVint,_0x533cb3,_0x45466f+_0x3b0135);if(isUnknownSize(_0x45198d,_0x1e7ebb))return _0x533cb3['length'];_0x45466f+=_0x12d46d[_0x3a6b3b(0x1f9)](_0x3b0135+_0x1e7ebb,_0x45198d);}return _0x533cb3['length'];}function extractClusters(_0x4c27d1,_0x4ba8cd){const _0x33af2f=_0x3edf,_0xfc0c3c={'fklRb':function(_0x9fe31a,_0x2b4425){return _0x9fe31a<_0x2b4425;},'qAzKT':function(_0x49f52c,_0x2a68ba){return _0x49f52c===_0x2a68ba;},'aXyqu':function(_0x49ce93,_0x2547d9,_0x229bf0){return _0x49ce93(_0x2547d9,_0x229bf0);},'ViLrF':function(_0x3e9b7a,_0x96ad19,_0x4abbdd){return _0x3e9b7a(_0x96ad19,_0x4abbdd);},'CeoXf':function(_0x16e7c8,_0x13c4de){return _0x16e7c8+_0x13c4de;},'ZfLDq':function(_0xbbfd66,_0x54ae93,_0x34eea0,_0x71eb1d){return _0xbbfd66(_0x54ae93,_0x34eea0,_0x71eb1d);},'UdTru':function(_0x192d79,_0x165788){return _0x192d79+_0x165788;},'PSTNm':function(_0x26cf8e,_0x287f80){return _0x26cf8e===_0x287f80;},'fUUEP':function(_0x36f78c,_0x158768,_0x24bf2e){return _0x36f78c(_0x158768,_0x24bf2e);},'IMLIH':function(_0x4b333e,_0x1be562){return _0x4b333e>=_0x1be562;},'lyUqs':function(_0x22d613,_0xe13dc4){return _0x22d613+_0xe13dc4;},'jbKYP':function(_0x5a57ed,_0x38e1eb){return _0x5a57ed>_0x38e1eb;},'mlrLs':function(_0x524fd6,_0x359d98){return _0x524fd6===_0x359d98;}},_0x461113=[],_0x54d324=Buffer[_0x33af2f(0x1dd)]([0x1f,0x43,0xb6,0x75]);let _0x1e80a1=0x0;while(_0xfc0c3c['fklRb'](_0x1e80a1,_0x4c27d1['length'])){const _0x3a26e1=_0x4c27d1[_0x33af2f(0x20a)](_0x54d324,_0x1e80a1);if(_0xfc0c3c['qAzKT'](_0x3a26e1,-0x1))break;const [_0x2bdebb,_0x32ea55]=readId(_0x4c27d1,_0x3a26e1);if(_0x2bdebb!==ID_CLUSTER){_0x1e80a1=_0x3a26e1+0x1;continue;}const [_0x1af3be,_0x266e3e]=_0xfc0c3c['aXyqu'](readVint,_0x4c27d1,_0x3a26e1+_0x32ea55),_0x39b5cb=_0x3a26e1+_0x32ea55+_0x266e3e,_0x340fa8=findClusterEnd(_0x4c27d1,_0x39b5cb,_0x1af3be,_0x266e3e);let _0x4e1a03=_0x39b5cb,_0x1d1963=0x0,_0x456a46=0x2,_0x1a5ae2=![],_0x1d3bdf=Buffer['alloc'](0x0),_0x34648f=Buffer[_0x33af2f(0x1e5)](0x0);while(_0xfc0c3c[_0x33af2f(0x201)](_0x4e1a03,_0x340fa8)){const [_0x56e5c4,_0x49a7b2]=readId(_0x4c27d1,_0x4e1a03),[_0x978a56,_0x30edc9]=_0xfc0c3c['ViLrF'](readVint,_0x4c27d1,_0xfc0c3c[_0x33af2f(0x21d)](_0x4e1a03,_0x49a7b2));if(_0x56e5c4===ID_TIMESTAMP){_0x1d1963=_0xfc0c3c['ZfLDq'](readUint,_0x4c27d1,_0xfc0c3c['CeoXf'](_0x4e1a03,_0x49a7b2)+_0x30edc9,_0x978a56),_0x456a46=_0x978a56,_0x1a5ae2=!![],_0x1d3bdf=_0x4c27d1['slice'](_0x39b5cb,_0x4e1a03);const _0x52b11a=_0xfc0c3c['CeoXf'](_0xfc0c3c[_0x33af2f(0x21b)](_0x4e1a03,_0x49a7b2)+_0x30edc9,_0x978a56);_0x34648f=_0x4c27d1[_0x33af2f(0x20f)](_0x52b11a,_0x340fa8);break;}if(_0xfc0c3c['PSTNm'](_0x56e5c4,ID_CLUSTER))break;if(_0xfc0c3c['fUUEP'](isUnknownSize,_0x978a56,_0x30edc9))break;_0x4e1a03+=_0x49a7b2+_0x30edc9+_0x978a56;}!_0x1a5ae2&&(_0x34648f=_0x4c27d1['slice'](_0x39b5cb,_0x340fa8));let _0x2c00eb=_0x1d1963;_0x4e1a03=_0x39b5cb;while(_0xfc0c3c['fklRb'](_0x4e1a03,_0x340fa8)){const [_0x2a9195,_0x21c236]=readId(_0x4c27d1,_0x4e1a03),[_0x21aa07,_0x505d7d]=_0xfc0c3c['fUUEP'](readVint,_0x4c27d1,_0x4e1a03+_0x21c236);if(_0xfc0c3c['PSTNm'](_0x2a9195,ID_SIMPLE_BLOCK)&&_0xfc0c3c['IMLIH'](_0x21aa07,0x4)){const _0x1e8719=_0xfc0c3c['UdTru'](_0x4e1a03+_0x21c236,_0x505d7d),[,_0x5c531c]=readVint(_0x4c27d1,_0x1e8719),_0x15d872=_0x4c27d1[_0x33af2f(0x214)](_0xfc0c3c['lyUqs'](_0x1e8719,_0x5c531c)),_0x11d88b=_0xfc0c3c[_0x33af2f(0x21b)](_0x1d1963,_0x15d872);if(_0xfc0c3c[_0x33af2f(0x1de)](_0x11d88b,_0x2c00eb))_0x2c00eb=_0x11d88b;}if(_0xfc0c3c['mlrLs'](_0x2a9195,ID_CLUSTER))break;if(isUnknownSize(_0x21aa07,_0x505d7d))break;_0x4e1a03+=_0x21c236+_0x505d7d+_0x21aa07;}_0x461113['push']({'timestamp':_0x1d1963,'maxTicks':_0x2c00eb,'bodyBeforeTimestamp':_0x1d3bdf,'bodyAfterTimestamp':_0x34648f,'timestampElementSize':_0x456a46}),_0x1e80a1=_0x340fa8;}return _0x461113;}function parseWebm(_0x10e1fc){const _0x5f007c=_0x3edf,_0x1117f4={'JyydD':function(_0xe0e6dd,_0x2c7d34,_0xd021c0){return _0xe0e6dd(_0x2c7d34,_0xd021c0);},'VtsxC':function(_0x283bd7,_0x45d336){return _0x283bd7+_0x45d336;},'LVsYc':function(_0x67b76f,_0x2780db){return _0x67b76f+_0x2780db;},'ZJJeD':function(_0x2b3458,_0x31f63d,_0x3ea89e){return _0x2b3458(_0x31f63d,_0x3ea89e);},'aSyzc':function(_0x4ee050,_0x2e0ec2){return _0x4ee050>_0x2e0ec2;}};let _0x552b98=0x0;const [,_0x55bb10]=_0x1117f4['JyydD'](readId,_0x10e1fc,_0x552b98),[_0x2384a8,_0x462df9]=_0x1117f4[_0x5f007c(0x1f7)](readVint,_0x10e1fc,_0x1117f4[_0x5f007c(0x1f3)](_0x552b98,_0x55bb10));_0x552b98+=_0x55bb10+_0x462df9+_0x2384a8;const [_0x21d8f5,_0x3c237c]=readId(_0x10e1fc,_0x552b98);if(_0x21d8f5!==ID_SEGMENT)return null;const [,_0x431767]=readVint(_0x10e1fc,_0x1117f4['LVsYc'](_0x552b98,_0x3c237c)),_0x1704d7=_0x1117f4['VtsxC'](_0x552b98,_0x3c237c)+_0x431767,_0x42b825=_0x1117f4['JyydD'](findTimestampScale,_0x10e1fc,_0x1704d7),_0x1a7076=findFirstClusterOffset(_0x10e1fc,_0x1704d7),_0x3636a9=_0x10e1fc['slice'](0x0,_0x1a7076),_0x35b0e7=_0x1117f4['ZJJeD'](extractClusters,_0x10e1fc,_0x42b825);let _0x182a11=0x0;for(const _0xf0fc22 of _0x35b0e7){if(_0x1117f4[_0x5f007c(0x1ea)](_0xf0fc22['maxTicks'],_0x182a11))_0x182a11=_0xf0fc22['maxTicks'];}return{'header':_0x3636a9,'clusters':_0x35b0e7,'timestampScale':_0x42b825,'maxTimestampTicks':_0x182a11};}function _0x3edf(_0x4fe17a,_0x513f76){_0x4fe17a=_0x4fe17a-0x1d6;const _0x18816e=_0x1881();let _0x3edff9=_0x18816e[_0x4fe17a];return _0x3edff9;}function buildCluster(_0x127a02,_0x573694,_0x2b9c41){const _0x10ccf1=_0x3edf,_0x12008f={'UgKCv':function(_0x1a34f9,_0x41968a){return _0x1a34f9(_0x41968a);},'fYHdD':function(_0x2a675d,_0x53bbc9){return _0x2a675d(_0x53bbc9);}},_0x49679e=Buffer[_0x10ccf1(0x1dd)]([0x1f,0x43,0xb6,0x75]),_0x4bed1a=Math[_0x10ccf1(0x215)](0x4,_0x12008f['UgKCv'](uintSize,_0x127a02)),_0x24d3ef=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x12008f['fYHdD'](writeVint,_0x4bed1a),writeUint(_0x127a02,_0x4bed1a)]),_0x16fa4e=Buffer['concat']([_0x573694,_0x24d3ef,_0x2b9c41]),_0x1d8d9a=_0x12008f['UgKCv'](writeVint,_0x16fa4e[_0x10ccf1(0x1ed)]);return Buffer[_0x10ccf1(0x21a)]([_0x49679e,_0x1d8d9a,_0x16fa4e]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x11c584){const _0x2d24f5=_0x3edf,_0x3181d7={'mlrdL':function(_0x154194,_0x3df4e7,_0x13fe21){return _0x154194(_0x3df4e7,_0x13fe21);},'uwnXq':function(_0x230dde,_0x2cea92){return _0x230dde+_0x2cea92;},'vROHz':function(_0xf724ec,_0x24cccd){return _0xf724ec+_0x24cccd;},'JObwx':function(_0x4038fc,_0x3526a8){return _0x4038fc+_0x3526a8;},'AnfCC':function(_0xeec4b0,_0x591c31){return _0xeec4b0+_0x591c31;},'JmQgo':function(_0x70ed3e,_0xf58f5b){return _0x70ed3e+_0xf58f5b;},'NYEzV':function(_0x5e38ed,_0x1d4239){return _0x5e38ed<_0x1d4239;},'mKXGj':function(_0x267253,_0xd70782,_0xcea94a){return _0x267253(_0xd70782,_0xcea94a);},'Vhgou':function(_0x3b69b9,_0x1a3610){return _0x3b69b9+_0x1a3610;},'LkdAr':function(_0x2864b0,_0x5288eb){return _0x2864b0+_0x5288eb;},'LxqeU':function(_0x34d232,_0x245d8f){return _0x34d232!==_0x245d8f;},'Oxxok':function(_0x9b5b17,_0x3896c2,_0xd49739){return _0x9b5b17(_0x3896c2,_0xd49739);}},_0x41a0ea=Buffer[_0x2d24f5(0x1dd)](_0x11c584);let _0x178465=0x0;const [,_0x307aed]=_0x3181d7[_0x2d24f5(0x1e1)](readId,_0x41a0ea,_0x178465),[_0x2d7318,_0x6b5607]=readVint(_0x41a0ea,_0x3181d7[_0x2d24f5(0x1e2)](_0x178465,_0x307aed)),_0x1f9c5e=_0x3181d7[_0x2d24f5(0x1e4)](_0x3181d7[_0x2d24f5(0x1e4)](_0x178465,_0x307aed)+_0x6b5607,_0x2d7318),[,_0x249399]=readId(_0x41a0ea,_0x1f9c5e),[,_0x3c8449]=_0x3181d7['mlrdL'](readVint,_0x41a0ea,_0x1f9c5e+_0x249399),_0x334e30=_0x3181d7['JObwx'](_0x1f9c5e,_0x249399)+_0x3c8449,_0x183012=writeUnknownSizeVint(_0x3c8449);_0x183012['copy'](_0x41a0ea,_0x3181d7['AnfCC'](_0x1f9c5e,_0x249399));let _0x11f4d7=_0x334e30;const _0x25dbe8=Math['min'](_0x41a0ea[_0x2d24f5(0x1ed)],_0x3181d7[_0x2d24f5(0x1e0)](_0x334e30,0x2710));while(_0x3181d7[_0x2d24f5(0x1e9)](_0x11f4d7,_0x25dbe8)){const [_0x405f9e,_0x318d14]=readId(_0x41a0ea,_0x11f4d7),[_0x4f43f0,_0x22a232]=readVint(_0x41a0ea,_0x11f4d7+_0x318d14);if(_0x405f9e===ID_CLUSTER)break;if(isUnknownSize(_0x4f43f0,_0x22a232))break;if(_0x405f9e===ID_INFO){const _0x4a9cf1=_0x11f4d7+_0x318d14+_0x22a232,_0x184d6a=_0x3181d7['uwnXq'](_0x4a9cf1,_0x4f43f0),_0x493dcd=[];let _0x400fe1=_0x4a9cf1;while(_0x3181d7[_0x2d24f5(0x1e9)](_0x400fe1,_0x184d6a)){const [_0x180038,_0x3751de]=_0x3181d7['mlrdL'](readId,_0x41a0ea,_0x400fe1),[_0x4f4546,_0x5e6767]=_0x3181d7['mKXGj'](readVint,_0x41a0ea,_0x3181d7[_0x2d24f5(0x1ec)](_0x400fe1,_0x3751de)),_0x1f9033=_0x3181d7[_0x2d24f5(0x1ff)](_0x3751de+_0x5e6767,_0x4f4546);_0x3181d7['LxqeU'](_0x180038,ID_DURATION)&&_0x493dcd[_0x2d24f5(0x200)](_0x41a0ea[_0x2d24f5(0x20f)](_0x400fe1,_0x3181d7['AnfCC'](_0x400fe1,_0x1f9033))),_0x400fe1+=_0x1f9033;}const _0x3579c7=Buffer[_0x2d24f5(0x21a)](_0x493dcd),_0x5ed12d=Buffer[_0x2d24f5(0x21a)]([_0x41a0ea[_0x2d24f5(0x20f)](_0x11f4d7,_0x11f4d7+_0x318d14),_0x3181d7['Oxxok'](writeVint,_0x3579c7['length'],_0x22a232)]);return Buffer['concat']([_0x41a0ea[_0x2d24f5(0x20f)](0x0,_0x11f4d7),_0x5ed12d,_0x3579c7,_0x41a0ea[_0x2d24f5(0x20f)](_0x184d6a)]);}_0x11f4d7+=_0x3181d7[_0x2d24f5(0x1d7)](_0x318d14+_0x22a232,_0x4f43f0);}return _0x41a0ea;}export function stitchWebmFiles(_0x8925a6,_0x2ebaef){const _0x5e74f8=_0x3edf,_0x5beb66={'BJauA':function(_0x17b72d,_0x24a1ab){return _0x17b72d<=_0x24a1ab;},'NeUPS':function(_0x40f751,_0x587fd2){return _0x40f751===_0x587fd2;},'chdYv':function(_0x15ceea,_0x51d057){return _0x15ceea(_0x51d057);},'XvbfA':function(_0x498b6c,_0x506939){return _0x498b6c<_0x506939;},'XVJMx':function(_0x55a92c,_0x4562b7){return _0x55a92c+_0x4562b7;}};if(_0x5beb66['BJauA'](_0x8925a6[_0x5e74f8(0x1ed)],0x1))return![];const _0x504c90=[];for(const _0x598ba2 of _0x8925a6){const _0x1da989=readFileSync(_0x598ba2),_0x1c42ee=parseWebm(_0x1da989);if(!_0x1c42ee||_0x5beb66['NeUPS'](_0x1c42ee[_0x5e74f8(0x1df)]['length'],0x0))return![];_0x504c90['push'](_0x1c42ee);}const _0x1066d9=_0x504c90[0x0],_0x7ed507=_0x5beb66['chdYv'](rebuildHeaderWithoutDuration,_0x1066d9['header']),_0x1948ef=[_0x7ed507];let _0x3fe244=0x0;for(let _0x676f47=0x0;_0x5beb66['XvbfA'](_0x676f47,_0x504c90['length']);_0x676f47++){const _0x2df257=_0x504c90[_0x676f47];for(const _0x44a863 of _0x2df257['clusters']){const _0x57dd4c=_0x5beb66[_0x5e74f8(0x20b)](_0x44a863['timestamp'],_0x3fe244);_0x1948ef['push'](buildCluster(_0x57dd4c,_0x44a863[_0x5e74f8(0x1f2)],_0x44a863['bodyAfterTimestamp']));}const _0x38e076=0x1e;_0x3fe244+=_0x2df257[_0x5e74f8(0x1f5)]+_0x38e076;}return writeFileSync(_0x2ebaef,Buffer[_0x5e74f8(0x21a)](_0x1948ef)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x168b9e(0x1fa))||process['argv'][0x1]?.[_0x168b9e(0x20e)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console[_0x168b9e(0x203)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x168b9e(0x1f8)](0x1));const output=args[args[_0x168b9e(0x1ed)]-0x1],inputs=args[_0x168b9e(0x20f)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x168b9e(0x1d9)+inputs['length']+_0x168b9e(0x210)+output):console[_0x168b9e(0x1d8)](_0x168b9e(0x1da));}
|
|
1
|
+
const _0x562a20=_0x277d;(function(_0x1db26b,_0x5f417d){const _0x4bcd81=_0x277d,_0x5a2822=_0x1db26b();while(!![]){try{const _0x367676=-parseInt(_0x4bcd81(0xbe))/0x1*(-parseInt(_0x4bcd81(0x8c))/0x2)+-parseInt(_0x4bcd81(0xcd))/0x3+parseInt(_0x4bcd81(0x9e))/0x4+parseInt(_0x4bcd81(0x9a))/0x5+-parseInt(_0x4bcd81(0xc3))/0x6+parseInt(_0x4bcd81(0xc1))/0x7+-parseInt(_0x4bcd81(0xb5))/0x8;if(_0x367676===_0x5f417d)break;else _0x5a2822['push'](_0x5a2822['shift']());}catch(_0x4e830d){_0x5a2822['push'](_0x5a2822['shift']());}}}(_0x54cf,0x41ea8));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(_0x337ab6,_0x4c8752){const _0xa1524a=_0x277d,_0x3170a0={'hbuXe':function(_0x3b31e5,_0x47af53){return _0x3b31e5&_0x47af53;},'bMRUl':function(_0xd3d303,_0x3f9628){return _0xd3d303+_0x3f9628;}};if(_0x4c8752>=_0x337ab6[_0xa1524a(0xc9)])return[0x0,0x0];const _0x4a2683=_0x337ab6[_0x4c8752];let _0x371bc1=0x1,_0x1fb5bc=0x80;while(_0x371bc1<=0x8&&!_0x3170a0[_0xa1524a(0xd4)](_0x4a2683,_0x1fb5bc)){_0x371bc1++,_0x1fb5bc>>=0x1;}if(_0x4c8752+_0x371bc1>_0x337ab6[_0xa1524a(0xc9)])return[0x0,0x0];let _0x4f2ef9=_0x3170a0[_0xa1524a(0xd4)](_0x4a2683,_0x1fb5bc-0x1);for(let _0x738d33=0x1;_0x738d33<_0x371bc1;_0x738d33++){_0x4f2ef9=_0x3170a0[_0xa1524a(0xd6)](_0x4f2ef9*0x100,_0x337ab6[_0x4c8752+_0x738d33]);}return[_0x4f2ef9,_0x371bc1];}function readId(_0x528f8c,_0x2cbce3){const _0x3fb49c=_0x277d,_0x2cb2e3={'DWMTX':function(_0x42f8b1,_0x4f5497){return _0x42f8b1>=_0x4f5497;},'SmKVM':function(_0x5a8ea4,_0x3b1c91){return _0x5a8ea4>=_0x3b1c91;},'wKIvs':function(_0x337451,_0x3e0ae2){return _0x337451+_0x3e0ae2;},'qBFKi':function(_0x25d064,_0x1cef58){return _0x25d064*_0x1cef58;}};if(_0x2cb2e3[_0x3fb49c(0xb3)](_0x2cbce3,_0x528f8c[_0x3fb49c(0xc9)]))return[0x0,0x0];const _0x29c5e1=_0x528f8c[_0x2cbce3];let _0x18face;if(_0x2cb2e3[_0x3fb49c(0x9d)](_0x29c5e1,0x80))_0x18face=0x1;else{if(_0x29c5e1>=0x40)_0x18face=0x2;else{if(_0x2cb2e3['DWMTX'](_0x29c5e1,0x20))_0x18face=0x3;else{if(_0x29c5e1>=0x10)_0x18face=0x4;else return[_0x29c5e1,0x1];}}}if(_0x2cb2e3['wKIvs'](_0x2cbce3,_0x18face)>_0x528f8c[_0x3fb49c(0xc9)])return[0x0,0x0];let _0x118e03=0x0;for(let _0x23ce1d=0x0;_0x23ce1d<_0x18face;_0x23ce1d++){_0x118e03=_0x2cb2e3[_0x3fb49c(0xc0)](_0x118e03,0x100)+_0x528f8c[_0x2cbce3+_0x23ce1d];}return[_0x118e03,_0x18face];}function _0x277d(_0x28afc6,_0x3b139b){_0x28afc6=_0x28afc6-0x8c;const _0x54cf5b=_0x54cf();let _0x277dda=_0x54cf5b[_0x28afc6];return _0x277dda;}function readUint(_0x5c9c85,_0x21c9d1,_0x3bab7a){const _0x45ba12=_0x277d,_0xdb458e={'mTXqv':function(_0x363871,_0x324d61){return _0x363871<_0x324d61;},'Fctlw':function(_0x1af21e,_0x38cad4){return _0x1af21e*_0x38cad4;},'jpazD':function(_0x597c4a,_0x4223a4){return _0x597c4a+_0x4223a4;}};let _0x596075=0x0;for(let _0x4f0b61=0x0;_0xdb458e['mTXqv'](_0x4f0b61,_0x3bab7a);_0x4f0b61++){_0x596075=_0xdb458e[_0x45ba12(0xbb)](_0x596075,0x100)+_0x5c9c85[_0xdb458e[_0x45ba12(0x9c)](_0x21c9d1,_0x4f0b61)];}return _0x596075;}function isUnknownSize(_0x25b8fa,_0x1b9633){const _0x169e05=_0x277d,_0x964dd8={'TZSDm':function(_0x22e4b7,_0x10f52f){return _0x22e4b7===_0x10f52f;},'LZYkQ':function(_0x51d5ce,_0xaf0816){return _0x51d5ce-_0xaf0816;}};return _0x964dd8[_0x169e05(0xcf)](_0x25b8fa,_0x964dd8[_0x169e05(0xa0)](Math[_0x169e05(0x99)](0x2,0x7*_0x1b9633),0x1));}function writeVint(_0x44fc96,_0x9b48f4){const _0x35e693=_0x277d,_0x1b207c={'yaArG':function(_0x5a44b1,_0x151df4){return _0x5a44b1||_0x151df4;},'VCEiJ':function(_0x5d18c3,_0x45e1cd){return _0x5d18c3<_0x45e1cd;},'jCrfI':function(_0x2b2a36,_0xa1dd25){return _0x2b2a36>=_0xa1dd25;},'icJdX':function(_0x16ec40,_0x3c2cdc){return _0x16ec40&_0x3c2cdc;},'GMLDm':function(_0x4d4b13,_0x1a430e){return _0x4d4b13/_0x1a430e;},'pBYVw':function(_0x18019c,_0x1e39b8){return _0x18019c<<_0x1e39b8;},'RvdIE':function(_0x2894b1,_0x254eee){return _0x2894b1-_0x254eee;}};let _0x520817=_0x1b207c['yaArG'](_0x9b48f4,0x1);while(_0x1b207c[_0x35e693(0x8e)](Math['pow'](0x2,0x7*_0x520817)-0x2,_0x44fc96))_0x520817++;const _0x59628c=Buffer['alloc'](_0x520817);for(let _0x5d618b=_0x520817-0x1;_0x1b207c['jCrfI'](_0x5d618b,0x0);_0x5d618b--){_0x59628c[_0x5d618b]=_0x1b207c['icJdX'](_0x44fc96,0xff),_0x44fc96=Math[_0x35e693(0xd3)](_0x1b207c['GMLDm'](_0x44fc96,0x100));}return _0x59628c[0x0]|=_0x1b207c['pBYVw'](0x1,_0x1b207c['RvdIE'](0x8,_0x520817)),_0x59628c;}function writeUint(_0x5b3d95,_0x192b09){const _0x30225e=_0x277d,_0xbaba58={'UloLI':function(_0x276eb,_0x3e8741){return _0x276eb/_0x3e8741;}},_0x3604ff=Buffer[_0x30225e(0xc2)](_0x192b09);for(let _0x49699e=_0x192b09-0x1;_0x49699e>=0x0;_0x49699e--){_0x3604ff[_0x49699e]=_0x5b3d95&0xff,_0x5b3d95=Math['floor'](_0xbaba58['UloLI'](_0x5b3d95,0x100));}return _0x3604ff;}function writeUnknownSizeVint(_0x5c5999){const _0x3e77f3=_0x277d,_0x3c3c25={'WlsdL':function(_0x1f9905,_0x1c1f2b){return _0x1f9905>>_0x1c1f2b;},'oCPiH':function(_0x3fd6bc,_0x1b956d){return _0x3fd6bc-_0x1b956d;}},_0x413f32=Buffer[_0x3e77f3(0xc2)](_0x5c5999,0xff);return _0x413f32[0x0]=_0x3c3c25[_0x3e77f3(0x8f)](0xff,_0x3c3c25['oCPiH'](_0x5c5999,0x1)),_0x413f32;}function uintSize(_0x45c435){const _0x589c2d={'rZphr':function(_0xfdf3d,_0x252bc6){return _0xfdf3d>_0x252bc6;}};if(_0x45c435===0x0)return 0x1;let _0xa2d928=0x0,_0x1a7a9f=_0x45c435;while(_0x589c2d['rZphr'](_0x1a7a9f,0x0)){_0xa2d928++,_0x1a7a9f=Math['floor'](_0x1a7a9f/0x100);}return _0xa2d928;}function findTimestampScale(_0x4f73bc,_0x35f26a){const _0x199df6=_0x277d,_0x4b3e43={'bafFr':function(_0x2334b0,_0x430fbd){return _0x2334b0+_0x430fbd;},'MEFCA':function(_0x4e6904,_0x40aac8){return _0x4e6904<_0x40aac8;},'AdTsE':function(_0xb2481e,_0x55e25b,_0x1cec45){return _0xb2481e(_0x55e25b,_0x1cec45);},'HVsYe':function(_0x56d272,_0x5e9610){return _0x56d272===_0x5e9610;},'cVRay':function(_0x5b81de,_0x1759bd){return _0x5b81de+_0x1759bd;},'dwdCn':function(_0x34fcaf,_0x14c23f,_0x59cb39){return _0x34fcaf(_0x14c23f,_0x59cb39);},'bqqVK':function(_0x573b4c,_0x14a663,_0xb32256,_0x12f919){return _0x573b4c(_0x14a663,_0xb32256,_0x12f919);},'aaKaz':function(_0x30ccdc,_0x4dd64e){return _0x30ccdc+_0x4dd64e;},'JHQTJ':function(_0x440a55,_0x55f0b2){return _0x440a55+_0x55f0b2;},'DuEAY':function(_0x7babd,_0x2113ea,_0x4ce5ae){return _0x7babd(_0x2113ea,_0x4ce5ae);},'gpzmf':function(_0x447b1d,_0x49ec1a){return _0x447b1d+_0x49ec1a;}};let _0x268fcd=_0x35f26a;const _0x32e575=Math[_0x199df6(0xaa)](_0x4f73bc[_0x199df6(0xc9)],_0x4b3e43['bafFr'](_0x35f26a,0x2710));while(_0x4b3e43['MEFCA'](_0x268fcd,_0x32e575)){const [_0x1b2db4,_0x264993]=_0x4b3e43[_0x199df6(0xcc)](readId,_0x4f73bc,_0x268fcd),[_0x1575ef,_0x4d4f91]=readVint(_0x4f73bc,_0x268fcd+_0x264993);if(_0x4b3e43['HVsYe'](_0x1b2db4,ID_INFO)){let _0x16d413=_0x268fcd+_0x264993+_0x4d4f91;const _0x350cbd=_0x4b3e43['cVRay'](_0x16d413,_0x1575ef);while(_0x16d413<_0x350cbd){const [_0x224672,_0x1784aa]=_0x4b3e43['AdTsE'](readId,_0x4f73bc,_0x16d413),[_0x544008,_0x418fd7]=_0x4b3e43[_0x199df6(0xc8)](readVint,_0x4f73bc,_0x16d413+_0x1784aa);if(_0x224672===ID_TIMESTAMP_SCALE)return _0x4b3e43[_0x199df6(0xdb)](readUint,_0x4f73bc,_0x4b3e43[_0x199df6(0xc4)](_0x16d413+_0x1784aa,_0x418fd7),_0x544008);_0x16d413+=_0x4b3e43[_0x199df6(0x92)](_0x4b3e43['cVRay'](_0x1784aa,_0x418fd7),_0x544008);}break;}if(_0x1b2db4===ID_CLUSTER)break;if(_0x4b3e43[_0x199df6(0xa6)](isUnknownSize,_0x1575ef,_0x4d4f91))break;_0x268fcd+=_0x4b3e43[_0x199df6(0xd1)](_0x264993+_0x4d4f91,_0x1575ef);}return 0xf4240;}function findFirstClusterOffset(_0x41b213,_0x4650f2){const _0x4c934f=_0x277d,_0x167db0={'umNlD':function(_0x14bd11,_0x541e71){return _0x14bd11<_0x541e71;},'XVbJW':function(_0x44b3cd,_0x14110c,_0x5a2f48){return _0x44b3cd(_0x14110c,_0x5a2f48);},'fvZZe':function(_0x138dbb,_0xe96a0f){return _0x138dbb+_0xe96a0f;},'cbQpu':function(_0x22d7d1,_0x4c2a81){return _0x22d7d1+_0x4c2a81;},'vCrmO':function(_0x525eec,_0x1c2ef1){return _0x525eec+_0x1c2ef1;}};let _0x364666=_0x4650f2;while(_0x167db0['umNlD'](_0x364666,_0x41b213['length'])){const [_0x289948,_0x2b3195]=_0x167db0[_0x4c934f(0xbd)](readId,_0x41b213,_0x364666);if(_0x289948===ID_CLUSTER)return _0x364666;const [_0x477d53,_0x2fc509]=_0x167db0['XVbJW'](readVint,_0x41b213,_0x167db0['fvZZe'](_0x364666,_0x2b3195));if(isUnknownSize(_0x477d53,_0x2fc509))return _0x364666;_0x364666+=_0x167db0['cbQpu'](_0x167db0['vCrmO'](_0x2b3195,_0x2fc509),_0x477d53);}return _0x41b213[_0x4c934f(0xc9)];}function findClusterEnd(_0x2f429c,_0x5f5b57,_0x92fff0,_0x164681){const _0x4ba965=_0x277d,_0x44ca6e={'gDLgk':function(_0x1d601b,_0x3b96e5,_0x58c272){return _0x1d601b(_0x3b96e5,_0x58c272);},'bDdVU':function(_0x3e3616,_0xc86c2b){return _0x3e3616-_0xc86c2b;}};if(!_0x44ca6e['gDLgk'](isUnknownSize,_0x92fff0,_0x164681))return _0x5f5b57+_0x92fff0;const _0x4be83c=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4c660c=_0x5f5b57;while(_0x4c660c<_0x44ca6e[_0x4ba965(0xc5)](_0x2f429c[_0x4ba965(0xc9)],0x4)){const [_0xd9ff7e,_0x5bf5ca]=_0x44ca6e[_0x4ba965(0xa9)](readId,_0x2f429c,_0x4c660c);if(_0x4be83c['has'](_0xd9ff7e))return _0x4c660c;const [_0x105ede,_0x317e3c]=readVint(_0x2f429c,_0x4c660c+_0x5bf5ca);if(_0x44ca6e[_0x4ba965(0xa9)](isUnknownSize,_0x105ede,_0x317e3c))return _0x2f429c['length'];_0x4c660c+=_0x5bf5ca+_0x317e3c+_0x105ede;}return _0x2f429c[_0x4ba965(0xc9)];}function _0x54cf(){const _0x4a1066=['RbtSJ','aUanh','DkZKb','header','Fctlw','stitchWebmFiles.ts','XVbJW','2QgMjba','grlCk','qBFKi','840133ZxpRXk','alloc','2599194uzVjbY','aaKaz','bDdVU','copy','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','dwdCn','length','faQpv','PpSPq','AdTsE','163830woYoVR','bodyAfterTimestamp','TZSDm','kcNgZ','gpzmf','exit','floor','hbuXe','JCcar','bMRUl','argv','max','GZSTt','kgYvO','bqqVK','388186YFsjyt','indexOf','VCEiJ','WlsdL','from','bWAaG','JHQTJ','SSiJG','wzcCN','endsWith','aFvoJ','PkXjv','uSuMS','pow','1980860LJZDky','slice','jpazD','SmKVM','1870128QyFsJP','yddCM','LZYkQ','azGtY','maxTicks','concat','yEsTR','push','DuEAY','MeMYy','IMrjE','gDLgk','min','wUUkA','BylGk','log','iBsIa','pgRrK','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','APNmE','zffWS','DWMTX','timestamp','4912864TJakwQ','nrWWT'];_0x54cf=function(){return _0x4a1066;};return _0x54cf();}function extractClusters(_0x5727b6,_0x480039){const _0xee7877=_0x277d,_0x29a6fc={'wzcCN':function(_0x207704,_0x1ce505){return _0x207704<_0x1ce505;},'RbtSJ':function(_0x409e74,_0xc206b7,_0x3f4078){return _0x409e74(_0xc206b7,_0x3f4078);},'IMrjE':function(_0x33c64c,_0x2fd738){return _0x33c64c!==_0x2fd738;},'OjBYI':function(_0x227765,_0x3ebfb6){return _0x227765+_0x3ebfb6;},'MeMYy':function(_0x2c400d,_0x3eb6d0,_0x4d2216){return _0x2c400d(_0x3eb6d0,_0x4d2216);},'emgcG':function(_0x2793e9,_0x5bee7c,_0x3fbd6c,_0x2e8377,_0x568dd6){return _0x2793e9(_0x5bee7c,_0x3fbd6c,_0x2e8377,_0x568dd6);},'yEsTR':function(_0x39a669,_0x444ad2){return _0x39a669+_0x444ad2;},'aUanh':function(_0x363576,_0x406d0b){return _0x363576===_0x406d0b;},'kcNgZ':function(_0x2500b5,_0x4bbca2){return _0x2500b5===_0x4bbca2;},'pgRrK':function(_0x3db2fc,_0x11e4cc){return _0x3db2fc+_0x11e4cc;},'wUUkA':function(_0x5b3a27,_0xbfdd47){return _0x5b3a27<_0xbfdd47;},'FtNVj':function(_0x2eba46,_0x17f0b5){return _0x2eba46+_0x17f0b5;}},_0x411950=[],_0x452363=Buffer[_0xee7877(0x90)]([0x1f,0x43,0xb6,0x75]);let _0x24dd47=0x0;while(_0x29a6fc[_0xee7877(0x94)](_0x24dd47,_0x5727b6['length'])){const _0x215f43=_0x5727b6[_0xee7877(0x8d)](_0x452363,_0x24dd47);if(_0x215f43===-0x1)break;const [_0x52460e,_0x177797]=_0x29a6fc['RbtSJ'](readId,_0x5727b6,_0x215f43);if(_0x29a6fc[_0xee7877(0xa8)](_0x52460e,ID_CLUSTER)){_0x24dd47=_0x29a6fc['OjBYI'](_0x215f43,0x1);continue;}const [_0xb531df,_0x1ba281]=_0x29a6fc[_0xee7877(0xa7)](readVint,_0x5727b6,_0x215f43+_0x177797),_0x1f2d83=_0x215f43+_0x177797+_0x1ba281,_0x518664=_0x29a6fc['emgcG'](findClusterEnd,_0x5727b6,_0x1f2d83,_0xb531df,_0x1ba281);let _0x239f84=_0x1f2d83,_0x1a007f=0x0,_0x154ec1=0x2,_0x39d36f=![],_0xbe7b6b=Buffer['alloc'](0x0),_0x2e9146=Buffer[_0xee7877(0xc2)](0x0);while(_0x239f84<_0x518664){const [_0x290c3d,_0x33ec70]=_0x29a6fc['RbtSJ'](readId,_0x5727b6,_0x239f84),[_0x3bec86,_0x1296ac]=readVint(_0x5727b6,_0x29a6fc[_0xee7877(0xa4)](_0x239f84,_0x33ec70));if(_0x29a6fc[_0xee7877(0xb8)](_0x290c3d,ID_TIMESTAMP)){_0x1a007f=readUint(_0x5727b6,_0x239f84+_0x33ec70+_0x1296ac,_0x3bec86),_0x154ec1=_0x3bec86,_0x39d36f=!![],_0xbe7b6b=_0x5727b6['slice'](_0x1f2d83,_0x239f84);const _0x389b85=_0x29a6fc[_0xee7877(0xa4)](_0x29a6fc[_0xee7877(0xa4)](_0x239f84,_0x33ec70),_0x1296ac)+_0x3bec86;_0x2e9146=_0x5727b6['slice'](_0x389b85,_0x518664);break;}if(_0x29a6fc[_0xee7877(0xd0)](_0x290c3d,ID_CLUSTER))break;if(isUnknownSize(_0x3bec86,_0x1296ac))break;_0x239f84+=_0x29a6fc[_0xee7877(0xaf)](_0x33ec70,_0x1296ac)+_0x3bec86;}!_0x39d36f&&(_0x2e9146=_0x5727b6[_0xee7877(0x9b)](_0x1f2d83,_0x518664));let _0x273694=_0x1a007f;_0x239f84=_0x1f2d83;while(_0x29a6fc[_0xee7877(0xab)](_0x239f84,_0x518664)){const [_0x23c1c7,_0x39470a]=readId(_0x5727b6,_0x239f84),[_0x1d7e24,_0x39bb72]=_0x29a6fc[_0xee7877(0xb7)](readVint,_0x5727b6,_0x29a6fc['yEsTR'](_0x239f84,_0x39470a));if(_0x29a6fc[_0xee7877(0xb8)](_0x23c1c7,ID_SIMPLE_BLOCK)&&_0x1d7e24>=0x4){const _0x201d3d=_0x29a6fc['pgRrK'](_0x239f84,_0x39470a)+_0x39bb72,[,_0x122016]=readVint(_0x5727b6,_0x201d3d),_0x2e70fa=_0x5727b6['readInt16BE'](_0x201d3d+_0x122016),_0x1d9ca7=_0x1a007f+_0x2e70fa;if(_0x1d9ca7>_0x273694)_0x273694=_0x1d9ca7;}if(_0x23c1c7===ID_CLUSTER)break;if(isUnknownSize(_0x1d7e24,_0x39bb72))break;_0x239f84+=_0x29a6fc['FtNVj'](_0x39470a+_0x39bb72,_0x1d7e24);}_0x411950['push']({'timestamp':_0x1a007f,'maxTicks':_0x273694,'bodyBeforeTimestamp':_0xbe7b6b,'bodyAfterTimestamp':_0x2e9146,'timestampElementSize':_0x154ec1}),_0x24dd47=_0x518664;}return _0x411950;}function parseWebm(_0x243e76){const _0x36b012=_0x277d,_0xbd01b1={'faQpv':function(_0x1895d4,_0x39ce7f,_0x4069ec){return _0x1895d4(_0x39ce7f,_0x4069ec);},'PpSPq':function(_0x14732b,_0x7ee762){return _0x14732b+_0x7ee762;},'yddCM':function(_0x5cb7ef,_0x500631){return _0x5cb7ef+_0x500631;},'lkKVe':function(_0x2c86c4,_0x4f5a5a){return _0x2c86c4+_0x4f5a5a;},'aFvoJ':function(_0x458d57,_0xed4ee7,_0x3be62d){return _0x458d57(_0xed4ee7,_0x3be62d);}};let _0x45ca3c=0x0;const [,_0x3b351e]=readId(_0x243e76,_0x45ca3c),[_0x4fe250,_0x45d5d4]=_0xbd01b1[_0x36b012(0xca)](readVint,_0x243e76,_0xbd01b1['PpSPq'](_0x45ca3c,_0x3b351e));_0x45ca3c+=_0xbd01b1['yddCM'](_0xbd01b1[_0x36b012(0x9f)](_0x3b351e,_0x45d5d4),_0x4fe250);const [_0x3ec1e6,_0x2482cc]=_0xbd01b1['faQpv'](readId,_0x243e76,_0x45ca3c);if(_0x3ec1e6!==ID_SEGMENT)return null;const [,_0x59a4b8]=readVint(_0x243e76,_0x45ca3c+_0x2482cc),_0x1a1de9=_0xbd01b1['lkKVe'](_0xbd01b1[_0x36b012(0xcb)](_0x45ca3c,_0x2482cc),_0x59a4b8),_0x97e548=_0xbd01b1[_0x36b012(0x96)](findTimestampScale,_0x243e76,_0x1a1de9),_0xf9cbde=findFirstClusterOffset(_0x243e76,_0x1a1de9),_0x272a5d=_0x243e76[_0x36b012(0x9b)](0x0,_0xf9cbde),_0x5d5e11=_0xbd01b1['faQpv'](extractClusters,_0x243e76,_0x97e548);let _0x999edf=0x0;for(const _0x384d4b of _0x5d5e11){if(_0x384d4b['maxTicks']>_0x999edf)_0x999edf=_0x384d4b[_0x36b012(0xa2)];}return{'header':_0x272a5d,'clusters':_0x5d5e11,'timestampScale':_0x97e548,'maxTimestampTicks':_0x999edf};}function buildCluster(_0x22b58b,_0x5881a9,_0xbe161b){const _0x236deb=_0x277d,_0x50c926={'zffWS':function(_0x717f63,_0x33e273){return _0x717f63(_0x33e273);},'grlCk':function(_0x14cb3e,_0x993a74){return _0x14cb3e(_0x993a74);},'PkXjv':function(_0x45126e,_0xd66ef1,_0x18e552){return _0x45126e(_0xd66ef1,_0x18e552);}},_0x36b486=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x5a5aa3=Math[_0x236deb(0xd8)](0x4,_0x50c926[_0x236deb(0xb2)](uintSize,_0x22b58b)),_0x516f0a=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x50c926[_0x236deb(0xbf)](writeVint,_0x5a5aa3),_0x50c926[_0x236deb(0x97)](writeUint,_0x22b58b,_0x5a5aa3)]),_0xa46748=Buffer['concat']([_0x5881a9,_0x516f0a,_0xbe161b]),_0x5a8f1e=_0x50c926[_0x236deb(0xb2)](writeVint,_0xa46748[_0x236deb(0xc9)]);return Buffer['concat']([_0x36b486,_0x5a8f1e,_0xa46748]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4e4f8c){const _0x21a0b5=_0x277d,_0x5d7541={'BylGk':function(_0x367093,_0x3aa309,_0x2f0b6b){return _0x367093(_0x3aa309,_0x2f0b6b);},'GZSTt':function(_0x58a5e2,_0x1f5587){return _0x58a5e2+_0x1f5587;},'uSuMS':function(_0x579669,_0x161a0b){return _0x579669+_0x161a0b;},'APNmE':function(_0x8b1735,_0x4f7450){return _0x8b1735+_0x4f7450;},'kgYvO':function(_0x49e65b,_0x434f04){return _0x49e65b(_0x434f04);},'iBsIa':function(_0x4b3449,_0x7c53ea){return _0x4b3449<_0x7c53ea;},'FTGrB':function(_0x27f0be,_0x3763f8){return _0x27f0be+_0x3763f8;},'azGtY':function(_0x54782e,_0x3c5a6f){return _0x54782e===_0x3c5a6f;},'bWAaG':function(_0x36eba7,_0x1184cc){return _0x36eba7+_0x1184cc;},'yoGNy':function(_0x26b9e6,_0x1514de,_0x2ef042){return _0x26b9e6(_0x1514de,_0x2ef042);}},_0x28def5=Buffer['from'](_0x4e4f8c);let _0x3a689f=0x0;const [,_0x4a7fdd]=_0x5d7541['BylGk'](readId,_0x28def5,_0x3a689f),[_0x36f10a,_0x7beaa7]=readVint(_0x28def5,_0x5d7541[_0x21a0b5(0xd9)](_0x3a689f,_0x4a7fdd)),_0x4513a4=_0x5d7541[_0x21a0b5(0x98)](_0x3a689f+_0x4a7fdd,_0x7beaa7)+_0x36f10a,[,_0x3991f6]=readId(_0x28def5,_0x4513a4),[,_0x576ef5]=readVint(_0x28def5,_0x4513a4+_0x3991f6),_0x5614e2=_0x5d7541[_0x21a0b5(0x98)](_0x5d7541[_0x21a0b5(0xb1)](_0x4513a4,_0x3991f6),_0x576ef5),_0x34d5a7=_0x5d7541[_0x21a0b5(0xda)](writeUnknownSizeVint,_0x576ef5);_0x34d5a7[_0x21a0b5(0xc6)](_0x28def5,_0x4513a4+_0x3991f6);let _0xc57f14=_0x5614e2;const _0x18da4f=Math[_0x21a0b5(0xaa)](_0x28def5[_0x21a0b5(0xc9)],_0x5d7541[_0x21a0b5(0xd9)](_0x5614e2,0x2710));while(_0x5d7541[_0x21a0b5(0xae)](_0xc57f14,_0x18da4f)){const [_0x57fd7a,_0x398d9e]=_0x5d7541['BylGk'](readId,_0x28def5,_0xc57f14),[_0x3a82b7,_0x147db4]=readVint(_0x28def5,_0x5d7541['FTGrB'](_0xc57f14,_0x398d9e));if(_0x57fd7a===ID_CLUSTER)break;if(_0x5d7541[_0x21a0b5(0xac)](isUnknownSize,_0x3a82b7,_0x147db4))break;if(_0x5d7541[_0x21a0b5(0xa1)](_0x57fd7a,ID_INFO)){const _0x490da7=_0x5d7541['APNmE'](_0xc57f14+_0x398d9e,_0x147db4),_0x27ca14=_0x5d7541['FTGrB'](_0x490da7,_0x3a82b7),_0x258454=[];let _0xb3814a=_0x490da7;while(_0xb3814a<_0x27ca14){const [_0x46decf,_0x11f4af]=_0x5d7541['BylGk'](readId,_0x28def5,_0xb3814a),[_0x52d1c7,_0x19e321]=readVint(_0x28def5,_0xb3814a+_0x11f4af),_0x1f2a36=_0x11f4af+_0x19e321+_0x52d1c7;_0x46decf!==ID_DURATION&&_0x258454[_0x21a0b5(0xa5)](_0x28def5[_0x21a0b5(0x9b)](_0xb3814a,_0xb3814a+_0x1f2a36)),_0xb3814a+=_0x1f2a36;}const _0x3186a3=Buffer['concat'](_0x258454),_0x240a3b=Buffer['concat']([_0x28def5[_0x21a0b5(0x9b)](_0xc57f14,_0x5d7541[_0x21a0b5(0x91)](_0xc57f14,_0x398d9e)),_0x5d7541['yoGNy'](writeVint,_0x3186a3[_0x21a0b5(0xc9)],_0x147db4)]);return Buffer[_0x21a0b5(0xa3)]([_0x28def5['slice'](0x0,_0xc57f14),_0x240a3b,_0x3186a3,_0x28def5[_0x21a0b5(0x9b)](_0x27ca14)]);}_0xc57f14+=_0x5d7541['bWAaG'](_0x398d9e,_0x147db4)+_0x3a82b7;}return _0x28def5;}export function stitchWebmFiles(_0x323954,_0x435301){const _0x4ce66b=_0x277d,_0x504364={'JCcar':function(_0x1b9f96,_0x82a78e){return _0x1b9f96<=_0x82a78e;},'BEmZI':function(_0x20c9e0,_0x51ce34){return _0x20c9e0(_0x51ce34);},'SSiJG':function(_0xfded46,_0x257f7e){return _0xfded46===_0x257f7e;},'nrWWT':function(_0x378a8e,_0x43e8b7){return _0x378a8e+_0x43e8b7;},'DkZKb':function(_0x2f1baf,_0x4c27dc,_0x5838a5){return _0x2f1baf(_0x4c27dc,_0x5838a5);}};if(_0x504364[_0x4ce66b(0xd5)](_0x323954[_0x4ce66b(0xc9)],0x1))return![];const _0x5991e9=[];for(const _0x4ee52b of _0x323954){const _0x12d605=_0x504364['BEmZI'](readFileSync,_0x4ee52b),_0x5514f4=parseWebm(_0x12d605);if(!_0x5514f4||_0x504364[_0x4ce66b(0x93)](_0x5514f4['clusters']['length'],0x0))return![];_0x5991e9[_0x4ce66b(0xa5)](_0x5514f4);}const _0x4f69c1=_0x5991e9[0x0],_0x4a41ec=rebuildHeaderWithoutDuration(_0x4f69c1[_0x4ce66b(0xba)]),_0x4067bf=[_0x4a41ec];let _0x170a7d=0x0;for(let _0x1710bd=0x0;_0x1710bd<_0x5991e9['length'];_0x1710bd++){const _0x53cab6=_0x5991e9[_0x1710bd];for(const _0x3cf8b5 of _0x53cab6['clusters']){const _0xfa1a8=_0x504364['nrWWT'](_0x3cf8b5[_0x4ce66b(0xb4)],_0x170a7d);_0x4067bf['push'](buildCluster(_0xfa1a8,_0x3cf8b5['bodyBeforeTimestamp'],_0x3cf8b5[_0x4ce66b(0xce)]));}const _0x51f1c1=0x1e;_0x170a7d+=_0x504364[_0x4ce66b(0xb6)](_0x53cab6['maxTimestampTicks'],_0x51f1c1);}return _0x504364[_0x4ce66b(0xb9)](writeFileSync,_0x435301,Buffer[_0x4ce66b(0xa3)](_0x4067bf)),!![];}if(process[_0x562a20(0xd7)][0x1]?.[_0x562a20(0x95)](_0x562a20(0xbc))||process[_0x562a20(0xd7)][0x1]?.[_0x562a20(0x95)]('stitchWebmFiles.js')){const args=process['argv'][_0x562a20(0x9b)](0x2);args[_0x562a20(0xc9)]<0x3&&(console['error'](_0x562a20(0xc7)),process[_0x562a20(0xd2)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x562a20(0xad)]('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console['log'](_0x562a20(0xb0));}
|