@ranger-testing/ranger-cli 3.1.3-alpha.e1ca941-42 → 3.1.4-alpha.fb796e7-45
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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x25de18,_0x289c40){const _0x584e3b=_0x1a6e,_0x42816c=_0x25de18();while(!![]){try{const _0x664faa=parseInt(_0x584e3b(0x1cc))/0x1*(-parseInt(_0x584e3b(0x1cb))/0x2)+-parseInt(_0x584e3b(0x1bf))/0x3+-parseInt(_0x584e3b(0x1d0))/0x4+parseInt(_0x584e3b(0x1da))/0x5*(-parseInt(_0x584e3b(0x1c4))/0x6)+parseInt(_0x584e3b(0x1d1))/0x7+parseInt(_0x584e3b(0x1ce))/0x8*(parseInt(_0x584e3b(0x1bd))/0x9)+parseInt(_0x584e3b(0x1bb))/0xa*(parseInt(_0x584e3b(0x1bc))/0xb);if(_0x664faa===_0x289c40)break;else _0x42816c['push'](_0x42816c['shift']());}catch(_0x585a26){_0x42816c['push'](_0x42816c['shift']());}}}(_0x27a5,0xd3407));import{existsSync}from'fs';import _0xe72293 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x1a6e(_0x44da53,_0x5f5560){_0x44da53=_0x44da53-0x1b3;const _0x27a595=_0x27a5();let _0x1a6e73=_0x27a595[_0x44da53];return _0x1a6e73;}import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x414ce4){const _0x43bafd=_0x1a6e,_0x7fff4f={'eiGjO':function(_0xb17b65,_0xbfb307){return _0xb17b65+_0xbfb307;},'HVXjw':_0x43bafd(0x1d4),'gKMGv':_0x43bafd(0x1df),'PpKkp':function(_0xe2b6c6,_0x55307c){return _0xe2b6c6(_0x55307c);},'oAwUH':function(_0x4ad334,_0x4315ad){return _0x4ad334(_0x4315ad);},'qQumH':function(_0x85f723,_0x13555c){return _0x85f723===_0x13555c;},'VciFZ':function(_0x1a1fc7,_0x2e16d1){return _0x1a1fc7&&_0x2e16d1;},'WMObE':function(_0x4d7d0c,_0x42045c){return _0x4d7d0c+_0x42045c;},'yHeaQ':function(_0x170e9f,_0x1e02a1){return _0x170e9f+_0x1e02a1;},'tvnya':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','iMwFj':function(_0x22e66f){return _0x22e66f();},'FftMJ':_0x43bafd(0x1ba),'RhWvW':'cloud','ZSDLY':_0x43bafd(0x1c5),'zeifU':function(_0x444935,_0x63fa96){return _0x444935===_0x63fa96;},'OtpIY':function(_0x326cb5,_0x401c0e,_0x1221f8){return _0x326cb5(_0x401c0e,_0x1221f8);},'eMTnb':function(_0x79a438,_0x4a48ae){return _0x79a438(_0x4a48ae);}},_0x38faa0=_0x414ce4['profile'];let _0x5a2c97=_0x414ce4['profile']??await readActiveProfileName(),_0x39eb04=null;if(!_0x5a2c97&&process[_0x43bafd(0x1e5)]['RANGER_TEST_USERNAME']){const _0x2c77ac=await resolveAdHocProfile();_0x2c77ac&&(_0x5a2c97=_0x2c77ac['name'],_0x39eb04=_0x2c77ac[_0x43bafd(0x1cd)]);}if(!_0x5a2c97)try{const _0x338fbb=await listCloudProfiles();if(_0x338fbb[_0x43bafd(0x1b7)]===0x1){const _0x1fa548=_0x338fbb[0x0];_0x5a2c97=_0x1fa548['name'],console[_0x43bafd(0x1d8)](_0x43bafd(0x1b6)+_0x1fa548['name']),console[_0x43bafd(0x1d8)](_0x43bafd(0x1b4));}}catch{}if(!_0x5a2c97)throw new Error(_0x7fff4f['eiGjO'](_0x7fff4f[_0x43bafd(0x1c2)]+_0x7fff4f['gKMGv']+'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a',_0x43bafd(0x1c7))+'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.');const _0x50806e=getEnvDir(_0x5a2c97),_0x22779c=_0x7fff4f['PpKkp'](existsSync,_0x50806e);let _0x16cadf=_0x39eb04,_0x33892d=![];if(!_0x16cadf)try{_0x16cadf=await _0x7fff4f['oAwUH'](fetchCloudProfile,_0x5a2c97);if(!_0x16cadf)_0x33892d=!![];}catch(_0x568457){_0x568457 instanceof ApiError&&_0x7fff4f[_0x43bafd(0x1d2)](_0x568457[_0x43bafd(0x1db)],0x194)&&(_0x33892d=!![]);}if(_0x7fff4f['VciFZ'](_0x38faa0,_0x33892d)&&!_0x22779c&&!_0x16cadf)throw new Error(_0x7fff4f['WMObE'](_0x7fff4f[_0x43bafd(0x1ca)]('Profile\x20\x22'+_0x38faa0+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x7fff4f[_0x43bafd(0x1d6)]),'`ranger\x20profile\x20add`\x20to\x20create\x20one.'));if(_0x7fff4f['VciFZ'](_0x16cadf,_0x22779c)){let _0x3f7ccb=!![];if(_0x7fff4f[_0x43bafd(0x1c6)](isInteractive)){const {source:_0x22ef5b}=await _0xe72293['prompt']([{'type':'list','name':_0x43bafd(0x1d5),'message':_0x43bafd(0x1c9)+_0x5a2c97+_0x43bafd(0x1d9),'choices':[{'name':_0x7fff4f['FftMJ'],'value':_0x7fff4f['RhWvW']},{'name':'Local\x20profile','value':_0x7fff4f[_0x43bafd(0x1dc)]}],'default':_0x43bafd(0x1b5)}]);_0x3f7ccb=_0x7fff4f[_0x43bafd(0x1e3)](_0x22ef5b,_0x43bafd(0x1b5));}if(!_0x3f7ccb)_0x16cadf=null;}const _0x24d900=readProfileOverrides(process[_0x43bafd(0x1b3)](),_0x5a2c97);let _0x4e0a48=null,_0x495861,_0x19a90b,_0x30622f,_0x47c88d,_0x4333e1=null,_0x1e8c79;const _0x1f58f1=expandOverrides(_0x24d900),_0x20db4b=readUrlEnvVars();if(_0x16cadf){_0x4e0a48=_0x16cadf;const _0x3203d9=_0x16cadf['settings']??{},_0x19d9f4=_0x7fff4f['OtpIY'](mergeCloudProfileSettings,_0x3203d9,_0x24d900??undefined),_0x9b992f={..._0x16cadf,'settings':_0x19d9f4};_0x4333e1={'baseUrl':_0x7fff4f['PpKkp'](expandString,_0x3203d9['baseUrl']),'startPath':expandString(_0x3203d9[_0x43bafd(0x1d7)])};const _0x5222b2=await fetchAuthConfig(),_0x53cfc4=_0x5222b2?_0x7fff4f[_0x43bafd(0x1de)](resolveAuthEnvironmentLocally,_0x5222b2,_0x16cadf['environmentKey']):null;_0x1e8c79=_0x53cfc4?.['domains']?.[0x0];const _0x30d849=resolveProfileUrl({'flagBaseUrl':_0x414ce4[_0x43bafd(0x1e1)],'flagStartPath':_0x414ce4['startPath'],'envBaseUrl':_0x20db4b['envBaseUrl'],'envStartPath':_0x20db4b[_0x43bafd(0x1d3)],'projectOverrides':_0x1f58f1,'cloudSettings':_0x4333e1,'authEnvironmentDomain':_0x1e8c79}),_0xe6ca2c=process['env'][_0x43bafd(0x1cf)];if(_0xe6ca2c){if(!existsSync(_0xe6ca2c))throw new Error(_0x43bafd(0x1e4)+_0xe6ca2c+_0x43bafd(0x1e6));_0x495861=_0xe6ca2c,_0x19a90b=resolveEnvVars(_0x19d9f4),_0x30622f=Boolean(_0x19a90b[_0x43bafd(0x1c1)]);}else{const _0x65fb3=await _0x7fff4f['OtpIY'](resolveCloudProfileSession,_0x9b992f,{'effectiveBaseUrl':_0x30d849['baseUrl'],'telemetry':_0x414ce4[_0x43bafd(0x1dd)]});_0x495861=_0x65fb3[_0x43bafd(0x1c8)],_0x19a90b=_0x7fff4f['eMTnb'](resolveEnvVars,_0x65fb3['settings']),_0x30622f=Boolean(_0x19a90b['cdpEndpoint']),_0x1e8c79=_0x65fb3[_0x43bafd(0x1c3)]?.['domains']?.[0x0];}}else{if(!_0x22779c)throw new Error('Profile\x20\x22'+_0x5a2c97+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x5a2c97);const _0x17277d=await _0x7fff4f[_0x43bafd(0x1e0)](loadSettings,_0x5a2c97);_0x19a90b=_0x7fff4f['eMTnb'](resolveEnvVars,_0x17277d),_0x30622f=_0x7fff4f['PpKkp'](Boolean,_0x19a90b[_0x43bafd(0x1c1)]),_0x47c88d=_0x19a90b[_0x43bafd(0x1e1)];}const _0x3f1bb2=_0x7fff4f['PpKkp'](resolveProfileUrl,{'flagBaseUrl':_0x414ce4[_0x43bafd(0x1e1)],'flagStartPath':_0x414ce4['startPath'],'envBaseUrl':_0x20db4b['envBaseUrl'],'envStartPath':_0x20db4b['envStartPath'],'localSettingsBaseUrl':_0x47c88d,'projectOverrides':_0x1f58f1,'cloudSettings':_0x4333e1,'authEnvironmentDomain':_0x1e8c79}),_0x4b915d=_0x3f1bb2[_0x43bafd(0x1be)]??_0x3f1bb2['baseUrl'];if(_0x7fff4f[_0x43bafd(0x1b9)](!_0x4b915d,!_0x30622f))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x5a2c97+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x5a2c97+_0x43bafd(0x1e2));return{'activeProfile':_0x5a2c97,'resolvedCloudProfile':_0x4e0a48,'cloudAuthPath':_0x495861,'resolvedSettings':_0x19a90b,'isCdpMode':_0x30622f,'url':_0x4b915d,'startPath':_0x3f1bb2['startPath']};}function expandString(_0x3077d6){const _0x326f18=_0x1a6e;if(typeof _0x3077d6!==_0x326f18(0x1c0))return _0x3077d6;return resolveEnvVars(_0x3077d6);}function _0x27a5(){const _0x593b4f=['1318655sWWwgS','status','ZSDLY','telemetry','OtpIY','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','oAwUH','baseUrl','\x20baseUrl\x20<url>','zeifU','RANGER_SESSION_STATE_PATH=','env','\x20does\x20not\x20exist.','cwd','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','cloud','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','length','oJrZP','VciFZ','Cloud\x20profile\x20(recommended)','11688730qSdhsI','11xoMCPu','2007vYpRBg','url','980457kqrXlu','string','cdpEndpoint','HVXjw','resolvedEnv','6cvmiks','local','iMwFj','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','authPath','Profile\x20\x22','yHeaQ','4cJrnFS','623947DQVRDU','profile','20192EDjSFm','RANGER_SESSION_STATE_PATH','100572vIIZjU','6980043WIhZhu','qQumH','envStartPath','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','source','tvnya','startPath','log','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?'];_0x27a5=function(){return _0x593b4f;};return _0x27a5();}function expandOverrides(_0x1a7528){const _0x192860=_0x1a6e,_0x3fb3e7={'oJrZP':_0x192860(0x1c0)};if(!_0x1a7528)return _0x1a7528;const _0x2255ff={..._0x1a7528};return typeof _0x2255ff['baseUrl']===_0x3fb3e7[_0x192860(0x1b8)]&&(_0x2255ff[_0x192860(0x1e1)]=resolveEnvVars(_0x2255ff['baseUrl'])),typeof _0x2255ff['startPath']===_0x3fb3e7[_0x192860(0x1b8)]&&(_0x2255ff[_0x192860(0x1d7)]=resolveEnvVars(_0x2255ff['startPath'])),_0x2255ff;}
|
|
1
|
+
function _0x555c(){const _0x2f1d6d=['\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','baseUrl','317220dThtFE','404907dViwVU','envBaseUrl','name','cwd','LcKKv','JMpic','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','url','cloud','string','startPath','Profile\x20\x22','RANGER_SESSION_STATE_PATH','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','9pIwQVV','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','PXnHW','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','profile','resolvedEnv','240785fXMuus','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','source','DISKK','EBrOr','environmentKey','RANGER_SESSION_STATE_PATH=','Cloud\x20profile\x20(recommended)','telemetry','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','8qVsMqx','Mejcv','ngFtj','ItiZI','log','length','NodMo','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','Local\x20profile','332804pgGRZC','hGGRM','cdpEndpoint','ivJft','envStartPath','380302yzhmjH','fKSUQ','status','TYffA','zGwlD','SkFxe','742238QvGSkg','UfPXS','zWRqU','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','domains','3264410IfDgXR','36uBNBZe','settings'];_0x555c=function(){return _0x2f1d6d;};return _0x555c();}(function(_0x3e7b67,_0x15e14b){const _0x182a6a=_0x2807,_0x2afdc2=_0x3e7b67();while(!![]){try{const _0x407736=-parseInt(_0x182a6a(0x167))/0x1+-parseInt(_0x182a6a(0x157))/0x2+-parseInt(_0x182a6a(0x168))/0x3+parseInt(_0x182a6a(0x18f))/0x4+-parseInt(_0x182a6a(0x17c))/0x5*(-parseInt(_0x182a6a(0x163))/0x6)+parseInt(_0x182a6a(0x15d))/0x7*(parseInt(_0x182a6a(0x186))/0x8)+-parseInt(_0x182a6a(0x176))/0x9*(-parseInt(_0x182a6a(0x162))/0xa);if(_0x407736===_0x15e14b)break;else _0x2afdc2['push'](_0x2afdc2['shift']());}catch(_0x590a26){_0x2afdc2['push'](_0x2afdc2['shift']());}}}(_0x555c,0x279e6));import{existsSync}from'fs';import _0x2c2e87 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x1a680e){const _0xb6517e=_0x2807,_0x5825b4={'Mejcv':function(_0x5209f3){return _0x5209f3();},'zWRqU':function(_0x4a993c){return _0x4a993c();},'uhdtw':function(_0x41f7ae,_0x486d0c){return _0x41f7ae===_0x486d0c;},'PbuyC':function(_0x383262,_0x29dbcf){return _0x383262+_0x29dbcf;},'ItiZI':_0xb6517e(0x179),'GRpfW':_0xb6517e(0x165),'MFDPB':_0xb6517e(0x18d),'ppPVm':_0xb6517e(0x16e),'zGwlD':function(_0x500532,_0x478068){return _0x500532(_0x478068);},'YeTQn':function(_0x56d0d2,_0x17111e){return _0x56d0d2(_0x17111e);},'IoEha':function(_0x45d401,_0x45ec7d){return _0x45d401===_0x45ec7d;},'EGFjX':function(_0x48726a,_0x1e05c8){return _0x48726a&&_0x1e05c8;},'ivJft':function(_0x344c24,_0x19fc17){return _0x344c24+_0x19fc17;},'mdgjU':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','iubOV':_0xb6517e(0x17e),'fKSUQ':_0xb6517e(0x170),'EBrOr':_0xb6517e(0x18e),'LcKKv':'local','JMpic':function(_0xae357f,_0x1f96a6){return _0xae357f===_0x1f96a6;},'PXnHW':function(_0x60caff,_0x4ab460,_0x41e753){return _0x60caff(_0x4ab460,_0x41e753);},'ozObz':function(_0x4eee00,_0x3226b0){return _0x4eee00(_0x3226b0);},'Lmwcw':function(_0x1d9966,_0x5b8011){return _0x1d9966??_0x5b8011;},'SkFxe':function(_0x15c4d3,_0x1a3039){return _0x15c4d3(_0x1a3039);},'UfPXS':function(_0x314bee,_0x1cd57d){return _0x314bee(_0x1cd57d);},'QAQKe':function(_0x38428f,_0x4682fe){return _0x38428f(_0x4682fe);},'hGGRM':function(_0x3222c9,_0x124945){return _0x3222c9(_0x124945);},'NodMo':function(_0x5d8fae,_0x436bc0){return _0x5d8fae(_0x436bc0);},'tUCiX':function(_0x1bb4a0,_0x1b72f9){return _0x1bb4a0(_0x1b72f9);},'pYACp':function(_0x49fc40,_0x55a26c){return _0x49fc40&&_0x55a26c;}},_0x465ede=_0x1a680e[_0xb6517e(0x17a)];let _0x591a4a=_0x1a680e[_0xb6517e(0x17a)]??await _0x5825b4[_0xb6517e(0x187)](readActiveProfileName),_0x5a8378=null;if(!_0x591a4a&&process['env']['RANGER_TEST_USERNAME']){const _0x4a185e=await resolveAdHocProfile();_0x4a185e&&(_0x591a4a=_0x4a185e[_0xb6517e(0x16a)],_0x5a8378=_0x4a185e[_0xb6517e(0x17a)]);}if(!_0x591a4a)try{const _0x310283=await _0x5825b4[_0xb6517e(0x15f)](listCloudProfiles);if(_0x5825b4['uhdtw'](_0x310283[_0xb6517e(0x18b)],0x1)){const _0x4a0887=_0x310283[0x0];_0x591a4a=_0x4a0887['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x4a0887[_0xb6517e(0x16a)]),console[_0xb6517e(0x18a)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x591a4a)throw new Error(_0x5825b4['PbuyC'](_0x5825b4[_0xb6517e(0x189)]+'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a',_0x5825b4['GRpfW'])+_0x5825b4['MFDPB']+_0x5825b4['ppPVm']);const _0x19e303=getEnvDir(_0x591a4a),_0x4b6251=_0x5825b4['zGwlD'](existsSync,_0x19e303);let _0x6322a=_0x5a8378,_0x525126=![];if(!_0x6322a)try{_0x6322a=await _0x5825b4['YeTQn'](fetchCloudProfile,_0x591a4a);if(!_0x6322a)_0x525126=!![];}catch(_0x1c6c62){_0x1c6c62 instanceof ApiError&&_0x5825b4['IoEha'](_0x1c6c62[_0xb6517e(0x159)],0x194)&&(_0x525126=!![]);}if(_0x5825b4['EGFjX'](_0x465ede,_0x525126)&&!_0x4b6251&&!_0x6322a)throw new Error(_0x5825b4[_0xb6517e(0x192)](_0xb6517e(0x173)+_0x465ede+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0xb6517e(0x175),_0x5825b4['mdgjU']));if(_0x6322a&&_0x4b6251){let _0x5d342c=!![];if(_0x5825b4['zWRqU'](isInteractive)){const {source:_0x1155c5}=await _0x2c2e87['prompt']([{'type':'list','name':_0x5825b4['iubOV'],'message':'Profile\x20\x22'+_0x591a4a+_0xb6517e(0x160),'choices':[{'name':_0xb6517e(0x183),'value':_0x5825b4[_0xb6517e(0x158)]},{'name':_0x5825b4[_0xb6517e(0x180)],'value':_0x5825b4[_0xb6517e(0x16c)]}],'default':_0xb6517e(0x170)}]);_0x5d342c=_0x5825b4[_0xb6517e(0x16d)](_0x1155c5,_0x5825b4[_0xb6517e(0x158)]);}if(!_0x5d342c)_0x6322a=null;}const _0x102e2e=_0x5825b4[_0xb6517e(0x178)](readProfileOverrides,process[_0xb6517e(0x16b)](),_0x591a4a);let _0x464deb=null,_0x3fbf07,_0x30d1a8,_0x291c70,_0x481347,_0x2aaecb=null,_0x5c80db;const _0x5bec18=_0x5825b4['ozObz'](expandOverrides,_0x102e2e),_0x12b8be=readUrlEnvVars();if(_0x6322a){_0x464deb=_0x6322a;const _0x2290a4=_0x6322a[_0xb6517e(0x164)]??{},_0x2e30ff=mergeCloudProfileSettings(_0x2290a4,_0x5825b4['Lmwcw'](_0x102e2e,undefined)),_0x31cbde={..._0x6322a,'settings':_0x2e30ff};_0x2aaecb={'baseUrl':_0x5825b4['SkFxe'](expandString,_0x2290a4['baseUrl']),'startPath':expandString(_0x2290a4[_0xb6517e(0x172)])};const _0x177cc3=await _0x5825b4['Mejcv'](fetchAuthConfig),_0x45ce89=_0x177cc3?resolveAuthEnvironmentLocally(_0x177cc3,_0x6322a[_0xb6517e(0x181)]):null;_0x5c80db=_0x45ce89?.[_0xb6517e(0x161)]?.[0x0];const _0x4db832=resolveProfileUrl({'flagBaseUrl':_0x1a680e[_0xb6517e(0x166)],'flagStartPath':_0x1a680e[_0xb6517e(0x172)],'envBaseUrl':_0x12b8be[_0xb6517e(0x169)],'envStartPath':_0x12b8be[_0xb6517e(0x156)],'projectOverrides':_0x5bec18,'cloudSettings':_0x2aaecb,'authEnvironmentDomain':_0x5c80db}),_0x2e6c50=process['env'][_0xb6517e(0x174)];if(_0x2e6c50){if(!_0x5825b4[_0xb6517e(0x15e)](existsSync,_0x2e6c50))throw new Error(_0xb6517e(0x182)+_0x2e6c50+'\x20does\x20not\x20exist.');_0x3fbf07=_0x2e6c50,_0x30d1a8=_0x5825b4['QAQKe'](resolveEnvVars,_0x2e30ff),_0x291c70=_0x5825b4[_0xb6517e(0x190)](Boolean,_0x30d1a8['cdpEndpoint']);}else{const _0x37a7bd=await resolveCloudProfileSession(_0x31cbde,{'effectiveBaseUrl':_0x4db832['baseUrl'],'telemetry':_0x1a680e[_0xb6517e(0x184)]});_0x3fbf07=_0x37a7bd['authPath'],_0x30d1a8=_0x5825b4['ozObz'](resolveEnvVars,_0x37a7bd['settings']),_0x291c70=Boolean(_0x30d1a8[_0xb6517e(0x191)]),_0x5c80db=_0x37a7bd[_0xb6517e(0x17b)]?.[_0xb6517e(0x161)]?.[0x0];}}else{if(!_0x4b6251)throw new Error(_0xb6517e(0x173)+_0x591a4a+_0xb6517e(0x185)+_0x591a4a);const _0x3f3b3d=await _0x5825b4[_0xb6517e(0x15c)](loadSettings,_0x591a4a);_0x30d1a8=_0x5825b4[_0xb6517e(0x15b)](resolveEnvVars,_0x3f3b3d),_0x291c70=_0x5825b4[_0xb6517e(0x18c)](Boolean,_0x30d1a8[_0xb6517e(0x191)]),_0x481347=_0x30d1a8[_0xb6517e(0x166)];}const _0x10ae95=_0x5825b4['tUCiX'](resolveProfileUrl,{'flagBaseUrl':_0x1a680e[_0xb6517e(0x166)],'flagStartPath':_0x1a680e['startPath'],'envBaseUrl':_0x12b8be['envBaseUrl'],'envStartPath':_0x12b8be[_0xb6517e(0x156)],'localSettingsBaseUrl':_0x481347,'projectOverrides':_0x5bec18,'cloudSettings':_0x2aaecb,'authEnvironmentDomain':_0x5c80db}),_0x43e9fe=_0x10ae95[_0xb6517e(0x16f)]??_0x10ae95['baseUrl'];if(_0x5825b4['pYACp'](!_0x43e9fe,!_0x291c70))throw new Error(_0xb6517e(0x177)+_0x591a4a+_0xb6517e(0x17d)+_0x591a4a+'\x20baseUrl\x20<url>');return{'activeProfile':_0x591a4a,'resolvedCloudProfile':_0x464deb,'cloudAuthPath':_0x3fbf07,'resolvedSettings':_0x30d1a8,'isCdpMode':_0x291c70,'url':_0x43e9fe,'startPath':_0x10ae95[_0xb6517e(0x172)]};}function expandString(_0x7e45b2){const _0x52e923=_0x2807,_0x377aa7={'TYffA':function(_0x4a5216,_0x42914d){return _0x4a5216!==_0x42914d;},'VWfQU':function(_0x20a466,_0x43d804){return _0x20a466(_0x43d804);}};if(_0x377aa7[_0x52e923(0x15a)](typeof _0x7e45b2,'string'))return _0x7e45b2;return _0x377aa7['VWfQU'](resolveEnvVars,_0x7e45b2);}function _0x2807(_0x417bf3,_0x196b15){_0x417bf3=_0x417bf3-0x156;const _0x555ced=_0x555c();let _0x280765=_0x555ced[_0x417bf3];return _0x280765;}function expandOverrides(_0x3366b5){const _0x4dad38=_0x2807,_0x7e0f3={'uPfHe':function(_0x5a6b30,_0x27e14c){return _0x5a6b30===_0x27e14c;},'DISKK':_0x4dad38(0x171),'ngFtj':function(_0x3a8d68,_0x3a97ff){return _0x3a8d68(_0x3a97ff);}};if(!_0x3366b5)return _0x3366b5;const _0x292686={..._0x3366b5};return _0x7e0f3['uPfHe'](typeof _0x292686[_0x4dad38(0x166)],_0x4dad38(0x171))&&(_0x292686[_0x4dad38(0x166)]=resolveEnvVars(_0x292686['baseUrl'])),typeof _0x292686[_0x4dad38(0x172)]===_0x7e0f3[_0x4dad38(0x17f)]&&(_0x292686[_0x4dad38(0x172)]=_0x7e0f3[_0x4dad38(0x188)](resolveEnvVars,_0x292686['startPath'])),_0x292686;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34537d,_0x3c9b58){const _0x4cd74c=_0x493b,_0x2acd6f=_0x34537d();while(!![]){try{const _0x54295a=-parseInt(_0x4cd74c(0x142))/0x1+-parseInt(_0x4cd74c(0x143))/0x2*(parseInt(_0x4cd74c(0x144))/0x3)+parseInt(_0x4cd74c(0x147))/0x4*(-parseInt(_0x4cd74c(0x13c))/0x5)+parseInt(_0x4cd74c(0x145))/0x6+parseInt(_0x4cd74c(0x137))/0x7+parseInt(_0x4cd74c(0x138))/0x8*(-parseInt(_0x4cd74c(0x14a))/0x9)+parseInt(_0x4cd74c(0x13d))/0xa;if(_0x54295a===_0x3c9b58)break;else _0x2acd6f['push'](_0x2acd6f['shift']());}catch(_0x567652){_0x2acd6f['push'](_0x2acd6f['shift']());}}}(_0x4acb,0x34e5f));function firstDefined(..._0x59b8d3){const _0x315b96={'smkuv':function(_0x23454f,_0x2f833d){return _0x23454f!==_0x2f833d;}};for(const _0x2409ec of _0x59b8d3){if(_0x2409ec!==undefined&&_0x2409ec!==null&&_0x315b96['smkuv'](_0x2409ec,''))return _0x2409ec;}return undefined;}function normalizeAuthEnvironmentDomain(_0x32f92e){const _0x376d41=_0x493b;if(!_0x32f92e)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x376d41(0x135)](_0x32f92e))return _0x32f92e;return'https://'+_0x32f92e;}export function resolveBaseUrl(_0xb8066c){const _0x317d2f=_0x493b,_0x4316e5={'UnJvK':'baseUrl','BELWZ':function(_0x153a54,_0x2a4264){return _0x153a54===_0x2a4264;},'qjhWi':_0x317d2f(0x14b),'VMxKL':function(_0x197304,_0xf263cb){return _0x197304(_0xf263cb);}},_0x3e476a=_0xb8066c[_0x317d2f(0x136)],_0x40857d=!!_0x3e476a&&_0x4316e5[_0x317d2f(0x149)]in _0x3e476a,_0x364e21=_0x3e476a?.[_0x317d2f(0x13e)],_0x22a5c8=!(_0x40857d&&_0x364e21===null);return firstDefined(_0xb8066c[_0x317d2f(0x14d)],_0xb8066c[_0x317d2f(0x148)],_0xb8066c[_0x317d2f(0x14c)],_0x4316e5['BELWZ'](typeof _0x364e21,_0x4316e5['qjhWi'])?_0x364e21:undefined,_0x22a5c8?_0xb8066c[_0x317d2f(0x146)]?.['baseUrl']:undefined,_0x22a5c8?_0x4316e5['VMxKL'](normalizeAuthEnvironmentDomain,_0xb8066c['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x5e648d){const _0x4b785c=_0x493b,_0x1fc45e={'wonFh':function(_0x3ea0b7,_0x11e810){return _0x3ea0b7 in _0x11e810;},'acxQw':function(_0x4a0052,_0x314448,_0x225fe9,_0x3ef5e9,_0x465e9f){return _0x4a0052(_0x314448,_0x225fe9,_0x3ef5e9,_0x465e9f);},'XlaqM':function(_0x329b7b,_0x17c2a8){return _0x329b7b===_0x17c2a8;}},_0x54be97=_0x5e648d[_0x4b785c(0x136)],_0x5ecaf9=!!_0x54be97&&_0x1fc45e['wonFh'](_0x4b785c(0x13b),_0x54be97),_0x22dc41=_0x54be97?.[_0x4b785c(0x13b)],_0x5d3c95=!(_0x5ecaf9&&_0x22dc41===null);return _0x1fc45e['acxQw'](firstDefined,_0x5e648d[_0x4b785c(0x141)],_0x5e648d['envStartPath'],_0x1fc45e['XlaqM'](typeof _0x22dc41,_0x4b785c(0x14b))?_0x22dc41:undefined,_0x5d3c95?_0x5e648d[_0x4b785c(0x146)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x39af67,_0x15f80a){const _0x2e5405=_0x493b;if(!_0x39af67)return undefined;if(!_0x15f80a)return _0x39af67;const _0x466b9c=_0x39af67['endsWith']('/')?_0x39af67[_0x2e5405(0x13a)](0x0,-0x1):_0x39af67,_0x484e2f=_0x15f80a['startsWith']('/')?_0x15f80a:'/'+_0x15f80a;return _0x466b9c+_0x484e2f;}export function resolveProfileUrl(_0x381c37){const _0x3d78d4=_0x493b,_0x32d76f={'BtJUT':function(_0x537819,_0x4dc0ec){return _0x537819(_0x4dc0ec);},'xIUmG':function(_0x512eea,_0x43a56a){return _0x512eea(_0x43a56a);}},_0x398de4=_0x32d76f[_0x3d78d4(0x13f)](resolveBaseUrl,_0x381c37),_0x1a1e6d=_0x32d76f['xIUmG'](resolveStartPath,_0x381c37);return{'baseUrl':_0x398de4,'startPath':_0x1a1e6d,'url':joinBaseAndPath(_0x398de4,_0x1a1e6d)};}function _0x4acb(){const _0x44752e=['12sDKlxO','88047MlvIRt','773898GTnOOk','cloudSettings','1314592tHcUvG','envBaseUrl','UnJvK','1876500oZcUzf','string','localSettingsBaseUrl','flagBaseUrl','test','projectOverrides','2798187rMXmbg','16eANfso','RANGER_BASE_URL','slice','startPath','5ZmXuvg','8470280qaRSrM','baseUrl','BtJUT','RANGER_START_PATH','flagStartPath','237339RIjdkF'];_0x4acb=function(){return _0x44752e;};return _0x4acb();}function _0x493b(_0x305c78,_0x3b1c7f){_0x305c78=_0x305c78-0x135;const _0x4acb59=_0x4acb();let _0x493bdc=_0x4acb59[_0x305c78];return _0x493bdc;}export function readUrlEnvVars(_0x4d8fb1=process['env']){const _0x2934d8=_0x493b;return{'envBaseUrl':_0x4d8fb1[_0x2934d8(0x139)],'envStartPath':_0x4d8fb1[_0x2934d8(0x140)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x33bd1e,_0x3ddb7b){const _0x50d4b8=_0x2da9,_0x5bd0ea=_0x33bd1e();while(!![]){try{const _0x2444e9=-parseInt(_0x50d4b8(0x1a1))/0x1*(-parseInt(_0x50d4b8(0x1ac))/0x2)+parseInt(_0x50d4b8(0x1a2))/0x3*(-parseInt(_0x50d4b8(0x1a3))/0x4)+-parseInt(_0x50d4b8(0x1ad))/0x5*(-parseInt(_0x50d4b8(0x1a7))/0x6)+-parseInt(_0x50d4b8(0x1a6))/0x7+parseInt(_0x50d4b8(0x1a5))/0x8+-parseInt(_0x50d4b8(0x1a4))/0x9*(parseInt(_0x50d4b8(0x1a8))/0xa)+-parseInt(_0x50d4b8(0x1ab))/0xb*(-parseInt(_0x50d4b8(0x1a9))/0xc);if(_0x2444e9===_0x3ddb7b)break;else _0x5bd0ea['push'](_0x5bd0ea['shift']());}catch(_0x4eee67){_0x5bd0ea['push'](_0x5bd0ea['shift']());}}}(_0x82c9,0x27b5d));function _0x82c9(){const _0x337e14=['error','33oMqBOl','10FluZhI','2570qZcHEn','),\x20retrying\x20in\x20','26669NxelYi','90mjOmsE','27836TfFfSt','480582rnrSfS','1247496YpNvgV','1167670ajubbz','1386EUFXEC','10CGHXNA','734460ENKhMo'];_0x82c9=function(){return _0x337e14;};return _0x82c9();}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x2da9(_0x3b9703,_0x5cc550){_0x3b9703=_0x3b9703-0x1a0;const _0x82c9ba=_0x82c9();let _0x2da9fc=_0x82c9ba[_0x3b9703];return _0x2da9fc;}export async function withRetry(_0xd0db3f,_0x4a0e8a){const _0xa4525d=_0x2da9,_0x37172b={'HuWHP':function(_0x1804e5,_0x291421){return _0x1804e5*_0x291421;},'EUEXm':function(_0x546cca,_0x1ac8ae){return _0x546cca+_0x1ac8ae;}},_0x6e97c=_0x4a0e8a?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x48782b=_0x4a0e8a?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x12d2af;for(let _0x320edd=0x0;_0x320edd<=_0x6e97c;_0x320edd++){try{return await _0xd0db3f();}catch(_0x443003){_0x12d2af=_0x443003 instanceof Error?_0x443003:new Error(String(_0x443003));if(_0x320edd<_0x6e97c){const _0x3f3c6b=_0x37172b['HuWHP'](_0x48782b,Math['pow'](0x2,_0x320edd));_0x4a0e8a?.['label']&&console[_0xa4525d(0x1aa)](_0x4a0e8a['label']+'\x20failed\x20(attempt\x20'+_0x37172b['EUEXm'](_0x320edd,0x1)+'/'+(_0x6e97c+0x1)+_0xa4525d(0x1a0)+_0x3f3c6b+'ms...'),await new Promise(_0x43f691=>setTimeout(_0x43f691,_0x3f3c6b));}}}throw _0x12d2af;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1838c3=_0x22fc;(function(_0x1d92e1,_0x567def){const _0x4229f8=_0x22fc,_0x1c92dd=_0x1d92e1();while(!![]){try{const _0x56457f=-parseInt(_0x4229f8(0x1d4))/0x1*(parseInt(_0x4229f8(0x1d8))/0x2)+-parseInt(_0x4229f8(0x1e5))/0x3+-parseInt(_0x4229f8(0x1d2))/0x4+-parseInt(_0x4229f8(0x1f0))/0x5*(parseInt(_0x4229f8(0x1df))/0x6)+parseInt(_0x4229f8(0x1db))/0x7*(-parseInt(_0x4229f8(0x1be))/0x8)+parseInt(_0x4229f8(0x1f6))/0x9+parseInt(_0x4229f8(0x1bf))/0xa;if(_0x56457f===_0x567def)break;else _0x1c92dd['push'](_0x1c92dd['shift']());}catch(_0x47b42e){_0x1c92dd['push'](_0x1c92dd['shift']());}}}(_0x3d7e,0xeac82));import*as _0x14eaaa from'fs';import*as _0x5d964d from'path';import*as _0x18a6e6 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x5d964d[_0x1838c3(0x1f9)](_0x18a6e6['homedir'](),_0x1838c3(0x1d6),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x2295fd=_0x1838c3,_0x14b4d2={'UfCdk':_0x2295fd(0x1cf),'iIHcZ':function(_0x55b881){return _0x55b881();}};try{if(_0x14eaaa[_0x2295fd(0x1ea)](CACHE_FILE)){const _0x336865=JSON['parse'](_0x14eaaa['readFileSync'](CACHE_FILE,_0x14b4d2[_0x2295fd(0x1c7)]));return{'version':0x3,'sessions':_0x336865['sessions']||{},'branches':_0x336865[_0x2295fd(0x1e6)]||{},'lastEnabledSessionClearedAt':_0x336865[_0x2295fd(0x1e7)]};}}catch{}return _0x14b4d2['iIHcZ'](createEmptyCache);}function saveCache(_0x3b3dae){const _0x5ec746=_0x1838c3;try{const _0x167f5c=_0x5d964d['dirname'](CACHE_FILE);!_0x14eaaa['existsSync'](_0x167f5c)&&_0x14eaaa[_0x5ec746(0x1e2)](_0x167f5c,{'recursive':!![]}),_0x14eaaa[_0x5ec746(0x1cc)](CACHE_FILE,JSON['stringify'](_0x3b3dae,null,0x2));}catch{}}export function getCurrentBranch(){const _0x562118=_0x1838c3,_0x1ffa0b={'TjzKd':function(_0x2b6ad9,_0x43ac09,_0x47357e){return _0x2b6ad9(_0x43ac09,_0x47357e);},'nxGTJ':_0x562118(0x1ca),'wWJWJ':'pipe','JreQl':function(_0x1f1981,_0x12fc17){return _0x1f1981===_0x12fc17;},'KRpxl':'HEAD'};try{const _0x4f25d8=_0x1ffa0b[_0x562118(0x1dc)](execSync,_0x1ffa0b[_0x562118(0x1c0)],{'encoding':_0x562118(0x1cf),'stdio':[_0x1ffa0b['wWJWJ'],_0x1ffa0b[_0x562118(0x1cb)],_0x1ffa0b['wWJWJ']]})['trim']();if(!_0x4f25d8||_0x1ffa0b['JreQl'](_0x4f25d8,_0x1ffa0b[_0x562118(0x1c2)]))return null;return _0x4f25d8;}catch{return null;}}export function enableBranch(_0x32a5de){const _0x58ab96=_0x1838c3,_0x1e73e2={'hgPpN':function(_0x10ed98){return _0x10ed98();}},_0xb559b7=_0x1e73e2[_0x58ab96(0x1ee)](loadCache);_0xb559b7['branches'][_0x32a5de]=!![],saveCache(_0xb559b7);}export function disableBranch(_0x591314){const _0x359ca8=_0x1838c3,_0x45515a={'iAdkt':function(_0x29fc77){return _0x29fc77();}},_0x345d3f=_0x45515a[_0x359ca8(0x1e8)](loadCache);delete _0x345d3f[_0x359ca8(0x1e6)][_0x591314],saveCache(_0x345d3f);}export function isBranchEnabled(_0x49c821){const _0x801644=_0x1838c3,_0x5d2ede={'cFCyn':function(_0x10fd82){return _0x10fd82();},'vulKT':function(_0x836125,_0x46d1ef){return _0x836125===_0x46d1ef;}},_0x2cc326=_0x5d2ede[_0x801644(0x1d7)](loadCache);return _0x5d2ede['vulKT'](_0x2cc326[_0x801644(0x1e6)][_0x49c821],!![]);}function getOrCreateSession(_0x321004,_0x5daf2d){const _0x576c97=_0x1838c3;return!_0x321004['sessions'][_0x5daf2d]&&(_0x321004[_0x576c97(0x1c3)][_0x5daf2d]={}),_0x321004[_0x576c97(0x1c3)][_0x5daf2d];}export function enableSession(_0x3e95cd){const _0x161a3b=_0x1838c3,_0xde133c={'zBneE':function(_0x470e29){return _0x470e29();},'LDpnw':function(_0x459c32,_0xeacd7a){return _0x459c32!==_0xeacd7a;},'zWQRi':_0x161a3b(0x1f5),'fMkvV':function(_0x27ba1b,_0x5cc52a){return _0x27ba1b(_0x5cc52a);}},_0x557a68=_0xde133c[_0x161a3b(0x1d0)](loadCache),_0x1f4795=getOrCreateSession(_0x557a68,_0x3e95cd);_0x1f4795['enabled']=!![];const _0xb7cfb8=getCurrentBranch();_0xb7cfb8&&_0xde133c[_0x161a3b(0x1d1)](_0xb7cfb8,_0xde133c[_0x161a3b(0x1c1)])&&_0xde133c['LDpnw'](_0xb7cfb8,_0x161a3b(0x1d9))&&(_0x557a68[_0x161a3b(0x1e6)][_0xb7cfb8]=!![],_0x1f4795[_0x161a3b(0x1d5)]=_0xb7cfb8),_0xde133c[_0x161a3b(0x1e4)](saveCache,_0x557a68);}function _0x22fc(_0x50b97b,_0x345fe9){_0x50b97b=_0x50b97b-0x1be;const _0x3d7e6f=_0x3d7e();let _0x22fcf8=_0x3d7e6f[_0x50b97b];return _0x22fcf8;}export function isSessionEnabled(_0x5d8cf2){const _0x41c3c9=_0x1838c3,_0x435f3c={'hkGTf':function(_0x1bf97e){return _0x1bf97e();},'wqvlR':function(_0xb50732,_0x4a8d3e){return _0xb50732===_0x4a8d3e;},'LiHHJ':_0x41c3c9(0x1f5),'hWuZc':function(_0x131013,_0x4abe8){return _0x131013===_0x4abe8;}},_0x1c6754=_0x435f3c[_0x41c3c9(0x1d3)](loadCache),_0x33e47e=getCurrentBranch();if(!_0x33e47e||_0x435f3c['wqvlR'](_0x33e47e,_0x435f3c[_0x41c3c9(0x1e9)])||_0x33e47e==='master')return _0x1c6754[_0x41c3c9(0x1c3)][_0x5d8cf2]?.['enabled']===!![];const _0x3fb4ad=_0x435f3c['hWuZc'](_0x1c6754['branches'][_0x33e47e],!![]),_0x1a229f=_0x1c6754[_0x41c3c9(0x1c3)][_0x5d8cf2]?.['enabled']===!![];return _0x3fb4ad||_0x1a229f;}export function disableSession(_0x4492a4){const _0x28b062={'Ckmar':function(_0x1807b6,_0x22e366){return _0x1807b6(_0x22e366);}},_0x1cc459=loadCache(),_0x19f45a=getOrCreateSession(_0x1cc459,_0x4492a4);_0x19f45a['enabled']=![],_0x28b062['Ckmar'](saveCache,_0x1cc459);}export function updateBranchTracking(_0x44ffc8){const _0x2f3094=_0x1838c3,_0x24cf5a={'xyrLg':function(_0x3609dd){return _0x3609dd();},'AxNlm':function(_0x18cc7e,_0x18cfec){return _0x18cc7e===_0x18cfec;},'YhOgn':'master','uRBRR':function(_0x2e0bb7,_0x5958a2){return _0x2e0bb7!==_0x5958a2;}},_0x193cdf=loadCache(),_0x4c97f9=_0x193cdf['sessions'][_0x44ffc8];if(!_0x4c97f9?.['enabled'])return;const _0x16ea32=_0x24cf5a[_0x2f3094(0x1eb)](getCurrentBranch);if(!_0x16ea32||_0x24cf5a['AxNlm'](_0x16ea32,'main')||_0x16ea32===_0x24cf5a[_0x2f3094(0x1c6)])return;_0x24cf5a['uRBRR'](_0x4c97f9[_0x2f3094(0x1d5)],_0x16ea32)&&(_0x193cdf[_0x2f3094(0x1e6)][_0x16ea32]=!![],_0x4c97f9[_0x2f3094(0x1d5)]=_0x16ea32,saveCache(_0x193cdf));}export function initBranchTracking(_0x290666){const _0x4d7cc9=_0x1838c3,_0xe594d2={'srAYB':function(_0x28233b){return _0x28233b();},'BvHvN':function(_0x2a4b42,_0x2ee5b2){return _0x2a4b42(_0x2ee5b2);}},_0x2877c7=loadCache(),_0x135e1a=_0xe594d2['srAYB'](getCurrentBranch);if(!_0x135e1a||_0x135e1a==='main'||_0x135e1a===_0x4d7cc9(0x1d9))return;if(_0x2877c7[_0x4d7cc9(0x1e6)][_0x135e1a]===!![]){const _0x54fc2e=getOrCreateSession(_0x2877c7,_0x290666);_0x54fc2e['enabled']=!![],_0x54fc2e['currentBranch']=_0x135e1a,_0xe594d2[_0x4d7cc9(0x1c5)](saveCache,_0x2877c7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x862606){const _0x3812bc=_0x1838c3,_0x595e7d=loadCache(),_0x57072a=_0x595e7d['sessions'][_0x862606];_0x57072a?.['enabled']&&(_0x595e7d[_0x3812bc(0x1e7)]=Date[_0x3812bc(0x1dd)](),saveCache(_0x595e7d));}export function shouldAutoEnableAfterClear(_0x53362b){const _0x43dac4=_0x1838c3,_0x227321={'VaolJ':function(_0xcafe7b,_0x4e4b78){return _0xcafe7b!==_0x4e4b78;},'ICdoV':function(_0x2a6d35,_0x2d4318){return _0x2a6d35-_0x2d4318;},'oyChn':function(_0x10466f,_0x574755){return _0x10466f<=_0x574755;}};if(_0x227321['VaolJ'](_0x53362b,_0x43dac4(0x1ef)))return![];const _0x4de370=loadCache(),_0x5969a7=_0x4de370[_0x43dac4(0x1e7)];if(!_0x5969a7)return![];const _0x417594=_0x227321[_0x43dac4(0x1f7)](Date[_0x43dac4(0x1dd)](),_0x5969a7);return _0x227321[_0x43dac4(0x1da)](_0x417594,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x5b67ad){const _0x2082b=_0x1838c3,_0x524352={'tjdhJ':function(_0x1ca34d,_0x3ad75b,_0x1fd401){return _0x1ca34d(_0x3ad75b,_0x1fd401);},'AiwSb':function(_0x13fcef){return _0x13fcef();},'hmkmn':function(_0x1caf38,_0x3b60d4){return _0x1caf38!==_0x3b60d4;},'dlDQK':_0x2082b(0x1d9)},_0x43d7fa=loadCache(),_0x447654=_0x524352['tjdhJ'](getOrCreateSession,_0x43d7fa,_0x5b67ad);_0x447654[_0x2082b(0x1e0)]=!![];const _0x31f2ac=_0x524352[_0x2082b(0x1c9)](getCurrentBranch);_0x31f2ac&&_0x524352[_0x2082b(0x1e1)](_0x31f2ac,_0x2082b(0x1f5))&&_0x524352['hmkmn'](_0x31f2ac,_0x524352['dlDQK'])&&(_0x447654[_0x2082b(0x1d5)]=_0x31f2ac),delete _0x43d7fa['lastEnabledSessionClearedAt'],saveCache(_0x43d7fa);}export function registerSession(_0x28a9d6,_0x15d429){const _0x4afd1a=_0x1838c3,_0x379951={'ofEvQ':function(_0x349e93,_0x2bb14e,_0x34c854){return _0x349e93(_0x2bb14e,_0x34c854);},'DIuHp':function(_0x3019f3,_0x325e6e){return _0x3019f3(_0x325e6e);}},_0x3a879d=loadCache(),_0x3b769f=_0x379951['ofEvQ'](getOrCreateSession,_0x3a879d,_0x28a9d6);_0x3b769f[_0x4afd1a(0x1c8)]=_0x15d429,_0x3b769f['registeredAt']=new Date()[_0x4afd1a(0x1f4)](),_0x379951['DIuHp'](saveCache,_0x3a879d);}export function getSessionEntry(_0x111561){const _0x4daef4=_0x1838c3,_0x3eb76d={'PiqYH':function(_0x21ac25){return _0x21ac25();}},_0x4eaefd=_0x3eb76d['PiqYH'](loadCache),_0x351383=_0x4eaefd['sessions'][_0x111561];if(_0x351383?.[_0x4daef4(0x1c8)]&&_0x351383?.['registeredAt'])return{'featureId':_0x351383[_0x4daef4(0x1c8)],'registeredAt':_0x351383[_0x4daef4(0x1e3)]};return null;}export function unregisterSession(_0x58396f){const _0x3b4543=_0x1838c3,_0x91ebce={'aoHvM':function(_0x47bcdc){return _0x47bcdc();},'MZEPB':function(_0x207133,_0x3cbc81){return _0x207133(_0x3cbc81);}},_0xd6c34b=_0x91ebce[_0x3b4543(0x1c4)](loadCache),_0x2b5b01=_0xd6c34b['sessions'][_0x58396f];_0x2b5b01&&(delete _0x2b5b01[_0x3b4543(0x1c8)],delete _0x2b5b01['registeredAt'],_0x91ebce['MZEPB'](saveCache,_0xd6c34b));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x7037a5){const _0x1b1c86=_0x1838c3,_0x28e471={'tduQz':function(_0xcb5412){return _0xcb5412();},'urXCN':function(_0x1bcbdf,_0x3508a0,_0x1a7cbe){return _0x1bcbdf(_0x3508a0,_0x1a7cbe);},'pxNjq':function(_0x115183,_0x423cd2){return _0x115183-_0x423cd2;},'IWNKl':function(_0x240df7,_0x5a3cce){return _0x240df7(_0x5a3cce);}},_0x5d7dfa=_0x28e471['tduQz'](loadCache),_0x2abb4c=_0x28e471[_0x1b1c86(0x1ed)](getOrCreateSession,_0x5d7dfa,_0x7037a5),_0x353cd0=_0x2abb4c['lastPlanReminderAt']||0x0,_0x3aca05=Date[_0x1b1c86(0x1dd)]();if(_0x28e471['pxNjq'](_0x3aca05,_0x353cd0)>=PLAN_REMINDER_INTERVAL_MS)return _0x2abb4c[_0x1b1c86(0x1f2)]=_0x3aca05,_0x28e471[_0x1b1c86(0x1de)](saveCache,_0x5d7dfa),!![];return![];}export function shouldShowStopReminder(_0x51fc15){const _0x3efcc8=_0x1838c3,_0x434adb={'iXJEu':function(_0x38e5c9,_0x1d7a46){return _0x38e5c9>=_0x1d7a46;}},_0x53e569=loadCache(),_0x1c47a5=getOrCreateSession(_0x53e569,_0x51fc15),_0x3a269a=_0x1c47a5[_0x3efcc8(0x1cd)]||0x0,_0x28957a=Date['now']();if(_0x434adb[_0x3efcc8(0x1ce)](_0x28957a-_0x3a269a,STOP_REMINDER_INTERVAL_MS))return _0x1c47a5[_0x3efcc8(0x1cd)]=_0x28957a,saveCache(_0x53e569),!![];return![];}export function hasSessionBeenPrompted(_0x1127dd){const _0x498e3b=_0x1838c3,_0xc6d80c={'MyUGP':function(_0x2c5bd8){return _0x2c5bd8();},'iruqe':function(_0x4267d0,_0x554062){return _0x4267d0===_0x554062;}},_0x33aca1=_0xc6d80c['MyUGP'](loadCache);return _0xc6d80c[_0x498e3b(0x1f8)](_0x33aca1[_0x498e3b(0x1c3)][_0x1127dd]?.[_0x498e3b(0x1f3)],!![]);}function _0x3d7e(){const _0x3b84d9=['nxGTJ','zWQRi','KRpxl','sessions','aoHvM','BvHvN','YhOgn','UfCdk','featureId','AiwSb','git\x20rev-parse\x20--abbrev-ref\x20HEAD','wWJWJ','writeFileSync','lastStopReminderAt','iXJEu','utf-8','zBneE','LDpnw','3869112WUKMAX','hkGTf','2sQIaBH','currentBranch','.claude','cFCyn','1550126Nqqlhv','master','oyChn','259dleHSl','TjzKd','now','IWNKl','24qBbUWk','enabled','hmkmn','mkdirSync','registeredAt','fMkvV','3840678CAwkaq','branches','lastEnabledSessionClearedAt','iAdkt','LiHHJ','existsSync','xyrLg','BWqBl','urXCN','hgPpN','clear','182615lgiQGO','EXExi','lastPlanReminderAt','prompted','toISOString','main','6478254KWpRhD','ICdoV','iruqe','join','375616TrrFCB','59228060Gnoybj'];_0x3d7e=function(){return _0x3b84d9;};return _0x3d7e();}export function markSessionPrompted(_0x40e708){const _0x3dee80=_0x1838c3,_0xc8c3b0={'BWqBl':function(_0x3dbac0){return _0x3dbac0();},'EXExi':function(_0x359f7b,_0x18ef59){return _0x359f7b(_0x18ef59);}},_0x1a366b=_0xc8c3b0[_0x3dee80(0x1ec)](loadCache),_0x291f4d=getOrCreateSession(_0x1a366b,_0x40e708);_0x291f4d['prompted']=!![],_0xc8c3b0[_0x3dee80(0x1f1)](saveCache,_0x1a366b);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x3a4e38=_0x3f2d;(function(_0x2f1ab3,_0x5866c1){const _0x290a1a=_0x3f2d,_0x1f43ee=_0x2f1ab3();while(!![]){try{const _0x3df6e7=parseInt(_0x290a1a(0x14f))/0x1*(-parseInt(_0x290a1a(0x13e))/0x2)+-parseInt(_0x290a1a(0x13f))/0x3*(parseInt(_0x290a1a(0x149))/0x4)+parseInt(_0x290a1a(0x141))/0x5*(parseInt(_0x290a1a(0x14c))/0x6)+-parseInt(_0x290a1a(0x14d))/0x7*(parseInt(_0x290a1a(0x138))/0x8)+-parseInt(_0x290a1a(0x133))/0x9+-parseInt(_0x290a1a(0x153))/0xa*(-parseInt(_0x290a1a(0x12c))/0xb)+parseInt(_0x290a1a(0x12e))/0xc;if(_0x3df6e7===_0x5866c1)break;else _0x1f43ee['push'](_0x1f43ee['shift']());}catch(_0x4419ac){_0x1f43ee['push'](_0x1f43ee['shift']());}}}(_0x2566,0x690d0));import*as _0x461a86 from'fs';import*as _0x157448 from'path';import*as _0x12fd9c from'os';import{execSync}from'child_process';const CACHE_FILE=_0x157448['join'](_0x12fd9c[_0x3a4e38(0x13d)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0xaea1e3=_0x3a4e38;try{if(_0x461a86['existsSync'](CACHE_FILE)){const _0x2f630e=JSON[_0xaea1e3(0x135)](_0x461a86[_0xaea1e3(0x144)](CACHE_FILE,_0xaea1e3(0x147)));return{'version':0x3,'sessions':_0x2f630e[_0xaea1e3(0x146)]||{},'branches':_0x2f630e['branches']||{},'lastEnabledSessionClearedAt':_0x2f630e[_0xaea1e3(0x131)]};}}catch{}return createEmptyCache();}function saveCache(_0x293d03){const _0x4b8ff8=_0x3a4e38;try{const _0x9cdb5=_0x157448['dirname'](CACHE_FILE);!_0x461a86['existsSync'](_0x9cdb5)&&_0x461a86[_0x4b8ff8(0x12b)](_0x9cdb5,{'recursive':!![]}),_0x461a86['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x293d03,null,0x2));}catch{}}export function getCurrentBranch(){const _0x51b82e=_0x3a4e38,_0x3e72bd={'ddukj':_0x51b82e(0x15a),'lKDJD':'utf-8','SKahH':'pipe','DVlAC':'HEAD'};try{const _0x7390f1=execSync(_0x3e72bd[_0x51b82e(0x150)],{'encoding':_0x3e72bd[_0x51b82e(0x12a)],'stdio':[_0x3e72bd['SKahH'],_0x51b82e(0x12f),_0x51b82e(0x12f)]})['trim']();if(!_0x7390f1||_0x7390f1===_0x3e72bd[_0x51b82e(0x13c)])return null;return _0x7390f1;}catch{return null;}}export function enableBranch(_0x55afd8){const _0x2ce847=_0x3a4e38,_0x3b357f={'ueQGV':function(_0x4ccbff){return _0x4ccbff();},'MCqyC':function(_0x1cb7dc,_0x1d47a7){return _0x1cb7dc(_0x1d47a7);}},_0x3f9e2f=_0x3b357f[_0x2ce847(0x134)](loadCache);_0x3f9e2f['branches'][_0x55afd8]=!![],_0x3b357f[_0x2ce847(0x13b)](saveCache,_0x3f9e2f);}function _0x2566(){const _0x30788b=['311526QaTEzH','ueQGV','parse','vTphO','CBJhk','64LfvrQv','uZlFK','main','MCqyC','DVlAC','homedir','2mTdtpD','6VEhDbQ','ikMho','5075kxbyEu','enabled','uCtMZ','readFileSync','UhbuO','sessions','utf-8','MeJgV','920784pZLzCu','branches','featureId','1014srtUhy','487438GOyvVw','TODHM','705981SPeBOD','ddukj','BLjeJ','YgGao','7220PDyXzc','now','pSuNu','currentBranch','prompted','YCLpU','HYJhg','git\x20rev-parse\x20--abbrev-ref\x20HEAD','master','mWnPS','nzuYv','lKDJD','mkdirSync','6941YkFBME','clear','18734760QfrxBY','pipe','registeredAt','lastEnabledSessionClearedAt','RGfYk'];_0x2566=function(){return _0x30788b;};return _0x2566();}export function disableBranch(_0x32a388){const _0x56efc8=loadCache();delete _0x56efc8['branches'][_0x32a388],saveCache(_0x56efc8);}export function isBranchEnabled(_0x28dbdb){const _0x11adcf=_0x3a4e38,_0x21752a=loadCache();return _0x21752a[_0x11adcf(0x14a)][_0x28dbdb]===!![];}function getOrCreateSession(_0x10e328,_0x5d0ad9){const _0x30d7e4=_0x3a4e38;return!_0x10e328['sessions'][_0x5d0ad9]&&(_0x10e328['sessions'][_0x5d0ad9]={}),_0x10e328[_0x30d7e4(0x146)][_0x5d0ad9];}export function enableSession(_0x38986c){const _0x376e1=_0x3a4e38,_0x1933a0={'ikMho':function(_0x5393d8){return _0x5393d8();},'MeJgV':function(_0x2f6413,_0x502384,_0x43d9dc){return _0x2f6413(_0x502384,_0x43d9dc);},'zenhG':function(_0x54f26f,_0x4e9536){return _0x54f26f!==_0x4e9536;}},_0xdc32f5=_0x1933a0[_0x376e1(0x140)](loadCache),_0x4d19cc=_0x1933a0[_0x376e1(0x148)](getOrCreateSession,_0xdc32f5,_0x38986c);_0x4d19cc[_0x376e1(0x142)]=!![];const _0x1224e5=getCurrentBranch();_0x1224e5&&_0x1224e5!==_0x376e1(0x13a)&&_0x1933a0['zenhG'](_0x1224e5,'master')&&(_0xdc32f5['branches'][_0x1224e5]=!![],_0x4d19cc[_0x376e1(0x156)]=_0x1224e5),saveCache(_0xdc32f5);}export function isSessionEnabled(_0x3fa135){const _0x167341=_0x3a4e38,_0x2aab08={'BLjeJ':function(_0xf339f0){return _0xf339f0();},'UhbuO':function(_0x5a1cd3,_0x1f7c4b){return _0x5a1cd3===_0x1f7c4b;},'JBUrK':'main','IVEAX':function(_0x201eee,_0x4a7e8e){return _0x201eee===_0x4a7e8e;}},_0x1faa7d=_0x2aab08['BLjeJ'](loadCache),_0x1469d9=_0x2aab08[_0x167341(0x151)](getCurrentBranch);if(!_0x1469d9||_0x2aab08[_0x167341(0x145)](_0x1469d9,_0x2aab08['JBUrK'])||_0x1469d9===_0x167341(0x15b))return _0x1faa7d[_0x167341(0x146)][_0x3fa135]?.[_0x167341(0x142)]===!![];const _0x731f3a=_0x2aab08['IVEAX'](_0x1faa7d['branches'][_0x1469d9],!![]),_0x4a8dc8=_0x2aab08['IVEAX'](_0x1faa7d['sessions'][_0x3fa135]?.['enabled'],!![]);return _0x731f3a||_0x4a8dc8;}export function disableSession(_0x37186a){const _0x56fa59=_0x3a4e38,_0x422a2b={'uCtMZ':function(_0xe2790){return _0xe2790();},'fFUea':function(_0x59bc0c,_0x452322,_0x420d2b){return _0x59bc0c(_0x452322,_0x420d2b);},'DTFEn':function(_0x1225dc,_0x28954e){return _0x1225dc(_0x28954e);}},_0x18403c=_0x422a2b[_0x56fa59(0x143)](loadCache),_0x15391f=_0x422a2b['fFUea'](getOrCreateSession,_0x18403c,_0x37186a);_0x15391f[_0x56fa59(0x142)]=![],_0x422a2b['DTFEn'](saveCache,_0x18403c);}export function updateBranchTracking(_0x57b41f){const _0x1b71d7=_0x3a4e38,_0x4e051d={'NGfke':'main','HMgmt':function(_0x4f0286,_0x160f2f){return _0x4f0286!==_0x160f2f;}},_0x198106=loadCache(),_0x3dc4de=_0x198106[_0x1b71d7(0x146)][_0x57b41f];if(!_0x3dc4de?.[_0x1b71d7(0x142)])return;const _0x5e07d1=getCurrentBranch();if(!_0x5e07d1||_0x5e07d1===_0x4e051d['NGfke']||_0x5e07d1===_0x1b71d7(0x15b))return;_0x4e051d['HMgmt'](_0x3dc4de[_0x1b71d7(0x156)],_0x5e07d1)&&(_0x198106[_0x1b71d7(0x14a)][_0x5e07d1]=!![],_0x3dc4de[_0x1b71d7(0x156)]=_0x5e07d1,saveCache(_0x198106));}export function initBranchTracking(_0x424a54){const _0x110141=_0x3a4e38,_0x1d6e6c={'kPSJX':function(_0x339850){return _0x339850();},'yhfPe':'main','nzuYv':_0x110141(0x15b)},_0x3162e9=loadCache(),_0x28b693=_0x1d6e6c['kPSJX'](getCurrentBranch);if(!_0x28b693||_0x28b693===_0x1d6e6c['yhfPe']||_0x28b693===_0x1d6e6c[_0x110141(0x15d)])return;if(_0x3162e9['branches'][_0x28b693]===!![]){const _0x141abd=getOrCreateSession(_0x3162e9,_0x424a54);_0x141abd['enabled']=!![],_0x141abd['currentBranch']=_0x28b693,saveCache(_0x3162e9);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x382f2e){const _0x5b3342=_0x3a4e38,_0x3d9780={'kZupG':function(_0x5b8baf){return _0x5b8baf();}},_0x3479c4=_0x3d9780['kZupG'](loadCache),_0x33d346=_0x3479c4['sessions'][_0x382f2e];_0x33d346?.['enabled']&&(_0x3479c4[_0x5b3342(0x131)]=Date['now'](),saveCache(_0x3479c4));}export function shouldAutoEnableAfterClear(_0x2214f1){const _0x126326=_0x3a4e38,_0x56c83e={'wwOHb':function(_0x2a3381,_0x31ed33){return _0x2a3381!==_0x31ed33;},'HYJhg':_0x126326(0x12d),'vTphO':function(_0x3f7371,_0x15e2b9){return _0x3f7371-_0x15e2b9;}};if(_0x56c83e['wwOHb'](_0x2214f1,_0x56c83e[_0x126326(0x159)]))return![];const _0x3bb095=loadCache(),_0x2bcbe8=_0x3bb095['lastEnabledSessionClearedAt'];if(!_0x2bcbe8)return![];const _0x1631a1=_0x56c83e[_0x126326(0x136)](Date['now'](),_0x2bcbe8);return _0x1631a1<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0xb3252a){const _0x46b80e=_0x3a4e38,_0x3c68ec={'DBxqn':function(_0x8e06f4){return _0x8e06f4();},'pSuNu':'main','uqTSN':function(_0x2445b6,_0x9f5256){return _0x2445b6(_0x9f5256);}},_0x575fe4=_0x3c68ec['DBxqn'](loadCache),_0x174143=getOrCreateSession(_0x575fe4,_0xb3252a);_0x174143[_0x46b80e(0x142)]=!![];const _0x21d1dd=getCurrentBranch();_0x21d1dd&&_0x21d1dd!==_0x3c68ec[_0x46b80e(0x155)]&&_0x21d1dd!==_0x46b80e(0x15b)&&(_0x174143[_0x46b80e(0x156)]=_0x21d1dd),delete _0x575fe4[_0x46b80e(0x131)],_0x3c68ec['uqTSN'](saveCache,_0x575fe4);}export function registerSession(_0x16b18e,_0x53c035){const _0x476dce=_0x3a4e38,_0x49c6dd={'mWnPS':function(_0xb9e60f){return _0xb9e60f();},'YCLpU':function(_0x56608b,_0x573669,_0x3ab9d4){return _0x56608b(_0x573669,_0x3ab9d4);},'uZlFK':function(_0x244e5a,_0x447283){return _0x244e5a(_0x447283);}},_0x405a72=_0x49c6dd[_0x476dce(0x15c)](loadCache),_0x130350=_0x49c6dd[_0x476dce(0x158)](getOrCreateSession,_0x405a72,_0x16b18e);_0x130350['featureId']=_0x53c035,_0x130350[_0x476dce(0x130)]=new Date()['toISOString'](),_0x49c6dd[_0x476dce(0x139)](saveCache,_0x405a72);}export function getSessionEntry(_0x4588a6){const _0x288698=_0x3a4e38,_0x19c6d5={'CBJhk':function(_0x282003){return _0x282003();}},_0x2ad9f8=_0x19c6d5[_0x288698(0x137)](loadCache),_0x213c75=_0x2ad9f8['sessions'][_0x4588a6];if(_0x213c75?.[_0x288698(0x14b)]&&_0x213c75?.[_0x288698(0x130)])return{'featureId':_0x213c75['featureId'],'registeredAt':_0x213c75['registeredAt']};return null;}export function unregisterSession(_0xf459e){const _0x25efdb=_0x3a4e38,_0x3ef9c1={'NUtbk':function(_0x2ba878){return _0x2ba878();},'TODHM':function(_0x22e969,_0x1373aa){return _0x22e969(_0x1373aa);}},_0x1a134d=_0x3ef9c1['NUtbk'](loadCache),_0x10d8f8=_0x1a134d[_0x25efdb(0x146)][_0xf459e];_0x10d8f8&&(delete _0x10d8f8[_0x25efdb(0x14b)],delete _0x10d8f8[_0x25efdb(0x130)],_0x3ef9c1[_0x25efdb(0x14e)](saveCache,_0x1a134d));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;function _0x3f2d(_0x2bab08,_0x3f14d3){_0x2bab08=_0x2bab08-0x12a;const _0x256659=_0x2566();let _0x3f2d69=_0x256659[_0x2bab08];return _0x3f2d69;}export function shouldShowPlanReminder(_0x409215){const _0xb782ab=_0x3a4e38,_0x1f037a={'RGfYk':function(_0x3c922f,_0x431f6a,_0x43e0a4){return _0x3c922f(_0x431f6a,_0x43e0a4);}},_0x2da467=loadCache(),_0x3f73d9=_0x1f037a[_0xb782ab(0x132)](getOrCreateSession,_0x2da467,_0x409215),_0x40c2e8=_0x3f73d9['lastPlanReminderAt']||0x0,_0x39e1df=Date[_0xb782ab(0x154)]();if(_0x39e1df-_0x40c2e8>=PLAN_REMINDER_INTERVAL_MS)return _0x3f73d9['lastPlanReminderAt']=_0x39e1df,saveCache(_0x2da467),!![];return![];}export function shouldShowStopReminder(_0x4e8a7a){const _0x1a49e3=_0x3a4e38,_0x434a78={'ggsEW':function(_0xf298c2,_0x339a6d){return _0xf298c2>=_0x339a6d;},'xdpmF':function(_0x2cd290,_0x1d675e){return _0x2cd290-_0x1d675e;}},_0x4b649e=loadCache(),_0x33d7fc=getOrCreateSession(_0x4b649e,_0x4e8a7a),_0x562e8a=_0x33d7fc['lastStopReminderAt']||0x0,_0x35203c=Date[_0x1a49e3(0x154)]();if(_0x434a78['ggsEW'](_0x434a78['xdpmF'](_0x35203c,_0x562e8a),STOP_REMINDER_INTERVAL_MS))return _0x33d7fc['lastStopReminderAt']=_0x35203c,saveCache(_0x4b649e),!![];return![];}export function hasSessionBeenPrompted(_0x45d12c){const _0x51aff7=_0x3a4e38,_0x5ee25f={'cRQjT':function(_0x52cf3f){return _0x52cf3f();},'YgGao':function(_0x3d6a23,_0x5e3330){return _0x3d6a23===_0x5e3330;}},_0x88da8c=_0x5ee25f['cRQjT'](loadCache);return _0x5ee25f[_0x51aff7(0x152)](_0x88da8c['sessions'][_0x45d12c]?.[_0x51aff7(0x157)],!![]);}export function markSessionPrompted(_0x41fe75){const _0x4c0da0={'BaIuO':function(_0x41869c,_0x52c097){return _0x41869c(_0x52c097);}},_0x97b0c8=loadCache(),_0x585da8=getOrCreateSession(_0x97b0c8,_0x41fe75);_0x585da8['prompted']=!![],_0x4c0da0['BaIuO'](saveCache,_0x97b0c8);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1f0ad9=_0x47e9;(function(_0x35e1eb,_0x36c5c7){const _0x1ab00d=_0x47e9,_0x1ba2f5=_0x35e1eb();while(!![]){try{const _0x2cb6e8=-parseInt(_0x1ab00d(0x1e3))/0x1+parseInt(_0x1ab00d(0x1ee))/0x2+parseInt(_0x1ab00d(0x23c))/0x3*(parseInt(_0x1ab00d(0x1e7))/0x4)+parseInt(_0x1ab00d(0x1f6))/0x5*(-parseInt(_0x1ab00d(0x1fe))/0x6)+-parseInt(_0x1ab00d(0x1fb))/0x7+parseInt(_0x1ab00d(0x23d))/0x8+parseInt(_0x1ab00d(0x1f2))/0x9;if(_0x2cb6e8===_0x36c5c7)break;else _0x1ba2f5['push'](_0x1ba2f5['shift']());}catch(_0x256acc){_0x1ba2f5['push'](_0x1ba2f5['shift']());}}}(_0x3fd7,0xae509));import{readFile,writeFile,mkdir,unlink}from'fs/promises';function _0x3fd7(){const _0x2c04c1=['wdKTI','stNvu','OZmKf','chromium','fmdmn','bWSPn','legacy','all','string','QLaiQ','ENOENT','split','497827fOXAPR','repeat','.json','executablePath','4kOgeDb','EvtgJ','header','parse','KxKTH','filter','settings.json','1631378jcsaQm','IANpn','catch','join','12100509iQqEpX','pdf','gjDDQ','TkFME','5931110RMLTyi','aELBT','RaDCQ','hERmT','--disable-features=WebBluetooth','4562831FWvRwP','boolean','lxdoT','6cpFQdO','pNBDK','IQXtB','\x22\x20to\x20legacy\x20path\x20','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','storageState','iYUtl','forWrite','isArray','xXOTe','--no-sandbox','agAgz','userAgent','aSWLi','tWfuM','auth.json','Awqob','zlQVP','emQoT','dWfli','cdpEndpoint','XXfZD','--disable-web-security','keys','drYAL','XAWpQ','clipboard-write','cZExQ','LCKcT','emAUS','FGlsd','WktYv','ranger-config','safeMode','dHPMx','path','ignoreHTTPSErrors','map','efcYn','Failed\x20to\x20decrypt\x20auth\x20state:\x20','now','KqidD','--allow-insecure-localhost','--disable-setuid-sandbox','endsWith','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','OdCrt','-cli','DxaNB','amsxl','storageStatePath','baseUrl','extraHTTPHeaders','auth.json.enc','browser','getuid','setupHeaders','stagehand','contextOptions','KurYN','allow','qAilj','2225814oSgiJe','1181976TqBlSF','env','sessions','tOjoF','playwright-cli','dGxmx','args','length','object','fromEntries','--unsafely-treat-insecure-origin-as-secure=http://localhost','configPath','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','core','push','includes','headless','file','local','slwnW','entries'];_0x3fd7=function(){return _0x2c04c1;};return _0x3fd7();}import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x288e1f,_0xe51316){const _0x34a8a3=_0x47e9,_0x45304f={'ZboOC':function(_0x137a13,_0x4b2a8f,_0x55dbd5,_0x379a4e){return _0x137a13(_0x4b2a8f,_0x55dbd5,_0x379a4e);},'dWfli':function(_0x42ceb9,_0x4a0a4c,_0x5353a8){return _0x42ceb9(_0x4a0a4c,_0x5353a8);},'EvtgJ':function(_0x360b9d,_0x379607,_0x1b2693){return _0x360b9d(_0x379607,_0x1b2693);},'bWSPn':function(_0x4aea6a,_0x22a9a5){return _0x4aea6a(_0x22a9a5);},'RaDCQ':function(_0x51e20e,_0x17f46b){return _0x51e20e!==_0x17f46b;}},_0x16a03a=_0x45304f['ZboOC'](join,_0xe51316,'ci',_0x288e1f),_0x5ae453=join(_0xe51316,_0x34a8a3(0x24f),_0x288e1f),_0x19af9e=_0x45304f[_0x34a8a3(0x211)](join,_0xe51316,_0x288e1f),_0x48df19=join(_0xe51316,_0x34a8a3(0x24f)),_0x4b02c6=_0x45304f[_0x34a8a3(0x1e8)](join,_0xe51316,'ci');if(existsSync(_0x16a03a))return _0x16a03a;if(_0x45304f[_0x34a8a3(0x1dc)](existsSync,_0x5ae453))return _0x5ae453;if(existsSync(_0x19af9e)&&(_0x45304f[_0x34a8a3(0x1f8)](_0x19af9e,_0x48df19)&&_0x45304f[_0x34a8a3(0x1f8)](_0x19af9e,_0x4b02c6)?!![]:hasLegacyProfileFiles(_0x19af9e)))return _0x19af9e;return null;}export function getEnvDir(_0x1fabb7,_0x55233c={}){const _0x3b412a=_0x47e9,_0x3f0a63={'amsxl':function(_0x1e35e3,_0x4c7e1a,_0x2c773f){return _0x1e35e3(_0x4c7e1a,_0x2c773f);},'OdCrt':function(_0x50ada2,_0x434769){return _0x50ada2(_0x434769);},'huUGH':function(_0xeee981,_0x3c9d89,_0x5228df){return _0xeee981(_0x3c9d89,_0x5228df);},'bHIiO':function(_0x35ec3a,_0x35005a,_0x260464,_0x1464d2){return _0x35ec3a(_0x35005a,_0x260464,_0x1464d2);},'aELBT':_0x3b412a(0x24f)},_0x2bc379=getRangerDir(),_0x565b80=_0x3f0a63[_0x3b412a(0x22f)](findEnvInRoot,_0x1fabb7,_0x2bc379);if(_0x565b80){if(_0x55233c[_0x3b412a(0x205)]&&_0x3f0a63[_0x3b412a(0x22c)](isLegacyEnvPath,_0x565b80))throw _0x3f0a63['huUGH'](legacyWriteError,_0x1fabb7,_0x565b80);return _0x565b80;}const _0x46ac87=getRangerHomeDir();if(_0x46ac87!==_0x2bc379){const _0x8652e6=findEnvInRoot(_0x1fabb7,_0x46ac87);if(_0x8652e6){if(_0x55233c[_0x3b412a(0x205)]&&isLegacyEnvPath(_0x8652e6))throw legacyWriteError(_0x1fabb7,_0x8652e6);return _0x8652e6;}}const _0x167af0=_0x3f0a63['bHIiO'](join,_0x46ac87,_0x3f0a63[_0x3b412a(0x1f7)],_0x1fabb7);if(_0x55233c['forWrite'])throw legacyWriteError(_0x1fabb7,_0x167af0);return _0x167af0;}function isLegacyEnvPath(_0x3339cd){const _0x37209e=_0x47e9,_0xda6afb={'PxOMd':function(_0x1e662c){return _0x1e662c();},'NUDGP':function(_0x59b8a7,_0x49335f){return _0x59b8a7+_0x49335f;}},_0x372fbf=getRangerDir(),_0x7136f8=_0xda6afb['PxOMd'](getRangerHomeDir);for(const _0xbc997c of new Set([_0x372fbf,_0x7136f8])){const _0x2865a6=_0xbc997c[_0x37209e(0x22a)]('/')?_0xbc997c:_0xda6afb['NUDGP'](_0xbc997c,'/');if(_0x3339cd===_0xbc997c||_0x3339cd['startsWith'](_0x2865a6))return!![];}return![];}function legacyWriteError(_0xca273f,_0x49ab0c){const _0x422c02=_0x47e9,_0x510f87={'gjDDQ':function(_0x445bf5,_0xa6ea9d){return _0x445bf5+_0xa6ea9d;}};return new Error(_0x510f87[_0x422c02(0x1f4)](_0x510f87[_0x422c02(0x1f4)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0xca273f+_0x422c02(0x201)+_0x49ab0c+'.\x0a',_0x422c02(0x202))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a',_0x422c02(0x22b)));}export function findExistingEnv(_0x15580c,_0x2f3013){const _0x137366=_0x47e9,_0x2910f2={'OZmKf':_0x137366(0x1dd),'lxdoT':function(_0x5ef9cf,_0x2bae1a,_0x374882){return _0x5ef9cf(_0x2bae1a,_0x374882);},'wdKTI':function(_0x1d112a,_0x4616f9){return _0x1d112a(_0x4616f9);},'MBtId':function(_0x535cef,_0x2b5f96){return _0x535cef===_0x2b5f96;},'pDdUk':function(_0x2a9a09,_0x2e140a){return _0x2a9a09===_0x2e140a;}},_0x3c7b9b=_0x2f3013?.['rangerDir'],_0x57d7de=_0x3c7b9b?[_0x3c7b9b]:[getRangerDir(),getRangerHomeDir()][_0x137366(0x1ec)]((_0x182869,_0x8d2478,_0xe969b7)=>_0xe969b7['indexOf'](_0x182869)===_0x8d2478),_0x3952ca=_0x2f3013?.['locations']??['ci',_0x137366(0x24f),_0x2910f2[_0x137366(0x1d9)]];for(const _0x1f7b5b of _0x57d7de){const _0xc3c225=_0x2910f2[_0x137366(0x1fd)](join,_0x1f7b5b,_0x137366(0x24f)),_0x3fd1a3=join(_0x1f7b5b,'ci'),_0x64785=[{'location':'ci','path':join(_0x1f7b5b,'ci',_0x15580c)},{'location':'local','path':join(_0x1f7b5b,_0x137366(0x24f),_0x15580c)},{'location':_0x137366(0x1dd),'path':join(_0x1f7b5b,_0x15580c)}];for(const _0x488a66 of _0x64785){if(_0x3952ca[_0x137366(0x24c)](_0x488a66['location'])&&_0x2910f2[_0x137366(0x1d7)](existsSync,_0x488a66[_0x137366(0x221)])){if(_0x2910f2['MBtId'](_0x488a66['location'],_0x2910f2['OZmKf'])&&(_0x488a66[_0x137366(0x221)]===_0xc3c225||_0x2910f2['pDdUk'](_0x488a66[_0x137366(0x221)],_0x3fd1a3))&&!hasLegacyProfileFiles(_0x488a66[_0x137366(0x221)]))continue;return{'path':_0x488a66[_0x137366(0x221)],'location':_0x488a66['location']};}}}return null;}function hasLegacyProfileFiles(_0x3f6b69){const _0x190634=_0x47e9,_0x27e8f0={'QLaiQ':function(_0x20f0b4,_0x25c9bb){return _0x20f0b4(_0x25c9bb);}};return _0x27e8f0[_0x190634(0x1e0)](existsSync,join(_0x3f6b69,_0x190634(0x1ed)))||_0x27e8f0[_0x190634(0x1e0)](existsSync,join(_0x3f6b69,_0x190634(0x20d)))||_0x27e8f0['QLaiQ'](existsSync,join(_0x3f6b69,_0x190634(0x233)));}export function isEnvCi(_0xbe52ff){const _0x39ee24=_0x47e9,_0x269b04={'xXOTe':function(_0x2e1761,_0x1e7ba0,_0x5962f7,_0x1a1e53){return _0x2e1761(_0x1e7ba0,_0x5962f7,_0x1a1e53);},'qBHmN':function(_0x3f6419){return _0x3f6419();},'SAoqf':function(_0x2d30fd){return _0x2d30fd();},'Awqob':function(_0x106b86){return _0x106b86();},'QEefw':function(_0x11b09b,_0x41639e){return _0x11b09b(_0x41639e);},'hNXol':function(_0x4dd231,_0x3c5f13,_0x59f51c,_0x1adae6){return _0x4dd231(_0x3c5f13,_0x59f51c,_0x1adae6);}};if(existsSync(_0x269b04[_0x39ee24(0x207)](join,_0x269b04['qBHmN'](getRangerDir),'ci',_0xbe52ff)))return!![];const _0x2e53ba=_0x269b04['SAoqf'](getRangerHomeDir);if(_0x2e53ba!==_0x269b04[_0x39ee24(0x20e)](getRangerDir)&&_0x269b04['QEefw'](existsSync,_0x269b04['hNXol'](join,_0x2e53ba,'ci',_0xbe52ff)))return!![];return![];}export async function cleanupTempFiles(_0x40b047){const _0x3e13bc=_0x47e9,_0x4b3124={'uDBIe':function(_0x54f6f6,_0x450474){return _0x54f6f6!==_0x450474;}},_0x2c3eff=[_0x40b047['tempAuthPath'],_0x40b047[_0x3e13bc(0x248)]]['filter'](Boolean);await Promise[_0x3e13bc(0x1de)](_0x2c3eff['map'](_0xf4524d=>unlink(_0xf4524d)['catch'](_0x13845a=>{const _0x1bda06=_0x3e13bc;_0x4b3124['uDBIe'](_0x13845a['code'],_0x1bda06(0x1e1))&&console['warn'](_0x1bda06(0x249)+_0xf4524d+':',_0x13845a['message']);})));}export function getSettingsPath(_0x33c88f){const _0x49941a=_0x47e9;return join(getEnvDir(_0x33c88f),_0x49941a(0x1ed));}export async function loadSettings(_0xbfb6bb){const _0x11d144=_0x47e9,_0x1e9b61={'fmdmn':function(_0x1699b7,_0x164a7c){return _0x1699b7(_0x164a7c);},'XAWpQ':function(_0x144ec4,_0x48dbb4,_0x2aa754){return _0x144ec4(_0x48dbb4,_0x2aa754);},'AnWdm':'utf-8'},_0x2d69ea=getSettingsPath(_0xbfb6bb);if(!_0x1e9b61[_0x11d144(0x1db)](existsSync,_0x2d69ea))return{};try{const _0x2d0ddb=await _0x1e9b61[_0x11d144(0x217)](readFile,_0x2d69ea,_0x1e9b61['AnWdm']);return JSON[_0x11d144(0x1ea)](_0x2d0ddb);}catch{return{};}}export async function saveSettings(_0x1786f6,_0x436c00){const _0x1beda7=_0x47e9,_0x400f1f={'pNBDK':function(_0x3e9876,_0x33d405){return _0x3e9876(_0x33d405);},'dOHCb':function(_0x36e854,_0x1f61ba,_0x29bf2a){return _0x36e854(_0x1f61ba,_0x29bf2a);},'efcYn':function(_0x450cdc,_0x25256f,_0x25a032){return _0x450cdc(_0x25256f,_0x25a032);}},_0x2dc05a=getSettingsPath(_0x1786f6),_0x3a327b=_0x400f1f['pNBDK'](dirname,_0x2dc05a);!_0x400f1f[_0x1beda7(0x1ff)](existsSync,_0x3a327b)&&await _0x400f1f['dOHCb'](mkdir,_0x3a327b,{'recursive':!![]}),await _0x400f1f[_0x1beda7(0x224)](writeFile,_0x2dc05a,JSON['stringify'](_0x436c00,null,0x2));}export function resolveEnvVars(_0x493d9e){const _0x211eae=_0x47e9,_0x4173f1={'SXbdx':_0x211eae(0x1df)};if(typeof _0x493d9e===_0x4173f1['SXbdx'])return _0x493d9e['replace'](/\$\{(\w+)\}/g,(_0x2eee8f,_0x3f0df5)=>{const _0xe69beb=_0x211eae,_0xeed412=process[_0xe69beb(0x23e)][_0x3f0df5];if(_0xeed412===undefined)throw new Error('Environment\x20variable\x20'+_0x3f0df5+'\x20is\x20not\x20set');return _0xeed412;});if(Array[_0x211eae(0x206)](_0x493d9e))return _0x493d9e['map'](resolveEnvVars);if(_0x493d9e&&typeof _0x493d9e==='object')return Object[_0x211eae(0x246)](Object[_0x211eae(0x1d6)](_0x493d9e)[_0x211eae(0x223)](([_0x280bed,_0x594be0])=>[_0x280bed,resolveEnvVars(_0x594be0)]));return _0x493d9e;}const isRecord=_0x50347f=>typeof _0x50347f==='object'&&_0x50347f!==null&&!Array['isArray'](_0x50347f),asRecord=_0x2a950a=>isRecord(_0x2a950a)?_0x2a950a:undefined,mergeHeaders=(_0x473084,_0xdedd36)=>{const _0x3728c9=_0x47e9,_0x2200fe={'XXfZD':function(_0x550412,_0x210087){return _0x550412??_0x210087;}},_0x3b750b={..._0x2200fe[_0x3728c9(0x213)](_0x473084,{}),..._0xdedd36??{}};return Object[_0x3728c9(0x215)](_0x3b750b)[_0x3728c9(0x244)]?_0x3b750b:undefined;},SAFE_MODE_ARGS=[_0x1f0ad9(0x1fa)],ALLOW_LOCALHOST_ARGS=[_0x1f0ad9(0x214),'--allow-running-insecure-content',_0x1f0ad9(0x247),_0x1f0ad9(0x228)];function _0x47e9(_0x4b2059,_0x537a4d){_0x4b2059=_0x4b2059-0x1d5;const _0x3fd77f=_0x3fd7();let _0x47e921=_0x3fd77f[_0x4b2059];return _0x47e921;}export function buildBrowserOptionsFromSettings(_0x43f73b,_0x335172={}){const _0x696a4f=_0x1f0ad9,_0x7592c7={'vMCkn':function(_0x1f94ab,_0x520f08){return _0x1f94ab(_0x520f08);},'stNvu':function(_0x2122c6,_0x54ad52){return _0x2122c6===_0x54ad52;}},_0x10931f=_0x7592c7['vMCkn'](asRecord,_0x43f73b[_0x696a4f(0x234)]),_0x5da93b={...asRecord(_0x10931f?.['launchOptions'])??{}};typeof _0x335172['headless']===_0x696a4f(0x1fc)&&(_0x5da93b['headless']=_0x335172[_0x696a4f(0x24d)]);if(_0x43f73b[_0x696a4f(0x21f)]){const _0x357e88=_0x5da93b[_0x696a4f(0x243)]??[],_0xf21045=SAFE_MODE_ARGS[_0x696a4f(0x1ec)](_0x18e74d=>!_0x357e88[_0x696a4f(0x24c)](_0x18e74d));_0x5da93b[_0x696a4f(0x243)]=[..._0x357e88,..._0xf21045];}if(_0x43f73b['allowInsecureLocalhost']){const _0x24f9a7=_0x5da93b[_0x696a4f(0x243)]??[],_0x2016b9=ALLOW_LOCALHOST_ARGS['filter'](_0xfe98ca=>!_0x24f9a7[_0x696a4f(0x24c)](_0xfe98ca));_0x5da93b['args']=[..._0x24f9a7,..._0x2016b9];}const _0x378f40={...asRecord(_0x10931f?.['contextOptions'])??{}};_0x378f40[_0x696a4f(0x222)]=!![];_0x7592c7[_0x696a4f(0x1d8)](typeof _0x43f73b[_0x696a4f(0x20a)],_0x696a4f(0x1df))&&(_0x378f40['userAgent']=_0x43f73b['userAgent']);const _0x1d3976=mergeHeaders(_0x7592c7['vMCkn'](asRecord,_0x378f40[_0x696a4f(0x232)]),asRecord(_0x43f73b['headers']));return _0x1d3976?_0x378f40[_0x696a4f(0x232)]=_0x1d3976:delete _0x378f40['extraHTTPHeaders'],_0x335172[_0x696a4f(0x230)]&&(_0x378f40[_0x696a4f(0x203)]=_0x335172['storageStatePath']),{'launchOptions':_0x5da93b,'contextOptions':_0x378f40};}export async function resolveProfileStorageState(_0x7d817c){const _0x4e533b=_0x1f0ad9,_0x503bcd={'iYUtl':function(_0x562b16,_0x2e3cb1){return _0x562b16(_0x2e3cb1);}};return _0x503bcd[_0x4e533b(0x204)](resolveLocalAuthPath,getEnvDir(_0x7d817c));}async function resolveLocalAuthPath(_0x11c2dc){const _0x4cf39a=_0x1f0ad9,_0x2ea274={'KqidD':function(_0x331d88,_0x562a96,_0x2735a8){return _0x331d88(_0x562a96,_0x2735a8);},'slwnW':'auth.json','cZExQ':function(_0x47004d,_0x523c06){return _0x47004d(_0x523c06);},'LCKcT':function(_0x35f5d8,_0x5a19d4){return _0x35f5d8(_0x5a19d4);}},_0x107682=_0x2ea274[_0x4cf39a(0x227)](join,_0x11c2dc,_0x4cf39a(0x233)),_0x4cac6b=_0x2ea274[_0x4cf39a(0x227)](join,_0x11c2dc,_0x2ea274[_0x4cf39a(0x1d5)]);if(_0x2ea274[_0x4cf39a(0x219)](existsSync,_0x107682))try{const _0x1638b1=await getToken();if(!_0x1638b1)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2ec1db=await readFile(_0x107682),_0x13de5a=_0x2ea274['KqidD'](decrypt,_0x2ec1db,_0x1638b1),_0x24b965=join(tmpdir(),'ranger-auth-'+Date[_0x4cf39a(0x226)]()+_0x4cf39a(0x1e5));return await writeFile(_0x24b965,_0x13de5a),{'storageStatePath':_0x24b965,'tempAuthPath':_0x24b965};}catch(_0x3fe2cc){const _0x1c66c5=_0x3fe2cc instanceof Error?_0x3fe2cc['message']:_0x2ea274['cZExQ'](String,_0x3fe2cc);throw new Error(_0x4cf39a(0x225)+_0x1c66c5);}if(_0x2ea274[_0x4cf39a(0x21a)](existsSync,_0x4cac6b))return{'storageStatePath':_0x4cac6b};return{};}export async function buildPlaywrightConfig(_0x8975aa,_0x59d0ca,_0x1fb27c,_0x29e9cd,_0x22b882){const _0x930d82=_0x1f0ad9,_0x46c810={'FGlsd':function(_0x37876c,_0xe2f637,_0xb7dbb0,_0x12b71a,_0xe6606c,_0x4c6283,_0x2ad007){return _0x37876c(_0xe2f637,_0xb7dbb0,_0x12b71a,_0xe6606c,_0x4c6283,_0x2ad007);},'yVAZc':_0x930d82(0x237)};if(_0x22b882)return _0x46c810['FGlsd'](buildPlaywrightConfigCore,_0x8975aa,_0x22b882,_0x59d0ca,_0x1fb27c,_0x29e9cd,'stagehand');const {storageStatePath:_0x416344,tempAuthPath:_0x318e4b}=await resolveLocalAuthPath(getEnvDir(_0x59d0ca));try{const _0x26185d=await _0x46c810[_0x930d82(0x21c)](buildPlaywrightConfigCore,_0x8975aa,_0x416344,_0x59d0ca,_0x1fb27c,_0x29e9cd,_0x46c810['yVAZc']);return{..._0x26185d,'tempAuthPath':_0x318e4b};}catch(_0x5ea96a){_0x318e4b&&await unlink(_0x318e4b)['catch'](()=>{});throw _0x5ea96a;}}export async function buildPlaywrightConfigCore(_0x5e3d6f,_0xbf1747,_0xceb040,_0x12688a,_0x4ec2c2,_0x577bbe=_0x1f0ad9(0x237)){const _0x1ef01f=_0x1f0ad9,_0x5be85a={'WPSuz':_0x1ef01f(0x229),'WYAPS':_0x1ef01f(0x218),'WktYv':function(_0x208c15){return _0x208c15();},'jrBvx':_0x1ef01f(0x1da),'OfCYC':_0x1ef01f(0x24e),'IpDAK':'tabs','ZjRve':function(_0x30d002,_0x208906){return _0x30d002===_0x208906;},'DxaNB':function(_0x4d22e6,_0xf00d,_0x190e6f){return _0x4d22e6(_0xf00d,_0x190e6f);},'sxohG':'ranger-config','mPwNp':function(_0x4079ba,_0x33fb58){return _0x4079ba===_0x33fb58;}},_0x4f4d02=_0x12688a||randomUUID(),_0x52a8ad=join(_0x5be85a[_0x1ef01f(0x21d)](getRangerDir),'sessions',_0x4f4d02),_0x37f2b2=Boolean(_0x5e3d6f[_0x1ef01f(0x212)]),_0x2d27bc=_0x37f2b2?{'browserName':_0x5be85a['jrBvx'],'cdpEndpoint':_0x5e3d6f[_0x1ef01f(0x212)]}:((()=>{const _0x55028b=_0x1ef01f,{launchOptions:_0x107eca,contextOptions:_0x5ee926}=buildBrowserOptionsFromSettings(_0x5e3d6f,{'headless':_0x4ec2c2?![]:_0x5e3d6f[_0x55028b(0x24d)]??!![],'storageStatePath':_0xbf1747});if(process[_0x55028b(0x235)]?.()===0x0){const _0x3a13ca=[_0x55028b(0x208),_0x5be85a['WPSuz']],_0x259d5a=_0x107eca[_0x55028b(0x243)]??[],_0x5095bd=_0x3a13ca['filter'](_0x5cffb9=>!_0x259d5a['includes'](_0x5cffb9));_0x107eca['args']=[..._0x259d5a,..._0x5095bd];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x107eca,'contextOptions':{..._0x5ee926,'permissions':['clipboard-read',_0x5be85a['WYAPS']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3e51a1=_0x577bbe===_0x1ef01f(0x241)?{'browser':_0x2d27bc,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x52a8ad,'outputMode':_0x5be85a['OfCYC'],'codegen':'none'}:{'name':_0xceb040,'browser':_0x2d27bc,'capabilities':[_0x1ef01f(0x24a),_0x5be85a['IpDAK'],'install',_0x1ef01f(0x1f3),'vision'],'imageResponses':_0x1ef01f(0x23a),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x52a8ad};if(!_0x37f2b2){const _0x356def=_0x3e51a1['browser'],_0x24789e=_0x356def['contextOptions'];if(_0x5be85a['ZjRve'](_0x24789e[_0x1ef01f(0x20a)],undefined))delete _0x24789e['userAgent'];if(_0x24789e['storageState']===undefined)delete _0x24789e['storageState'];}const _0x517965=_0x5be85a[_0x1ef01f(0x22e)](join,_0x5be85a['WktYv'](tmpdir),_0x5be85a['sxohG']);!existsSync(_0x517965)&&await mkdir(_0x517965,{'recursive':!![]});const _0x3c1454=_0x5be85a['mPwNp'](_0x577bbe,_0x1ef01f(0x241))?_0x1ef01f(0x22d):'',_0x49b34b=join(_0x517965,_0xceb040+'-'+Date[_0x1ef01f(0x226)]()+_0x3c1454+_0x1ef01f(0x1e5));return await writeFile(_0x49b34b,JSON['stringify'](_0x3e51a1,null,0x2)),{'configPath':_0x49b34b,'storageStatePath':_0xbf1747};}export async function buildPlaywrightCliConfig(_0x27c095,_0x211b70,_0x175c6d,_0x4197ef,_0x400c85){const _0x524415=_0x1f0ad9,_0xe1332b={'rpWMr':function(_0x151621,_0x8be0d2){return _0x151621(_0x8be0d2);},'AWWgS':function(_0x2ce90d,_0x2a77d1,_0x4a8fec,_0x35c3a1,_0x497bf3,_0x350c12,_0x229210){return _0x2ce90d(_0x2a77d1,_0x4a8fec,_0x35c3a1,_0x497bf3,_0x350c12,_0x229210);}};if(_0x400c85)return buildPlaywrightConfigCore(_0x27c095,_0x400c85,_0x211b70,_0x175c6d,_0x4197ef,_0x524415(0x241));const {storageStatePath:_0x5adb63,tempAuthPath:_0x4d7e8b}=await resolveLocalAuthPath(_0xe1332b['rpWMr'](getEnvDir,_0x211b70));try{const _0x4aaced=await _0xe1332b['AWWgS'](buildPlaywrightConfigCore,_0x27c095,_0x5adb63,_0x211b70,_0x175c6d,_0x4197ef,'playwright-cli');return{..._0x4aaced,'tempAuthPath':_0x4d7e8b};}catch(_0x392e17){_0x4d7e8b&&await unlink(_0x4d7e8b)[_0x524415(0x1f0)](()=>{});throw _0x392e17;}}export async function buildRangerwrightCliConfig(_0x35bba7,_0x38c0fa,_0x1a36f6,_0x2a6e6f,_0x454925){const _0x22aef6=_0x1f0ad9,_0x3eabb4={'aSWLi':function(_0x426379,_0x50912e){return _0x426379===_0x50912e;},'RtLdt':'chromium','dWRqJ':'clipboard-read','tOjoF':function(_0xfd9148){return _0xfd9148();},'JVRkb':_0x22aef6(0x23f),'dDaYF':function(_0x2d7469,_0x6bfc21){return _0x2d7469(_0x6bfc21);},'dGxmx':function(_0x2f1d9b,_0x84f0fe,_0x225c56){return _0x2f1d9b(_0x84f0fe,_0x225c56);}},{storageStatePath:_0x257926,tempAuthPath:_0x312747}=_0x454925?{'storageStatePath':_0x454925,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x38c0fa)),_0x51ec57=_0x1a36f6||_0x3eabb4['tOjoF'](randomUUID),_0x53e73d=join(_0x3eabb4[_0x22aef6(0x240)](getRangerDir),_0x3eabb4['JVRkb'],_0x51ec57),_0x20791a=_0x3eabb4['dDaYF'](Boolean,_0x35bba7[_0x22aef6(0x212)]),_0x175d3a=_0x20791a?{'browserName':'chromium','cdpEndpoint':_0x35bba7['cdpEndpoint']}:((()=>{const _0x2702e4=_0x22aef6,{launchOptions:_0x2c4bf8,contextOptions:_0x20ace2}=buildBrowserOptionsFromSettings(_0x35bba7,{'headless':_0x2a6e6f?![]:_0x35bba7[_0x2702e4(0x24d)]??!![],'storageStatePath':_0x257926});if(_0x3eabb4[_0x2702e4(0x20b)](process['getuid']?.(),0x0)){const _0x3c8636=[_0x2702e4(0x208),'--disable-setuid-sandbox'],_0x1464f0=_0x2c4bf8[_0x2702e4(0x243)]??[],_0x5d2566=_0x3c8636['filter'](_0x1a80bf=>!_0x1464f0['includes'](_0x1a80bf));_0x2c4bf8[_0x2702e4(0x243)]=[..._0x1464f0,..._0x5d2566];}return{'browserName':_0x3eabb4['RtLdt'],'launchOptions':_0x2c4bf8,'contextOptions':{..._0x20ace2,'permissions':[_0x3eabb4['dWRqJ'],_0x2702e4(0x218)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x20791a){const _0x316e0c=_0x175d3a[_0x22aef6(0x238)];if(_0x316e0c){if(_0x3eabb4[_0x22aef6(0x20b)](_0x316e0c['userAgent'],undefined))delete _0x316e0c['userAgent'];if(_0x316e0c[_0x22aef6(0x203)]===undefined)delete _0x316e0c['storageState'];}}const _0x5677d8={'browser':_0x175d3a,'outputDir':_0x53e73d,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x1300b7;try{const _0x330a5d=_0x3eabb4[_0x22aef6(0x242)](join,_0x3eabb4['tOjoF'](tmpdir),_0x22aef6(0x21e));!existsSync(_0x330a5d)&&await mkdir(_0x330a5d,{'recursive':!![]}),_0x1300b7=join(_0x330a5d,_0x38c0fa+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x1300b7,JSON['stringify'](_0x5677d8,null,0x2));}catch(_0x88a602){_0x312747&&await unlink(_0x312747)['catch'](()=>{});throw _0x88a602;}return{'configPath':_0x1300b7,'storageStatePath':_0x257926,'tempAuthPath':_0x312747,'outputDir':_0x53e73d};}export async function buildNovaActCliConfig(_0x1e09e5,_0x4c6ccc,_0x484093,_0x3e2194,_0x795d8a){const _0x5709b2=_0x1f0ad9,_0x405018={'bxrtE':function(_0x5a0209,_0x2b8871){return _0x5a0209(_0x2b8871);},'egJbz':function(_0x58eaf2,_0x1d54f9){return _0x58eaf2(_0x1d54f9);},'kAkTp':function(_0x2d802a){return _0x2d802a();},'NLhIc':function(_0x30c7a1,_0x43db75,_0x5201d2,_0x191649){return _0x30c7a1(_0x43db75,_0x5201d2,_0x191649);},'dHPMx':'nova-user-data','qAilj':function(_0xc49d2,_0x38cb3c,_0x9827d){return _0xc49d2(_0x38cb3c,_0x9827d);},'TkFME':function(_0x1f4b0f,_0x52cc1f){return _0x1f4b0f===_0x52cc1f;},'tWfuM':_0x5709b2(0x1df),'KxKTH':function(_0x38aeb2,_0x4877f5){return _0x38aeb2===_0x4877f5;},'wzXrK':function(_0x2ac6ee,_0x113733){return _0x2ac6ee(_0x113733);}},{storageStatePath:_0xb41240,tempAuthPath:_0xd63b3d}=_0x795d8a?{'storageStatePath':_0x795d8a,'tempAuthPath':undefined}:await _0x405018['bxrtE'](resolveLocalAuthPath,_0x405018['egJbz'](getEnvDir,_0x4c6ccc)),_0x1c6e1a=_0x484093||_0x405018['kAkTp'](randomUUID),_0x2e21dc=_0x405018['NLhIc'](join,getRangerDir(),'sessions',_0x1c6e1a),_0x173e1b=join(_0x2e21dc,_0x405018[_0x5709b2(0x220)]),_0x42d318=_0xb41240?_0x405018[_0x5709b2(0x23b)](join,_0x173e1b,'Default'):undefined,{launchOptions:_0xa84ff0,contextOptions:_0x59fc5a}=buildBrowserOptionsFromSettings(_0x1e09e5,{'headless':_0x3e2194?![]:_0x1e09e5[_0x5709b2(0x24d)]??!![],'storageStatePath':_0xb41240});if(_0x405018[_0x5709b2(0x1f5)](process['getuid']?.(),0x0)){const _0x57b710=[_0x5709b2(0x208),'--disable-setuid-sandbox'],_0x344202=_0xa84ff0[_0x5709b2(0x243)]??[],_0x2fcc7c=_0x57b710['filter'](_0x38aef4=>!_0x344202['includes'](_0x38aef4));_0xa84ff0[_0x5709b2(0x243)]=[..._0x344202,..._0x2fcc7c];}const _0x1210c8=typeof _0xa84ff0[_0x5709b2(0x1e6)]===_0x405018[_0x5709b2(0x20c)]?_0xa84ff0['executablePath']:_0xb41240?chromium[_0x5709b2(0x1e6)]():undefined;return{'storageStatePath':_0xb41240,'tempAuthPath':_0xd63b3d,'baseUrl':_0x1e09e5[_0x5709b2(0x231)],'headless':Boolean(_0xa84ff0[_0x5709b2(0x24d)]),'userDataDir':_0x173e1b,'browserProfilePath':_0x42d318,'executablePath':_0x1210c8,'launchArgs':Array['isArray'](_0xa84ff0[_0x5709b2(0x243)])?_0xa84ff0['args']['filter'](_0x347df5=>typeof _0x347df5===_0x5709b2(0x1df)):[],'userAgent':_0x405018[_0x5709b2(0x1eb)](typeof _0x59fc5a[_0x5709b2(0x20a)],'string')?_0x59fc5a['userAgent']:undefined,'extraHTTPHeaders':_0x59fc5a[_0x5709b2(0x232)],'allowInsecureLocalhost':Boolean(_0x1e09e5['allowInsecureLocalhost']),'safeMode':_0x405018['wzXrK'](Boolean,_0x1e09e5['safeMode']),'cdpEndpoint':_0x1e09e5[_0x5709b2(0x212)],'isCdpMode':Boolean(_0x1e09e5['cdpEndpoint'])};}export function getNestedValue(_0x94e9ae,_0x4034b8){const _0x52aa96=_0x1f0ad9,_0x171197={'NAeXp':function(_0x2b871b,_0x9fd540){return _0x2b871b(_0x9fd540);},'GWHLJ':function(_0x3ee471,_0x2c1a09){return _0x3ee471===_0x2c1a09;},'kIpBf':function(_0x3dcfba,_0x297e1f){return _0x3dcfba===_0x297e1f;},'ijJKn':function(_0xbb8a95,_0xe51eda){return _0xbb8a95!==_0xe51eda;}},_0x4628a8=_0x171197['NAeXp'](parseKeyPath,_0x4034b8);let _0x38d0e6=_0x94e9ae;for(const _0xfa2c24 of _0x4628a8){if(_0x171197['GWHLJ'](_0x38d0e6,null)||_0x171197['kIpBf'](_0x38d0e6,undefined)||_0x171197['ijJKn'](typeof _0x38d0e6,_0x52aa96(0x245)))return undefined;_0x38d0e6=_0x38d0e6[_0xfa2c24];}return _0x38d0e6;}export function setNestedValue(_0x985907,_0x37053f,_0x120f1d){const _0x4cbb8c=_0x1f0ad9,_0x25745c={'IANpn':function(_0x45cc29,_0x27178d){return _0x45cc29<_0x27178d;},'zlQVP':function(_0x127821,_0x725f76){return _0x127821 in _0x725f76;},'CEzPA':function(_0x20f55a,_0x55fddd){return _0x20f55a!==_0x55fddd;},'QcqWY':_0x4cbb8c(0x245)},_0x43b24b=parseKeyPath(_0x37053f);let _0xe0e418=_0x985907;for(let _0x232733=0x0;_0x25745c[_0x4cbb8c(0x1ef)](_0x232733,_0x43b24b[_0x4cbb8c(0x244)]-0x1);_0x232733++){const _0x10f30e=_0x43b24b[_0x232733];(!_0x25745c[_0x4cbb8c(0x20f)](_0x10f30e,_0xe0e418)||_0x25745c['CEzPA'](typeof _0xe0e418[_0x10f30e],_0x25745c['QcqWY']))&&(_0xe0e418[_0x10f30e]={}),_0xe0e418=_0xe0e418[_0x10f30e];}_0xe0e418[_0x43b24b[_0x43b24b['length']-0x1]]=_0x120f1d;}export function deleteNestedValue(_0xe909f9,_0x2dca65){const _0x1307ab=_0x1f0ad9,_0x1f6b26={'IQXtB':function(_0x2c4e22,_0x1bf423){return _0x2c4e22(_0x1bf423);},'emAUS':function(_0x45fa90,_0x182e0b){return _0x45fa90<_0x182e0b;},'KurYN':function(_0xd1a7c5,_0x5b2f4f){return _0xd1a7c5-_0x5b2f4f;},'agAgz':'object','hERmT':function(_0x154732,_0x581dc3){return _0x154732 in _0x581dc3;}},_0x6f8a6f=_0x1f6b26[_0x1307ab(0x200)](parseKeyPath,_0x2dca65);let _0x47cf30=_0xe909f9;for(let _0xb9a19c=0x0;_0x1f6b26[_0x1307ab(0x21b)](_0xb9a19c,_0x1f6b26[_0x1307ab(0x239)](_0x6f8a6f['length'],0x1));_0xb9a19c++){if(_0x47cf30===null||_0x47cf30===undefined||typeof _0x47cf30!==_0x1f6b26[_0x1307ab(0x209)])return![];_0x47cf30=_0x47cf30[_0x6f8a6f[_0xb9a19c]];}if(_0x47cf30===null||_0x47cf30===undefined||typeof _0x47cf30!==_0x1f6b26[_0x1307ab(0x209)])return![];const _0x3c5908=_0x6f8a6f[_0x6f8a6f[_0x1307ab(0x244)]-0x1];if(_0x1f6b26[_0x1307ab(0x1f9)](_0x3c5908,_0x47cf30))return delete _0x47cf30[_0x3c5908],!![];return![];}function parseKeyPath(_0x17e1e8){const _0x14bad4=_0x1f0ad9,_0x36bba0={'xMmCj':_0x14bad4(0x1e9),'MAtjT':'headers','LgeSV':function(_0x37d896,_0x272870){return _0x37d896===_0x272870;},'emQoT':'setupHeader'},_0x146a75=_0x17e1e8[_0x14bad4(0x1e2)]('.');return _0x146a75[0x0]===_0x36bba0['xMmCj']&&(_0x146a75[0x0]=_0x36bba0['MAtjT']),_0x36bba0['LgeSV'](_0x146a75[0x0],_0x36bba0[_0x14bad4(0x210)])&&(_0x146a75[0x0]=_0x14bad4(0x236)),_0x146a75;}export function formatSettings(_0x2b70fd,_0x14b2c4=0x0){const _0x2a1f38=_0x1f0ad9,_0x37b877={'zEenn':function(_0x1653a0,_0x3bf537){return _0x1653a0===_0x3bf537;},'drYAL':_0x2a1f38(0x245)},_0x1a3395=[],_0x2d5918='\x20\x20'[_0x2a1f38(0x1e4)](_0x14b2c4);for(const [_0x2ccfbf,_0xfb8cc8]of Object[_0x2a1f38(0x1d6)](_0x2b70fd)){if(_0xfb8cc8===undefined)continue;if(_0x37b877['zEenn'](typeof _0xfb8cc8,_0x37b877[_0x2a1f38(0x216)])&&_0xfb8cc8!==null){_0x1a3395[_0x2a1f38(0x24b)](''+_0x2d5918+_0x2ccfbf+':');for(const [_0x7a85b2,_0x340947]of Object['entries'](_0xfb8cc8)){_0x1a3395['push'](_0x2d5918+'\x20\x20'+_0x7a85b2+':\x20'+_0x340947);}}else _0x1a3395['push'](''+_0x2d5918+_0x2ccfbf+':\x20'+_0xfb8cc8);}return _0x1a3395[_0x2a1f38(0x1f1)]('\x0a');}
|
|
1
|
+
const _0x44a5db=_0x20d1;(function(_0x4e3ced,_0x13796a){const _0x46e26b=_0x20d1,_0x2e27ad=_0x4e3ced();while(!![]){try{const _0x231f92=-parseInt(_0x46e26b(0xb3))/0x1*(-parseInt(_0x46e26b(0xdf))/0x2)+-parseInt(_0x46e26b(0x73))/0x3+parseInt(_0x46e26b(0xa0))/0x4*(parseInt(_0x46e26b(0xe7))/0x5)+parseInt(_0x46e26b(0xb0))/0x6+parseInt(_0x46e26b(0xea))/0x7*(parseInt(_0x46e26b(0xd7))/0x8)+parseInt(_0x46e26b(0xed))/0x9*(-parseInt(_0x46e26b(0xab))/0xa)+parseInt(_0x46e26b(0xce))/0xb*(-parseInt(_0x46e26b(0xa3))/0xc);if(_0x231f92===_0x13796a)break;else _0x2e27ad['push'](_0x2e27ad['shift']());}catch(_0x4af222){_0x2e27ad['push'](_0x2e27ad['shift']());}}}(_0xbd33,0x75b9b));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x23cae7,_0x11be48){const _0x47972c=_0x20d1,_0x57b284={'tsiYp':'local','AlZLv':function(_0x38682b,_0x3dea31,_0x268e60){return _0x38682b(_0x3dea31,_0x268e60);},'rBEdr':function(_0x4cb25f,_0xf0c3b6){return _0x4cb25f(_0xf0c3b6);},'QIAEn':function(_0x3f9f36,_0x1aa6eb){return _0x3f9f36(_0x1aa6eb);},'OIJPh':function(_0x125b60,_0x23fff7){return _0x125b60!==_0x23fff7;}},_0x3c2941=join(_0x11be48,'ci',_0x23cae7),_0x445066=join(_0x11be48,_0x57b284['tsiYp'],_0x23cae7),_0xb933cb=_0x57b284['AlZLv'](join,_0x11be48,_0x23cae7),_0x3f18b5=_0x57b284[_0x47972c(0xb7)](join,_0x11be48,_0x57b284['tsiYp']),_0x3f5d2b=join(_0x11be48,'ci');if(_0x57b284['rBEdr'](existsSync,_0x3c2941))return _0x3c2941;if(existsSync(_0x445066))return _0x445066;if(_0x57b284[_0x47972c(0xdc)](existsSync,_0xb933cb)&&(_0xb933cb!==_0x3f18b5&&_0x57b284['OIJPh'](_0xb933cb,_0x3f5d2b)?!![]:hasLegacyProfileFiles(_0xb933cb)))return _0xb933cb;return null;}export function getEnvDir(_0x238230,_0xcd322={}){const _0xcf7d29=_0x20d1,_0x5d32bd={'ySrGQ':function(_0x5579a2){return _0x5579a2();},'JYpKD':function(_0x3654d7,_0x1763c6,_0x513e8c){return _0x3654d7(_0x1763c6,_0x513e8c);},'rpZlE':function(_0x445357,_0x4e0d2c,_0x74f9ec){return _0x445357(_0x4e0d2c,_0x74f9ec);},'cvUGV':function(_0x1c6302,_0x111b04){return _0x1c6302(_0x111b04);}},_0x5d4378=_0x5d32bd[_0xcf7d29(0xe1)](getRangerDir),_0x1c6111=findEnvInRoot(_0x238230,_0x5d4378);if(_0x1c6111){if(_0xcd322[_0xcf7d29(0x6d)]&&isLegacyEnvPath(_0x1c6111))throw _0x5d32bd[_0xcf7d29(0xdb)](legacyWriteError,_0x238230,_0x1c6111);return _0x1c6111;}const _0xa986c9=_0x5d32bd[_0xcf7d29(0xe1)](getRangerHomeDir);if(_0xa986c9!==_0x5d4378){const _0x492fa4=_0x5d32bd['rpZlE'](findEnvInRoot,_0x238230,_0xa986c9);if(_0x492fa4){if(_0xcd322['forWrite']&&_0x5d32bd['cvUGV'](isLegacyEnvPath,_0x492fa4))throw legacyWriteError(_0x238230,_0x492fa4);return _0x492fa4;}}const _0x36df04=join(_0xa986c9,'local',_0x238230);if(_0xcd322[_0xcf7d29(0x6d)])throw legacyWriteError(_0x238230,_0x36df04);return _0x36df04;}function isLegacyEnvPath(_0x17fd5d){const _0xcf17e2={'UXPiJ':function(_0x2005b8){return _0x2005b8();}},_0x551f0f=_0xcf17e2['UXPiJ'](getRangerDir),_0x43edb0=getRangerHomeDir();for(const _0x3163cb of new Set([_0x551f0f,_0x43edb0])){const _0x322d93=_0x3163cb['endsWith']('/')?_0x3163cb:_0x3163cb+'/';if(_0x17fd5d===_0x3163cb||_0x17fd5d['startsWith'](_0x322d93))return!![];}return![];}function legacyWriteError(_0x41ce5a,_0x30c033){const _0x5d3234=_0x20d1,_0x43814b={'eBnFr':function(_0x213a15,_0x541a4e){return _0x213a15+_0x541a4e;}};return new Error(_0x43814b[_0x5d3234(0xeb)](_0x5d3234(0x83)+_0x41ce5a+'\x22\x20to\x20legacy\x20path\x20'+_0x30c033+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x5d3234(0x98))+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x5b9ad8,_0x106369){const _0x34672d=_0x20d1,_0x4aeb8b={'sLgNN':function(_0x1d5ed5){return _0x1d5ed5();},'SeFKE':_0x34672d(0x85),'JZzvH':function(_0x1a6eea,_0x5a8379,_0x51b12a){return _0x1a6eea(_0x5a8379,_0x51b12a);},'FlpKj':_0x34672d(0x8b),'eWfee':function(_0x5a3a0e,_0x50e507,_0x2d9364,_0x5a0b5b){return _0x5a3a0e(_0x50e507,_0x2d9364,_0x5a0b5b);},'saxTc':function(_0x49b3ba,_0x4d6223,_0x4beb27,_0x4b815b){return _0x49b3ba(_0x4d6223,_0x4beb27,_0x4b815b);},'eSIFc':function(_0x2df781,_0x3820e0){return _0x2df781===_0x3820e0;}},_0x25a1a2=_0x106369?.[_0x34672d(0xe6)],_0x3aa0e2=_0x25a1a2?[_0x25a1a2]:[_0x4aeb8b[_0x34672d(0xcf)](getRangerDir),getRangerHomeDir()][_0x34672d(0x91)]((_0x538737,_0x18b36d,_0x2ece59)=>_0x2ece59['indexOf'](_0x538737)===_0x18b36d),_0x1da1e4=_0x106369?.['locations']??['ci',_0x34672d(0x8b),_0x4aeb8b[_0x34672d(0xb8)]];for(const _0x1650d9 of _0x3aa0e2){const _0x5ac317=_0x4aeb8b[_0x34672d(0xc3)](join,_0x1650d9,_0x4aeb8b[_0x34672d(0xbc)]),_0x533b2f=join(_0x1650d9,'ci'),_0x160db8=[{'location':'ci','path':_0x4aeb8b['eWfee'](join,_0x1650d9,'ci',_0x5b9ad8)},{'location':_0x4aeb8b[_0x34672d(0xbc)],'path':_0x4aeb8b['saxTc'](join,_0x1650d9,_0x4aeb8b['FlpKj'],_0x5b9ad8)},{'location':_0x34672d(0x85),'path':join(_0x1650d9,_0x5b9ad8)}];for(const _0x152f27 of _0x160db8){if(_0x1da1e4[_0x34672d(0xe2)](_0x152f27['location'])&&existsSync(_0x152f27[_0x34672d(0xd1)])){if(_0x4aeb8b[_0x34672d(0x76)](_0x152f27['location'],'legacy')&&(_0x4aeb8b[_0x34672d(0x76)](_0x152f27['path'],_0x5ac317)||_0x152f27[_0x34672d(0xd1)]===_0x533b2f)&&!hasLegacyProfileFiles(_0x152f27['path']))continue;return{'path':_0x152f27['path'],'location':_0x152f27[_0x34672d(0x8d)]};}}}return null;}function hasLegacyProfileFiles(_0x3c5afe){const _0x15da67=_0x20d1,_0x49f564={'dvLVS':function(_0x4d5833,_0x36299c,_0x1cec27){return _0x4d5833(_0x36299c,_0x1cec27);},'lkEUW':_0x15da67(0x78),'caVUd':function(_0x329d19,_0x4503a7){return _0x329d19(_0x4503a7);},'VsFJc':function(_0x1a114a,_0x2b2548,_0x2e2711){return _0x1a114a(_0x2b2548,_0x2e2711);},'BhHbd':_0x15da67(0xd0),'RVkht':function(_0x38b5e9,_0x3a4e30,_0x6ea529){return _0x38b5e9(_0x3a4e30,_0x6ea529);}};return existsSync(_0x49f564[_0x15da67(0xd8)](join,_0x3c5afe,_0x49f564[_0x15da67(0xc5)]))||_0x49f564[_0x15da67(0xaf)](existsSync,_0x49f564[_0x15da67(0x94)](join,_0x3c5afe,_0x49f564['BhHbd']))||existsSync(_0x49f564[_0x15da67(0xa4)](join,_0x3c5afe,_0x15da67(0x74)));}export function isEnvCi(_0x2d95e0){const _0x4da177=_0x20d1,_0x107036={'hKJhI':function(_0x3dfccb,_0x179a29,_0x261bf6,_0xafec23){return _0x3dfccb(_0x179a29,_0x261bf6,_0xafec23);},'tlwTy':function(_0x31038f){return _0x31038f();},'uDLGX':function(_0x4ca5b0,_0xd3bdb1){return _0x4ca5b0!==_0xd3bdb1;}};if(existsSync(_0x107036['hKJhI'](join,_0x107036['tlwTy'](getRangerDir),'ci',_0x2d95e0)))return!![];const _0x54506e=getRangerHomeDir();if(_0x107036['uDLGX'](_0x54506e,_0x107036[_0x4da177(0xa2)](getRangerDir))&&existsSync(join(_0x54506e,'ci',_0x2d95e0)))return!![];return![];}export async function cleanupTempFiles(_0x26e6a7){const _0x15fa4f=_0x20d1,_0x11e73c={'lNdZc':function(_0x31edd1,_0x456baf){return _0x31edd1!==_0x456baf;},'eiveV':_0x15fa4f(0x82)},_0x5e85f5=[_0x26e6a7['tempAuthPath'],_0x26e6a7['configPath']][_0x15fa4f(0x91)](Boolean);await Promise[_0x15fa4f(0xa7)](_0x5e85f5['map'](_0x1fa265=>unlink(_0x1fa265)['catch'](_0x4b1894=>{const _0x4f0a87=_0x15fa4f;_0x11e73c['lNdZc'](_0x4b1894[_0x4f0a87(0xd2)],_0x11e73c['eiveV'])&&console[_0x4f0a87(0xbf)](_0x4f0a87(0x77)+_0x1fa265+':',_0x4b1894['message']);})));}function _0x20d1(_0x429260,_0x4f8940){_0x429260=_0x429260-0x6a;const _0xbd3396=_0xbd33();let _0x20d145=_0xbd3396[_0x429260];return _0x20d145;}export function getSettingsPath(_0x3e747d){const _0x29f15f=_0x20d1,_0x1bc8be={'aRcpQ':function(_0x3cd926,_0x110562,_0x2e500f){return _0x3cd926(_0x110562,_0x2e500f);},'xijRn':function(_0x36c4a5,_0x501efd){return _0x36c4a5(_0x501efd);},'JpFhj':'settings.json'};return _0x1bc8be[_0x29f15f(0xb1)](join,_0x1bc8be[_0x29f15f(0xa1)](getEnvDir,_0x3e747d),_0x1bc8be[_0x29f15f(0xde)]);}export async function loadSettings(_0x1b67b6){const _0x408557=_0x20d1,_0x2145c7={'YPmuU':function(_0x74741,_0x4ba2a1,_0xfb6ff){return _0x74741(_0x4ba2a1,_0xfb6ff);}},_0x32dcda=getSettingsPath(_0x1b67b6);if(!existsSync(_0x32dcda))return{};try{const _0x44e564=await _0x2145c7[_0x408557(0x7f)](readFile,_0x32dcda,'utf-8');return JSON['parse'](_0x44e564);}catch{return{};}}export async function saveSettings(_0x34e0ad,_0x11e27d){const _0x5e523=_0x20d1,_0x3ed2a3={'hTVQr':function(_0x1fa3ef,_0x44d6b2){return _0x1fa3ef(_0x44d6b2);},'VYqlZ':function(_0x483476,_0x1ec88b,_0xb834b7){return _0x483476(_0x1ec88b,_0xb834b7);}},_0x424fd3=getSettingsPath(_0x34e0ad),_0x31a7ae=_0x3ed2a3['hTVQr'](dirname,_0x424fd3);!existsSync(_0x31a7ae)&&await mkdir(_0x31a7ae,{'recursive':!![]}),await _0x3ed2a3['VYqlZ'](writeFile,_0x424fd3,JSON[_0x5e523(0xc8)](_0x11e27d,null,0x2));}export function resolveEnvVars(_0x34a7ab){const _0x46bda3=_0x20d1,_0x675f3b={'uJpkb':function(_0x1caab2,_0x32a5e2){return _0x1caab2===_0x32a5e2;},'jPGwo':'string','adGuf':'object'};if(_0x675f3b[_0x46bda3(0x72)](typeof _0x34a7ab,_0x675f3b[_0x46bda3(0x9a)]))return _0x34a7ab['replace'](/\$\{(\w+)\}/g,(_0x401e09,_0x158576)=>{const _0x1aa4ae=_0x46bda3,_0x5aaf91=process[_0x1aa4ae(0x7b)][_0x158576];if(_0x5aaf91===undefined)throw new Error(_0x1aa4ae(0xef)+_0x158576+_0x1aa4ae(0xf0));return _0x5aaf91;});if(Array[_0x46bda3(0x80)](_0x34a7ab))return _0x34a7ab[_0x46bda3(0x7c)](resolveEnvVars);if(_0x34a7ab&&typeof _0x34a7ab===_0x675f3b[_0x46bda3(0x8e)])return Object['fromEntries'](Object[_0x46bda3(0xd6)](_0x34a7ab)['map'](([_0x2ee4f1,_0x569093])=>[_0x2ee4f1,resolveEnvVars(_0x569093)]));return _0x34a7ab;}const isRecord=_0x2fbf9f=>typeof _0x2fbf9f==='object'&&_0x2fbf9f!==null&&!Array[_0x44a5db(0x80)](_0x2fbf9f),asRecord=_0x234569=>isRecord(_0x234569)?_0x234569:undefined,mergeHeaders=(_0x5e0ac2,_0x448611)=>{const _0x3e5aa2=_0x44a5db,_0x1bf759={'kvuXZ':function(_0x31e5ef,_0x3579b0){return _0x31e5ef??_0x3579b0;}},_0x583c3a={..._0x1bf759[_0x3e5aa2(0xa5)](_0x5e0ac2,{}),..._0x448611??{}};return Object['keys'](_0x583c3a)[_0x3e5aa2(0xac)]?_0x583c3a:undefined;},SAFE_MODE_ARGS=[_0x44a5db(0xc0)],ALLOW_LOCALHOST_ARGS=[_0x44a5db(0x79),_0x44a5db(0xc2),_0x44a5db(0x92),_0x44a5db(0x86)];export function buildBrowserOptionsFromSettings(_0x4c8ce5,_0x1c88d={}){const _0xbde5a3=_0x44a5db,_0x1b373b={'QlJfN':function(_0x4c5241,_0xfd4512){return _0x4c5241(_0xfd4512);},'grDhB':function(_0x44246f,_0x504cc0){return _0x44246f===_0x504cc0;},'HVQrh':function(_0x31a91f,_0x2f5f5c){return _0x31a91f===_0x2f5f5c;},'CyNiW':'string','sfbJz':function(_0x196b15,_0x359f47){return _0x196b15(_0x359f47);}},_0x4468b6=_0x1b373b['QlJfN'](asRecord,_0x4c8ce5['browser']),_0x56aa88={...asRecord(_0x4468b6?.['launchOptions'])??{}};_0x1b373b[_0xbde5a3(0xe9)](typeof _0x1c88d['headless'],'boolean')&&(_0x56aa88[_0xbde5a3(0x70)]=_0x1c88d[_0xbde5a3(0x70)]);if(_0x4c8ce5[_0xbde5a3(0x90)]){const _0x3ca6fe=_0x56aa88['args']??[],_0x396263=SAFE_MODE_ARGS['filter'](_0x5ed805=>!_0x3ca6fe['includes'](_0x5ed805));_0x56aa88['args']=[..._0x3ca6fe,..._0x396263];}if(_0x4c8ce5[_0xbde5a3(0x88)]){const _0x2fbf85=_0x56aa88['args']??[],_0x47d2da=ALLOW_LOCALHOST_ARGS[_0xbde5a3(0x91)](_0x374520=>!_0x2fbf85['includes'](_0x374520));_0x56aa88[_0xbde5a3(0xd9)]=[..._0x2fbf85,..._0x47d2da];}const _0x481d8a={..._0x1b373b['QlJfN'](asRecord,_0x4468b6?.[_0xbde5a3(0x96)])??{}};_0x481d8a[_0xbde5a3(0xd3)]=!![];_0x1b373b['HVQrh'](typeof _0x4c8ce5['userAgent'],_0x1b373b['CyNiW'])&&(_0x481d8a['userAgent']=_0x4c8ce5['userAgent']);const _0x2fc5d0=mergeHeaders(_0x1b373b['sfbJz'](asRecord,_0x481d8a['extraHTTPHeaders']),asRecord(_0x4c8ce5['headers']));return _0x2fc5d0?_0x481d8a[_0xbde5a3(0xec)]=_0x2fc5d0:delete _0x481d8a[_0xbde5a3(0xec)],_0x1c88d['storageStatePath']&&(_0x481d8a['storageState']=_0x1c88d['storageStatePath']),{'launchOptions':_0x56aa88,'contextOptions':_0x481d8a};}export async function resolveProfileStorageState(_0x42bded){const _0x4a254b=_0x44a5db,_0xddc706={'VbYJN':function(_0x336671,_0x42c9bd){return _0x336671(_0x42c9bd);}};return _0xddc706['VbYJN'](resolveLocalAuthPath,_0xddc706[_0x4a254b(0xb9)](getEnvDir,_0x42bded));}async function resolveLocalAuthPath(_0x5e6999){const _0x2a619a=_0x44a5db,_0x425149={'FquDA':_0x2a619a(0xd0),'MHLeZ':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','mfzFG':function(_0x3237d0,_0x547e3e,_0x52b3d8){return _0x3237d0(_0x547e3e,_0x52b3d8);},'zPKvp':function(_0x1236c4,_0x222b43,_0x1d3321){return _0x1236c4(_0x222b43,_0x1d3321);},'wmrLJ':function(_0x1da41f,_0x476ed7){return _0x1da41f instanceof _0x476ed7;}},_0x30b5a3=join(_0x5e6999,'auth.json.enc'),_0x17646a=join(_0x5e6999,_0x425149[_0x2a619a(0x7a)]);if(existsSync(_0x30b5a3))try{const _0x1f8002=await getToken();if(!_0x1f8002)throw new Error(_0x425149[_0x2a619a(0x6f)]);const _0x41e670=await readFile(_0x30b5a3),_0x59f111=_0x425149['mfzFG'](decrypt,_0x41e670,_0x1f8002),_0x56b275=join(tmpdir(),_0x2a619a(0xda)+Date['now']()+'.json');return await _0x425149[_0x2a619a(0xba)](writeFile,_0x56b275,_0x59f111),{'storageStatePath':_0x56b275,'tempAuthPath':_0x56b275};}catch(_0x4639db){const _0x25a100=_0x425149['wmrLJ'](_0x4639db,Error)?_0x4639db[_0x2a619a(0xa8)]:String(_0x4639db);throw new Error(_0x2a619a(0xcc)+_0x25a100);}if(existsSync(_0x17646a))return{'storageStatePath':_0x17646a};return{};}export async function buildPlaywrightConfig(_0xe66819,_0x381e08,_0x26e330,_0x300d58,_0x3e83f2){const _0x1e1584=_0x44a5db,_0x4f6046={'gqUDF':'stagehand','mYSXA':function(_0x358054,_0x24c432){return _0x358054(_0x24c432);},'mLsiM':function(_0x44bc32,_0x2be672){return _0x44bc32(_0x2be672);}};if(_0x3e83f2)return buildPlaywrightConfigCore(_0xe66819,_0x3e83f2,_0x381e08,_0x26e330,_0x300d58,_0x4f6046['gqUDF']);const {storageStatePath:_0x35466e,tempAuthPath:_0x330694}=await resolveLocalAuthPath(_0x4f6046[_0x1e1584(0xe8)](getEnvDir,_0x381e08));try{const _0x440877=await buildPlaywrightConfigCore(_0xe66819,_0x35466e,_0x381e08,_0x26e330,_0x300d58,'stagehand');return{..._0x440877,'tempAuthPath':_0x330694};}catch(_0x1cd655){_0x330694&&await _0x4f6046['mLsiM'](unlink,_0x330694)['catch'](()=>{});throw _0x1cd655;}}export async function buildPlaywrightConfigCore(_0x2799cb,_0x52128b,_0xedd3d6,_0x3d36c5,_0x5e28ff,_0x45081e=_0x44a5db(0x7e)){const _0x47a337=_0x44a5db,_0x258356={'BtZZZ':function(_0x12e9ce,_0x50dfab){return _0x12e9ce===_0x50dfab;},'rRAuM':'clipboard-read','qlltT':function(_0xa756a2){return _0xa756a2();},'CstcQ':function(_0x34da82,_0x38f2c6,_0x4d3828,_0x4fbb8e){return _0x34da82(_0x38f2c6,_0x4d3828,_0x4fbb8e);},'Nemqh':'playwright-cli','uAyay':_0x47a337(0x8a),'oyHgx':_0x47a337(0x93),'cCGeb':function(_0x4f25b2,_0x3913f7,_0x31aa8c){return _0x4f25b2(_0x3913f7,_0x31aa8c);},'vkrFf':function(_0x349c15){return _0x349c15();},'yDOmS':function(_0x368747,_0x3e900e){return _0x368747(_0x3e900e);},'pBAgQ':function(_0x4a2144,_0x48c7d7,_0x53660a){return _0x4a2144(_0x48c7d7,_0x53660a);},'rRhLb':'-cli','lUnCw':function(_0x299864,_0x1eb7e6,_0x3237a1){return _0x299864(_0x1eb7e6,_0x3237a1);}},_0x30be34=_0x3d36c5||_0x258356['qlltT'](randomUUID),_0x1ece91=_0x258356[_0x47a337(0xe0)](join,_0x258356['qlltT'](getRangerDir),'sessions',_0x30be34),_0x2ca749=Boolean(_0x2799cb[_0x47a337(0xd5)]),_0x4f4f92=_0x2ca749?{'browserName':'chromium','cdpEndpoint':_0x2799cb['cdpEndpoint']}:((()=>{const _0x598d23=_0x47a337,{launchOptions:_0x17f734,contextOptions:_0x208195}=buildBrowserOptionsFromSettings(_0x2799cb,{'headless':_0x5e28ff?![]:_0x2799cb['headless']??!![],'storageStatePath':_0x52128b});if(_0x258356[_0x598d23(0xaa)](process['getuid']?.(),0x0)){const _0x5a666b=['--no-sandbox','--disable-setuid-sandbox'],_0x13411e=_0x17f734[_0x598d23(0xd9)]??[],_0x2d0345=_0x5a666b[_0x598d23(0x91)](_0x39fe07=>!_0x13411e['includes'](_0x39fe07));_0x17f734['args']=[..._0x13411e,..._0x2d0345];}return{'isolated':!![],'browserName':_0x598d23(0xad),'launchOptions':_0x17f734,'contextOptions':{..._0x208195,'permissions':[_0x258356['rRAuM'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x20649b=_0x258356['BtZZZ'](_0x45081e,_0x258356[_0x47a337(0x8f)])?{'browser':_0x4f4f92,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1ece91,'outputMode':_0x258356['uAyay'],'codegen':'none'}:{'name':_0xedd3d6,'browser':_0x4f4f92,'capabilities':['core',_0x258356['oyHgx'],_0x47a337(0xa9),'pdf',_0x47a337(0xc1)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1ece91};if(!_0x2ca749){const _0x15cc13=_0x20649b['browser'],_0x174d5f=_0x15cc13['contextOptions'];if(_0x258356['BtZZZ'](_0x174d5f['userAgent'],undefined))delete _0x174d5f[_0x47a337(0xb6)];if(_0x174d5f[_0x47a337(0x8c)]===undefined)delete _0x174d5f['storageState'];}const _0x2725ef=_0x258356['cCGeb'](join,_0x258356[_0x47a337(0xc4)](tmpdir),_0x47a337(0xd4));!_0x258356['yDOmS'](existsSync,_0x2725ef)&&await _0x258356[_0x47a337(0xf3)](mkdir,_0x2725ef,{'recursive':!![]});const _0x4b9a4c=_0x258356[_0x47a337(0xaa)](_0x45081e,_0x258356[_0x47a337(0x8f)])?_0x258356['rRhLb']:'',_0xf72c4f=_0x258356[_0x47a337(0x97)](join,_0x2725ef,_0xedd3d6+'-'+Date[_0x47a337(0xcb)]()+_0x4b9a4c+'.json');return await writeFile(_0xf72c4f,JSON[_0x47a337(0xc8)](_0x20649b,null,0x2)),{'configPath':_0xf72c4f,'storageStatePath':_0x52128b};}export async function buildPlaywrightCliConfig(_0x2652dd,_0x5166ff,_0x523103,_0x2f86f7,_0x137fb0){const _0x1b20af=_0x44a5db,_0x1f701b={'QKuWY':_0x1b20af(0xc9),'gTgJo':function(_0x8f3f78,_0x2b407a){return _0x8f3f78(_0x2b407a);}};if(_0x137fb0)return buildPlaywrightConfigCore(_0x2652dd,_0x137fb0,_0x5166ff,_0x523103,_0x2f86f7,_0x1f701b['QKuWY']);const {storageStatePath:_0x31b8a8,tempAuthPath:_0x46fc5c}=await _0x1f701b['gTgJo'](resolveLocalAuthPath,getEnvDir(_0x5166ff));try{const _0x131677=await buildPlaywrightConfigCore(_0x2652dd,_0x31b8a8,_0x5166ff,_0x523103,_0x2f86f7,_0x1f701b[_0x1b20af(0xb5)]);return{..._0x131677,'tempAuthPath':_0x46fc5c};}catch(_0x1f41e5){_0x46fc5c&&await unlink(_0x46fc5c)[_0x1b20af(0x6c)](()=>{});throw _0x1f41e5;}}export async function buildRangerwrightCliConfig(_0x1944a6,_0x4f7a0a,_0x12190c,_0x589f41,_0x25bf36){const _0xf4cad2=_0x44a5db,_0x386bde={'MvAKM':function(_0x2dbd29,_0x519689){return _0x2dbd29===_0x519689;},'alOWv':'--no-sandbox','eoFIH':'clipboard-write','unJHP':function(_0x4607f2){return _0x4607f2();},'eMwQf':function(_0x535796,_0x47d71c,_0x3a779b,_0x46a43f){return _0x535796(_0x47d71c,_0x3a779b,_0x46a43f);},'QxuPh':function(_0x43eb9a,_0x2b123f){return _0x43eb9a(_0x2b123f);},'oXspR':_0xf4cad2(0xad),'yMdHX':'ranger-config','QTbjM':function(_0x5b4c2c,_0x38707d){return _0x5b4c2c(_0x38707d);},'xpsSq':function(_0x4f3b34,_0x3a22d4,_0x4c08c4){return _0x4f3b34(_0x3a22d4,_0x4c08c4);}},{storageStatePath:_0x1467f1,tempAuthPath:_0x3e8ef4}=_0x25bf36?{'storageStatePath':_0x25bf36,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4f7a0a)),_0x10df12=_0x12190c||_0x386bde['unJHP'](randomUUID),_0x1f3633=_0x386bde[_0xf4cad2(0xae)](join,getRangerDir(),'sessions',_0x10df12),_0x4abf90=_0x386bde[_0xf4cad2(0xbe)](Boolean,_0x1944a6[_0xf4cad2(0xd5)]),_0x513961=_0x4abf90?{'browserName':_0x386bde['oXspR'],'cdpEndpoint':_0x1944a6[_0xf4cad2(0xd5)]}:((()=>{const _0x5dc987=_0xf4cad2,{launchOptions:_0x1931ee,contextOptions:_0x188cf9}=buildBrowserOptionsFromSettings(_0x1944a6,{'headless':_0x589f41?![]:_0x1944a6[_0x5dc987(0x70)]??!![],'storageStatePath':_0x1467f1});if(_0x386bde['MvAKM'](process[_0x5dc987(0xdd)]?.(),0x0)){const _0x105555=[_0x386bde['alOWv'],_0x5dc987(0x89)],_0x56a7be=_0x1931ee[_0x5dc987(0xd9)]??[],_0x16bb45=_0x105555['filter'](_0x23e2e2=>!_0x56a7be[_0x5dc987(0xe2)](_0x23e2e2));_0x1931ee[_0x5dc987(0xd9)]=[..._0x56a7be,..._0x16bb45];}return{'browserName':'chromium','launchOptions':_0x1931ee,'contextOptions':{..._0x188cf9,'permissions':[_0x5dc987(0xbd),_0x386bde[_0x5dc987(0xc6)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x4abf90){const _0x5e1948=_0x513961['contextOptions'];if(_0x5e1948){if(_0x5e1948[_0xf4cad2(0xb6)]===undefined)delete _0x5e1948['userAgent'];if(_0x386bde[_0xf4cad2(0x6b)](_0x5e1948[_0xf4cad2(0x8c)],undefined))delete _0x5e1948[_0xf4cad2(0x8c)];}}const _0x52731a={'browser':_0x513961,'outputDir':_0x1f3633,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5aeeb2;try{const _0x29618a=join(_0x386bde[_0xf4cad2(0xee)](tmpdir),_0x386bde[_0xf4cad2(0x9b)]);!_0x386bde[_0xf4cad2(0xa6)](existsSync,_0x29618a)&&await _0x386bde['xpsSq'](mkdir,_0x29618a,{'recursive':!![]}),_0x5aeeb2=join(_0x29618a,_0x4f7a0a+'-'+Date['now']()+_0xf4cad2(0xb4)),await writeFile(_0x5aeeb2,JSON['stringify'](_0x52731a,null,0x2));}catch(_0x4fd428){_0x3e8ef4&&await _0x386bde['QTbjM'](unlink,_0x3e8ef4)['catch'](()=>{});throw _0x4fd428;}return{'configPath':_0x5aeeb2,'storageStatePath':_0x1467f1,'tempAuthPath':_0x3e8ef4,'outputDir':_0x1f3633};}export async function buildNovaActCliConfig(_0x41683b,_0x17f3bd,_0x16c2c9,_0x8b6fc,_0x2e160f){const _0xcc7bc6=_0x44a5db,_0x28dc1a={'lOQzr':function(_0x59ad0a){return _0x59ad0a();},'tDOJW':'sessions','aRNcu':function(_0x702247,_0x49ca19,_0x30fb0f){return _0x702247(_0x49ca19,_0x30fb0f);},'qJEAY':_0xcc7bc6(0xc7),'NDTEC':function(_0x17b680,_0x405dfd){return _0x17b680===_0x405dfd;},'XxTpc':'--disable-setuid-sandbox','COAWh':function(_0x518367,_0x33358c){return _0x518367(_0x33358c);},'yFhFN':function(_0x9235ce,_0x4a38f5){return _0x9235ce(_0x4a38f5);}},{storageStatePath:_0x844fd,tempAuthPath:_0x439437}=_0x2e160f?{'storageStatePath':_0x2e160f,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x17f3bd)),_0x50d1e9=_0x16c2c9||randomUUID(),_0x4e65d3=join(_0x28dc1a[_0xcc7bc6(0x95)](getRangerDir),_0x28dc1a[_0xcc7bc6(0x9e)],_0x50d1e9),_0x11612f=_0x28dc1a[_0xcc7bc6(0xbb)](join,_0x4e65d3,'nova-user-data'),_0x2068e2=_0x844fd?join(_0x11612f,_0x28dc1a[_0xcc7bc6(0x81)]):undefined,{launchOptions:_0x17324e,contextOptions:_0x121978}=buildBrowserOptionsFromSettings(_0x41683b,{'headless':_0x8b6fc?![]:_0x41683b[_0xcc7bc6(0x70)]??!![],'storageStatePath':_0x844fd});if(_0x28dc1a['NDTEC'](process['getuid']?.(),0x0)){const _0x2151b=['--no-sandbox',_0x28dc1a[_0xcc7bc6(0xf1)]],_0x5173cf=_0x17324e['args']??[],_0x16f2fd=_0x2151b[_0xcc7bc6(0x91)](_0x30949=>!_0x5173cf['includes'](_0x30949));_0x17324e[_0xcc7bc6(0xd9)]=[..._0x5173cf,..._0x16f2fd];}const _0x372105=typeof _0x17324e['executablePath']===_0xcc7bc6(0x6a)?_0x17324e[_0xcc7bc6(0xe4)]:_0x844fd?chromium['executablePath']():undefined;return{'storageStatePath':_0x844fd,'tempAuthPath':_0x439437,'baseUrl':_0x41683b[_0xcc7bc6(0x99)],'headless':_0x28dc1a[_0xcc7bc6(0xe5)](Boolean,_0x17324e[_0xcc7bc6(0x70)]),'userDataDir':_0x11612f,'browserProfilePath':_0x2068e2,'executablePath':_0x372105,'launchArgs':Array[_0xcc7bc6(0x80)](_0x17324e['args'])?_0x17324e[_0xcc7bc6(0xd9)]['filter'](_0x149da9=>typeof _0x149da9==='string'):[],'userAgent':_0x28dc1a[_0xcc7bc6(0xf2)](typeof _0x121978['userAgent'],'string')?_0x121978['userAgent']:undefined,'extraHTTPHeaders':_0x121978[_0xcc7bc6(0xec)],'allowInsecureLocalhost':_0x28dc1a['yFhFN'](Boolean,_0x41683b['allowInsecureLocalhost']),'safeMode':_0x28dc1a['COAWh'](Boolean,_0x41683b[_0xcc7bc6(0x90)]),'cdpEndpoint':_0x41683b[_0xcc7bc6(0xd5)],'isCdpMode':Boolean(_0x41683b['cdpEndpoint'])};}export function getNestedValue(_0x30a88c,_0x18f847){const _0x547d2f=_0x44a5db,_0x262d83={'NgKkO':function(_0x4ed923,_0x2b819c){return _0x4ed923!==_0x2b819c;}},_0x40526f=parseKeyPath(_0x18f847);let _0x2ab323=_0x30a88c;for(const _0x22e969 of _0x40526f){if(_0x2ab323===null||_0x2ab323===undefined||_0x262d83[_0x547d2f(0x9d)](typeof _0x2ab323,_0x547d2f(0x71)))return undefined;_0x2ab323=_0x2ab323[_0x22e969];}return _0x2ab323;}export function setNestedValue(_0x1d58d9,_0x1186d4,_0x210157){const _0x22cedf=_0x44a5db,_0x25c59c={'TBYOz':function(_0x5afac4,_0x4f09ee){return _0x5afac4-_0x4f09ee;},'BmiQw':function(_0x11b094,_0x15e387){return _0x11b094 in _0x15e387;}},_0x205bac=parseKeyPath(_0x1186d4);let _0x2be08a=_0x1d58d9;for(let _0x2c71be=0x0;_0x2c71be<_0x25c59c['TBYOz'](_0x205bac['length'],0x1);_0x2c71be++){const _0x30460b=_0x205bac[_0x2c71be];(!_0x25c59c[_0x22cedf(0x84)](_0x30460b,_0x2be08a)||typeof _0x2be08a[_0x30460b]!=='object')&&(_0x2be08a[_0x30460b]={}),_0x2be08a=_0x2be08a[_0x30460b];}_0x2be08a[_0x205bac[_0x205bac[_0x22cedf(0xac)]-0x1]]=_0x210157;}export function deleteNestedValue(_0x5600ae,_0x12990e){const _0x38fd0d=_0x44a5db,_0xe78a00={'YVNyt':function(_0x388c31,_0x356a39){return _0x388c31(_0x356a39);},'wqQIK':function(_0x48f6cc,_0x5238d5){return _0x48f6cc<_0x5238d5;},'yAciL':function(_0x20fd47,_0x349aa6){return _0x20fd47-_0x349aa6;},'tnPXQ':function(_0x10f55b,_0x4a683b){return _0x10f55b===_0x4a683b;},'ZOmPh':function(_0xed4287,_0x4ce596){return _0xed4287!==_0x4ce596;},'ocASR':function(_0x10e58d,_0x9dee9b){return _0x10e58d in _0x9dee9b;}},_0x1e7554=_0xe78a00[_0x38fd0d(0x75)](parseKeyPath,_0x12990e);let _0x1f3947=_0x5600ae;for(let _0x1df061=0x0;_0xe78a00['wqQIK'](_0x1df061,_0xe78a00['yAciL'](_0x1e7554[_0x38fd0d(0xac)],0x1));_0x1df061++){if(_0xe78a00['tnPXQ'](_0x1f3947,null)||_0x1f3947===undefined||_0xe78a00['ZOmPh'](typeof _0x1f3947,'object'))return![];_0x1f3947=_0x1f3947[_0x1e7554[_0x1df061]];}if(_0x1f3947===null||_0xe78a00[_0x38fd0d(0x9c)](_0x1f3947,undefined)||typeof _0x1f3947!=='object')return![];const _0x12be1b=_0x1e7554[_0x1e7554['length']-0x1];if(_0xe78a00['ocASR'](_0x12be1b,_0x1f3947))return delete _0x1f3947[_0x12be1b],!![];return![];}function _0xbd33(){const _0x3b6e36=['clipboard-read','QxuPh','warn','--disable-features=WebBluetooth','vision','--allow-running-insecure-content','JZzvH','vkrFf','lkEUW','eoFIH','Default','stringify','playwright-cli','setupHeaders','now','Failed\x20to\x20decrypt\x20auth\x20state:\x20','setupHeader','77nQpxHP','sLgNN','auth.json','path','code','ignoreHTTPSErrors','ranger-config','cdpEndpoint','entries','2401208LfebCf','dvLVS','args','ranger-auth-','JYpKD','QIAEn','getuid','JpFhj','1177204cjPwwH','CstcQ','ySrGQ','includes','repeat','executablePath','COAWh','rangerDir','5QhaSFm','mYSXA','grDhB','14HYMlTA','eBnFr','extraHTTPHeaders','4167JbNjSI','unJHP','Environment\x20variable\x20','\x20is\x20not\x20set','XxTpc','NDTEC','pBAgQ','string','MvAKM','catch','forWrite','BCVqD','MHLeZ','headless','object','uJpkb','2766189IsYBvD','auth.json.enc','YVNyt','eSIFc','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','settings.json','--disable-web-security','FquDA','env','map','gObXG','stagehand','YPmuU','isArray','qJEAY','ENOENT','Refusing\x20to\x20write\x20profile\x20\x22','BmiQw','legacy','--allow-insecure-localhost','join','allowInsecureLocalhost','--disable-setuid-sandbox','file','local','storageState','location','adGuf','Nemqh','safeMode','filter','--unsafely-treat-insecure-origin-as-secure=http://localhost','tabs','VsFJc','lOQzr','contextOptions','lUnCw','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','baseUrl','jPGwo','yMdHX','tnPXQ','NgKkO','tDOJW','Igbtq','3754204faVHue','xijRn','tlwTy','1854804WVlwtB','RVkht','kvuXZ','QTbjM','all','message','install','BtZZZ','7310ZzLFFr','length','chromium','eMwQf','caVUd','4183398MaMFkF','aRcpQ','push','1vPtpBh','-rangerwright.json','QKuWY','userAgent','AlZLv','SeFKE','VbYJN','zPKvp','aRNcu','FlpKj'];_0xbd33=function(){return _0x3b6e36;};return _0xbd33();}function parseKeyPath(_0x589311){const _0x5b6acc=_0x44a5db,_0x1e6fea={'QDHKA':function(_0x1841b0,_0x47a332){return _0x1841b0===_0x47a332;},'VzFXo':'header','BCVqD':'headers','Igbtq':_0x5b6acc(0xcd),'IZKRr':_0x5b6acc(0xca)},_0x330d3c=_0x589311['split']('.');return _0x1e6fea['QDHKA'](_0x330d3c[0x0],_0x1e6fea['VzFXo'])&&(_0x330d3c[0x0]=_0x1e6fea[_0x5b6acc(0x6e)]),_0x330d3c[0x0]===_0x1e6fea[_0x5b6acc(0x9f)]&&(_0x330d3c[0x0]=_0x1e6fea['IZKRr']),_0x330d3c;}export function formatSettings(_0x51a94d,_0x3f1f64=0x0){const _0xa9e067=_0x44a5db,_0xf400c={'gObXG':function(_0x580609,_0x1e011c){return _0x580609===_0x1e011c;},'pwYPB':'object'},_0x3f5472=[],_0xac0352='\x20\x20'[_0xa9e067(0xe3)](_0x3f1f64);for(const [_0x40b98f,_0xeca139]of Object['entries'](_0x51a94d)){if(_0xf400c['gObXG'](_0xeca139,undefined))continue;if(_0xf400c[_0xa9e067(0x7d)](typeof _0xeca139,_0xf400c['pwYPB'])&&_0xeca139!==null){_0x3f5472['push'](''+_0xac0352+_0x40b98f+':');for(const [_0x8b5ea8,_0x5bf915]of Object[_0xa9e067(0xd6)](_0xeca139)){_0x3f5472['push'](_0xac0352+'\x20\x20'+_0x8b5ea8+':\x20'+_0x5bf915);}}else _0x3f5472[_0xa9e067(0xb2)](''+_0xac0352+_0x40b98f+':\x20'+_0xeca139);}return _0x3f5472[_0xa9e067(0x87)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d035d,_0xf8dadc){const _0x2c4842=_0x283f,_0x43a399=_0x2d035d();while(!![]){try{const _0x3d506c=-parseInt(_0x2c4842(0x13d))/0x1*(parseInt(_0x2c4842(0x140))/0x2)+-parseInt(_0x2c4842(0x142))/0x3+parseInt(_0x2c4842(0x13a))/0x4+-parseInt(_0x2c4842(0x143))/0x5+parseInt(_0x2c4842(0x141))/0x6+parseInt(_0x2c4842(0x13f))/0x7*(parseInt(_0x2c4842(0x13e))/0x8)+-parseInt(_0x2c4842(0x13b))/0x9*(parseInt(_0x2c4842(0x13c))/0xa);if(_0x3d506c===_0xf8dadc)break;else _0x43a399['push'](_0x43a399['shift']());}catch(_0x5016a7){_0x43a399['push'](_0x43a399['shift']());}}}(_0x3501,0x71d38));function _0x283f(_0x11fb4c,_0x137ce1){_0x11fb4c=_0x11fb4c-0x139;const _0x3501fe=_0x3501();let _0x283f16=_0x3501fe[_0x11fb4c];return _0x283f16;}import{readFileSync}from'fs';import{dirname,join}from'path';function _0x3501(){const _0x1df6d8=['20DyJIhL','481uTkRBf','5699576CHrpAY','7RTIjEL','262OCbAOB','1822632rILeCd','2009280jKtCvO','1012970QagquX','ranger/SKILL.md','3140080OdMKIS','1798389aZLeGb'];_0x3501=function(){return _0x1df6d8;};return _0x3501();}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x39a83b){const _0x1ad4fd={'qGrVN':function(_0x165cd5,_0x26d65d,_0x1cef4b,_0xded26f,_0x62df7a){return _0x165cd5(_0x26d65d,_0x1cef4b,_0xded26f,_0x62df7a);}},_0xbbcea1=_0x1ad4fd['qGrVN'](join,__dirname,'..','..','skills'),_0x369642=join(_0xbbcea1,_0x39a83b);try{return readFileSync(_0x369642,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x579d85=_0x283f,_0x4af8ba={'mZcJQ':function(_0xae97be,_0x4e236f){return _0xae97be(_0x4e236f);},'reFyx':_0x579d85(0x139)};return _0x4af8ba['mZcJQ'](readSkillContent,_0x4af8ba['reFyx']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3f0a6a=_0x3d89;(function(_0x58b028,_0x227ec7){const _0x4eac11=_0x3d89,_0x310877=_0x58b028();while(!![]){try{const _0x174591=parseInt(_0x4eac11(0x178))/0x1*(-parseInt(_0x4eac11(0x191))/0x2)+parseInt(_0x4eac11(0x192))/0x3+parseInt(_0x4eac11(0x18a))/0x4+parseInt(_0x4eac11(0x173))/0x5+-parseInt(_0x4eac11(0x188))/0x6+-parseInt(_0x4eac11(0x185))/0x7+parseInt(_0x4eac11(0x17d))/0x8*(parseInt(_0x4eac11(0x189))/0x9);if(_0x174591===_0x227ec7)break;else _0x310877['push'](_0x310877['shift']());}catch(_0x46225e){_0x310877['push'](_0x310877['shift']());}}}(_0xbe05,0x9a755));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';function _0x3d89(_0x254c1b,_0x2f6745){_0x254c1b=_0x254c1b-0x173;const _0xbe0525=_0xbe05();let _0x3d894c=_0xbe0525[_0x254c1b];return _0x3d894c;}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=['ranger'];export const DEPRECATED_SKILLS=[_0x3f0a6a(0x174),'bug-bash',_0x3f0a6a(0x17e)];export async function installSkill(_0x4eaf67,_0xedc089={}){const _0x13c7c7=_0x3f0a6a,_0x845d93={'ZOzxe':_0x13c7c7(0x181),'CuZVd':function(_0x24e20f,_0x9d8f0b,_0xc91f60){return _0x24e20f(_0x9d8f0b,_0xc91f60);},'GtLUH':function(_0x30da96,_0x4dec29){return _0x30da96(_0x4dec29);},'qjRUn':function(_0x1f8ad1,_0x6ae058,_0x350de2){return _0x1f8ad1(_0x6ae058,_0x350de2);},'qulat':'SKILL.md','hoHRT':function(_0x1995d5,_0x50ed32){return _0x1995d5&&_0x50ed32;},'brkAs':_0x13c7c7(0x17c),'sfjXJ':function(_0xf54fa4,_0x4b1f79){return _0xf54fa4(_0x4b1f79);},'xzKvM':function(_0x38bf0a,_0x210b0d,_0x59ebd6){return _0x38bf0a(_0x210b0d,_0x59ebd6);},'jaFii':function(_0x5722a0,_0x27d85e,_0x5a026f){return _0x5722a0(_0x27d85e,_0x5a026f);},'tReJf':function(_0x2441e5,_0x5f3efd,_0x4205fd){return _0x2441e5(_0x5f3efd,_0x4205fd);},'CkVrB':function(_0x54032a,_0x3b1a74,_0x4ea218){return _0x54032a(_0x3b1a74,_0x4ea218);},'qYHco':_0x13c7c7(0x197),'NGjAn':function(_0x15b41d,_0x34a4d8,_0x4107af,_0x1d7d6f){return _0x15b41d(_0x34a4d8,_0x4107af,_0x1d7d6f);},'lqRih':function(_0x4be3c9,_0x3d08d4){return _0x4be3c9(_0x3d08d4);},'tMJXV':function(_0x5c778b,_0xebc2a7,_0xe89d4b,_0x2dba2b){return _0x5c778b(_0xebc2a7,_0xe89d4b,_0x2dba2b);}},{level:level=_0x845d93[_0x13c7c7(0x183)],cliVersion:_0x56adec,platform:platform='claude'}=_0xedc089,_0x4a0ec4=getSourceSkillsDir(),_0x11c846=_0x845d93['CuZVd'](join,_0x4a0ec4,_0x4eaf67),_0x28e198=join(_0x4a0ec4,_0x4eaf67+'.md'),_0x37ac68=existsSync(_0x11c846)&&statSync(_0x11c846)[_0x13c7c7(0x186)]()&&_0x845d93[_0x13c7c7(0x194)](existsSync,_0x845d93['qjRUn'](join,_0x11c846,_0x845d93[_0x13c7c7(0x18b)])),_0xd55312=_0x845d93[_0x13c7c7(0x194)](existsSync,_0x28e198);if(_0x845d93['hoHRT'](!_0x37ac68,!_0xd55312))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x4eaf67),![];const _0x4a3ee3=platform===_0x845d93[_0x13c7c7(0x18f)]?getOpencodeSkillsDir(level):_0x845d93['sfjXJ'](getSkillsDir,level),_0x5369ae=_0x845d93[_0x13c7c7(0x17f)](join,_0x4a3ee3,_0x4eaf67);await _0x845d93['jaFii'](mkdir,_0x5369ae,{'recursive':!![]});let _0x48a2f8,_0x195e95=[];if(_0x37ac68){const _0x10e554=await readdir(_0x11c846),_0x350750=_0x10e554['filter'](_0x553ad3=>_0x553ad3[_0x13c7c7(0x176)](_0x13c7c7(0x18c)));for(const _0x1d9964 of _0x350750){const _0x30819a=_0x845d93['qjRUn'](join,_0x11c846,_0x1d9964),_0x3542a5=_0x845d93['tReJf'](join,_0x5369ae,_0x1d9964);await _0x845d93['CkVrB'](copyFile,_0x30819a,_0x3542a5),_0x195e95[_0x13c7c7(0x18d)](_0x1d9964);}_0x48a2f8=await readFile(join(_0x11c846,_0x13c7c7(0x196)),_0x13c7c7(0x197));}else{_0x48a2f8=await readFile(_0x28e198,_0x845d93[_0x13c7c7(0x195)]);const _0x264d09=_0x845d93['CkVrB'](join,_0x5369ae,_0x845d93['qulat']);await _0x845d93['NGjAn'](writeFile,_0x264d09,_0x48a2f8,_0x845d93['qYHco']),_0x195e95['push'](_0x845d93['qulat']);}const {name:_0xe72c5}=_0x845d93[_0x13c7c7(0x180)](parseFrontmatter,_0x48a2f8);return console[_0x13c7c7(0x179)](_0x13c7c7(0x184)+_0xe72c5),console['log'](_0x13c7c7(0x187)+_0x5369ae),_0x195e95['length']>0x1&&console[_0x13c7c7(0x179)](_0x13c7c7(0x182)+_0x195e95[_0x13c7c7(0x175)](',\x20')),_0x845d93['tMJXV'](logLocalAgentInstallation,_0x4eaf67,{'skillDisplayName':_0xe72c5,'installLevel':level},_0x56adec)[_0x13c7c7(0x190)](()=>{}),!![];}function getSourceSkillsDir(){const _0xf6724b=_0x3f0a6a,_0x3c67ef={'MaXoO':function(_0x4c064a,_0x4f5106,_0x1120fb,_0x5c8848,_0x23258e){return _0x4c064a(_0x4f5106,_0x1120fb,_0x5c8848,_0x23258e);},'iJSlq':'skills','MDuGn':function(_0x589fee,_0x5b670a){return _0x589fee(_0x5b670a);}},_0x3202c9=[_0x3c67ef[_0xf6724b(0x17b)](join,__dirname,'..','..',_0x3c67ef['iJSlq']),join(__dirname,'..','..','..','skills')];for(const _0x4ae975 of _0x3202c9){if(_0x3c67ef[_0xf6724b(0x17a)](existsSync,_0x4ae975))return _0x4ae975;}return _0x3202c9[0x0];}function parseFrontmatter(_0x5ee940){const _0x477f6f=_0x3f0a6a,_0x5a1027={'vbojm':_0x477f6f(0x193)},_0x14d103=_0x5ee940[_0x477f6f(0x177)](/^---\n([\s\S]+?)\n---/);if(!_0x14d103)throw new Error(_0x5a1027['vbojm']);const _0x3be7ad=_0x14d103[0x1],_0x4e43e7=_0x3be7ad['match'](/name:\s*(.+)/),_0x38080d=_0x3be7ad[_0x477f6f(0x177)](/description:\s*"?(.+?)"?\n/);return{'name':_0x4e43e7?.[0x1]['trim']()||'','description':_0x38080d?.[0x1]['trim']()||''};}function _0xbe05(){const _0x52e310=['SKILL.md','utf-8','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','6029100qnDLuK','e2e-test-recommender','join','endsWith','match','49739DkySla','log','MDuGn','MaXoO','opencode','47160TKnmHm','feature-tracker','xzKvM','lqRih','project','\x20\x20Files:\x20','ZOzxe','\x20\x20Installed\x20skill:\x20','5757332YcEFWk','isDirectory','\x20\x20Location:\x20','7159992AfHABw','3546MUNDdB','671068CNAOhr','qulat','.md','push','GWiId','brkAs','catch','44jBZkaE','139530dNJWRG','Invalid\x20skill\x20frontmatter','GtLUH','qYHco'];_0xbe05=function(){return _0x52e310;};return _0xbe05();}export async function removeSkill(_0x54343f,_0x21c8ab){const _0x12d63e=_0x3f0a6a,_0x2b8031={'GWiId':function(_0x3dcb6d,_0x3fe6f5,_0x4b05d2){return _0x3dcb6d(_0x3fe6f5,_0x4b05d2);}},_0x3f77b2=getSkillsDir(_0x21c8ab),_0x3d5449=_0x2b8031[_0x12d63e(0x18e)](join,_0x3f77b2,_0x54343f);if(!existsSync(_0x3d5449))return![];try{return await _0x2b8031['GWiId'](rm,_0x3d5449,{'recursive':!![]}),console[_0x12d63e(0x179)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x54343f),!![];}catch{return console['warn'](_0x12d63e(0x198)+_0x54343f),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xc3913b=_0x4621;function _0x472b(){const _0x11eacb=['IdRaB','error','jRHqi','clusters','svOlw','gfcRA','maxTicks','fyLNX','hundk','331499ZLdVcJ','qddHF','GwhuP','push','kbePJ','argv','jKZBK','NYbEf','30wMdHSr','stitchWebmFiles.ts','from','exit','HEjKv','Stitched\x20','YgLcf','TWChh','omUeT','1224414knSOiX','qYpCo','11465wtkSvg','bodyAfterTimestamp','readInt16BE','4458000vXPsaW','BCoiE','MfmxH','VAABF','tgTVN','KUJRD','slice','log','\x20files\x20->\x20','drLgr','DlKMF','TOQxH','ZrzIa','beXqy','oxjuk','alloc','timestamp','481937JYaHiI','FexMj','2uXvmBi','jEGqV','XZBsp','indexOf','ertCR','12GNMwTe','vntLU','floor','length','copy','tPFLY','dNSyu','GNQVC','356Gaggdd','yxRiv','znJdW','619713BMbxnB','Qsvet','concat','123277YDgFkZ','bFIyG'];_0x472b=function(){return _0x11eacb;};return _0x472b();}(function(_0x2acc28,_0x579587){const _0x49a7a0=_0x4621,_0x1e55b6=_0x2acc28();while(!![]){try{const _0x3f8165=-parseInt(_0x49a7a0(0xeb))/0x1*(parseInt(_0x49a7a0(0xed))/0x2)+parseInt(_0x49a7a0(0x11c))/0x3+-parseInt(_0x49a7a0(0xfa))/0x4*(parseInt(_0x49a7a0(0xd7))/0x5)+parseInt(_0x49a7a0(0xf2))/0x6*(-parseInt(_0x49a7a0(0x10b))/0x7)+parseInt(_0x49a7a0(0xda))/0x8+parseInt(_0x49a7a0(0xfd))/0x9+-parseInt(_0x49a7a0(0x113))/0xa*(-parseInt(_0x49a7a0(0x100))/0xb);if(_0x3f8165===_0x579587)break;else _0x1e55b6['push'](_0x1e55b6['shift']());}catch(_0x5014cb){_0x1e55b6['push'](_0x1e55b6['shift']());}}}(_0x472b,0x461a2));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0xb5ed25,_0x4aec5d){const _0x24789d=_0x4621,_0x54830e={'czita':function(_0x5dbb2e,_0x13ec33){return _0x5dbb2e>=_0x13ec33;},'MfmxH':function(_0x19be31,_0xbc18a7){return _0x19be31&_0xbc18a7;},'vntLU':function(_0x28efaa,_0x24bf50){return _0x28efaa-_0x24bf50;},'ifUNC':function(_0x3a5bfe,_0x50acf8){return _0x3a5bfe+_0x50acf8;}};if(_0x54830e['czita'](_0x4aec5d,_0xb5ed25[_0x24789d(0xf5)]))return[0x0,0x0];const _0x297520=_0xb5ed25[_0x4aec5d];let _0x3450ed=0x1,_0x4c4218=0x80;while(_0x3450ed<=0x8&&!(_0x297520&_0x4c4218)){_0x3450ed++,_0x4c4218>>=0x1;}if(_0x4aec5d+_0x3450ed>_0xb5ed25['length'])return[0x0,0x0];let _0x1763b8=_0x54830e[_0x24789d(0xdc)](_0x297520,_0x54830e[_0x24789d(0xf3)](_0x4c4218,0x1));for(let _0xf2205b=0x1;_0xf2205b<_0x3450ed;_0xf2205b++){_0x1763b8=_0x1763b8*0x100+_0xb5ed25[_0x54830e['ifUNC'](_0x4aec5d,_0xf2205b)];}return[_0x1763b8,_0x3450ed];}function readId(_0x5bba0d,_0x59fe54){const _0x2e35ae=_0x4621,_0x2ceb95={'omUeT':function(_0x51da32,_0x3c77c1){return _0x51da32+_0x3c77c1;},'ILNtI':function(_0x51eff0,_0x809c3){return _0x51eff0<_0x809c3;},'BCoiE':function(_0xfc8496,_0x3f7423){return _0xfc8496*_0x3f7423;}};if(_0x59fe54>=_0x5bba0d['length'])return[0x0,0x0];const _0x4e2659=_0x5bba0d[_0x59fe54];let _0x3ef81f;if(_0x4e2659>=0x80)_0x3ef81f=0x1;else{if(_0x4e2659>=0x40)_0x3ef81f=0x2;else{if(_0x4e2659>=0x20)_0x3ef81f=0x3;else{if(_0x4e2659>=0x10)_0x3ef81f=0x4;else return[_0x4e2659,0x1];}}}if(_0x2ceb95[_0x2e35ae(0x11b)](_0x59fe54,_0x3ef81f)>_0x5bba0d[_0x2e35ae(0xf5)])return[0x0,0x0];let _0x278e1b=0x0;for(let _0x5dda7f=0x0;_0x2ceb95['ILNtI'](_0x5dda7f,_0x3ef81f);_0x5dda7f++){_0x278e1b=_0x2ceb95[_0x2e35ae(0xdb)](_0x278e1b,0x100)+_0x5bba0d[_0x2ceb95['omUeT'](_0x59fe54,_0x5dda7f)];}return[_0x278e1b,_0x3ef81f];}function _0x4621(_0x8995c7,_0x3151f5){_0x8995c7=_0x8995c7-0xd7;const _0x472b7f=_0x472b();let _0x46219a=_0x472b7f[_0x8995c7];return _0x46219a;}function readUint(_0x504db8,_0x312c3f,_0x5e8cb9){const _0x4d92d9=_0x4621,_0x593691={'hAhth':function(_0x161d5c,_0x289f5d){return _0x161d5c<_0x289f5d;},'ZrzIa':function(_0xa63d01,_0x302ae2){return _0xa63d01+_0x302ae2;}};let _0x48c440=0x0;for(let _0x504b0d=0x0;_0x593691['hAhth'](_0x504b0d,_0x5e8cb9);_0x504b0d++){_0x48c440=_0x593691[_0x4d92d9(0xe6)](_0x48c440*0x100,_0x504db8[_0x312c3f+_0x504b0d]);}return _0x48c440;}function isUnknownSize(_0x51cda5,_0x13eee4){const _0x439f35=_0x4621,_0x20e510={'qYpCo':function(_0x3c8e4,_0x1be7ea){return _0x3c8e4-_0x1be7ea;}};return _0x51cda5===_0x20e510[_0x439f35(0x11d)](Math['pow'](0x2,0x7*_0x13eee4),0x1);}function writeVint(_0x3be58a,_0xea3b58){const _0x208569=_0x4621,_0x26b92b={'IdRaB':function(_0x39249e,_0x5ba817){return _0x39249e||_0x5ba817;},'Akcfn':function(_0x1d6d45,_0x4db16f){return _0x1d6d45<_0x4db16f;},'UnZDR':function(_0x1fd2b1,_0x58072e){return _0x1fd2b1*_0x58072e;},'TOQxH':function(_0x8c7ffc,_0x14f1a8){return _0x8c7ffc-_0x14f1a8;},'Ebwkb':function(_0x46f315,_0xb7f5b6){return _0x46f315&_0xb7f5b6;},'JbAgb':function(_0x27583d,_0x4683ee){return _0x27583d/_0x4683ee;}};let _0x1ec2f2=_0x26b92b[_0x208569(0x102)](_0xea3b58,0x1);while(_0x26b92b['Akcfn'](Math['pow'](0x2,_0x26b92b['UnZDR'](0x7,_0x1ec2f2))-0x2,_0x3be58a))_0x1ec2f2++;const _0x19515b=Buffer['alloc'](_0x1ec2f2);for(let _0x1ed74f=_0x26b92b[_0x208569(0xe5)](_0x1ec2f2,0x1);_0x1ed74f>=0x0;_0x1ed74f--){_0x19515b[_0x1ed74f]=_0x26b92b['Ebwkb'](_0x3be58a,0xff),_0x3be58a=Math['floor'](_0x26b92b['JbAgb'](_0x3be58a,0x100));}return _0x19515b[0x0]|=0x1<<0x8-_0x1ec2f2,_0x19515b;}function writeUint(_0x412794,_0x3c3a46){const _0x3c16f5=_0x4621,_0xe59179={'AdIEE':function(_0x29b5dd,_0x5f1213){return _0x29b5dd-_0x5f1213;}},_0x2bcc82=Buffer[_0x3c16f5(0xe9)](_0x3c3a46);for(let _0x1c3a8f=_0xe59179['AdIEE'](_0x3c3a46,0x1);_0x1c3a8f>=0x0;_0x1c3a8f--){_0x2bcc82[_0x1c3a8f]=_0x412794&0xff,_0x412794=Math[_0x3c16f5(0xf4)](_0x412794/0x100);}return _0x2bcc82;}function writeUnknownSizeVint(_0x590f88){const _0x2767af=_0x4621,_0x53160d={'oxjuk':function(_0x281be8,_0x5cdee2){return _0x281be8-_0x5cdee2;}},_0x29f861=Buffer[_0x2767af(0xe9)](_0x590f88,0xff);return _0x29f861[0x0]=0xff>>_0x53160d[_0x2767af(0xe8)](_0x590f88,0x1),_0x29f861;}function uintSize(_0x40bb71){const _0x21f6c7=_0x4621,_0x260818={'VAABF':function(_0x4763c2,_0x40fd79){return _0x4763c2===_0x40fd79;},'TWChh':function(_0x3ee6fa,_0x13c92b){return _0x3ee6fa>_0x13c92b;},'SQQvM':function(_0x24856b,_0x3c6684){return _0x24856b/_0x3c6684;}};if(_0x260818[_0x21f6c7(0xdd)](_0x40bb71,0x0))return 0x1;let _0x1ea482=0x0,_0x409c5c=_0x40bb71;while(_0x260818[_0x21f6c7(0x11a)](_0x409c5c,0x0)){_0x1ea482++,_0x409c5c=Math['floor'](_0x260818['SQQvM'](_0x409c5c,0x100));}return _0x1ea482;}function findTimestampScale(_0x484f42,_0x1eaf14){const _0x4ed432=_0x4621,_0x1d8bf8={'GNQVC':function(_0x412e70,_0xa289c0){return _0x412e70+_0xa289c0;},'GwhuP':function(_0x41119c,_0x433c0b){return _0x41119c<_0x433c0b;},'fyLNX':function(_0x16ec14,_0x496a26,_0x4e593e){return _0x16ec14(_0x496a26,_0x4e593e);},'tPFLY':function(_0x20fc7f,_0x5077c6){return _0x20fc7f===_0x5077c6;},'dNSyu':function(_0x3fb343,_0x1d9f25){return _0x3fb343+_0x1d9f25;},'pZzhD':function(_0x7d6d75,_0x1d10ba,_0x1f8e93){return _0x7d6d75(_0x1d10ba,_0x1f8e93);},'txFqY':function(_0x275017,_0x27b201){return _0x275017+_0x27b201;}};let _0x374740=_0x1eaf14;const _0x573285=Math['min'](_0x484f42[_0x4ed432(0xf5)],_0x1d8bf8['GNQVC'](_0x1eaf14,0x2710));while(_0x1d8bf8[_0x4ed432(0x10d)](_0x374740,_0x573285)){const [_0x485445,_0x572e4a]=readId(_0x484f42,_0x374740),[_0x29ff08,_0xaef361]=_0x1d8bf8['fyLNX'](readVint,_0x484f42,_0x374740+_0x572e4a);if(_0x1d8bf8['tPFLY'](_0x485445,ID_INFO)){let _0x4b4c20=_0x1d8bf8[_0x4ed432(0xf9)](_0x374740+_0x572e4a,_0xaef361);const _0x3c1716=_0x1d8bf8['GNQVC'](_0x4b4c20,_0x29ff08);while(_0x4b4c20<_0x3c1716){const [_0x233ba8,_0x3f2d7c]=_0x1d8bf8[_0x4ed432(0x109)](readId,_0x484f42,_0x4b4c20),[_0x271369,_0x524beb]=_0x1d8bf8[_0x4ed432(0x109)](readVint,_0x484f42,_0x4b4c20+_0x3f2d7c);if(_0x233ba8===ID_TIMESTAMP_SCALE)return readUint(_0x484f42,_0x1d8bf8[_0x4ed432(0xf8)](_0x4b4c20+_0x3f2d7c,_0x524beb),_0x271369);_0x4b4c20+=_0x1d8bf8[_0x4ed432(0xf8)](_0x3f2d7c,_0x524beb)+_0x271369;}break;}if(_0x1d8bf8[_0x4ed432(0xf7)](_0x485445,ID_CLUSTER))break;if(_0x1d8bf8['pZzhD'](isUnknownSize,_0x29ff08,_0xaef361))break;_0x374740+=_0x1d8bf8['txFqY'](_0x572e4a+_0xaef361,_0x29ff08);}return 0xf4240;}function findFirstClusterOffset(_0x4f10f4,_0x4cec3d){const _0x45bfe8=_0x4621,_0x2fad94={'MhRka':function(_0x5ad2dd,_0x461749){return _0x5ad2dd<_0x461749;},'ALKBN':function(_0x4c66cf,_0x1ba35f,_0x3e5efc){return _0x4c66cf(_0x1ba35f,_0x3e5efc);},'qddHF':function(_0x37fd4e,_0x161c0a){return _0x37fd4e+_0x161c0a;}};let _0x1aad88=_0x4cec3d;while(_0x2fad94['MhRka'](_0x1aad88,_0x4f10f4[_0x45bfe8(0xf5)])){const [_0x538a0d,_0xcfb983]=readId(_0x4f10f4,_0x1aad88);if(_0x538a0d===ID_CLUSTER)return _0x1aad88;const [_0x40eb23,_0x70db8b]=readVint(_0x4f10f4,_0x1aad88+_0xcfb983);if(_0x2fad94['ALKBN'](isUnknownSize,_0x40eb23,_0x70db8b))return _0x1aad88;_0x1aad88+=_0x2fad94[_0x45bfe8(0x10c)](_0x2fad94['qddHF'](_0xcfb983,_0x70db8b),_0x40eb23);}return _0x4f10f4[_0x45bfe8(0xf5)];}function findClusterEnd(_0x3b8261,_0x40d1e6,_0x6fc84e,_0x3e9651){const _0x1d4bdc={'hdfnm':function(_0x42b718,_0xa9c3ae,_0x987ad8){return _0x42b718(_0xa9c3ae,_0x987ad8);},'cWKBM':function(_0x40e068,_0x1cfd61){return _0x40e068+_0x1cfd61;}};if(!isUnknownSize(_0x6fc84e,_0x3e9651))return _0x40d1e6+_0x6fc84e;const _0x4efe6d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x3f1867=_0x40d1e6;while(_0x3f1867<_0x3b8261['length']-0x4){const [_0x2dcce2,_0x2b8894]=readId(_0x3b8261,_0x3f1867);if(_0x4efe6d['has'](_0x2dcce2))return _0x3f1867;const [_0x1105f7,_0x568120]=readVint(_0x3b8261,_0x3f1867+_0x2b8894);if(_0x1d4bdc['hdfnm'](isUnknownSize,_0x1105f7,_0x568120))return _0x3b8261['length'];_0x3f1867+=_0x1d4bdc['cWKBM'](_0x2b8894,_0x568120)+_0x1105f7;}return _0x3b8261['length'];}function extractClusters(_0x15a0f1,_0x8b7ea2){const _0x54eb3c=_0x4621,_0x5a94ff={'Qsvet':function(_0x35966f,_0x195f6c){return _0x35966f<_0x195f6c;},'KUJRD':function(_0x5bb2aa,_0x7b0f8a){return _0x5bb2aa===_0x7b0f8a;},'mDxPM':function(_0x5b5aad,_0x221b23){return _0x5b5aad!==_0x221b23;},'NYbEf':function(_0x117a1e,_0x39365b){return _0x117a1e+_0x39365b;},'QSFWA':function(_0x20fdb2,_0x9df418,_0x272b3c){return _0x20fdb2(_0x9df418,_0x272b3c);},'GJqdf':function(_0x2673d6,_0x4d580f,_0x76fd8f){return _0x2673d6(_0x4d580f,_0x76fd8f);},'jKZBK':function(_0x341181,_0xa3baa,_0x3b7a18,_0x477b30){return _0x341181(_0xa3baa,_0x3b7a18,_0x477b30);},'HEjKv':function(_0x5bfcad,_0x2dbd2f){return _0x5bfcad+_0x2dbd2f;},'znJdW':function(_0x5a260c,_0x12ed68){return _0x5a260c+_0x12ed68;},'HOaWg':function(_0x1b6416,_0x216f8d){return _0x1b6416+_0x216f8d;},'FexMj':function(_0x3265e6,_0x2c4827){return _0x3265e6+_0x2c4827;},'yxRiv':function(_0x424a10,_0x17b034){return _0x424a10>_0x17b034;},'kEaHo':function(_0x50325b,_0x58a073){return _0x50325b+_0x58a073;}},_0x396451=[],_0x4fece3=Buffer[_0x54eb3c(0x115)]([0x1f,0x43,0xb6,0x75]);let _0x514630=0x0;while(_0x5a94ff[_0x54eb3c(0xfe)](_0x514630,_0x15a0f1['length'])){const _0xd32187=_0x15a0f1[_0x54eb3c(0xf0)](_0x4fece3,_0x514630);if(_0x5a94ff['KUJRD'](_0xd32187,-0x1))break;const [_0x4443b3,_0xd03a1b]=readId(_0x15a0f1,_0xd32187);if(_0x5a94ff['mDxPM'](_0x4443b3,ID_CLUSTER)){_0x514630=_0x5a94ff[_0x54eb3c(0x112)](_0xd32187,0x1);continue;}const [_0x523325,_0x2a7992]=readVint(_0x15a0f1,_0xd32187+_0xd03a1b),_0x19357c=_0x5a94ff[_0x54eb3c(0x112)](_0xd32187+_0xd03a1b,_0x2a7992),_0x51de94=findClusterEnd(_0x15a0f1,_0x19357c,_0x523325,_0x2a7992);let _0x19ad68=_0x19357c,_0x2fe3d1=0x0,_0x7c2c68=0x2,_0x4b286b=![],_0x2b9068=Buffer[_0x54eb3c(0xe9)](0x0),_0x34b28a=Buffer['alloc'](0x0);while(_0x19ad68<_0x51de94){const [_0x1b3eb6,_0x2c1e41]=_0x5a94ff['QSFWA'](readId,_0x15a0f1,_0x19ad68),[_0x299391,_0x35c218]=_0x5a94ff['GJqdf'](readVint,_0x15a0f1,_0x19ad68+_0x2c1e41);if(_0x1b3eb6===ID_TIMESTAMP){_0x2fe3d1=_0x5a94ff[_0x54eb3c(0x111)](readUint,_0x15a0f1,_0x5a94ff[_0x54eb3c(0x112)](_0x5a94ff[_0x54eb3c(0x117)](_0x19ad68,_0x2c1e41),_0x35c218),_0x299391),_0x7c2c68=_0x299391,_0x4b286b=!![],_0x2b9068=_0x15a0f1['slice'](_0x19357c,_0x19ad68);const _0x2ecf22=_0x5a94ff[_0x54eb3c(0xfc)](_0x5a94ff['znJdW'](_0x5a94ff['HOaWg'](_0x19ad68,_0x2c1e41),_0x35c218),_0x299391);_0x34b28a=_0x15a0f1['slice'](_0x2ecf22,_0x51de94);break;}if(_0x5a94ff[_0x54eb3c(0xdf)](_0x1b3eb6,ID_CLUSTER))break;if(isUnknownSize(_0x299391,_0x35c218))break;_0x19ad68+=_0x5a94ff[_0x54eb3c(0xec)](_0x2c1e41,_0x35c218)+_0x299391;}!_0x4b286b&&(_0x34b28a=_0x15a0f1[_0x54eb3c(0xe0)](_0x19357c,_0x51de94));let _0x587add=_0x2fe3d1;_0x19ad68=_0x19357c;while(_0x19ad68<_0x51de94){const [_0x5ace91,_0x43de75]=_0x5a94ff['QSFWA'](readId,_0x15a0f1,_0x19ad68),[_0x2fc138,_0x10af2c]=readVint(_0x15a0f1,_0x19ad68+_0x43de75);if(_0x5a94ff[_0x54eb3c(0xdf)](_0x5ace91,ID_SIMPLE_BLOCK)&&_0x2fc138>=0x4){const _0x3b2972=_0x19ad68+_0x43de75+_0x10af2c,[,_0xadab9f]=_0x5a94ff['QSFWA'](readVint,_0x15a0f1,_0x3b2972),_0x4ef02e=_0x15a0f1[_0x54eb3c(0xd9)](_0x3b2972+_0xadab9f),_0x4b549a=_0x2fe3d1+_0x4ef02e;if(_0x5a94ff[_0x54eb3c(0xfb)](_0x4b549a,_0x587add))_0x587add=_0x4b549a;}if(_0x5a94ff[_0x54eb3c(0xdf)](_0x5ace91,ID_CLUSTER))break;if(isUnknownSize(_0x2fc138,_0x10af2c))break;_0x19ad68+=_0x5a94ff[_0x54eb3c(0x112)](_0x5a94ff['kEaHo'](_0x43de75,_0x10af2c),_0x2fc138);}_0x396451[_0x54eb3c(0x10e)]({'timestamp':_0x2fe3d1,'maxTicks':_0x587add,'bodyBeforeTimestamp':_0x2b9068,'bodyAfterTimestamp':_0x34b28a,'timestampElementSize':_0x7c2c68}),_0x514630=_0x51de94;}return _0x396451;}function parseWebm(_0x4dd1d8){const _0x8e87b9=_0x4621,_0x3eb857={'NQoDm':function(_0x12e605,_0x4e452a,_0xab9795){return _0x12e605(_0x4e452a,_0xab9795);},'bFIyG':function(_0x3e2101,_0x50838b){return _0x3e2101+_0x50838b;},'YgLcf':function(_0x3c279f,_0x36e2fd,_0x1c3c1f){return _0x3c279f(_0x36e2fd,_0x1c3c1f);},'KDITo':function(_0x3e9d98,_0x2b1e54){return _0x3e9d98+_0x2b1e54;},'gfcRA':function(_0x4136fd,_0x1e00cb,_0xbf52bb){return _0x4136fd(_0x1e00cb,_0xbf52bb);},'svOlw':function(_0x348604,_0x4c43a6){return _0x348604>_0x4c43a6;}};let _0x22eae7=0x0;const [,_0x29ed11]=_0x3eb857['NQoDm'](readId,_0x4dd1d8,_0x22eae7),[_0x562bad,_0x328b35]=_0x3eb857['NQoDm'](readVint,_0x4dd1d8,_0x22eae7+_0x29ed11);_0x22eae7+=_0x3eb857[_0x8e87b9(0x101)](_0x3eb857['bFIyG'](_0x29ed11,_0x328b35),_0x562bad);const [_0x1f2aed,_0x36349d]=readId(_0x4dd1d8,_0x22eae7);if(_0x1f2aed!==ID_SEGMENT)return null;const [,_0x5aca61]=_0x3eb857[_0x8e87b9(0x119)](readVint,_0x4dd1d8,_0x22eae7+_0x36349d),_0x2d1d0f=_0x3eb857[_0x8e87b9(0x101)](_0x3eb857['KDITo'](_0x22eae7,_0x36349d),_0x5aca61),_0x33af91=findTimestampScale(_0x4dd1d8,_0x2d1d0f),_0x1aba5c=_0x3eb857[_0x8e87b9(0x107)](findFirstClusterOffset,_0x4dd1d8,_0x2d1d0f),_0x4742b8=_0x4dd1d8['slice'](0x0,_0x1aba5c),_0x4d7b29=extractClusters(_0x4dd1d8,_0x33af91);let _0x416619=0x0;for(const _0x5f58d3 of _0x4d7b29){if(_0x3eb857[_0x8e87b9(0x106)](_0x5f58d3[_0x8e87b9(0x108)],_0x416619))_0x416619=_0x5f58d3['maxTicks'];}return{'header':_0x4742b8,'clusters':_0x4d7b29,'timestampScale':_0x33af91,'maxTimestampTicks':_0x416619};}function buildCluster(_0x3beb8b,_0x29cc30,_0x104d02){const _0x2564dd=_0x4621,_0x43d416={'jRHqi':function(_0x36e77f,_0x41bac9){return _0x36e77f(_0x41bac9);},'yuRIF':function(_0x315827,_0x5399b9,_0x3ba38b){return _0x315827(_0x5399b9,_0x3ba38b);}},_0x158319=Buffer[_0x2564dd(0x115)]([0x1f,0x43,0xb6,0x75]),_0xe59f68=Math['max'](0x4,_0x43d416['jRHqi'](uintSize,_0x3beb8b)),_0x48eea0=Buffer['concat']([Buffer[_0x2564dd(0x115)]([ID_TIMESTAMP]),_0x43d416[_0x2564dd(0x104)](writeVint,_0xe59f68),_0x43d416['yuRIF'](writeUint,_0x3beb8b,_0xe59f68)]),_0x120a43=Buffer['concat']([_0x29cc30,_0x48eea0,_0x104d02]),_0x47beb7=writeVint(_0x120a43['length']);return Buffer[_0x2564dd(0xff)]([_0x158319,_0x47beb7,_0x120a43]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x33813c){const _0x18b666=_0x4621,_0x210a7a={'jEGqV':function(_0x4d46d8,_0x2945c5,_0xc4ee2c){return _0x4d46d8(_0x2945c5,_0xc4ee2c);},'DlKMF':function(_0x3d40e4,_0x17216c){return _0x3d40e4+_0x17216c;},'beXqy':function(_0x561cd0,_0x3d1681){return _0x561cd0+_0x3d1681;},'ertCR':function(_0x1f33a2,_0x4b56c7,_0x226e08){return _0x1f33a2(_0x4b56c7,_0x226e08);},'etTtz':function(_0x575f9d,_0xca13d8){return _0x575f9d+_0xca13d8;},'CMedD':function(_0xa65b4f,_0x18e0d5){return _0xa65b4f+_0x18e0d5;},'dbXTc':function(_0x41749e,_0x580b1e){return _0x41749e<_0x580b1e;},'drLgr':function(_0x3a6760,_0x494dd2,_0x4ae0ad){return _0x3a6760(_0x494dd2,_0x4ae0ad);},'WkzVq':function(_0x486262,_0x2b60f8){return _0x486262+_0x2b60f8;},'pROgg':function(_0x5d571f,_0x25278e,_0xf202ba){return _0x5d571f(_0x25278e,_0xf202ba);},'kbePJ':function(_0x4ffdef,_0x3524fb){return _0x4ffdef+_0x3524fb;}},_0x3b8540=Buffer[_0x18b666(0x115)](_0x33813c);let _0x311461=0x0;const [,_0xbafa13]=_0x210a7a['jEGqV'](readId,_0x3b8540,_0x311461),[_0x2e8de1,_0x46c555]=readVint(_0x3b8540,_0x210a7a['DlKMF'](_0x311461,_0xbafa13)),_0x1d1e48=_0x210a7a['beXqy'](_0x210a7a['beXqy'](_0x311461,_0xbafa13),_0x46c555)+_0x2e8de1,[,_0x365ef5]=_0x210a7a[_0x18b666(0xf1)](readId,_0x3b8540,_0x1d1e48),[,_0x4b70ee]=readVint(_0x3b8540,_0x1d1e48+_0x365ef5),_0x12a855=_0x210a7a[_0x18b666(0xe7)](_0x210a7a['etTtz'](_0x1d1e48,_0x365ef5),_0x4b70ee),_0x3dd030=writeUnknownSizeVint(_0x4b70ee);_0x3dd030[_0x18b666(0xf6)](_0x3b8540,_0x210a7a['CMedD'](_0x1d1e48,_0x365ef5));let _0x557ec3=_0x12a855;const _0x5208c3=Math['min'](_0x3b8540[_0x18b666(0xf5)],_0x12a855+0x2710);while(_0x210a7a['dbXTc'](_0x557ec3,_0x5208c3)){const [_0x5358e5,_0x56305a]=_0x210a7a[_0x18b666(0xee)](readId,_0x3b8540,_0x557ec3),[_0x4172e6,_0x2457c8]=_0x210a7a['drLgr'](readVint,_0x3b8540,_0x557ec3+_0x56305a);if(_0x5358e5===ID_CLUSTER)break;if(_0x210a7a[_0x18b666(0xee)](isUnknownSize,_0x4172e6,_0x2457c8))break;if(_0x5358e5===ID_INFO){const _0x5cbfc8=_0x210a7a[_0x18b666(0xe4)](_0x210a7a['WkzVq'](_0x557ec3,_0x56305a),_0x2457c8),_0x55890a=_0x210a7a['WkzVq'](_0x5cbfc8,_0x4172e6),_0x3974cd=[];let _0x983b70=_0x5cbfc8;while(_0x983b70<_0x55890a){const [_0x306f24,_0x5e04e6]=_0x210a7a['pROgg'](readId,_0x3b8540,_0x983b70),[_0xf75fc8,_0x819473]=readVint(_0x3b8540,_0x983b70+_0x5e04e6),_0x3e5289=_0x5e04e6+_0x819473+_0xf75fc8;_0x306f24!==ID_DURATION&&_0x3974cd[_0x18b666(0x10e)](_0x3b8540[_0x18b666(0xe0)](_0x983b70,_0x210a7a['etTtz'](_0x983b70,_0x3e5289))),_0x983b70+=_0x3e5289;}const _0x408064=Buffer[_0x18b666(0xff)](_0x3974cd),_0x11ddfc=Buffer[_0x18b666(0xff)]([_0x3b8540['slice'](_0x557ec3,_0x557ec3+_0x56305a),_0x210a7a[_0x18b666(0xe3)](writeVint,_0x408064[_0x18b666(0xf5)],_0x2457c8)]);return Buffer['concat']([_0x3b8540['slice'](0x0,_0x557ec3),_0x11ddfc,_0x408064,_0x3b8540['slice'](_0x55890a)]);}_0x557ec3+=_0x210a7a[_0x18b666(0x10f)](_0x56305a,_0x2457c8)+_0x4172e6;}return _0x3b8540;}export function stitchWebmFiles(_0x15c04d,_0x1b4e9a){const _0x26981b=_0x4621,_0x25d022={'XZBsp':function(_0x57bbb7,_0x15fd8e){return _0x57bbb7===_0x15fd8e;},'hundk':function(_0x21e400,_0xcd80e5){return _0x21e400(_0xcd80e5);},'tgTVN':function(_0x228d68,_0x8b19a6){return _0x228d68+_0x8b19a6;},'wUmJv':function(_0xd30917,_0x55e131,_0x1623be){return _0xd30917(_0x55e131,_0x1623be);}};if(_0x15c04d['length']<=0x1)return![];const _0x3a8ddb=[];for(const _0x1cb20e of _0x15c04d){const _0xb8a358=readFileSync(_0x1cb20e),_0xac0dc1=parseWebm(_0xb8a358);if(!_0xac0dc1||_0x25d022[_0x26981b(0xef)](_0xac0dc1[_0x26981b(0x105)]['length'],0x0))return![];_0x3a8ddb[_0x26981b(0x10e)](_0xac0dc1);}const _0x312e6f=_0x3a8ddb[0x0],_0x1756e4=_0x25d022[_0x26981b(0x10a)](rebuildHeaderWithoutDuration,_0x312e6f['header']),_0x52c922=[_0x1756e4];let _0x397977=0x0;for(let _0x1cd243=0x0;_0x1cd243<_0x3a8ddb[_0x26981b(0xf5)];_0x1cd243++){const _0x16af68=_0x3a8ddb[_0x1cd243];for(const _0x14dd13 of _0x16af68[_0x26981b(0x105)]){const _0x30e6ec=_0x14dd13[_0x26981b(0xea)]+_0x397977;_0x52c922[_0x26981b(0x10e)](buildCluster(_0x30e6ec,_0x14dd13['bodyBeforeTimestamp'],_0x14dd13[_0x26981b(0xd8)]));}const _0x4b28c6=0x1e;_0x397977+=_0x25d022[_0x26981b(0xde)](_0x16af68['maxTimestampTicks'],_0x4b28c6);}return _0x25d022['wUmJv'](writeFileSync,_0x1b4e9a,Buffer['concat'](_0x52c922)),!![];}if(process['argv'][0x1]?.['endsWith'](_0xc3913b(0x114))||process[_0xc3913b(0x110)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console[_0xc3913b(0x103)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0xc3913b(0x116)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0xc3913b(0xe1)](_0xc3913b(0x118)+inputs['length']+_0xc3913b(0xe2)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x163e52=_0x3669;(function(_0x853bcf,_0x40d96a){const _0x2b1d04=_0x3669,_0x20e72f=_0x853bcf();while(!![]){try{const _0x1925ac=-parseInt(_0x2b1d04(0x160))/0x1+parseInt(_0x2b1d04(0x150))/0x2+-parseInt(_0x2b1d04(0x162))/0x3*(parseInt(_0x2b1d04(0x155))/0x4)+-parseInt(_0x2b1d04(0x158))/0x5+parseInt(_0x2b1d04(0x173))/0x6+-parseInt(_0x2b1d04(0x16d))/0x7+parseInt(_0x2b1d04(0x16f))/0x8;if(_0x1925ac===_0x40d96a)break;else _0x20e72f['push'](_0x20e72f['shift']());}catch(_0x28dac){_0x20e72f['push'](_0x20e72f['shift']());}}}(_0x4a96,0xdc207));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x4a3b85,_0x3579e6){const _0x35307f=_0x3669,_0x357b44={'VCULU':function(_0xf327b7,_0xe1fd09){return _0xf327b7>=_0xe1fd09;},'lCVON':function(_0x5a2505,_0x5e60f7){return _0x5a2505&_0x5e60f7;},'DGjCn':function(_0x5243a7,_0xdbdb1e){return _0x5243a7>_0xdbdb1e;},'pOFUb':function(_0x3ec530,_0xcc1f04){return _0x3ec530&_0xcc1f04;},'wBzGP':function(_0xe9a85c,_0x16e079){return _0xe9a85c+_0x16e079;}};if(_0x357b44[_0x35307f(0x14b)](_0x3579e6,_0x4a3b85['length']))return[0x0,0x0];const _0x5cebec=_0x4a3b85[_0x3579e6];let _0x1eedf1=0x1,_0x529767=0x80;while(_0x1eedf1<=0x8&&!_0x357b44['lCVON'](_0x5cebec,_0x529767)){_0x1eedf1++,_0x529767>>=0x1;}if(_0x357b44[_0x35307f(0x149)](_0x3579e6+_0x1eedf1,_0x4a3b85[_0x35307f(0x174)]))return[0x0,0x0];let _0x5b96bb=_0x357b44['pOFUb'](_0x5cebec,_0x529767-0x1);for(let _0xc882ac=0x1;_0xc882ac<_0x1eedf1;_0xc882ac++){_0x5b96bb=_0x5b96bb*0x100+_0x4a3b85[_0x357b44[_0x35307f(0x159)](_0x3579e6,_0xc882ac)];}return[_0x5b96bb,_0x1eedf1];}function readId(_0xa14c26,_0x5495c9){const _0x2f1535=_0x3669,_0x46a53f={'itCrE':function(_0x45a270,_0x20b658){return _0x45a270>=_0x20b658;},'wToQj':function(_0x2afecc,_0x1c5174){return _0x2afecc+_0x1c5174;},'NZwAe':function(_0x4b52d7,_0x558e5f){return _0x4b52d7*_0x558e5f;}};if(_0x5495c9>=_0xa14c26['length'])return[0x0,0x0];const _0x20adce=_0xa14c26[_0x5495c9];let _0x584f86;if(_0x46a53f[_0x2f1535(0x15d)](_0x20adce,0x80))_0x584f86=0x1;else{if(_0x20adce>=0x40)_0x584f86=0x2;else{if(_0x20adce>=0x20)_0x584f86=0x3;else{if(_0x20adce>=0x10)_0x584f86=0x4;else return[_0x20adce,0x1];}}}if(_0x46a53f['wToQj'](_0x5495c9,_0x584f86)>_0xa14c26['length'])return[0x0,0x0];let _0x1b0602=0x0;for(let _0x3f4981=0x0;_0x3f4981<_0x584f86;_0x3f4981++){_0x1b0602=_0x46a53f['NZwAe'](_0x1b0602,0x100)+_0xa14c26[_0x5495c9+_0x3f4981];}return[_0x1b0602,_0x584f86];}function readUint(_0x13b483,_0x4d1b9b,_0x342cf7){const _0x37599b=_0x3669,_0x328821={'wHTbd':function(_0x4c983e,_0x22668e){return _0x4c983e<_0x22668e;},'zyJqv':function(_0x27cc12,_0x1def53){return _0x27cc12+_0x1def53;},'raHvy':function(_0x183020,_0x18fef2){return _0x183020*_0x18fef2;}};let _0x1e8bb9=0x0;for(let _0x30ee90=0x0;_0x328821[_0x37599b(0x148)](_0x30ee90,_0x342cf7);_0x30ee90++){_0x1e8bb9=_0x328821['zyJqv'](_0x328821[_0x37599b(0x17c)](_0x1e8bb9,0x100),_0x13b483[_0x4d1b9b+_0x30ee90]);}return _0x1e8bb9;}function isUnknownSize(_0x5ad6b0,_0xab5f60){const _0x448ba9=_0x3669,_0x21625e={'ocViS':function(_0x4f5f45,_0x41efcc){return _0x4f5f45-_0x41efcc;},'SafrC':function(_0x3250e6,_0x5ef6de){return _0x3250e6*_0x5ef6de;}};return _0x5ad6b0===_0x21625e[_0x448ba9(0x179)](Math['pow'](0x2,_0x21625e['SafrC'](0x7,_0xab5f60)),0x1);}function writeVint(_0x3dc6a7,_0x57c88f){const _0xd55bff=_0x3669,_0x5ee32b={'kXBGW':function(_0x2b8293,_0x4966ee){return _0x2b8293||_0x4966ee;},'GhneD':function(_0x368cbd,_0x57fb77){return _0x368cbd<_0x57fb77;},'WeHxF':function(_0x1737c1,_0x174b64){return _0x1737c1-_0x174b64;},'kfIYA':function(_0x1f8f8b,_0x521d43){return _0x1f8f8b>=_0x521d43;},'TlKoy':function(_0x3a433b,_0x13e686){return _0x3a433b&_0x13e686;},'cKAmA':function(_0x242e3,_0x2ce5c7){return _0x242e3/_0x2ce5c7;},'mBLVv':function(_0x3f71bb,_0x3b2f1a){return _0x3f71bb<<_0x3b2f1a;}};let _0x3ab7d5=_0x5ee32b[_0xd55bff(0x172)](_0x57c88f,0x1);while(_0x5ee32b['GhneD'](_0x5ee32b[_0xd55bff(0x144)](Math['pow'](0x2,0x7*_0x3ab7d5),0x2),_0x3dc6a7))_0x3ab7d5++;const _0x107e84=Buffer['alloc'](_0x3ab7d5);for(let _0x4f385d=_0x3ab7d5-0x1;_0x5ee32b[_0xd55bff(0x16b)](_0x4f385d,0x0);_0x4f385d--){_0x107e84[_0x4f385d]=_0x5ee32b['TlKoy'](_0x3dc6a7,0xff),_0x3dc6a7=Math['floor'](_0x5ee32b[_0xd55bff(0x14e)](_0x3dc6a7,0x100));}return _0x107e84[0x0]|=_0x5ee32b['mBLVv'](0x1,0x8-_0x3ab7d5),_0x107e84;}function writeUint(_0x133e1c,_0x53a3ad){const _0x29e880={'gXjOG':function(_0x105f2f,_0xc55a91){return _0x105f2f>=_0xc55a91;},'FCCTP':function(_0x53f895,_0x5e8b33){return _0x53f895/_0x5e8b33;}},_0xd58a36=Buffer['alloc'](_0x53a3ad);for(let _0x297fe9=_0x53a3ad-0x1;_0x29e880['gXjOG'](_0x297fe9,0x0);_0x297fe9--){_0xd58a36[_0x297fe9]=_0x133e1c&0xff,_0x133e1c=Math['floor'](_0x29e880['FCCTP'](_0x133e1c,0x100));}return _0xd58a36;}function writeUnknownSizeVint(_0x8fe393){const _0x4a28a6=_0x3669,_0x4e0d3a=Buffer[_0x4a28a6(0x15a)](_0x8fe393,0xff);return _0x4e0d3a[0x0]=0xff>>_0x8fe393-0x1,_0x4e0d3a;}function _0x4a96(){const _0x57099f=['hwqbm','otwlG','kXBGW','7129380BYueAS','length','aaEel','JaThP','zGpYd','RNvtn','ocViS','pczuu','QATeT','raHvy','mkcHj','endsWith','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','bodyAfterTimestamp','QogeZ','from','bBHtx','slice','WeHxF','HsNKA','maxTicks','floor','wHTbd','DGjCn','Zocfy','VCULU','PfEur','FxRtA','cKAmA','QuaCP','1394192JhXrun','GxrRY','oZoLG','qWkPQ','concat','109772ZdTcBW','LkltG','argv','244365SteFal','wBzGP','alloc','fsjqJ','sHACt','itCrE','GApTF','header','452661PDQCOF','wqxOG','3CnbIEq','min','timestamp','clusters','push','mYzgv','BsumL','VyWQu','exit','kfIYA','xPskR','5358220CkMBQi','stitchWebmFiles.ts','2486000kMwyUA'];_0x4a96=function(){return _0x57099f;};return _0x4a96();}function uintSize(_0x1b837b){const _0x2fbb6c=_0x3669,_0x1e4e07={'FtuMO':function(_0x3c4ab2,_0x28e0cc){return _0x3c4ab2>_0x28e0cc;},'NinsH':function(_0x504e6e,_0xc51705){return _0x504e6e/_0xc51705;}};if(_0x1b837b===0x0)return 0x1;let _0x3cb567=0x0,_0x4e170c=_0x1b837b;while(_0x1e4e07['FtuMO'](_0x4e170c,0x0)){_0x3cb567++,_0x4e170c=Math[_0x2fbb6c(0x147)](_0x1e4e07['NinsH'](_0x4e170c,0x100));}return _0x3cb567;}function findTimestampScale(_0x3e7088,_0x392683){const _0x2526bf=_0x3669,_0x44f720={'xPskR':function(_0x5853cf,_0x23492b){return _0x5853cf+_0x23492b;},'GxrRY':function(_0x272468,_0x779507,_0x45111f){return _0x272468(_0x779507,_0x45111f);},'rRwae':function(_0x276094,_0x4c07ff){return _0x276094===_0x4c07ff;},'RNvtn':function(_0x49105f,_0x51ca13){return _0x49105f+_0x51ca13;},'pczuu':function(_0xb5be45,_0x575bce,_0x3851ac){return _0xb5be45(_0x575bce,_0x3851ac);},'ponYp':function(_0x33116b,_0x4e9ad7){return _0x33116b===_0x4e9ad7;},'Zocfy':function(_0x2dccfb,_0x5e4c33,_0x115739,_0xbcb318){return _0x2dccfb(_0x5e4c33,_0x115739,_0xbcb318);},'rhtDF':function(_0x137791,_0xdb40b5){return _0x137791===_0xdb40b5;}};let _0x31465d=_0x392683;const _0x35f5cf=Math[_0x2526bf(0x163)](_0x3e7088[_0x2526bf(0x174)],_0x44f720[_0x2526bf(0x16c)](_0x392683,0x2710));while(_0x31465d<_0x35f5cf){const [_0x486342,_0x154c38]=_0x44f720[_0x2526bf(0x151)](readId,_0x3e7088,_0x31465d),[_0x46bc81,_0x1ee167]=readVint(_0x3e7088,_0x44f720[_0x2526bf(0x16c)](_0x31465d,_0x154c38));if(_0x44f720['rRwae'](_0x486342,ID_INFO)){let _0x2dd160=_0x44f720['RNvtn'](_0x44f720['xPskR'](_0x31465d,_0x154c38),_0x1ee167);const _0x2d81f6=_0x2dd160+_0x46bc81;while(_0x2dd160<_0x2d81f6){const [_0x26dc1b,_0x122091]=_0x44f720[_0x2526bf(0x17a)](readId,_0x3e7088,_0x2dd160),[_0x2f31f5,_0x1f1d13]=readVint(_0x3e7088,_0x2dd160+_0x122091);if(_0x44f720['ponYp'](_0x26dc1b,ID_TIMESTAMP_SCALE))return _0x44f720[_0x2526bf(0x14a)](readUint,_0x3e7088,_0x44f720[_0x2526bf(0x178)](_0x2dd160+_0x122091,_0x1f1d13),_0x2f31f5);_0x2dd160+=_0x122091+_0x1f1d13+_0x2f31f5;}break;}if(_0x44f720['rhtDF'](_0x486342,ID_CLUSTER))break;if(isUnknownSize(_0x46bc81,_0x1ee167))break;_0x31465d+=_0x154c38+_0x1ee167+_0x46bc81;}return 0xf4240;}function findFirstClusterOffset(_0x32bdc9,_0x107b6f){const _0x5619ea=_0x3669,_0x423f4e={'BsumL':function(_0x135a48,_0x14f98c,_0x463a71){return _0x135a48(_0x14f98c,_0x463a71);},'anCeb':function(_0x593b6e,_0x208633,_0xdd1dbd){return _0x593b6e(_0x208633,_0xdd1dbd);},'fsjqJ':function(_0x21daf,_0xd022d6){return _0x21daf+_0xd022d6;}};let _0x387c4e=_0x107b6f;while(_0x387c4e<_0x32bdc9[_0x5619ea(0x174)]){const [_0x1e4539,_0x45afbd]=_0x423f4e[_0x5619ea(0x168)](readId,_0x32bdc9,_0x387c4e);if(_0x1e4539===ID_CLUSTER)return _0x387c4e;const [_0x2a4af5,_0x468206]=_0x423f4e['anCeb'](readVint,_0x32bdc9,_0x387c4e+_0x45afbd);if(isUnknownSize(_0x2a4af5,_0x468206))return _0x387c4e;_0x387c4e+=_0x423f4e[_0x5619ea(0x15b)](_0x45afbd,_0x468206)+_0x2a4af5;}return _0x32bdc9[_0x5619ea(0x174)];}function _0x3669(_0x473b60,_0x324e61){_0x473b60=_0x473b60-0x13e;const _0x4a9681=_0x4a96();let _0x36699a=_0x4a9681[_0x473b60];return _0x36699a;}function findClusterEnd(_0x49725c,_0x34f80d,_0x572766,_0x5a95b7){const _0x421943=_0x3669,_0xca782b={'sJuqS':function(_0x1e3d14,_0x25c792,_0x408cf2){return _0x1e3d14(_0x25c792,_0x408cf2);},'bnLdf':function(_0x39b11a,_0x2763e5){return _0x39b11a+_0x2763e5;},'QbGBa':function(_0xd9b609,_0x164046,_0x2ef63e){return _0xd9b609(_0x164046,_0x2ef63e);},'JaThP':function(_0x14d6a1,_0x49ed78){return _0x14d6a1+_0x49ed78;}};if(!_0xca782b['sJuqS'](isUnknownSize,_0x572766,_0x5a95b7))return _0xca782b['bnLdf'](_0x34f80d,_0x572766);const _0x3409f3=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4d450e=_0x34f80d;while(_0x4d450e<_0x49725c[_0x421943(0x174)]-0x4){const [_0x26d28c,_0x391962]=readId(_0x49725c,_0x4d450e);if(_0x3409f3['has'](_0x26d28c))return _0x4d450e;const [_0x4bc243,_0x2633d9]=readVint(_0x49725c,_0x4d450e+_0x391962);if(_0xca782b['QbGBa'](isUnknownSize,_0x4bc243,_0x2633d9))return _0x49725c[_0x421943(0x174)];_0x4d450e+=_0xca782b[_0x421943(0x176)](_0x391962,_0x2633d9)+_0x4bc243;}return _0x49725c[_0x421943(0x174)];}function extractClusters(_0x2da035,_0x1e98f4){const _0x525e3e=_0x3669,_0x45c5ff={'AeAeZ':function(_0x45bdea,_0x1af73a){return _0x45bdea<_0x1af73a;},'mkcHj':function(_0x45d4bf,_0xc43fc0){return _0x45d4bf===_0xc43fc0;},'EaFiA':function(_0x598aa5,_0x13f5bc,_0x1e0aea){return _0x598aa5(_0x13f5bc,_0x1e0aea);},'wqxOG':function(_0x29a1b3,_0x1843b6,_0x4f59d6){return _0x29a1b3(_0x1843b6,_0x4f59d6);},'PfEur':function(_0x5208bd,_0x8b77fc){return _0x5208bd+_0x8b77fc;},'Bugeu':function(_0x5eb493,_0x4d738d,_0xa590c6){return _0x5eb493(_0x4d738d,_0xa590c6);},'otwlG':function(_0x5d3e42,_0x1e84a6){return _0x5d3e42===_0x1e84a6;},'YsWwr':function(_0x1358be,_0x3ccdfd){return _0x1358be+_0x3ccdfd;},'VyWQu':function(_0x269f4a,_0x3bf86b){return _0x269f4a+_0x3bf86b;},'ExoDr':function(_0x276ccf,_0x548254){return _0x276ccf===_0x548254;},'ORrJE':function(_0x279444,_0xc058dd,_0x11fb0c){return _0x279444(_0xc058dd,_0x11fb0c);},'aaEel':function(_0x3c9cb0,_0xbaf3c6){return _0x3c9cb0>_0xbaf3c6;},'yWsrm':function(_0x5ef1d6,_0x5af689,_0x492277){return _0x5ef1d6(_0x5af689,_0x492277);}},_0x25a6f9=[],_0x514ac5=Buffer[_0x525e3e(0x141)]([0x1f,0x43,0xb6,0x75]);let _0xf24a0f=0x0;while(_0x45c5ff['AeAeZ'](_0xf24a0f,_0x2da035[_0x525e3e(0x174)])){const _0x170010=_0x2da035['indexOf'](_0x514ac5,_0xf24a0f);if(_0x45c5ff[_0x525e3e(0x17d)](_0x170010,-0x1))break;const [_0x397eea,_0x271b27]=_0x45c5ff['EaFiA'](readId,_0x2da035,_0x170010);if(_0x397eea!==ID_CLUSTER){_0xf24a0f=_0x170010+0x1;continue;}const [_0x3756fb,_0x558809]=_0x45c5ff['wqxOG'](readVint,_0x2da035,_0x45c5ff[_0x525e3e(0x14c)](_0x170010,_0x271b27)),_0x11f6ef=_0x170010+_0x271b27+_0x558809,_0x3228f5=findClusterEnd(_0x2da035,_0x11f6ef,_0x3756fb,_0x558809);let _0x67fb58=_0x11f6ef,_0x23668b=0x0,_0x2d4792=0x2,_0x341b5d=![],_0x19bf52=Buffer[_0x525e3e(0x15a)](0x0),_0x515251=Buffer[_0x525e3e(0x15a)](0x0);while(_0x67fb58<_0x3228f5){const [_0x32f097,_0x5edf44]=_0x45c5ff['Bugeu'](readId,_0x2da035,_0x67fb58),[_0x550a5b,_0xc9bd0c]=readVint(_0x2da035,_0x45c5ff[_0x525e3e(0x14c)](_0x67fb58,_0x5edf44));if(_0x45c5ff[_0x525e3e(0x171)](_0x32f097,ID_TIMESTAMP)){_0x23668b=readUint(_0x2da035,_0x45c5ff['YsWwr'](_0x67fb58,_0x5edf44)+_0xc9bd0c,_0x550a5b),_0x2d4792=_0x550a5b,_0x341b5d=!![],_0x19bf52=_0x2da035[_0x525e3e(0x143)](_0x11f6ef,_0x67fb58);const _0x5c957f=_0x45c5ff[_0x525e3e(0x14c)](_0x45c5ff['PfEur'](_0x67fb58+_0x5edf44,_0xc9bd0c),_0x550a5b);_0x515251=_0x2da035[_0x525e3e(0x143)](_0x5c957f,_0x3228f5);break;}if(_0x32f097===ID_CLUSTER)break;if(isUnknownSize(_0x550a5b,_0xc9bd0c))break;_0x67fb58+=_0x45c5ff[_0x525e3e(0x169)](_0x5edf44+_0xc9bd0c,_0x550a5b);}!_0x341b5d&&(_0x515251=_0x2da035[_0x525e3e(0x143)](_0x11f6ef,_0x3228f5));let _0x471be2=_0x23668b;_0x67fb58=_0x11f6ef;while(_0x67fb58<_0x3228f5){const [_0x55162c,_0x4bb409]=_0x45c5ff[_0x525e3e(0x161)](readId,_0x2da035,_0x67fb58),[_0x284b12,_0xb5f7a2]=_0x45c5ff['EaFiA'](readVint,_0x2da035,_0x67fb58+_0x4bb409);if(_0x45c5ff['ExoDr'](_0x55162c,ID_SIMPLE_BLOCK)&&_0x284b12>=0x4){const _0x5d1748=_0x67fb58+_0x4bb409+_0xb5f7a2,[,_0x1fbaf7]=_0x45c5ff['ORrJE'](readVint,_0x2da035,_0x5d1748),_0xb09f86=_0x2da035['readInt16BE'](_0x5d1748+_0x1fbaf7),_0x5eff58=_0x23668b+_0xb09f86;if(_0x45c5ff[_0x525e3e(0x175)](_0x5eff58,_0x471be2))_0x471be2=_0x5eff58;}if(_0x45c5ff[_0x525e3e(0x171)](_0x55162c,ID_CLUSTER))break;if(_0x45c5ff['yWsrm'](isUnknownSize,_0x284b12,_0xb5f7a2))break;_0x67fb58+=_0x4bb409+_0xb5f7a2+_0x284b12;}_0x25a6f9[_0x525e3e(0x166)]({'timestamp':_0x23668b,'maxTicks':_0x471be2,'bodyBeforeTimestamp':_0x19bf52,'bodyAfterTimestamp':_0x515251,'timestampElementSize':_0x2d4792}),_0xf24a0f=_0x3228f5;}return _0x25a6f9;}function parseWebm(_0x35d1c4){const _0x2002f4=_0x3669,_0x5f0eac={'bBHtx':function(_0x345baa,_0x4137fe){return _0x345baa+_0x4137fe;},'zGpYd':function(_0x4ebc45,_0x4f1da1,_0x4bc781){return _0x4ebc45(_0x4f1da1,_0x4bc781);},'FxRtA':function(_0x436a03,_0x196388,_0x161656){return _0x436a03(_0x196388,_0x161656);},'ofEhf':function(_0x15ca3a,_0x653eeb){return _0x15ca3a>_0x653eeb;}};let _0xb36033=0x0;const [,_0xee8eb0]=readId(_0x35d1c4,_0xb36033),[_0x395e4f,_0x3525e1]=readVint(_0x35d1c4,_0x5f0eac['bBHtx'](_0xb36033,_0xee8eb0));_0xb36033+=_0x5f0eac[_0x2002f4(0x142)](_0xee8eb0,_0x3525e1)+_0x395e4f;const [_0x34bad2,_0x465791]=_0x5f0eac[_0x2002f4(0x177)](readId,_0x35d1c4,_0xb36033);if(_0x34bad2!==ID_SEGMENT)return null;const [,_0x225f46]=_0x5f0eac['zGpYd'](readVint,_0x35d1c4,_0xb36033+_0x465791),_0x424730=_0x5f0eac['bBHtx'](_0xb36033+_0x465791,_0x225f46),_0x256534=_0x5f0eac[_0x2002f4(0x14d)](findTimestampScale,_0x35d1c4,_0x424730),_0xf97f26=findFirstClusterOffset(_0x35d1c4,_0x424730),_0x287e6d=_0x35d1c4[_0x2002f4(0x143)](0x0,_0xf97f26),_0x352825=extractClusters(_0x35d1c4,_0x256534);let _0x3ff8f5=0x0;for(const _0x136b77 of _0x352825){if(_0x5f0eac['ofEhf'](_0x136b77['maxTicks'],_0x3ff8f5))_0x3ff8f5=_0x136b77[_0x2002f4(0x146)];}return{'header':_0x287e6d,'clusters':_0x352825,'timestampScale':_0x256534,'maxTimestampTicks':_0x3ff8f5};}function buildCluster(_0x4d3885,_0x3135c3,_0x2d700c){const _0x4a3af1=_0x3669,_0x114fd1={'Iwzbu':function(_0x31494d,_0x4885c5){return _0x31494d(_0x4885c5);}},_0x432ab4=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x1bd0fa=Math['max'](0x4,uintSize(_0x4d3885)),_0x3d3d5e=Buffer['concat']([Buffer[_0x4a3af1(0x141)]([ID_TIMESTAMP]),_0x114fd1['Iwzbu'](writeVint,_0x1bd0fa),writeUint(_0x4d3885,_0x1bd0fa)]),_0x4ccb4f=Buffer[_0x4a3af1(0x154)]([_0x3135c3,_0x3d3d5e,_0x2d700c]),_0x4dadf0=writeVint(_0x4ccb4f[_0x4a3af1(0x174)]);return Buffer[_0x4a3af1(0x154)]([_0x432ab4,_0x4dadf0,_0x4ccb4f]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2ba5bc){const _0x4be6cd=_0x3669,_0x2b67c1={'QuaCP':function(_0x1e34b7,_0x38d01f,_0x48b144){return _0x1e34b7(_0x38d01f,_0x48b144);},'QATeT':function(_0x2e3926,_0x44b866){return _0x2e3926+_0x44b866;},'GApTF':function(_0x2dc460,_0x212920){return _0x2dc460+_0x212920;},'Hmcar':function(_0x54a89b,_0x443f2c){return _0x54a89b+_0x443f2c;},'HsNKA':function(_0x3391f7,_0x16a181){return _0x3391f7(_0x16a181);},'mYzgv':function(_0x4a4393,_0x29dbff){return _0x4a4393<_0x29dbff;},'oZoLG':function(_0x364d30,_0x4d8552){return _0x364d30===_0x4d8552;},'QogeZ':function(_0x4f47e7,_0x5842ca){return _0x4f47e7+_0x5842ca;},'LkltG':function(_0x2860eb,_0x3c69ef){return _0x2860eb+_0x3c69ef;},'fNcph':function(_0x284b6f,_0x407a23){return _0x284b6f+_0x407a23;},'sHACt':function(_0x574a60,_0xd2b9fd){return _0x574a60+_0xd2b9fd;},'pDjUJ':function(_0x5988ef,_0x3df41f){return _0x5988ef+_0x3df41f;},'qWkPQ':function(_0x26728b,_0x324962,_0x259f2b){return _0x26728b(_0x324962,_0x259f2b);}},_0x53b3e1=Buffer[_0x4be6cd(0x141)](_0x2ba5bc);let _0x1f39a1=0x0;const [,_0x4233d9]=_0x2b67c1[_0x4be6cd(0x14f)](readId,_0x53b3e1,_0x1f39a1),[_0x427514,_0x37fd64]=readVint(_0x53b3e1,_0x2b67c1[_0x4be6cd(0x17b)](_0x1f39a1,_0x4233d9)),_0x1b21f3=_0x2b67c1[_0x4be6cd(0x17b)](_0x2b67c1['QATeT'](_0x2b67c1[_0x4be6cd(0x15e)](_0x1f39a1,_0x4233d9),_0x37fd64),_0x427514),[,_0x478a32]=_0x2b67c1['QuaCP'](readId,_0x53b3e1,_0x1b21f3),[,_0x4326e7]=readVint(_0x53b3e1,_0x1b21f3+_0x478a32),_0x54195c=_0x2b67c1[_0x4be6cd(0x17b)](_0x2b67c1['Hmcar'](_0x1b21f3,_0x478a32),_0x4326e7),_0x8c141c=_0x2b67c1[_0x4be6cd(0x145)](writeUnknownSizeVint,_0x4326e7);_0x8c141c['copy'](_0x53b3e1,_0x1b21f3+_0x478a32);let _0x5a9e54=_0x54195c;const _0x5aa850=Math['min'](_0x53b3e1['length'],_0x54195c+0x2710);while(_0x2b67c1[_0x4be6cd(0x167)](_0x5a9e54,_0x5aa850)){const [_0x5aad4d,_0x5170b0]=_0x2b67c1['QuaCP'](readId,_0x53b3e1,_0x5a9e54),[_0x4b9ced,_0x303122]=_0x2b67c1['QuaCP'](readVint,_0x53b3e1,_0x5a9e54+_0x5170b0);if(_0x2b67c1['oZoLG'](_0x5aad4d,ID_CLUSTER))break;if(isUnknownSize(_0x4b9ced,_0x303122))break;if(_0x2b67c1[_0x4be6cd(0x152)](_0x5aad4d,ID_INFO)){const _0x4edcb4=_0x2b67c1[_0x4be6cd(0x140)](_0x2b67c1[_0x4be6cd(0x156)](_0x5a9e54,_0x5170b0),_0x303122),_0x5180d8=_0x2b67c1['fNcph'](_0x4edcb4,_0x4b9ced),_0x511a6f=[];let _0xf47aff=_0x4edcb4;while(_0x2b67c1[_0x4be6cd(0x167)](_0xf47aff,_0x5180d8)){const [_0x14858c,_0x52d80a]=readId(_0x53b3e1,_0xf47aff),[_0x1ebcb5,_0x13734f]=readVint(_0x53b3e1,_0x2b67c1[_0x4be6cd(0x15c)](_0xf47aff,_0x52d80a)),_0x57783e=_0x2b67c1['pDjUJ'](_0x52d80a+_0x13734f,_0x1ebcb5);_0x14858c!==ID_DURATION&&_0x511a6f['push'](_0x53b3e1['slice'](_0xf47aff,_0xf47aff+_0x57783e)),_0xf47aff+=_0x57783e;}const _0x44e99c=Buffer['concat'](_0x511a6f),_0x23b1c9=Buffer[_0x4be6cd(0x154)]([_0x53b3e1[_0x4be6cd(0x143)](_0x5a9e54,_0x5a9e54+_0x5170b0),_0x2b67c1[_0x4be6cd(0x153)](writeVint,_0x44e99c[_0x4be6cd(0x174)],_0x303122)]);return Buffer[_0x4be6cd(0x154)]([_0x53b3e1['slice'](0x0,_0x5a9e54),_0x23b1c9,_0x44e99c,_0x53b3e1[_0x4be6cd(0x143)](_0x5180d8)]);}_0x5a9e54+=_0x2b67c1['QATeT'](_0x5170b0,_0x303122)+_0x4b9ced;}return _0x53b3e1;}export function stitchWebmFiles(_0x20d29f,_0x50fde6){const _0x172542=_0x3669,_0x2cb48d={'hwqbm':function(_0x4087f3,_0x4b632c){return _0x4087f3<=_0x4b632c;},'vQyoy':function(_0x3f0596,_0x438dc0){return _0x3f0596(_0x438dc0);},'pKsuI':function(_0x13c207,_0x4a03fc,_0x1b433e,_0x506924){return _0x13c207(_0x4a03fc,_0x1b433e,_0x506924);},'PaBkZ':function(_0x1c3e99,_0x37047d){return _0x1c3e99+_0x37047d;},'ukjVm':function(_0x5d2aa7,_0x4c9249,_0x36784b){return _0x5d2aa7(_0x4c9249,_0x36784b);}};if(_0x2cb48d[_0x172542(0x170)](_0x20d29f[_0x172542(0x174)],0x1))return![];const _0x460edf=[];for(const _0xf833d5 of _0x20d29f){const _0x37bcd2=readFileSync(_0xf833d5),_0x4326a7=_0x2cb48d['vQyoy'](parseWebm,_0x37bcd2);if(!_0x4326a7||_0x4326a7['clusters'][_0x172542(0x174)]===0x0)return![];_0x460edf['push'](_0x4326a7);}const _0x4b3e6a=_0x460edf[0x0],_0x448348=rebuildHeaderWithoutDuration(_0x4b3e6a[_0x172542(0x15f)]),_0x3e518b=[_0x448348];let _0x42fdf8=0x0;for(let _0x13bd57=0x0;_0x13bd57<_0x460edf[_0x172542(0x174)];_0x13bd57++){const _0x3e8969=_0x460edf[_0x13bd57];for(const _0x358e60 of _0x3e8969[_0x172542(0x165)]){const _0x2cf2c8=_0x358e60[_0x172542(0x164)]+_0x42fdf8;_0x3e518b['push'](_0x2cb48d['pKsuI'](buildCluster,_0x2cf2c8,_0x358e60['bodyBeforeTimestamp'],_0x358e60[_0x172542(0x13f)]));}const _0x328128=0x1e;_0x42fdf8+=_0x2cb48d['PaBkZ'](_0x3e8969['maxTimestampTicks'],_0x328128);}return _0x2cb48d['ukjVm'](writeFileSync,_0x50fde6,Buffer[_0x172542(0x154)](_0x3e518b)),!![];}if(process[_0x163e52(0x157)][0x1]?.[_0x163e52(0x17e)](_0x163e52(0x16e))||process['argv'][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x163e52(0x143)](0x2);args[_0x163e52(0x174)]<0x3&&(console['error'](_0x163e52(0x13e)),process[_0x163e52(0x16a)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x163e52(0x174)]+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1ff8b8=_0x3da1;(function(_0x1d2d37,_0x53e8ab){const _0xb67955=_0x3da1,_0x31a49a=_0x1d2d37();while(!![]){try{const _0x2b9293=parseInt(_0xb67955(0x10f))/0x1+-parseInt(_0xb67955(0xf3))/0x2*(-parseInt(_0xb67955(0x116))/0x3)+-parseInt(_0xb67955(0x103))/0x4*(-parseInt(_0xb67955(0x134))/0x5)+parseInt(_0xb67955(0x11d))/0x6+parseInt(_0xb67955(0x121))/0x7+parseInt(_0xb67955(0x120))/0x8+parseInt(_0xb67955(0x110))/0x9*(-parseInt(_0xb67955(0x124))/0xa);if(_0x2b9293===_0x53e8ab)break;else _0x31a49a['push'](_0x31a49a['shift']());}catch(_0x32507b){_0x31a49a['push'](_0x31a49a['shift']());}}}(_0x320a,0x6949a));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function _0x3da1(_0x457dce,_0x2de01b){_0x457dce=_0x457dce-0xe8;const _0x320ace=_0x320a();let _0x3da19a=_0x320ace[_0x457dce];return _0x3da19a;}import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x320a(){const _0x2f025b=['cwd','flushing','sendBatch','hisbx','commandStartTime','phaseCounter','flushAsync','6784AOjzQo','Bearer\x20','VofdZ','command_end','dxGvV','constructor','POST','trackCommandStart','application/json','errorMessage','commandId','DZsgB','248362cvVgTw','2898bzDifR','featureId','phaseStartTimes','success','length','phase_error','1099839xscUsC','catch','phase_end','phase','isTTY','trackPhaseStart','deviceId','921606BRwgpC','transport','AgYwx','644184SQGfNf','1697997teXQsR','.ranger','DvlAq','41420XHMqzm','/api/v1/mcp/cli-telemetry','checklistItemId','now','Unknown','phaseIndex','trackCommandEnd','split','7|4|3|6|8|0|5|2|1','setContext','vIxOo','set','toISOString','nodeVersion','slice','KpqQF','1985kJumVJ','version','RXffB','browserSessionId','[telemetry]\x20Sending\x20','...','stringify','isTty','errorType','name','command','phase_start','trackCommandError','platform','push','wQxcL','eventType','2boVyNs','isCI','\x20event(s)\x20to\x20','buffer','buildEvent','trackPhaseError','flush','env','sendImmediate'];_0x320a=function(){return _0x2f025b;};return _0x320a();}let cachedDeviceId=null;function getDeviceId(){const _0x2d9e3e=_0x3da1,_0x3a4d73={'LvvPd':function(_0x2a5b09,_0x35fd62,_0x1140b6){return _0x2a5b09(_0x35fd62,_0x1140b6);},'nCgEN':function(_0x5ebb00){return _0x5ebb00();},'DvlAq':_0x2d9e3e(0x122),'qvbPQ':'.session','VofdZ':'utf-8','mYdkh':function(_0x4a1652){return _0x4a1652();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x3bc29a=_0x3a4d73['LvvPd'](join,_0x3a4d73['nCgEN'](homedir),_0x3a4d73[_0x2d9e3e(0x123)]),_0x44207b=join(_0x3bc29a,_0x3a4d73['qvbPQ']);if(existsSync(_0x44207b)){cachedDeviceId=readFileSync(_0x44207b,_0x3a4d73[_0x2d9e3e(0x105)])['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),mkdirSync(_0x3bc29a,{'recursive':!![]}),writeFileSync(_0x44207b,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x3a4d73['mYdkh'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];[_0x1ff8b8(0x10d)];['command'];[_0x1ff8b8(0x100)];['phaseCounter']=0x0;['phaseStartTimes']=new Map();['flushing']=null;[_0x1ff8b8(0x11c)];['cliVersion'];['nodeVersion'];[_0x1ff8b8(0xef)];['isTty'];['isCI'];['featureId'];['checklistItemId'];['browserSessionId'];[_0x1ff8b8(0x11e)];constructor(_0x4dbd9d){const _0x1ce123=_0x1ff8b8,_0x1d8979={'AgYwx':_0x1ce123(0x12c)},_0xf20231=_0x1d8979[_0x1ce123(0x11f)][_0x1ce123(0x12b)]('|');let _0x14f91c=0x0;while(!![]){switch(_0xf20231[_0x14f91c++]){case'0':this[_0x1ce123(0x131)]=process[_0x1ce123(0x135)];continue;case'1':this[_0x1ce123(0xf4)]=!!(process[_0x1ce123(0xfa)]['CI']||process['env']['GITHUB_ACTIONS']);continue;case'2':this['isTty']=process['stdout'][_0x1ce123(0x11a)]??![];continue;case'3':this['commandStartTime']=Date['now']();continue;case'4':this[_0x1ce123(0xec)]=_0x4dbd9d;continue;case'5':this['platform']=process['platform'];continue;case'6':this[_0x1ce123(0x11c)]=getDeviceId();continue;case'7':this[_0x1ce123(0x10d)]=randomUUID();continue;case'8':this['cliVersion']=getCurrentVersion();continue;}break;}}[_0x1ff8b8(0x12d)](_0x11537d){const _0x46814a=_0x1ff8b8;if(_0x11537d[_0x46814a(0x111)])this[_0x46814a(0x111)]=_0x11537d[_0x46814a(0x111)];if(_0x11537d['checklistItemId'])this['checklistItemId']=_0x11537d[_0x46814a(0x126)];if(_0x11537d['browserSessionId'])this[_0x46814a(0x137)]=_0x11537d[_0x46814a(0x137)];if(_0x11537d['transport'])this[_0x46814a(0x11e)]=_0x11537d[_0x46814a(0x11e)];}async[_0x1ff8b8(0x10a)](_0x4bb08d){const _0x2d16dd=_0x1ff8b8,_0xe02566=this['buildEvent']({'eventType':'command_start','metadata':_0x4bb08d});await this[_0x2d16dd(0xfb)](_0xe02566);}async[_0x1ff8b8(0x12a)](_0x3d9c8a,_0xb8f456){const _0x503015=_0x1ff8b8,_0x14c7c2={'vIxOo':function(_0x3cdb54,_0x2cb47e){return _0x3cdb54-_0x2cb47e;}},_0x5db6b0=this[_0x503015(0xf7)]({'eventType':_0x503015(0x106),'outcome':_0x3d9c8a,'durationMs':_0x14c7c2[_0x503015(0x12e)](Date[_0x503015(0x127)](),this['commandStartTime']),'metadata':_0xb8f456});await this[_0x503015(0xfb)](_0x5db6b0),await this['flush']();}async['trackCommandError'](_0x2107e5,_0x42a4d3){const _0x3d6604=_0x1ff8b8,_0x1e8f57={'lFTek':function(_0x449ef3,_0x7c2da5){return _0x449ef3(_0x7c2da5);},'RXffB':'Unknown'},_0x27617d=this['buildEvent']({'eventType':'command_error','errorMessage':truncate(_0x2107e5 instanceof Error?_0x2107e5['message']:_0x1e8f57['lFTek'](String,_0x2107e5),0x1f4),'errorType':_0x2107e5 instanceof Error?_0x2107e5[_0x3d6604(0x108)][_0x3d6604(0xeb)]:_0x1e8f57[_0x3d6604(0x136)],'durationMs':Date['now']()-this[_0x3d6604(0x100)],'metadata':_0x42a4d3});await this[_0x3d6604(0xfb)](_0x27617d),await this[_0x3d6604(0xf9)]();}[_0x1ff8b8(0x11b)](_0x3a6abf,_0x2edb14){const _0xce2cdc=_0x1ff8b8;this[_0xce2cdc(0x101)]++,this[_0xce2cdc(0x112)][_0xce2cdc(0x12f)](_0x3a6abf,Date[_0xce2cdc(0x127)]());const _0x4ff109=this[_0xce2cdc(0xf7)]({'eventType':_0xce2cdc(0xed),'phase':_0x3a6abf,'phaseIndex':this[_0xce2cdc(0x101)],'metadata':_0x2edb14});this[_0xce2cdc(0xf6)][_0xce2cdc(0xf0)](_0x4ff109);}['trackPhaseEnd'](_0x1e1e04,_0x5042fc){const _0x56cec9=_0x1ff8b8,_0x48c113=this['phaseStartTimes']['get'](_0x1e1e04),_0x33ff27=_0x48c113?Date['now']()-_0x48c113:undefined;this[_0x56cec9(0x112)]['delete'](_0x1e1e04);const _0x347e39=this[_0x56cec9(0xf7)]({'eventType':_0x56cec9(0x118),'phase':_0x1e1e04,'durationMs':_0x33ff27,'metadata':_0x5042fc});this['buffer']['push'](_0x347e39),this[_0x56cec9(0xf6)][_0x56cec9(0x114)]>=0xa&&this[_0x56cec9(0x102)]();}async[_0x1ff8b8(0xf8)](_0x277667,_0x1bb7d3,_0x22d4d7){const _0x53c16e=_0x1ff8b8,_0x18171b={'AImxA':function(_0x5e1437,_0x459ce6){return _0x5e1437-_0x459ce6;},'KpqQF':_0x53c16e(0x115),'wQxcL':function(_0x42c54a,_0x32f200){return _0x42c54a instanceof _0x32f200;},'dugyP':function(_0x12bc52,_0x9551bf){return _0x12bc52(_0x9551bf);},'LOULO':function(_0x415af6,_0x245c39){return _0x415af6 instanceof _0x245c39;}},_0x495de3=this[_0x53c16e(0x112)]['get'](_0x277667),_0x3b1d1a=_0x495de3?_0x18171b['AImxA'](Date['now'](),_0x495de3):undefined;this['phaseStartTimes']['delete'](_0x277667);const _0xab852f=this[_0x53c16e(0xf7)]({'eventType':_0x18171b[_0x53c16e(0x133)],'phase':_0x277667,'durationMs':_0x3b1d1a,'errorMessage':truncate(_0x18171b[_0x53c16e(0xf1)](_0x1bb7d3,Error)?_0x1bb7d3['message']:_0x18171b['dugyP'](String,_0x1bb7d3),0x1f4),'errorType':_0x18171b['LOULO'](_0x1bb7d3,Error)?_0x1bb7d3[_0x53c16e(0x108)][_0x53c16e(0xeb)]:_0x53c16e(0x128),'metadata':_0x22d4d7});await this[_0x53c16e(0xfb)](_0xab852f);}async[_0x1ff8b8(0xf9)](){const _0x110a35=_0x1ff8b8;if(this[_0x110a35(0xf6)]['length']===0x0)return;const _0x424731=this[_0x110a35(0xf6)]['splice'](0x0);try{await this[_0x110a35(0xfe)](_0x424731);}catch{}}[_0x1ff8b8(0xf7)](_0x3d42e3){const _0x49e1ba=_0x1ff8b8;return{'eventType':_0x3d42e3[_0x49e1ba(0xf2)],'command':this['command'],'commandId':this[_0x49e1ba(0x10d)],'deviceId':this[_0x49e1ba(0x11c)],'timestamp':new Date()[_0x49e1ba(0x130)](),'durationMs':_0x3d42e3['durationMs'],'phase':_0x3d42e3[_0x49e1ba(0x119)],'phaseIndex':_0x3d42e3[_0x49e1ba(0x129)],'outcome':_0x3d42e3['outcome'],'errorMessage':_0x3d42e3[_0x49e1ba(0x10c)],'errorType':_0x3d42e3[_0x49e1ba(0xea)],'featureId':this['featureId'],'checklistItemId':this['checklistItemId'],'browserSessionId':this['browserSessionId'],'transport':this[_0x49e1ba(0x11e)],'evaluation':_0x3d42e3['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this['nodeVersion'],'platform':this[_0x49e1ba(0xef)],'cwd':process[_0x49e1ba(0xfc)](),'isTty':this[_0x49e1ba(0xe9)],'isCI':this['isCI'],'metadata':_0x3d42e3['metadata']};}async[_0x1ff8b8(0xfb)](_0x2d8452){const _0x9727c0=_0x1ff8b8;try{await this[_0x9727c0(0xfe)]([_0x2d8452]);}catch{}}['flushAsync'](){const _0x42c116=_0x1ff8b8;if(this[_0x42c116(0xfd)])return;this['flushing']=this[_0x42c116(0xf9)]()['finally'](()=>{const _0x57f881=_0x42c116;this[_0x57f881(0xfd)]=null;});}async[_0x1ff8b8(0xfe)](_0x43adad){const _0x318b57=_0x1ff8b8,_0x4bb7df={'qQxnN':'Authorization','DZsgB':function(_0x124791,_0x58d8b4,_0x1a1adb){return _0x124791(_0x58d8b4,_0x1a1adb);},'DtclR':_0x318b57(0x109)},_0xd80075=await getToken()[_0x318b57(0x117)](()=>null),_0x46c9ef=getApiBaseUrl(),_0x355c48={'Content-Type':_0x318b57(0x10b)};_0xd80075&&(_0x355c48[_0x4bb7df['qQxnN']]=_0x318b57(0x104)+_0xd80075);const _0x4a508e={'events':_0x43adad};process[_0x318b57(0xfa)]['DEBUG']&&console['error'](_0x318b57(0x138)+_0x43adad['length']+_0x318b57(0xf5)+_0x46c9ef+'/api/v1/mcp/cli-telemetry');const _0x165356=new AbortController(),_0x2ddbee=_0x4bb7df[_0x318b57(0x10e)](setTimeout,()=>_0x165356['abort'](),0x1388);try{await fetch(_0x46c9ef+_0x318b57(0x125),{'method':_0x4bb7df['DtclR'],'headers':_0x355c48,'body':JSON[_0x318b57(0xe8)](_0x4a508e),'signal':_0x165356['signal']});}finally{clearTimeout(_0x2ddbee);}}}let currentCollector=null;export function createTelemetryCollector(_0x20143e){return currentCollector=new TelemetryCollector(_0x20143e),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x4caeab,_0x36c1e0,_0x159c94){const _0x574434=_0x1ff8b8,_0x35c110={'hisbx':function(_0x4ac71d,_0x296496){return _0x4ac71d(_0x296496);}},_0x30e0c2=createTelemetryCollector(_0x4caeab);await _0x30e0c2['trackCommandStart'](_0x159c94);try{const _0x52542f=await _0x35c110[_0x574434(0xff)](_0x36c1e0,_0x30e0c2);return await _0x30e0c2[_0x574434(0x12a)](_0x574434(0x113)),_0x52542f;}catch(_0x8b618a){await _0x30e0c2[_0x574434(0xee)](_0x8b618a);throw _0x8b618a;}finally{await _0x30e0c2[_0x574434(0xf9)]();}}function truncate(_0x333dea,_0x3931d8){const _0x20787c=_0x1ff8b8,_0x16ee5c={'dxGvV':function(_0x343c5e,_0x51e756){return _0x343c5e+_0x51e756;}};return _0x333dea[_0x20787c(0x114)]>_0x3931d8?_0x16ee5c[_0x20787c(0x107)](_0x333dea[_0x20787c(0x132)](0x0,_0x3931d8),_0x20787c(0x139)):_0x333dea;}
|
|
1
|
+
const _0x5e8c97=_0x2148;(function(_0x522680,_0x31a013){const _0xa4410=_0x2148,_0x2db112=_0x522680();while(!![]){try{const _0x298c88=parseInt(_0xa4410(0xf5))/0x1+parseInt(_0xa4410(0xe2))/0x2*(-parseInt(_0xa4410(0xe8))/0x3)+parseInt(_0xa4410(0xd5))/0x4+-parseInt(_0xa4410(0xf2))/0x5+parseInt(_0xa4410(0xc6))/0x6*(-parseInt(_0xa4410(0xd3))/0x7)+-parseInt(_0xa4410(0xe7))/0x8*(-parseInt(_0xa4410(0xd6))/0x9)+-parseInt(_0xa4410(0xc9))/0xa*(-parseInt(_0xa4410(0xea))/0xb);if(_0x298c88===_0x31a013)break;else _0x2db112['push'](_0x2db112['shift']());}catch(_0xe03098){_0x2db112['push'](_0x2db112['shift']());}}}(_0xfeeb,0xbc79a));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0xfeeb(){const _0x42949b=['success','trackPhaseError','message','phaseStartTimes','eSWYs','sendBatch','isTTY','5761693XxScvK','FsWQC','1352368gmlQos','9bHXRqC','stringify','platform','get','command_error','trackCommandEnd','/api/v1/mcp/cli-telemetry','isCI','featureId','trackPhaseEnd','buildEvent','DEBUG','134YyAggD','env','metadata','GITHUB_ACTIONS','isTty','6407696rWYoNP','17241jlBKsv','buffer','22707916rupmAY','Unknown','nodeVersion','commandId','splice','flush','name','...','6593835NfxQIh','bzsFL','length','95499eHrBxP','VCHvi','sendImmediate','outcome','Authorization','utf-8','gtVec','.ranger','now','browserSessionId','trackCommandStart','catch','push','flushAsync','commandStartTime','cliVersion','flushing','6CrCbLv','stdout','EcwJh','10uIUfVm','command','transport'];_0xfeeb=function(){return _0x42949b;};return _0xfeeb();}let cachedDeviceId=null;function getDeviceId(){const _0x5dcc0a=_0x2148,_0x573c56={'gtVec':function(_0x218da6,_0x71b035,_0x574704){return _0x218da6(_0x71b035,_0x574704);},'DMVeS':function(_0x5a1502){return _0x5a1502();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x2cbce1=_0x573c56[_0x5dcc0a(0xbb)](join,homedir(),_0x5dcc0a(0xbc)),_0x33e747=_0x573c56['gtVec'](join,_0x2cbce1,'.session');if(existsSync(_0x33e747)){cachedDeviceId=readFileSync(_0x33e747,_0x5dcc0a(0xba))['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x573c56['DMVeS'](randomUUID),mkdirSync(_0x2cbce1,{'recursive':!![]}),_0x573c56[_0x5dcc0a(0xbb)](writeFileSync,_0x33e747,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=randomUUID(),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];['commandId'];[_0x5e8c97(0xca)];['commandStartTime'];['phaseCounter']=0x0;[_0x5e8c97(0xcf)]=new Map();['flushing']=null;['deviceId'];['cliVersion'];['nodeVersion'];['platform'];[_0x5e8c97(0xe6)];[_0x5e8c97(0xdd)];[_0x5e8c97(0xde)];['checklistItemId'];[_0x5e8c97(0xbe)];[_0x5e8c97(0xcb)];constructor(_0x6c6577){const _0x54dfd1=_0x5e8c97,_0x504e8f={'QSkxv':function(_0x48a112){return _0x48a112();},'Bposy':function(_0x1b345e){return _0x1b345e();}},_0x74eb30='0|7|8|4|1|5|6|3|2'['split']('|');let _0x15cb54=0x0;while(!![]){switch(_0x74eb30[_0x15cb54++]){case'0':this[_0x54dfd1(0xed)]=randomUUID();continue;case'1':this[_0x54dfd1(0xc4)]=_0x504e8f['QSkxv'](getCurrentVersion);continue;case'2':this[_0x54dfd1(0xdd)]=!!(process['env']['CI']||process['env'][_0x54dfd1(0xe5)]);continue;case'3':this[_0x54dfd1(0xe6)]=process[_0x54dfd1(0xc7)][_0x54dfd1(0xd2)]??![];continue;case'4':this['deviceId']=_0x504e8f['Bposy'](getDeviceId);continue;case'5':this[_0x54dfd1(0xec)]=process['version'];continue;case'6':this[_0x54dfd1(0xd8)]=process[_0x54dfd1(0xd8)];continue;case'7':this['command']=_0x6c6577;continue;case'8':this['commandStartTime']=Date[_0x54dfd1(0xbd)]();continue;}break;}}['setContext'](_0x17f357){const _0x20da5c=_0x5e8c97;if(_0x17f357['featureId'])this['featureId']=_0x17f357['featureId'];if(_0x17f357['checklistItemId'])this['checklistItemId']=_0x17f357['checklistItemId'];if(_0x17f357['browserSessionId'])this['browserSessionId']=_0x17f357['browserSessionId'];if(_0x17f357[_0x20da5c(0xcb)])this['transport']=_0x17f357[_0x20da5c(0xcb)];}async['trackCommandStart'](_0x6a47e3){const _0x53da51=this['buildEvent']({'eventType':'command_start','metadata':_0x6a47e3});await this['sendImmediate'](_0x53da51);}async['trackCommandEnd'](_0x28ef31,_0x679b4e){const _0x4328c1=_0x5e8c97,_0x4788e0={'PkZpQ':'command_end'},_0x197a69=this[_0x4328c1(0xe0)]({'eventType':_0x4788e0['PkZpQ'],'outcome':_0x28ef31,'durationMs':Date[_0x4328c1(0xbd)]()-this[_0x4328c1(0xc3)],'metadata':_0x679b4e});await this[_0x4328c1(0xf7)](_0x197a69),await this['flush']();}async['trackCommandError'](_0x3020a6,_0x3ed0d9){const _0x2c29b9=_0x5e8c97,_0x319973={'EQjCm':function(_0x3a365c,_0x3eed5f,_0x111544){return _0x3a365c(_0x3eed5f,_0x111544);},'NvuXK':function(_0x23240c,_0x38627e){return _0x23240c(_0x38627e);},'bzsFL':_0x2c29b9(0xeb),'nCerw':function(_0x2de795,_0x5b30bd){return _0x2de795-_0x5b30bd;}},_0x13b092=this['buildEvent']({'eventType':_0x2c29b9(0xda),'errorMessage':_0x319973['EQjCm'](truncate,_0x3020a6 instanceof Error?_0x3020a6[_0x2c29b9(0xce)]:_0x319973['NvuXK'](String,_0x3020a6),0x1f4),'errorType':_0x3020a6 instanceof Error?_0x3020a6['constructor'][_0x2c29b9(0xf0)]:_0x319973[_0x2c29b9(0xf3)],'durationMs':_0x319973['nCerw'](Date[_0x2c29b9(0xbd)](),this['commandStartTime']),'metadata':_0x3ed0d9});await this['sendImmediate'](_0x13b092),await this[_0x2c29b9(0xef)]();}['trackPhaseStart'](_0x515ff2,_0x3f80c7){const _0x4b527d=_0x5e8c97;this['phaseCounter']++,this[_0x4b527d(0xcf)]['set'](_0x515ff2,Date[_0x4b527d(0xbd)]());const _0x5b4b53=this[_0x4b527d(0xe0)]({'eventType':'phase_start','phase':_0x515ff2,'phaseIndex':this['phaseCounter'],'metadata':_0x3f80c7});this[_0x4b527d(0xe9)][_0x4b527d(0xc1)](_0x5b4b53);}[_0x5e8c97(0xdf)](_0x42e705,_0x14b430){const _0x365cd4=_0x5e8c97,_0x2e2a6f=this[_0x365cd4(0xcf)]['get'](_0x42e705),_0x535fc4=_0x2e2a6f?Date[_0x365cd4(0xbd)]()-_0x2e2a6f:undefined;this['phaseStartTimes']['delete'](_0x42e705);const _0xdfd855=this[_0x365cd4(0xe0)]({'eventType':'phase_end','phase':_0x42e705,'durationMs':_0x535fc4,'metadata':_0x14b430});this[_0x365cd4(0xe9)]['push'](_0xdfd855),this[_0x365cd4(0xe9)]['length']>=0xa&&this[_0x365cd4(0xc2)]();}async[_0x5e8c97(0xcd)](_0x14fd5a,_0x58d303,_0x4fa85f){const _0x4f1ab8=_0x5e8c97,_0x130a8b={'EcwJh':'phase_error','LcEFj':function(_0x426abd,_0x4033f6){return _0x426abd(_0x4033f6);},'wLPIt':function(_0x578505,_0x426974){return _0x578505 instanceof _0x426974;},'BEBum':'Unknown'},_0x171095=this['phaseStartTimes'][_0x4f1ab8(0xd9)](_0x14fd5a),_0x126b65=_0x171095?Date[_0x4f1ab8(0xbd)]()-_0x171095:undefined;this[_0x4f1ab8(0xcf)]['delete'](_0x14fd5a);const _0x538598=this['buildEvent']({'eventType':_0x130a8b[_0x4f1ab8(0xc8)],'phase':_0x14fd5a,'durationMs':_0x126b65,'errorMessage':truncate(_0x58d303 instanceof Error?_0x58d303['message']:_0x130a8b['LcEFj'](String,_0x58d303),0x1f4),'errorType':_0x130a8b['wLPIt'](_0x58d303,Error)?_0x58d303['constructor']['name']:_0x130a8b['BEBum'],'metadata':_0x4fa85f});await this[_0x4f1ab8(0xf7)](_0x538598);}async['flush'](){const _0x1093c5=_0x5e8c97,_0xcff283={'VCHvi':function(_0x236a62,_0x2b7d43){return _0x236a62===_0x2b7d43;}};if(_0xcff283[_0x1093c5(0xf6)](this['buffer']['length'],0x0))return;const _0x23374b=this[_0x1093c5(0xe9)][_0x1093c5(0xee)](0x0);try{await this[_0x1093c5(0xd1)](_0x23374b);}catch{}}[_0x5e8c97(0xe0)](_0x51ca14){const _0x1c80fa=_0x5e8c97;return{'eventType':_0x51ca14['eventType'],'command':this['command'],'commandId':this[_0x1c80fa(0xed)],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x51ca14['durationMs'],'phase':_0x51ca14['phase'],'phaseIndex':_0x51ca14['phaseIndex'],'outcome':_0x51ca14[_0x1c80fa(0xf8)],'errorMessage':_0x51ca14['errorMessage'],'errorType':_0x51ca14['errorType'],'featureId':this[_0x1c80fa(0xde)],'checklistItemId':this['checklistItemId'],'browserSessionId':this['browserSessionId'],'transport':this[_0x1c80fa(0xcb)],'evaluation':_0x51ca14['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this['nodeVersion'],'platform':this[_0x1c80fa(0xd8)],'cwd':process['cwd'](),'isTty':this['isTty'],'isCI':this['isCI'],'metadata':_0x51ca14[_0x1c80fa(0xe4)]};}async[_0x5e8c97(0xf7)](_0x120440){try{await this['sendBatch']([_0x120440]);}catch{}}[_0x5e8c97(0xc2)](){const _0x33834c=_0x5e8c97;if(this[_0x33834c(0xc5)])return;this[_0x33834c(0xc5)]=this['flush']()['finally'](()=>{this['flushing']=null;});}async[_0x5e8c97(0xd1)](_0x53c70b){const _0x175fd0=_0x5e8c97,_0x297eeb={'WFKgH':'application/json','ROUGj':_0x175fd0(0xf9),'eSWYs':'POST','LRTjA':function(_0x179223,_0xfe4215){return _0x179223(_0xfe4215);}},_0x3b999f=await getToken()[_0x175fd0(0xc0)](()=>null),_0x2ffbdc=getApiBaseUrl(),_0x3f633c={'Content-Type':_0x297eeb['WFKgH']};_0x3b999f&&(_0x3f633c[_0x297eeb['ROUGj']]='Bearer\x20'+_0x3b999f);const _0x216bed={'events':_0x53c70b};process[_0x175fd0(0xe3)][_0x175fd0(0xe1)]&&console['error']('[telemetry]\x20Sending\x20'+_0x53c70b[_0x175fd0(0xf4)]+'\x20event(s)\x20to\x20'+_0x2ffbdc+'/api/v1/mcp/cli-telemetry');const _0x26b336=new AbortController(),_0x1a9cc1=setTimeout(()=>_0x26b336['abort'](),0x1388);try{await fetch(_0x2ffbdc+_0x175fd0(0xdc),{'method':_0x297eeb[_0x175fd0(0xd0)],'headers':_0x3f633c,'body':JSON[_0x175fd0(0xd7)](_0x216bed),'signal':_0x26b336['signal']});}finally{_0x297eeb['LRTjA'](clearTimeout,_0x1a9cc1);}}}let currentCollector=null;export function createTelemetryCollector(_0x3db30){return currentCollector=new TelemetryCollector(_0x3db30),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x3d4615,_0x1e9003,_0xaf3768){const _0x529979=_0x5e8c97,_0x37fc9f={'YYrHy':_0x529979(0xcc)},_0x2a3d43=createTelemetryCollector(_0x3d4615);await _0x2a3d43[_0x529979(0xbf)](_0xaf3768);try{const _0x2506a4=await _0x1e9003(_0x2a3d43);return await _0x2a3d43[_0x529979(0xdb)](_0x37fc9f['YYrHy']),_0x2506a4;}catch(_0x3856d9){await _0x2a3d43['trackCommandError'](_0x3856d9);throw _0x3856d9;}finally{await _0x2a3d43['flush']();}}function _0x2148(_0x3f15d2,_0x2934d8){_0x3f15d2=_0x3f15d2-0xba;const _0xfeebf3=_0xfeeb();let _0x21489c=_0xfeebf3[_0x3f15d2];return _0x21489c;}function truncate(_0x2283d0,_0x2b79cc){const _0x435319=_0x5e8c97,_0x4f5fff={'FsWQC':function(_0x12d0e1,_0x146631){return _0x12d0e1>_0x146631;},'MzRYs':function(_0x196449,_0x4461b6){return _0x196449+_0x4461b6;},'eprmL':_0x435319(0xf1)};return _0x4f5fff[_0x435319(0xd4)](_0x2283d0['length'],_0x2b79cc)?_0x4f5fff['MzRYs'](_0x2283d0['slice'](0x0,_0x2b79cc),_0x4f5fff['eprmL']):_0x2283d0;}
|