@ranger-testing/ranger-cli 3.1.7-alpha.387730d-58 → 3.1.7-alpha.44736ee-66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/actors.js +1 -0
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/build/skills/ranger/SKILL.md +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4cd58e=_0xe134;(function(_0x5a001f,_0x80d96a){const _0x145e99=_0xe134,_0x1fac00=_0x5a001f();while(!![]){try{const _0x2e8b57=-parseInt(_0x145e99(0xb1))/0x1*(-parseInt(_0x145e99(0xa9))/0x2)+-parseInt(_0x145e99(0xb2))/0x3*(-parseInt(_0x145e99(0xa5))/0x4)+-parseInt(_0x145e99(0x98))/0x5+parseInt(_0x145e99(0x8e))/0x6+-parseInt(_0x145e99(0x90))/0x7+parseInt(_0x145e99(0x89))/0x8*(parseInt(_0x145e99(0x8b))/0x9)+-parseInt(_0x145e99(0x8d))/0xa;if(_0x2e8b57===_0x80d96a)break;else _0x1fac00['push'](_0x1fac00['shift']());}catch(_0x3bbf0a){_0x1fac00['push'](_0x1fac00['shift']());}}}(_0x15f5,0xa41eb));import{spawn}from'child_process';import{createRequire}from'module';import{dirname,join}from'path';import{readFileSync}from'fs';import{quoteShellArg}from'./playwrightCli.js';export const RANGERWRIGHT_CLI_PACKAGE='@ranger-testing/rangerwright';export const RANGERWRIGHT_CLI_BINARY=_0x4cd58e(0xa4);function _0xe134(_0x28c56f,_0x24392f){_0x28c56f=_0x28c56f-0x87;const _0x15f573=_0x15f5();let _0xe13492=_0x15f573[_0x28c56f];return _0xe13492;}function readPackageJson(_0x2b302b){const _0x39cde8=_0x4cd58e,_0x50c61e={'OXEdZ':function(_0x5a3fa9,_0x599b38){return _0x5a3fa9!==_0x599b38;}},_0x387ea2=readFileSync(_0x2b302b,_0x39cde8(0x95)),_0x49568d=JSON[_0x39cde8(0xa1)](_0x387ea2);if(!_0x49568d||_0x50c61e[_0x39cde8(0xb6)](typeof _0x49568d,'object'))return{};return _0x49568d;}export function resolveRangerwrightCliBinary(){const _0x7082c6=_0x4cd58e,_0xe193df={'jjKWe':function(_0x138428,_0x25e043){return _0x138428(_0x25e043);},'npnmt':_0x7082c6(0xa6),'iiphu':_0x7082c6(0xb3),'JmfpV':function(_0x55a8c6,_0x37876f,_0x5e5bd8){return _0x55a8c6(_0x37876f,_0x5e5bd8);}},_0xc46eac=_0xe193df[_0x7082c6(0x9c)](createRequire,process['argv'][0x1]||join(process[_0x7082c6(0x99)](),_0xe193df[_0x7082c6(0xad)])),_0x27e706=_0xc46eac[_0x7082c6(0x91)](RANGERWRIGHT_CLI_PACKAGE+_0x7082c6(0x8f)),_0x9cc010=_0xe193df[_0x7082c6(0x9c)](dirname,_0x27e706),_0x2c7447=readPackageJson(_0x27e706),_0x4a6520=typeof _0x2c7447[_0x7082c6(0x9a)]===_0xe193df['iiphu']?_0x2c7447['bin']:_0x2c7447['bin']?.[RANGERWRIGHT_CLI_BINARY];if(!_0x4a6520)throw new Error(RANGERWRIGHT_CLI_PACKAGE+'\x20does\x20not\x20expose\x20a\x20'+RANGERWRIGHT_CLI_BINARY+'\x20binary');return _0xe193df[_0x7082c6(0xa7)](join,_0x9cc010,_0x4a6520);}export function buildRangerwrightCliEnv(_0x260fbe){const _0x3f74f6=_0x4cd58e;return{'RANGERWRIGHT_SESSION':_0x260fbe[_0x3f74f6(0x87)],'RANGERWRIGHT_CONFIG':_0x260fbe[_0x3f74f6(0xb7)],'RANGERWRIGHT_ARTIFACT_DIR':_0x260fbe['artifactDir'],..._0x260fbe[_0x3f74f6(0x92)]?{'RANGERWRIGHT_SOCKET_PATH':_0x260fbe[_0x3f74f6(0x92)]}:{}};}function _0x15f5(){const _0x1a7756=['args','parse','data','\x20--json','rangerwright','193832pWqfav','package.json','JmfpV','\x0astderr:\x20','926hRIQWg','command','rangerwright-cli\x20','\x0astdout:\x20','npnmt','SIGKILL','ZUPcX','length','860VBEllg','69hrapdX','string','null','WfooL','OXEdZ','configPath','stdout','TXnJX','sessionId','join','328tJtYXt','toString','146547iIdVQW','SIGTERM','6398830xZSheI','512280KFtHgj','/package.json','3533600sAZBQJ','resolve','socketPath','--json','timeoutMs','utf-8','kill','exited\x20with\x20code=','2243895snepXq','cwd','bin','commandArgs','jjKWe','zbHon','pipe','error'];_0x15f5=function(){return _0x1a7756;};return _0x15f5();}export function applyRangerwrightCliEnv(_0x2b2a80,_0x593c70){Object['assign'](_0x2b2a80,buildRangerwrightCliEnv(_0x593c70));}export function buildRangerwrightCliCommandPrefix(_0x4a8f4c=resolveRangerwrightCliBinary()){const _0x302523=_0x4cd58e;return quoteShellArg(_0x4a8f4c)+_0x302523(0xa3);}function getRangerwrightSubcommand(_0x23bb3d){return _0x23bb3d[0x0]??'unknown';}export function buildRangerwrightCliInvocation(_0xf70060,_0x39aac3){const _0x3b19ba=_0x4cd58e,_0x4a58f3={'upaND':function(_0x1bd9d4,_0x2f79d2){return _0x1bd9d4(_0x2f79d2);},'TXnJX':_0x3b19ba(0x93)},_0x2ff3be=_0xf70060['binaryPath']??resolveRangerwrightCliBinary(),_0x393262=['--json',..._0x39aac3];return{'command':_0x2ff3be,'args':_0x393262,'shellCommand':[_0x4a58f3['upaND'](quoteShellArg,_0x2ff3be),_0x4a58f3[_0x3b19ba(0xb9)],..._0x39aac3['map'](quoteShellArg)][_0x3b19ba(0x88)]('\x20'),'subcommand':_0x4a58f3['upaND'](getRangerwrightSubcommand,_0x39aac3)};}function truncateOutput(_0x459f84,_0x5aa6bc=0x7d0){const _0x243c3c=_0x4cd58e,_0x1c1927={'BfmpX':function(_0x4939f9,_0x23a771){return _0x4939f9>_0x23a771;}};return _0x1c1927['BfmpX'](_0x459f84[_0x243c3c(0xb0)],_0x5aa6bc)?_0x459f84['slice'](0x0,_0x5aa6bc)+'...':_0x459f84;}export async function runRangerwrightCliCommand(_0x19ea75){const _0x3881bc=_0x4cd58e,_0x3c6dbd={'ZUPcX':function(_0x3bcae1,_0x15b752){return _0x3bcae1(_0x15b752);},'cgMEb':function(_0x554693,_0x2bc9fa){return _0x554693===_0x2bc9fa;},'PqdiW':function(_0x2310b4,_0x38de52){return _0x2310b4??_0x38de52;},'avxcR':function(_0x28e4cf,_0x3bb90d){return _0x28e4cf(_0x3bb90d);},'zbHon':_0x3881bc(0xae),'WADbV':function(_0x44cc31,_0xd6deb){return _0x44cc31(_0xd6deb);},'RoUoe':'ignore','UysTW':_0x3881bc(0x9e),'gmXCb':_0x3881bc(0xa2),'WfooL':'close'},_0x1ff990=buildRangerwrightCliInvocation(_0x19ea75,_0x19ea75[_0x3881bc(0x9b)]),_0x89470b={..._0x19ea75['env']??process['env'],...buildRangerwrightCliEnv(_0x19ea75)};return new Promise((_0x76a35e,_0x5497b4)=>{const _0x3bf55f=_0x3881bc,_0x426bf7={'rGrKT':_0x3c6dbd[_0x3bf55f(0x9d)],'SRDaz':_0x3bf55f(0x8c),'lxOTs':function(_0x25543c,_0x20b46d){return _0x3c6dbd['WADbV'](_0x25543c,_0x20b46d);}},_0x631f0f=spawn(_0x1ff990[_0x3bf55f(0xaa)],_0x1ff990[_0x3bf55f(0xa0)],{'cwd':_0x19ea75[_0x3bf55f(0x99)],'env':_0x89470b,'stdio':[_0x3c6dbd['RoUoe'],_0x3c6dbd['UysTW'],_0x3c6dbd['UysTW']]});let _0x3739ba='',_0x3c9436='',_0x4d3b32=![];const _0x52e636=_0x19ea75['timeoutMs']&&_0x19ea75['timeoutMs']>0x0?setTimeout(()=>{const _0x56b7f8=_0x3bf55f;_0x4d3b32=!![],_0x631f0f[_0x56b7f8(0x96)](_0x426bf7['SRDaz']),setTimeout(()=>{try{_0x631f0f['kill'](_0x426bf7['rGrKT']);}catch{}},0x3e8);},_0x19ea75[_0x3bf55f(0x94)]):null;_0x631f0f[_0x3bf55f(0xb8)]?.['on'](_0x3bf55f(0xa2),_0x15cc23=>{const _0x5d904a=_0x3bf55f;_0x3739ba+=_0x15cc23[_0x5d904a(0x8a)]();}),_0x631f0f['stderr']?.['on'](_0x3c6dbd['gmXCb'],_0x4a50cc=>{const _0x46161a=_0x3bf55f;_0x3c9436+=_0x4a50cc[_0x46161a(0x8a)]();}),_0x631f0f['on'](_0x3bf55f(0x9f),_0x73e7b0=>{if(_0x52e636)clearTimeout(_0x52e636);_0x426bf7['lxOTs'](_0x5497b4,_0x73e7b0);}),_0x631f0f['on'](_0x3c6dbd[_0x3bf55f(0xb5)],(_0x92800d,_0x1a3ae1)=>{const _0x5e0bd0=_0x3bf55f;if(_0x52e636)_0x3c6dbd[_0x5e0bd0(0xaf)](clearTimeout,_0x52e636);if(_0x3c6dbd['cgMEb'](_0x92800d,0x0)){_0x76a35e({'stdout':_0x3739ba,'stderr':_0x3c9436,'invocation':_0x1ff990});return;}const _0x1dc82b=_0x4d3b32?'timed\x20out\x20after\x20'+_0x19ea75['timeoutMs']+'ms':_0x5e0bd0(0x97)+(_0x92800d??_0x5e0bd0(0xb4))+'\x20signal='+_0x3c6dbd['PqdiW'](_0x1a3ae1,'null');_0x3c6dbd['avxcR'](_0x5497b4,new Error(_0x5e0bd0(0xab)+_0x1ff990['subcommand']+'\x20'+_0x1dc82b+_0x5e0bd0(0xac)+truncateOutput(_0x3739ba)+_0x5e0bd0(0xa8)+_0x3c6dbd['ZUPcX'](truncateOutput,_0x3c9436)));});});}export function parseRangerwrightCliCommand(_0x2cf5bf){const _0x439387=_0x2cf5bf['match'](/(?:^|\s)(?:"[^"]*rangerwright(?:\/build\/cli\.js)?"|'[^']*rangerwright(?:\/build\/cli\.js)?'|\S*rangerwright(?:\/build\/cli\.js)?)(?:\s+--json)?\s+([a-z-]+)/);return _0x439387?.[0x1]??null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x506844,_0xa6d8d9){const _0x564221=_0x2a51,_0x126b7a=_0x506844();while(!![]){try{const _0x2e3935=parseInt(_0x564221(0x1f9))/0x1*(-parseInt(_0x564221(0x203))/0x2)+-parseInt(_0x564221(0x20b))/0x3*(-parseInt(_0x564221(0x1e8))/0x4)+parseInt(_0x564221(0x1ea))/0x5*(parseInt(_0x564221(0x200))/0x6)+parseInt(_0x564221(0x214))/0x7+-parseInt(_0x564221(0x1f5))/0x8+parseInt(_0x564221(0x205))/0x9+-parseInt(_0x564221(0x1fc))/0xa;if(_0x2e3935===_0xa6d8d9)break;else _0x126b7a['push'](_0x126b7a['shift']());}catch(_0x45e6fe){_0x126b7a['push'](_0x126b7a['shift']());}}}(_0x22c8,0x89ddf));import{existsSync}from'fs';import _0x513919 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';function _0x22c8(){const _0x943b65=['baseUrl','cdpEndpoint','BGOzm','2093912ZZukNY','\x20\x20Note:\x20--env\x20\x22','Local\x20profile','qfTSr','218871nmqNaD','CHJdd','bMdKd','3337270QkiEys','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','RANGER_SESSION_STATE_PATH=','Profile\x20\x22','6ItCECj','local','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','2RgpTOG','lBPph','486288CpEabF','HgVqp','authPath','utlcQ','XtLay','authEnv','55383rlsRfC','key','domains','env','\x20does\x20not\x20exist.','envStartPath','settings','`\x20to\x20recreate\x20it.','ADkxc','6401444XbuUME','qDaBt','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','source','HAlri','string','name','length','envBaseUrl','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20to\x20override.','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','profile','resolvedEnv','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','CQUIE','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','status','log','20FRDIbr','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','1591055xxNIHA','vsHhh','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','aplvw','environmentKey','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','CrNLm','startPath'];_0x22c8=function(){return _0x943b65;};return _0x22c8();}import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x1e1433){const _0xf8ed0b=_0x2a51,_0x14fb65={'ADkxc':function(_0x587b56){return _0x587b56();},'XtLay':function(_0x198841,_0x2337a8){return _0x198841(_0x2337a8);},'qDaBt':function(_0x21cad0,_0x56bc12){return _0x21cad0!==_0x56bc12;},'oZibk':function(_0x3da6d3,_0x4e2495){return _0x3da6d3 instanceof _0x4e2495;},'qfTSr':function(_0x534449,_0x180bb1){return _0x534449??_0x180bb1;},'eKuGP':function(_0x38a9ec,_0x50d626){return _0x38a9ec+_0x50d626;},'XScPL':function(_0x2e4c65,_0xcfd9d1){return _0x2e4c65+_0xcfd9d1;},'vsHhh':function(_0x3ff502,_0x422e2d){return _0x3ff502+_0x422e2d;},'aplvw':_0xf8ed0b(0x1e0),'BiItr':_0xf8ed0b(0x21d),'HAlri':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','xZzTw':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','uOBEQ':function(_0x121ddf,_0x5ba874){return _0x121ddf(_0x5ba874);},'lBPph':function(_0x487359,_0x2037e2){return _0x487359 instanceof _0x2037e2;},'HgVqp':function(_0x5d6a4e,_0x4a1711){return _0x5d6a4e&&_0x4a1711;},'elsIb':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','CQUIE':function(_0x193a0e,_0x175c9d){return _0x193a0e&&_0x175c9d;},'CrNLm':'list','bMdKd':'Cloud\x20profile\x20(recommended)','anaWz':'cloud','tDoFj':function(_0x2f19b1,_0x5bb546,_0x564ac2){return _0x2f19b1(_0x5bb546,_0x564ac2);},'EGTTZ':_0xf8ed0b(0x21e),'TJLEN':function(_0x17dcdc,_0x275e18){return _0x17dcdc(_0x275e18);}},_0x1054c3=_0x1e1433['profile'];let _0xb56c0f=_0x1054c3,_0x449571=null;const _0x15a3c6=_0x1054c3?null:await _0x14fb65['ADkxc'](readActiveProfileName);if(_0x1e1433['authEnv']&&_0x1054c3)console['log'](_0xf8ed0b(0x1f6)+_0x1e1433[_0xf8ed0b(0x20a)]+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x1054c3+'\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).');else _0x1e1433['authEnv']&&!process[_0xf8ed0b(0x20e)]['RANGER_TEST_USERNAME']&&console[_0xf8ed0b(0x1e7)](_0xf8ed0b(0x1f6)+_0x1e1433['authEnv']+_0xf8ed0b(0x1e9));if(!_0x1054c3&&process[_0xf8ed0b(0x20e)]['RANGER_TEST_USERNAME'])try{const _0x360195=await _0x14fb65['XtLay'](resolveAdHocProfile,{'targetUrl':_0x1e1433['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0x1e1433['authEnv']});_0x360195&&(_0x15a3c6&&_0x14fb65[_0xf8ed0b(0x215)](_0x15a3c6,_0x360195['name'])&&console[_0xf8ed0b(0x1e7)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x360195['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x15a3c6+'\x22.\x20Pass\x20--profile\x20'+_0x15a3c6+_0xf8ed0b(0x1df)),_0xb56c0f=_0x360195['name'],_0x449571=_0x360195[_0xf8ed0b(0x1e1)]);}catch(_0x3e0769){if(!_0x15a3c6||_0x1e1433[_0xf8ed0b(0x20a)])throw _0x3e0769;console['log']('\x20\x20Warning:\x20'+(_0x14fb65['oZibk'](_0x3e0769,Error)?_0x3e0769['message']:String(_0x3e0769))),console[_0xf8ed0b(0x1e7)](_0xf8ed0b(0x216)+_0x15a3c6+'\x22.');}if(!_0xb56c0f)_0xb56c0f=_0x14fb65[_0xf8ed0b(0x1f8)](_0x15a3c6,undefined);if(!_0xb56c0f)try{const _0x58f1cb=await _0x14fb65['ADkxc'](listCloudProfiles);if(_0x58f1cb[_0xf8ed0b(0x21b)]===0x1){const _0x13099e=_0x58f1cb[0x0];_0xb56c0f=_0x13099e[_0xf8ed0b(0x21a)],console[_0xf8ed0b(0x1e7)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x13099e['name']),console['log'](_0xf8ed0b(0x202));}}catch{}if(!_0xb56c0f)throw new Error(_0x14fb65['eKuGP'](_0x14fb65['XScPL'](_0x14fb65['vsHhh'](_0xf8ed0b(0x1e5),_0x14fb65[_0xf8ed0b(0x1ed)]),_0x14fb65['BiItr'])+_0x14fb65[_0xf8ed0b(0x218)],_0x14fb65['xZzTw']));const _0x424203=getEnvDir(_0xb56c0f),_0x9ac97c=_0x14fb65[_0xf8ed0b(0x209)](existsSync,_0x424203);let _0x1d5bcf=_0x449571,_0x5eb39f=![];if(!_0x1d5bcf)try{_0x1d5bcf=await _0x14fb65['uOBEQ'](fetchCloudProfile,_0xb56c0f);if(!_0x1d5bcf)_0x5eb39f=!![];}catch(_0x4b558f){_0x14fb65[_0xf8ed0b(0x204)](_0x4b558f,ApiError)&&_0x4b558f[_0xf8ed0b(0x1e6)]===0x194&&(_0x5eb39f=!![]);}if(_0x14fb65[_0xf8ed0b(0x206)](_0x1054c3,_0x5eb39f)&&!_0x9ac97c&&!_0x1d5bcf)throw new Error(_0x14fb65[_0xf8ed0b(0x1eb)](_0x14fb65[_0xf8ed0b(0x1eb)](_0xf8ed0b(0x1ff)+_0x1054c3+_0xf8ed0b(0x1ec),'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),_0x14fb65['elsIb']));if(_0x14fb65[_0xf8ed0b(0x1e4)](_0x1d5bcf,_0x9ac97c)){let _0x27aa48=!![];if(isInteractive()){const {source:_0x4e6d6c}=await _0x513919['prompt']([{'type':_0x14fb65[_0xf8ed0b(0x1f0)],'name':_0xf8ed0b(0x217),'message':'Profile\x20\x22'+_0xb56c0f+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x14fb65[_0xf8ed0b(0x1fb)],'value':_0x14fb65['anaWz']},{'name':_0xf8ed0b(0x1f7),'value':_0xf8ed0b(0x201)}],'default':'cloud'}]);_0x27aa48=_0x4e6d6c===_0x14fb65['anaWz'];}if(!_0x27aa48)_0x1d5bcf=null;}const _0x32e391=_0x14fb65['tDoFj'](readProfileOverrides,process['cwd'](),_0xb56c0f);let _0x359ed2=null,_0x28e6bd,_0x5ac2be,_0x9616e4,_0x39dedd,_0x121f35=null,_0x5a31c6,_0x29e380;const _0x37cb00=expandOverrides(_0x32e391),_0x44a0d5=_0x14fb65[_0xf8ed0b(0x213)](readUrlEnvVars);if(_0x1d5bcf){_0x359ed2=_0x1d5bcf;const _0x5c13e5=_0x1d5bcf['settings']??{},_0x221203=mergeCloudProfileSettings(_0x5c13e5,_0x32e391??undefined),_0x53b05a={..._0x1d5bcf,'settings':_0x221203};_0x121f35={'baseUrl':expandString(_0x5c13e5[_0xf8ed0b(0x1f2)]),'startPath':expandString(_0x5c13e5[_0xf8ed0b(0x1f1)])};const _0x132030=await fetchAuthConfig(),_0x416e44=_0x132030?resolveAuthEnvironmentLocally(_0x132030,_0x1d5bcf[_0xf8ed0b(0x1ee)]):null;_0x5a31c6=_0x416e44?.['domains']?.[0x0],_0x29e380=_0x416e44?.[_0xf8ed0b(0x20c)];const _0x552d86=resolveProfileUrl({'flagBaseUrl':_0x1e1433[_0xf8ed0b(0x1f2)],'flagStartPath':_0x1e1433['startPath'],'envBaseUrl':_0x44a0d5[_0xf8ed0b(0x21c)],'envStartPath':_0x44a0d5['envStartPath'],'projectOverrides':_0x37cb00,'cloudSettings':_0x121f35,'authEnvironmentDomain':_0x5a31c6}),_0x2444e0=process[_0xf8ed0b(0x20e)]['RANGER_SESSION_STATE_PATH'];if(_0x2444e0){if(!existsSync(_0x2444e0))throw new Error(_0xf8ed0b(0x1fe)+_0x2444e0+_0xf8ed0b(0x20f));_0x28e6bd=_0x2444e0,_0x5ac2be=resolveEnvVars(_0x221203),_0x9616e4=Boolean(_0x5ac2be['cdpEndpoint']);}else{const _0x59c4e2=await resolveCloudProfileSession(_0x53b05a,{'effectiveBaseUrl':_0x552d86[_0xf8ed0b(0x1f2)],'telemetry':_0x1e1433['telemetry'],'assertedEnv':_0x1e1433[_0xf8ed0b(0x20a)]});_0x28e6bd=_0x59c4e2[_0xf8ed0b(0x207)],_0x5ac2be=resolveEnvVars(_0x59c4e2[_0xf8ed0b(0x211)]),_0x9616e4=Boolean(_0x5ac2be[_0xf8ed0b(0x1f3)]),_0x5a31c6=_0x59c4e2[_0xf8ed0b(0x1e2)]?.[_0xf8ed0b(0x20d)]?.[0x0],_0x29e380=_0x59c4e2[_0xf8ed0b(0x1e2)]?.[_0xf8ed0b(0x20c)];}}else{if(!_0x9ac97c){const _0x18bb91=!_0x1054c3;throw new Error(_0x18bb91?'Active\x20profile\x20\x22'+_0xb56c0f+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a'+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'+_0x14fb65['EGTTZ']+(_0xf8ed0b(0x1fd)+_0xb56c0f+_0xf8ed0b(0x212)):'Profile\x20\x22'+_0xb56c0f+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0xb56c0f);}const _0x3ad634=await loadSettings(_0xb56c0f);_0x5ac2be=resolveEnvVars(_0x3ad634),_0x9616e4=_0x14fb65['TJLEN'](Boolean,_0x5ac2be[_0xf8ed0b(0x1f3)]),_0x39dedd=_0x5ac2be[_0xf8ed0b(0x1f2)];}const _0xbf3e7=resolveProfileUrl({'flagBaseUrl':_0x1e1433['baseUrl'],'flagStartPath':_0x1e1433['startPath'],'envBaseUrl':_0x44a0d5['envBaseUrl'],'envStartPath':_0x44a0d5[_0xf8ed0b(0x210)],'localSettingsBaseUrl':_0x39dedd,'projectOverrides':_0x37cb00,'cloudSettings':_0x121f35,'authEnvironmentDomain':_0x5a31c6}),_0x26013c=_0xbf3e7['url']??_0xbf3e7['baseUrl'];if(!_0x26013c&&!_0x9616e4)throw new Error(_0xf8ed0b(0x1ef)+_0xb56c0f+_0xf8ed0b(0x1e3)+_0xb56c0f+'\x20baseUrl\x20<url>');return{'activeProfile':_0xb56c0f,'resolvedCloudProfile':_0x359ed2,'cloudAuthPath':_0x28e6bd,'resolvedSettings':_0x5ac2be,'isCdpMode':_0x9616e4,'url':_0x26013c,'baseUrlSource':_0xbf3e7['baseUrlSource'],'authEnvKey':_0x29e380,'startPath':_0xbf3e7['startPath']};}function _0x2a51(_0x296d05,_0x466988){_0x296d05=_0x296d05-0x1df;const _0x22c811=_0x22c8();let _0x2a510a=_0x22c811[_0x296d05];return _0x2a510a;}function expandString(_0x5e57b0){const _0x2c1a4=_0x2a51,_0x1af8b6={'BGOzm':_0x2c1a4(0x219)};if(typeof _0x5e57b0!==_0x1af8b6[_0x2c1a4(0x1f4)])return _0x5e57b0;return resolveEnvVars(_0x5e57b0);}function expandOverrides(_0x29e55d){const _0x279b9d=_0x2a51,_0x3d7d5a={'utlcQ':function(_0x1bfc4c,_0x122d37){return _0x1bfc4c(_0x122d37);},'ZxXUv':'string','CHJdd':function(_0x206c7c,_0x1a8904){return _0x206c7c(_0x1a8904);}};if(!_0x29e55d)return _0x29e55d;const _0xca6035={..._0x29e55d};return typeof _0xca6035['baseUrl']==='string'&&(_0xca6035['baseUrl']=_0x3d7d5a[_0x279b9d(0x208)](resolveEnvVars,_0xca6035[_0x279b9d(0x1f2)])),typeof _0xca6035['startPath']===_0x3d7d5a['ZxXUv']&&(_0xca6035[_0x279b9d(0x1f1)]=_0x3d7d5a[_0x279b9d(0x1fa)](resolveEnvVars,_0xca6035[_0x279b9d(0x1f1)])),_0xca6035;}
|
|
1
|
+
(function(_0x115664,_0x20ae57){const _0x5c1cca=_0x2f2a,_0x35a78a=_0x115664();while(!![]){try{const _0xfedabc=parseInt(_0x5c1cca(0x1a2))/0x1*(parseInt(_0x5c1cca(0x1c9))/0x2)+parseInt(_0x5c1cca(0x1dc))/0x3*(-parseInt(_0x5c1cca(0x1b1))/0x4)+-parseInt(_0x5c1cca(0x1c3))/0x5*(parseInt(_0x5c1cca(0x1b6))/0x6)+-parseInt(_0x5c1cca(0x1a9))/0x7+parseInt(_0x5c1cca(0x1b4))/0x8*(parseInt(_0x5c1cca(0x1d0))/0x9)+parseInt(_0x5c1cca(0x1b0))/0xa+-parseInt(_0x5c1cca(0x1bb))/0xb*(-parseInt(_0x5c1cca(0x1e0))/0xc);if(_0xfedabc===_0x20ae57)break;else _0x35a78a['push'](_0x35a78a['shift']());}catch(_0x455764){_0x35a78a['push'](_0x35a78a['shift']());}}}(_0x3573,0x8704c));import{existsSync}from'fs';import _0x4ab907 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';function _0x2f2a(_0x15d5b1,_0xe96caf){_0x15d5b1=_0x15d5b1-0x19d;const _0x3573a9=_0x3573();let _0x2f2a3f=_0x3573a9[_0x15d5b1];return _0x2f2a3f;}export async function resolveProfileContext(_0x426074){const _0x4f40de=_0x2f2a,_0x422ae0={'ugtpa':function(_0xaaf182){return _0xaaf182();},'UCBzK':function(_0x4af65e,_0x134bb6){return _0x4af65e!==_0x134bb6;},'VFXfU':function(_0x565ec9,_0x28a04a){return _0x565ec9 instanceof _0x28a04a;},'wlWmN':function(_0x273636,_0x182f1a){return _0x273636??_0x182f1a;},'dmVbD':function(_0x16be8c){return _0x16be8c();},'NuDYR':function(_0x4bb280,_0x5b2b2b){return _0x4bb280===_0x5b2b2b;},'iTDqo':function(_0x21aa13,_0x48501c){return _0x21aa13+_0x48501c;},'oEjkT':function(_0x3e4172,_0x49aa33){return _0x3e4172+_0x49aa33;},'CfwCX':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','qONvP':function(_0x1f7d07,_0xf1faa0){return _0x1f7d07(_0xf1faa0);},'jDoOC':function(_0xc2c198,_0x3c89c3){return _0xc2c198(_0x3c89c3);},'QlxFX':function(_0x4143eb,_0x3b3046){return _0x4143eb===_0x3b3046;},'rRkIh':_0x4f40de(0x1a5),'Idguy':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','Qptvu':function(_0x37da11){return _0x37da11();},'PNpPv':'cloud','bdexJ':function(_0x5a3e0c,_0x550f73,_0x127923){return _0x5a3e0c(_0x550f73,_0x127923);},'TTNMA':function(_0x1183db,_0x4fcefa){return _0x1183db(_0x4fcefa);},'jtelQ':function(_0x5d648b,_0x3913b9){return _0x5d648b(_0x3913b9);},'GGFor':function(_0x1d68b8,_0x4e16d8,_0x11b8b0){return _0x1d68b8(_0x4e16d8,_0x11b8b0);},'juSgp':function(_0x35516c,_0x14226a){return _0x35516c(_0x14226a);},'UBBVP':function(_0x2d67f6,_0x1451fc,_0x3a41ff){return _0x2d67f6(_0x1451fc,_0x3a41ff);},'ZAkCR':function(_0x109245,_0x32115a){return _0x109245+_0x32115a;},'kMVni':function(_0xf01263,_0x910d94){return _0xf01263+_0x910d94;},'rpmxM':function(_0x1d55e7,_0x2bc03d){return _0x1d55e7+_0x2bc03d;},'sVWci':_0x4f40de(0x1ae),'WGIrh':function(_0x43b558,_0x34d1b3){return _0x43b558&&_0x34d1b3;}},_0x980f82=_0x426074['profile'];let _0x43a740=_0x980f82,_0x5c2ed8=null;const _0x5cfdc=_0x980f82?null:await _0x422ae0['ugtpa'](readActiveProfileName);if(_0x426074[_0x4f40de(0x1d3)]&&_0x980f82)console[_0x4f40de(0x1d5)](_0x4f40de(0x1a3)+_0x426074['authEnv']+_0x4f40de(0x1ce)+_0x980f82+'\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).');else _0x426074[_0x4f40de(0x1d3)]&&!process[_0x4f40de(0x1b5)]['RANGER_TEST_USERNAME']&&console[_0x4f40de(0x1d5)]('\x20\x20Note:\x20--env\x20\x22'+_0x426074[_0x4f40de(0x1d3)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x980f82&&process['env']['RANGER_TEST_USERNAME'])try{const _0xc7f9ab=await resolveAdHocProfile({'targetUrl':_0x426074[_0x4f40de(0x1ac)]??_0x422ae0[_0x4f40de(0x1c8)](readUrlEnvVars)['envBaseUrl'],'envKey':_0x426074[_0x4f40de(0x1d3)]});_0xc7f9ab&&(_0x5cfdc&&_0x422ae0[_0x4f40de(0x1b2)](_0x5cfdc,_0xc7f9ab['name'])&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0xc7f9ab['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x5cfdc+'\x22.\x20Pass\x20--profile\x20'+_0x5cfdc+'\x20to\x20override.'),_0x43a740=_0xc7f9ab[_0x4f40de(0x1db)],_0x5c2ed8=_0xc7f9ab[_0x4f40de(0x1b8)]);}catch(_0x570562){if(!_0x5cfdc||_0x426074['authEnv'])throw _0x570562;console[_0x4f40de(0x1d5)](_0x4f40de(0x1d6)+(_0x422ae0[_0x4f40de(0x1de)](_0x570562,Error)?_0x570562[_0x4f40de(0x1d9)]:String(_0x570562))),console['log'](_0x4f40de(0x1d7)+_0x5cfdc+'\x22.');}if(!_0x43a740)_0x43a740=_0x422ae0['wlWmN'](_0x5cfdc,undefined);if(!_0x43a740)try{const _0x4e87b2=await _0x422ae0[_0x4f40de(0x1af)](listCloudProfiles);if(_0x422ae0[_0x4f40de(0x1c4)](_0x4e87b2[_0x4f40de(0x1d2)],0x1)){const _0x590d50=_0x4e87b2[0x0];_0x43a740=_0x590d50['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x590d50[_0x4f40de(0x1db)]),console[_0x4f40de(0x1d5)](_0x4f40de(0x1ca));}}catch{}if(!_0x43a740)throw new Error(_0x422ae0['iTDqo'](_0x422ae0['iTDqo'](_0x422ae0[_0x4f40de(0x1a4)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x422ae0['CfwCX']),_0x4f40de(0x1d8))+_0x4f40de(0x1a1),_0x4f40de(0x1c1)));const _0x2a5e45=_0x422ae0[_0x4f40de(0x1ba)](getEnvDir,_0x43a740),_0x15e5ce=_0x422ae0['jDoOC'](existsSync,_0x2a5e45);let _0x4d68a4=_0x5c2ed8,_0xf496d=![];if(!_0x4d68a4)try{_0x4d68a4=await fetchCloudProfile(_0x43a740);if(!_0x4d68a4)_0xf496d=!![];}catch(_0x1db1c7){_0x1db1c7 instanceof ApiError&&_0x422ae0[_0x4f40de(0x1cb)](_0x1db1c7['status'],0x194)&&(_0xf496d=!![]);}if(_0x980f82&&_0xf496d&&!_0x15e5ce&&!_0x4d68a4)throw new Error(_0x422ae0['iTDqo'](_0x4f40de(0x19e)+_0x980f82+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x422ae0[_0x4f40de(0x19f)],_0x422ae0[_0x4f40de(0x1a6)]));if(_0x4d68a4&&_0x15e5ce){let _0x3eac9a=!![];if(_0x422ae0['Qptvu'](isInteractive)){const {source:_0x5ea5f3}=await _0x4ab907[_0x4f40de(0x1c2)]([{'type':'list','name':_0x4f40de(0x1df),'message':'Profile\x20\x22'+_0x43a740+_0x4f40de(0x1cd),'choices':[{'name':_0x4f40de(0x1b9),'value':_0x422ae0['PNpPv']},{'name':'Local\x20profile','value':'local'}],'default':_0x4f40de(0x1ad)}]);_0x3eac9a=_0x5ea5f3===_0x422ae0[_0x4f40de(0x1a7)];}if(!_0x3eac9a)_0x4d68a4=null;}const _0x1513d5=_0x422ae0[_0x4f40de(0x1bc)](readProfileOverrides,process[_0x4f40de(0x1cf)](),_0x43a740);let _0x2bfbb9=null,_0x31be93,_0x1c659a,_0x4a1bd1,_0x1d9717,_0x24f551=null,_0x35d80f,_0x1a6c20;const _0x3eac72=_0x422ae0[_0x4f40de(0x1aa)](expandOverrides,_0x1513d5),_0x388326=readUrlEnvVars();if(_0x4d68a4){_0x2bfbb9=_0x4d68a4;const _0x49163b=_0x4d68a4[_0x4f40de(0x1d1)]??{},_0x3e071e=mergeCloudProfileSettings(_0x49163b,_0x1513d5??undefined),_0x3d5858={..._0x4d68a4,'settings':_0x3e071e};_0x24f551={'baseUrl':expandString(_0x49163b['baseUrl']),'startPath':_0x422ae0[_0x4f40de(0x1cc)](expandString,_0x49163b[_0x4f40de(0x1a0)])};const _0x2db4ea=await fetchAuthConfig(),_0x5bca73=_0x2db4ea?_0x422ae0['GGFor'](resolveAuthEnvironmentLocally,_0x2db4ea,_0x4d68a4['environmentKey']):null;_0x35d80f=_0x5bca73?.[_0x4f40de(0x1d4)]?.[0x0],_0x1a6c20=_0x5bca73?.[_0x4f40de(0x1bd)];const _0x52897e=resolveProfileUrl({'flagBaseUrl':_0x426074['baseUrl'],'flagStartPath':_0x426074['startPath'],'envBaseUrl':_0x388326['envBaseUrl'],'envStartPath':_0x388326['envStartPath'],'projectOverrides':_0x3eac72,'cloudSettings':_0x24f551,'authEnvironmentDomain':_0x35d80f}),_0x1cc8af=process['env'][_0x4f40de(0x1da)];if(_0x1cc8af){if(!_0x422ae0[_0x4f40de(0x1be)](existsSync,_0x1cc8af))throw new Error(_0x4f40de(0x1c0)+_0x1cc8af+'\x20does\x20not\x20exist.');_0x31be93=_0x1cc8af,_0x1c659a=_0x422ae0['juSgp'](resolveEnvVars,_0x3e071e),_0x4a1bd1=Boolean(_0x1c659a[_0x4f40de(0x1bf)]);}else{const _0x204b42=await _0x422ae0['UBBVP'](resolveCloudProfileSession,_0x3d5858,{'effectiveBaseUrl':_0x52897e['baseUrl'],'telemetry':_0x426074[_0x4f40de(0x1b3)],'assertedEnv':_0x426074['authEnv']});_0x31be93=_0x204b42[_0x4f40de(0x19d)],_0x1c659a=resolveEnvVars(_0x204b42['settings']),_0x4a1bd1=Boolean(_0x1c659a[_0x4f40de(0x1bf)]),_0x35d80f=_0x204b42[_0x4f40de(0x1dd)]?.['domains']?.[0x0],_0x1a6c20=_0x204b42[_0x4f40de(0x1dd)]?.['key'];}}else{if(!_0x15e5ce){const _0xae8850=!_0x980f82;throw new Error(_0xae8850?_0x422ae0[_0x4f40de(0x1c7)](_0x422ae0[_0x4f40de(0x1c5)](_0x422ae0['rpmxM']('Active\x20profile\x20\x22'+_0x43a740+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'),_0x422ae0['sVWci']),'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x43a740+'`\x20to\x20recreate\x20it.'):_0x4f40de(0x19e)+_0x43a740+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x43a740);}const _0x36a5c8=await loadSettings(_0x43a740);_0x1c659a=resolveEnvVars(_0x36a5c8),_0x4a1bd1=Boolean(_0x1c659a['cdpEndpoint']),_0x1d9717=_0x1c659a['baseUrl'];}const _0x48b03c=_0x422ae0['qONvP'](resolveProfileUrl,{'flagBaseUrl':_0x426074['baseUrl'],'flagStartPath':_0x426074['startPath'],'envBaseUrl':_0x388326[_0x4f40de(0x1b7)],'envStartPath':_0x388326['envStartPath'],'localSettingsBaseUrl':_0x1d9717,'projectOverrides':_0x3eac72,'cloudSettings':_0x24f551,'authEnvironmentDomain':_0x35d80f}),_0x10daa7=_0x48b03c['url']??_0x48b03c[_0x4f40de(0x1ac)];if(_0x422ae0['WGIrh'](!_0x10daa7,!_0x4a1bd1))throw new Error(_0x4f40de(0x1a8)+_0x43a740+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x43a740+'\x20baseUrl\x20<url>');return{'activeProfile':_0x43a740,'resolvedCloudProfile':_0x2bfbb9,'cloudAuthPath':_0x31be93,'resolvedSettings':_0x1c659a,'isCdpMode':_0x4a1bd1,'url':_0x10daa7,'baseUrlSource':_0x48b03c[_0x4f40de(0x1e1)],'authEnvKey':_0x1a6c20,'startPath':_0x48b03c[_0x4f40de(0x1a0)]};}function expandString(_0xa5bfc9){const _0x1aebaa=_0x2f2a,_0x3b8868={'RZLCu':function(_0x5a053e,_0xc38008){return _0x5a053e!==_0xc38008;},'UZlsK':_0x1aebaa(0x1c6)};if(_0x3b8868['RZLCu'](typeof _0xa5bfc9,_0x3b8868['UZlsK']))return _0xa5bfc9;return resolveEnvVars(_0xa5bfc9);}function expandOverrides(_0x2e8ef5){const _0x1228b1=_0x2f2a,_0x486cc7={'pmuza':'string','xXtPa':function(_0x52b9e3,_0x11be15){return _0x52b9e3(_0x11be15);}};if(!_0x2e8ef5)return _0x2e8ef5;const _0xb57b76={..._0x2e8ef5};return typeof _0xb57b76[_0x1228b1(0x1ac)]===_0x486cc7['pmuza']&&(_0xb57b76[_0x1228b1(0x1ac)]=_0x486cc7[_0x1228b1(0x1ab)](resolveEnvVars,_0xb57b76[_0x1228b1(0x1ac)])),typeof _0xb57b76[_0x1228b1(0x1a0)]==='string'&&(_0xb57b76[_0x1228b1(0x1a0)]=resolveEnvVars(_0xb57b76['startPath'])),_0xb57b76;}function _0x3573(){const _0x40731b=['RANGER_SESSION_STATE_PATH=','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','prompt','2169210qHJJUE','NuDYR','kMVni','string','ZAkCR','ugtpa','68106QXHbRO','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','QlxFX','jtelQ','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','cwd','297puLsJc','settings','length','authEnv','domains','log','\x20\x20Warning:\x20','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','message','RANGER_SESSION_STATE_PATH','name','738DiojMd','resolvedEnv','VFXfU','source','24bjwLfW','baseUrlSource','authPath','Profile\x20\x22','rRkIh','startPath','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','25ijXing','\x20\x20Note:\x20--env\x20\x22','oEjkT','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','Idguy','PNpPv','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','4363163pdPJte','TTNMA','xXtPa','baseUrl','cloud','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','dmVbD','4720690AAVbIb','16404sJKHZk','UCBzK','telemetry','197336McPYXL','env','12IPTNXb','envBaseUrl','profile','Cloud\x20profile\x20(recommended)','qONvP','5035085zvsmNk','bdexJ','key','juSgp','cdpEndpoint'];_0x3573=function(){return _0x40731b;};return _0x3573();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x2968f3=_0x59a9;(function(_0x24165e,_0x46e1c1){const _0x1c46ee=_0x59a9,_0x5b6240=_0x24165e();while(!![]){try{const _0x5498b2=-parseInt(_0x1c46ee(0xb2))/0x1*(-parseInt(_0x1c46ee(0xcb))/0x2)+parseInt(_0x1c46ee(0xc7))/0x3*(-parseInt(_0x1c46ee(0xbe))/0x4)+-parseInt(_0x1c46ee(0xc2))/0x5*(parseInt(_0x1c46ee(0xc0))/0x6)+-parseInt(_0x1c46ee(0xb7))/0x7+parseInt(_0x1c46ee(0xb3))/0x8*(parseInt(_0x1c46ee(0xb1))/0x9)+-parseInt(_0x1c46ee(0xd0))/0xa*(-parseInt(_0x1c46ee(0xc6))/0xb)+parseInt(_0x1c46ee(0xb0))/0xc;if(_0x5498b2===_0x46e1c1)break;else _0x5b6240['push'](_0x5b6240['shift']());}catch(_0x1d0bac){_0x5b6240['push'](_0x5b6240['shift']());}}}(_0x4a45,0x199ad));function firstDefined(..._0x49deee){const _0xf4a680=_0x59a9,_0xc96510={'ItVcJ':function(_0x387277,_0x606776){return _0x387277!==_0x606776;},'UzjBM':function(_0x4a6d4f,_0x9b0456){return _0x4a6d4f!==_0x9b0456;}};for(const _0x5bbcba of _0x49deee){if(_0xc96510[_0xf4a680(0xce)](_0x5bbcba,undefined)&&_0x5bbcba!==null&&_0xc96510['UzjBM'](_0x5bbcba,''))return _0x5bbcba;}return undefined;}function normalizeAuthEnvironmentDomain(_0x44fdb3){const _0x5224e0=_0x59a9;if(!_0x44fdb3)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x44fdb3))return _0x44fdb3;return _0x5224e0(0xc8)+_0x44fdb3;}export function resolveBaseUrlWithSource(_0x310bd4){const _0x4337b1=_0x59a9,_0xde18ea={'YYXtH':_0x4337b1(0xbb),'hCSdI':'--base-url','MkizV':'RANGER_BASE_URL','sYeHs':function(_0x74d177,_0x3adcc0){return _0x74d177===_0x3adcc0;},'mSVoK':_0x4337b1(0xc5),'rzHqe':function(_0x59e999,_0x3e1053){return _0x59e999(_0x3e1053);},'ksysi':_0x4337b1(0xca),'yrQpl':function(_0x33af34,_0xf8450e){return _0x33af34!==_0xf8450e;}},_0x4abe3f=_0x310bd4['projectOverrides'],_0x2fed95=!!_0x4abe3f&&_0xde18ea['YYXtH']in _0x4abe3f,_0x5c9155=_0x4abe3f?.['baseUrl'],_0x229714=!(_0x2fed95&&_0x5c9155===null),_0x35515d=[[_0x310bd4[_0x4337b1(0xc1)],_0xde18ea['hCSdI']],[_0x310bd4['envBaseUrl'],_0xde18ea['MkizV']],[_0x310bd4[_0x4337b1(0xc9)],_0x4337b1(0xb8)],[_0xde18ea['sYeHs'](typeof _0x5c9155,_0xde18ea['mSVoK'])?_0x5c9155:undefined,_0x4337b1(0xb9)],[_0x229714?_0x310bd4['cloudSettings']?.['baseUrl']:undefined,'cloud\x20profile\x20settings'],[_0x229714?_0xde18ea[_0x4337b1(0xcc)](normalizeAuthEnvironmentDomain,_0x310bd4['authEnvironmentDomain']):undefined,_0xde18ea[_0x4337b1(0xaf)]]];for(const [_0xa85903,_0x35b870]of _0x35515d){if(_0xde18ea['yrQpl'](_0xa85903,undefined)&&_0xde18ea[_0x4337b1(0xbc)](_0xa85903,null)&&_0xa85903!=='')return{'baseUrl':_0xa85903,'source':_0x35b870};}return{};}export function resolveBaseUrl(_0x5d0cef){const _0x35fbd9=_0x59a9,_0xde22b9={'mpDRw':function(_0x295ced,_0x5d271b){return _0x295ced(_0x5d271b);}};return _0xde22b9[_0x35fbd9(0xcf)](resolveBaseUrlWithSource,_0x5d0cef)['baseUrl'];}export function resolveStartPath(_0x27d6e8){const _0x29ac79=_0x59a9,_0x1eca6c={'yoDTi':function(_0x257c18,_0x73642e){return _0x257c18===_0x73642e;}},_0x87d3c0=_0x27d6e8['projectOverrides'],_0x4d4a4f=!!_0x87d3c0&&_0x29ac79(0xbd)in _0x87d3c0,_0x295420=_0x87d3c0?.['startPath'],_0x13d0a0=!(_0x4d4a4f&&_0x295420===null);return firstDefined(_0x27d6e8['flagStartPath'],_0x27d6e8[_0x29ac79(0xc3)],_0x1eca6c[_0x29ac79(0xb4)](typeof _0x295420,_0x29ac79(0xc5))?_0x295420:undefined,_0x13d0a0?_0x27d6e8[_0x29ac79(0xbf)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x17781c,_0x1a57ad){const _0x5a614e=_0x59a9,_0x2e555d={'rbbuF':function(_0x4a4126,_0x67cd48){return _0x4a4126+_0x67cd48;}};if(!_0x17781c)return undefined;if(!_0x1a57ad)return _0x17781c;const _0x57e96b=_0x17781c[_0x5a614e(0xb6)]('/')?_0x17781c[_0x5a614e(0xb5)](0x0,-0x1):_0x17781c,_0x474fb9=_0x1a57ad['startsWith']('/')?_0x1a57ad:_0x2e555d[_0x5a614e(0xcd)]('/',_0x1a57ad);return _0x57e96b+_0x474fb9;}function _0x59a9(_0x30f864,_0x115bf6){_0x30f864=_0x30f864-0xaf;const _0x4a4530=_0x4a45();let _0x59a9b9=_0x4a4530[_0x30f864];return _0x59a9b9;}function _0x4a45(){const _0x439f18=['local\x20profile\x20settings','projects.json\x20override','env','baseUrl','yrQpl','startPath','12BWQipY','cloudSettings','6CvNfYe','flagBaseUrl','1046315jnmrLT','envStartPath','hJGlE','string','1924285xVsfmQ','46737qRiAnh','https://','localSettingsBaseUrl','auth\x20environment\x20domain','2yZXXfr','rzHqe','rbbuF','ItVcJ','mpDRw','10kycmNs','ksysi','547260gXoFhm','198uuCsGl','52699JiCTgU','40472txuoie','yoDTi','slice','endsWith','165620jITPMf'];_0x4a45=function(){return _0x439f18;};return _0x4a45();}export function resolveProfileUrl(_0x273ee9){const _0xf72de1=_0x59a9,_0x26d638={'hJGlE':function(_0x46e337,_0x2ad878){return _0x46e337(_0x2ad878);}},{baseUrl:_0x5b7c26,source:_0x3a29be}=resolveBaseUrlWithSource(_0x273ee9),_0x45c0d6=_0x26d638[_0xf72de1(0xc4)](resolveStartPath,_0x273ee9);return{'baseUrl':_0x5b7c26,'baseUrlSource':_0x3a29be,'startPath':_0x45c0d6,'url':joinBaseAndPath(_0x5b7c26,_0x45c0d6)};}export function readUrlEnvVars(_0x52f92f=process[_0x2968f3(0xba)]){return{'envBaseUrl':_0x52f92f['RANGER_BASE_URL'],'envStartPath':_0x52f92f['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53ad00,_0x508fe8){const _0x67621b=_0x42f8,_0x241699=_0x53ad00();while(!![]){try{const _0x916fb=-parseInt(_0x67621b(0x162))/0x1*(parseInt(_0x67621b(0x163))/0x2)+parseInt(_0x67621b(0x16b))/0x3+-parseInt(_0x67621b(0x169))/0x4+-parseInt(_0x67621b(0x166))/0x5+-parseInt(_0x67621b(0x16a))/0x6+-parseInt(_0x67621b(0x16c))/0x7+-parseInt(_0x67621b(0x167))/0x8*(-parseInt(_0x67621b(0x164))/0x9);if(_0x916fb===_0x508fe8)break;else _0x241699['push'](_0x241699['shift']());}catch(_0x3982cc){_0x241699['push'](_0x241699['shift']());}}}(_0x2452,0x192a6));function _0x42f8(_0x4a9e7d,_0x3ae45b){_0x4a9e7d=_0x4a9e7d-0x15f;const _0x245284=_0x2452();let _0x42f86a=_0x245284[_0x4a9e7d];return _0x42f86a;}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x2452(){const _0x3964a4=['27wqBdtQ','xAIAV','101595nLoJcH','483832UGxyKW','maxRetries','619084aJSGGD','26028MJUxtP','320412XqDCgp','13510eaJaVm','kNrsr','label','\x20failed\x20(attempt\x20','error','tVyin','pow','3805QeFfEd','2uXxWeS'];_0x2452=function(){return _0x3964a4;};return _0x2452();}export async function withRetry(_0x4e15cc,_0x5f3584){const _0x51bef1=_0x42f8,_0x15efde={'xAIAV':function(_0x59b536){return _0x59b536();},'kNrsr':function(_0x18972f,_0x4ac76e){return _0x18972f instanceof _0x4ac76e;},'mGiOo':function(_0x32f681,_0x165643){return _0x32f681<_0x165643;},'tVyin':function(_0x210eb2,_0xbd2b80){return _0x210eb2*_0xbd2b80;},'PwcIq':function(_0x27481c,_0x240d46){return _0x27481c+_0x240d46;}},_0x5bf066=_0x5f3584?.[_0x51bef1(0x168)]??DEFAULT_MAX_RETRIES,_0x585efb=_0x5f3584?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x356ca1;for(let _0x331e5f=0x0;_0x331e5f<=_0x5bf066;_0x331e5f++){try{return await _0x15efde[_0x51bef1(0x165)](_0x4e15cc);}catch(_0x2e263b){_0x356ca1=_0x15efde[_0x51bef1(0x16d)](_0x2e263b,Error)?_0x2e263b:new Error(String(_0x2e263b));if(_0x15efde['mGiOo'](_0x331e5f,_0x5bf066)){const _0x4c2012=_0x15efde[_0x51bef1(0x160)](_0x585efb,Math[_0x51bef1(0x161)](0x2,_0x331e5f));_0x5f3584?.['label']&&console[_0x51bef1(0x15f)](_0x5f3584[_0x51bef1(0x16e)]+_0x51bef1(0x16f)+(_0x331e5f+0x1)+'/'+_0x15efde['PwcIq'](_0x5bf066,0x1)+'),\x20retrying\x20in\x20'+_0x4c2012+'ms...'),await new Promise(_0x3174c3=>setTimeout(_0x3174c3,_0x4c2012));}}}throw _0x356ca1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d1056,_0x2328a8){const _0x3b3baf=_0x54c2,_0x364ae8=_0x2d1056();while(!![]){try{const _0x1fcab6=-parseInt(_0x3b3baf(0x125))/0x1*(-parseInt(_0x3b3baf(0x123))/0x2)+parseInt(_0x3b3baf(0x129))/0x3+parseInt(_0x3b3baf(0x12e))/0x4*(parseInt(_0x3b3baf(0x12b))/0x5)+parseInt(_0x3b3baf(0x121))/0x6*(parseInt(_0x3b3baf(0x12d))/0x7)+parseInt(_0x3b3baf(0x122))/0x8*(-parseInt(_0x3b3baf(0x12c))/0x9)+-parseInt(_0x3b3baf(0x124))/0xa+-parseInt(_0x3b3baf(0x128))/0xb*(parseInt(_0x3b3baf(0x12a))/0xc);if(_0x1fcab6===_0x2328a8)break;else _0x364ae8['push'](_0x364ae8['shift']());}catch(_0x29559d){_0x364ae8['push'](_0x364ae8['shift']());}}}(_0x234b,0x7371b));function _0x234b(){const _0x1de4fd=['1619057QpsEPl','1607451zecpew','60xjdcXE','9050DewKYC','2263383cfbEKG','21ytwRbO','740eyUewv','origin','1216746PnSScU','16XfroTy','12202pTRBNj','4932910vphyFA','119sNTqBA','add','matchAll'];_0x234b=function(){return _0x1de4fd;};return _0x234b();}function _0x54c2(_0x18da8b,_0x319283){_0x18da8b=_0x18da8b-0x121;const _0x234b3b=_0x234b();let _0x54c2f7=_0x234b3b[_0x18da8b];return _0x54c2f7;}const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x5223cf){const _0x3ad47f=_0x54c2,_0x1cc68e=new Set();for(const _0x346e36 of _0x5223cf[_0x3ad47f(0x127)](ABSOLUTE_URL_PATTERN)){const _0x240118=_0x346e36[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x1cc68e[_0x3ad47f(0x126)](new URL(_0x240118)[_0x3ad47f(0x12f)]);}catch{}}return[..._0x1cc68e];}export function findScenarioOriginMismatches(_0x5ded3a,_0x5ddcb1){const _0x52ad4b=_0x54c2;let _0x12c6d4;try{_0x12c6d4=new URL(_0x5ddcb1)[_0x52ad4b(0x12f)];}catch{return[];}return extractUrlOrigins(_0x5ded3a)['filter'](_0x4ec489=>_0x4ec489!==_0x12c6d4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x43e164=_0x303e;(function(_0x4ff1a9,_0x3c9400){const _0x8f43c7=_0x303e,_0x28e713=_0x4ff1a9();while(!![]){try{const _0xfb866e=-parseInt(_0x8f43c7(0x173))/0x1*(-parseInt(_0x8f43c7(0x146))/0x2)+-parseInt(_0x8f43c7(0x176))/0x3*(-parseInt(_0x8f43c7(0x164))/0x4)+-parseInt(_0x8f43c7(0x167))/0x5+parseInt(_0x8f43c7(0x15f))/0x6+-parseInt(_0x8f43c7(0x168))/0x7+-parseInt(_0x8f43c7(0x16f))/0x8+parseInt(_0x8f43c7(0x15a))/0x9;if(_0xfb866e===_0x3c9400)break;else _0x28e713['push'](_0x28e713['shift']());}catch(_0x38a58c){_0x28e713['push'](_0x28e713['shift']());}}}(_0x520a,0xea9e0));import*as _0x4fe0ff from'fs';function _0x520a(){const _0x2835ef=['prompted','99729ffouwS','toISOString','8xCLwyJ','iMzIA','writeFileSync','featureId','CyVzC','qugVQ','dShUH','homedir','YveKY','StVdK','lastStopReminderAt','clear','kMXOu','dhVIR','mkdirSync','fdDOT','SEWRp','IxoDT','now','enabled','6515388lxfjHE','master','nObmV','HEAD','TrMZh','5347278ZLAxVJ','HtPtp','lastPlanReminderAt','stringify','existsSync','52ikfegb','main','VsZQy','4998370IebdMQ','1599080IFvfaq','branches','uvUHr','currentBranch','SfKIw','KxlWT','DqTyG','667952yWJeYH','sessions','CSTJG','registeredAt','56324iXoNOh','rPflq'];_0x520a=function(){return _0x2835ef;};return _0x520a();}import*as _0x235dec from'path';import*as _0x2919f0 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x235dec['join'](_0x2919f0[_0x43e164(0x14d)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x5541cd=_0x43e164,_0x21a6fd={'SEWRp':'utf-8'};try{if(_0x4fe0ff[_0x5541cd(0x163)](CACHE_FILE)){const _0x5829d1=JSON['parse'](_0x4fe0ff['readFileSync'](CACHE_FILE,_0x21a6fd[_0x5541cd(0x156)]));return{'version':0x3,'sessions':_0x5829d1['sessions']||{},'branches':_0x5829d1['branches']||{},'lastEnabledSessionClearedAt':_0x5829d1['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x2d39df){const _0xb21d4=_0x43e164;try{const _0x3366c1=_0x235dec['dirname'](CACHE_FILE);!_0x4fe0ff[_0xb21d4(0x163)](_0x3366c1)&&_0x4fe0ff[_0xb21d4(0x154)](_0x3366c1,{'recursive':!![]}),_0x4fe0ff[_0xb21d4(0x148)](CACHE_FILE,JSON[_0xb21d4(0x162)](_0x2d39df,null,0x2));}catch{}}export function getCurrentBranch(){const _0x2494e2=_0x43e164,_0x437553={'IxoDT':function(_0x2ac004,_0x556910,_0x1f6060){return _0x2ac004(_0x556910,_0x1f6060);},'SfKIw':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','VsZQy':'utf-8','EPKaq':'pipe'};try{const _0x68e3c=_0x437553[_0x2494e2(0x157)](execSync,_0x437553[_0x2494e2(0x16c)],{'encoding':_0x437553[_0x2494e2(0x166)],'stdio':[_0x437553['EPKaq'],'pipe','pipe']})['trim']();if(!_0x68e3c||_0x68e3c===_0x2494e2(0x15d))return null;return _0x68e3c;}catch{return null;}}export function enableBranch(_0x493c04){const _0x26966b=_0x43e164,_0x74a007={'HtPtp':function(_0xf57c6c){return _0xf57c6c();}},_0x674659=_0x74a007[_0x26966b(0x160)](loadCache);_0x674659['branches'][_0x493c04]=!![],saveCache(_0x674659);}export function disableBranch(_0x541f70){const _0x1b4300=_0x43e164,_0x3d0bba=loadCache();delete _0x3d0bba[_0x1b4300(0x169)][_0x541f70],saveCache(_0x3d0bba);}export function isBranchEnabled(_0x555229){const _0x31a22e=_0x43e164,_0x2d10ef={'TrMZh':function(_0x2cef99){return _0x2cef99();},'HQGae':function(_0x33ea02,_0x5481e8){return _0x33ea02===_0x5481e8;}},_0xb380ae=_0x2d10ef[_0x31a22e(0x15e)](loadCache);return _0x2d10ef['HQGae'](_0xb380ae[_0x31a22e(0x169)][_0x555229],!![]);}function getOrCreateSession(_0x2eb182,_0x352ad8){const _0x5edaa=_0x43e164;return!_0x2eb182[_0x5edaa(0x170)][_0x352ad8]&&(_0x2eb182[_0x5edaa(0x170)][_0x352ad8]={}),_0x2eb182[_0x5edaa(0x170)][_0x352ad8];}export function enableSession(_0x464fdf){const _0x1d4492=_0x43e164,_0x20605c={'CyVzC':function(_0x39a643){return _0x39a643();},'NWnrk':function(_0x58c46d,_0x5e8517){return _0x58c46d!==_0x5e8517;},'ktwXv':'main','zdbqs':_0x1d4492(0x15b)},_0x5af54e=_0x20605c[_0x1d4492(0x14a)](loadCache),_0x3e914f=getOrCreateSession(_0x5af54e,_0x464fdf);_0x3e914f[_0x1d4492(0x159)]=!![];const _0x28c909=_0x20605c[_0x1d4492(0x14a)](getCurrentBranch);_0x28c909&&_0x20605c['NWnrk'](_0x28c909,_0x20605c['ktwXv'])&&_0x28c909!==_0x20605c['zdbqs']&&(_0x5af54e[_0x1d4492(0x169)][_0x28c909]=!![],_0x3e914f[_0x1d4492(0x16b)]=_0x28c909),saveCache(_0x5af54e);}export function isSessionEnabled(_0x2a23aa){const _0x42eda9=_0x43e164,_0x5f3f30={'BzefS':function(_0x41ee0b){return _0x41ee0b();},'StVdK':function(_0x4a8ab2,_0x51fb45){return _0x4a8ab2===_0x51fb45;},'dSmZG':'main','KxlWT':_0x42eda9(0x15b),'YveKY':function(_0x5cc75c,_0x1570d3){return _0x5cc75c||_0x1570d3;}},_0x21ae89=loadCache(),_0x2200b5=_0x5f3f30['BzefS'](getCurrentBranch);if(!_0x2200b5||_0x5f3f30['StVdK'](_0x2200b5,_0x5f3f30['dSmZG'])||_0x2200b5===_0x5f3f30[_0x42eda9(0x16d)])return _0x21ae89[_0x42eda9(0x170)][_0x2a23aa]?.['enabled']===!![];const _0x3b45f4=_0x5f3f30[_0x42eda9(0x14f)](_0x21ae89['branches'][_0x2200b5],!![]),_0x130d59=_0x21ae89[_0x42eda9(0x170)][_0x2a23aa]?.[_0x42eda9(0x159)]===!![];return _0x5f3f30[_0x42eda9(0x14e)](_0x3b45f4,_0x130d59);}export function disableSession(_0x38a2f0){const _0x565ea5={'ALqGE':function(_0x22695a){return _0x22695a();}},_0x29af2e=_0x565ea5['ALqGE'](loadCache),_0x41f968=getOrCreateSession(_0x29af2e,_0x38a2f0);_0x41f968['enabled']=![],saveCache(_0x29af2e);}export function updateBranchTracking(_0x3899cc){const _0x2b6d24=_0x43e164,_0x319402={'uNMyH':function(_0x8b423b){return _0x8b423b();},'Wejdi':function(_0x5cf2b2,_0x3b8a4b){return _0x5cf2b2===_0x3b8a4b;},'HZMuM':'master','dhVIR':function(_0xbeaaba,_0x11669d){return _0xbeaaba(_0x11669d);}},_0x128506=_0x319402['uNMyH'](loadCache),_0x366dae=_0x128506['sessions'][_0x3899cc];if(!_0x366dae?.['enabled'])return;const _0x21b314=getCurrentBranch();if(!_0x21b314||_0x319402['Wejdi'](_0x21b314,_0x2b6d24(0x165))||_0x21b314===_0x319402['HZMuM'])return;_0x366dae[_0x2b6d24(0x16b)]!==_0x21b314&&(_0x128506['branches'][_0x21b314]=!![],_0x366dae['currentBranch']=_0x21b314,_0x319402[_0x2b6d24(0x153)](saveCache,_0x128506));}export function initBranchTracking(_0x3f95b1){const _0x3b76b8=_0x43e164,_0x48de32={'UdpBo':function(_0x747c95){return _0x747c95();},'kMXOu':'main','CSTJG':function(_0x1bf18a,_0x3c5989){return _0x1bf18a===_0x3c5989;},'iMzIA':_0x3b76b8(0x15b),'GHbdo':function(_0x456923,_0x423ce9){return _0x456923(_0x423ce9);}},_0x1a8075=_0x48de32['UdpBo'](loadCache),_0x2b9a8a=getCurrentBranch();if(!_0x2b9a8a||_0x2b9a8a===_0x48de32[_0x3b76b8(0x152)]||_0x48de32[_0x3b76b8(0x171)](_0x2b9a8a,_0x48de32[_0x3b76b8(0x147)]))return;if(_0x1a8075['branches'][_0x2b9a8a]===!![]){const _0x2b1fc7=getOrCreateSession(_0x1a8075,_0x3f95b1);_0x2b1fc7[_0x3b76b8(0x159)]=!![],_0x2b1fc7['currentBranch']=_0x2b9a8a,_0x48de32['GHbdo'](saveCache,_0x1a8075);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5cad6e){const _0x35160b=_0x43e164,_0x29c9f4=loadCache(),_0x315aa1=_0x29c9f4[_0x35160b(0x170)][_0x5cad6e];_0x315aa1?.['enabled']&&(_0x29c9f4['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x29c9f4));}export function shouldAutoEnableAfterClear(_0x4d3af5){const _0x260e4f=_0x43e164,_0x9a7500={'DhHcW':function(_0x3c1297){return _0x3c1297();},'qugVQ':function(_0x270f79,_0x221e8d){return _0x270f79-_0x221e8d;},'nObmV':function(_0x2f6e20,_0x839f8a){return _0x2f6e20<=_0x839f8a;}};if(_0x4d3af5!==_0x260e4f(0x151))return![];const _0x71a379=_0x9a7500['DhHcW'](loadCache),_0x45be31=_0x71a379['lastEnabledSessionClearedAt'];if(!_0x45be31)return![];const _0x32cffc=_0x9a7500[_0x260e4f(0x14b)](Date['now'](),_0x45be31);return _0x9a7500[_0x260e4f(0x15c)](_0x32cffc,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x31315c){const _0x9da7e=_0x43e164,_0x1295b2={'dShUH':function(_0x94cb5e,_0x1e60dc,_0x2ebb58){return _0x94cb5e(_0x1e60dc,_0x2ebb58);},'gwoGP':function(_0x2ab456,_0x1fac22){return _0x2ab456!==_0x1fac22;},'fdDOT':function(_0x8a686d,_0x1cbda4){return _0x8a686d!==_0x1cbda4;}},_0x3bdf56=loadCache(),_0xa01579=_0x1295b2[_0x9da7e(0x14c)](getOrCreateSession,_0x3bdf56,_0x31315c);_0xa01579[_0x9da7e(0x159)]=!![];const _0x47250e=getCurrentBranch();_0x47250e&&_0x1295b2['gwoGP'](_0x47250e,_0x9da7e(0x165))&&_0x1295b2[_0x9da7e(0x155)](_0x47250e,_0x9da7e(0x15b))&&(_0xa01579[_0x9da7e(0x16b)]=_0x47250e),delete _0x3bdf56['lastEnabledSessionClearedAt'],saveCache(_0x3bdf56);}export function registerSession(_0x553026,_0x2bef30){const _0x3180f3=_0x43e164,_0x45d239={'uvUHr':function(_0x23e1bc){return _0x23e1bc();}},_0x5b8c70=_0x45d239[_0x3180f3(0x16a)](loadCache),_0x300ad6=getOrCreateSession(_0x5b8c70,_0x553026);_0x300ad6[_0x3180f3(0x149)]=_0x2bef30,_0x300ad6['registeredAt']=new Date()[_0x3180f3(0x145)](),saveCache(_0x5b8c70);}export function getSessionEntry(_0x36e777){const _0x1d0ffe=_0x43e164,_0x6ec80b=loadCache(),_0x3ed321=_0x6ec80b[_0x1d0ffe(0x170)][_0x36e777];if(_0x3ed321?.['featureId']&&_0x3ed321?.['registeredAt'])return{'featureId':_0x3ed321[_0x1d0ffe(0x149)],'registeredAt':_0x3ed321[_0x1d0ffe(0x172)]};return null;}export function unregisterSession(_0x2fbf49){const _0x2bd1dd=_0x43e164,_0x8a05c0={'DqTyG':function(_0x368a13){return _0x368a13();}},_0x465364=_0x8a05c0[_0x2bd1dd(0x16e)](loadCache),_0xad0993=_0x465364[_0x2bd1dd(0x170)][_0x2fbf49];_0xad0993&&(delete _0xad0993['featureId'],delete _0xad0993[_0x2bd1dd(0x172)],saveCache(_0x465364));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x43b8cc){const _0x290123=_0x43e164,_0x40c9c0={'rPflq':function(_0x334c77,_0xf42efb){return _0x334c77>=_0xf42efb;},'Vbmzn':function(_0x3602bd,_0x1fc08f){return _0x3602bd-_0x1fc08f;}},_0x44aa41=loadCache(),_0x19883f=getOrCreateSession(_0x44aa41,_0x43b8cc),_0x2e419e=_0x19883f['lastPlanReminderAt']||0x0,_0x453e3e=Date['now']();if(_0x40c9c0[_0x290123(0x174)](_0x40c9c0['Vbmzn'](_0x453e3e,_0x2e419e),PLAN_REMINDER_INTERVAL_MS))return _0x19883f[_0x290123(0x161)]=_0x453e3e,saveCache(_0x44aa41),!![];return![];}function _0x303e(_0x257b9f,_0x1a9ce2){_0x257b9f=_0x257b9f-0x145;const _0x520ab7=_0x520a();let _0x303e5f=_0x520ab7[_0x257b9f];return _0x303e5f;}export function shouldShowStopReminder(_0x260bd0){const _0x4fc7bf=_0x43e164,_0x40d218={'WwCMI':function(_0x191ec5,_0x158731){return _0x191ec5>=_0x158731;},'wjRNJ':function(_0x3ab63e,_0xf3532b){return _0x3ab63e-_0xf3532b;}},_0x3b0212=loadCache(),_0x597c47=getOrCreateSession(_0x3b0212,_0x260bd0),_0x48fbd1=_0x597c47[_0x4fc7bf(0x150)]||0x0,_0x328429=Date[_0x4fc7bf(0x158)]();if(_0x40d218['WwCMI'](_0x40d218['wjRNJ'](_0x328429,_0x48fbd1),STOP_REMINDER_INTERVAL_MS))return _0x597c47[_0x4fc7bf(0x150)]=_0x328429,saveCache(_0x3b0212),!![];return![];}export function hasSessionBeenPrompted(_0x3eeec4){const _0xad4b7f=_0x43e164,_0x4fd445=loadCache();return _0x4fd445[_0xad4b7f(0x170)][_0x3eeec4]?.[_0xad4b7f(0x175)]===!![];}export function markSessionPrompted(_0x53bbf2){const _0x4012be=_0x43e164,_0x4afa94={'wXGMU':function(_0x3ceeca,_0x349e60,_0x3954b8){return _0x3ceeca(_0x349e60,_0x3954b8);},'cODSe':function(_0x33318f,_0x4d2cbf){return _0x33318f(_0x4d2cbf);}},_0x233f3d=loadCache(),_0x8f2028=_0x4afa94['wXGMU'](getOrCreateSession,_0x233f3d,_0x53bbf2);_0x8f2028[_0x4012be(0x175)]=!![],_0x4afa94['cODSe'](saveCache,_0x233f3d);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x22168b=_0x41f5;(function(_0x2d3902,_0x5a7392){const _0x294bd8=_0x41f5,_0x5d31ee=_0x2d3902();while(!![]){try{const _0x2ec2dc=parseInt(_0x294bd8(0x1a5))/0x1+-parseInt(_0x294bd8(0x19d))/0x2*(parseInt(_0x294bd8(0x18f))/0x3)+parseInt(_0x294bd8(0x1a7))/0x4+parseInt(_0x294bd8(0x1b0))/0x5*(-parseInt(_0x294bd8(0x19b))/0x6)+parseInt(_0x294bd8(0x1aa))/0x7+parseInt(_0x294bd8(0x19e))/0x8+-parseInt(_0x294bd8(0x187))/0x9;if(_0x2ec2dc===_0x5a7392)break;else _0x5d31ee['push'](_0x5d31ee['shift']());}catch(_0x322c42){_0x5d31ee['push'](_0x5d31ee['shift']());}}}(_0x2991,0xe77db));import*as _0x56e161 from'fs';import*as _0x58803e from'path';import*as _0x505bbb from'os';import{execSync}from'child_process';const CACHE_FILE=_0x58803e[_0x22168b(0x18a)](_0x505bbb[_0x22168b(0x18e)](),'.claude',_0x22168b(0x1a3));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0xd70fa9=_0x22168b,_0x4decdc={'OVrvx':'utf-8','QjSnK':function(_0x422a17){return _0x422a17();}};try{if(_0x56e161[_0xd70fa9(0x17f)](CACHE_FILE)){const _0x49ba40=JSON['parse'](_0x56e161['readFileSync'](CACHE_FILE,_0x4decdc[_0xd70fa9(0x18b)]));return{'version':0x3,'sessions':_0x49ba40['sessions']||{},'branches':_0x49ba40['branches']||{},'lastEnabledSessionClearedAt':_0x49ba40['lastEnabledSessionClearedAt']};}}catch{}return _0x4decdc[_0xd70fa9(0x1ac)](createEmptyCache);}function saveCache(_0x479f06){const _0x47304b=_0x22168b;try{const _0x3aa6e4=_0x58803e[_0x47304b(0x185)](CACHE_FILE);!_0x56e161['existsSync'](_0x3aa6e4)&&_0x56e161[_0x47304b(0x17e)](_0x3aa6e4,{'recursive':!![]}),_0x56e161[_0x47304b(0x1ad)](CACHE_FILE,JSON['stringify'](_0x479f06,null,0x2));}catch{}}export function getCurrentBranch(){const _0x9e4b40=_0x22168b,_0x4a3f90={'iEoIe':'utf-8','IdoPB':'pipe'};try{const _0xd88be0=execSync(_0x9e4b40(0x1a0),{'encoding':_0x4a3f90[_0x9e4b40(0x1af)],'stdio':[_0x4a3f90['IdoPB'],'pipe','pipe']})['trim']();if(!_0xd88be0||_0xd88be0===_0x9e4b40(0x188))return null;return _0xd88be0;}catch{return null;}}export function enableBranch(_0xbfbf15){const _0x1ebf28=_0x22168b,_0x24fc56={'Yjxep':function(_0x130cfb,_0xc1f94b){return _0x130cfb(_0xc1f94b);}},_0x5ba449=loadCache();_0x5ba449['branches'][_0xbfbf15]=!![],_0x24fc56[_0x1ebf28(0x197)](saveCache,_0x5ba449);}function _0x2991(){const _0x2afa35=['hEnCk','bXYBp','wEOsw','clear','QvkIt','dirname','pbZOM','1327185dWjXTZ','HEAD','TViEs','join','OVrvx','lastEnabledSessionClearedAt','Dnwjj','homedir','3rlHdLR','now','registeredAt','enabled','currentBranch','prompted','uIckV','featureId','Yjxep','CLttm','jcBdU','xpOHp','90ilFveV','sessions','1339436BLlqXV','6174768PrkeDC','nHOgJ','git\x20rev-parse\x20--abbrev-ref\x20HEAD','lastStopReminderAt','master','.ranger_cache.json','pOddx','700722iaWOkh','lPpsC','3810644lTGNjT','LxZPJ','branches','8304072TzDxRa','ZifRV','QjSnK','writeFileSync','IVoZn','iEoIe','615385vYYAVW','OqlTF','SNnQO','LgaKN','sVrXq','main','mkdirSync','existsSync'];_0x2991=function(){return _0x2afa35;};return _0x2991();}export function disableBranch(_0xbf76bf){const _0x32ea1b=_0x22168b,_0xec5f9f=loadCache();delete _0xec5f9f[_0x32ea1b(0x1a9)][_0xbf76bf],saveCache(_0xec5f9f);}export function isBranchEnabled(_0x2b928b){const _0x15cd0d=_0x22168b,_0x11b431={'OhkEq':function(_0x39a584){return _0x39a584();}},_0x414303=_0x11b431['OhkEq'](loadCache);return _0x414303[_0x15cd0d(0x1a9)][_0x2b928b]===!![];}function getOrCreateSession(_0xa1ffde,_0x5f079a){const _0x5e6c93=_0x22168b;return!_0xa1ffde['sessions'][_0x5f079a]&&(_0xa1ffde[_0x5e6c93(0x19c)][_0x5f079a]={}),_0xa1ffde['sessions'][_0x5f079a];}export function enableSession(_0x383ca3){const _0x2872dc=_0x22168b,_0x2842c7={'LgaKN':function(_0x5f37d3){return _0x5f37d3();},'jRlcR':function(_0x475964,_0x1498e9,_0x52bd6b){return _0x475964(_0x1498e9,_0x52bd6b);},'sVrXq':function(_0x35aab5,_0x147449){return _0x35aab5(_0x147449);}},_0x52fbbf=_0x2842c7[_0x2872dc(0x17b)](loadCache),_0x1edbd2=_0x2842c7['jRlcR'](getOrCreateSession,_0x52fbbf,_0x383ca3);_0x1edbd2[_0x2872dc(0x192)]=!![];const _0x2e42f7=getCurrentBranch();_0x2e42f7&&_0x2e42f7!==_0x2872dc(0x17d)&&_0x2e42f7!=='master'&&(_0x52fbbf[_0x2872dc(0x1a9)][_0x2e42f7]=!![],_0x1edbd2[_0x2872dc(0x193)]=_0x2e42f7),_0x2842c7[_0x2872dc(0x17c)](saveCache,_0x52fbbf);}export function isSessionEnabled(_0x524695){const _0x1ce5a4=_0x22168b,_0x471694={'OqlTF':'main','hEnCk':_0x1ce5a4(0x1a2),'SNnQO':function(_0x481c69,_0x4241b1){return _0x481c69===_0x4241b1;},'iHOoZ':function(_0x2e6af3,_0x5b2dca){return _0x2e6af3===_0x5b2dca;}},_0xe5cd00=loadCache(),_0x47aa9b=getCurrentBranch();if(!_0x47aa9b||_0x47aa9b===_0x471694[_0x1ce5a4(0x1b1)]||_0x47aa9b===_0x471694[_0x1ce5a4(0x180)])return _0x471694['SNnQO'](_0xe5cd00[_0x1ce5a4(0x19c)][_0x524695]?.[_0x1ce5a4(0x192)],!![]);const _0xca57e1=_0x471694[_0x1ce5a4(0x17a)](_0xe5cd00[_0x1ce5a4(0x1a9)][_0x47aa9b],!![]),_0x1ef4d5=_0x471694['iHOoZ'](_0xe5cd00['sessions'][_0x524695]?.['enabled'],!![]);return _0xca57e1||_0x1ef4d5;}export function disableSession(_0x45c629){const _0x53f775=_0x22168b,_0x5919ca={'IVoZn':function(_0x413458,_0x2b2a53,_0x235ab8){return _0x413458(_0x2b2a53,_0x235ab8);},'pOddx':function(_0x5689d3,_0x3cab52){return _0x5689d3(_0x3cab52);}},_0x177876=loadCache(),_0xcc597c=_0x5919ca[_0x53f775(0x1ae)](getOrCreateSession,_0x177876,_0x45c629);_0xcc597c[_0x53f775(0x192)]=![],_0x5919ca[_0x53f775(0x1a4)](saveCache,_0x177876);}export function updateBranchTracking(_0x16a2b7){const _0x5086b6=_0x22168b,_0x33126d={'wxeFZ':function(_0x3a2e17){return _0x3a2e17();},'lPpsC':_0x5086b6(0x17d)},_0x48d833=loadCache(),_0x42b8d8=_0x48d833[_0x5086b6(0x19c)][_0x16a2b7];if(!_0x42b8d8?.[_0x5086b6(0x192)])return;const _0x17039d=_0x33126d['wxeFZ'](getCurrentBranch);if(!_0x17039d||_0x17039d===_0x33126d[_0x5086b6(0x1a6)]||_0x17039d===_0x5086b6(0x1a2))return;_0x42b8d8['currentBranch']!==_0x17039d&&(_0x48d833[_0x5086b6(0x1a9)][_0x17039d]=!![],_0x42b8d8[_0x5086b6(0x193)]=_0x17039d,saveCache(_0x48d833));}export function initBranchTracking(_0x2a45d0){const _0x1dedd8=_0x22168b,_0x5b2bfb={'bXYBp':function(_0x24dd47){return _0x24dd47();},'ZifRV':function(_0x5e30ba,_0x336717){return _0x5e30ba===_0x336717;},'JlQux':_0x1dedd8(0x17d),'DIzBQ':_0x1dedd8(0x1a2),'TViEs':function(_0x2c17e6,_0x30613e){return _0x2c17e6(_0x30613e);}},_0x3a8bd9=_0x5b2bfb[_0x1dedd8(0x181)](loadCache),_0x201be1=getCurrentBranch();if(!_0x201be1||_0x5b2bfb[_0x1dedd8(0x1ab)](_0x201be1,_0x5b2bfb['JlQux'])||_0x201be1===_0x5b2bfb['DIzBQ'])return;if(_0x3a8bd9[_0x1dedd8(0x1a9)][_0x201be1]===!![]){const _0x3b2da2=getOrCreateSession(_0x3a8bd9,_0x2a45d0);_0x3b2da2[_0x1dedd8(0x192)]=!![],_0x3b2da2['currentBranch']=_0x201be1,_0x5b2bfb[_0x1dedd8(0x189)](saveCache,_0x3a8bd9);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x41f5(_0x258f49,_0x473642){_0x258f49=_0x258f49-0x17a;const _0x299147=_0x2991();let _0x41f591=_0x299147[_0x258f49];return _0x41f591;}export function recordEnabledSessionCleared(_0x19d316){const _0x13d08f=_0x22168b,_0x1c9a6f=loadCache(),_0x5356c3=_0x1c9a6f['sessions'][_0x19d316];_0x5356c3?.[_0x13d08f(0x192)]&&(_0x1c9a6f[_0x13d08f(0x18c)]=Date['now'](),saveCache(_0x1c9a6f));}export function shouldAutoEnableAfterClear(_0x3aba1d){const _0x207229=_0x22168b,_0x5d5674={'pbZOM':function(_0x51bdd7){return _0x51bdd7();},'QvkIt':function(_0x161755,_0x580ccb){return _0x161755-_0x580ccb;},'jcBdU':function(_0x4823bc,_0x1fe719){return _0x4823bc<=_0x1fe719;}};if(_0x3aba1d!==_0x207229(0x183))return![];const _0x4822c7=_0x5d5674[_0x207229(0x186)](loadCache),_0x59895e=_0x4822c7['lastEnabledSessionClearedAt'];if(!_0x59895e)return![];const _0x54ba92=_0x5d5674[_0x207229(0x184)](Date[_0x207229(0x190)](),_0x59895e);return _0x5d5674[_0x207229(0x199)](_0x54ba92,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x2372b9){const _0x20a21a=_0x22168b,_0x43cd58={'Dnwjj':function(_0x4d1357){return _0x4d1357();},'nHOgJ':_0x20a21a(0x17d),'LxZPJ':function(_0x384464,_0x41881b){return _0x384464!==_0x41881b;}},_0x220414=_0x43cd58[_0x20a21a(0x18d)](loadCache),_0xc04c86=getOrCreateSession(_0x220414,_0x2372b9);_0xc04c86['enabled']=!![];const _0x465894=getCurrentBranch();_0x465894&&_0x465894!==_0x43cd58[_0x20a21a(0x19f)]&&_0x43cd58[_0x20a21a(0x1a8)](_0x465894,'master')&&(_0xc04c86['currentBranch']=_0x465894),delete _0x220414['lastEnabledSessionClearedAt'],saveCache(_0x220414);}export function registerSession(_0x2d8d53,_0x4ba3fe){const _0x1a3818=_0x22168b,_0xad596f={'CLttm':function(_0x4884be,_0x5c693c,_0xdf4afa){return _0x4884be(_0x5c693c,_0xdf4afa);},'CtPKn':function(_0x2b1b9d,_0x91f1ee){return _0x2b1b9d(_0x91f1ee);}},_0x35b658=loadCache(),_0x8f82d=_0xad596f[_0x1a3818(0x198)](getOrCreateSession,_0x35b658,_0x2d8d53);_0x8f82d['featureId']=_0x4ba3fe,_0x8f82d[_0x1a3818(0x191)]=new Date()['toISOString'](),_0xad596f['CtPKn'](saveCache,_0x35b658);}export function getSessionEntry(_0x315cb1){const _0x15cd62=_0x22168b,_0x41e131=loadCache(),_0x5efe0b=_0x41e131[_0x15cd62(0x19c)][_0x315cb1];if(_0x5efe0b?.[_0x15cd62(0x196)]&&_0x5efe0b?.[_0x15cd62(0x191)])return{'featureId':_0x5efe0b[_0x15cd62(0x196)],'registeredAt':_0x5efe0b['registeredAt']};return null;}export function unregisterSession(_0x14cda7){const _0x521dbe=_0x22168b,_0x14a763=loadCache(),_0x3e1f7e=_0x14a763[_0x521dbe(0x19c)][_0x14cda7];_0x3e1f7e&&(delete _0x3e1f7e['featureId'],delete _0x3e1f7e[_0x521dbe(0x191)],saveCache(_0x14a763));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x492a10){const _0xcd6f12=_0x22168b,_0x2bc9c1={'jBGMF':function(_0x427440,_0x5dbb20){return _0x427440-_0x5dbb20;},'aELlw':function(_0x4878e1,_0x248b30){return _0x4878e1(_0x248b30);}},_0x216b45=loadCache(),_0x14dd04=getOrCreateSession(_0x216b45,_0x492a10),_0x2f5b04=_0x14dd04['lastPlanReminderAt']||0x0,_0x287d10=Date[_0xcd6f12(0x190)]();if(_0x2bc9c1['jBGMF'](_0x287d10,_0x2f5b04)>=PLAN_REMINDER_INTERVAL_MS)return _0x14dd04['lastPlanReminderAt']=_0x287d10,_0x2bc9c1['aELlw'](saveCache,_0x216b45),!![];return![];}export function shouldShowStopReminder(_0x866244){const _0x57af2a=_0x22168b,_0x214dbd={'wEOsw':function(_0x18bafc){return _0x18bafc();},'PEVUz':function(_0x1d72d8,_0xd8c892,_0x260be4){return _0x1d72d8(_0xd8c892,_0x260be4);},'uIckV':function(_0x190995,_0x2a1be6){return _0x190995-_0x2a1be6;},'xpOHp':function(_0x105c61,_0x4e6734){return _0x105c61(_0x4e6734);}},_0x2fa73a=_0x214dbd[_0x57af2a(0x182)](loadCache),_0x50199f=_0x214dbd['PEVUz'](getOrCreateSession,_0x2fa73a,_0x866244),_0x2b7e50=_0x50199f[_0x57af2a(0x1a1)]||0x0,_0x586ea5=Date[_0x57af2a(0x190)]();if(_0x214dbd[_0x57af2a(0x195)](_0x586ea5,_0x2b7e50)>=STOP_REMINDER_INTERVAL_MS)return _0x50199f[_0x57af2a(0x1a1)]=_0x586ea5,_0x214dbd[_0x57af2a(0x19a)](saveCache,_0x2fa73a),!![];return![];}export function hasSessionBeenPrompted(_0x497b46){const _0x14bfc3=_0x22168b,_0x480d96={'VKfaK':function(_0x44140f){return _0x44140f();},'zYHAY':function(_0x15a544,_0x1d93df){return _0x15a544===_0x1d93df;}},_0x5f20eb=_0x480d96['VKfaK'](loadCache);return _0x480d96['zYHAY'](_0x5f20eb['sessions'][_0x497b46]?.[_0x14bfc3(0x194)],!![]);}export function markSessionPrompted(_0x4d825b){const _0x3e50a9=_0x22168b,_0x39051d=loadCache(),_0x494904=getOrCreateSession(_0x39051d,_0x4d825b);_0x494904[_0x3e50a9(0x194)]=!![],saveCache(_0x39051d);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x350f8c=_0x2f80;(function(_0x55556d,_0xd5332){const _0x37a092=_0x2f80,_0x2a48b1=_0x55556d();while(!![]){try{const _0x1a1ea7=-parseInt(_0x37a092(0x199))/0x1+parseInt(_0x37a092(0x1d5))/0x2+-parseInt(_0x37a092(0x1ef))/0x3*(-parseInt(_0x37a092(0x19f))/0x4)+-parseInt(_0x37a092(0x1d9))/0x5+-parseInt(_0x37a092(0x1c4))/0x6+-parseInt(_0x37a092(0x1f5))/0x7*(-parseInt(_0x37a092(0x1b6))/0x8)+parseInt(_0x37a092(0x1ba))/0x9*(-parseInt(_0x37a092(0x1e6))/0xa);if(_0x1a1ea7===_0xd5332)break;else _0x2a48b1['push'](_0x2a48b1['shift']());}catch(_0x1cfa39){_0x2a48b1['push'](_0x2a48b1['shift']());}}}(_0x49fe,0x6c142));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 _0x2f80(_0x32bc04,_0x210b90){_0x32bc04=_0x32bc04-0x182;const _0x49fe67=_0x49fe();let _0x2f8091=_0x49fe67[_0x32bc04];return _0x2f8091;}function findEnvInRoot(_0x520bf1,_0x43cb26){const _0x4a31a0=_0x2f80,_0xfd4a3c={'hofmX':function(_0x25619d,_0x5e08a9,_0x5b1a28,_0x3c45da){return _0x25619d(_0x5e08a9,_0x5b1a28,_0x3c45da);},'xpQwq':function(_0xda294e,_0x1b880f,_0x4b7a86){return _0xda294e(_0x1b880f,_0x4b7a86);},'jfyXJ':_0x4a31a0(0x1b0),'uJJqJ':function(_0xe12b2,_0x2b3012){return _0xe12b2(_0x2b3012);},'BwPIG':function(_0x48ff7f,_0x3e61c0){return _0x48ff7f(_0x3e61c0);}},_0x245abc=join(_0x43cb26,'ci',_0x520bf1),_0x4bd130=_0xfd4a3c['hofmX'](join,_0x43cb26,'local',_0x520bf1),_0x16e0c0=join(_0x43cb26,_0x520bf1),_0xc02627=_0xfd4a3c['xpQwq'](join,_0x43cb26,_0xfd4a3c[_0x4a31a0(0x18e)]),_0xa3767a=join(_0x43cb26,'ci');if(_0xfd4a3c['uJJqJ'](existsSync,_0x245abc))return _0x245abc;if(_0xfd4a3c[_0x4a31a0(0x1ea)](existsSync,_0x4bd130))return _0x4bd130;if(existsSync(_0x16e0c0)&&(_0x16e0c0!==_0xc02627&&_0x16e0c0!==_0xa3767a?!![]:hasLegacyProfileFiles(_0x16e0c0)))return _0x16e0c0;return null;}export function getEnvDir(_0x44288c,_0x3b6741={}){const _0x35b20d=_0x2f80,_0x48f76b={'MsDEY':function(_0xffa0ca,_0x1168e6,_0x4f8db1){return _0xffa0ca(_0x1168e6,_0x4f8db1);},'mgGza':function(_0x5e19ee){return _0x5e19ee();},'gJLSG':function(_0x47059b,_0x1cda7c){return _0x47059b!==_0x1cda7c;}},_0x153285=getRangerDir(),_0x1467b7=_0x48f76b[_0x35b20d(0x20b)](findEnvInRoot,_0x44288c,_0x153285);if(_0x1467b7){if(_0x3b6741['forWrite']&&isLegacyEnvPath(_0x1467b7))throw _0x48f76b['MsDEY'](legacyWriteError,_0x44288c,_0x1467b7);return _0x1467b7;}const _0x1502ff=_0x48f76b['mgGza'](getRangerHomeDir);if(_0x48f76b[_0x35b20d(0x1bf)](_0x1502ff,_0x153285)){const _0xb0edbb=_0x48f76b['MsDEY'](findEnvInRoot,_0x44288c,_0x1502ff);if(_0xb0edbb){if(_0x3b6741[_0x35b20d(0x202)]&&isLegacyEnvPath(_0xb0edbb))throw legacyWriteError(_0x44288c,_0xb0edbb);return _0xb0edbb;}}const _0x17ffac=join(_0x1502ff,'local',_0x44288c);if(_0x3b6741['forWrite'])throw legacyWriteError(_0x44288c,_0x17ffac);return _0x17ffac;}function isLegacyEnvPath(_0x374a72){const _0x1a635a=_0x2f80,_0x11aa2f={'VXLLO':function(_0x148bf4){return _0x148bf4();}},_0x5a00f9=getRangerDir(),_0x4f9d5a=_0x11aa2f['VXLLO'](getRangerHomeDir);for(const _0x36146f of new Set([_0x5a00f9,_0x4f9d5a])){const _0x393221=_0x36146f['endsWith']('/')?_0x36146f:_0x36146f+'/';if(_0x374a72===_0x36146f||_0x374a72[_0x1a635a(0x189)](_0x393221))return!![];}return![];}function legacyWriteError(_0x418738,_0x59770a){const _0x212ad9=_0x2f80,_0x1de295={'WPoqG':function(_0x51fcd0,_0x5f5d85){return _0x51fcd0+_0x5f5d85;},'RfnMp':function(_0x52d914,_0x38e725){return _0x52d914+_0x38e725;}};return new Error(_0x1de295[_0x212ad9(0x1e8)](_0x1de295[_0x212ad9(0x1cb)](_0x1de295['RfnMp']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x418738+'\x22\x20to\x20legacy\x20path\x20'+_0x59770a+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x212ad9(0x1b4)));}export function findExistingEnv(_0x24daf0,_0x5905c5){const _0x2796d0=_0x2f80,_0x1d80c0={'jMboe':function(_0x381e23){return _0x381e23();},'RiEwH':'local','WkCmv':'legacy','nsDNV':function(_0x547671,_0x310b15){return _0x547671(_0x310b15);},'bZWCh':function(_0xdf7e3b,_0x66e673){return _0xdf7e3b===_0x66e673;},'JcNvS':function(_0xd0842e,_0x4a1085){return _0xd0842e(_0x4a1085);}},_0x1224e0=_0x5905c5?.[_0x2796d0(0x1e1)],_0x3873e9=_0x1224e0?[_0x1224e0]:[getRangerDir(),_0x1d80c0['jMboe'](getRangerHomeDir)]['filter']((_0x2d45bd,_0x546fca,_0x70f74c)=>_0x70f74c[_0x2796d0(0x196)](_0x2d45bd)===_0x546fca),_0x52009a=_0x5905c5?.[_0x2796d0(0x1b8)]??['ci','local',_0x2796d0(0x1bb)];for(const _0x322280 of _0x3873e9){const _0x365b1f=join(_0x322280,_0x1d80c0['RiEwH']),_0x19d39f=join(_0x322280,'ci'),_0x7bb8cd=[{'location':'ci','path':join(_0x322280,'ci',_0x24daf0)},{'location':_0x2796d0(0x1b0),'path':join(_0x322280,'local',_0x24daf0)},{'location':_0x1d80c0['WkCmv'],'path':join(_0x322280,_0x24daf0)}];for(const _0x23bad8 of _0x7bb8cd){if(_0x52009a[_0x2796d0(0x1ff)](_0x23bad8[_0x2796d0(0x19a)])&&_0x1d80c0[_0x2796d0(0x1a4)](existsSync,_0x23bad8[_0x2796d0(0x197)])){if(_0x1d80c0[_0x2796d0(0x1dd)](_0x23bad8['location'],_0x1d80c0[_0x2796d0(0x204)])&&(_0x23bad8['path']===_0x365b1f||_0x23bad8[_0x2796d0(0x197)]===_0x19d39f)&&!_0x1d80c0['JcNvS'](hasLegacyProfileFiles,_0x23bad8[_0x2796d0(0x197)]))continue;return{'path':_0x23bad8[_0x2796d0(0x197)],'location':_0x23bad8[_0x2796d0(0x19a)]};}}}return null;}function hasLegacyProfileFiles(_0x4ca009){const _0x213b9c=_0x2f80,_0x7a3c67={'tllfD':function(_0x2208b6,_0x21ad17){return _0x2208b6(_0x21ad17);},'mygQn':function(_0x4d85f8,_0x4d69e8,_0x1e5894){return _0x4d85f8(_0x4d69e8,_0x1e5894);},'MqnCX':'settings.json','LitAO':function(_0x1f02fc,_0x1174dc){return _0x1f02fc(_0x1174dc);},'drSid':_0x213b9c(0x1c2),'XwpmN':function(_0x2b7770,_0x2e24a5){return _0x2b7770(_0x2e24a5);}};return _0x7a3c67['tllfD'](existsSync,_0x7a3c67['mygQn'](join,_0x4ca009,_0x7a3c67['MqnCX']))||_0x7a3c67[_0x213b9c(0x1d8)](existsSync,_0x7a3c67['mygQn'](join,_0x4ca009,_0x7a3c67[_0x213b9c(0x1d3)]))||_0x7a3c67[_0x213b9c(0x1d1)](existsSync,_0x7a3c67['mygQn'](join,_0x4ca009,_0x213b9c(0x1c8)));}export function isEnvCi(_0x3531fc){const _0x5f29f3=_0x2f80,_0x67fa22={'TobjP':function(_0x516dba,_0x4c9f85){return _0x516dba(_0x4c9f85);},'ExjSg':function(_0x23901b,_0x6d5dbd,_0x2ecace,_0x10c559){return _0x23901b(_0x6d5dbd,_0x2ecace,_0x10c559);},'ksyCo':function(_0x1f9f13){return _0x1f9f13();},'sxhzv':function(_0x4ad9bb){return _0x4ad9bb();},'BozCn':function(_0x238d67,_0xcf80bf){return _0x238d67!==_0xcf80bf;},'jEDEf':function(_0x316b28){return _0x316b28();}};if(_0x67fa22[_0x5f29f3(0x1aa)](existsSync,_0x67fa22[_0x5f29f3(0x1dc)](join,_0x67fa22[_0x5f29f3(0x205)](getRangerDir),'ci',_0x3531fc)))return!![];const _0x42759f=_0x67fa22['sxhzv'](getRangerHomeDir);if(_0x67fa22['BozCn'](_0x42759f,_0x67fa22['jEDEf'](getRangerDir))&&existsSync(_0x67fa22[_0x5f29f3(0x1dc)](join,_0x42759f,'ci',_0x3531fc)))return!![];return![];}export async function cleanupTempFiles(_0x906de6){const _0x19cf6b=_0x2f80,_0x161c8b={'tTrdv':function(_0x19f47b,_0x6faee6){return _0x19f47b!==_0x6faee6;},'yRZBT':_0x19cf6b(0x1a3)},_0x5b9382=[_0x906de6[_0x19cf6b(0x188)],_0x906de6[_0x19cf6b(0x1db)]]['filter'](Boolean);await Promise[_0x19cf6b(0x209)](_0x5b9382['map'](_0x5d7a37=>unlink(_0x5d7a37)[_0x19cf6b(0x1b7)](_0x3992c=>{const _0x38930f=_0x19cf6b;_0x161c8b[_0x38930f(0x1a9)](_0x3992c['code'],_0x161c8b[_0x38930f(0x1f6)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5d7a37+':',_0x3992c[_0x38930f(0x1be)]);})));}export function getSettingsPath(_0x3f6fe5){const _0x16c023=_0x2f80,_0x1e7a19={'CRtaG':function(_0xf04beb,_0x219e79){return _0xf04beb(_0x219e79);},'TEltg':'settings.json'};return join(_0x1e7a19[_0x16c023(0x1a2)](getEnvDir,_0x3f6fe5),_0x1e7a19['TEltg']);}export async function loadSettings(_0xc59663){const _0x23feba=_0x2f80,_0x416175={'KvFcr':function(_0x542d20,_0x15384e){return _0x542d20(_0x15384e);},'MiFsT':'utf-8'},_0x409fed=getSettingsPath(_0xc59663);if(!_0x416175['KvFcr'](existsSync,_0x409fed))return{};try{const _0xcfaee9=await readFile(_0x409fed,_0x416175[_0x23feba(0x1d2)]);return JSON['parse'](_0xcfaee9);}catch{return{};}}export async function saveSettings(_0x285a52,_0x4568ee){const _0x326495=_0x2f80,_0x229a02={'VOIyn':function(_0x3e95e9,_0x3a7931){return _0x3e95e9(_0x3a7931);},'vuyDK':function(_0x511886,_0x246dd0,_0x2b0c12){return _0x511886(_0x246dd0,_0x2b0c12);}},_0x4e60a2=getSettingsPath(_0x285a52),_0x1c8543=_0x229a02['VOIyn'](dirname,_0x4e60a2);!_0x229a02['VOIyn'](existsSync,_0x1c8543)&&await _0x229a02['vuyDK'](mkdir,_0x1c8543,{'recursive':!![]}),await writeFile(_0x4e60a2,JSON[_0x326495(0x185)](_0x4568ee,null,0x2));}function _0x49fe(){const _0x17a419=['ranger-auth-','1848COhsAg','--allow-running-insecure-content','none','CRtaG','ENOENT','nsDNV','ellII','AAaOj','allowInsecureLocalhost','uSmXx','tTrdv','TobjP','bGRgH','executablePath','NjkgC','xvDqS','env','local','cnclN','clipboard-read','filter','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','RCcjL','368fHAJVQ','catch','locations','NTgJf','9wRvLio','legacy','rZMQx','PDsCz','message','gJLSG','OrtHn','safeMode','auth.json','pCPgg','1056198piEEFo','VLuaI','core','join','auth.json.enc','EuTfP','nwLZA','RfnMp','cdpEndpoint','string','cCPFK','TGFvL','EnkaZ','XwpmN','MiFsT','drSid','isArray','288522KlqdOA','object','userAgent','LitAO','508395WhPZLU','playwright-cli','configPath','ExjSg','bZWCh','urbUF','--allow-insecure-localhost','storageStatePath','rangerDir','ranger-config','--unsafely-treat-insecure-origin-as-secure=http://localhost','suUvr','baseUrl','7912190jBhvmM','zGVvu','WPoqG','ignoreHTTPSErrors','BwPIG','SUUWA','push','keys','aQOwY','5205klwqWl','getuid','WHcqO','WqOhx','AePqd','lPtja','120379zJASHT','yRZBT','WEUoH','eoLqi','kxhvt','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','XXaPX','headers','chromium','Ltklg','includes','headless','IVsFw','forWrite','Environment\x20variable\x20','WkCmv','ksyCo','TYBFg','entries','vision','all','pXPxe','MsDEY','args','contextOptions','--no-sandbox','sessions','lwsLd','hELEk','file','stringify','xTMGp','ecwTB','tempAuthPath','startsWith','iiCMt','RPhdY','clipboard-write','--disable-setuid-sandbox','jfyXJ','JlAwn','XOHBj','storageState','split','mgQNl','map','header','indexOf','path','extraHTTPHeaders','225272dRnNnJ','location','ZtIlD','nzbIU','length'];_0x49fe=function(){return _0x17a419;};return _0x49fe();}export function resolveEnvVars(_0x3ead2f){const _0x5a82bf=_0x2f80,_0x28280b={'zuUvZ':function(_0x5618e2,_0x40f3d3){return _0x5618e2===_0x40f3d3;},'pCPgg':'string','VLuaI':_0x5a82bf(0x1d6)};if(typeof _0x3ead2f===_0x28280b[_0x5a82bf(0x1c3)])return _0x3ead2f['replace'](/\$\{(\w+)\}/g,(_0x3d7318,_0x2dd057)=>{const _0x47d489=_0x5a82bf,_0x339773=process[_0x47d489(0x1af)][_0x2dd057];if(_0x28280b['zuUvZ'](_0x339773,undefined))throw new Error(_0x47d489(0x203)+_0x2dd057+'\x20is\x20not\x20set');return _0x339773;});if(Array['isArray'](_0x3ead2f))return _0x3ead2f['map'](resolveEnvVars);if(_0x3ead2f&&_0x28280b['zuUvZ'](typeof _0x3ead2f,_0x28280b[_0x5a82bf(0x1c5)]))return Object['fromEntries'](Object['entries'](_0x3ead2f)[_0x5a82bf(0x194)](([_0x11237a,_0x4f329e])=>[_0x11237a,resolveEnvVars(_0x4f329e)]));return _0x3ead2f;}const isRecord=_0x39e917=>typeof _0x39e917===_0x350f8c(0x1d6)&&_0x39e917!==null&&!Array[_0x350f8c(0x1d4)](_0x39e917),asRecord=_0xe308ae=>isRecord(_0xe308ae)?_0xe308ae:undefined,mergeHeaders=(_0x449264,_0x22d19f)=>{const _0x33fba8=_0x350f8c,_0x1cb80f={'TYBFg':function(_0x34419c,_0x11e5bc){return _0x34419c??_0x11e5bc;}},_0x316b2a={..._0x1cb80f[_0x33fba8(0x206)](_0x449264,{}),..._0x1cb80f['TYBFg'](_0x22d19f,{})};return Object[_0x33fba8(0x1ed)](_0x316b2a)[_0x33fba8(0x19d)]?_0x316b2a:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x350f8c(0x1a0),_0x350f8c(0x1e3),_0x350f8c(0x1df)];export function buildBrowserOptionsFromSettings(_0x5e1c27,_0x46f17b={}){const _0x203d79=_0x350f8c,_0x21d281={'iiCMt':function(_0x369535,_0x581d74){return _0x369535===_0x581d74;},'bBUws':function(_0xee2908,_0x48ec71){return _0xee2908(_0x48ec71);},'nidNQ':function(_0x4e73b7,_0x279df5){return _0x4e73b7(_0x279df5);}},_0x5366e0=asRecord(_0x5e1c27['browser']),_0x8222c5={...asRecord(_0x5366e0?.['launchOptions'])??{}};_0x21d281['iiCMt'](typeof _0x46f17b[_0x203d79(0x200)],'boolean')&&(_0x8222c5['headless']=_0x46f17b[_0x203d79(0x200)]);if(_0x5e1c27['safeMode']){const _0x56c5bb=_0x8222c5['args']??[],_0x149880=SAFE_MODE_ARGS['filter'](_0x369426=>!_0x56c5bb[_0x203d79(0x1ff)](_0x369426));_0x8222c5['args']=[..._0x56c5bb,..._0x149880];}if(_0x5e1c27['allowInsecureLocalhost']){const _0x30aa53=_0x8222c5['args']??[],_0x1ee3ca=ALLOW_LOCALHOST_ARGS[_0x203d79(0x1b3)](_0x89ed36=>!_0x30aa53['includes'](_0x89ed36));_0x8222c5[_0x203d79(0x20c)]=[..._0x30aa53,..._0x1ee3ca];}const _0x5a0aa5={..._0x21d281['bBUws'](asRecord,_0x5366e0?.[_0x203d79(0x20d)])??{}};_0x5a0aa5[_0x203d79(0x1e9)]=!![];_0x21d281[_0x203d79(0x18a)](typeof _0x5e1c27['userAgent'],'string')&&(_0x5a0aa5[_0x203d79(0x1d7)]=_0x5e1c27['userAgent']);const _0xe53d91=mergeHeaders(_0x21d281['nidNQ'](asRecord,_0x5a0aa5[_0x203d79(0x198)]),_0x21d281['bBUws'](asRecord,_0x5e1c27[_0x203d79(0x1fc)]));return _0xe53d91?_0x5a0aa5[_0x203d79(0x198)]=_0xe53d91:delete _0x5a0aa5['extraHTTPHeaders'],_0x46f17b[_0x203d79(0x1e0)]&&(_0x5a0aa5['storageState']=_0x46f17b['storageStatePath']),{'launchOptions':_0x8222c5,'contextOptions':_0x5a0aa5};}export async function resolveProfileStorageState(_0x3a4597){return resolveLocalAuthPath(getEnvDir(_0x3a4597));}async function resolveLocalAuthPath(_0x479053){const _0x3aec3a=_0x350f8c,_0x2ad0e7={'FtsKk':_0x3aec3a(0x1c8),'zGVvu':_0x3aec3a(0x1c2),'IVsFw':function(_0x44e244,_0x12f80f){return _0x44e244(_0x12f80f);},'yPVpB':_0x3aec3a(0x1fa),'xTMGp':function(_0x29581a,_0x1cad01,_0x4e4f08){return _0x29581a(_0x1cad01,_0x4e4f08);}},_0x27e8e7=join(_0x479053,_0x2ad0e7['FtsKk']),_0xbda852=join(_0x479053,_0x2ad0e7[_0x3aec3a(0x1e7)]);if(_0x2ad0e7['IVsFw'](existsSync,_0x27e8e7))try{const _0x230815=await getToken();if(!_0x230815)throw new Error(_0x2ad0e7['yPVpB']);const _0x108a37=await _0x2ad0e7[_0x3aec3a(0x201)](readFile,_0x27e8e7),_0x3ed77b=decrypt(_0x108a37,_0x230815),_0x4b80e0=_0x2ad0e7[_0x3aec3a(0x186)](join,tmpdir(),_0x3aec3a(0x19e)+Date['now']()+'.json');return await _0x2ad0e7['xTMGp'](writeFile,_0x4b80e0,_0x3ed77b),{'storageStatePath':_0x4b80e0,'tempAuthPath':_0x4b80e0};}catch(_0x16a8f4){const _0xbd04d0=_0x16a8f4 instanceof Error?_0x16a8f4['message']:_0x2ad0e7['IVsFw'](String,_0x16a8f4);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0xbd04d0);}if(existsSync(_0xbda852))return{'storageStatePath':_0xbda852};return{};}export async function buildPlaywrightConfig(_0x405714,_0x4a44ec,_0x5bed6b,_0x498030,_0x586364){const _0x1e5c18=_0x350f8c,_0x33c820={'JlAwn':function(_0x1cba71,_0xd47356,_0x3a863b,_0x53c5c5,_0x383e12,_0x51316a,_0x31634a){return _0x1cba71(_0xd47356,_0x3a863b,_0x53c5c5,_0x383e12,_0x51316a,_0x31634a);}};if(_0x586364)return buildPlaywrightConfigCore(_0x405714,_0x586364,_0x4a44ec,_0x5bed6b,_0x498030,'stagehand');const {storageStatePath:_0x45eac0,tempAuthPath:_0x2f2742}=await resolveLocalAuthPath(getEnvDir(_0x4a44ec));try{const _0xa67f15=await _0x33c820[_0x1e5c18(0x18f)](buildPlaywrightConfigCore,_0x405714,_0x45eac0,_0x4a44ec,_0x5bed6b,_0x498030,'stagehand');return{..._0xa67f15,'tempAuthPath':_0x2f2742};}catch(_0x5dd097){_0x2f2742&&await unlink(_0x2f2742)['catch'](()=>{});throw _0x5dd097;}}export async function buildPlaywrightConfigCore(_0x453d3f,_0x268ec0,_0x4adfd9,_0x5aeb4b,_0x31a246,_0x4425dc='stagehand'){const _0x227e03=_0x350f8c,_0x3cd448={'XXaPX':'--no-sandbox','bGRgH':'chromium','Ltklg':'clipboard-read','YEMDg':function(_0x111f1c,_0x2ae577,_0x5b3f25,_0xc06953){return _0x111f1c(_0x2ae577,_0x5b3f25,_0xc06953);},'fpHJs':function(_0x91a835){return _0x91a835();},'EHWzi':_0x227e03(0x20f),'gZOgJ':function(_0x6798ab,_0x18faca){return _0x6798ab===_0x18faca;},'xvDqS':_0x227e03(0x1da),'lPtja':_0x227e03(0x184),'eoLqi':_0x227e03(0x1a1),'ellII':_0x227e03(0x1c6),'jEIAT':'tabs','kxhvt':'install','vMMFr':'pdf','TGFvL':'allow','WHcqO':function(_0x37e80b,_0x382a61){return _0x37e80b===_0x382a61;},'hELEk':_0x227e03(0x1e2),'RCcjL':function(_0xc7dc66,_0x10e13f){return _0xc7dc66(_0x10e13f);},'XOHBj':function(_0x336e9d,_0x2e32b0,_0x5e5267){return _0x336e9d(_0x2e32b0,_0x5e5267);},'nwLZA':'-cli'},_0x29db8d=_0x5aeb4b||randomUUID(),_0x4d55b8=_0x3cd448['YEMDg'](join,_0x3cd448['fpHJs'](getRangerDir),_0x3cd448['EHWzi'],_0x29db8d),_0x5cebd0=Boolean(_0x453d3f['cdpEndpoint']),_0x2619ea=_0x5cebd0?{'browserName':_0x3cd448[_0x227e03(0x1ab)],'cdpEndpoint':_0x453d3f[_0x227e03(0x1cc)]}:((()=>{const _0x3a9dfd=_0x227e03,{launchOptions:_0x19e1c3,contextOptions:_0x220181}=buildBrowserOptionsFromSettings(_0x453d3f,{'headless':_0x31a246?![]:_0x453d3f['headless']??!![],'storageStatePath':_0x268ec0});if(process[_0x3a9dfd(0x1f0)]?.()===0x0){const _0x2291ac=[_0x3cd448[_0x3a9dfd(0x1fb)],_0x3a9dfd(0x18d)],_0x31e494=_0x19e1c3['args']??[],_0x2ebc1e=_0x2291ac[_0x3a9dfd(0x1b3)](_0x3a598f=>!_0x31e494[_0x3a9dfd(0x1ff)](_0x3a598f));_0x19e1c3['args']=[..._0x31e494,..._0x2ebc1e];}return{'isolated':!![],'browserName':_0x3cd448['bGRgH'],'launchOptions':_0x19e1c3,'contextOptions':{..._0x220181,'permissions':[_0x3cd448[_0x3a9dfd(0x1fe)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x43bb7=_0x3cd448['gZOgJ'](_0x4425dc,_0x3cd448[_0x227e03(0x1ae)])?{'browser':_0x2619ea,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4d55b8,'outputMode':_0x3cd448[_0x227e03(0x1f4)],'codegen':_0x3cd448[_0x227e03(0x1f8)]}:{'name':_0x4adfd9,'browser':_0x2619ea,'capabilities':[_0x3cd448[_0x227e03(0x1a5)],_0x3cd448['jEIAT'],_0x3cd448[_0x227e03(0x1f9)],_0x3cd448['vMMFr'],_0x227e03(0x208)],'imageResponses':_0x3cd448[_0x227e03(0x1cf)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4d55b8};if(!_0x5cebd0){const _0x1dd577=_0x43bb7['browser'],_0x253f6f=_0x1dd577[_0x227e03(0x20d)];if(_0x253f6f[_0x227e03(0x1d7)]===undefined)delete _0x253f6f[_0x227e03(0x1d7)];if(_0x3cd448[_0x227e03(0x1f1)](_0x253f6f[_0x227e03(0x191)],undefined))delete _0x253f6f[_0x227e03(0x191)];}const _0x2ec152=join(tmpdir(),_0x3cd448[_0x227e03(0x183)]);!_0x3cd448[_0x227e03(0x1b5)](existsSync,_0x2ec152)&&await _0x3cd448[_0x227e03(0x190)](mkdir,_0x2ec152,{'recursive':!![]});const _0x28b24c=_0x4425dc===_0x3cd448['xvDqS']?_0x3cd448[_0x227e03(0x1ca)]:'',_0xe11acf=join(_0x2ec152,_0x4adfd9+'-'+Date['now']()+_0x28b24c+'.json');return await writeFile(_0xe11acf,JSON[_0x227e03(0x185)](_0x43bb7,null,0x2)),{'configPath':_0xe11acf,'storageStatePath':_0x268ec0};}export async function buildPlaywrightCliConfig(_0x216c90,_0x365210,_0x124998,_0x14f13d,_0x4db165){const _0xe1ea70=_0x350f8c,_0x32fea1={'pXPxe':_0xe1ea70(0x1da)};if(_0x4db165)return buildPlaywrightConfigCore(_0x216c90,_0x4db165,_0x365210,_0x124998,_0x14f13d,_0x32fea1['pXPxe']);const {storageStatePath:_0x15dd43,tempAuthPath:_0x354e93}=await resolveLocalAuthPath(getEnvDir(_0x365210));try{const _0x20b55d=await buildPlaywrightConfigCore(_0x216c90,_0x15dd43,_0x365210,_0x124998,_0x14f13d,_0x32fea1[_0xe1ea70(0x20a)]);return{..._0x20b55d,'tempAuthPath':_0x354e93};}catch(_0x5caf30){_0x354e93&&await unlink(_0x354e93)[_0xe1ea70(0x1b7)](()=>{});throw _0x5caf30;}}export async function buildRangerwrightCliConfig(_0x174b49,_0x49e5d5,_0x2ec594,_0xb9caaf,_0x4566c9){const _0x357164=_0x350f8c,_0x34ad57={'wqFNB':function(_0x159cd1,_0x1e781e){return _0x159cd1===_0x1e781e;},'OrtHn':_0x357164(0x20e),'zUwgO':'chromium','ceWcN':_0x357164(0x1b2),'fayrb':_0x357164(0x18c),'PDsCz':function(_0x1e3ae0){return _0x1e3ae0();},'NTgJf':function(_0x4fb436,_0x432341,_0x40f73b,_0x124242){return _0x4fb436(_0x432341,_0x40f73b,_0x124242);},'AAaOj':function(_0x1fe97c,_0x596d85){return _0x1fe97c===_0x596d85;},'mgQNl':function(_0x9656b6,_0x4eebfa,_0x265f7a){return _0x9656b6(_0x4eebfa,_0x265f7a);},'zbpix':function(_0x389bfd){return _0x389bfd();},'UzxOi':_0x357164(0x1e2),'ZtIlD':function(_0x31e7c2,_0x45a713,_0xe3de54){return _0x31e7c2(_0x45a713,_0xe3de54);},'lwsLd':function(_0x43af1c,_0x5f09d6){return _0x43af1c(_0x5f09d6);}},{storageStatePath:_0x35c4ac,tempAuthPath:_0x3f0d7a}=_0x4566c9?{'storageStatePath':_0x4566c9,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x49e5d5)),_0x23a522=_0x2ec594||_0x34ad57[_0x357164(0x1bd)](randomUUID),_0x35a18c=_0x34ad57[_0x357164(0x1b9)](join,getRangerDir(),_0x357164(0x20f),_0x23a522),_0x419e8e=Boolean(_0x174b49[_0x357164(0x1cc)]),_0x1e1b5a=_0x419e8e?{'browserName':_0x357164(0x1fd),'cdpEndpoint':_0x174b49['cdpEndpoint']}:((()=>{const _0x4e8b17=_0x357164,{launchOptions:_0x3c35f1,contextOptions:_0x10a965}=buildBrowserOptionsFromSettings(_0x174b49,{'headless':_0xb9caaf?![]:_0x174b49['headless']??!![],'storageStatePath':_0x35c4ac});if(_0x34ad57['wqFNB'](process[_0x4e8b17(0x1f0)]?.(),0x0)){const _0x2ef18d=[_0x34ad57[_0x4e8b17(0x1c0)],_0x4e8b17(0x18d)],_0x10aee4=_0x3c35f1['args']??[],_0x3276fa=_0x2ef18d[_0x4e8b17(0x1b3)](_0x4c5a9a=>!_0x10aee4[_0x4e8b17(0x1ff)](_0x4c5a9a));_0x3c35f1['args']=[..._0x10aee4,..._0x3276fa];}return{'browserName':_0x34ad57['zUwgO'],'launchOptions':_0x3c35f1,'contextOptions':{..._0x10a965,'permissions':[_0x34ad57['ceWcN'],_0x34ad57['fayrb']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x419e8e){const _0x889143=_0x1e1b5a['contextOptions'];if(_0x889143){if(_0x34ad57[_0x357164(0x1a6)](_0x889143[_0x357164(0x1d7)],undefined))delete _0x889143['userAgent'];if(_0x889143['storageState']===undefined)delete _0x889143[_0x357164(0x191)];}}const _0x449a69={'browser':_0x1e1b5a,'outputDir':_0x35a18c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x422f30;try{const _0x593e7c=_0x34ad57[_0x357164(0x193)](join,_0x34ad57['zbpix'](tmpdir),_0x34ad57['UzxOi']);!existsSync(_0x593e7c)&&await mkdir(_0x593e7c,{'recursive':!![]}),_0x422f30=join(_0x593e7c,_0x49e5d5+'-'+Date['now']()+'-rangerwright.json'),await _0x34ad57[_0x357164(0x19b)](writeFile,_0x422f30,JSON[_0x357164(0x185)](_0x449a69,null,0x2));}catch(_0x5c9b79){_0x3f0d7a&&await _0x34ad57[_0x357164(0x182)](unlink,_0x3f0d7a)['catch'](()=>{});throw _0x5c9b79;}return{'configPath':_0x422f30,'storageStatePath':_0x35c4ac,'tempAuthPath':_0x3f0d7a,'outputDir':_0x35a18c};}export async function buildNovaActCliConfig(_0x1792d2,_0x28e4f3,_0x500464,_0x4dcdb0,_0x14d626){const _0x27705d=_0x350f8c,_0x3cf182={'godxh':function(_0x306fe5,_0x434f0e){return _0x306fe5(_0x434f0e);},'SUUWA':function(_0x4114e2){return _0x4114e2();},'uSmXx':'sessions','aQOwY':function(_0x32c407,_0x1c56fe,_0x4feac5){return _0x32c407(_0x1c56fe,_0x4feac5);},'EuTfP':'nova-user-data','cnclN':function(_0x4f1203,_0x5cb2b5,_0xd7558a){return _0x4f1203(_0x5cb2b5,_0xd7558a);},'DDNgA':'Default','AePqd':function(_0x87ffa4,_0x5946c3){return _0x87ffa4===_0x5946c3;},'WEUoH':'--disable-setuid-sandbox','GJnqD':'string','fUKkt':function(_0x36484d,_0x211fb3){return _0x36484d(_0x211fb3);},'MyPAy':function(_0x2aa3cd,_0x3ed27c){return _0x2aa3cd(_0x3ed27c);}},{storageStatePath:_0xf920be,tempAuthPath:_0x3f9dde}=_0x14d626?{'storageStatePath':_0x14d626,'tempAuthPath':undefined}:await _0x3cf182['godxh'](resolveLocalAuthPath,getEnvDir(_0x28e4f3)),_0x1d034d=_0x500464||_0x3cf182[_0x27705d(0x1eb)](randomUUID),_0x1d8469=join(getRangerDir(),_0x3cf182[_0x27705d(0x1a8)],_0x1d034d),_0x51bd5b=_0x3cf182[_0x27705d(0x1ee)](join,_0x1d8469,_0x3cf182[_0x27705d(0x1c9)]),_0x17a367=_0xf920be?_0x3cf182[_0x27705d(0x1b1)](join,_0x51bd5b,_0x3cf182['DDNgA']):undefined,{launchOptions:_0x295564,contextOptions:_0x4789a8}=_0x3cf182[_0x27705d(0x1ee)](buildBrowserOptionsFromSettings,_0x1792d2,{'headless':_0x4dcdb0?![]:_0x1792d2['headless']??!![],'storageStatePath':_0xf920be});if(_0x3cf182[_0x27705d(0x1f3)](process[_0x27705d(0x1f0)]?.(),0x0)){const _0x72a8a2=[_0x27705d(0x20e),_0x3cf182[_0x27705d(0x1f7)]],_0x531a11=_0x295564[_0x27705d(0x20c)]??[],_0x5664e8=_0x72a8a2[_0x27705d(0x1b3)](_0x3555ff=>!_0x531a11['includes'](_0x3555ff));_0x295564[_0x27705d(0x20c)]=[..._0x531a11,..._0x5664e8];}const _0x575e56=typeof _0x295564[_0x27705d(0x1ac)]===_0x3cf182['GJnqD']?_0x295564[_0x27705d(0x1ac)]:_0xf920be?chromium[_0x27705d(0x1ac)]():undefined;return{'storageStatePath':_0xf920be,'tempAuthPath':_0x3f9dde,'baseUrl':_0x1792d2[_0x27705d(0x1e5)],'headless':Boolean(_0x295564[_0x27705d(0x200)]),'userDataDir':_0x51bd5b,'browserProfilePath':_0x17a367,'executablePath':_0x575e56,'launchArgs':Array['isArray'](_0x295564[_0x27705d(0x20c)])?_0x295564[_0x27705d(0x20c)][_0x27705d(0x1b3)](_0x27955b=>typeof _0x27955b==='string'):[],'userAgent':_0x3cf182['AePqd'](typeof _0x4789a8['userAgent'],_0x27705d(0x1cd))?_0x4789a8[_0x27705d(0x1d7)]:undefined,'extraHTTPHeaders':_0x4789a8['extraHTTPHeaders'],'allowInsecureLocalhost':_0x3cf182['fUKkt'](Boolean,_0x1792d2[_0x27705d(0x1a7)]),'safeMode':_0x3cf182['fUKkt'](Boolean,_0x1792d2[_0x27705d(0x1c1)]),'cdpEndpoint':_0x1792d2[_0x27705d(0x1cc)],'isCdpMode':_0x3cf182['MyPAy'](Boolean,_0x1792d2[_0x27705d(0x1cc)])};}export function getNestedValue(_0x1b32ea,_0x6ed700){const _0x26409b=_0x350f8c,_0x5848fa={'WqOhx':function(_0x1052ae,_0x3c9b62){return _0x1052ae(_0x3c9b62);},'cCPFK':function(_0x2e93a6,_0x1ab77e){return _0x2e93a6===_0x1ab77e;},'fABFA':function(_0x5a357b,_0x5c54bc){return _0x5a357b!==_0x5c54bc;},'jYMPM':'object'},_0x4d2ae7=_0x5848fa[_0x26409b(0x1f2)](parseKeyPath,_0x6ed700);let _0x3cd5d0=_0x1b32ea;for(const _0x40e6fd of _0x4d2ae7){if(_0x3cd5d0===null||_0x5848fa[_0x26409b(0x1ce)](_0x3cd5d0,undefined)||_0x5848fa['fABFA'](typeof _0x3cd5d0,_0x5848fa['jYMPM']))return undefined;_0x3cd5d0=_0x3cd5d0[_0x40e6fd];}return _0x3cd5d0;}export function setNestedValue(_0x435e50,_0x488a64,_0x44607b){const _0x165333=_0x350f8c,_0x58c074={'DQgIj':function(_0x28fec3,_0x55e527){return _0x28fec3(_0x55e527);},'vvfyu':function(_0x5e0141,_0x2b7f6d){return _0x5e0141-_0x2b7f6d;},'jlWAM':function(_0x50e8b9,_0x5ddfb8){return _0x50e8b9 in _0x5ddfb8;},'EnkaZ':function(_0x34962d,_0xf625f0){return _0x34962d!==_0xf625f0;},'sWKWZ':_0x165333(0x1d6),'HQiqn':function(_0x592d73,_0x1d0502){return _0x592d73-_0x1d0502;}},_0x174507=_0x58c074['DQgIj'](parseKeyPath,_0x488a64);let _0x5b17d9=_0x435e50;for(let _0x4361e6=0x0;_0x4361e6<_0x58c074['vvfyu'](_0x174507['length'],0x1);_0x4361e6++){const _0x29a249=_0x174507[_0x4361e6];(!_0x58c074['jlWAM'](_0x29a249,_0x5b17d9)||_0x58c074[_0x165333(0x1d0)](typeof _0x5b17d9[_0x29a249],_0x58c074['sWKWZ']))&&(_0x5b17d9[_0x29a249]={}),_0x5b17d9=_0x5b17d9[_0x29a249];}_0x5b17d9[_0x174507[_0x58c074['HQiqn'](_0x174507[_0x165333(0x19d)],0x1)]]=_0x44607b;}export function deleteNestedValue(_0x5bd15f,_0x1dcee5){const _0x9172f3=_0x350f8c,_0x18ab43={'urbUF':function(_0x5277e2,_0x1a08f4){return _0x5277e2<_0x1a08f4;},'suUvr':function(_0x38bf16,_0x1adcd1){return _0x38bf16-_0x1adcd1;},'RTETM':function(_0x5b8dcf,_0x188d1d){return _0x5b8dcf===_0x188d1d;},'ecwTB':function(_0x197058,_0x22f5a7){return _0x197058!==_0x22f5a7;},'NjkgC':'object','RPhdY':function(_0x40c108,_0x2e4f36){return _0x40c108!==_0x2e4f36;},'dPTfn':function(_0x22e4f1,_0x243798){return _0x22e4f1-_0x243798;},'MVugv':function(_0x326dc0,_0x3d0328){return _0x326dc0 in _0x3d0328;}},_0x18fff6=parseKeyPath(_0x1dcee5);let _0x2d73c6=_0x5bd15f;for(let _0x9dc07a=0x0;_0x18ab43[_0x9172f3(0x1de)](_0x9dc07a,_0x18ab43[_0x9172f3(0x1e4)](_0x18fff6[_0x9172f3(0x19d)],0x1));_0x9dc07a++){if(_0x2d73c6===null||_0x18ab43['RTETM'](_0x2d73c6,undefined)||_0x18ab43[_0x9172f3(0x187)](typeof _0x2d73c6,_0x18ab43[_0x9172f3(0x1ad)]))return![];_0x2d73c6=_0x2d73c6[_0x18fff6[_0x9dc07a]];}if(_0x2d73c6===null||_0x2d73c6===undefined||_0x18ab43[_0x9172f3(0x18b)](typeof _0x2d73c6,_0x18ab43[_0x9172f3(0x1ad)]))return![];const _0x34d6d7=_0x18fff6[_0x18ab43['dPTfn'](_0x18fff6[_0x9172f3(0x19d)],0x1)];if(_0x18ab43['MVugv'](_0x34d6d7,_0x2d73c6))return delete _0x2d73c6[_0x34d6d7],!![];return![];}function parseKeyPath(_0x48813d){const _0x2244fe=_0x350f8c,_0x28f1e4={'ZPERX':function(_0x575bc1,_0x5e28a4){return _0x575bc1===_0x5e28a4;},'Agelu':_0x2244fe(0x195),'nzbIU':_0x2244fe(0x1fc),'DaybF':'setupHeader'},_0x1e25d5=_0x48813d[_0x2244fe(0x192)]('.');return _0x28f1e4['ZPERX'](_0x1e25d5[0x0],_0x28f1e4['Agelu'])&&(_0x1e25d5[0x0]=_0x28f1e4[_0x2244fe(0x19c)]),_0x28f1e4['ZPERX'](_0x1e25d5[0x0],_0x28f1e4['DaybF'])&&(_0x1e25d5[0x0]='setupHeaders'),_0x1e25d5;}export function formatSettings(_0x2e02fe,_0x15c740=0x0){const _0x32dd9b=_0x350f8c,_0x1d9088={'rZMQx':_0x32dd9b(0x1d6)},_0x2ea690=[],_0x15bfa5='\x20\x20'['repeat'](_0x15c740);for(const [_0x2f856d,_0x41aa1b]of Object['entries'](_0x2e02fe)){if(_0x41aa1b===undefined)continue;if(typeof _0x41aa1b===_0x1d9088[_0x32dd9b(0x1bc)]&&_0x41aa1b!==null){_0x2ea690[_0x32dd9b(0x1ec)](''+_0x15bfa5+_0x2f856d+':');for(const [_0x578ab8,_0x14e6ab]of Object[_0x32dd9b(0x207)](_0x41aa1b)){_0x2ea690['push'](_0x15bfa5+'\x20\x20'+_0x578ab8+':\x20'+_0x14e6ab);}}else _0x2ea690[_0x32dd9b(0x1ec)](''+_0x15bfa5+_0x2f856d+':\x20'+_0x41aa1b);}return _0x2ea690[_0x32dd9b(0x1c7)]('\x0a');}
|
|
1
|
+
const _0x231513=_0x24f2;(function(_0x7d19f0,_0x2a516d){const _0x26b42a=_0x24f2,_0x15a498=_0x7d19f0();while(!![]){try{const _0x453ac0=parseInt(_0x26b42a(0xea))/0x1+parseInt(_0x26b42a(0x100))/0x2*(parseInt(_0x26b42a(0x108))/0x3)+-parseInt(_0x26b42a(0xe6))/0x4*(-parseInt(_0x26b42a(0xad))/0x5)+-parseInt(_0x26b42a(0x10d))/0x6+-parseInt(_0x26b42a(0xc1))/0x7+parseInt(_0x26b42a(0xcd))/0x8+-parseInt(_0x26b42a(0xe8))/0x9*(-parseInt(_0x26b42a(0xb1))/0xa);if(_0x453ac0===_0x2a516d)break;else _0x15a498['push'](_0x15a498['shift']());}catch(_0x4eb412){_0x15a498['push'](_0x15a498['shift']());}}}(_0x2695,0xc5f21));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0x24f2(_0x3ed20f,_0x40afb9){_0x3ed20f=_0x3ed20f-0xab;const _0x2695b1=_0x2695();let _0x24f2cf=_0x2695b1[_0x3ed20f];return _0x24f2cf;}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(_0x589d72,_0x5b56dd){const _0x327c76=_0x24f2,_0x6ae1c8={'towex':function(_0x185d29,_0x3227b8,_0x10197c,_0x33b252){return _0x185d29(_0x3227b8,_0x10197c,_0x33b252);},'qIgad':'local','QLRPJ':function(_0x1ae36f,_0x3684ab,_0x99c27f){return _0x1ae36f(_0x3684ab,_0x99c27f);},'RxhWj':function(_0x2e5494,_0x2c9abf){return _0x2e5494(_0x2c9abf);},'yFFat':function(_0x296334,_0x57ff39){return _0x296334(_0x57ff39);}},_0x431368=join(_0x5b56dd,'ci',_0x589d72),_0x2d22ec=_0x6ae1c8[_0x327c76(0xfa)](join,_0x5b56dd,_0x6ae1c8[_0x327c76(0x125)],_0x589d72),_0x541529=_0x6ae1c8['QLRPJ'](join,_0x5b56dd,_0x589d72),_0x30f7b9=join(_0x5b56dd,_0x6ae1c8['qIgad']),_0x6310cb=_0x6ae1c8['QLRPJ'](join,_0x5b56dd,'ci');if(existsSync(_0x431368))return _0x431368;if(_0x6ae1c8['RxhWj'](existsSync,_0x2d22ec))return _0x2d22ec;if(existsSync(_0x541529)&&(_0x541529!==_0x30f7b9&&_0x541529!==_0x6310cb?!![]:_0x6ae1c8[_0x327c76(0x124)](hasLegacyProfileFiles,_0x541529)))return _0x541529;return null;}export function getEnvDir(_0x4224f6,_0x375de2={}){const _0x3ab3c1=_0x24f2,_0x13b154={'TvvmM':function(_0x3853c8){return _0x3853c8();},'NiTkI':function(_0x105a72,_0x5cd916,_0xcbae5b){return _0x105a72(_0x5cd916,_0xcbae5b);},'IfIhP':function(_0x3c88a5,_0x4093b8,_0x56ac3c){return _0x3c88a5(_0x4093b8,_0x56ac3c);},'QNrCo':function(_0x276b53,_0x21f71f){return _0x276b53(_0x21f71f);},'LVsxw':function(_0x42aec6,_0xc17296,_0x55b3df,_0x5604b2){return _0x42aec6(_0xc17296,_0x55b3df,_0x5604b2);},'rJkhv':'local','HCbRu':function(_0x51cd81,_0x35a893,_0x4f8852){return _0x51cd81(_0x35a893,_0x4f8852);}},_0x235d8b=_0x13b154[_0x3ab3c1(0xc3)](getRangerDir),_0x2c5357=findEnvInRoot(_0x4224f6,_0x235d8b);if(_0x2c5357){if(_0x375de2[_0x3ab3c1(0x11a)]&&isLegacyEnvPath(_0x2c5357))throw _0x13b154['NiTkI'](legacyWriteError,_0x4224f6,_0x2c5357);return _0x2c5357;}const _0x1c3cb1=getRangerHomeDir();if(_0x1c3cb1!==_0x235d8b){const _0x3a09c5=_0x13b154[_0x3ab3c1(0xc8)](findEnvInRoot,_0x4224f6,_0x1c3cb1);if(_0x3a09c5){if(_0x375de2['forWrite']&&_0x13b154[_0x3ab3c1(0xfb)](isLegacyEnvPath,_0x3a09c5))throw legacyWriteError(_0x4224f6,_0x3a09c5);return _0x3a09c5;}}const _0x68eda6=_0x13b154['LVsxw'](join,_0x1c3cb1,_0x13b154[_0x3ab3c1(0xf2)],_0x4224f6);if(_0x375de2['forWrite'])throw _0x13b154[_0x3ab3c1(0xe0)](legacyWriteError,_0x4224f6,_0x68eda6);return _0x68eda6;}function isLegacyEnvPath(_0x58105b){const _0x2eb153=_0x24f2,_0x3211f4={'jdfla':function(_0x3cc36f,_0x1414fd){return _0x3cc36f+_0x1414fd;},'okGCp':function(_0x111440,_0x357962){return _0x111440===_0x357962;}},_0x1a5782=getRangerDir(),_0x1e4266=getRangerHomeDir();for(const _0x29efc9 of new Set([_0x1a5782,_0x1e4266])){const _0x213abe=_0x29efc9['endsWith']('/')?_0x29efc9:_0x3211f4['jdfla'](_0x29efc9,'/');if(_0x3211f4[_0x2eb153(0xd5)](_0x58105b,_0x29efc9)||_0x58105b['startsWith'](_0x213abe))return!![];}return![];}function _0x2695(){const _0x1d383b=['Sghfa','zTzIP','LmqLh','indexOf','args','Refusing\x20to\x20write\x20profile\x20\x22','3LznzZH','-rangerwright.json','--disable-web-security','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','legacy','7825512ATNOTZ','gsNTx','auth.json','filter','DOsyZ','DXdKs','wXeTn','file','executablePath','xxfcs','ranger-config','UeaEO','local','forWrite','includes','SliGV','vision','--no-sandbox','xlxBa','string','vpqyB','install','HlZQI','yFFat','qIgad','safeMode','qckNh','tlkml','baseUrl','message','entries','19035dkyZSJ','isArray','NkuXc','--unsafely-treat-insecure-origin-as-secure=http://localhost','10MJQcdT','LKGUz','contextOptions','object','tTmyf','replace','--disable-features=WebBluetooth','YDQgi','tabs','keys','UNaDo','stringify','fQDlP','cKWxn','storageStatePath','now','10077907EQEZHy','vNlfC','TvvmM','bASjt','LgfjY','wIKSB','YubPz','IfIhP','ieeOT','Failed\x20to\x20decrypt\x20auth\x20state:\x20','mSerM','HtiSq','1987088GLwwkI','UltzP','auth.json.enc','launchOptions','PmqJN','length','--allow-running-insecure-content','Cswjr','okGCp','headless','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','fromEntries','IzPAg','allow','extraHTTPHeaders','FdEFl','locations','tempAuthPath','ISGwu','HCbRu','storageState','seDnU','all','location','userAgent','984hZhFwg','code','8748153ldMpAC','cdpEndpoint','618760RRoZZw','ewSHJ','tHiiD','ENOENT','map','chromium','path','czrZx','rJkhv','repeat','qUZYS','headers','dggAs','YKqLS','playwright-cli','stagehand','towex','QNrCo','CtYgC','HBltW','mLyPE','nova-user-data','1558106duMWzf','catch'];_0x2695=function(){return _0x1d383b;};return _0x2695();}function legacyWriteError(_0x15f46b,_0x489607){const _0x1df971=_0x24f2;return new Error(_0x1df971(0x107)+_0x15f46b+'\x22\x20to\x20legacy\x20path\x20'+_0x489607+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x1df971(0xd7)+_0x1df971(0x10b));}export function findExistingEnv(_0x3fc59f,_0x1e7e70){const _0x1725bb=_0x24f2,_0x5c7a50={'AnpPL':function(_0x1ab32e){return _0x1ab32e();},'zTzIP':function(_0x39c60e,_0x120bb3,_0x4c9743){return _0x39c60e(_0x120bb3,_0x4c9743);},'isDsT':_0x1725bb(0x119),'UeaEO':function(_0x4594f5,_0x545afa,_0x5d6810,_0x39949b){return _0x4594f5(_0x545afa,_0x5d6810,_0x39949b);},'cpNnz':function(_0x302d9c,_0x54bbbd){return _0x302d9c(_0x54bbbd);},'ptmoc':function(_0x1e1fc3,_0x3433e5){return _0x1e1fc3===_0x3433e5;},'ENFhQ':_0x1725bb(0x10c),'IzPAg':function(_0x396a02,_0x101d59){return _0x396a02===_0x101d59;}},_0x917c5d=_0x1e7e70?.['rangerDir'],_0xef8f1f=_0x917c5d?[_0x917c5d]:[_0x5c7a50['AnpPL'](getRangerDir),getRangerHomeDir()][_0x1725bb(0x110)]((_0x98f5b8,_0x474c79,_0x1751c6)=>_0x1751c6[_0x1725bb(0x105)](_0x98f5b8)===_0x474c79),_0x64b35=_0x1e7e70?.[_0x1725bb(0xdd)]??['ci',_0x1725bb(0x119),_0x1725bb(0x10c)];for(const _0x50a86e of _0xef8f1f){const _0x24af4c=_0x5c7a50['zTzIP'](join,_0x50a86e,_0x5c7a50['isDsT']),_0x39210d=_0x5c7a50[_0x1725bb(0x103)](join,_0x50a86e,'ci'),_0x5b3406=[{'location':'ci','path':_0x5c7a50[_0x1725bb(0x118)](join,_0x50a86e,'ci',_0x3fc59f)},{'location':_0x5c7a50['isDsT'],'path':join(_0x50a86e,'local',_0x3fc59f)},{'location':'legacy','path':join(_0x50a86e,_0x3fc59f)}];for(const _0x33a9e8 of _0x5b3406){if(_0x64b35[_0x1725bb(0x11b)](_0x33a9e8[_0x1725bb(0xe4)])&&_0x5c7a50['cpNnz'](existsSync,_0x33a9e8['path'])){if(_0x5c7a50['ptmoc'](_0x33a9e8['location'],_0x5c7a50['ENFhQ'])&&(_0x5c7a50[_0x1725bb(0xd9)](_0x33a9e8['path'],_0x24af4c)||_0x33a9e8[_0x1725bb(0xf0)]===_0x39210d)&&!hasLegacyProfileFiles(_0x33a9e8[_0x1725bb(0xf0)]))continue;return{'path':_0x33a9e8['path'],'location':_0x33a9e8[_0x1725bb(0xe4)]};}}}return null;}function hasLegacyProfileFiles(_0x264491){const _0x25c84a=_0x24f2,_0x3452ab={'wXeTn':function(_0xbebf9a,_0x50b82d,_0xbac6df){return _0xbebf9a(_0x50b82d,_0xbac6df);},'mSerM':function(_0x971543,_0x845153,_0x2eef87){return _0x971543(_0x845153,_0x2eef87);}};return existsSync(_0x3452ab[_0x25c84a(0x113)](join,_0x264491,'settings.json'))||existsSync(_0x3452ab[_0x25c84a(0xcb)](join,_0x264491,_0x25c84a(0x10f)))||existsSync(join(_0x264491,_0x25c84a(0xcf)));}export function isEnvCi(_0x3dcc37){const _0x353847=_0x24f2,_0x9cb3d1={'DOsyZ':function(_0xf690d2,_0x408a1b){return _0xf690d2(_0x408a1b);},'LgfjY':function(_0x403b40,_0x591ffb,_0x20e05a,_0x269bdf){return _0x403b40(_0x591ffb,_0x20e05a,_0x269bdf);},'PZxbs':function(_0x3945c8){return _0x3945c8();},'fQDlP':function(_0x18af47,_0x3ca6d7){return _0x18af47!==_0x3ca6d7;},'tlkml':function(_0x154b1e,_0x3d65c8,_0xe96576,_0x3971f1){return _0x154b1e(_0x3d65c8,_0xe96576,_0x3971f1);}};if(_0x9cb3d1[_0x353847(0x111)](existsSync,_0x9cb3d1[_0x353847(0xc5)](join,getRangerDir(),'ci',_0x3dcc37)))return!![];const _0x47eba9=_0x9cb3d1['PZxbs'](getRangerHomeDir);if(_0x9cb3d1[_0x353847(0xbd)](_0x47eba9,_0x9cb3d1['PZxbs'](getRangerDir))&&existsSync(_0x9cb3d1[_0x353847(0x128)](join,_0x47eba9,'ci',_0x3dcc37)))return!![];return![];}export async function cleanupTempFiles(_0x2b455e){const _0xab0929=_0x24f2,_0x4d4097=[_0x2b455e[_0xab0929(0xde)],_0x2b455e['configPath']]['filter'](Boolean);await Promise[_0xab0929(0xe3)](_0x4d4097[_0xab0929(0xee)](_0x170b22=>unlink(_0x170b22)['catch'](_0x515dc0=>{const _0x4868f3=_0xab0929;_0x515dc0[_0x4868f3(0xe7)]!==_0x4868f3(0xed)&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x170b22+':',_0x515dc0[_0x4868f3(0xab)]);})));}export function getSettingsPath(_0x53bab0){const _0x4f2e37={'rOJqu':function(_0x2c97a6,_0xb52035,_0x8bd96d){return _0x2c97a6(_0xb52035,_0x8bd96d);},'Qtrdi':'settings.json'};return _0x4f2e37['rOJqu'](join,getEnvDir(_0x53bab0),_0x4f2e37['Qtrdi']);}export async function loadSettings(_0x2f03fa){const _0x25fcf1=_0x24f2,_0x594e5f={'DXdKs':function(_0x25b482,_0xe6ce08){return _0x25b482(_0xe6ce08);},'Cswjr':function(_0x5c812d,_0xfe7cb3,_0x3fde9d){return _0x5c812d(_0xfe7cb3,_0x3fde9d);}},_0x2e38a8=_0x594e5f[_0x25fcf1(0x112)](getSettingsPath,_0x2f03fa);if(!existsSync(_0x2e38a8))return{};try{const _0x479b52=await _0x594e5f[_0x25fcf1(0xd4)](readFile,_0x2e38a8,'utf-8');return JSON['parse'](_0x479b52);}catch{return{};}}export async function saveSettings(_0x47090b,_0x5fd6c9){const _0x494576=_0x24f2,_0x5b197e={'UltzP':function(_0x2e3d81,_0x54825f){return _0x2e3d81(_0x54825f);}},_0x66f35c=getSettingsPath(_0x47090b),_0x245304=_0x5b197e['UltzP'](dirname,_0x66f35c);!_0x5b197e[_0x494576(0xce)](existsSync,_0x245304)&&await mkdir(_0x245304,{'recursive':!![]}),await writeFile(_0x66f35c,JSON[_0x494576(0xbc)](_0x5fd6c9,null,0x2));}export function resolveEnvVars(_0x4a9dc0){const _0x238cd5=_0x24f2,_0x1b80a8={'Sghfa':function(_0x3404cc,_0x4ca29d){return _0x3404cc===_0x4ca29d;},'czrZx':_0x238cd5(0xb4)};if(typeof _0x4a9dc0===_0x238cd5(0x120))return _0x4a9dc0[_0x238cd5(0xb6)](/\$\{(\w+)\}/g,(_0x8c160d,_0x278d7a)=>{const _0x17a400=_0x238cd5,_0x4eee6c=process['env'][_0x278d7a];if(_0x1b80a8[_0x17a400(0x102)](_0x4eee6c,undefined))throw new Error('Environment\x20variable\x20'+_0x278d7a+'\x20is\x20not\x20set');return _0x4eee6c;});if(Array[_0x238cd5(0xae)](_0x4a9dc0))return _0x4a9dc0[_0x238cd5(0xee)](resolveEnvVars);if(_0x4a9dc0&&_0x1b80a8['Sghfa'](typeof _0x4a9dc0,_0x1b80a8[_0x238cd5(0xf1)]))return Object[_0x238cd5(0xd8)](Object[_0x238cd5(0xac)](_0x4a9dc0)[_0x238cd5(0xee)](([_0x502bd1,_0x13af4b])=>[_0x502bd1,resolveEnvVars(_0x13af4b)]));return _0x4a9dc0;}const isRecord=_0x1f2b07=>typeof _0x1f2b07===_0x231513(0xb4)&&_0x1f2b07!==null&&!Array['isArray'](_0x1f2b07),asRecord=_0x435501=>isRecord(_0x435501)?_0x435501:undefined,mergeHeaders=(_0x45476d,_0x376958)=>{const _0x328833=_0x231513,_0x425c34={..._0x45476d??{},..._0x376958??{}};return Object[_0x328833(0xba)](_0x425c34)[_0x328833(0xd2)]?_0x425c34:undefined;},SAFE_MODE_ARGS=[_0x231513(0xb7)],ALLOW_LOCALHOST_ARGS=[_0x231513(0x10a),_0x231513(0xd3),_0x231513(0xb0),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x5a6ad2,_0xc5e810={}){const _0x2ad086=_0x231513,_0x3b0a21={'oTBui':function(_0x311a51,_0x1a8d3e){return _0x311a51===_0x1a8d3e;},'mMDIa':function(_0x5093b6,_0x36fe25,_0xf14c08){return _0x5093b6(_0x36fe25,_0xf14c08);},'ISGwu':function(_0x4bbf44,_0x245023){return _0x4bbf44(_0x245023);}},_0x5ebf6b=asRecord(_0x5a6ad2['browser']),_0x48df40={...asRecord(_0x5ebf6b?.[_0x2ad086(0xd0)])??{}};typeof _0xc5e810['headless']==='boolean'&&(_0x48df40['headless']=_0xc5e810[_0x2ad086(0xd6)]);if(_0x5a6ad2['safeMode']){const _0x1d60f4=_0x48df40['args']??[],_0x214f33=SAFE_MODE_ARGS[_0x2ad086(0x110)](_0x298ff8=>!_0x1d60f4[_0x2ad086(0x11b)](_0x298ff8));_0x48df40[_0x2ad086(0x106)]=[..._0x1d60f4,..._0x214f33];}if(_0x5a6ad2['allowInsecureLocalhost']){const _0x328f44=_0x48df40[_0x2ad086(0x106)]??[],_0x48a770=ALLOW_LOCALHOST_ARGS['filter'](_0x42fb97=>!_0x328f44['includes'](_0x42fb97));_0x48df40[_0x2ad086(0x106)]=[..._0x328f44,..._0x48a770];}const _0x4cfd74={...asRecord(_0x5ebf6b?.['contextOptions'])??{}};_0x4cfd74['ignoreHTTPSErrors']=!![];_0x3b0a21['oTBui'](typeof _0x5a6ad2[_0x2ad086(0xe5)],'string')&&(_0x4cfd74[_0x2ad086(0xe5)]=_0x5a6ad2['userAgent']);const _0x13ba27=_0x3b0a21['mMDIa'](mergeHeaders,_0x3b0a21[_0x2ad086(0xdf)](asRecord,_0x4cfd74[_0x2ad086(0xdb)]),asRecord(_0x5a6ad2[_0x2ad086(0xf5)]));return _0x13ba27?_0x4cfd74[_0x2ad086(0xdb)]=_0x13ba27:delete _0x4cfd74[_0x2ad086(0xdb)],_0xc5e810[_0x2ad086(0xbf)]&&(_0x4cfd74['storageState']=_0xc5e810[_0x2ad086(0xbf)]),{'launchOptions':_0x48df40,'contextOptions':_0x4cfd74};}export async function resolveProfileStorageState(_0xe74d73){const _0xaffb07={'qnxsZ':function(_0x373d72,_0x9c7e92){return _0x373d72(_0x9c7e92);}};return _0xaffb07['qnxsZ'](resolveLocalAuthPath,getEnvDir(_0xe74d73));}async function resolveLocalAuthPath(_0x25a3e9){const _0x5b31bd=_0x231513,_0x51c972={'qckNh':'auth.json.enc','zPEQO':function(_0x1745aa,_0x2d42b6,_0x18c5fb){return _0x1745aa(_0x2d42b6,_0x18c5fb);},'tTmyf':'auth.json','EhqnK':function(_0x3204d5){return _0x3204d5();},'ieeOT':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','HtiSq':function(_0x20f5bf,_0x3518fc){return _0x20f5bf(_0x3518fc);},'BgbIM':function(_0x28f976,_0x8e6ab7,_0x32b701){return _0x28f976(_0x8e6ab7,_0x32b701);},'aoErf':function(_0x400078){return _0x400078();},'YIZcj':function(_0x47582f,_0x4fdb3f){return _0x47582f instanceof _0x4fdb3f;},'GSYqT':function(_0x548059,_0x3c558a){return _0x548059(_0x3c558a);}},_0x384d78=join(_0x25a3e9,_0x51c972[_0x5b31bd(0x127)]),_0x11b435=_0x51c972['zPEQO'](join,_0x25a3e9,_0x51c972[_0x5b31bd(0xb5)]);if(existsSync(_0x384d78))try{const _0x53746a=await _0x51c972['EhqnK'](getToken);if(!_0x53746a)throw new Error(_0x51c972[_0x5b31bd(0xc9)]);const _0x5729a5=await _0x51c972[_0x5b31bd(0xcc)](readFile,_0x384d78),_0x15bb02=_0x51c972['BgbIM'](decrypt,_0x5729a5,_0x53746a),_0x4a9108=_0x51c972['zPEQO'](join,_0x51c972['aoErf'](tmpdir),'ranger-auth-'+Date[_0x5b31bd(0xc0)]()+'.json');return await writeFile(_0x4a9108,_0x15bb02),{'storageStatePath':_0x4a9108,'tempAuthPath':_0x4a9108};}catch(_0x24e8e0){const _0x349c9b=_0x51c972['YIZcj'](_0x24e8e0,Error)?_0x24e8e0['message']:_0x51c972['GSYqT'](String,_0x24e8e0);throw new Error(_0x5b31bd(0xca)+_0x349c9b);}if(_0x51c972['GSYqT'](existsSync,_0x11b435))return{'storageStatePath':_0x11b435};return{};}export async function buildPlaywrightConfig(_0xa5502c,_0x6bd1a1,_0x1e2041,_0x2be100,_0x52d5e7){const _0x5d56c8=_0x231513,_0xd34f68={'mLyPE':function(_0x55e174,_0x3d5416){return _0x55e174(_0x3d5416);},'vORFK':function(_0x1d39a3,_0x3755c4,_0x556ccd,_0x3736b8,_0x107f4e,_0x21e21c,_0x16ba30){return _0x1d39a3(_0x3755c4,_0x556ccd,_0x3736b8,_0x107f4e,_0x21e21c,_0x16ba30);},'vxpHo':'stagehand'};if(_0x52d5e7)return buildPlaywrightConfigCore(_0xa5502c,_0x52d5e7,_0x6bd1a1,_0x1e2041,_0x2be100,_0x5d56c8(0xf9));const {storageStatePath:_0x1b0067,tempAuthPath:_0xc1ce94}=await _0xd34f68[_0x5d56c8(0xfe)](resolveLocalAuthPath,getEnvDir(_0x6bd1a1));try{const _0x271e8d=await _0xd34f68['vORFK'](buildPlaywrightConfigCore,_0xa5502c,_0x1b0067,_0x6bd1a1,_0x1e2041,_0x2be100,_0xd34f68['vxpHo']);return{..._0x271e8d,'tempAuthPath':_0xc1ce94};}catch(_0x4fbc10){_0xc1ce94&&await unlink(_0xc1ce94)[_0x5d56c8(0x101)](()=>{});throw _0x4fbc10;}}export async function buildPlaywrightConfigCore(_0x3e4026,_0xba1c9d,_0x4b76a0,_0x1cc6aa,_0x1bc1ca,_0x2e58a5=_0x231513(0xf9)){const _0x5c3cf7=_0x231513,_0x167eab={'wecoP':function(_0x1938f9,_0x198804){return _0x1938f9===_0x198804;},'SliGV':'--no-sandbox','HBltW':'clipboard-write','hgyyv':function(_0x357b70,_0x403ebc){return _0x357b70(_0x403ebc);},'rzuuP':'chromium','LKGUz':_0x5c3cf7(0xf8),'ETXEm':_0x5c3cf7(0xb9),'FdEFl':_0x5c3cf7(0x122),'vNlfC':_0x5c3cf7(0x11d),'PmqJN':function(_0x254932,_0x2c58a5){return _0x254932===_0x2c58a5;},'RxdkZ':function(_0x23842b,_0x2f48c3,_0x159a57){return _0x23842b(_0x2f48c3,_0x159a57);},'xxfcs':_0x5c3cf7(0x117),'YKqLS':'-cli'},_0x4b57fe=_0x1cc6aa||randomUUID(),_0xe03ddc=join(getRangerDir(),'sessions',_0x4b57fe),_0x52f30a=_0x167eab['hgyyv'](Boolean,_0x3e4026[_0x5c3cf7(0xe9)]),_0xd3550a=_0x52f30a?{'browserName':_0x167eab['rzuuP'],'cdpEndpoint':_0x3e4026['cdpEndpoint']}:((()=>{const _0x474fe7=_0x5c3cf7,{launchOptions:_0x29c57b,contextOptions:_0x11a6c1}=buildBrowserOptionsFromSettings(_0x3e4026,{'headless':_0x1bc1ca?![]:_0x3e4026[_0x474fe7(0xd6)]??!![],'storageStatePath':_0xba1c9d});if(_0x167eab['wecoP'](process['getuid']?.(),0x0)){const _0x60581e=[_0x167eab[_0x474fe7(0x11c)],'--disable-setuid-sandbox'],_0x468d93=_0x29c57b['args']??[],_0xe10c2a=_0x60581e['filter'](_0x23c75b=>!_0x468d93[_0x474fe7(0x11b)](_0x23c75b));_0x29c57b[_0x474fe7(0x106)]=[..._0x468d93,..._0xe10c2a];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x29c57b,'contextOptions':{..._0x11a6c1,'permissions':['clipboard-read',_0x167eab[_0x474fe7(0xfd)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x22a0fa=_0x167eab['wecoP'](_0x2e58a5,_0x167eab[_0x5c3cf7(0xb2)])?{'browser':_0xd3550a,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xe03ddc,'outputMode':_0x5c3cf7(0x114),'codegen':'none'}:{'name':_0x4b76a0,'browser':_0xd3550a,'capabilities':['core',_0x167eab['ETXEm'],_0x167eab[_0x5c3cf7(0xdc)],'pdf',_0x167eab[_0x5c3cf7(0xc2)]],'imageResponses':_0x5c3cf7(0xda),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xe03ddc};if(!_0x52f30a){const _0x3f536f=_0x22a0fa['browser'],_0x215028=_0x3f536f[_0x5c3cf7(0xb3)];if(_0x167eab[_0x5c3cf7(0xd1)](_0x215028[_0x5c3cf7(0xe5)],undefined))delete _0x215028['userAgent'];if(_0x215028['storageState']===undefined)delete _0x215028[_0x5c3cf7(0xe1)];}const _0x153ffc=_0x167eab['RxdkZ'](join,tmpdir(),_0x167eab[_0x5c3cf7(0x116)]);!existsSync(_0x153ffc)&&await mkdir(_0x153ffc,{'recursive':!![]});const _0x24aa15=_0x167eab['PmqJN'](_0x2e58a5,'playwright-cli')?_0x167eab[_0x5c3cf7(0xf7)]:'',_0x229ecf=_0x167eab['RxdkZ'](join,_0x153ffc,_0x4b76a0+'-'+Date['now']()+_0x24aa15+'.json');return await writeFile(_0x229ecf,JSON['stringify'](_0x22a0fa,null,0x2)),{'configPath':_0x229ecf,'storageStatePath':_0xba1c9d};}export async function buildPlaywrightCliConfig(_0xb94e09,_0x649c79,_0x1c96c2,_0x535c45,_0x343b68){const _0x159bca=_0x231513,_0x4fba9e={'cKWxn':function(_0x101156,_0x527c9a,_0x24aa2c,_0x4c0df1,_0x54fe77,_0x2fdef2,_0xa0ba40){return _0x101156(_0x527c9a,_0x24aa2c,_0x4c0df1,_0x54fe77,_0x2fdef2,_0xa0ba40);},'sNIOQ':function(_0x5c64f6,_0x4a242a){return _0x5c64f6(_0x4a242a);},'tHiiD':_0x159bca(0xf8)};if(_0x343b68)return _0x4fba9e[_0x159bca(0xbe)](buildPlaywrightConfigCore,_0xb94e09,_0x343b68,_0x649c79,_0x1c96c2,_0x535c45,'playwright-cli');const {storageStatePath:_0x37bff9,tempAuthPath:_0x11715e}=await _0x4fba9e['sNIOQ'](resolveLocalAuthPath,getEnvDir(_0x649c79));try{const _0x19364e=await buildPlaywrightConfigCore(_0xb94e09,_0x37bff9,_0x649c79,_0x1c96c2,_0x535c45,_0x4fba9e[_0x159bca(0xec)]);return{..._0x19364e,'tempAuthPath':_0x11715e};}catch(_0x37a063){_0x11715e&&await unlink(_0x11715e)['catch'](()=>{});throw _0x37a063;}}export async function buildRangerwrightCliConfig(_0x231b66,_0xb46bbd,_0x49392a,_0xd20f54,_0x3890d0){const _0x497afb=_0x231513,_0x2c4080={'xYtuZ':function(_0x3ae340,_0x25fd05){return _0x3ae340===_0x25fd05;},'hBxvm':'--disable-setuid-sandbox','xlxBa':_0x497afb(0xef),'zGpFO':function(_0x5d7a71,_0x2d572c){return _0x5d7a71(_0x2d572c);},'tnIoO':function(_0x2c3bb8){return _0x2c3bb8();},'UNaDo':function(_0x12a901,_0x4296d4,_0x4ce32e){return _0x12a901(_0x4296d4,_0x4ce32e);},'ewSHJ':function(_0xb09a9e,_0x295800){return _0xb09a9e(_0x295800);},'gsNTx':function(_0x2d9d34,_0xcf56b2,_0x29633c){return _0x2d9d34(_0xcf56b2,_0x29633c);}},{storageStatePath:_0x38ba9d,tempAuthPath:_0x323206}=_0x3890d0?{'storageStatePath':_0x3890d0,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x2c4080['zGpFO'](getEnvDir,_0xb46bbd)),_0x1f8b35=_0x49392a||_0x2c4080['tnIoO'](randomUUID),_0x3a2fd7=join(getRangerDir(),'sessions',_0x1f8b35),_0x22fbe6=Boolean(_0x231b66[_0x497afb(0xe9)]),_0x44c0a5=_0x22fbe6?{'browserName':_0x2c4080[_0x497afb(0x11f)],'cdpEndpoint':_0x231b66['cdpEndpoint']}:((()=>{const _0x165b63=_0x497afb,{launchOptions:_0x5859c8,contextOptions:_0x3236b4}=buildBrowserOptionsFromSettings(_0x231b66,{'headless':_0xd20f54?![]:_0x231b66['headless']??!![],'storageStatePath':_0x38ba9d});if(_0x2c4080['xYtuZ'](process['getuid']?.(),0x0)){const _0x41ed75=[_0x165b63(0x11e),_0x2c4080['hBxvm']],_0x53d254=_0x5859c8[_0x165b63(0x106)]??[],_0x21bd62=_0x41ed75[_0x165b63(0x110)](_0x4beffc=>!_0x53d254[_0x165b63(0x11b)](_0x4beffc));_0x5859c8['args']=[..._0x53d254,..._0x21bd62];}return{'browserName':_0x2c4080['xlxBa'],'launchOptions':_0x5859c8,'contextOptions':{..._0x3236b4,'permissions':['clipboard-read','clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x22fbe6){const _0x7b4613=_0x44c0a5[_0x497afb(0xb3)];if(_0x7b4613){if(_0x7b4613[_0x497afb(0xe5)]===undefined)delete _0x7b4613['userAgent'];if(_0x7b4613[_0x497afb(0xe1)]===undefined)delete _0x7b4613['storageState'];}}const _0x23889b={'browser':_0x44c0a5,'outputDir':_0x3a2fd7,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x4b8f67;try{const _0x5b01ee=_0x2c4080[_0x497afb(0xbb)](join,_0x2c4080['tnIoO'](tmpdir),_0x497afb(0x117));!_0x2c4080[_0x497afb(0xeb)](existsSync,_0x5b01ee)&&await mkdir(_0x5b01ee,{'recursive':!![]}),_0x4b8f67=join(_0x5b01ee,_0xb46bbd+'-'+Date['now']()+_0x497afb(0x109)),await _0x2c4080[_0x497afb(0x10e)](writeFile,_0x4b8f67,JSON[_0x497afb(0xbc)](_0x23889b,null,0x2));}catch(_0x3cda46){_0x323206&&await unlink(_0x323206)[_0x497afb(0x101)](()=>{});throw _0x3cda46;}return{'configPath':_0x4b8f67,'storageStatePath':_0x38ba9d,'tempAuthPath':_0x323206,'outputDir':_0x3a2fd7};}export async function buildNovaActCliConfig(_0x86679,_0x340acb,_0x3e7bc5,_0x3ed65f,_0x1af4a8){const _0x545754=_0x231513,_0x2b6d7f={'dggAs':function(_0x443081,_0x2966b5){return _0x443081(_0x2966b5);},'vpqyB':function(_0x5b8064){return _0x5b8064();},'uEWWk':'sessions','jKSXA':_0x545754(0xff),'YubPz':function(_0x1490b6,_0x4e73ad,_0x18891d){return _0x1490b6(_0x4e73ad,_0x18891d);},'dPKMI':'Default','NkuXc':'--disable-setuid-sandbox'},{storageStatePath:_0x3b293f,tempAuthPath:_0x453eb3}=_0x1af4a8?{'storageStatePath':_0x1af4a8,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x2b6d7f['dggAs'](getEnvDir,_0x340acb)),_0x23a8b5=_0x3e7bc5||randomUUID(),_0x470b33=join(_0x2b6d7f[_0x545754(0x121)](getRangerDir),_0x2b6d7f['uEWWk'],_0x23a8b5),_0x1b562d=join(_0x470b33,_0x2b6d7f['jKSXA']),_0xd8f367=_0x3b293f?_0x2b6d7f[_0x545754(0xc7)](join,_0x1b562d,_0x2b6d7f['dPKMI']):undefined,{launchOptions:_0x423e32,contextOptions:_0x19b60e}=buildBrowserOptionsFromSettings(_0x86679,{'headless':_0x3ed65f?![]:_0x86679['headless']??!![],'storageStatePath':_0x3b293f});if(process['getuid']?.()===0x0){const _0x3b9e84=['--no-sandbox',_0x2b6d7f[_0x545754(0xaf)]],_0x2569be=_0x423e32[_0x545754(0x106)]??[],_0xd815fe=_0x3b9e84[_0x545754(0x110)](_0x143c51=>!_0x2569be['includes'](_0x143c51));_0x423e32[_0x545754(0x106)]=[..._0x2569be,..._0xd815fe];}const _0x321425=typeof _0x423e32[_0x545754(0x115)]===_0x545754(0x120)?_0x423e32['executablePath']:_0x3b293f?chromium['executablePath']():undefined;return{'storageStatePath':_0x3b293f,'tempAuthPath':_0x453eb3,'baseUrl':_0x86679[_0x545754(0x129)],'headless':Boolean(_0x423e32['headless']),'userDataDir':_0x1b562d,'browserProfilePath':_0xd8f367,'executablePath':_0x321425,'launchArgs':Array[_0x545754(0xae)](_0x423e32['args'])?_0x423e32[_0x545754(0x106)][_0x545754(0x110)](_0x44acc7=>typeof _0x44acc7===_0x545754(0x120)):[],'userAgent':typeof _0x19b60e['userAgent']===_0x545754(0x120)?_0x19b60e[_0x545754(0xe5)]:undefined,'extraHTTPHeaders':_0x19b60e['extraHTTPHeaders'],'allowInsecureLocalhost':_0x2b6d7f[_0x545754(0xf6)](Boolean,_0x86679['allowInsecureLocalhost']),'safeMode':Boolean(_0x86679[_0x545754(0x126)]),'cdpEndpoint':_0x86679[_0x545754(0xe9)],'isCdpMode':Boolean(_0x86679['cdpEndpoint'])};}export function getNestedValue(_0xb4943f,_0x1175cd){const _0x12def0=_0x231513,_0x448eaf={'iaREM':function(_0x171d07,_0x48b73e){return _0x171d07(_0x48b73e);},'bASjt':function(_0x2c663c,_0x1f29db){return _0x2c663c===_0x1f29db;},'wIKSB':function(_0xb67d3b,_0x5f1b17){return _0xb67d3b===_0x5f1b17;}},_0x4f6dad=_0x448eaf['iaREM'](parseKeyPath,_0x1175cd);let _0x1c5a43=_0xb4943f;for(const _0x3ca1ed of _0x4f6dad){if(_0x448eaf[_0x12def0(0xc4)](_0x1c5a43,null)||_0x448eaf[_0x12def0(0xc6)](_0x1c5a43,undefined)||typeof _0x1c5a43!==_0x12def0(0xb4))return undefined;_0x1c5a43=_0x1c5a43[_0x3ca1ed];}return _0x1c5a43;}export function setNestedValue(_0x15bf49,_0x3262b0,_0x150a14){const _0x43b7c5=_0x231513,_0x8cbd1c={'seDnU':function(_0xc54ba5,_0x5f46d6){return _0xc54ba5-_0x5f46d6;},'tVzJs':function(_0x353c34,_0x2f3520){return _0x353c34 in _0x2f3520;},'PAVJR':function(_0x1ea6d8,_0x528181){return _0x1ea6d8!==_0x528181;}},_0x291102=parseKeyPath(_0x3262b0);let _0x139a62=_0x15bf49;for(let _0x33f050=0x0;_0x33f050<_0x8cbd1c[_0x43b7c5(0xe2)](_0x291102['length'],0x1);_0x33f050++){const _0x353111=_0x291102[_0x33f050];(!_0x8cbd1c['tVzJs'](_0x353111,_0x139a62)||_0x8cbd1c['PAVJR'](typeof _0x139a62[_0x353111],_0x43b7c5(0xb4)))&&(_0x139a62[_0x353111]={}),_0x139a62=_0x139a62[_0x353111];}_0x139a62[_0x291102[_0x291102['length']-0x1]]=_0x150a14;}export function deleteNestedValue(_0x38693c,_0x4001c9){const _0x1cdc5d=_0x231513,_0x2ff0c4={'jKLUl':function(_0x30ef39,_0x2d6745){return _0x30ef39-_0x2d6745;},'HlZQI':function(_0x485ed5,_0x4d23ad){return _0x485ed5===_0x4d23ad;},'CtYgC':function(_0xa0b497,_0x56b236){return _0xa0b497!==_0x56b236;},'LmqLh':'object','YDQgi':function(_0x46de93,_0x339f79){return _0x46de93===_0x339f79;},'dkJkK':function(_0x57a620,_0x512cfc){return _0x57a620-_0x512cfc;}},_0xee1cf4=parseKeyPath(_0x4001c9);let _0x428d29=_0x38693c;for(let _0x2d81b7=0x0;_0x2d81b7<_0x2ff0c4['jKLUl'](_0xee1cf4['length'],0x1);_0x2d81b7++){if(_0x2ff0c4['HlZQI'](_0x428d29,null)||_0x428d29===undefined||_0x2ff0c4[_0x1cdc5d(0xfc)](typeof _0x428d29,_0x2ff0c4['LmqLh']))return![];_0x428d29=_0x428d29[_0xee1cf4[_0x2d81b7]];}if(_0x2ff0c4[_0x1cdc5d(0x123)](_0x428d29,null)||_0x2ff0c4[_0x1cdc5d(0xb8)](_0x428d29,undefined)||_0x2ff0c4[_0x1cdc5d(0xfc)](typeof _0x428d29,_0x2ff0c4[_0x1cdc5d(0x104)]))return![];const _0x3b7227=_0xee1cf4[_0x2ff0c4['dkJkK'](_0xee1cf4['length'],0x1)];if(_0x3b7227 in _0x428d29)return delete _0x428d29[_0x3b7227],!![];return![];}function parseKeyPath(_0x952cc0){const _0x324719={'Ybnqn':function(_0x1eaec6,_0x4946ea){return _0x1eaec6===_0x4946ea;},'Qvnrq':'setupHeaders'},_0x58e8fb=_0x952cc0['split']('.');return _0x324719['Ybnqn'](_0x58e8fb[0x0],'header')&&(_0x58e8fb[0x0]='headers'),_0x58e8fb[0x0]==='setupHeader'&&(_0x58e8fb[0x0]=_0x324719['Qvnrq']),_0x58e8fb;}export function formatSettings(_0x54b9e0,_0x39f9dc=0x0){const _0x4668ac=_0x231513,_0x35c637={'miWvT':function(_0x52453b,_0x25bbf9){return _0x52453b===_0x25bbf9;},'qUZYS':function(_0x59f6e9,_0x1b16a4){return _0x59f6e9===_0x1b16a4;}},_0x13acdb=[],_0x4a88f4='\x20\x20'[_0x4668ac(0xf3)](_0x39f9dc);for(const [_0x401bd2,_0x171d47]of Object['entries'](_0x54b9e0)){if(_0x35c637['miWvT'](_0x171d47,undefined))continue;if(_0x35c637[_0x4668ac(0xf4)](typeof _0x171d47,_0x4668ac(0xb4))&&_0x171d47!==null){_0x13acdb['push'](''+_0x4a88f4+_0x401bd2+':');for(const [_0x4f397d,_0x2e7c1c]of Object[_0x4668ac(0xac)](_0x171d47)){_0x13acdb['push'](_0x4a88f4+'\x20\x20'+_0x4f397d+':\x20'+_0x2e7c1c);}}else _0x13acdb['push'](''+_0x4a88f4+_0x401bd2+':\x20'+_0x171d47);}return _0x13acdb['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45ca96,_0x41affb){const _0x24892a=_0x5ee1,_0x41103b=_0x45ca96();while(!![]){try{const _0x54ab9b=-parseInt(_0x24892a(0x11d))/0x1*(parseInt(_0x24892a(0x122))/0x2)+-parseInt(_0x24892a(0x128))/0x3*(-parseInt(_0x24892a(0x124))/0x4)+parseInt(_0x24892a(0x11f))/0x5*(-parseInt(_0x24892a(0x120))/0x6)+-parseInt(_0x24892a(0x127))/0x7*(-parseInt(_0x24892a(0x121))/0x8)+-parseInt(_0x24892a(0x123))/0x9+-parseInt(_0x24892a(0x126))/0xa*(-parseInt(_0x24892a(0x125))/0xb)+-parseInt(_0x24892a(0x12b))/0xc*(parseInt(_0x24892a(0x11e))/0xd);if(_0x54ab9b===_0x41affb)break;else _0x41103b['push'](_0x41103b['shift']());}catch(_0x2864e3){_0x41103b['push'](_0x41103b['shift']());}}}(_0x5eba,0xbc1df));import{readFileSync}from'fs';function _0x5eba(){const _0x222219=['26hysipo','5SjGlwi','3003276ztJsnj','56beQosS','96BQuwYz','1854819iLWwBj','4keegHR','6441017mQlVhT','10ffcAcT','184919ineimo','4115634fQWhFy','utf-8','skills','2960328lUjCNY','HIRyJ','3579yLKsuF'];_0x5eba=function(){return _0x222219;};return _0x5eba();}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x1ea157){const _0x732ad2=_0x5ee1,_0x54e395={'tfFAk':function(_0x1724df,_0xc42b5c,_0x55c3d8){return _0x1724df(_0xc42b5c,_0x55c3d8);}},_0x1e60ff=join(__dirname,'..','..',_0x732ad2(0x12a)),_0x4bc1d0=join(_0x1e60ff,_0x1ea157);try{return _0x54e395['tfFAk'](readFileSync,_0x4bc1d0,_0x732ad2(0x129));}catch{return'';}}function _0x5ee1(_0x34779f,_0x1ecf0f){_0x34779f=_0x34779f-0x11c;const _0x5ebab7=_0x5eba();let _0x5ee19f=_0x5ebab7[_0x34779f];return _0x5ee19f;}export function getRangerSkillContent(){const _0x2ef212=_0x5ee1,_0x5b1178={'HIRyJ':function(_0x2e1785,_0xf92448){return _0x2e1785(_0xf92448);}};return _0x5b1178[_0x2ef212(0x11c)](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0xc3041e=_0x7c7e;(function(_0x1add21,_0x34508b){const _0x2dfb83=_0x7c7e,_0x1edfca=_0x1add21();while(!![]){try{const _0x2f5003=-parseInt(_0x2dfb83(0x184))/0x1+-parseInt(_0x2dfb83(0x177))/0x2+parseInt(_0x2dfb83(0x17f))/0x3*(parseInt(_0x2dfb83(0x180))/0x4)+-parseInt(_0x2dfb83(0x18b))/0x5*(parseInt(_0x2dfb83(0x17b))/0x6)+-parseInt(_0x2dfb83(0x189))/0x7*(parseInt(_0x2dfb83(0x174))/0x8)+parseInt(_0x2dfb83(0x192))/0x9+parseInt(_0x2dfb83(0x18f))/0xa*(parseInt(_0x2dfb83(0x188))/0xb);if(_0x2f5003===_0x34508b)break;else _0x1edfca['push'](_0x1edfca['shift']());}catch(_0x1d2665){_0x1edfca['push'](_0x1edfca['shift']());}}}(_0x4262,0x565e5));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';function _0x7c7e(_0x1aaad9,_0x11b4ba){_0x1aaad9=_0x1aaad9-0x16d;const _0x4262c5=_0x4262();let _0x7c7e44=_0x4262c5[_0x1aaad9];return _0x7c7e44;}function _0x4262(){const _0xd66daa=['80Mcmtxp','bug-bash','zySFk','match','460tbyumw','dhUJE','whDpl','6176610ikSXOY','HUemg','utf-8','catch','PJxis','\x20\x20Files:\x20','\x20\x20Location:\x20','dvBzm','ranger','216QxdWDj','warn','trim','27142fYcTfQ','e2e-test-recommender','.md','FCHlH','141090DiPjXa','SKILL.md','XOpSc','length','141YxkoeG','876OTjBEZ','iAYNt','log','\x20\x20Removed\x20deprecated\x20skill:\x20','168147erSRIT','Invalid\x20skill\x20frontmatter','fSJXY','join','95777dRQdEo','48062glFjsU','xNTnH'];_0x4262=function(){return _0xd66daa;};return _0x4262();}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=[_0xc3041e(0x173)];export const DEPRECATED_SKILLS=[_0xc3041e(0x178),_0xc3041e(0x18c),'feature-tracker'];export async function installSkill(_0x11fe2f,_0x5e004c={}){const _0x298977=_0xc3041e,_0x31dca3={'dhUJE':'project','TjrTV':'claude','fSJXY':function(_0x1214c2){return _0x1214c2();},'iAYNt':function(_0x5d5f27,_0x305ea8,_0xdd705f){return _0x5d5f27(_0x305ea8,_0xdd705f);},'FCHlH':function(_0x2c4f62,_0x5c721b){return _0x2c4f62(_0x5c721b);},'zySFk':function(_0x18c62,_0x364967,_0x2ff9e1){return _0x18c62(_0x364967,_0x2ff9e1);},'SlNSp':function(_0x293bf2,_0x13a005){return _0x293bf2(_0x13a005);},'PxnqU':_0x298977(0x17c),'HUemg':_0x298977(0x16d),'xNTnH':function(_0x3da74e,_0xe14db,_0x1dffab){return _0x3da74e(_0xe14db,_0x1dffab);},'PJxis':function(_0x12f786,_0x22ce75,_0xc1e631){return _0x12f786(_0x22ce75,_0xc1e631);},'whDpl':function(_0x2f28c0,_0x5204d8,_0x1ab5f7,_0x27effe){return _0x2f28c0(_0x5204d8,_0x1ab5f7,_0x27effe);},'dvBzm':function(_0x1230f6,_0x1ce2e1){return _0x1230f6(_0x1ce2e1);},'Cimkt':function(_0x35013a,_0x82976f,_0x5544d3,_0x41b14c){return _0x35013a(_0x82976f,_0x5544d3,_0x41b14c);}},{level:level=_0x31dca3[_0x298977(0x190)],cliVersion:_0x5d3888,platform:platform=_0x31dca3['TjrTV']}=_0x5e004c,_0x48e656=_0x31dca3[_0x298977(0x186)](getSourceSkillsDir),_0x55ad9b=join(_0x48e656,_0x11fe2f),_0x359f8b=_0x31dca3['iAYNt'](join,_0x48e656,_0x11fe2f+'.md'),_0x890094=existsSync(_0x55ad9b)&&_0x31dca3[_0x298977(0x17a)](statSync,_0x55ad9b)['isDirectory']()&&existsSync(_0x31dca3[_0x298977(0x18d)](join,_0x55ad9b,_0x298977(0x17c))),_0x3ba5c9=existsSync(_0x359f8b);if(!_0x890094&&!_0x3ba5c9)return console[_0x298977(0x175)]('\x20\x20Skill\x20not\x20found:\x20'+_0x11fe2f),![];const _0x22660c=platform==='opencode'?getOpencodeSkillsDir(level):getSkillsDir(level),_0x4675d0=join(_0x22660c,_0x11fe2f);await _0x31dca3[_0x298977(0x181)](mkdir,_0x4675d0,{'recursive':!![]});let _0x1b2936,_0x5b7586=[];if(_0x890094){const _0x37a2ac=await _0x31dca3['SlNSp'](readdir,_0x55ad9b),_0x44c71b=_0x37a2ac['filter'](_0x37d759=>_0x37d759['endsWith'](_0x298977(0x179)));for(const _0x24942b of _0x44c71b){const _0x298985=_0x31dca3[_0x298977(0x18d)](join,_0x55ad9b,_0x24942b),_0x595a96=join(_0x4675d0,_0x24942b);await copyFile(_0x298985,_0x595a96),_0x5b7586['push'](_0x24942b);}_0x1b2936=await _0x31dca3[_0x298977(0x18d)](readFile,join(_0x55ad9b,_0x31dca3['PxnqU']),_0x31dca3[_0x298977(0x193)]);}else{_0x1b2936=await _0x31dca3[_0x298977(0x18a)](readFile,_0x359f8b,'utf-8');const _0x526de5=_0x31dca3[_0x298977(0x16f)](join,_0x4675d0,_0x31dca3['PxnqU']);await _0x31dca3[_0x298977(0x191)](writeFile,_0x526de5,_0x1b2936,_0x298977(0x16d)),_0x5b7586['push']('SKILL.md');}const {name:_0x7e6f75}=_0x31dca3[_0x298977(0x172)](parseFrontmatter,_0x1b2936);return console[_0x298977(0x182)]('\x20\x20Installed\x20skill:\x20'+_0x7e6f75),console['log'](_0x298977(0x171)+_0x4675d0),_0x5b7586[_0x298977(0x17e)]>0x1&&console['log'](_0x298977(0x170)+_0x5b7586[_0x298977(0x187)](',\x20')),_0x31dca3['Cimkt'](logLocalAgentInstallation,_0x11fe2f,{'skillDisplayName':_0x7e6f75,'installLevel':level},_0x5d3888)[_0x298977(0x16e)](()=>{}),!![];}function getSourceSkillsDir(){const _0x4c2b04=_0xc3041e,_0x4e4c78={'XOpSc':'skills'},_0x54e42e=[join(__dirname,'..','..',_0x4e4c78['XOpSc']),join(__dirname,'..','..','..',_0x4e4c78[_0x4c2b04(0x17d)])];for(const _0x55e5e0 of _0x54e42e){if(existsSync(_0x55e5e0))return _0x55e5e0;}return _0x54e42e[0x0];}function parseFrontmatter(_0x176d6c){const _0x8fddd8=_0xc3041e,_0x2aa2fd={'RnmDr':_0x8fddd8(0x185)},_0x103dfa=_0x176d6c[_0x8fddd8(0x18e)](/^---\n([\s\S]+?)\n---/);if(!_0x103dfa)throw new Error(_0x2aa2fd['RnmDr']);const _0x2281cd=_0x103dfa[0x1],_0x2d244c=_0x2281cd['match'](/name:\s*(.+)/),_0x3763f9=_0x2281cd[_0x8fddd8(0x18e)](/description:\s*"?(.+?)"?\n/);return{'name':_0x2d244c?.[0x1][_0x8fddd8(0x176)]()||'','description':_0x3763f9?.[0x1]['trim']()||''};}export async function removeSkill(_0x1412d4,_0x1cd947){const _0x53b021=_0xc3041e,_0x7b29c7={'OOEFb':function(_0x1b2505,_0xb143e0,_0xa3360f){return _0x1b2505(_0xb143e0,_0xa3360f);}},_0x4b5c35=getSkillsDir(_0x1cd947),_0x4188cf=_0x7b29c7['OOEFb'](join,_0x4b5c35,_0x1412d4);if(!existsSync(_0x4188cf))return![];try{return await rm(_0x4188cf,{'recursive':!![]}),console['log'](_0x53b021(0x183)+_0x1412d4),!![];}catch{return console[_0x53b021(0x175)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x1412d4),![];}}
|