@ranger-testing/ranger-cli 2.5.4-alpha.1f7a251-7 → 2.5.4-alpha.2709b75-22
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/README.md +36 -14
- 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 -0
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- 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/opencodeConfig.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/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/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/skills/ranger/SKILL.md +24 -8
- package/build/skills/ranger/create.md +16 -3
- package/build/skills/ranger/verify.md +37 -18
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x365bd4,_0x54cc90){const _0x57b8b8=_0x5b7c,_0xd4784e=_0x365bd4();while(!![]){try{const _0x7dc3b2=-parseInt(_0x57b8b8(0x17f))/0x1+parseInt(_0x57b8b8(0x180))/0x2+parseInt(_0x57b8b8(0x187))/0x3+parseInt(_0x57b8b8(0x18e))/0x4*(-parseInt(_0x57b8b8(0x181))/0x5)+-parseInt(_0x57b8b8(0x17a))/0x6*(-parseInt(_0x57b8b8(0x188))/0x7)+parseInt(_0x57b8b8(0x17c))/0x8+-parseInt(_0x57b8b8(0x18a))/0x9;if(_0x7dc3b2===_0x54cc90)break;else _0xd4784e['push'](_0xd4784e['shift']());}catch(_0x334570){_0xd4784e['push'](_0xd4784e['shift']());}}}(_0x142d,0x2e6ea));function firstDefined(..._0x5d8ec3){const _0x500b7b=_0x5b7c,_0x272570={'htYTK':function(_0x424032,_0x54184b){return _0x424032!==_0x54184b;},'WgwnZ':function(_0xad1935,_0x56d64d){return _0xad1935!==_0x56d64d;}};for(const _0x219986 of _0x5d8ec3){if(_0x272570[_0x500b7b(0x17d)](_0x219986,undefined)&&_0x272570[_0x500b7b(0x189)](_0x219986,null)&&_0x272570['WgwnZ'](_0x219986,''))return _0x219986;}return undefined;}function normalizeAuthEnvironmentDomain(_0x15fef6){if(!_0x15fef6)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x15fef6))return _0x15fef6;return'https://'+_0x15fef6;}export function resolveBaseUrl(_0x3cb9fd){const _0x353520=_0x5b7c,_0xd9d6f0={'VsbdZ':function(_0x182990,_0x355ef3){return _0x182990===_0x355ef3;},'KpCmI':function(_0x185617,_0x5c5ec8){return _0x185617(_0x5c5ec8);}},_0x200ac1=_0x3cb9fd['projectOverrides'],_0x1bed93=!!_0x200ac1&&_0x353520(0x185)in _0x200ac1,_0x1ade22=_0x200ac1?.[_0x353520(0x185)],_0x39a047=!(_0x1bed93&&_0x1ade22===null);return firstDefined(_0x3cb9fd[_0x353520(0x18c)],_0x3cb9fd['envBaseUrl'],_0x3cb9fd[_0x353520(0x183)],_0xd9d6f0['VsbdZ'](typeof _0x1ade22,_0x353520(0x190))?_0x1ade22:undefined,_0x39a047?_0x3cb9fd['cloudSettings']?.[_0x353520(0x185)]:undefined,_0x39a047?_0xd9d6f0[_0x353520(0x184)](normalizeAuthEnvironmentDomain,_0x3cb9fd['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x3e48de){const _0x5d1a9a=_0x5b7c,_0x5a1cce={'lRnBA':_0x5d1a9a(0x18f),'eOjHB':function(_0x9d0969,_0x20c54a){return _0x9d0969===_0x20c54a;}},_0x2d53da=_0x3e48de['projectOverrides'],_0x17e3de=!!_0x2d53da&&_0x5a1cce['lRnBA']in _0x2d53da,_0x59009b=_0x2d53da?.['startPath'],_0x333b07=!(_0x17e3de&&_0x5a1cce[_0x5d1a9a(0x186)](_0x59009b,null));return firstDefined(_0x3e48de[_0x5d1a9a(0x182)],_0x3e48de[_0x5d1a9a(0x17b)],typeof _0x59009b===_0x5d1a9a(0x190)?_0x59009b:undefined,_0x333b07?_0x3e48de[_0x5d1a9a(0x17e)]?.[_0x5d1a9a(0x18f)]:undefined);}export function joinBaseAndPath(_0x135ab9,_0x587cd6){const _0x5d80e3=_0x5b7c,_0x124252={'pRvjB':function(_0x5dc9e9,_0x212cb7){return _0x5dc9e9+_0x212cb7;}};if(!_0x135ab9)return undefined;if(!_0x587cd6)return _0x135ab9;const _0x32e418=_0x135ab9['endsWith']('/')?_0x135ab9['slice'](0x0,-0x1):_0x135ab9,_0x17b854=_0x587cd6['startsWith']('/')?_0x587cd6:'/'+_0x587cd6;return _0x124252[_0x5d80e3(0x191)](_0x32e418,_0x17b854);}function _0x5b7c(_0x538ade,_0x24c508){_0x538ade=_0x538ade-0x17a;const _0x142da3=_0x142d();let _0x5b7cab=_0x142da3[_0x538ade];return _0x5b7cab;}export function resolveProfileUrl(_0x3a1e8f){const _0x22e40e=_0x5b7c,_0x32171e={'boyCo':function(_0x2cebbd,_0xd398ad,_0x11a7dd){return _0x2cebbd(_0xd398ad,_0x11a7dd);}},_0x548b80=resolveBaseUrl(_0x3a1e8f),_0x2c7f34=resolveStartPath(_0x3a1e8f);return{'baseUrl':_0x548b80,'startPath':_0x2c7f34,'url':_0x32171e[_0x22e40e(0x18d)](joinBaseAndPath,_0x548b80,_0x2c7f34)};}export function readUrlEnvVars(_0xea7e11=process['env']){const _0x12c439=_0x5b7c;return{'envBaseUrl':_0xea7e11['RANGER_BASE_URL'],'envStartPath':_0xea7e11[_0x12c439(0x18b)]};}function _0x142d(){const _0x4bc489=['KpCmI','baseUrl','eOjHB','957522gOZrDV','14RINGaT','WgwnZ','5717979lroogx','RANGER_START_PATH','flagBaseUrl','boyCo','102340dZXXGL','startPath','string','pRvjB','1062546cSSqII','envStartPath','2320848RQXBTV','htYTK','cloudSettings','134207XoHstC','197204IwoIfy','20AWIMsW','flagStartPath','localSettingsBaseUrl'];_0x142d=function(){return _0x4bc489;};return _0x142d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4342(_0x1e83c4,_0x1f1faf){_0x1e83c4=_0x1e83c4-0x1b7;const _0x160267=_0x1602();let _0x4342de=_0x160267[_0x1e83c4];return _0x4342de;}(function(_0x51de46,_0x5d0aab){const _0x332165=_0x4342,_0x5b588a=_0x51de46();while(!![]){try{const _0x387a31=parseInt(_0x332165(0x1c4))/0x1+-parseInt(_0x332165(0x1c6))/0x2+parseInt(_0x332165(0x1c7))/0x3*(-parseInt(_0x332165(0x1b8))/0x4)+parseInt(_0x332165(0x1be))/0x5*(-parseInt(_0x332165(0x1ca))/0x6)+-parseInt(_0x332165(0x1b9))/0x7*(parseInt(_0x332165(0x1c0))/0x8)+-parseInt(_0x332165(0x1bb))/0x9*(parseInt(_0x332165(0x1c2))/0xa)+parseInt(_0x332165(0x1bd))/0xb;if(_0x387a31===_0x5d0aab)break;else _0x5b588a['push'](_0x5b588a['shift']());}catch(_0x1abed9){_0x5b588a['push'](_0x5b588a['shift']());}}}(_0x1602,0xba4c1));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x5270ee,_0x3733ed){const _0x55b994=_0x4342,_0x47296d={'EQTen':function(_0xda59fa,_0x169eee){return _0xda59fa instanceof _0x169eee;},'HsoGo':function(_0x53c1d3,_0x2ac2a3){return _0x53c1d3(_0x2ac2a3);},'ehvev':function(_0x49eba7,_0x3bfaa2){return _0x49eba7*_0x3bfaa2;},'QXRnT':function(_0x4c15f9,_0x5bbaba){return _0x4c15f9+_0x5bbaba;}},_0x3fd326=_0x3733ed?.[_0x55b994(0x1b7)]??DEFAULT_MAX_RETRIES,_0x196c23=_0x3733ed?.[_0x55b994(0x1c3)]??DEFAULT_BASE_DELAY_MS;let _0x11b952;for(let _0x477d6e=0x0;_0x477d6e<=_0x3fd326;_0x477d6e++){try{return await _0x5270ee();}catch(_0x146a14){_0x11b952=_0x47296d[_0x55b994(0x1c5)](_0x146a14,Error)?_0x146a14:new Error(_0x47296d[_0x55b994(0x1bf)](String,_0x146a14));if(_0x477d6e<_0x3fd326){const _0x34a29a=_0x47296d[_0x55b994(0x1ba)](_0x196c23,Math['pow'](0x2,_0x477d6e));_0x3733ed?.['label']&&console['error'](_0x3733ed[_0x55b994(0x1c8)]+'\x20failed\x20(attempt\x20'+_0x47296d[_0x55b994(0x1bc)](_0x477d6e,0x1)+'/'+(_0x3fd326+0x1)+_0x55b994(0x1c1)+_0x34a29a+_0x55b994(0x1c9)),await new Promise(_0x294946=>setTimeout(_0x294946,_0x34a29a));}}}throw _0x11b952;}function _0x1602(){const _0x2c814c=['8twbUaF','),\x20retrying\x20in\x20','13616390rNWOkJ','baseDelayMs','305636Mnbwls','EQTen','1234560HrMfmH','5262MuqTrf','label','ms...','12nOIXMi','maxRetries','1088nUzLkp','3248126drjCQz','ehvev','9kurIzT','QXRnT','49435672ihnVjm','2791725iDSGFN','HsoGo'];_0x1602=function(){return _0x2c814c;};return _0x1602();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1e6dd1=_0x17dc;(function(_0x31a41c,_0x15bb4a){const _0x153290=_0x17dc,_0x5f2bc2=_0x31a41c();while(!![]){try{const _0x324343=-parseInt(_0x153290(0x169))/0x1+parseInt(_0x153290(0x164))/0x2+-parseInt(_0x153290(0x148))/0x3+parseInt(_0x153290(0x14c))/0x4*(parseInt(_0x153290(0x158))/0x5)+parseInt(_0x153290(0x13d))/0x6*(-parseInt(_0x153290(0x16e))/0x7)+parseInt(_0x153290(0x144))/0x8*(parseInt(_0x153290(0x165))/0x9)+parseInt(_0x153290(0x16c))/0xa*(parseInt(_0x153290(0x15d))/0xb);if(_0x324343===_0x15bb4a)break;else _0x5f2bc2['push'](_0x5f2bc2['shift']());}catch(_0xf29334){_0x5f2bc2['push'](_0x5f2bc2['shift']());}}}(_0x18ca,0x72b41));import*as _0x3c986d from'fs';function _0x17dc(_0x556fc1,_0x340183){_0x556fc1=_0x556fc1-0x13c;const _0x18cacd=_0x18ca();let _0x17dc8f=_0x18cacd[_0x556fc1];return _0x17dc8f;}import*as _0x4522c8 from'path';import*as _0x509891 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4522c8[_0x1e6dd1(0x142)](_0x509891[_0x1e6dd1(0x16b)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x136d42=_0x1e6dd1,_0x636739={'uFMFy':_0x136d42(0x168)};try{if(_0x3c986d[_0x136d42(0x159)](CACHE_FILE)){const _0x366ef0=JSON['parse'](_0x3c986d[_0x136d42(0x150)](CACHE_FILE,_0x636739[_0x136d42(0x13f)]));return{'version':0x3,'sessions':_0x366ef0[_0x136d42(0x14a)]||{},'branches':_0x366ef0[_0x136d42(0x167)]||{},'lastEnabledSessionClearedAt':_0x366ef0['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x200572){const _0x32c34e=_0x1e6dd1;try{const _0x1aa135=_0x4522c8[_0x32c34e(0x151)](CACHE_FILE);!_0x3c986d[_0x32c34e(0x159)](_0x1aa135)&&_0x3c986d[_0x32c34e(0x15b)](_0x1aa135,{'recursive':!![]}),_0x3c986d[_0x32c34e(0x152)](CACHE_FILE,JSON['stringify'](_0x200572,null,0x2));}catch{}}export function getCurrentBranch(){const _0x15956b=_0x1e6dd1,_0x59b1b6={'urQev':function(_0x3a856d,_0x44a322,_0x4db634){return _0x3a856d(_0x44a322,_0x4db634);},'gqXwk':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','lyXHt':'utf-8','czyNF':'pipe','PAhAi':function(_0x414e11,_0x8aecc7){return _0x414e11===_0x8aecc7;}};try{const _0x2c620d=_0x59b1b6[_0x15956b(0x15f)](execSync,_0x59b1b6[_0x15956b(0x154)],{'encoding':_0x59b1b6['lyXHt'],'stdio':[_0x59b1b6[_0x15956b(0x14e)],_0x59b1b6['czyNF'],_0x59b1b6[_0x15956b(0x14e)]]})['trim']();if(!_0x2c620d||_0x59b1b6[_0x15956b(0x14f)](_0x2c620d,'HEAD'))return null;return _0x2c620d;}catch{return null;}}export function enableBranch(_0x477ec7){const _0x1d181b=_0x1e6dd1,_0x583d7b={'QWAlp':function(_0x32d712,_0x1b21a2){return _0x32d712(_0x1b21a2);}},_0x11def9=loadCache();_0x11def9[_0x1d181b(0x167)][_0x477ec7]=!![],_0x583d7b[_0x1d181b(0x13c)](saveCache,_0x11def9);}export function disableBranch(_0x850565){const _0x2aba30=_0x1e6dd1,_0x2cb7bb={'vShPK':function(_0x3f089a){return _0x3f089a();}},_0x229a80=_0x2cb7bb[_0x2aba30(0x149)](loadCache);delete _0x229a80['branches'][_0x850565],saveCache(_0x229a80);}export function isBranchEnabled(_0xa5dfc4){const _0xdbd1fe=_0x1e6dd1,_0x5f286b={'toDTv':function(_0x33f652,_0x333b36){return _0x33f652===_0x333b36;}},_0x243fa3=loadCache();return _0x5f286b[_0xdbd1fe(0x145)](_0x243fa3['branches'][_0xa5dfc4],!![]);}function getOrCreateSession(_0x56621c,_0x2ce0a8){const _0x506e3b=_0x1e6dd1;return!_0x56621c['sessions'][_0x2ce0a8]&&(_0x56621c['sessions'][_0x2ce0a8]={}),_0x56621c[_0x506e3b(0x14a)][_0x2ce0a8];}export function enableSession(_0x5ef5ee){const _0x1e6c67=_0x1e6dd1,_0x2e20ce={'dWgUs':function(_0x8bb605){return _0x8bb605();},'hHkos':_0x1e6c67(0x163),'hkLIv':function(_0x19c640,_0x2ddd98){return _0x19c640!==_0x2ddd98;}},_0x186fd5=loadCache(),_0x186858=getOrCreateSession(_0x186fd5,_0x5ef5ee);_0x186858['enabled']=!![];const _0x311e3d=_0x2e20ce[_0x1e6c67(0x146)](getCurrentBranch);_0x311e3d&&_0x311e3d!==_0x2e20ce['hHkos']&&_0x2e20ce['hkLIv'](_0x311e3d,'master')&&(_0x186fd5['branches'][_0x311e3d]=!![],_0x186858['currentBranch']=_0x311e3d),saveCache(_0x186fd5);}export function isSessionEnabled(_0xf00c88){const _0x6c81e=_0x1e6dd1,_0x3d075b={'prdlJ':function(_0x3adbe1,_0x34a5af){return _0x3adbe1===_0x34a5af;},'ATUpe':_0x6c81e(0x163),'mOPHS':function(_0x462353,_0x313d67){return _0x462353===_0x313d67;},'mJzZE':function(_0xd1af1b,_0x331bc9){return _0xd1af1b===_0x331bc9;}},_0x3972c2=loadCache(),_0x52ea55=getCurrentBranch();if(!_0x52ea55||_0x3d075b['prdlJ'](_0x52ea55,_0x3d075b['ATUpe'])||_0x3d075b[_0x6c81e(0x147)](_0x52ea55,'master'))return _0x3972c2[_0x6c81e(0x14a)][_0xf00c88]?.['enabled']===!![];const _0x2ff27e=_0x3972c2['branches'][_0x52ea55]===!![],_0x5539d1=_0x3d075b[_0x6c81e(0x140)](_0x3972c2[_0x6c81e(0x14a)][_0xf00c88]?.['enabled'],!![]);return _0x2ff27e||_0x5539d1;}export function disableSession(_0xe4b18){const _0x425c52=_0x1e6dd1,_0xeab247={'UDxma':function(_0xbf7195,_0x190d3e){return _0xbf7195(_0x190d3e);}},_0x20f803=loadCache(),_0x4b8da7=getOrCreateSession(_0x20f803,_0xe4b18);_0x4b8da7[_0x425c52(0x16f)]=![],_0xeab247['UDxma'](saveCache,_0x20f803);}export function updateBranchTracking(_0x56d91f){const _0x2e5909=_0x1e6dd1,_0x1b71a6={'NOdBO':function(_0x5b3bed){return _0x5b3bed();},'ETMIp':function(_0x7c751f,_0x962d72){return _0x7c751f===_0x962d72;},'WfSxf':function(_0x4dc830,_0x2d65d1){return _0x4dc830(_0x2d65d1);}},_0x14b684=_0x1b71a6['NOdBO'](loadCache),_0x413eab=_0x14b684['sessions'][_0x56d91f];if(!_0x413eab?.['enabled'])return;const _0x1023c7=_0x1b71a6['NOdBO'](getCurrentBranch);if(!_0x1023c7||_0x1023c7===_0x2e5909(0x163)||_0x1b71a6[_0x2e5909(0x15a)](_0x1023c7,_0x2e5909(0x157)))return;_0x413eab[_0x2e5909(0x15e)]!==_0x1023c7&&(_0x14b684[_0x2e5909(0x167)][_0x1023c7]=!![],_0x413eab[_0x2e5909(0x15e)]=_0x1023c7,_0x1b71a6[_0x2e5909(0x172)](saveCache,_0x14b684));}export function initBranchTracking(_0x3a7cb7){const _0x1f3ae2=_0x1e6dd1,_0x33674f={'YAEIM':function(_0x93e858){return _0x93e858();},'LOZiF':function(_0x5ab255,_0x16740d){return _0x5ab255===_0x16740d;},'qHuPS':_0x1f3ae2(0x157),'obYgZ':function(_0x48452f,_0x422880,_0x1ebd73){return _0x48452f(_0x422880,_0x1ebd73);},'IihvI':function(_0xcbe085,_0x38682c){return _0xcbe085(_0x38682c);}},_0x4edaf2=_0x33674f['YAEIM'](loadCache),_0x9b31ed=getCurrentBranch();if(!_0x9b31ed||_0x9b31ed==='main'||_0x33674f['LOZiF'](_0x9b31ed,_0x33674f['qHuPS']))return;if(_0x4edaf2[_0x1f3ae2(0x167)][_0x9b31ed]===!![]){const _0x388301=_0x33674f[_0x1f3ae2(0x155)](getOrCreateSession,_0x4edaf2,_0x3a7cb7);_0x388301['enabled']=!![],_0x388301[_0x1f3ae2(0x15e)]=_0x9b31ed,_0x33674f[_0x1f3ae2(0x14d)](saveCache,_0x4edaf2);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0xc5d59d){const _0x48eada=_0x1e6dd1,_0x265bda={'rjYKN':function(_0x3f2283){return _0x3f2283();}},_0x47cea6=_0x265bda['rjYKN'](loadCache),_0xf97690=_0x47cea6[_0x48eada(0x14a)][_0xc5d59d];_0xf97690?.[_0x48eada(0x16f)]&&(_0x47cea6[_0x48eada(0x171)]=Date['now'](),saveCache(_0x47cea6));}export function shouldAutoEnableAfterClear(_0x2d5197){const _0x148dc9=_0x1e6dd1,_0x220a43={'JtkVL':function(_0x12c189,_0x10c3e7){return _0x12c189!==_0x10c3e7;},'uZhgV':_0x148dc9(0x16a)};if(_0x220a43[_0x148dc9(0x15c)](_0x2d5197,_0x220a43[_0x148dc9(0x156)]))return![];const _0x4a3c20=loadCache(),_0x3d7010=_0x4a3c20[_0x148dc9(0x171)];if(!_0x3d7010)return![];const _0x4c03a4=Date['now']()-_0x3d7010;return _0x4c03a4<=CLEAR_AUTO_ENABLE_WINDOW_MS;}function _0x18ca(){const _0xdf2c29=['514984YjTUqL','IihvI','czyNF','PAhAi','readFileSync','dirname','writeFileSync','ADCZq','gqXwk','obYgZ','uZhgV','master','10sePmDC','existsSync','ETMIp','mkdirSync','JtkVL','107162LyIfHn','currentBranch','urQev','taCEm','mUvvU','featureId','main','364168bvzoEW','144EfQymR','MZlIl','branches','utf-8','800173tvyEcJ','clear','homedir','1200bIlFmD','registeredAt','994xwxuyg','enabled','lastPlanReminderAt','lastEnabledSessionClearedAt','WfSxf','QWAlp','12216yGdvtF','NhpIB','uFMFy','mJzZE','now','join','mvCKX','362632vVNxza','toDTv','dWgUs','mOPHS','2324310xGMUkR','vShPK','sessions','prompted'];_0x18ca=function(){return _0xdf2c29;};return _0x18ca();}export function autoEnableAfterClear(_0x17aef3){const _0x46ff4a=_0x1e6dd1,_0x497c04={'mvCKX':function(_0x18ccd6){return _0x18ccd6();},'YvsMG':function(_0xf9dd9,_0x5b612e,_0x33a121){return _0xf9dd9(_0x5b612e,_0x33a121);},'IynFr':function(_0x5e1f00){return _0x5e1f00();},'hPOfU':function(_0x5647d8,_0x107fe4){return _0x5647d8!==_0x107fe4;},'qfVqV':_0x46ff4a(0x163),'RIGpe':'master','mUvvU':function(_0x29c90e,_0x3bad87){return _0x29c90e(_0x3bad87);}},_0x37b1e7=_0x497c04[_0x46ff4a(0x143)](loadCache),_0x2ae289=_0x497c04['YvsMG'](getOrCreateSession,_0x37b1e7,_0x17aef3);_0x2ae289[_0x46ff4a(0x16f)]=!![];const _0x58d1d9=_0x497c04['IynFr'](getCurrentBranch);_0x58d1d9&&_0x497c04['hPOfU'](_0x58d1d9,_0x497c04['qfVqV'])&&_0x58d1d9!==_0x497c04['RIGpe']&&(_0x2ae289[_0x46ff4a(0x15e)]=_0x58d1d9),delete _0x37b1e7['lastEnabledSessionClearedAt'],_0x497c04[_0x46ff4a(0x161)](saveCache,_0x37b1e7);}export function registerSession(_0x1dc67c,_0x45edde){const _0x1e0412=_0x1e6dd1,_0x54972c={'pISpB':function(_0x3722f7,_0x527c8c,_0x272d2a){return _0x3722f7(_0x527c8c,_0x272d2a);},'AqrYh':function(_0x6d29b0,_0x4adcb5){return _0x6d29b0(_0x4adcb5);}},_0x346c8a=loadCache(),_0x133c45=_0x54972c['pISpB'](getOrCreateSession,_0x346c8a,_0x1dc67c);_0x133c45[_0x1e0412(0x162)]=_0x45edde,_0x133c45[_0x1e0412(0x16d)]=new Date()['toISOString'](),_0x54972c['AqrYh'](saveCache,_0x346c8a);}export function getSessionEntry(_0x549adf){const _0x13c142=_0x1e6dd1,_0x3608c2=loadCache(),_0x4e36b8=_0x3608c2[_0x13c142(0x14a)][_0x549adf];if(_0x4e36b8?.['featureId']&&_0x4e36b8?.[_0x13c142(0x16d)])return{'featureId':_0x4e36b8[_0x13c142(0x162)],'registeredAt':_0x4e36b8[_0x13c142(0x16d)]};return null;}export function unregisterSession(_0x106348){const _0x5cc4d5=_0x1e6dd1,_0x5e24a1={'CwMUN':function(_0xf43f77,_0x24bd19){return _0xf43f77(_0x24bd19);}},_0x12e15f=loadCache(),_0x4f5770=_0x12e15f['sessions'][_0x106348];_0x4f5770&&(delete _0x4f5770['featureId'],delete _0x4f5770[_0x5cc4d5(0x16d)],_0x5e24a1['CwMUN'](saveCache,_0x12e15f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x27df82){const _0x113d96=_0x1e6dd1,_0x163a19={'MZlIl':function(_0x336e61,_0x50d2a4,_0x57fa12){return _0x336e61(_0x50d2a4,_0x57fa12);},'XqkwF':function(_0x57ee98,_0x2e983c){return _0x57ee98-_0x2e983c;},'vkLcE':function(_0x2287f9,_0x2a5bda){return _0x2287f9(_0x2a5bda);}},_0x20321b=loadCache(),_0x5810ec=_0x163a19[_0x113d96(0x166)](getOrCreateSession,_0x20321b,_0x27df82),_0xc3faa8=_0x5810ec[_0x113d96(0x170)]||0x0,_0x3b32ba=Date['now']();if(_0x163a19['XqkwF'](_0x3b32ba,_0xc3faa8)>=PLAN_REMINDER_INTERVAL_MS)return _0x5810ec[_0x113d96(0x170)]=_0x3b32ba,_0x163a19['vkLcE'](saveCache,_0x20321b),!![];return![];}export function shouldShowStopReminder(_0x1da665){const _0x37302f=_0x1e6dd1,_0xf1dc9d={'OCuMY':function(_0x229389){return _0x229389();},'NhpIB':function(_0x341abc,_0x5ec1fe){return _0x341abc(_0x5ec1fe);}},_0x4703b8=_0xf1dc9d['OCuMY'](loadCache),_0x42fd9=getOrCreateSession(_0x4703b8,_0x1da665),_0x4f76e4=_0x42fd9['lastStopReminderAt']||0x0,_0x287415=Date[_0x37302f(0x141)]();if(_0x287415-_0x4f76e4>=STOP_REMINDER_INTERVAL_MS)return _0x42fd9['lastStopReminderAt']=_0x287415,_0xf1dc9d[_0x37302f(0x13e)](saveCache,_0x4703b8),!![];return![];}export function hasSessionBeenPrompted(_0x550fa0){const _0x564591=_0x1e6dd1,_0x123880={'ADCZq':function(_0x572792){return _0x572792();},'GAGGa':function(_0x33603a,_0x7c80c1){return _0x33603a===_0x7c80c1;}},_0x377cfc=_0x123880[_0x564591(0x153)](loadCache);return _0x123880['GAGGa'](_0x377cfc[_0x564591(0x14a)][_0x550fa0]?.['prompted'],!![]);}export function markSessionPrompted(_0x32ff86){const _0x2ea4e7=_0x1e6dd1,_0x23bc4c={'GNGRN':function(_0x1e88f3){return _0x1e88f3();},'taCEm':function(_0x59f9f8,_0x6af785,_0x2bee92){return _0x59f9f8(_0x6af785,_0x2bee92);}},_0x54dc0f=_0x23bc4c['GNGRN'](loadCache),_0x26ac36=_0x23bc4c[_0x2ea4e7(0x160)](getOrCreateSession,_0x54dc0f,_0x32ff86);_0x26ac36[_0x2ea4e7(0x14b)]=!![],saveCache(_0x54dc0f);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
function _0x3ba4(){const _0x47aa6d=['xVqAC','348516OHbBHs','master','eeviK','homedir','BYeEN','QfFUF','parse','706791PrcWJg','10OhblZl','dNHKg','uMHTw','403098VFsByR','trim','Tnlmb','254670lupzxc','lastEnabledSessionClearedAt','AKdth','prompted','featureId','12595Xtfscu','hTUqX','currentBranch','lastPlanReminderAt','GzAtU','AzJPI','TLhsQ','pipe','registeredAt','now','jvxxX','4wfTnHN','2255805eihESA','lastStopReminderAt','50972iMvBBO','branches','fsqku','6432NakNCw','EYaij','fySGH','sessions','uMlww','FyMaZ','18kQtOpI','dUFNb','KraEZ','YPiCo','KmPmW','main','HEAD','grVVV','rWiHS','existsSync','enabled','16QcmdRy','stringify','nQNbp'];_0x3ba4=function(){return _0x47aa6d;};return _0x3ba4();}const _0x3beef1=_0xe663;(function(_0x3bee98,_0x8d961e){const _0x132ac7=_0xe663,_0x50eaa3=_0x3bee98();while(!![]){try{const _0x4f5fd2=parseInt(_0x132ac7(0x20d))/0x1+parseInt(_0x132ac7(0x1f7))/0x2+parseInt(_0x132ac7(0x1f3))/0x3*(-parseInt(_0x132ac7(0x20a))/0x4)+parseInt(_0x132ac7(0x1fa))/0x5*(-parseInt(_0x132ac7(0x216))/0x6)+-parseInt(_0x132ac7(0x1ec))/0x7*(parseInt(_0x132ac7(0x1e8))/0x8)+-parseInt(_0x132ac7(0x20b))/0x9*(parseInt(_0x132ac7(0x1f4))/0xa)+parseInt(_0x132ac7(0x1ff))/0xb*(parseInt(_0x132ac7(0x210))/0xc);if(_0x4f5fd2===_0x8d961e)break;else _0x50eaa3['push'](_0x50eaa3['shift']());}catch(_0x44cc25){_0x50eaa3['push'](_0x50eaa3['shift']());}}}(_0x3ba4,0x1f285));import*as _0x3f99fa from'fs';import*as _0xd0e6dd from'path';import*as _0x461c82 from'os';import{execSync}from'child_process';const CACHE_FILE=_0xd0e6dd['join'](_0x461c82[_0x3beef1(0x1ef)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x6834c1=_0x3beef1;try{if(_0x3f99fa[_0x6834c1(0x1e6)](CACHE_FILE)){const _0x12ae64=JSON[_0x6834c1(0x1f2)](_0x3f99fa['readFileSync'](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x12ae64['sessions']||{},'branches':_0x12ae64[_0x6834c1(0x20e)]||{},'lastEnabledSessionClearedAt':_0x12ae64[_0x6834c1(0x1fb)]};}}catch{}return createEmptyCache();}function saveCache(_0x235f64){const _0x314843=_0x3beef1;try{const _0x5c126a=_0xd0e6dd['dirname'](CACHE_FILE);!_0x3f99fa['existsSync'](_0x5c126a)&&_0x3f99fa['mkdirSync'](_0x5c126a,{'recursive':!![]}),_0x3f99fa['writeFileSync'](CACHE_FILE,JSON[_0x314843(0x1e9)](_0x235f64,null,0x2));}catch{}}export function getCurrentBranch(){const _0x1d5e09=_0x3beef1,_0x272600={'ALwRt':function(_0xc6449,_0x5f0a54,_0x60ce48){return _0xc6449(_0x5f0a54,_0x60ce48);},'rWiHS':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','liklW':'utf-8','grVVV':'pipe','uMlww':_0x1d5e09(0x1e3)};try{const _0x5c2bce=_0x272600['ALwRt'](execSync,_0x272600[_0x1d5e09(0x1e5)],{'encoding':_0x272600['liklW'],'stdio':[_0x272600[_0x1d5e09(0x1e4)],'pipe',_0x1d5e09(0x206)]})[_0x1d5e09(0x1f8)]();if(!_0x5c2bce||_0x5c2bce===_0x272600[_0x1d5e09(0x214)])return null;return _0x5c2bce;}catch{return null;}}export function enableBranch(_0x107d05){const _0x2f21a8=loadCache();_0x2f21a8['branches'][_0x107d05]=!![],saveCache(_0x2f21a8);}function _0xe663(_0xeb55f,_0x3ad382){_0xeb55f=_0xeb55f-0x1de;const _0x3ba49b=_0x3ba4();let _0xe663eb=_0x3ba49b[_0xeb55f];return _0xe663eb;}export function disableBranch(_0x566e2a){const _0x5d17de=_0x3beef1,_0x15c15b={'fsqku':function(_0x4e1d37){return _0x4e1d37();}},_0x2eea7b=_0x15c15b[_0x5d17de(0x20f)](loadCache);delete _0x2eea7b['branches'][_0x566e2a],saveCache(_0x2eea7b);}export function isBranchEnabled(_0x3852d9){const _0x2883a7=_0x3beef1,_0x2edf59={'Zyfyh':function(_0x772197){return _0x772197();},'AKdth':function(_0x30aae2,_0x4c23fa){return _0x30aae2===_0x4c23fa;}},_0x12c246=_0x2edf59['Zyfyh'](loadCache);return _0x2edf59[_0x2883a7(0x1fc)](_0x12c246[_0x2883a7(0x20e)][_0x3852d9],!![]);}function getOrCreateSession(_0x70ba72,_0xb295dc){const _0x90d23=_0x3beef1;return!_0x70ba72['sessions'][_0xb295dc]&&(_0x70ba72[_0x90d23(0x213)][_0xb295dc]={}),_0x70ba72[_0x90d23(0x213)][_0xb295dc];}export function enableSession(_0x1b049c){const _0x5480ac=_0x3beef1,_0x19c13d={'QfFUF':function(_0x26e94d){return _0x26e94d();},'AbiBf':function(_0x4e54a8,_0x258396){return _0x4e54a8!==_0x258396;},'AzJPI':_0x5480ac(0x1e2),'TLhsQ':function(_0x178174,_0x2a2ed0){return _0x178174!==_0x2a2ed0;}},_0x46cda0=_0x19c13d[_0x5480ac(0x1f1)](loadCache),_0x2a602c=getOrCreateSession(_0x46cda0,_0x1b049c);_0x2a602c['enabled']=!![];const _0x542520=getCurrentBranch();_0x542520&&_0x19c13d['AbiBf'](_0x542520,_0x19c13d[_0x5480ac(0x204)])&&_0x19c13d[_0x5480ac(0x205)](_0x542520,_0x5480ac(0x1ed))&&(_0x46cda0['branches'][_0x542520]=!![],_0x2a602c[_0x5480ac(0x201)]=_0x542520),saveCache(_0x46cda0);}export function isSessionEnabled(_0x4a9035){const _0x402a1e=_0x3beef1,_0x23cec3={'fySGH':function(_0x48e838){return _0x48e838();},'vauup':'main','VUMRk':function(_0x15efd9,_0x3abb19){return _0x15efd9===_0x3abb19;},'nQNbp':function(_0x46e352,_0x47ea84){return _0x46e352===_0x47ea84;},'hTUqX':function(_0x5dda65,_0x5d789b){return _0x5dda65||_0x5d789b;}},_0x5a8526=_0x23cec3[_0x402a1e(0x212)](loadCache),_0x43ecba=_0x23cec3[_0x402a1e(0x212)](getCurrentBranch);if(!_0x43ecba||_0x43ecba===_0x23cec3['vauup']||_0x23cec3['VUMRk'](_0x43ecba,'master'))return _0x5a8526['sessions'][_0x4a9035]?.[_0x402a1e(0x1e7)]===!![];const _0x12f631=_0x23cec3[_0x402a1e(0x1ea)](_0x5a8526[_0x402a1e(0x20e)][_0x43ecba],!![]),_0x327748=_0x23cec3['VUMRk'](_0x5a8526['sessions'][_0x4a9035]?.[_0x402a1e(0x1e7)],!![]);return _0x23cec3[_0x402a1e(0x200)](_0x12f631,_0x327748);}export function disableSession(_0x3b2f88){const _0x11df53=_0x3beef1,_0x3b4e03={'dUFNb':function(_0x35d84b,_0x2fa287,_0x24e1e6){return _0x35d84b(_0x2fa287,_0x24e1e6);},'SQXXE':function(_0x5d488b,_0x518d40){return _0x5d488b(_0x518d40);}},_0x1b89f4=loadCache(),_0x3221ba=_0x3b4e03[_0x11df53(0x1de)](getOrCreateSession,_0x1b89f4,_0x3b2f88);_0x3221ba[_0x11df53(0x1e7)]=![],_0x3b4e03['SQXXE'](saveCache,_0x1b89f4);}export function updateBranchTracking(_0x4484b){const _0x4af435=_0x3beef1,_0x2fc114={'eeviK':function(_0x3f55bb){return _0x3f55bb();},'dNHKg':function(_0xf5cc9c,_0x2d6c4d){return _0xf5cc9c===_0x2d6c4d;},'xVqAC':_0x4af435(0x1ed),'KraEZ':function(_0x18154a,_0x2b221c){return _0x18154a!==_0x2b221c;}},_0x33efa6=_0x2fc114[_0x4af435(0x1ee)](loadCache),_0x2db0f6=_0x33efa6[_0x4af435(0x213)][_0x4484b];if(!_0x2db0f6?.['enabled'])return;const _0x290ebb=getCurrentBranch();if(!_0x290ebb||_0x290ebb===_0x4af435(0x1e2)||_0x2fc114[_0x4af435(0x1f5)](_0x290ebb,_0x2fc114[_0x4af435(0x1eb)]))return;_0x2fc114[_0x4af435(0x1df)](_0x2db0f6[_0x4af435(0x201)],_0x290ebb)&&(_0x33efa6['branches'][_0x290ebb]=!![],_0x2db0f6[_0x4af435(0x201)]=_0x290ebb,saveCache(_0x33efa6));}export function initBranchTracking(_0x160e51){const _0x3dccef=_0x3beef1,_0x20d92d={'MPrQK':function(_0x3fb72f){return _0x3fb72f();},'UvRUO':function(_0x4e92f1,_0x1784bc){return _0x4e92f1===_0x1784bc;},'jvxxX':'master','KmPmW':function(_0x13d89d,_0x2aedf0){return _0x13d89d(_0x2aedf0);}},_0x3c7330=_0x20d92d['MPrQK'](loadCache),_0x5f3a9f=_0x20d92d['MPrQK'](getCurrentBranch);if(!_0x5f3a9f||_0x20d92d['UvRUO'](_0x5f3a9f,'main')||_0x5f3a9f===_0x20d92d[_0x3dccef(0x209)])return;if(_0x3c7330['branches'][_0x5f3a9f]===!![]){const _0x50ccc9=getOrCreateSession(_0x3c7330,_0x160e51);_0x50ccc9['enabled']=!![],_0x50ccc9[_0x3dccef(0x201)]=_0x5f3a9f,_0x20d92d[_0x3dccef(0x1e1)](saveCache,_0x3c7330);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x528bf9){const _0x47b538=_0x3beef1,_0x371952=loadCache(),_0xcdc2ae=_0x371952['sessions'][_0x528bf9];_0xcdc2ae?.[_0x47b538(0x1e7)]&&(_0x371952[_0x47b538(0x1fb)]=Date[_0x47b538(0x208)](),saveCache(_0x371952));}export function shouldAutoEnableAfterClear(_0x41c378){const _0x2446b1=_0x3beef1,_0x4b3190={'EYaij':'clear','GzAtU':function(_0x12f0a1,_0x38163c){return _0x12f0a1<=_0x38163c;}};if(_0x41c378!==_0x4b3190[_0x2446b1(0x211)])return![];const _0x16a613=loadCache(),_0x3474d1=_0x16a613['lastEnabledSessionClearedAt'];if(!_0x3474d1)return![];const _0x576405=Date['now']()-_0x3474d1;return _0x4b3190[_0x2446b1(0x203)](_0x576405,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x51b39c){const _0x2539bb=_0x3beef1,_0x5c29f7={'UVtqE':function(_0x3d1aaf,_0x476dc4,_0x4d8c8f){return _0x3d1aaf(_0x476dc4,_0x4d8c8f);},'rmPRy':'main','zYeRy':function(_0x3437f4,_0xab4bcf){return _0x3437f4!==_0xab4bcf;}},_0x30de61=loadCache(),_0x2d11a2=_0x5c29f7['UVtqE'](getOrCreateSession,_0x30de61,_0x51b39c);_0x2d11a2[_0x2539bb(0x1e7)]=!![];const _0x162c39=getCurrentBranch();_0x162c39&&_0x162c39!==_0x5c29f7['rmPRy']&&_0x5c29f7['zYeRy'](_0x162c39,_0x2539bb(0x1ed))&&(_0x2d11a2[_0x2539bb(0x201)]=_0x162c39),delete _0x30de61['lastEnabledSessionClearedAt'],saveCache(_0x30de61);}export function registerSession(_0x13a11e,_0x41d0d2){const _0x3f6334=_0x3beef1,_0x3400a4={'Tnlmb':function(_0x374e29,_0x5c73e7,_0x22bf0f){return _0x374e29(_0x5c73e7,_0x22bf0f);}},_0x3af735=loadCache(),_0x36227a=_0x3400a4[_0x3f6334(0x1f9)](getOrCreateSession,_0x3af735,_0x13a11e);_0x36227a['featureId']=_0x41d0d2,_0x36227a[_0x3f6334(0x207)]=new Date()['toISOString'](),saveCache(_0x3af735);}export function getSessionEntry(_0x379239){const _0x5be058=_0x3beef1,_0x5c7b4d=loadCache(),_0x26269c=_0x5c7b4d[_0x5be058(0x213)][_0x379239];if(_0x26269c?.[_0x5be058(0x1fe)]&&_0x26269c?.[_0x5be058(0x207)])return{'featureId':_0x26269c['featureId'],'registeredAt':_0x26269c['registeredAt']};return null;}export function unregisterSession(_0x286af2){const _0x437a58=_0x3beef1,_0x2ac301={'BYeEN':function(_0x29708b){return _0x29708b();},'FyMaZ':function(_0x2d546c,_0x57c1dc){return _0x2d546c(_0x57c1dc);}},_0x474e67=_0x2ac301[_0x437a58(0x1f0)](loadCache),_0x226212=_0x474e67[_0x437a58(0x213)][_0x286af2];_0x226212&&(delete _0x226212[_0x437a58(0x1fe)],delete _0x226212[_0x437a58(0x207)],_0x2ac301[_0x437a58(0x215)](saveCache,_0x474e67));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2aad65){const _0x30dab4=_0x3beef1,_0x5c4d52={'uMHTw':function(_0x3949f0,_0x1fc931){return _0x3949f0(_0x1fc931);}},_0x4423a7=loadCache(),_0x2225c0=getOrCreateSession(_0x4423a7,_0x2aad65),_0x59cb65=_0x2225c0['lastPlanReminderAt']||0x0,_0x15c68b=Date['now']();if(_0x15c68b-_0x59cb65>=PLAN_REMINDER_INTERVAL_MS)return _0x2225c0[_0x30dab4(0x202)]=_0x15c68b,_0x5c4d52[_0x30dab4(0x1f6)](saveCache,_0x4423a7),!![];return![];}export function shouldShowStopReminder(_0x41d1ba){const _0xd99482=_0x3beef1,_0x3fcc48={'YPiCo':function(_0x7535fb){return _0x7535fb();},'tbREK':function(_0x12a146,_0xde7e19){return _0x12a146-_0xde7e19;}},_0x4aad69=_0x3fcc48[_0xd99482(0x1e0)](loadCache),_0x235dea=getOrCreateSession(_0x4aad69,_0x41d1ba),_0x57928b=_0x235dea[_0xd99482(0x20c)]||0x0,_0x359f4c=Date[_0xd99482(0x208)]();if(_0x3fcc48['tbREK'](_0x359f4c,_0x57928b)>=STOP_REMINDER_INTERVAL_MS)return _0x235dea['lastStopReminderAt']=_0x359f4c,saveCache(_0x4aad69),!![];return![];}export function hasSessionBeenPrompted(_0x26ba6f){const _0x1c211b=_0x3beef1,_0x1798e5={'UuKTV':function(_0x376665){return _0x376665();}},_0x1f95dc=_0x1798e5['UuKTV'](loadCache);return _0x1f95dc[_0x1c211b(0x213)][_0x26ba6f]?.[_0x1c211b(0x1fd)]===!![];}export function markSessionPrompted(_0x415eaa){const _0x34aec4={'DZKJi':function(_0x2d47cd){return _0x2d47cd();},'UHYqc':function(_0x2af8f3,_0x1fd99b,_0x1fa4a8){return _0x2af8f3(_0x1fd99b,_0x1fa4a8);}},_0x3ef5c7=_0x34aec4['DZKJi'](loadCache),_0x1145c1=_0x34aec4['UHYqc'](getOrCreateSession,_0x3ef5c7,_0x415eaa);_0x1145c1['prompted']=!![],saveCache(_0x3ef5c7);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x7c6728=_0x18a2;(function(_0x32bc13,_0x389864){const _0x275cf6=_0x18a2,_0x218506=_0x32bc13();while(!![]){try{const _0x2ae1d2=parseInt(_0x275cf6(0xc9))/0x1*(parseInt(_0x275cf6(0xbf))/0x2)+parseInt(_0x275cf6(0x9e))/0x3*(-parseInt(_0x275cf6(0xc3))/0x4)+parseInt(_0x275cf6(0xba))/0x5+parseInt(_0x275cf6(0x96))/0x6*(parseInt(_0x275cf6(0x90))/0x7)+parseInt(_0x275cf6(0xeb))/0x8+-parseInt(_0x275cf6(0x94))/0x9*(parseInt(_0x275cf6(0xa9))/0xa)+parseInt(_0x275cf6(0xf4))/0xb*(-parseInt(_0x275cf6(0xb0))/0xc);if(_0x2ae1d2===_0x389864)break;else _0x218506['push'](_0x218506['shift']());}catch(_0x6a043){_0x218506['push'](_0x218506['shift']());}}}(_0x28d8,0x747e9));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{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x239a36,_0x5adc6e){const _0x547ee=_0x18a2,_0x5db9d4={'JQNbp':_0x547ee(0xcc),'tExDy':function(_0x187bc6,_0xbab862,_0x43c976){return _0x187bc6(_0xbab862,_0x43c976);},'Eufym':function(_0x234e94,_0x5ce47f,_0x4aa7dd){return _0x234e94(_0x5ce47f,_0x4aa7dd);},'pSwOI':function(_0x553a44,_0x51ad18){return _0x553a44(_0x51ad18);},'ntbGX':function(_0xfafecb,_0x3cd2a8){return _0xfafecb(_0x3cd2a8);},'qcOUn':function(_0x2d4a2c,_0x50d756){return _0x2d4a2c!==_0x50d756;}},_0x2755d8=join(_0x5adc6e,'ci',_0x239a36),_0x58fc8c=join(_0x5adc6e,_0x5db9d4[_0x547ee(0xac)],_0x239a36),_0x38aeca=_0x5db9d4['tExDy'](join,_0x5adc6e,_0x239a36),_0x47b018=_0x5db9d4[_0x547ee(0x9c)](join,_0x5adc6e,'local'),_0x5c499a=_0x5db9d4['tExDy'](join,_0x5adc6e,'ci');if(_0x5db9d4[_0x547ee(0xc6)](existsSync,_0x2755d8))return _0x2755d8;if(_0x5db9d4['ntbGX'](existsSync,_0x58fc8c))return _0x58fc8c;if(_0x5db9d4['pSwOI'](existsSync,_0x38aeca)&&(_0x5db9d4['qcOUn'](_0x38aeca,_0x47b018)&&_0x38aeca!==_0x5c499a?!![]:_0x5db9d4[_0x547ee(0xc6)](hasLegacyProfileFiles,_0x38aeca)))return _0x38aeca;return null;}export function getEnvDir(_0x4d3fd9){const _0x3cd995=_0x18a2,_0x1a3e52={'bmucp':function(_0x49d7be){return _0x49d7be();},'CkJFd':function(_0x46d34b,_0x192b2a){return _0x46d34b!==_0x192b2a;}},_0x5c0d85=_0x1a3e52[_0x3cd995(0x8f)](getRangerDir),_0x4dae54=findEnvInRoot(_0x4d3fd9,_0x5c0d85);if(_0x4dae54)return _0x4dae54;const _0x40d719=getRangerHomeDir();if(_0x1a3e52[_0x3cd995(0xc1)](_0x40d719,_0x5c0d85)){const _0x106318=findEnvInRoot(_0x4d3fd9,_0x40d719);if(_0x106318)return _0x106318;}return join(_0x5c0d85,_0x3cd995(0xcc),_0x4d3fd9);}export function findExistingEnv(_0x518cde,_0x399074){const _0x37c577=_0x18a2,_0x2c0ef2={'SwxHE':function(_0x1e7dc4){return _0x1e7dc4();},'udzGX':'local','wUMEo':function(_0x2ec8e1,_0x1cbc0f,_0xfcf61e){return _0x2ec8e1(_0x1cbc0f,_0xfcf61e);},'UdKFm':function(_0x112298,_0x43e369,_0x3910ad,_0x130f42){return _0x112298(_0x43e369,_0x3910ad,_0x130f42);},'BLmJd':'legacy','kCTxa':function(_0x247a70,_0x5deb12){return _0x247a70===_0x5deb12;},'ygmiH':function(_0x27a8b1,_0xe63b5){return _0x27a8b1===_0xe63b5;}},_0x7707f9=_0x399074?.[_0x37c577(0xd2)],_0x111091=_0x7707f9?[_0x7707f9]:[getRangerDir(),_0x2c0ef2[_0x37c577(0xdf)](getRangerHomeDir)][_0x37c577(0xe5)]((_0x1bc43a,_0x4da325,_0x597587)=>_0x597587['indexOf'](_0x1bc43a)===_0x4da325),_0x557813=_0x399074?.['locations']??['ci',_0x2c0ef2['udzGX'],'legacy'];for(const _0x1b6132 of _0x111091){const _0x36695a=_0x2c0ef2[_0x37c577(0x9d)](join,_0x1b6132,_0x2c0ef2[_0x37c577(0xa2)]),_0x5dd750=_0x2c0ef2['wUMEo'](join,_0x1b6132,'ci'),_0x2e4a3f=[{'location':'ci','path':join(_0x1b6132,'ci',_0x518cde)},{'location':_0x37c577(0xcc),'path':_0x2c0ef2[_0x37c577(0xf2)](join,_0x1b6132,'local',_0x518cde)},{'location':_0x2c0ef2['BLmJd'],'path':join(_0x1b6132,_0x518cde)}];for(const _0x49475e of _0x2e4a3f){if(_0x557813[_0x37c577(0x9b)](_0x49475e['location'])&&existsSync(_0x49475e['path'])){if(_0x2c0ef2['kCTxa'](_0x49475e['location'],_0x2c0ef2[_0x37c577(0xbe)])&&(_0x2c0ef2[_0x37c577(0xe8)](_0x49475e[_0x37c577(0x91)],_0x36695a)||_0x49475e['path']===_0x5dd750)&&!hasLegacyProfileFiles(_0x49475e[_0x37c577(0x91)]))continue;return{'path':_0x49475e['path'],'location':_0x49475e['location']};}}}return null;}function hasLegacyProfileFiles(_0xe73b3b){const _0x1e3ddb=_0x18a2,_0x549a2b={'nXZMt':function(_0x528fda,_0x80f264){return _0x528fda(_0x80f264);},'uKrAa':function(_0x30e973,_0x82f97f,_0x314b51){return _0x30e973(_0x82f97f,_0x314b51);},'BbleT':_0x1e3ddb(0xc4)};return existsSync(join(_0xe73b3b,_0x1e3ddb(0x99)))||_0x549a2b[_0x1e3ddb(0xc7)](existsSync,_0x549a2b[_0x1e3ddb(0xd8)](join,_0xe73b3b,_0x549a2b['BbleT']))||existsSync(_0x549a2b[_0x1e3ddb(0xd8)](join,_0xe73b3b,_0x1e3ddb(0xec)));}export function isEnvCi(_0x4d4627){const _0x120869=_0x18a2,_0x194170={'owcTO':function(_0x2c535a,_0x262aaa,_0x402d29,_0x19e66c){return _0x2c535a(_0x262aaa,_0x402d29,_0x19e66c);},'tvzmA':function(_0x3496ec,_0x3106f9){return _0x3496ec(_0x3106f9);}};if(existsSync(_0x194170[_0x120869(0xa7)](join,getRangerDir(),'ci',_0x4d4627)))return!![];const _0x54e7de=getRangerHomeDir();if(_0x54e7de!==getRangerDir()&&_0x194170['tvzmA'](existsSync,_0x194170['owcTO'](join,_0x54e7de,'ci',_0x4d4627)))return!![];return![];}export async function cleanupTempFiles(_0x5006ad){const _0x2365fc=_0x18a2,_0x4ac324=[_0x5006ad['tempAuthPath'],_0x5006ad[_0x2365fc(0xb7)]]['filter'](Boolean);await Promise['all'](_0x4ac324['map'](_0x790cad=>unlink(_0x790cad)['catch'](_0x59324d=>{const _0x2fabd2=_0x2365fc;_0x59324d['code']!=='ENOENT'&&console[_0x2fabd2(0xaa)](_0x2fabd2(0x9f)+_0x790cad+':',_0x59324d[_0x2fabd2(0xb5)]);})));}export function getSettingsPath(_0xf4a0ab){const _0x772d8e=_0x18a2,_0x22942d={'HCoAp':function(_0x450e50,_0x42ce10,_0x58babe){return _0x450e50(_0x42ce10,_0x58babe);}};return _0x22942d[_0x772d8e(0xb2)](join,getEnvDir(_0xf4a0ab),'settings.json');}export async function loadSettings(_0x2e265c){const _0x228db3=getSettingsPath(_0x2e265c);if(!existsSync(_0x228db3))return{};try{const _0x205b84=await readFile(_0x228db3,'utf-8');return JSON['parse'](_0x205b84);}catch{return{};}}export async function saveSettings(_0x5d0cd5,_0x36dc60){const _0x276162=_0x18a2,_0x24a5a6={'tfqoV':function(_0x3a7987,_0xc062b1){return _0x3a7987(_0xc062b1);},'vyknZ':function(_0x309fbe,_0x3c1ab2){return _0x309fbe(_0x3c1ab2);},'UAiTA':function(_0x2263c6,_0x1ee56c,_0x215c75){return _0x2263c6(_0x1ee56c,_0x215c75);}},_0x2a7d0e=_0x24a5a6['tfqoV'](getSettingsPath,_0x5d0cd5),_0x599fb9=_0x24a5a6[_0x276162(0xd9)](dirname,_0x2a7d0e);!_0x24a5a6[_0x276162(0xea)](existsSync,_0x599fb9)&&await _0x24a5a6['UAiTA'](mkdir,_0x599fb9,{'recursive':!![]}),await _0x24a5a6['UAiTA'](writeFile,_0x2a7d0e,JSON[_0x276162(0x95)](_0x36dc60,null,0x2));}export function resolveEnvVars(_0x1bb2a9){const _0x2bf0c5=_0x18a2,_0x5d6ab2={'YeqaK':function(_0x58df12,_0x1f5f07){return _0x58df12===_0x1f5f07;},'XZUht':'string','hRGFV':function(_0x28f7e2,_0x18588a){return _0x28f7e2===_0x18588a;}};if(typeof _0x1bb2a9===_0x5d6ab2['XZUht'])return _0x1bb2a9[_0x2bf0c5(0xa6)](/\$\{(\w+)\}/g,(_0x545204,_0x5490a1)=>{const _0x57ec03=process['env'][_0x5490a1];if(_0x5d6ab2['YeqaK'](_0x57ec03,undefined))throw new Error('Environment\x20variable\x20'+_0x5490a1+'\x20is\x20not\x20set');return _0x57ec03;});if(Array[_0x2bf0c5(0xb8)](_0x1bb2a9))return _0x1bb2a9[_0x2bf0c5(0xe7)](resolveEnvVars);if(_0x1bb2a9&&_0x5d6ab2['hRGFV'](typeof _0x1bb2a9,_0x2bf0c5(0xd3)))return Object['fromEntries'](Object[_0x2bf0c5(0xd6)](_0x1bb2a9)[_0x2bf0c5(0xe7)](([_0x4f2482,_0x21401f])=>[_0x4f2482,resolveEnvVars(_0x21401f)]));return _0x1bb2a9;}const isRecord=_0x37e9b7=>typeof _0x37e9b7==='object'&&_0x37e9b7!==null&&!Array['isArray'](_0x37e9b7),asRecord=_0x13af6e=>isRecord(_0x13af6e)?_0x13af6e:undefined,mergeHeaders=(_0x176dec,_0x51458e)=>{const _0x52b77d=_0x18a2,_0x539c72={'ZikwP':function(_0x475e6f,_0x1fc4d9){return _0x475e6f??_0x1fc4d9;}},_0xfdb2cb={..._0x176dec??{},..._0x539c72[_0x52b77d(0xa3)](_0x51458e,{})};return Object[_0x52b77d(0xcd)](_0xfdb2cb)[_0x52b77d(0xa4)]?_0xfdb2cb:undefined;},SAFE_MODE_ARGS=[_0x7c6728(0x93)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0xe12fc0,_0x5d96d3={}){const _0x5e0ad3=_0x7c6728,_0x183149={'pXBkw':function(_0x55e336,_0x4aa16a){return _0x55e336===_0x4aa16a;},'urcNA':_0x5e0ad3(0xee),'ixxUk':function(_0x34b653,_0x3ba0d5){return _0x34b653(_0x3ba0d5);},'gpuLB':_0x5e0ad3(0xb4)},_0x3f059c=asRecord(_0xe12fc0[_0x5e0ad3(0x92)]),_0x3124a8={...asRecord(_0x3f059c?.[_0x5e0ad3(0xa5)])??{}};_0x183149['pXBkw'](typeof _0x5d96d3['headless'],_0x183149[_0x5e0ad3(0xb6)])&&(_0x3124a8['headless']=_0x5d96d3['headless']);if(_0xe12fc0['safeMode']){const _0x2e6051=_0x3124a8['args']??[],_0x36808c=SAFE_MODE_ARGS['filter'](_0x1aaa97=>!_0x2e6051[_0x5e0ad3(0x9b)](_0x1aaa97));_0x3124a8['args']=[..._0x2e6051,..._0x36808c];}if(_0xe12fc0[_0x5e0ad3(0xb3)]){const _0x459072=_0x3124a8[_0x5e0ad3(0xae)]??[],_0x4f4b63=ALLOW_LOCALHOST_ARGS[_0x5e0ad3(0xe5)](_0x23b489=>!_0x459072[_0x5e0ad3(0x9b)](_0x23b489));_0x3124a8['args']=[..._0x459072,..._0x4f4b63];}const _0x564e74={..._0x183149[_0x5e0ad3(0xda)](asRecord,_0x3f059c?.[_0x5e0ad3(0xf3)])??{}};_0x564e74[_0x5e0ad3(0xe6)]=!![];typeof _0xe12fc0[_0x5e0ad3(0xd5)]===_0x183149[_0x5e0ad3(0xbc)]&&(_0x564e74['userAgent']=_0xe12fc0['userAgent']);const _0x450b81=mergeHeaders(asRecord(_0x564e74[_0x5e0ad3(0xe9)]),asRecord(_0xe12fc0['headers']));return _0x450b81?_0x564e74[_0x5e0ad3(0xe9)]=_0x450b81:delete _0x564e74[_0x5e0ad3(0xe9)],_0x5d96d3['storageStatePath']&&(_0x564e74['storageState']=_0x5d96d3['storageStatePath']),{'launchOptions':_0x3124a8,'contextOptions':_0x564e74};}function _0x28d8(){const _0x5d8ff4=['2yKgPvQ','catch','CkJFd','WtMXN','18888tBpwDt','auth.json','KPypL','pSwOI','nXZMt','wnyPw','12715OwZoLT','rGjLu','tabs','local','keys','setupHeaders','install','repeat','playwright-cli','rangerDir','object','clipboard-write','userAgent','entries','Ycjbw','uKrAa','tfqoV','ixxUk','push','stagehand','lFpSO','CbKGg','SwxHE','YdwvX','jAazp','vision','ATtFx','kHFes','filter','ignoreHTTPSErrors','map','ygmiH','extraHTTPHeaders','vyknZ','4039104UuSpJN','auth.json.enc','ljCai','boolean','gVuVu','VCuJh','LXHjZ','UdKFm','contextOptions','660whABuw','now','storageState','bmucp','17381HxwAku','path','browser','--disable-features=WebBluetooth','764046xhJKLL','stringify','1590bBWOft','header','.json','settings.json','getuid','includes','Eufym','wUMEo','234Cbpwai','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','headless','XIiVi','udzGX','ZikwP','length','launchOptions','replace','owcTO','ZiVUj','20nBaHBo','warn','ZgQuk','JQNbp','ZLYVJ','args','chromium','47724LKvboM','--disable-setuid-sandbox','HCoAp','allowInsecureLocalhost','string','message','urcNA','configPath','isArray','--no-sandbox','391435BIxjHg','Failed\x20to\x20decrypt\x20auth\x20state:\x20','gpuLB','rgvEo','BLmJd'];_0x28d8=function(){return _0x5d8ff4;};return _0x28d8();}async function resolveLocalAuthPath(_0x267a20){const _0x234eb8=_0x7c6728,_0x51e59f={'lFpSO':function(_0x30a36c,_0x76d2a9,_0x308fce){return _0x30a36c(_0x76d2a9,_0x308fce);},'CbKGg':_0x234eb8(0xc4),'ZLYVJ':function(_0x57787b,_0x369134){return _0x57787b(_0x369134);},'rGjLu':function(_0x1e31d2){return _0x1e31d2();},'Uwrpm':function(_0xe66979,_0x5babd8,_0x5c38a4){return _0xe66979(_0x5babd8,_0x5c38a4);},'eCYwm':function(_0x3b32e6,_0xaa4982){return _0x3b32e6(_0xaa4982);}},_0x252ba9=_0x51e59f[_0x234eb8(0xdd)](join,_0x267a20,_0x234eb8(0xec)),_0x278745=join(_0x267a20,_0x51e59f[_0x234eb8(0xde)]);if(_0x51e59f['ZLYVJ'](existsSync,_0x252ba9))try{const _0x9ccb4e=await _0x51e59f['rGjLu'](getToken);if(!_0x9ccb4e)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0xb30fa8=await _0x51e59f[_0x234eb8(0xad)](readFile,_0x252ba9),_0x2f2b2d=decrypt(_0xb30fa8,_0x9ccb4e),_0x144448=join(_0x51e59f[_0x234eb8(0xca)](tmpdir),'ranger-auth-'+Date[_0x234eb8(0xf5)]()+_0x234eb8(0x98));return await _0x51e59f['Uwrpm'](writeFile,_0x144448,_0x2f2b2d),{'storageStatePath':_0x144448,'tempAuthPath':_0x144448};}catch(_0x15a1ae){const _0x28bb6c=_0x15a1ae instanceof Error?_0x15a1ae[_0x234eb8(0xb5)]:_0x51e59f['eCYwm'](String,_0x15a1ae);throw new Error(_0x234eb8(0xbb)+_0x28bb6c);}if(existsSync(_0x278745))return{'storageStatePath':_0x278745};return{};}export async function buildPlaywrightConfig(_0x598dad,_0x360bf8,_0x4d2bef,_0x21af68,_0x524dc9){const _0x3bc28c=_0x7c6728,_0x53d69f={'WpGck':function(_0x721212,_0x312323){return _0x721212(_0x312323);}};if(_0x524dc9)return buildPlaywrightConfigCore(_0x598dad,_0x524dc9,_0x360bf8,_0x4d2bef,_0x21af68,_0x3bc28c(0xdc));const {storageStatePath:_0x21032d,tempAuthPath:_0x5b65ae}=await resolveLocalAuthPath(_0x53d69f['WpGck'](getEnvDir,_0x360bf8));try{const _0x4ca57f=await buildPlaywrightConfigCore(_0x598dad,_0x21032d,_0x360bf8,_0x4d2bef,_0x21af68,'stagehand');return{..._0x4ca57f,'tempAuthPath':_0x5b65ae};}catch(_0x5d6d2c){_0x5b65ae&&await unlink(_0x5b65ae)['catch'](()=>{});throw _0x5d6d2c;}}export async function buildPlaywrightConfigCore(_0x34b5d,_0x40ad83,_0x3998b0,_0x4629dc,_0x1eeb0a,_0x283d8a='stagehand'){const _0x5828be=_0x7c6728,_0x2e547f={'ZiVUj':function(_0x242212,_0xf18c90,_0x19653e){return _0x242212(_0xf18c90,_0x19653e);},'wnyPw':function(_0x24dd38,_0x5a3dec){return _0x24dd38===_0x5a3dec;},'CfKgl':_0x5828be(0xb9),'GKdUI':_0x5828be(0xb1),'gtJPK':_0x5828be(0xaf),'ljCai':'clipboard-read','MlpLf':_0x5828be(0xd4),'ATtFx':'sessions','LXHjZ':function(_0x27cc3b,_0xe0abd8){return _0x27cc3b===_0xe0abd8;},'WtMXN':'file','Jaevu':'core','XIiVi':function(_0x198973){return _0x198973();},'kHFes':'ranger-config','ZPyRp':function(_0x353a79,_0xa17888){return _0x353a79(_0xa17888);}},_0x2ed7ae=_0x4629dc||randomUUID(),_0x4cac44=join(getRangerDir(),_0x2e547f[_0x5828be(0xe3)],_0x2ed7ae),_0x4330a3=Boolean(_0x34b5d['cdpEndpoint']),_0x5020e9=_0x4330a3?{'browserName':'chromium','cdpEndpoint':_0x34b5d['cdpEndpoint']}:((()=>{const _0x5264e8=_0x5828be,{launchOptions:_0x363949,contextOptions:_0x2491ac}=_0x2e547f[_0x5264e8(0xa8)](buildBrowserOptionsFromSettings,_0x34b5d,{'headless':_0x1eeb0a?![]:_0x34b5d[_0x5264e8(0xa0)]??!![],'storageStatePath':_0x40ad83});if(_0x2e547f[_0x5264e8(0xc8)](process[_0x5264e8(0x9a)]?.(),0x0)){const _0x505796=[_0x2e547f['CfKgl'],_0x2e547f['GKdUI']],_0x949ae4=_0x363949[_0x5264e8(0xae)]??[],_0x5331a5=_0x505796['filter'](_0x294741=>!_0x949ae4['includes'](_0x294741));_0x363949[_0x5264e8(0xae)]=[..._0x949ae4,..._0x5331a5];}return{'isolated':!![],'browserName':_0x2e547f['gtJPK'],'launchOptions':_0x363949,'contextOptions':{..._0x2491ac,'permissions':[_0x2e547f[_0x5264e8(0xed)],_0x2e547f['MlpLf']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x52f639=_0x2e547f[_0x5828be(0xf1)](_0x283d8a,_0x5828be(0xd1))?{'browser':_0x5020e9,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4cac44,'outputMode':_0x2e547f[_0x5828be(0xc2)],'codegen':'none'}:{'name':_0x3998b0,'browser':_0x5020e9,'capabilities':[_0x2e547f['Jaevu'],_0x5828be(0xcb),_0x5828be(0xcf),'pdf',_0x5828be(0xe2)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4cac44};if(!_0x4330a3){const _0x30e610=_0x52f639['browser'],_0x1dfeab=_0x30e610[_0x5828be(0xf3)];if(_0x2e547f['wnyPw'](_0x1dfeab[_0x5828be(0xd5)],undefined))delete _0x1dfeab['userAgent'];if(_0x1dfeab['storageState']===undefined)delete _0x1dfeab[_0x5828be(0xf6)];}const _0x39ab76=join(_0x2e547f[_0x5828be(0xa1)](tmpdir),_0x2e547f[_0x5828be(0xe4)]);!_0x2e547f['ZPyRp'](existsSync,_0x39ab76)&&await mkdir(_0x39ab76,{'recursive':!![]});const _0x46d4eb=_0x2e547f['LXHjZ'](_0x283d8a,_0x5828be(0xd1))?'-cli':'',_0x588cd4=join(_0x39ab76,_0x3998b0+'-'+Date['now']()+_0x46d4eb+'.json');return await writeFile(_0x588cd4,JSON[_0x5828be(0x95)](_0x52f639,null,0x2)),{'configPath':_0x588cd4};}function _0x18a2(_0x27222b,_0x7032f6){_0x27222b=_0x27222b-0x8f;const _0x28d8bf=_0x28d8();let _0x18a2d7=_0x28d8bf[_0x27222b];return _0x18a2d7;}export async function buildPlaywrightCliConfig(_0x5726ac,_0x927724,_0x1dd4d2,_0x170fb7,_0x49d5f7){const _0x5186ab=_0x7c6728,_0x46a9b2={'QZkNx':'playwright-cli','hIabk':function(_0x51a0f8,_0x63ed45){return _0x51a0f8(_0x63ed45);},'rgvEo':function(_0x25d27c,_0x38fb86){return _0x25d27c(_0x38fb86);}};if(_0x49d5f7)return buildPlaywrightConfigCore(_0x5726ac,_0x49d5f7,_0x927724,_0x1dd4d2,_0x170fb7,_0x46a9b2['QZkNx']);const {storageStatePath:_0x365912,tempAuthPath:_0x1f0aa9}=await _0x46a9b2['hIabk'](resolveLocalAuthPath,getEnvDir(_0x927724));try{const _0x203e71=await buildPlaywrightConfigCore(_0x5726ac,_0x365912,_0x927724,_0x1dd4d2,_0x170fb7,'playwright-cli');return{..._0x203e71,'tempAuthPath':_0x1f0aa9};}catch(_0x491031){_0x1f0aa9&&await _0x46a9b2[_0x5186ab(0xbd)](unlink,_0x1f0aa9)[_0x5186ab(0xc0)](()=>{});throw _0x491031;}}export function getNestedValue(_0x3f7ce3,_0xa65bfe){const _0x2ccdc0=_0x7c6728,_0x2ea15c={'Ycjbw':function(_0x226974,_0x187931){return _0x226974(_0x187931);},'zEjaS':function(_0x13afa9,_0x31dddd){return _0x13afa9===_0x31dddd;},'YdwvX':function(_0xa95ede,_0x27743a){return _0xa95ede!==_0x27743a;}},_0x2ffc37=_0x2ea15c[_0x2ccdc0(0xd7)](parseKeyPath,_0xa65bfe);let _0x39dab2=_0x3f7ce3;for(const _0x53d8c7 of _0x2ffc37){if(_0x2ea15c['zEjaS'](_0x39dab2,null)||_0x39dab2===undefined||_0x2ea15c[_0x2ccdc0(0xe0)](typeof _0x39dab2,'object'))return undefined;_0x39dab2=_0x39dab2[_0x53d8c7];}return _0x39dab2;}export function setNestedValue(_0x23eb60,_0x2c7021,_0x26bdfe){const _0x4d3961=_0x7c6728,_0x185e30={'KPypL':function(_0xe986f7,_0x3c1557){return _0xe986f7!==_0x3c1557;},'SEdwM':_0x4d3961(0xd3)},_0x335dc8=parseKeyPath(_0x2c7021);let _0xa2ea8f=_0x23eb60;for(let _0x21587a=0x0;_0x21587a<_0x335dc8['length']-0x1;_0x21587a++){const _0x1e4ccd=_0x335dc8[_0x21587a];(!(_0x1e4ccd in _0xa2ea8f)||_0x185e30[_0x4d3961(0xc5)](typeof _0xa2ea8f[_0x1e4ccd],_0x185e30['SEdwM']))&&(_0xa2ea8f[_0x1e4ccd]={}),_0xa2ea8f=_0xa2ea8f[_0x1e4ccd];}_0xa2ea8f[_0x335dc8[_0x335dc8[_0x4d3961(0xa4)]-0x1]]=_0x26bdfe;}export function deleteNestedValue(_0x4d7ec4,_0x18ed0d){const _0x595905=_0x7c6728,_0x23ebd0={'QatDR':function(_0x1e9bff,_0x24eff6){return _0x1e9bff<_0x24eff6;},'gVuVu':function(_0x46544a,_0xb27a1){return _0x46544a-_0xb27a1;},'KWxDp':function(_0x226e50,_0x3d8f6a){return _0x226e50!==_0x3d8f6a;},'xOWqw':function(_0x4eeda,_0x1ead18){return _0x4eeda!==_0x1ead18;},'VCuJh':_0x595905(0xd3)},_0x188047=parseKeyPath(_0x18ed0d);let _0x14a998=_0x4d7ec4;for(let _0x552b77=0x0;_0x23ebd0['QatDR'](_0x552b77,_0x23ebd0[_0x595905(0xef)](_0x188047[_0x595905(0xa4)],0x1));_0x552b77++){if(_0x14a998===null||_0x14a998===undefined||_0x23ebd0['KWxDp'](typeof _0x14a998,'object'))return![];_0x14a998=_0x14a998[_0x188047[_0x552b77]];}if(_0x14a998===null||_0x14a998===undefined||_0x23ebd0['xOWqw'](typeof _0x14a998,_0x23ebd0[_0x595905(0xf0)]))return![];const _0xe212b8=_0x188047[_0x188047[_0x595905(0xa4)]-0x1];if(_0xe212b8 in _0x14a998)return delete _0x14a998[_0xe212b8],!![];return![];}function parseKeyPath(_0x5d4d1c){const _0x53798c=_0x7c6728,_0x14447b={'ZgQuk':function(_0x20757e,_0x54ff32){return _0x20757e===_0x54ff32;},'jAazp':'setupHeader'},_0x5ab2fa=_0x5d4d1c['split']('.');return _0x14447b[_0x53798c(0xab)](_0x5ab2fa[0x0],_0x53798c(0x97))&&(_0x5ab2fa[0x0]='headers'),_0x14447b['ZgQuk'](_0x5ab2fa[0x0],_0x14447b[_0x53798c(0xe1)])&&(_0x5ab2fa[0x0]=_0x53798c(0xce)),_0x5ab2fa;}export function formatSettings(_0x4b72ec,_0x755aa2=0x0){const _0x21ec4d=_0x7c6728,_0x5814e4={'qPIgQ':function(_0x3b8ab6,_0x3ed1cf){return _0x3b8ab6===_0x3ed1cf;},'DcFgT':function(_0x8715a8,_0x292f0c){return _0x8715a8!==_0x292f0c;}},_0xcf2597=[],_0x55283f='\x20\x20'[_0x21ec4d(0xd0)](_0x755aa2);for(const [_0x557ea3,_0x257720]of Object['entries'](_0x4b72ec)){if(_0x5814e4['qPIgQ'](_0x257720,undefined))continue;if(_0x5814e4['qPIgQ'](typeof _0x257720,_0x21ec4d(0xd3))&&_0x5814e4['DcFgT'](_0x257720,null)){_0xcf2597['push'](''+_0x55283f+_0x557ea3+':');for(const [_0x418147,_0x461d14]of Object['entries'](_0x257720)){_0xcf2597[_0x21ec4d(0xdb)](_0x55283f+'\x20\x20'+_0x418147+':\x20'+_0x461d14);}}else _0xcf2597['push'](''+_0x55283f+_0x557ea3+':\x20'+_0x257720);}return _0xcf2597['join']('\x0a');}
|
|
1
|
+
const _0x495d41=_0x2d62;(function(_0x1a7097,_0x2bbfae){const _0x5b0f62=_0x2d62,_0x474954=_0x1a7097();while(!![]){try{const _0xf644bc=parseInt(_0x5b0f62(0x78))/0x1+parseInt(_0x5b0f62(0x7a))/0x2+parseInt(_0x5b0f62(0xcc))/0x3*(-parseInt(_0x5b0f62(0xba))/0x4)+parseInt(_0x5b0f62(0xe4))/0x5*(parseInt(_0x5b0f62(0xbe))/0x6)+parseInt(_0x5b0f62(0x9c))/0x7+-parseInt(_0x5b0f62(0x7c))/0x8*(parseInt(_0x5b0f62(0xa5))/0x9)+-parseInt(_0x5b0f62(0xdc))/0xa;if(_0xf644bc===_0x2bbfae)break;else _0x474954['push'](_0x474954['shift']());}catch(_0x4195a6){_0x474954['push'](_0x474954['shift']());}}}(_0xc465,0x4ea84));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{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x36a714,_0x54a8b0){const _0x1d3d9d=_0x2d62,_0x3839a8={'GUSTl':function(_0x24f850,_0x534ae4,_0x270c9d,_0x105d94){return _0x24f850(_0x534ae4,_0x270c9d,_0x105d94);},'IcRHv':'local','sjkOR':function(_0xb95ff3,_0x4d68f3,_0xf0e93f){return _0xb95ff3(_0x4d68f3,_0xf0e93f);},'kzPcL':function(_0x9b512b,_0x541469){return _0x9b512b(_0x541469);},'bWSyr':function(_0x5f301f,_0x57541c){return _0x5f301f!==_0x57541c;},'oJXZO':function(_0x44dfe8,_0x5de86b){return _0x44dfe8!==_0x5de86b;},'DYpqy':function(_0x447333,_0x1b2d35){return _0x447333(_0x1b2d35);}},_0x55fa57=join(_0x54a8b0,'ci',_0x36a714),_0x42bd10=_0x3839a8[_0x1d3d9d(0x9a)](join,_0x54a8b0,_0x3839a8[_0x1d3d9d(0xb5)],_0x36a714),_0x2c2ffe=_0x3839a8[_0x1d3d9d(0x91)](join,_0x54a8b0,_0x36a714),_0x1cdcc5=join(_0x54a8b0,'local'),_0x3b7913=join(_0x54a8b0,'ci');if(existsSync(_0x55fa57))return _0x55fa57;if(existsSync(_0x42bd10))return _0x42bd10;if(_0x3839a8[_0x1d3d9d(0xb0)](existsSync,_0x2c2ffe)&&(_0x3839a8['bWSyr'](_0x2c2ffe,_0x1cdcc5)&&_0x3839a8['oJXZO'](_0x2c2ffe,_0x3b7913)?!![]:_0x3839a8[_0x1d3d9d(0x76)](hasLegacyProfileFiles,_0x2c2ffe)))return _0x2c2ffe;return null;}export function getEnvDir(_0x59212a,_0x2530af={}){const _0x3138fd=_0x2d62,_0x4e46eb={'iFFzU':function(_0x20de2f){return _0x20de2f();},'UsgOx':function(_0x5e645b,_0x1b4d19,_0x9428d4){return _0x5e645b(_0x1b4d19,_0x9428d4);},'EKfjL':function(_0x4450a6){return _0x4450a6();},'sjbiK':function(_0x2fd675,_0x2e8b3c){return _0x2fd675(_0x2e8b3c);},'QElBo':function(_0x1a5252,_0x1d22e2,_0x1ab577){return _0x1a5252(_0x1d22e2,_0x1ab577);},'zdkdm':function(_0x4d5084,_0x2a26fa,_0x58953e,_0x26c491){return _0x4d5084(_0x2a26fa,_0x58953e,_0x26c491);},'CntgY':_0x3138fd(0x9f)},_0x28eb98=_0x4e46eb[_0x3138fd(0xc1)](getRangerDir),_0x31635d=findEnvInRoot(_0x59212a,_0x28eb98);if(_0x31635d){if(_0x2530af[_0x3138fd(0x8d)]&&isLegacyEnvPath(_0x31635d))throw _0x4e46eb[_0x3138fd(0x7e)](legacyWriteError,_0x59212a,_0x31635d);return _0x31635d;}const _0x6ce9b1=_0x4e46eb['EKfjL'](getRangerHomeDir);if(_0x6ce9b1!==_0x28eb98){const _0x3b229c=_0x4e46eb['UsgOx'](findEnvInRoot,_0x59212a,_0x6ce9b1);if(_0x3b229c){if(_0x2530af['forWrite']&&_0x4e46eb[_0x3138fd(0xc2)](isLegacyEnvPath,_0x3b229c))throw _0x4e46eb['QElBo'](legacyWriteError,_0x59212a,_0x3b229c);return _0x3b229c;}}const _0x49c93b=_0x4e46eb['zdkdm'](join,_0x6ce9b1,_0x4e46eb['CntgY'],_0x59212a);if(_0x2530af['forWrite'])throw legacyWriteError(_0x59212a,_0x49c93b);return _0x49c93b;}function _0xc465(){const _0x43fc4c=['ranger-config','PUItv','GUSTl','tempAuthPath','4254572TcmgMA','ubLhK','args','local','IObBx','string','zTdgs','parse','vision','1071lrAyoC','YJGfG','xSKpR','length','filter','mWLYZ','gBHqY','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','map','NWpZN','split','kzPcL','auth.json.enc','eceDc','bgiPi','stagehand','IcRHv','HFVXE','clipboard-read','--disable-web-security','indexOf','285332QxZzmp','now','zdLHV','NfOgA','78iVQsZl','fQNJt','configPath','iFFzU','sjbiK','MtzYa','cAbGG','cSCZx','endsWith','allow','--allow-insecure-localhost','jlUeM','DSgrR','--no-sandbox','9bqeOqI','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','headers','code','tNnSl','pGLvB','cdpEndpoint','object','isArray','message','legacy','uLDPz','CiYZw','bHAMr','push','extraHTTPHeaders','10113880pJmJwh','browser','\x20is\x20not\x20set','auth.json','ENOENT','Cwznp','entries','startsWith','4675nTQrKb','LTheK','repeat','--unsafely-treat-insecure-origin-as-secure=http://localhost','storageState','includes','DYpqy','--allow-running-insecure-content','387962CxphwJ','hCfVK','1111914XGjtQk','header','1096sCXOnD','lMvjk','UsgOx','setupHeaders','hmdwL','catch','path','location','stringify','AsaiH','tCLoh','setupHeader','GmJGe','keys','nVGaA','QQvEI','Refusing\x20to\x20write\x20profile\x20\x22','forWrite','qcxSn','IrztX','fFlpb','sjkOR','rwjXt','userAgent','FbCkv','playwright-cli','FEXjz','.json'];_0xc465=function(){return _0x43fc4c;};return _0xc465();}function isLegacyEnvPath(_0x611e1f){const _0x557106=_0x2d62,_0x768555={'BVqPc':function(_0x11397a){return _0x11397a();},'tNnSl':function(_0xd23cff,_0x1378a3){return _0xd23cff+_0x1378a3;},'CiYZw':function(_0x2981b7,_0x2990b3){return _0x2981b7===_0x2990b3;}},_0x799b77=_0x768555['BVqPc'](getRangerDir),_0x4dd162=_0x768555['BVqPc'](getRangerHomeDir);for(const _0x26f8e0 of new Set([_0x799b77,_0x4dd162])){const _0x6ae713=_0x26f8e0[_0x557106(0xc6)]('/')?_0x26f8e0:_0x768555[_0x557106(0xd0)](_0x26f8e0,'/');if(_0x768555[_0x557106(0xd8)](_0x611e1f,_0x26f8e0)||_0x611e1f[_0x557106(0xe3)](_0x6ae713))return!![];}return![];}function legacyWriteError(_0x4fd66f,_0x4f3529){const _0x6ea2cb=_0x2d62,_0x105f2c={'nVGaA':function(_0x45e51f,_0x428f5d){return _0x45e51f+_0x428f5d;}};return new Error(_0x105f2c[_0x6ea2cb(0x8a)](_0x6ea2cb(0x8c)+_0x4fd66f+'\x22\x20to\x20legacy\x20path\x20'+_0x4f3529+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x6ea2cb(0xac),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x99e2f4,_0x1c8c6e){const _0x5b0079=_0x2d62,_0x33dd2c={'ovpgE':function(_0x5e9654){return _0x5e9654();},'qXVCo':function(_0xaf49a0){return _0xaf49a0();},'IdXrU':_0x5b0079(0x9f),'iOqYY':function(_0x5ea699,_0x10e388,_0x5d7981){return _0x5ea699(_0x10e388,_0x5d7981);},'PUItv':_0x5b0079(0xd6),'mxDHF':function(_0x5efb79,_0x24dab8,_0xf24f9d){return _0x5efb79(_0x24dab8,_0xf24f9d);},'NByXE':function(_0x3a47d6,_0x1a59c4){return _0x3a47d6(_0x1a59c4);},'IObBx':function(_0x5a90ad,_0x5842f8){return _0x5a90ad===_0x5842f8;}},_0x72cc15=_0x1c8c6e?.['rangerDir'],_0x3e8bbc=_0x72cc15?[_0x72cc15]:[_0x33dd2c['ovpgE'](getRangerDir),_0x33dd2c['qXVCo'](getRangerHomeDir)][_0x5b0079(0xa9)]((_0x6c435e,_0x365770,_0x1ca7d3)=>_0x1ca7d3[_0x5b0079(0xb9)](_0x6c435e)===_0x365770),_0x19d2af=_0x1c8c6e?.['locations']??['ci',_0x33dd2c['IdXrU'],'legacy'];for(const _0x214393 of _0x3e8bbc){const _0x1f1ce2=_0x33dd2c['iOqYY'](join,_0x214393,_0x5b0079(0x9f)),_0x2dd193=join(_0x214393,'ci'),_0x126d77=[{'location':'ci','path':join(_0x214393,'ci',_0x99e2f4)},{'location':_0x33dd2c['IdXrU'],'path':join(_0x214393,_0x33dd2c['IdXrU'],_0x99e2f4)},{'location':_0x33dd2c[_0x5b0079(0x99)],'path':_0x33dd2c['mxDHF'](join,_0x214393,_0x99e2f4)}];for(const _0x159b77 of _0x126d77){if(_0x19d2af[_0x5b0079(0x75)](_0x159b77[_0x5b0079(0x83)])&&_0x33dd2c['NByXE'](existsSync,_0x159b77['path'])){if(_0x159b77['location']===_0x33dd2c['PUItv']&&(_0x33dd2c[_0x5b0079(0xa0)](_0x159b77['path'],_0x1f1ce2)||_0x159b77['path']===_0x2dd193)&&!hasLegacyProfileFiles(_0x159b77['path']))continue;return{'path':_0x159b77[_0x5b0079(0x82)],'location':_0x159b77[_0x5b0079(0x83)]};}}}return null;}function hasLegacyProfileFiles(_0x2d5569){const _0x3e5a83=_0x2d62,_0x360a56={'IBfYI':function(_0x79d30c,_0x500f4,_0x4c8e45){return _0x79d30c(_0x500f4,_0x4c8e45);},'ubLhK':_0x3e5a83(0xb1)};return existsSync(join(_0x2d5569,'settings.json'))||existsSync(_0x360a56['IBfYI'](join,_0x2d5569,_0x3e5a83(0xdf)))||existsSync(join(_0x2d5569,_0x360a56[_0x3e5a83(0x9d)]));}export function isEnvCi(_0x4b572e){const _0x39f06b=_0x2d62,_0x22b33b={'NKKbL':function(_0x41695d,_0x155325){return _0x41695d(_0x155325);},'FxigQ':function(_0x1df97a,_0x1a100c,_0x2cf98a,_0x19927f){return _0x1df97a(_0x1a100c,_0x2cf98a,_0x19927f);},'AsaiH':function(_0x2a990a){return _0x2a990a();}};if(_0x22b33b['NKKbL'](existsSync,_0x22b33b['FxigQ'](join,getRangerDir(),'ci',_0x4b572e)))return!![];const _0x2220d7=_0x22b33b[_0x39f06b(0x85)](getRangerHomeDir);if(_0x2220d7!==getRangerDir()&&existsSync(join(_0x2220d7,'ci',_0x4b572e)))return!![];return![];}export async function cleanupTempFiles(_0x45307a){const _0x1b10da=_0x2d62,_0x435267={'NWpZN':function(_0x4e31a8,_0x323f6e){return _0x4e31a8!==_0x323f6e;},'SqGba':_0x1b10da(0xe0)},_0xbf6747=[_0x45307a[_0x1b10da(0x9b)],_0x45307a[_0x1b10da(0xc0)]]['filter'](Boolean);await Promise['all'](_0xbf6747[_0x1b10da(0xad)](_0xd7291e=>unlink(_0xd7291e)[_0x1b10da(0x81)](_0x549cba=>{const _0x40a857=_0x1b10da;_0x435267[_0x40a857(0xae)](_0x549cba[_0x40a857(0xcf)],_0x435267['SqGba'])&&console['warn'](_0x40a857(0xcd)+_0xd7291e+':',_0x549cba['message']);})));}export function getSettingsPath(_0x5d2e34){return join(getEnvDir(_0x5d2e34),'settings.json');}export async function loadSettings(_0x32c02e){const _0x4d9895=_0x2d62,_0x3c40cd={'IrztX':function(_0x568b0f,_0x3e9117){return _0x568b0f(_0x3e9117);},'rwjXt':function(_0x26ed2d,_0x55ae80,_0x5c5578){return _0x26ed2d(_0x55ae80,_0x5c5578);}},_0x7eeff0=getSettingsPath(_0x32c02e);if(!_0x3c40cd[_0x4d9895(0x8f)](existsSync,_0x7eeff0))return{};try{const _0x45ebc7=await _0x3c40cd[_0x4d9895(0x92)](readFile,_0x7eeff0,'utf-8');return JSON[_0x4d9895(0xa3)](_0x45ebc7);}catch{return{};}}export async function saveSettings(_0x43560b,_0x4133ad){const _0x398c48=_0x2d62,_0x3af7b0={'aWLMY':function(_0x22f7cf,_0x445268){return _0x22f7cf(_0x445268);},'uLDPz':function(_0x4d65bd,_0x45f4b6){return _0x4d65bd(_0x45f4b6);}},_0x2a63a3=_0x3af7b0['aWLMY'](getSettingsPath,_0x43560b),_0x388e7d=_0x3af7b0[_0x398c48(0xd7)](dirname,_0x2a63a3);!existsSync(_0x388e7d)&&await mkdir(_0x388e7d,{'recursive':!![]}),await writeFile(_0x2a63a3,JSON[_0x398c48(0x84)](_0x4133ad,null,0x2));}export function resolveEnvVars(_0x538544){const _0x2c9dba=_0x2d62,_0x20e9d6={'FEXjz':function(_0x53bb7c,_0x3dfbd8){return _0x53bb7c===_0x3dfbd8;},'AcgQb':_0x2c9dba(0xa1),'yTnyB':_0x2c9dba(0xd3)};if(typeof _0x538544===_0x20e9d6['AcgQb'])return _0x538544['replace'](/\$\{(\w+)\}/g,(_0x3c9f85,_0x5d4759)=>{const _0x28c345=_0x2c9dba,_0x315692=process['env'][_0x5d4759];if(_0x20e9d6[_0x28c345(0x96)](_0x315692,undefined))throw new Error('Environment\x20variable\x20'+_0x5d4759+_0x28c345(0xde));return _0x315692;});if(Array[_0x2c9dba(0xd4)](_0x538544))return _0x538544[_0x2c9dba(0xad)](resolveEnvVars);if(_0x538544&&typeof _0x538544===_0x20e9d6['yTnyB'])return Object['fromEntries'](Object[_0x2c9dba(0xe2)](_0x538544)['map'](([_0x3237db,_0x3c607b])=>[_0x3237db,resolveEnvVars(_0x3c607b)]));return _0x538544;}const isRecord=_0x4edabc=>typeof _0x4edabc==='object'&&_0x4edabc!==null&&!Array[_0x495d41(0xd4)](_0x4edabc),asRecord=_0x5467d=>isRecord(_0x5467d)?_0x5467d:undefined,mergeHeaders=(_0x21ea81,_0x6958f2)=>{const _0x514ac3=_0x495d41,_0x568209={..._0x21ea81??{},..._0x6958f2??{}};return Object[_0x514ac3(0x89)](_0x568209)['length']?_0x568209:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x495d41(0xb8),_0x495d41(0x77),_0x495d41(0xe7),_0x495d41(0xc8)];export function buildBrowserOptionsFromSettings(_0xd7795a,_0x304412={}){const _0x1921d7=_0x495d41,_0x3d1e13={'jlUeM':function(_0x320d5b,_0xcc05e9){return _0x320d5b(_0xcc05e9);},'MtzYa':'boolean','UORRN':function(_0x2fc7c7,_0x4647a7){return _0x2fc7c7(_0x4647a7);},'fFlpb':'string','BhcfJ':function(_0x45da3e,_0x5e1934){return _0x45da3e(_0x5e1934);}},_0x36d0bd=_0x3d1e13[_0x1921d7(0xc9)](asRecord,_0xd7795a['browser']),_0x340b8f={...asRecord(_0x36d0bd?.['launchOptions'])??{}};typeof _0x304412['headless']===_0x3d1e13[_0x1921d7(0xc3)]&&(_0x340b8f['headless']=_0x304412['headless']);if(_0xd7795a['safeMode']){const _0x50df94=_0x340b8f[_0x1921d7(0x9e)]??[],_0x27e5cf=SAFE_MODE_ARGS['filter'](_0x120019=>!_0x50df94['includes'](_0x120019));_0x340b8f['args']=[..._0x50df94,..._0x27e5cf];}if(_0xd7795a['allowInsecureLocalhost']){const _0x51ec43=_0x340b8f[_0x1921d7(0x9e)]??[],_0xc4ce5c=ALLOW_LOCALHOST_ARGS[_0x1921d7(0xa9)](_0x3bf23a=>!_0x51ec43[_0x1921d7(0x75)](_0x3bf23a));_0x340b8f['args']=[..._0x51ec43,..._0xc4ce5c];}const _0x1dea7f={..._0x3d1e13['UORRN'](asRecord,_0x36d0bd?.['contextOptions'])??{}};_0x1dea7f['ignoreHTTPSErrors']=!![];typeof _0xd7795a[_0x1921d7(0x93)]===_0x3d1e13[_0x1921d7(0x90)]&&(_0x1dea7f[_0x1921d7(0x93)]=_0xd7795a[_0x1921d7(0x93)]);const _0x598672=mergeHeaders(_0x3d1e13['BhcfJ'](asRecord,_0x1dea7f['extraHTTPHeaders']),asRecord(_0xd7795a['headers']));return _0x598672?_0x1dea7f[_0x1921d7(0xdb)]=_0x598672:delete _0x1dea7f['extraHTTPHeaders'],_0x304412['storageStatePath']&&(_0x1dea7f[_0x1921d7(0xe8)]=_0x304412['storageStatePath']),{'launchOptions':_0x340b8f,'contextOptions':_0x1dea7f};}async function resolveLocalAuthPath(_0x491ed8){const _0x5891f5=_0x495d41,_0x14b2e6={'fQNJt':function(_0x391916,_0x16bdcc,_0xe2ebf6){return _0x391916(_0x16bdcc,_0xe2ebf6);},'QQvEI':_0x5891f5(0xb1),'DSgrR':function(_0x3b08db,_0x4f05ce,_0x95d15f){return _0x3b08db(_0x4f05ce,_0x95d15f);},'qcxSn':_0x5891f5(0xdf),'zTdgs':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','uJgca':function(_0x55d5c8,_0x73b381){return _0x55d5c8(_0x73b381);},'zdLHV':function(_0x46d52c){return _0x46d52c();},'GlhZe':function(_0x21fd46,_0x28fd86){return _0x21fd46(_0x28fd86);}},_0x372c91=_0x14b2e6[_0x5891f5(0xbf)](join,_0x491ed8,_0x14b2e6[_0x5891f5(0x8b)]),_0x56a6aa=_0x14b2e6[_0x5891f5(0xca)](join,_0x491ed8,_0x14b2e6[_0x5891f5(0x8e)]);if(existsSync(_0x372c91))try{const _0x1b0998=await getToken();if(!_0x1b0998)throw new Error(_0x14b2e6[_0x5891f5(0xa2)]);const _0x3684e8=await _0x14b2e6['uJgca'](readFile,_0x372c91),_0x416063=decrypt(_0x3684e8,_0x1b0998),_0x3efd43=_0x14b2e6[_0x5891f5(0xca)](join,_0x14b2e6[_0x5891f5(0xbc)](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await _0x14b2e6['fQNJt'](writeFile,_0x3efd43,_0x416063),{'storageStatePath':_0x3efd43,'tempAuthPath':_0x3efd43};}catch(_0x9c6f68){const _0x4b62f2=_0x9c6f68 instanceof Error?_0x9c6f68[_0x5891f5(0xd5)]:_0x14b2e6['uJgca'](String,_0x9c6f68);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x4b62f2);}if(_0x14b2e6['GlhZe'](existsSync,_0x56a6aa))return{'storageStatePath':_0x56a6aa};return{};}export async function buildPlaywrightConfig(_0x1a1178,_0x1d32e9,_0x2ae0fb,_0x2863c4,_0x272fb9){const _0x13e6dd=_0x495d41,_0x51ebd9={'pGLvB':_0x13e6dd(0xb4),'zAZuZ':function(_0x46dd43,_0x1bef92){return _0x46dd43(_0x1bef92);},'bgiPi':function(_0x268136,_0x3f9b36,_0x129d6f,_0x1f0a67,_0x534797,_0x4e27f7,_0x3fa19a){return _0x268136(_0x3f9b36,_0x129d6f,_0x1f0a67,_0x534797,_0x4e27f7,_0x3fa19a);},'CXlVR':function(_0x56a691,_0x4f64ab){return _0x56a691(_0x4f64ab);}};if(_0x272fb9)return buildPlaywrightConfigCore(_0x1a1178,_0x272fb9,_0x1d32e9,_0x2ae0fb,_0x2863c4,_0x51ebd9[_0x13e6dd(0xd1)]);const {storageStatePath:_0x2a5c30,tempAuthPath:_0x5866cb}=await _0x51ebd9['zAZuZ'](resolveLocalAuthPath,getEnvDir(_0x1d32e9));try{const _0x5bdd1b=await _0x51ebd9[_0x13e6dd(0xb3)](buildPlaywrightConfigCore,_0x1a1178,_0x2a5c30,_0x1d32e9,_0x2ae0fb,_0x2863c4,'stagehand');return{..._0x5bdd1b,'tempAuthPath':_0x5866cb};}catch(_0x7099a4){_0x5866cb&&await _0x51ebd9['CXlVR'](unlink,_0x5866cb)['catch'](()=>{});throw _0x7099a4;}}export async function buildPlaywrightConfigCore(_0x4e9a8c,_0x3957c2,_0x477b3d,_0x1a4686,_0x1005e8,_0x1ef64b=_0x495d41(0xb4)){const _0x2588e4=_0x495d41,_0x15ce20={'lMvjk':'chromium','yDSHl':_0x2588e4(0xb7),'cAbGG':'clipboard-write','Cwznp':function(_0x289acd){return _0x289acd();},'hCfVK':function(_0x52a65e,_0x44d045,_0x3a1684,_0x48ac24){return _0x52a65e(_0x44d045,_0x3a1684,_0x48ac24);},'ltEmN':function(_0x1bbc0d){return _0x1bbc0d();},'HFVXE':'sessions','ukpiv':function(_0x423e2e,_0x6c0660){return _0x423e2e===_0x6c0660;},'GmJGe':'tabs','XNScI':'install','qCtNR':_0x2588e4(0xc7),'xSKpR':function(_0x5ddd39,_0x17e2a0){return _0x5ddd39===_0x17e2a0;},'OoWWR':function(_0x87d2ad){return _0x87d2ad();},'Yfvxl':function(_0x1a4c8e,_0x2f06e0){return _0x1a4c8e(_0x2f06e0);},'RXbeh':function(_0x5d271f,_0xc42334){return _0x5d271f===_0xc42334;},'hmdwL':function(_0x4976af,_0x5ae01a,_0x381188){return _0x4976af(_0x5ae01a,_0x381188);}},_0x1b3eb3=_0x1a4686||_0x15ce20[_0x2588e4(0xe1)](randomUUID),_0x5e3f1d=_0x15ce20[_0x2588e4(0x79)](join,_0x15ce20['ltEmN'](getRangerDir),_0x15ce20[_0x2588e4(0xb6)],_0x1b3eb3),_0x47f0b1=Boolean(_0x4e9a8c['cdpEndpoint']),_0x2c9aa5=_0x47f0b1?{'browserName':_0x15ce20[_0x2588e4(0x7d)],'cdpEndpoint':_0x4e9a8c[_0x2588e4(0xd2)]}:((()=>{const _0x1cd2f7=_0x2588e4,{launchOptions:_0x590eef,contextOptions:_0x2afa44}=buildBrowserOptionsFromSettings(_0x4e9a8c,{'headless':_0x1005e8?![]:_0x4e9a8c['headless']??!![],'storageStatePath':_0x3957c2});if(process['getuid']?.()===0x0){const _0x139173=[_0x1cd2f7(0xcb),'--disable-setuid-sandbox'],_0x38503a=_0x590eef[_0x1cd2f7(0x9e)]??[],_0x335645=_0x139173['filter'](_0x1a14e4=>!_0x38503a['includes'](_0x1a14e4));_0x590eef['args']=[..._0x38503a,..._0x335645];}return{'isolated':!![],'browserName':_0x15ce20[_0x1cd2f7(0x7d)],'launchOptions':_0x590eef,'contextOptions':{..._0x2afa44,'permissions':[_0x15ce20['yDSHl'],_0x15ce20[_0x1cd2f7(0xc4)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x45da29=_0x15ce20['ukpiv'](_0x1ef64b,_0x2588e4(0x95))?{'browser':_0x2c9aa5,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5e3f1d,'outputMode':'file','codegen':'none'}:{'name':_0x477b3d,'browser':_0x2c9aa5,'capabilities':['core',_0x15ce20[_0x2588e4(0x88)],_0x15ce20['XNScI'],'pdf',_0x2588e4(0xa4)],'imageResponses':_0x15ce20['qCtNR'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5e3f1d};if(!_0x47f0b1){const _0x5da783=_0x45da29[_0x2588e4(0xdd)],_0x48ead4=_0x5da783['contextOptions'];if(_0x15ce20[_0x2588e4(0xa7)](_0x48ead4[_0x2588e4(0x93)],undefined))delete _0x48ead4['userAgent'];if(_0x48ead4['storageState']===undefined)delete _0x48ead4[_0x2588e4(0xe8)];}const _0x64583b=join(_0x15ce20['OoWWR'](tmpdir),_0x2588e4(0x98));!_0x15ce20['Yfvxl'](existsSync,_0x64583b)&&await mkdir(_0x64583b,{'recursive':!![]});const _0x571c87=_0x15ce20['RXbeh'](_0x1ef64b,_0x2588e4(0x95))?'-cli':'',_0x47f183=_0x15ce20[_0x2588e4(0x80)](join,_0x64583b,_0x477b3d+'-'+Date[_0x2588e4(0xbb)]()+_0x571c87+_0x2588e4(0x97));return await writeFile(_0x47f183,JSON['stringify'](_0x45da29,null,0x2)),{'configPath':_0x47f183};}export async function buildPlaywrightCliConfig(_0x594a45,_0x3ac0a7,_0x30451e,_0x5116f2,_0x49ce58){const _0x3b5a16=_0x495d41,_0x4b72ce={'FbCkv':_0x3b5a16(0x95),'YJGfG':function(_0x3d2cab,_0x2451cc){return _0x3d2cab(_0x2451cc);}};if(_0x49ce58)return buildPlaywrightConfigCore(_0x594a45,_0x49ce58,_0x3ac0a7,_0x30451e,_0x5116f2,_0x4b72ce[_0x3b5a16(0x94)]);const {storageStatePath:_0x24877f,tempAuthPath:_0x3fc852}=await _0x4b72ce[_0x3b5a16(0xa6)](resolveLocalAuthPath,getEnvDir(_0x3ac0a7));try{const _0x2c14da=await buildPlaywrightConfigCore(_0x594a45,_0x24877f,_0x3ac0a7,_0x30451e,_0x5116f2,_0x3b5a16(0x95));return{..._0x2c14da,'tempAuthPath':_0x3fc852};}catch(_0x2b4b59){_0x3fc852&&await unlink(_0x3fc852)[_0x3b5a16(0x81)](()=>{});throw _0x2b4b59;}}export function getNestedValue(_0x58bd3c,_0x2fa0e2){const _0x28a7d9={'ByNPD':function(_0x3a9cb,_0x2d162c){return _0x3a9cb===_0x2d162c;},'ZYylA':function(_0x4f821f,_0x1800a9){return _0x4f821f===_0x1800a9;},'jRROb':function(_0x37c0d8,_0x15e3e2){return _0x37c0d8!==_0x15e3e2;},'KWdlm':'object'},_0x1a42d7=parseKeyPath(_0x2fa0e2);let _0x247870=_0x58bd3c;for(const _0x331800 of _0x1a42d7){if(_0x28a7d9['ByNPD'](_0x247870,null)||_0x28a7d9['ZYylA'](_0x247870,undefined)||_0x28a7d9['jRROb'](typeof _0x247870,_0x28a7d9['KWdlm']))return undefined;_0x247870=_0x247870[_0x331800];}return _0x247870;}export function setNestedValue(_0x134322,_0x379da8,_0x25c519){const _0x1ef37a=_0x495d41,_0x4a7d51={'oUnIx':function(_0x425f02,_0x1a40dd){return _0x425f02(_0x1a40dd);},'tCLoh':function(_0x4340fc,_0x23c196){return _0x4340fc-_0x23c196;},'NYagR':function(_0x48f534,_0x5f4e65){return _0x48f534!==_0x5f4e65;}},_0x3a89dc=_0x4a7d51['oUnIx'](parseKeyPath,_0x379da8);let _0x437608=_0x134322;for(let _0x5a30c4=0x0;_0x5a30c4<_0x4a7d51[_0x1ef37a(0x86)](_0x3a89dc['length'],0x1);_0x5a30c4++){const _0x396089=_0x3a89dc[_0x5a30c4];(!(_0x396089 in _0x437608)||_0x4a7d51['NYagR'](typeof _0x437608[_0x396089],_0x1ef37a(0xd3)))&&(_0x437608[_0x396089]={}),_0x437608=_0x437608[_0x396089];}_0x437608[_0x3a89dc[_0x3a89dc[_0x1ef37a(0xa8)]-0x1]]=_0x25c519;}export function deleteNestedValue(_0x1d2c61,_0x1355ea){const _0x24c612=_0x495d41,_0x1995dc={'LTheK':function(_0xd816b1,_0x4acad5){return _0xd816b1(_0x4acad5);},'jARpf':function(_0x20d2b3,_0x309082){return _0x20d2b3<_0x309082;},'bHAMr':function(_0x1a887a,_0x29e7c4){return _0x1a887a-_0x29e7c4;},'gBHqY':function(_0x3c5710,_0x101d4c){return _0x3c5710===_0x101d4c;},'cSCZx':function(_0x20670a,_0x10af63){return _0x20670a===_0x10af63;},'pPcma':function(_0x175bd5,_0x181bf5){return _0x175bd5!==_0x181bf5;},'eceDc':function(_0x522c9b,_0x5e9ebf){return _0x522c9b in _0x5e9ebf;}},_0x5bfd7b=_0x1995dc[_0x24c612(0xe5)](parseKeyPath,_0x1355ea);let _0x5f0db2=_0x1d2c61;for(let _0x969747=0x0;_0x1995dc['jARpf'](_0x969747,_0x1995dc[_0x24c612(0xd9)](_0x5bfd7b['length'],0x1));_0x969747++){if(_0x5f0db2===null||_0x1995dc[_0x24c612(0xab)](_0x5f0db2,undefined)||typeof _0x5f0db2!=='object')return![];_0x5f0db2=_0x5f0db2[_0x5bfd7b[_0x969747]];}if(_0x5f0db2===null||_0x1995dc[_0x24c612(0xc5)](_0x5f0db2,undefined)||_0x1995dc['pPcma'](typeof _0x5f0db2,_0x24c612(0xd3)))return![];const _0x197884=_0x5bfd7b[_0x5bfd7b['length']-0x1];if(_0x1995dc[_0x24c612(0xb2)](_0x197884,_0x5f0db2))return delete _0x5f0db2[_0x197884],!![];return![];}function _0x2d62(_0x1d6d28,_0x17bd88){_0x1d6d28=_0x1d6d28-0x75;const _0xc46534=_0xc465();let _0x2d62a3=_0xc46534[_0x1d6d28];return _0x2d62a3;}function parseKeyPath(_0x3e423a){const _0x541530=_0x495d41,_0x242049={'ftsuc':_0x541530(0x7b),'NfOgA':_0x541530(0x87)},_0x4ea2de=_0x3e423a[_0x541530(0xaf)]('.');return _0x4ea2de[0x0]===_0x242049['ftsuc']&&(_0x4ea2de[0x0]=_0x541530(0xce)),_0x4ea2de[0x0]===_0x242049[_0x541530(0xbd)]&&(_0x4ea2de[0x0]=_0x541530(0x7f)),_0x4ea2de;}export function formatSettings(_0x44d22c,_0x8375a6=0x0){const _0xd30961=_0x495d41,_0x3ff486={'mWLYZ':'object'},_0x48d127=[],_0x468e44='\x20\x20'[_0xd30961(0xe6)](_0x8375a6);for(const [_0x38c1df,_0x221310]of Object[_0xd30961(0xe2)](_0x44d22c)){if(_0x221310===undefined)continue;if(typeof _0x221310===_0x3ff486[_0xd30961(0xaa)]&&_0x221310!==null){_0x48d127[_0xd30961(0xda)](''+_0x468e44+_0x38c1df+':');for(const [_0x1b69fe,_0x13c609]of Object[_0xd30961(0xe2)](_0x221310)){_0x48d127['push'](_0x468e44+'\x20\x20'+_0x1b69fe+':\x20'+_0x13c609);}}else _0x48d127[_0xd30961(0xda)](''+_0x468e44+_0x38c1df+':\x20'+_0x221310);}return _0x48d127['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7a69db,_0x57a317){const _0x305441=_0xd0e5,_0x4309cf=_0x7a69db();while(!![]){try{const _0x3b7b11=-parseInt(_0x305441(0xc6))/0x1*(-parseInt(_0x305441(0xc7))/0x2)+parseInt(_0x305441(0xca))/0x3+parseInt(_0x305441(0xcb))/0x4*(parseInt(_0x305441(0xc4))/0x5)+parseInt(_0x305441(0xc2))/0x6+parseInt(_0x305441(0xcc))/0x7*(-parseInt(_0x305441(0xc5))/0x8)+parseInt(_0x305441(0xc8))/0x9+parseInt(_0x305441(0xc9))/0xa*(-parseInt(_0x305441(0xcd))/0xb);if(_0x3b7b11===_0x57a317)break;else _0x4309cf['push'](_0x4309cf['shift']());}catch(_0x743d4a){_0x4309cf['push'](_0x4309cf['shift']());}}}(_0x3eb7,0x39373));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x3eb7(){const _0x34499f=['utf-8','2725218SIoSSu','ranger/SKILL.md','446905vpbTKq','632jQYzVK','53brFkxa','8522HjXtli','4062177kCQxPT','4570dUcOuN','1039314qDjQPR','8XktESH','5957anzRsb','32615VsZpku'];_0x3eb7=function(){return _0x34499f;};return _0x3eb7();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x1d5e15){const _0x41ba8c=_0xd0e5,_0xe36b97={'rjCby':function(_0x5243f5,_0x121184,_0x17b347,_0x30ed37,_0x396ab7){return _0x5243f5(_0x121184,_0x17b347,_0x30ed37,_0x396ab7);}},_0x32fb37=_0xe36b97['rjCby'](join,__dirname,'..','..','skills'),_0x50196d=join(_0x32fb37,_0x1d5e15);try{return readFileSync(_0x50196d,_0x41ba8c(0xc1));}catch{return'';}}function _0xd0e5(_0x5d4061,_0x1d56be){_0x5d4061=_0x5d4061-0xc1;const _0x3eb778=_0x3eb7();let _0xd0e5f3=_0x3eb778[_0x5d4061];return _0xd0e5f3;}export function getRangerSkillContent(){const _0x2ed0aa=_0xd0e5,_0x5c13b5={'nkutN':function(_0x282b56,_0x32e1f1){return _0x282b56(_0x32e1f1);}};return _0x5c13b5['nkutN'](readSkillContent,_0x2ed0aa(0xc3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x7e96de=_0x57d8;(function(_0x2e138f,_0x293c58){const _0x2c43d1=_0x57d8,_0x3988f2=_0x2e138f();while(!![]){try{const _0x1719c3=-parseInt(_0x2c43d1(0x120))/0x1+-parseInt(_0x2c43d1(0x12a))/0x2*(parseInt(_0x2c43d1(0x10c))/0x3)+-parseInt(_0x2c43d1(0x11d))/0x4+parseInt(_0x2c43d1(0x11f))/0x5+parseInt(_0x2c43d1(0x127))/0x6+-parseInt(_0x2c43d1(0x11e))/0x7*(-parseInt(_0x2c43d1(0x124))/0x8)+parseInt(_0x2c43d1(0x129))/0x9;if(_0x1719c3===_0x293c58)break;else _0x3988f2['push'](_0x3988f2['shift']());}catch(_0x35468a){_0x3988f2['push'](_0x3988f2['shift']());}}}(_0x4fca,0x55145));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';function _0x4fca(){const _0x587f5c=['3aIVlHd','catch','SKILL.md','\x20\x20Skill\x20not\x20found:\x20','FMTjR','yfVbC','e2e-test-recommender','feature-tracker','endsWith','BlcnC','DGDfq','eiWeU','vskSN','\x20\x20Location:\x20','opencode','xMDIi','Invalid\x20skill\x20frontmatter','874264fqjVrL','4632719JtDDbA','2663045OIejFP','415821ZPFOTQ','bug-bash','jpcJZ','.md','8qLIgjp','tZelS','vnzsX','155748nmkSko','inrvo','3917853pXOlTl','1345658nIvYHa','utf-8','dYlYY'];_0x4fca=function(){return _0x587f5c;};return _0x4fca();}import{getSkillsDir}from'./claudeConfig.js';function _0x57d8(_0xc3db25,_0x5928f7){_0xc3db25=_0xc3db25-0x10b;const _0x4fca97=_0x4fca();let _0x57d8c4=_0x4fca97[_0xc3db25];return _0x57d8c4;}import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x7e96de(0x112),_0x7e96de(0x121),_0x7e96de(0x113)];export async function installSkill(_0xf64e28,_0x3c98c9={}){const _0x16ab1e=_0x7e96de,_0x315338={'jzeef':'project','wONaD':'claude','vnzsX':function(_0x5e089b,_0x50c9db,_0x3412ba){return _0x5e089b(_0x50c9db,_0x3412ba);},'FMTjR':function(_0x5023fd,_0xbd193e){return _0x5023fd(_0xbd193e);},'inrvo':function(_0x2bfe82,_0xac0bd2){return _0x2bfe82(_0xac0bd2);},'dYlYY':function(_0x198ba1,_0x597e84){return _0x198ba1(_0x597e84);},'eiWeU':function(_0x3792f3,_0x360c81){return _0x3792f3&&_0x360c81;},'bhZfR':function(_0x48881c,_0x1cbd7e){return _0x48881c===_0x1cbd7e;},'fbCUv':_0x16ab1e(0x11a),'BlcnC':function(_0x30a370,_0x46da93,_0x288a86){return _0x30a370(_0x46da93,_0x288a86);},'tZelS':function(_0x3f1ded,_0x2e6e52,_0x31cbf6){return _0x3f1ded(_0x2e6e52,_0x31cbf6);},'rpNcE':_0x16ab1e(0x10e),'vskSN':_0x16ab1e(0x12b),'jpcJZ':function(_0x249568,_0x1d1ed9,_0x20b9e9){return _0x249568(_0x1d1ed9,_0x20b9e9);},'xMDIi':function(_0x49419d,_0x24b5eb,_0x2c66cb,_0x432119){return _0x49419d(_0x24b5eb,_0x2c66cb,_0x432119);}},{level:level=_0x315338['jzeef'],cliVersion:_0x337e98,platform:platform=_0x315338['wONaD']}=_0x3c98c9,_0x4f00f3=getSourceSkillsDir(),_0x4ef506=_0x315338[_0x16ab1e(0x126)](join,_0x4f00f3,_0xf64e28),_0x31a2ac=join(_0x4f00f3,_0xf64e28+_0x16ab1e(0x123)),_0x4b534b=_0x315338[_0x16ab1e(0x110)](existsSync,_0x4ef506)&&_0x315338['FMTjR'](statSync,_0x4ef506)['isDirectory']()&&_0x315338['inrvo'](existsSync,join(_0x4ef506,_0x16ab1e(0x10e))),_0x37d72f=_0x315338['dYlYY'](existsSync,_0x31a2ac);if(_0x315338[_0x16ab1e(0x117)](!_0x4b534b,!_0x37d72f))return console['warn'](_0x16ab1e(0x10f)+_0xf64e28),![];const _0x4e88b6=_0x315338['bhZfR'](platform,_0x315338['fbCUv'])?_0x315338[_0x16ab1e(0x128)](getOpencodeSkillsDir,level):_0x315338[_0x16ab1e(0x10b)](getSkillsDir,level),_0x423744=_0x315338[_0x16ab1e(0x115)](join,_0x4e88b6,_0xf64e28);await mkdir(_0x423744,{'recursive':!![]});let _0x19b2a0,_0x281bab=[];if(_0x4b534b){const _0x3f2883=await readdir(_0x4ef506),_0x45fec1=_0x3f2883['filter'](_0x123251=>_0x123251[_0x16ab1e(0x114)]('.md'));for(const _0x2022a2 of _0x45fec1){const _0x4e3ac1=join(_0x4ef506,_0x2022a2),_0xb847a7=join(_0x423744,_0x2022a2);await _0x315338['vnzsX'](copyFile,_0x4e3ac1,_0xb847a7),_0x281bab['push'](_0x2022a2);}_0x19b2a0=await readFile(_0x315338[_0x16ab1e(0x125)](join,_0x4ef506,_0x315338['rpNcE']),_0x315338[_0x16ab1e(0x118)]);}else{_0x19b2a0=await _0x315338[_0x16ab1e(0x122)](readFile,_0x31a2ac,'utf-8');const _0x556ec5=_0x315338[_0x16ab1e(0x125)](join,_0x423744,'SKILL.md');await _0x315338[_0x16ab1e(0x11b)](writeFile,_0x556ec5,_0x19b2a0,_0x315338[_0x16ab1e(0x118)]),_0x281bab['push'](_0x16ab1e(0x10e));}const {name:_0x435281}=parseFrontmatter(_0x19b2a0);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x435281),console['log'](_0x16ab1e(0x119)+_0x423744),_0x281bab['length']>0x1&&console['log']('\x20\x20Files:\x20'+_0x281bab['join'](',\x20')),logLocalAgentInstallation(_0xf64e28,{'skillDisplayName':_0x435281,'installLevel':level},_0x337e98)[_0x16ab1e(0x10d)](()=>{}),!![];}function getSourceSkillsDir(){const _0x92c3d8=_0x7e96de,_0x5cbadc={'DGDfq':function(_0x4f5a76,_0x219147,_0x2b1531,_0x3b1300,_0x1b2102){return _0x4f5a76(_0x219147,_0x2b1531,_0x3b1300,_0x1b2102);}},_0x4ab80a=[_0x5cbadc[_0x92c3d8(0x116)](join,__dirname,'..','..','skills'),join(__dirname,'..','..','..','skills')];for(const _0x214a19 of _0x4ab80a){if(existsSync(_0x214a19))return _0x214a19;}return _0x4ab80a[0x0];}function parseFrontmatter(_0x5245db){const _0x48e771=_0x7e96de,_0x5e5c71={'yfVbC':_0x48e771(0x11c)},_0xea5857=_0x5245db['match'](/^---\n([\s\S]+?)\n---/);if(!_0xea5857)throw new Error(_0x5e5c71[_0x48e771(0x111)]);const _0x33ca38=_0xea5857[0x1],_0x454f0a=_0x33ca38['match'](/name:\s*(.+)/),_0x2f4ab2=_0x33ca38['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x454f0a?.[0x1]['trim']()||'','description':_0x2f4ab2?.[0x1]['trim']()||''};}export async function removeSkill(_0x58fd48,_0x58102a){const _0x16d573={'qlIha':function(_0x27ca86,_0x24040b){return _0x27ca86(_0x24040b);},'egxPF':function(_0x5c08cc,_0x2f9fbe,_0x4a2495){return _0x5c08cc(_0x2f9fbe,_0x4a2495);}},_0x49b163=_0x16d573['qlIha'](getSkillsDir,_0x58102a),_0x138d78=_0x16d573['egxPF'](join,_0x49b163,_0x58fd48);if(!existsSync(_0x138d78))return![];try{return await rm(_0x138d78,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x58fd48),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x58fd48),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x66851e=_0x3ddf;(function(_0x499a9a,_0x2d0c4b){const _0x4992a8=_0x3ddf,_0x14ac2b=_0x499a9a();while(!![]){try{const _0x1bba95=-parseInt(_0x4992a8(0x1c3))/0x1*(parseInt(_0x4992a8(0x1ed))/0x2)+parseInt(_0x4992a8(0x1bd))/0x3+parseInt(_0x4992a8(0x1d3))/0x4*(-parseInt(_0x4992a8(0x1c4))/0x5)+-parseInt(_0x4992a8(0x1ac))/0x6*(parseInt(_0x4992a8(0x1cd))/0x7)+parseInt(_0x4992a8(0x1db))/0x8*(-parseInt(_0x4992a8(0x1bb))/0x9)+-parseInt(_0x4992a8(0x1cf))/0xa*(-parseInt(_0x4992a8(0x1f1))/0xb)+parseInt(_0x4992a8(0x1eb))/0xc;if(_0x1bba95===_0x2d0c4b)break;else _0x14ac2b['push'](_0x14ac2b['shift']());}catch(_0xa52288){_0x14ac2b['push'](_0x14ac2b['shift']());}}}(_0x1381,0x602b5));function _0x3ddf(_0x9a3c2e,_0x4246a7){_0x9a3c2e=_0x9a3c2e-0x1a9;const _0x13813e=_0x1381();let _0x3ddfac=_0x13813e[_0x9a3c2e];return _0x3ddfac;}import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x39b3e9,_0x3799bc){const _0x464857=_0x3ddf,_0x1ca206={'trisJ':function(_0x454177,_0x769d3b){return _0x454177>=_0x769d3b;},'naQXt':function(_0x4ae9f1,_0x31b3e9){return _0x4ae9f1<=_0x31b3e9;},'LGJCN':function(_0x26d651,_0x15b954){return _0x26d651&_0x15b954;},'fsdkO':function(_0x39d8c4,_0x22fd5d){return _0x39d8c4+_0x22fd5d;},'WHsum':function(_0x1d94f8,_0x32611a){return _0x1d94f8-_0x32611a;},'UZtqK':function(_0x3b5ca4,_0x193fc4){return _0x3b5ca4+_0x193fc4;}};if(_0x1ca206[_0x464857(0x1d8)](_0x3799bc,_0x39b3e9['length']))return[0x0,0x0];const _0x49b7ca=_0x39b3e9[_0x3799bc];let _0x16a6a1=0x1,_0x4ad377=0x80;while(_0x1ca206['naQXt'](_0x16a6a1,0x8)&&!_0x1ca206['LGJCN'](_0x49b7ca,_0x4ad377)){_0x16a6a1++,_0x4ad377>>=0x1;}if(_0x1ca206[_0x464857(0x1ab)](_0x3799bc,_0x16a6a1)>_0x39b3e9['length'])return[0x0,0x0];let _0xa85bb4=_0x49b7ca&_0x1ca206[_0x464857(0x1b0)](_0x4ad377,0x1);for(let _0x32457e=0x1;_0x32457e<_0x16a6a1;_0x32457e++){_0xa85bb4=_0x1ca206['UZtqK'](_0xa85bb4*0x100,_0x39b3e9[_0x3799bc+_0x32457e]);}return[_0xa85bb4,_0x16a6a1];}function readId(_0x122e49,_0x1141c0){const _0x35872f=_0x3ddf,_0x339fa4={'PTcuC':function(_0xa5d304,_0x574173){return _0xa5d304>=_0x574173;},'uEBpZ':function(_0xd017ee,_0x253f36){return _0xd017ee>=_0x253f36;},'EGiVH':function(_0x30baf9,_0xe5d476){return _0x30baf9<_0xe5d476;},'HUHtr':function(_0x19e382,_0x4c0494){return _0x19e382+_0x4c0494;},'raUXe':function(_0xfc96c8,_0x231f08){return _0xfc96c8*_0x231f08;},'jveQC':function(_0x1f2c61,_0xe7be7a){return _0x1f2c61+_0xe7be7a;}};if(_0x339fa4[_0x35872f(0x1d9)](_0x1141c0,_0x122e49['length']))return[0x0,0x0];const _0x484622=_0x122e49[_0x1141c0];let _0x26382c;if(_0x339fa4[_0x35872f(0x1cb)](_0x484622,0x80))_0x26382c=0x1;else{if(_0x339fa4['PTcuC'](_0x484622,0x40))_0x26382c=0x2;else{if(_0x484622>=0x20)_0x26382c=0x3;else{if(_0x484622>=0x10)_0x26382c=0x4;else return[_0x484622,0x1];}}}if(_0x1141c0+_0x26382c>_0x122e49[_0x35872f(0x1f3)])return[0x0,0x0];let _0x4d4dd7=0x0;for(let _0x278558=0x0;_0x339fa4['EGiVH'](_0x278558,_0x26382c);_0x278558++){_0x4d4dd7=_0x339fa4[_0x35872f(0x1ad)](_0x339fa4['raUXe'](_0x4d4dd7,0x100),_0x122e49[_0x339fa4[_0x35872f(0x1d0)](_0x1141c0,_0x278558)]);}return[_0x4d4dd7,_0x26382c];}function readUint(_0x1524df,_0x191d2b,_0x23762e){let _0x7bc914=0x0;for(let _0x54374e=0x0;_0x54374e<_0x23762e;_0x54374e++){_0x7bc914=_0x7bc914*0x100+_0x1524df[_0x191d2b+_0x54374e];}return _0x7bc914;}function isUnknownSize(_0x356151,_0x55505e){const _0x1d10d3=_0x3ddf,_0x3d3f16={'Kkcuj':function(_0x4e47f6,_0x42afaa){return _0x4e47f6===_0x42afaa;},'DhsNK':function(_0x13b000,_0x4c06f7){return _0x13b000*_0x4c06f7;}};return _0x3d3f16['Kkcuj'](_0x356151,Math['pow'](0x2,_0x3d3f16[_0x1d10d3(0x1e9)](0x7,_0x55505e))-0x1);}function writeVint(_0x96e39c,_0x5b435c){const _0x4ce0d1=_0x3ddf,_0x2087c8={'atDaA':function(_0x5ef774,_0x490b27){return _0x5ef774<_0x490b27;},'nqMyv':function(_0x3c589a,_0x110d26){return _0x3c589a-_0x110d26;},'Uamof':function(_0x451414,_0x177c38){return _0x451414&_0x177c38;},'KLEKU':function(_0x2113aa,_0x1c75da){return _0x2113aa/_0x1c75da;},'fIZGD':function(_0x263284,_0x3d3a14){return _0x263284<<_0x3d3a14;}};let _0x1a2849=_0x5b435c||0x1;while(_0x2087c8['atDaA'](_0x2087c8['nqMyv'](Math['pow'](0x2,0x7*_0x1a2849),0x2),_0x96e39c))_0x1a2849++;const _0x1de3fe=Buffer[_0x4ce0d1(0x1aa)](_0x1a2849);for(let _0x1cb0e5=_0x1a2849-0x1;_0x1cb0e5>=0x0;_0x1cb0e5--){_0x1de3fe[_0x1cb0e5]=_0x2087c8[_0x4ce0d1(0x1d6)](_0x96e39c,0xff),_0x96e39c=Math['floor'](_0x2087c8['KLEKU'](_0x96e39c,0x100));}return _0x1de3fe[0x0]|=_0x2087c8[_0x4ce0d1(0x1e3)](0x1,_0x2087c8[_0x4ce0d1(0x1b7)](0x8,_0x1a2849)),_0x1de3fe;}function writeUint(_0x4e002c,_0x3fd1aa){const _0x36a56c=_0x3ddf,_0x38c1e2={'NNcts':function(_0xab59be,_0x28c9df){return _0xab59be-_0x28c9df;},'YUGHW':function(_0xeb7747,_0x143698){return _0xeb7747&_0x143698;},'nmYKU':function(_0x3f6c9f,_0x2783d2){return _0x3f6c9f/_0x2783d2;}},_0x3151c5=Buffer['alloc'](_0x3fd1aa);for(let _0x44ee16=_0x38c1e2[_0x36a56c(0x1f7)](_0x3fd1aa,0x1);_0x44ee16>=0x0;_0x44ee16--){_0x3151c5[_0x44ee16]=_0x38c1e2['YUGHW'](_0x4e002c,0xff),_0x4e002c=Math[_0x36a56c(0x1ea)](_0x38c1e2[_0x36a56c(0x1f0)](_0x4e002c,0x100));}return _0x3151c5;}function writeUnknownSizeVint(_0x598b14){const _0x21533e=_0x3ddf,_0x5ba293={'KYDyY':function(_0x23393a,_0x295397){return _0x23393a-_0x295397;}},_0x14142f=Buffer[_0x21533e(0x1aa)](_0x598b14,0xff);return _0x14142f[0x0]=0xff>>_0x5ba293[_0x21533e(0x1dd)](_0x598b14,0x1),_0x14142f;}function uintSize(_0x3e78e7){const _0x22330c=_0x3ddf,_0x397741={'HCEVB':function(_0x209367,_0x4a7566){return _0x209367>_0x4a7566;}};if(_0x3e78e7===0x0)return 0x1;let _0x589f08=0x0,_0x264b92=_0x3e78e7;while(_0x397741[_0x22330c(0x1ec)](_0x264b92,0x0)){_0x589f08++,_0x264b92=Math['floor'](_0x264b92/0x100);}return _0x589f08;}function findTimestampScale(_0x502cc9,_0x39de1e){const _0x21e63a=_0x3ddf,_0x43f676={'sUHzV':function(_0xdd40cf,_0x98838c,_0x3f1908){return _0xdd40cf(_0x98838c,_0x3f1908);},'vADcT':function(_0x9a54aa,_0x3add21){return _0x9a54aa===_0x3add21;},'OSlcY':function(_0x546f48,_0x56a817){return _0x546f48+_0x56a817;},'KQwjC':function(_0x595716,_0xcd6a1b){return _0x595716+_0xcd6a1b;},'VjhgA':function(_0x53cb2a,_0x4d95d9){return _0x53cb2a<_0x4d95d9;},'SjSnU':function(_0x546870,_0x52ed30,_0x2980f5){return _0x546870(_0x52ed30,_0x2980f5);},'lNJIT':function(_0x1737f1,_0x5a1f5e){return _0x1737f1+_0x5a1f5e;},'zrlVO':function(_0x4715be,_0x5dc11b,_0x281684){return _0x4715be(_0x5dc11b,_0x281684);},'oqEoY':function(_0x422538,_0x37c5a8){return _0x422538+_0x37c5a8;}};let _0x252986=_0x39de1e;const _0x2bd5a2=Math[_0x21e63a(0x1ae)](_0x502cc9[_0x21e63a(0x1f3)],_0x39de1e+0x2710);while(_0x252986<_0x2bd5a2){const [_0x3c6992,_0x169a25]=readId(_0x502cc9,_0x252986),[_0x3c92fb,_0x15d9a5]=_0x43f676['sUHzV'](readVint,_0x502cc9,_0x252986+_0x169a25);if(_0x43f676[_0x21e63a(0x1d2)](_0x3c6992,ID_INFO)){let _0x46a204=_0x43f676[_0x21e63a(0x1f5)](_0x252986+_0x169a25,_0x15d9a5);const _0x48337e=_0x43f676['KQwjC'](_0x46a204,_0x3c92fb);while(_0x43f676[_0x21e63a(0x1c1)](_0x46a204,_0x48337e)){const [_0x3a3b61,_0x551c6c]=_0x43f676[_0x21e63a(0x1ef)](readId,_0x502cc9,_0x46a204),[_0x487f5e,_0x1b274c]=_0x43f676['sUHzV'](readVint,_0x502cc9,_0x46a204+_0x551c6c);if(_0x3a3b61===ID_TIMESTAMP_SCALE)return readUint(_0x502cc9,_0x43f676[_0x21e63a(0x1f5)](_0x46a204,_0x551c6c)+_0x1b274c,_0x487f5e);_0x46a204+=_0x43f676['lNJIT'](_0x551c6c,_0x1b274c)+_0x487f5e;}break;}if(_0x43f676['vADcT'](_0x3c6992,ID_CLUSTER))break;if(_0x43f676[_0x21e63a(0x1c7)](isUnknownSize,_0x3c92fb,_0x15d9a5))break;_0x252986+=_0x43f676[_0x21e63a(0x1d1)](_0x169a25,_0x15d9a5)+_0x3c92fb;}return 0xf4240;}function findFirstClusterOffset(_0x5201a4,_0x2e42f8){const _0x4c1856=_0x3ddf,_0x291bb7={'UUodo':function(_0x27d66c,_0x3935cb,_0x903911){return _0x27d66c(_0x3935cb,_0x903911);},'ihhot':function(_0x9d84e4,_0x152521,_0x17e9dd){return _0x9d84e4(_0x152521,_0x17e9dd);}};let _0xebebbe=_0x2e42f8;while(_0xebebbe<_0x5201a4['length']){const [_0x508cf9,_0x3f3628]=_0x291bb7['UUodo'](readId,_0x5201a4,_0xebebbe);if(_0x508cf9===ID_CLUSTER)return _0xebebbe;const [_0x31c131,_0x530b4f]=_0x291bb7['UUodo'](readVint,_0x5201a4,_0xebebbe+_0x3f3628);if(_0x291bb7[_0x4c1856(0x1b8)](isUnknownSize,_0x31c131,_0x530b4f))return _0xebebbe;_0xebebbe+=_0x3f3628+_0x530b4f+_0x31c131;}return _0x5201a4['length'];}function findClusterEnd(_0x254952,_0x5dea0f,_0x303603,_0x41a0d9){const _0x21dfbd=_0x3ddf,_0x5e36fc={'ZrNCP':function(_0x7d64b9,_0x26e7f7,_0x3af4da){return _0x7d64b9(_0x26e7f7,_0x3af4da);},'MGWXi':function(_0x15c7d2,_0x3a20d0){return _0x15c7d2<_0x3a20d0;},'tVLpX':function(_0x336fc5,_0xc7ab04,_0x296382){return _0x336fc5(_0xc7ab04,_0x296382);},'ZunKf':function(_0x2aeb5f,_0x58dfbe){return _0x2aeb5f+_0x58dfbe;},'yUbkK':function(_0x19a887,_0x550a97){return _0x19a887+_0x550a97;}};if(!_0x5e36fc[_0x21dfbd(0x1ca)](isUnknownSize,_0x303603,_0x41a0d9))return _0x5dea0f+_0x303603;const _0x5ae819=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x109b2b=_0x5dea0f;while(_0x5e36fc[_0x21dfbd(0x1ba)](_0x109b2b,_0x254952[_0x21dfbd(0x1f3)]-0x4)){const [_0x61cb61,_0x2f61bc]=_0x5e36fc['tVLpX'](readId,_0x254952,_0x109b2b);if(_0x5ae819[_0x21dfbd(0x1e0)](_0x61cb61))return _0x109b2b;const [_0x2d630c,_0x55bec9]=readVint(_0x254952,_0x5e36fc['ZunKf'](_0x109b2b,_0x2f61bc));if(isUnknownSize(_0x2d630c,_0x55bec9))return _0x254952['length'];_0x109b2b+=_0x5e36fc[_0x21dfbd(0x1df)](_0x2f61bc+_0x55bec9,_0x2d630c);}return _0x254952['length'];}function extractClusters(_0x528d5e,_0x3812c7){const _0x487cc3=_0x3ddf,_0x2c8806={'GeqiA':function(_0x1c08c2,_0x56ce5e,_0x5c1e0f){return _0x1c08c2(_0x56ce5e,_0x5c1e0f);},'psfnN':function(_0x5dca57,_0x4c5595){return _0x5dca57+_0x4c5595;},'kGGgS':function(_0x4fc372,_0x285937,_0x5c1dd0){return _0x4fc372(_0x285937,_0x5c1dd0);},'OqCve':function(_0x747021,_0x4bac8d){return _0x747021+_0x4bac8d;},'haQJL':function(_0x1f9f58,_0x3bcf34,_0x446814){return _0x1f9f58(_0x3bcf34,_0x446814);},'FdsZf':function(_0x50eaee,_0x2420dc){return _0x50eaee===_0x2420dc;},'VkrjG':function(_0x3c02f9,_0x395b3e){return _0x3c02f9+_0x395b3e;},'YMqOT':function(_0x2ffb7f,_0x27635f){return _0x2ffb7f+_0x27635f;},'LJdQl':function(_0x4ac624,_0x12d666){return _0x4ac624+_0x12d666;},'bTaoS':function(_0x1fb82c,_0x13c4f4){return _0x1fb82c+_0x13c4f4;},'UdPaB':function(_0x86171a,_0x3b3c61){return _0x86171a<_0x3b3c61;},'XZBtr':function(_0x3dfd28,_0x2fa499,_0x2e0c59){return _0x3dfd28(_0x2fa499,_0x2e0c59);},'cCpxo':function(_0x3879bb,_0x3e612d){return _0x3879bb===_0x3e612d;},'oNGLt':function(_0x38a33c,_0x2f6a4c){return _0x38a33c>=_0x2f6a4c;},'WdbQa':function(_0x24b355,_0x7a96f3){return _0x24b355+_0x7a96f3;},'zkLxR':function(_0x72a926,_0x3638d6){return _0x72a926===_0x3638d6;},'FYSfn':function(_0x9a29c8,_0x216c1a){return _0x9a29c8+_0x216c1a;}},_0x459814=[],_0x1bc237=Buffer[_0x487cc3(0x1f9)]([0x1f,0x43,0xb6,0x75]);let _0x215302=0x0;while(_0x215302<_0x528d5e[_0x487cc3(0x1f3)]){const _0x1e8940=_0x528d5e[_0x487cc3(0x1e2)](_0x1bc237,_0x215302);if(_0x1e8940===-0x1)break;const [_0x38317b,_0x3d1b9e]=_0x2c8806[_0x487cc3(0x1a9)](readId,_0x528d5e,_0x1e8940);if(_0x38317b!==ID_CLUSTER){_0x215302=_0x2c8806[_0x487cc3(0x1c8)](_0x1e8940,0x1);continue;}const [_0x47f2ee,_0x3e209f]=_0x2c8806[_0x487cc3(0x1d5)](readVint,_0x528d5e,_0x2c8806[_0x487cc3(0x1f2)](_0x1e8940,_0x3d1b9e)),_0x2bf188=_0x2c8806['psfnN'](_0x1e8940+_0x3d1b9e,_0x3e209f),_0x449ac3=findClusterEnd(_0x528d5e,_0x2bf188,_0x47f2ee,_0x3e209f);let _0x2eab69=_0x2bf188,_0x3cafd4=0x0,_0x400e39=0x2,_0x591188=![],_0xeae8b1=Buffer[_0x487cc3(0x1aa)](0x0),_0x225c18=Buffer['alloc'](0x0);while(_0x2eab69<_0x449ac3){const [_0x547eb3,_0x466847]=_0x2c8806[_0x487cc3(0x1f4)](readId,_0x528d5e,_0x2eab69),[_0x1deae7,_0x536e71]=readVint(_0x528d5e,_0x2eab69+_0x466847);if(_0x2c8806[_0x487cc3(0x1fa)](_0x547eb3,ID_TIMESTAMP)){_0x3cafd4=readUint(_0x528d5e,_0x2c8806['VkrjG'](_0x2eab69,_0x466847)+_0x536e71,_0x1deae7),_0x400e39=_0x1deae7,_0x591188=!![],_0xeae8b1=_0x528d5e['slice'](_0x2bf188,_0x2eab69);const _0x421b68=_0x2c8806[_0x487cc3(0x1e4)](_0x2c8806['psfnN'](_0x2eab69,_0x466847),_0x536e71)+_0x1deae7;_0x225c18=_0x528d5e[_0x487cc3(0x1ee)](_0x421b68,_0x449ac3);break;}if(_0x2c8806['FdsZf'](_0x547eb3,ID_CLUSTER))break;if(isUnknownSize(_0x1deae7,_0x536e71))break;_0x2eab69+=_0x2c8806['LJdQl'](_0x2c8806['bTaoS'](_0x466847,_0x536e71),_0x1deae7);}!_0x591188&&(_0x225c18=_0x528d5e['slice'](_0x2bf188,_0x449ac3));let _0x377738=_0x3cafd4;_0x2eab69=_0x2bf188;while(_0x2c8806['UdPaB'](_0x2eab69,_0x449ac3)){const [_0x2dc1c2,_0x335e4a]=readId(_0x528d5e,_0x2eab69),[_0x1fee81,_0x180dcf]=_0x2c8806[_0x487cc3(0x1e1)](readVint,_0x528d5e,_0x2eab69+_0x335e4a);if(_0x2c8806[_0x487cc3(0x1e5)](_0x2dc1c2,ID_SIMPLE_BLOCK)&&_0x2c8806[_0x487cc3(0x1be)](_0x1fee81,0x4)){const _0x2b7935=_0x2c8806['psfnN'](_0x2eab69,_0x335e4a)+_0x180dcf,[,_0x385685]=readVint(_0x528d5e,_0x2b7935),_0x30bc2c=_0x528d5e['readInt16BE'](_0x2c8806[_0x487cc3(0x1f2)](_0x2b7935,_0x385685)),_0x44a3b2=_0x2c8806['WdbQa'](_0x3cafd4,_0x30bc2c);if(_0x44a3b2>_0x377738)_0x377738=_0x44a3b2;}if(_0x2c8806['zkLxR'](_0x2dc1c2,ID_CLUSTER))break;if(isUnknownSize(_0x1fee81,_0x180dcf))break;_0x2eab69+=_0x2c8806[_0x487cc3(0x1cc)](_0x2c8806[_0x487cc3(0x1c6)](_0x335e4a,_0x180dcf),_0x1fee81);}_0x459814['push']({'timestamp':_0x3cafd4,'maxTicks':_0x377738,'bodyBeforeTimestamp':_0xeae8b1,'bodyAfterTimestamp':_0x225c18,'timestampElementSize':_0x400e39}),_0x215302=_0x449ac3;}return _0x459814;}function parseWebm(_0x1bdb3c){const _0x392b63=_0x3ddf,_0xb49f82={'qUEQw':function(_0x28e181,_0x4fa22a){return _0x28e181+_0x4fa22a;},'dbxnO':function(_0x51dfa2,_0xda401c,_0x17d5e7){return _0x51dfa2(_0xda401c,_0x17d5e7);},'TSFzJ':function(_0x4bfa3c,_0x34d131){return _0x4bfa3c+_0x34d131;},'tbiOd':function(_0x38f22c,_0x346d82,_0x2d84a4){return _0x38f22c(_0x346d82,_0x2d84a4);},'BXEte':function(_0x258750,_0x1dbe2d,_0x757968){return _0x258750(_0x1dbe2d,_0x757968);}};let _0x1d3616=0x0;const [,_0x307b5d]=readId(_0x1bdb3c,_0x1d3616),[_0x6c0111,_0x12b705]=readVint(_0x1bdb3c,_0xb49f82['qUEQw'](_0x1d3616,_0x307b5d));_0x1d3616+=_0xb49f82['qUEQw'](_0xb49f82[_0x392b63(0x1b1)](_0x307b5d,_0x12b705),_0x6c0111);const [_0x4d085f,_0x10a61a]=readId(_0x1bdb3c,_0x1d3616);if(_0x4d085f!==ID_SEGMENT)return null;const [,_0x3982d9]=_0xb49f82['dbxnO'](readVint,_0x1bdb3c,_0xb49f82[_0x392b63(0x1b1)](_0x1d3616,_0x10a61a)),_0x2d1428=_0xb49f82['TSFzJ'](_0x1d3616,_0x10a61a)+_0x3982d9,_0x54d19f=findTimestampScale(_0x1bdb3c,_0x2d1428),_0x36a3ac=_0xb49f82['tbiOd'](findFirstClusterOffset,_0x1bdb3c,_0x2d1428),_0x39f8dd=_0x1bdb3c['slice'](0x0,_0x36a3ac),_0x49ebfe=_0xb49f82['BXEte'](extractClusters,_0x1bdb3c,_0x54d19f);let _0x4ddb74=0x0;for(const _0x42b8f8 of _0x49ebfe){if(_0x42b8f8['maxTicks']>_0x4ddb74)_0x4ddb74=_0x42b8f8['maxTicks'];}return{'header':_0x39f8dd,'clusters':_0x49ebfe,'timestampScale':_0x54d19f,'maxTimestampTicks':_0x4ddb74};}function buildCluster(_0x3284a1,_0x282f22,_0x127699){const _0x381154=_0x3ddf,_0x31ce70={'fAXer':function(_0x53cba4,_0x251ad6){return _0x53cba4(_0x251ad6);}},_0x443419=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x220ea7=Math['max'](0x4,uintSize(_0x3284a1)),_0x34b856=Buffer[_0x381154(0x1b9)]([Buffer['from']([ID_TIMESTAMP]),_0x31ce70[_0x381154(0x1b4)](writeVint,_0x220ea7),writeUint(_0x3284a1,_0x220ea7)]),_0x4b0e46=Buffer[_0x381154(0x1b9)]([_0x282f22,_0x34b856,_0x127699]),_0x11367b=writeVint(_0x4b0e46[_0x381154(0x1f3)]);return Buffer['concat']([_0x443419,_0x11367b,_0x4b0e46]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x42d1bb){const _0xec1ae6=_0x3ddf,_0x406d64={'eyzrN':function(_0x32df68,_0x182696){return _0x32df68+_0x182696;},'baMGu':function(_0x51ee97,_0x54bf54,_0x3b2e03){return _0x51ee97(_0x54bf54,_0x3b2e03);},'Haxhq':function(_0x1698de,_0x3e363a,_0x2e2400){return _0x1698de(_0x3e363a,_0x2e2400);},'xKRdD':function(_0x1478bd,_0x37a4ad){return _0x1478bd+_0x37a4ad;},'ghERA':function(_0x39d979,_0x2134a2){return _0x39d979+_0x2134a2;},'QEKkx':function(_0x2cf739,_0x50c438){return _0x2cf739<_0x50c438;},'NAGvu':function(_0x375ce0,_0x3ec4cb){return _0x375ce0+_0x3ec4cb;},'Hqboj':function(_0xc811bd,_0x50200c){return _0xc811bd===_0x50200c;},'ZVOYJ':function(_0x2dba6d,_0x7822ee){return _0x2dba6d===_0x7822ee;},'inuQW':function(_0x427b95,_0x474a43){return _0x427b95+_0x474a43;},'Bvvkc':function(_0x5f4cfc,_0x6671ff){return _0x5f4cfc+_0x6671ff;},'bfUnc':function(_0x3b658d,_0x279dc4){return _0x3b658d+_0x279dc4;},'SmJDQ':function(_0x5dcca4,_0x5e9158){return _0x5dcca4+_0x5e9158;}},_0x41094a=Buffer[_0xec1ae6(0x1f9)](_0x42d1bb);let _0x488d2b=0x0;const [,_0x12f604]=readId(_0x41094a,_0x488d2b),[_0x45fc8c,_0x39035f]=readVint(_0x41094a,_0x488d2b+_0x12f604),_0x276b9c=_0x406d64[_0xec1ae6(0x1c9)](_0x406d64['eyzrN'](_0x488d2b,_0x12f604),_0x39035f)+_0x45fc8c,[,_0x370d22]=_0x406d64[_0xec1ae6(0x1b6)](readId,_0x41094a,_0x276b9c),[,_0xe93469]=_0x406d64['Haxhq'](readVint,_0x41094a,_0x276b9c+_0x370d22),_0x308f25=_0x406d64[_0xec1ae6(0x1b2)](_0x276b9c+_0x370d22,_0xe93469),_0x4c2376=writeUnknownSizeVint(_0xe93469);_0x4c2376[_0xec1ae6(0x1da)](_0x41094a,_0x406d64['xKRdD'](_0x276b9c,_0x370d22));let _0x401c06=_0x308f25;const _0x4eff4a=Math[_0xec1ae6(0x1ae)](_0x41094a['length'],_0x406d64['ghERA'](_0x308f25,0x2710));while(_0x406d64['QEKkx'](_0x401c06,_0x4eff4a)){const [_0x36ad24,_0xbdd1fb]=readId(_0x41094a,_0x401c06),[_0x528823,_0x40c737]=readVint(_0x41094a,_0x406d64['NAGvu'](_0x401c06,_0xbdd1fb));if(_0x406d64[_0xec1ae6(0x1c2)](_0x36ad24,ID_CLUSTER))break;if(isUnknownSize(_0x528823,_0x40c737))break;if(_0x406d64['ZVOYJ'](_0x36ad24,ID_INFO)){const _0x470a61=_0x406d64['xKRdD'](_0x406d64[_0xec1ae6(0x1af)](_0x401c06,_0xbdd1fb),_0x40c737),_0x517306=_0x406d64[_0xec1ae6(0x1f8)](_0x470a61,_0x528823),_0x321bf8=[];let _0x352582=_0x470a61;while(_0x352582<_0x517306){const [_0x41bf75,_0x102d8b]=readId(_0x41094a,_0x352582),[_0x548c28,_0x2b31c4]=readVint(_0x41094a,_0x406d64['eyzrN'](_0x352582,_0x102d8b)),_0x32f7cb=_0x406d64['Bvvkc'](_0x102d8b,_0x2b31c4)+_0x548c28;_0x41bf75!==ID_DURATION&&_0x321bf8[_0xec1ae6(0x1d4)](_0x41094a['slice'](_0x352582,_0x352582+_0x32f7cb)),_0x352582+=_0x32f7cb;}const _0x4f9ad2=Buffer[_0xec1ae6(0x1b9)](_0x321bf8),_0x4e22b4=Buffer['concat']([_0x41094a[_0xec1ae6(0x1ee)](_0x401c06,_0x401c06+_0xbdd1fb),writeVint(_0x4f9ad2['length'],_0x40c737)]);return Buffer[_0xec1ae6(0x1b9)]([_0x41094a[_0xec1ae6(0x1ee)](0x0,_0x401c06),_0x4e22b4,_0x4f9ad2,_0x41094a['slice'](_0x517306)]);}_0x401c06+=_0x406d64['bfUnc'](_0x406d64['SmJDQ'](_0xbdd1fb,_0x40c737),_0x528823);}return _0x41094a;}function _0x1381(){const _0x590c1=['copy','8PRAXxi','argv','KYDyY','maxTimestampTicks','yUbkK','has','XZBtr','indexOf','fIZGD','YMqOT','cCpxo','exit','header','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','DhsNK','floor','13415940XVvYWU','HCEVB','1586TalFae','slice','SjSnU','nmYKU','2453hOLxYq','OqCve','length','haQJL','OSlcY','endsWith','NNcts','inuQW','from','FdsZf','GeqiA','alloc','fsdkO','334986OcmcQK','HUHtr','min','NAGvu','WHsum','qUEQw','xKRdD','gGJsv','fAXer','bodyBeforeTimestamp','baMGu','nqMyv','ihhot','concat','MGWXi','2783331rQiiun','Stitched\x20','1264734qgsccn','oNGLt','EABaG','\x20files\x20->\x20','VjhgA','Hqboj','681ZYtEXT','5HCBIIt','timestamp','FYSfn','zrlVO','psfnN','eyzrN','ZrNCP','uEBpZ','LJdQl','7SipJgF','bodyAfterTimestamp','7190cchOHh','jveQC','oqEoY','vADcT','1603512gNbjNq','push','kGGgS','Uamof','log','trisJ','PTcuC'];_0x1381=function(){return _0x590c1;};return _0x1381();}export function stitchWebmFiles(_0x2ee1d0,_0x273f65){const _0x212183=_0x3ddf,_0x2eb5d5={'SVFTu':function(_0x1d2a7e,_0x4c5fa0){return _0x1d2a7e<=_0x4c5fa0;},'gGJsv':function(_0x191c2a,_0x40fd76){return _0x191c2a(_0x40fd76);},'rYpnj':function(_0x4a9010,_0x1ee952){return _0x4a9010<_0x1ee952;},'EABaG':function(_0x56383e,_0x37ed7d,_0x586c26,_0x57183f){return _0x56383e(_0x37ed7d,_0x586c26,_0x57183f);}};if(_0x2eb5d5['SVFTu'](_0x2ee1d0[_0x212183(0x1f3)],0x1))return![];const _0xffa71=[];for(const _0x23e7ad of _0x2ee1d0){const _0x4511ee=readFileSync(_0x23e7ad),_0x4989bd=_0x2eb5d5[_0x212183(0x1b3)](parseWebm,_0x4511ee);if(!_0x4989bd||_0x4989bd['clusters']['length']===0x0)return![];_0xffa71[_0x212183(0x1d4)](_0x4989bd);}const _0x2bb552=_0xffa71[0x0],_0x16a9f3=rebuildHeaderWithoutDuration(_0x2bb552[_0x212183(0x1e7)]),_0x3fefeb=[_0x16a9f3];let _0x31226d=0x0;for(let _0x11239b=0x0;_0x2eb5d5['rYpnj'](_0x11239b,_0xffa71['length']);_0x11239b++){const _0x40b0fc=_0xffa71[_0x11239b];for(const _0x39dabd of _0x40b0fc['clusters']){const _0x4cffaa=_0x39dabd[_0x212183(0x1c5)]+_0x31226d;_0x3fefeb[_0x212183(0x1d4)](_0x2eb5d5[_0x212183(0x1bf)](buildCluster,_0x4cffaa,_0x39dabd[_0x212183(0x1b5)],_0x39dabd[_0x212183(0x1ce)]));}const _0xeb1acc=0x1e;_0x31226d+=_0x40b0fc[_0x212183(0x1de)]+_0xeb1acc;}return writeFileSync(_0x273f65,Buffer['concat'](_0x3fefeb)),!![];}if(process[_0x66851e(0x1dc)][0x1]?.[_0x66851e(0x1f6)]('stitchWebmFiles.ts')||process[_0x66851e(0x1dc)][0x1]?.[_0x66851e(0x1f6)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x66851e(0x1f3)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x66851e(0x1e6)](0x1));const output=args[args[_0x66851e(0x1f3)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x66851e(0x1d7)](_0x66851e(0x1bc)+inputs[_0x66851e(0x1f3)]+_0x66851e(0x1c0)+output):console['log'](_0x66851e(0x1e8));}
|
|
1
|
+
const _0x533701=_0x3a8d;(function(_0x5cc4bb,_0x3db26f){const _0x3be8ac=_0x3a8d,_0x3e218d=_0x5cc4bb();while(!![]){try{const _0x57a5bd=-parseInt(_0x3be8ac(0x196))/0x1*(parseInt(_0x3be8ac(0x190))/0x2)+parseInt(_0x3be8ac(0x156))/0x3+parseInt(_0x3be8ac(0x184))/0x4*(parseInt(_0x3be8ac(0x17c))/0x5)+-parseInt(_0x3be8ac(0x17f))/0x6*(-parseInt(_0x3be8ac(0x15e))/0x7)+-parseInt(_0x3be8ac(0x183))/0x8*(-parseInt(_0x3be8ac(0x16a))/0x9)+parseInt(_0x3be8ac(0x181))/0xa*(-parseInt(_0x3be8ac(0x182))/0xb)+-parseInt(_0x3be8ac(0x16e))/0xc;if(_0x57a5bd===_0x3db26f)break;else _0x3e218d['push'](_0x3e218d['shift']());}catch(_0x5bf7f4){_0x3e218d['push'](_0x3e218d['shift']());}}}(_0x2b3d,0x31c6a));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function _0x3a8d(_0x4f34b3,_0x268616){_0x4f34b3=_0x4f34b3-0x14e;const _0x2b3dec=_0x2b3d();let _0x3a8dd2=_0x2b3dec[_0x4f34b3];return _0x3a8dd2;}function readVint(_0x4616da,_0x1799c5){const _0x3d4019=_0x3a8d,_0x446ee4={'ATfqA':function(_0x1017cf,_0x2db747){return _0x1017cf>=_0x2db747;},'RSELV':function(_0x5cbf67,_0x3a85f4){return _0x5cbf67&_0x3a85f4;},'PKEnZ':function(_0xa85807,_0x3791e1){return _0xa85807-_0x3791e1;},'FjVnk':function(_0x1f6923,_0x5867c6){return _0x1f6923<_0x5867c6;},'domOi':function(_0x43c543,_0x28bc18){return _0x43c543+_0x28bc18;},'SILxO':function(_0x475113,_0x137083){return _0x475113*_0x137083;},'lnOoF':function(_0x46665f,_0x4caba8){return _0x46665f+_0x4caba8;}};if(_0x446ee4[_0x3d4019(0x159)](_0x1799c5,_0x4616da['length']))return[0x0,0x0];const _0xc0e639=_0x4616da[_0x1799c5];let _0x175c45=0x1,_0x26ae7e=0x80;while(_0x175c45<=0x8&&!_0x446ee4[_0x3d4019(0x173)](_0xc0e639,_0x26ae7e)){_0x175c45++,_0x26ae7e>>=0x1;}if(_0x1799c5+_0x175c45>_0x4616da['length'])return[0x0,0x0];let _0x4299bc=_0xc0e639&_0x446ee4['PKEnZ'](_0x26ae7e,0x1);for(let _0x5d1cf1=0x1;_0x446ee4['FjVnk'](_0x5d1cf1,_0x175c45);_0x5d1cf1++){_0x4299bc=_0x446ee4[_0x3d4019(0x168)](_0x446ee4[_0x3d4019(0x18d)](_0x4299bc,0x100),_0x4616da[_0x446ee4['lnOoF'](_0x1799c5,_0x5d1cf1)]);}return[_0x4299bc,_0x175c45];}function readId(_0x462c18,_0x7a6f1e){const _0x35d1f7=_0x3a8d,_0x2fe670={'JEbBe':function(_0x4c1e52,_0x236d80){return _0x4c1e52>=_0x236d80;},'Pcdnt':function(_0x561d9f,_0x575984){return _0x561d9f>=_0x575984;},'mhVsQ':function(_0x1bd665,_0x2a251e){return _0x1bd665>_0x2a251e;},'WFmNu':function(_0x560edd,_0x5f23e2){return _0x560edd*_0x5f23e2;},'oFVoI':function(_0x23f8a9,_0x43c399){return _0x23f8a9+_0x43c399;}};if(_0x2fe670[_0x35d1f7(0x18a)](_0x7a6f1e,_0x462c18[_0x35d1f7(0x18b)]))return[0x0,0x0];const _0x49f2e6=_0x462c18[_0x7a6f1e];let _0x1e356e;if(_0x2fe670[_0x35d1f7(0x189)](_0x49f2e6,0x80))_0x1e356e=0x1;else{if(_0x49f2e6>=0x40)_0x1e356e=0x2;else{if(_0x49f2e6>=0x20)_0x1e356e=0x3;else{if(_0x49f2e6>=0x10)_0x1e356e=0x4;else return[_0x49f2e6,0x1];}}}if(_0x2fe670['mhVsQ'](_0x7a6f1e+_0x1e356e,_0x462c18['length']))return[0x0,0x0];let _0x15ac94=0x0;for(let _0x5a71c8=0x0;_0x5a71c8<_0x1e356e;_0x5a71c8++){_0x15ac94=_0x2fe670['WFmNu'](_0x15ac94,0x100)+_0x462c18[_0x2fe670[_0x35d1f7(0x176)](_0x7a6f1e,_0x5a71c8)];}return[_0x15ac94,_0x1e356e];}function readUint(_0x327497,_0x2caca5,_0x3483da){const _0x20a70a=_0x3a8d,_0x5844fd={'ATULE':function(_0x365cb6,_0x48b7b1){return _0x365cb6<_0x48b7b1;},'udXAU':function(_0x43d33a,_0x17b0c1){return _0x43d33a+_0x17b0c1;}};let _0x35ba30=0x0;for(let _0x32ecdf=0x0;_0x5844fd[_0x20a70a(0x18c)](_0x32ecdf,_0x3483da);_0x32ecdf++){_0x35ba30=_0x5844fd['udXAU'](_0x35ba30*0x100,_0x327497[_0x5844fd[_0x20a70a(0x166)](_0x2caca5,_0x32ecdf)]);}return _0x35ba30;}function isUnknownSize(_0x257e06,_0x339b7d){const _0x1ca303={'Luvaw':function(_0x537d2e,_0x54891b){return _0x537d2e-_0x54891b;},'YPIfM':function(_0x5620f7,_0x578c26){return _0x5620f7*_0x578c26;}};return _0x257e06===_0x1ca303['Luvaw'](Math['pow'](0x2,_0x1ca303['YPIfM'](0x7,_0x339b7d)),0x1);}function writeVint(_0x3320d3,_0x4bfc2b){const _0x553784=_0x3a8d,_0x463aa7={'bLhCB':function(_0x4470b5,_0x3e2ec9){return _0x4470b5-_0x3e2ec9;},'DkQBC':function(_0x27405e,_0x1c91ad){return _0x27405e*_0x1c91ad;},'RhwEg':function(_0x247ef9,_0x751d0c){return _0x247ef9-_0x751d0c;},'ZrmxZ':function(_0x5d1674,_0x18ff05){return _0x5d1674>=_0x18ff05;},'lPFRh':function(_0x33c6d0,_0x30fab2){return _0x33c6d0/_0x30fab2;}};let _0x366c62=_0x4bfc2b||0x1;while(_0x463aa7[_0x553784(0x161)](Math['pow'](0x2,_0x463aa7[_0x553784(0x175)](0x7,_0x366c62)),0x2)<_0x3320d3)_0x366c62++;const _0x17a19c=Buffer[_0x553784(0x186)](_0x366c62);for(let _0x3e332b=_0x463aa7['RhwEg'](_0x366c62,0x1);_0x463aa7['ZrmxZ'](_0x3e332b,0x0);_0x3e332b--){_0x17a19c[_0x3e332b]=_0x3320d3&0xff,_0x3320d3=Math['floor'](_0x463aa7[_0x553784(0x15f)](_0x3320d3,0x100));}return _0x17a19c[0x0]|=0x1<<0x8-_0x366c62,_0x17a19c;}function writeUint(_0x4a329e,_0x568ad9){const _0x2f381c=_0x3a8d,_0x31d088={'NBsnm':function(_0x4ec65d,_0x3ab036){return _0x4ec65d/_0x3ab036;}},_0x3da280=Buffer[_0x2f381c(0x186)](_0x568ad9);for(let _0x5235cc=_0x568ad9-0x1;_0x5235cc>=0x0;_0x5235cc--){_0x3da280[_0x5235cc]=_0x4a329e&0xff,_0x4a329e=Math[_0x2f381c(0x178)](_0x31d088[_0x2f381c(0x164)](_0x4a329e,0x100));}return _0x3da280;}function writeUnknownSizeVint(_0x209f22){const _0x5c6332=_0x3a8d,_0x393c61={'csQOs':function(_0x57f009,_0x18aace){return _0x57f009>>_0x18aace;},'dxOWO':function(_0x24136e,_0x26dbe6){return _0x24136e-_0x26dbe6;}},_0x173455=Buffer['alloc'](_0x209f22,0xff);return _0x173455[0x0]=_0x393c61['csQOs'](0xff,_0x393c61[_0x5c6332(0x193)](_0x209f22,0x1)),_0x173455;}function uintSize(_0x53d1f3){const _0x5de6a1=_0x3a8d,_0x54a343={'RPzTp':function(_0x24750b,_0x3da8c3){return _0x24750b>_0x3da8c3;},'BaZDX':function(_0x8e3830,_0xef6344){return _0x8e3830/_0xef6344;}};if(_0x53d1f3===0x0)return 0x1;let _0x309743=0x0,_0x3a8549=_0x53d1f3;while(_0x54a343[_0x5de6a1(0x157)](_0x3a8549,0x0)){_0x309743++,_0x3a8549=Math[_0x5de6a1(0x178)](_0x54a343['BaZDX'](_0x3a8549,0x100));}return _0x309743;}function findTimestampScale(_0x4bd526,_0xddb8e8){const _0x41587c=_0x3a8d,_0x1a9e43={'SMVRN':function(_0x58518b,_0x92315d){return _0x58518b+_0x92315d;},'vxWzd':function(_0x31b1e6,_0x211a3b,_0xa6f3ac){return _0x31b1e6(_0x211a3b,_0xa6f3ac);},'oUOzj':function(_0x5b6949,_0x2d1008){return _0x5b6949+_0x2d1008;},'iXdvu':function(_0x7fb85f,_0x575076){return _0x7fb85f===_0x575076;},'aIwih':function(_0x1fdd49,_0x29ec42,_0x5c6e36){return _0x1fdd49(_0x29ec42,_0x5c6e36);}};let _0x292f25=_0xddb8e8;const _0xe2dcd8=Math['min'](_0x4bd526['length'],_0x1a9e43[_0x41587c(0x180)](_0xddb8e8,0x2710));while(_0x292f25<_0xe2dcd8){const [_0x1dbaa8,_0x52ef9e]=readId(_0x4bd526,_0x292f25),[_0x56e9b1,_0x3625f3]=_0x1a9e43[_0x41587c(0x15c)](readVint,_0x4bd526,_0x1a9e43[_0x41587c(0x165)](_0x292f25,_0x52ef9e));if(_0x1dbaa8===ID_INFO){let _0x29fbfe=_0x292f25+_0x52ef9e+_0x3625f3;const _0x5f384e=_0x29fbfe+_0x56e9b1;while(_0x29fbfe<_0x5f384e){const [_0x56ab12,_0x363fe2]=readId(_0x4bd526,_0x29fbfe),[_0x325908,_0x1ead35]=readVint(_0x4bd526,_0x1a9e43[_0x41587c(0x165)](_0x29fbfe,_0x363fe2));if(_0x1a9e43['iXdvu'](_0x56ab12,ID_TIMESTAMP_SCALE))return readUint(_0x4bd526,_0x29fbfe+_0x363fe2+_0x1ead35,_0x325908);_0x29fbfe+=_0x363fe2+_0x1ead35+_0x325908;}break;}if(_0x1dbaa8===ID_CLUSTER)break;if(_0x1a9e43[_0x41587c(0x198)](isUnknownSize,_0x56e9b1,_0x3625f3))break;_0x292f25+=_0x1a9e43[_0x41587c(0x180)](_0x52ef9e+_0x3625f3,_0x56e9b1);}return 0xf4240;}function findFirstClusterOffset(_0x34c829,_0x11b627){const _0x4af54d=_0x3a8d,_0xf32542={'ABHFw':function(_0x1fcbe2,_0x4918ff){return _0x1fcbe2<_0x4918ff;},'HHqLr':function(_0x300343,_0x3bb1e2){return _0x300343+_0x3bb1e2;},'apyeB':function(_0x552d78,_0x39efa6,_0x38a63b){return _0x552d78(_0x39efa6,_0x38a63b);}};let _0x48623f=_0x11b627;while(_0xf32542[_0x4af54d(0x155)](_0x48623f,_0x34c829['length'])){const [_0x3b6bb1,_0x1c3744]=readId(_0x34c829,_0x48623f);if(_0x3b6bb1===ID_CLUSTER)return _0x48623f;const [_0x51a940,_0x2795e1]=readVint(_0x34c829,_0xf32542[_0x4af54d(0x162)](_0x48623f,_0x1c3744));if(_0xf32542[_0x4af54d(0x192)](isUnknownSize,_0x51a940,_0x2795e1))return _0x48623f;_0x48623f+=_0x1c3744+_0x2795e1+_0x51a940;}return _0x34c829[_0x4af54d(0x18b)];}function findClusterEnd(_0x4808ba,_0xc86f09,_0x404409,_0x1ec5db){const _0x2fe135=_0x3a8d,_0x4cbcc1={'qhsQu':function(_0x537f41,_0xad57f9){return _0x537f41+_0xad57f9;},'wfwzs':function(_0x2f746c,_0x47d401){return _0x2f746c<_0x47d401;},'hscNu':function(_0x40a27a,_0x44ca0c,_0x28d42c){return _0x40a27a(_0x44ca0c,_0x28d42c);},'EfgBF':function(_0x4fd429,_0x50f7ae){return _0x4fd429+_0x50f7ae;}};if(!isUnknownSize(_0x404409,_0x1ec5db))return _0x4cbcc1[_0x2fe135(0x174)](_0xc86f09,_0x404409);const _0x554332=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x21bb65=_0xc86f09;while(_0x4cbcc1['wfwzs'](_0x21bb65,_0x4808ba['length']-0x4)){const [_0x35d1d3,_0x227ebf]=readId(_0x4808ba,_0x21bb65);if(_0x554332['has'](_0x35d1d3))return _0x21bb65;const [_0x1795cf,_0x43dea3]=_0x4cbcc1['hscNu'](readVint,_0x4808ba,_0x21bb65+_0x227ebf);if(isUnknownSize(_0x1795cf,_0x43dea3))return _0x4808ba[_0x2fe135(0x18b)];_0x21bb65+=_0x4cbcc1[_0x2fe135(0x17b)](_0x227ebf+_0x43dea3,_0x1795cf);}return _0x4808ba['length'];}function extractClusters(_0x49b74b,_0x1ae2ab){const _0x17e1e8=_0x3a8d,_0x25de03={'kIEQR':function(_0x896440,_0x431419){return _0x896440<_0x431419;},'SmfzH':function(_0x51f71f,_0x2eff7c,_0x42eb4f){return _0x51f71f(_0x2eff7c,_0x42eb4f);},'EgGej':function(_0x34b28f,_0x2695d3){return _0x34b28f!==_0x2695d3;},'FKQAu':function(_0x3e687b,_0x2ab93e){return _0x3e687b+_0x2ab93e;},'SKnaV':function(_0x46a344,_0x5e12b5){return _0x46a344+_0x5e12b5;},'JoWeZ':function(_0x1c41a5,_0xf62750){return _0x1c41a5<_0xf62750;},'qCpTX':function(_0x17c674,_0x104251,_0x10e694){return _0x17c674(_0x104251,_0x10e694);},'gBzUo':function(_0x34aa3b,_0x1b1166){return _0x34aa3b===_0x1b1166;},'KyydY':function(_0x5bd21a,_0x4f1ba9,_0x11c93f,_0x5bfc0d){return _0x5bd21a(_0x4f1ba9,_0x11c93f,_0x5bfc0d);},'GXxQa':function(_0x235682,_0x2a7b16){return _0x235682<_0x2a7b16;},'AkLmt':function(_0x41f686,_0x36f0ba){return _0x41f686+_0x36f0ba;},'dfhYG':function(_0x19399c,_0x3f8274){return _0x19399c+_0x3f8274;},'kuoXd':function(_0x1f93aa,_0x55175c,_0x16d96e){return _0x1f93aa(_0x55175c,_0x16d96e);},'VnrnX':function(_0x2b1da1,_0x2f0d4f){return _0x2b1da1>_0x2f0d4f;},'mVqxg':function(_0xbab831,_0x42ed37,_0xdeb21f){return _0xbab831(_0x42ed37,_0xdeb21f);}},_0x233a8f=[],_0x382b0f=Buffer[_0x17e1e8(0x18e)]([0x1f,0x43,0xb6,0x75]);let _0x563082=0x0;while(_0x25de03[_0x17e1e8(0x16c)](_0x563082,_0x49b74b[_0x17e1e8(0x18b)])){const _0x1a3bd0=_0x49b74b[_0x17e1e8(0x18f)](_0x382b0f,_0x563082);if(_0x1a3bd0===-0x1)break;const [_0x817b3,_0x38c401]=_0x25de03[_0x17e1e8(0x154)](readId,_0x49b74b,_0x1a3bd0);if(_0x25de03[_0x17e1e8(0x169)](_0x817b3,ID_CLUSTER)){_0x563082=_0x25de03['FKQAu'](_0x1a3bd0,0x1);continue;}const [_0x79b515,_0x575608]=_0x25de03[_0x17e1e8(0x154)](readVint,_0x49b74b,_0x25de03['SKnaV'](_0x1a3bd0,_0x38c401)),_0x4089b6=_0x25de03[_0x17e1e8(0x15a)](_0x1a3bd0+_0x38c401,_0x575608),_0x25bf89=findClusterEnd(_0x49b74b,_0x4089b6,_0x79b515,_0x575608);let _0xc5a5a2=_0x4089b6,_0x20cc30=0x0,_0x1a0278=0x2,_0x2f45ad=![],_0x254bf2=Buffer['alloc'](0x0),_0x595172=Buffer['alloc'](0x0);while(_0x25de03['JoWeZ'](_0xc5a5a2,_0x25bf89)){const [_0x360c1b,_0x468c59]=readId(_0x49b74b,_0xc5a5a2),[_0x3e5c72,_0x159346]=_0x25de03[_0x17e1e8(0x14e)](readVint,_0x49b74b,_0xc5a5a2+_0x468c59);if(_0x25de03['gBzUo'](_0x360c1b,ID_TIMESTAMP)){_0x20cc30=_0x25de03[_0x17e1e8(0x14f)](readUint,_0x49b74b,_0x25de03['SKnaV'](_0xc5a5a2,_0x468c59)+_0x159346,_0x3e5c72),_0x1a0278=_0x3e5c72,_0x2f45ad=!![],_0x254bf2=_0x49b74b['slice'](_0x4089b6,_0xc5a5a2);const _0x276d9e=_0x25de03[_0x17e1e8(0x152)](_0xc5a5a2,_0x468c59)+_0x159346+_0x3e5c72;_0x595172=_0x49b74b[_0x17e1e8(0x16f)](_0x276d9e,_0x25bf89);break;}if(_0x360c1b===ID_CLUSTER)break;if(isUnknownSize(_0x3e5c72,_0x159346))break;_0xc5a5a2+=_0x25de03[_0x17e1e8(0x15a)](_0x468c59+_0x159346,_0x3e5c72);}!_0x2f45ad&&(_0x595172=_0x49b74b[_0x17e1e8(0x16f)](_0x4089b6,_0x25bf89));let _0x2a7813=_0x20cc30;_0xc5a5a2=_0x4089b6;while(_0x25de03[_0x17e1e8(0x185)](_0xc5a5a2,_0x25bf89)){const [_0x7ee0e5,_0xa117d1]=readId(_0x49b74b,_0xc5a5a2),[_0x5acd6c,_0x1c6314]=_0x25de03['SmfzH'](readVint,_0x49b74b,_0x25de03[_0x17e1e8(0x15a)](_0xc5a5a2,_0xa117d1));if(_0x7ee0e5===ID_SIMPLE_BLOCK&&_0x5acd6c>=0x4){const _0x1d6531=_0x25de03['AkLmt'](_0x25de03[_0x17e1e8(0x150)](_0xc5a5a2,_0xa117d1),_0x1c6314),[,_0xdef206]=_0x25de03[_0x17e1e8(0x15d)](readVint,_0x49b74b,_0x1d6531),_0xb8c2f5=_0x49b74b[_0x17e1e8(0x16d)](_0x1d6531+_0xdef206),_0x527796=_0x20cc30+_0xb8c2f5;if(_0x25de03[_0x17e1e8(0x197)](_0x527796,_0x2a7813))_0x2a7813=_0x527796;}if(_0x7ee0e5===ID_CLUSTER)break;if(_0x25de03['mVqxg'](isUnknownSize,_0x5acd6c,_0x1c6314))break;_0xc5a5a2+=_0xa117d1+_0x1c6314+_0x5acd6c;}_0x233a8f[_0x17e1e8(0x172)]({'timestamp':_0x20cc30,'maxTicks':_0x2a7813,'bodyBeforeTimestamp':_0x254bf2,'bodyAfterTimestamp':_0x595172,'timestampElementSize':_0x1a0278}),_0x563082=_0x25bf89;}return _0x233a8f;}function parseWebm(_0x574a8a){const _0x12e044=_0x3a8d,_0x46d788={'LNpbB':function(_0x1376e1,_0x5abb40,_0x51d588){return _0x1376e1(_0x5abb40,_0x51d588);},'jLxZc':function(_0x55b495,_0x45181d){return _0x55b495+_0x45181d;},'cAKSk':function(_0x11f1df,_0x11be50){return _0x11f1df+_0x11be50;},'WKJIt':function(_0x163549,_0xf0c247,_0x335a17){return _0x163549(_0xf0c247,_0x335a17);},'prVSf':function(_0x50e745,_0x1dacb6){return _0x50e745+_0x1dacb6;},'bwmDf':function(_0x3dd7f1,_0x54f8be){return _0x3dd7f1+_0x54f8be;},'DmCNg':function(_0x543890,_0x3fa627){return _0x543890>_0x3fa627;}};let _0x5a40bd=0x0;const [,_0x13bdc7]=_0x46d788['LNpbB'](readId,_0x574a8a,_0x5a40bd),[_0x576c89,_0x3ae113]=readVint(_0x574a8a,_0x46d788['jLxZc'](_0x5a40bd,_0x13bdc7));_0x5a40bd+=_0x46d788['cAKSk'](_0x46d788['jLxZc'](_0x13bdc7,_0x3ae113),_0x576c89);const [_0x3744cc,_0x31b83d]=_0x46d788[_0x12e044(0x167)](readId,_0x574a8a,_0x5a40bd);if(_0x3744cc!==ID_SEGMENT)return null;const [,_0x5c5182]=readVint(_0x574a8a,_0x46d788[_0x12e044(0x153)](_0x5a40bd,_0x31b83d)),_0x18a4a2=_0x46d788[_0x12e044(0x163)](_0x5a40bd+_0x31b83d,_0x5c5182),_0x534417=_0x46d788['LNpbB'](findTimestampScale,_0x574a8a,_0x18a4a2),_0x3a9b79=findFirstClusterOffset(_0x574a8a,_0x18a4a2),_0x3d4d40=_0x574a8a['slice'](0x0,_0x3a9b79),_0x3bfc4d=extractClusters(_0x574a8a,_0x534417);let _0x289728=0x0;for(const _0xf81283 of _0x3bfc4d){if(_0x46d788['DmCNg'](_0xf81283[_0x12e044(0x194)],_0x289728))_0x289728=_0xf81283[_0x12e044(0x194)];}return{'header':_0x3d4d40,'clusters':_0x3bfc4d,'timestampScale':_0x534417,'maxTimestampTicks':_0x289728};}function buildCluster(_0x4cb3ad,_0x268916,_0x4dceba){const _0x50efed=_0x3a8d,_0x2935af={'HQded':function(_0x330085,_0x10e5d0){return _0x330085(_0x10e5d0);}},_0x1254e3=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x56aeb4=Math['max'](0x4,_0x2935af['HQded'](uintSize,_0x4cb3ad)),_0x4f1427=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x56aeb4),writeUint(_0x4cb3ad,_0x56aeb4)]),_0x5bc5e3=Buffer[_0x50efed(0x15b)]([_0x268916,_0x4f1427,_0x4dceba]),_0x247eff=writeVint(_0x5bc5e3['length']);return Buffer['concat']([_0x1254e3,_0x247eff,_0x5bc5e3]);}const ID_DURATION=0x4489;function _0x2b3d(){const _0x1be5e1=['length','ATULE','SILxO','from','indexOf','1268fIMVZM','bodyAfterTimestamp','apyeB','dxOWO','maxTicks','timestamp','183hANxsO','VnrnX','aIwih','qCpTX','KyydY','dfhYG','endsWith','SKnaV','prVSf','SmfzH','ABHFw','617658VDHNqp','RPzTp','ApOPa','ATfqA','FKQAu','concat','vxWzd','kuoXd','1204252Kcxyzc','lPFRh','eBzWB','bLhCB','HHqLr','bwmDf','NBsnm','oUOzj','udXAU','WKJIt','domOi','EgGej','117YEAdLA','jpcLe','kIEQR','readInt16BE','5827260EklaQI','slice','stitchWebmFiles.ts','copy','push','RSELV','qhsQu','DkQBC','oFVoI','log','floor','\x20files\x20->\x20','IdyYt','EfgBF','65BrLCWM','clusters','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','12ErdeGK','SMVRN','182570JXocxH','121FfOZIL','149384MgcqHo','65732eGuAKS','GXxQa','alloc','header','bodyBeforeTimestamp','Pcdnt','JEbBe'];_0x2b3d=function(){return _0x1be5e1;};return _0x2b3d();}function rebuildHeaderWithoutDuration(_0x1e7c1e){const _0x434cf7=_0x3a8d,_0xe31cce={'OTKNg':function(_0x149919,_0x1455df,_0x57bb31){return _0x149919(_0x1455df,_0x57bb31);},'ApOPa':function(_0x3e8dff,_0x360b9a){return _0x3e8dff+_0x360b9a;},'jpcLe':function(_0x99d97,_0x34fccd){return _0x99d97+_0x34fccd;},'ZOHYx':function(_0x431205,_0x64884a){return _0x431205<_0x64884a;},'XwxbQ':function(_0x1f5733,_0xcef90b){return _0x1f5733===_0xcef90b;},'xPaUK':function(_0x576f3d,_0x4482f5,_0x576062){return _0x576f3d(_0x4482f5,_0x576062);},'IdyYt':function(_0x3be6d3,_0x3d3271){return _0x3be6d3===_0x3d3271;},'WylDX':function(_0x5a8002,_0x1d8132){return _0x5a8002+_0x1d8132;},'eNvUS':function(_0x4d23f4,_0xdb161e){return _0x4d23f4!==_0xdb161e;}},_0xe267f=Buffer['from'](_0x1e7c1e);let _0x20357d=0x0;const [,_0x55648f]=_0xe31cce['OTKNg'](readId,_0xe267f,_0x20357d),[_0x4f33b2,_0x3b1126]=readVint(_0xe267f,_0xe31cce['ApOPa'](_0x20357d,_0x55648f)),_0x379932=_0x20357d+_0x55648f+_0x3b1126+_0x4f33b2,[,_0x57393c]=_0xe31cce['OTKNg'](readId,_0xe267f,_0x379932),[,_0x112bd8]=readVint(_0xe267f,_0xe31cce[_0x434cf7(0x158)](_0x379932,_0x57393c)),_0x3f11f3=_0xe31cce['jpcLe'](_0x379932+_0x57393c,_0x112bd8),_0x42b9eb=writeUnknownSizeVint(_0x112bd8);_0x42b9eb[_0x434cf7(0x171)](_0xe267f,_0x379932+_0x57393c);let _0xdb7cba=_0x3f11f3;const _0x3b52ef=Math['min'](_0xe267f[_0x434cf7(0x18b)],_0x3f11f3+0x2710);while(_0xe31cce['ZOHYx'](_0xdb7cba,_0x3b52ef)){const [_0x334195,_0x473734]=readId(_0xe267f,_0xdb7cba),[_0x58db1b,_0x1a4830]=readVint(_0xe267f,_0xe31cce['ApOPa'](_0xdb7cba,_0x473734));if(_0xe31cce['XwxbQ'](_0x334195,ID_CLUSTER))break;if(_0xe31cce['xPaUK'](isUnknownSize,_0x58db1b,_0x1a4830))break;if(_0xe31cce[_0x434cf7(0x17a)](_0x334195,ID_INFO)){const _0x113bf0=_0xe31cce[_0x434cf7(0x16b)](_0xdb7cba+_0x473734,_0x1a4830),_0x424302=_0xe31cce[_0x434cf7(0x158)](_0x113bf0,_0x58db1b),_0x39420b=[];let _0x51b8b2=_0x113bf0;while(_0x51b8b2<_0x424302){const [_0x238fcb,_0x284a8d]=readId(_0xe267f,_0x51b8b2),[_0x6de4b,_0x87ce54]=readVint(_0xe267f,_0x51b8b2+_0x284a8d),_0x39d426=_0xe31cce['jpcLe'](_0xe31cce['WylDX'](_0x284a8d,_0x87ce54),_0x6de4b);_0xe31cce['eNvUS'](_0x238fcb,ID_DURATION)&&_0x39420b['push'](_0xe267f['slice'](_0x51b8b2,_0xe31cce['WylDX'](_0x51b8b2,_0x39d426))),_0x51b8b2+=_0x39d426;}const _0x889833=Buffer['concat'](_0x39420b),_0x2f384d=Buffer[_0x434cf7(0x15b)]([_0xe267f[_0x434cf7(0x16f)](_0xdb7cba,_0xdb7cba+_0x473734),_0xe31cce['OTKNg'](writeVint,_0x889833['length'],_0x1a4830)]);return Buffer['concat']([_0xe267f[_0x434cf7(0x16f)](0x0,_0xdb7cba),_0x2f384d,_0x889833,_0xe267f['slice'](_0x424302)]);}_0xdb7cba+=_0xe31cce[_0x434cf7(0x158)](_0x473734,_0x1a4830)+_0x58db1b;}return _0xe267f;}export function stitchWebmFiles(_0x11bd14,_0x12da6b){const _0x4def5f=_0x3a8d,_0x515f7c={'KcXer':function(_0x2e4add,_0x284cf0){return _0x2e4add<=_0x284cf0;},'Czlsp':function(_0x52be38,_0x2b6f39){return _0x52be38(_0x2b6f39);},'eBzWB':function(_0x3031d7,_0x179b1b){return _0x3031d7+_0x179b1b;}};if(_0x515f7c['KcXer'](_0x11bd14['length'],0x1))return![];const _0x286872=[];for(const _0x1487d9 of _0x11bd14){const _0x1dd76d=readFileSync(_0x1487d9),_0x2f3c48=parseWebm(_0x1dd76d);if(!_0x2f3c48||_0x2f3c48[_0x4def5f(0x17d)]['length']===0x0)return![];_0x286872['push'](_0x2f3c48);}const _0xa2f2d9=_0x286872[0x0],_0x1cf89f=_0x515f7c['Czlsp'](rebuildHeaderWithoutDuration,_0xa2f2d9[_0x4def5f(0x187)]),_0x367c8c=[_0x1cf89f];let _0x3e8a53=0x0;for(let _0xc0f6e8=0x0;_0xc0f6e8<_0x286872['length'];_0xc0f6e8++){const _0x24c875=_0x286872[_0xc0f6e8];for(const _0x20d069 of _0x24c875[_0x4def5f(0x17d)]){const _0x57cba7=_0x20d069[_0x4def5f(0x195)]+_0x3e8a53;_0x367c8c[_0x4def5f(0x172)](buildCluster(_0x57cba7,_0x20d069[_0x4def5f(0x188)],_0x20d069[_0x4def5f(0x191)]));}const _0x164f4d=0x1e;_0x3e8a53+=_0x515f7c[_0x4def5f(0x160)](_0x24c875['maxTimestampTicks'],_0x164f4d);}return writeFileSync(_0x12da6b,Buffer['concat'](_0x367c8c)),!![];}if(process['argv'][0x1]?.[_0x533701(0x151)](_0x533701(0x170))||process['argv'][0x1]?.[_0x533701(0x151)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console['error'](_0x533701(0x17e)),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs['length']+_0x533701(0x179)+output):console[_0x533701(0x177)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x36d573=_0x15fb;(function(_0x42cdb6,_0x225dbb){const _0x9e2598=_0x15fb,_0x21baed=_0x42cdb6();while(!![]){try{const _0x3663f0=parseInt(_0x9e2598(0x141))/0x1*(parseInt(_0x9e2598(0x16e))/0x2)+parseInt(_0x9e2598(0x144))/0x3+-parseInt(_0x9e2598(0x138))/0x4*(parseInt(_0x9e2598(0x12d))/0x5)+parseInt(_0x9e2598(0x177))/0x6*(parseInt(_0x9e2598(0x137))/0x7)+-parseInt(_0x9e2598(0x161))/0x8*(-parseInt(_0x9e2598(0x168))/0x9)+-parseInt(_0x9e2598(0x150))/0xa+-parseInt(_0x9e2598(0x134))/0xb;if(_0x3663f0===_0x225dbb)break;else _0x21baed['push'](_0x21baed['shift']());}catch(_0x3ecad4){_0x21baed['push'](_0x21baed['shift']());}}}(_0x2942,0x3d07b));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x1806ff=_0x15fb,_0x3236cf={'DhNVj':function(_0x19d231,_0x490af8,_0x5edad4){return _0x19d231(_0x490af8,_0x5edad4);},'tKGDp':'.session','KMIFD':function(_0x47943b,_0x57fc3e){return _0x47943b(_0x57fc3e);},'LpIuR':_0x1806ff(0x170),'JcYUv':function(_0x3144c9,_0x2159b9,_0x545a16){return _0x3144c9(_0x2159b9,_0x545a16);},'kImwV':function(_0x38ce95){return _0x38ce95();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x1b42a3=_0x3236cf['DhNVj'](join,homedir(),'.ranger'),_0x12a992=join(_0x1b42a3,_0x3236cf[_0x1806ff(0x16f)]);if(_0x3236cf['KMIFD'](existsSync,_0x12a992)){cachedDeviceId=_0x3236cf['DhNVj'](readFileSync,_0x12a992,_0x3236cf[_0x1806ff(0x13e)])['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),mkdirSync(_0x1b42a3,{'recursive':!![]}),_0x3236cf['JcYUv'](writeFileSync,_0x12a992,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x3236cf['kImwV'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x36d573(0x16a)]=[];[_0x36d573(0x155)];['command'];[_0x36d573(0x14f)];[_0x36d573(0x133)]=0x0;[_0x36d573(0x147)]=new Map();[_0x36d573(0x135)]=null;[_0x36d573(0x151)];[_0x36d573(0x172)];['nodeVersion'];['platform'];['isTty'];[_0x36d573(0x15a)];['featureId'];['checklistItemId'];[_0x36d573(0x169)];[_0x36d573(0x16d)];constructor(_0x475888){const _0x39c900=_0x36d573,_0x2db1bd={'djYbO':'1|4|8|3|5|2|7|0|6','VEtxE':function(_0x4ee268){return _0x4ee268();}},_0x399da4=_0x2db1bd['djYbO']['split']('|');let _0x47a5b1=0x0;while(!![]){switch(_0x399da4[_0x47a5b1++]){case'0':this[_0x39c900(0x15b)]=process['stdout'][_0x39c900(0x12b)]??![];continue;case'1':this['commandId']=_0x2db1bd['VEtxE'](randomUUID);continue;case'2':this['nodeVersion']=process[_0x39c900(0x149)];continue;case'3':this[_0x39c900(0x151)]=getDeviceId();continue;case'4':this['command']=_0x475888;continue;case'5':this['cliVersion']=getCurrentVersion();continue;case'6':this['isCI']=!!(process['env']['CI']||process['env']['GITHUB_ACTIONS']);continue;case'7':this['platform']=process[_0x39c900(0x142)];continue;case'8':this[_0x39c900(0x14f)]=Date['now']();continue;}break;}}['setContext'](_0xd7849e){const _0x394cc8=_0x36d573;if(_0xd7849e['featureId'])this[_0x394cc8(0x145)]=_0xd7849e[_0x394cc8(0x145)];if(_0xd7849e[_0x394cc8(0x154)])this[_0x394cc8(0x154)]=_0xd7849e['checklistItemId'];if(_0xd7849e['browserSessionId'])this['browserSessionId']=_0xd7849e['browserSessionId'];if(_0xd7849e[_0x394cc8(0x16d)])this[_0x394cc8(0x16d)]=_0xd7849e[_0x394cc8(0x16d)];}async['trackCommandStart'](_0x5e62f1){const _0x10f4a6=_0x36d573,_0x35debb={'WXwEq':'command_start'},_0x119869=this[_0x10f4a6(0x12e)]({'eventType':_0x35debb['WXwEq'],'metadata':_0x5e62f1});await this[_0x10f4a6(0x139)](_0x119869);}async['trackCommandEnd'](_0x145762,_0x5bd260){const _0x235ba0=_0x36d573,_0x50004b={'NNONK':'command_end'},_0x4fe64d=this[_0x235ba0(0x12e)]({'eventType':_0x50004b[_0x235ba0(0x176)],'outcome':_0x145762,'durationMs':Date['now']()-this[_0x235ba0(0x14f)],'metadata':_0x5bd260});await this['sendImmediate'](_0x4fe64d),await this[_0x235ba0(0x167)]();}async['trackCommandError'](_0x9b6338,_0x4e50a2){const _0x3c52ec=_0x36d573,_0x4990ff={'ahONc':function(_0x123f4b,_0x522703,_0xae4b23){return _0x123f4b(_0x522703,_0xae4b23);},'CMOqi':function(_0x452a83,_0x245a5c){return _0x452a83 instanceof _0x245a5c;},'YRsgI':function(_0x30a29e,_0x420172){return _0x30a29e(_0x420172);}},_0x3b7112=this['buildEvent']({'eventType':_0x3c52ec(0x16c),'errorMessage':_0x4990ff[_0x3c52ec(0x156)](truncate,_0x4990ff['CMOqi'](_0x9b6338,Error)?_0x9b6338[_0x3c52ec(0x178)]:_0x4990ff[_0x3c52ec(0x15e)](String,_0x9b6338),0x1f4),'errorType':_0x4990ff['CMOqi'](_0x9b6338,Error)?_0x9b6338[_0x3c52ec(0x163)][_0x3c52ec(0x12f)]:_0x3c52ec(0x153),'durationMs':Date['now']()-this[_0x3c52ec(0x14f)],'metadata':_0x4e50a2});await this[_0x3c52ec(0x139)](_0x3b7112),await this['flush']();}[_0x36d573(0x12a)](_0x16fdb0,_0x3497fe){const _0x39957a=_0x36d573,_0x415831={'yKvOm':_0x39957a(0x14e)};this['phaseCounter']++,this['phaseStartTimes'][_0x39957a(0x16b)](_0x16fdb0,Date[_0x39957a(0x162)]());const _0x4a000c=this['buildEvent']({'eventType':_0x415831[_0x39957a(0x159)],'phase':_0x16fdb0,'phaseIndex':this['phaseCounter'],'metadata':_0x3497fe});this[_0x39957a(0x16a)][_0x39957a(0x174)](_0x4a000c);}[_0x36d573(0x158)](_0x5437ad,_0x3118e7){const _0x5a4581=_0x36d573,_0x310431={'UnPNN':function(_0x1ddc2e,_0x29bbc0){return _0x1ddc2e-_0x29bbc0;},'WHinZ':function(_0xd7537b,_0x134af7){return _0xd7537b>=_0x134af7;}},_0x398a86=this[_0x5a4581(0x147)]['get'](_0x5437ad),_0x4ee2ba=_0x398a86?_0x310431['UnPNN'](Date[_0x5a4581(0x162)](),_0x398a86):undefined;this['phaseStartTimes']['delete'](_0x5437ad);const _0x4d15e0=this[_0x5a4581(0x12e)]({'eventType':'phase_end','phase':_0x5437ad,'durationMs':_0x4ee2ba,'metadata':_0x3118e7});this['buffer']['push'](_0x4d15e0),_0x310431[_0x5a4581(0x13f)](this[_0x5a4581(0x16a)][_0x5a4581(0x157)],0xa)&&this[_0x5a4581(0x173)]();}async['trackPhaseError'](_0x5abf0c,_0xe12e05,_0x47d610){const _0x5b3f29=_0x36d573,_0x4417dd={'yFrtY':function(_0x2c3779,_0x2fbcb9){return _0x2c3779-_0x2fbcb9;},'sNtDT':_0x5b3f29(0x152),'KvCrt':function(_0x5f4d93,_0x282f3f,_0x3fec4a){return _0x5f4d93(_0x282f3f,_0x3fec4a);},'tqSPS':function(_0x314b6f,_0x55a80a){return _0x314b6f(_0x55a80a);},'zjoKV':function(_0xb34e10,_0x17fa2e){return _0xb34e10 instanceof _0x17fa2e;}},_0x533ed4=this['phaseStartTimes']['get'](_0x5abf0c),_0x5459a0=_0x533ed4?_0x4417dd['yFrtY'](Date['now'](),_0x533ed4):undefined;this['phaseStartTimes']['delete'](_0x5abf0c);const _0x1a87c0=this['buildEvent']({'eventType':_0x4417dd[_0x5b3f29(0x14c)],'phase':_0x5abf0c,'durationMs':_0x5459a0,'errorMessage':_0x4417dd[_0x5b3f29(0x14d)](truncate,_0xe12e05 instanceof Error?_0xe12e05['message']:_0x4417dd['tqSPS'](String,_0xe12e05),0x1f4),'errorType':_0x4417dd[_0x5b3f29(0x15d)](_0xe12e05,Error)?_0xe12e05['constructor'][_0x5b3f29(0x12f)]:_0x5b3f29(0x153),'metadata':_0x47d610});await this['sendImmediate'](_0x1a87c0);}async['flush'](){const _0x7756e3=_0x36d573,_0x5d12f5={'DXgwG':function(_0x25e416,_0x4c3270){return _0x25e416===_0x4c3270;}};if(_0x5d12f5['DXgwG'](this['buffer']['length'],0x0))return;const _0x394e5c=this[_0x7756e3(0x16a)]['splice'](0x0);try{await this[_0x7756e3(0x146)](_0x394e5c);}catch{}}[_0x36d573(0x12e)](_0x369be6){const _0x4fbf6b=_0x36d573;return{'eventType':_0x369be6[_0x4fbf6b(0x175)],'command':this[_0x4fbf6b(0x13b)],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x369be6['durationMs'],'phase':_0x369be6[_0x4fbf6b(0x14b)],'phaseIndex':_0x369be6[_0x4fbf6b(0x130)],'outcome':_0x369be6[_0x4fbf6b(0x132)],'errorMessage':_0x369be6[_0x4fbf6b(0x166)],'errorType':_0x369be6[_0x4fbf6b(0x148)],'featureId':this[_0x4fbf6b(0x145)],'checklistItemId':this['checklistItemId'],'browserSessionId':this[_0x4fbf6b(0x169)],'transport':this['transport'],'evaluation':_0x369be6[_0x4fbf6b(0x143)],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x4fbf6b(0x131)],'platform':this[_0x4fbf6b(0x142)],'cwd':process[_0x4fbf6b(0x160)](),'isTty':this[_0x4fbf6b(0x15b)],'isCI':this['isCI'],'metadata':_0x369be6[_0x4fbf6b(0x15f)]};}async[_0x36d573(0x139)](_0x42ef27){const _0x1eca14=_0x36d573;try{await this[_0x1eca14(0x146)]([_0x42ef27]);}catch{}}[_0x36d573(0x173)](){const _0x511a02=_0x36d573;if(this['flushing'])return;this['flushing']=this['flush']()[_0x511a02(0x13a)](()=>{this['flushing']=null;});}async[_0x36d573(0x146)](_0x4718bd){const _0x4db221=_0x36d573,_0x287e40={'fkLHw':function(_0x3ed413){return _0x3ed413();},'ipOxx':_0x4db221(0x136),'HYJKe':'POST'},_0x54f132=await getToken()['catch'](()=>null),_0x3f046f=_0x287e40[_0x4db221(0x164)](getApiBaseUrl),_0x232cd6={'Content-Type':_0x287e40['ipOxx']};_0x54f132&&(_0x232cd6['Authorization']='Bearer\x20'+_0x54f132);const _0x569698={'events':_0x4718bd};process['env']['DEBUG']&&console[_0x4db221(0x15c)]('[telemetry]\x20Sending\x20'+_0x4718bd['length']+_0x4db221(0x13c)+_0x3f046f+'/api/v1/mcp/cli-telemetry');const _0x31c629=new AbortController(),_0x45a2c7=setTimeout(()=>_0x31c629['abort'](),0x1388);try{await fetch(_0x3f046f+_0x4db221(0x171),{'method':_0x287e40['HYJKe'],'headers':_0x232cd6,'body':JSON[_0x4db221(0x165)](_0x569698),'signal':_0x31c629[_0x4db221(0x12c)]});}finally{clearTimeout(_0x45a2c7);}}}let currentCollector=null;export function createTelemetryCollector(_0x4aa404){return currentCollector=new TelemetryCollector(_0x4aa404),currentCollector;}export function getCurrentCollector(){return currentCollector;}function _0x15fb(_0x116486,_0x3e9f38){_0x116486=_0x116486-0x12a;const _0x2942ea=_0x2942();let _0x15fbd1=_0x2942ea[_0x116486];return _0x15fbd1;}export async function withTelemetry(_0x26fb8e,_0x664929,_0x55ffdc){const _0x183cec=_0x36d573,_0x583d50={'bEqbo':function(_0x36641e,_0x2a822e){return _0x36641e(_0x2a822e);},'SIVWw':'success'},_0xd1f639=_0x583d50[_0x183cec(0x13d)](createTelemetryCollector,_0x26fb8e);await _0xd1f639['trackCommandStart'](_0x55ffdc);try{const _0x5d700b=await _0x583d50['bEqbo'](_0x664929,_0xd1f639);return await _0xd1f639['trackCommandEnd'](_0x583d50['SIVWw']),_0x5d700b;}catch(_0x4fabc5){await _0xd1f639['trackCommandError'](_0x4fabc5);throw _0x4fabc5;}finally{await _0xd1f639['flush']();}}function truncate(_0x489912,_0x3daaf0){const _0x5d7299=_0x36d573;return _0x489912[_0x5d7299(0x157)]>_0x3daaf0?_0x489912[_0x5d7299(0x140)](0x0,_0x3daaf0)+_0x5d7299(0x14a):_0x489912;}function _0x2942(){const _0xd07466=['length','trackPhaseEnd','yKvOm','isCI','isTty','error','zjoKV','YRsgI','metadata','cwd','489064jzqlkZ','now','constructor','fkLHw','stringify','errorMessage','flush','18zocaEY','browserSessionId','buffer','set','command_error','transport','64wLfRMF','tKGDp','utf-8','/api/v1/mcp/cli-telemetry','cliVersion','flushAsync','push','eventType','NNONK','12ebVJXk','message','trackPhaseStart','isTTY','signal','5wOmFiO','buildEvent','name','phaseIndex','nodeVersion','outcome','phaseCounter','1087438sylAGu','flushing','application/json','1699649YwzVuc','1687852YPCGUD','sendImmediate','finally','command','\x20event(s)\x20to\x20','bEqbo','LpIuR','WHinZ','slice','3345pkKYTx','platform','evaluation','1265034TvwlDG','featureId','sendBatch','phaseStartTimes','errorType','version','...','phase','sNtDT','KvCrt','phase_start','commandStartTime','3657980ADpPoi','deviceId','phase_error','Unknown','checklistItemId','commandId','ahONc'];_0x2942=function(){return _0xd07466;};return _0x2942();}
|
|
1
|
+
const _0x1a99f6=_0x3899;(function(_0x13c816,_0x4fa22d){const _0x5eb482=_0x3899,_0x28fa12=_0x13c816();while(!![]){try{const _0x181804=-parseInt(_0x5eb482(0xb9))/0x1*(parseInt(_0x5eb482(0xd6))/0x2)+-parseInt(_0x5eb482(0xb2))/0x3+-parseInt(_0x5eb482(0xad))/0x4*(parseInt(_0x5eb482(0xb6))/0x5)+-parseInt(_0x5eb482(0xc0))/0x6+parseInt(_0x5eb482(0xbb))/0x7+-parseInt(_0x5eb482(0xa6))/0x8*(-parseInt(_0x5eb482(0xd5))/0x9)+parseInt(_0x5eb482(0xb0))/0xa;if(_0x181804===_0x4fa22d)break;else _0x28fa12['push'](_0x28fa12['shift']());}catch(_0x1688c6){_0x28fa12['push'](_0x28fa12['shift']());}}}(_0x2fe3,0xe943a));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x3899(_0xc61bf6,_0x253b60){_0xc61bf6=_0xc61bf6-0xa5;const _0x2fe31b=_0x2fe3();let _0x3899e2=_0x2fe31b[_0xc61bf6];return _0x3899e2;}import{getCurrentVersion}from'./version.js';function _0x2fe3(){const _0x526ed0=['isTty','isCI','flushing','checklistItemId','DEBUG','finally','sendImmediate','lXYKa','SxBST','featureId','errorMessage','trim','Authorization','esqpR','qReDk','buffer','phaseCounter','POST','[telemetry]\x20Sending\x20','constructor','flush','biCSY','platform','browserSessionId','GITHUB_ACTIONS','phaseIndex','980984BWJxah','/api/v1/mcp/cli-telemetry','outcome','evaluation','application/json','ipmrE','delete','3800172fepIBf','phase_start','durationMs','26245900OTNcEL','commandId','2952540kqYkqD','command_start','name','trackCommandError','5wPYCQf','flushAsync','command','3ZGiGBs','phaseStartTimes','3902038qKlisU','length','now','nodeVersion','command_error','5381244TqgRWh','HSmFW','.session','env','bHJFa','transport','catch','commandStartTime','trackCommandEnd','slice','push','isTTY','sendBatch','buildEvent','trackPhaseError','deviceId','TCPOE','abort','cwd','utf-8','message','126dqRdEJ','741466CptiVy','cliVersion'];_0x2fe3=function(){return _0x526ed0;};return _0x2fe3();}let cachedDeviceId=null;function getDeviceId(){const _0x4ac7f2=_0x3899,_0x323ec8={'esqpR':function(_0x55f3fb,_0x44a2dd,_0x9c790){return _0x55f3fb(_0x44a2dd,_0x9c790);},'cwABy':function(_0x1e6cfb,_0x132fe6,_0x3cba9c){return _0x1e6cfb(_0x132fe6,_0x3cba9c);},'bHJFa':function(_0x1d5fb9,_0x3e5419){return _0x1d5fb9(_0x3e5419);},'qReDk':function(_0x4d4065){return _0x4d4065();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x94745=_0x323ec8[_0x4ac7f2(0xe5)](join,homedir(),'.ranger'),_0x4be527=_0x323ec8['cwABy'](join,_0x94745,_0x4ac7f2(0xc2));if(_0x323ec8[_0x4ac7f2(0xc4)](existsSync,_0x4be527)){cachedDeviceId=readFileSync(_0x4be527,_0x4ac7f2(0xd3))[_0x4ac7f2(0xe3)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x323ec8[_0x4ac7f2(0xe6)](randomUUID),_0x323ec8['esqpR'](mkdirSync,_0x94745,{'recursive':!![]}),writeFileSync(_0x4be527,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x323ec8[_0x4ac7f2(0xe6)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x1a99f6(0xe7)]=[];[_0x1a99f6(0xb1)];[_0x1a99f6(0xb8)];['commandStartTime'];['phaseCounter']=0x0;['phaseStartTimes']=new Map();[_0x1a99f6(0xda)]=null;['deviceId'];['cliVersion'];['nodeVersion'];[_0x1a99f6(0xee)];[_0x1a99f6(0xd8)];[_0x1a99f6(0xd9)];['featureId'];[_0x1a99f6(0xdb)];[_0x1a99f6(0xef)];['transport'];constructor(_0x1536e0){const _0x18b624=_0x1a99f6,_0x1e85ef={'SxBST':function(_0x2fcd34){return _0x2fcd34();}};this['commandId']=_0x1e85ef[_0x18b624(0xe0)](randomUUID),this[_0x18b624(0xb8)]=_0x1536e0,this['commandStartTime']=Date[_0x18b624(0xbd)](),this[_0x18b624(0xcf)]=getDeviceId(),this['cliVersion']=getCurrentVersion(),this[_0x18b624(0xbe)]=process['version'],this['platform']=process['platform'],this[_0x18b624(0xd8)]=process['stdout'][_0x18b624(0xcb)]??![],this['isCI']=!!(process[_0x18b624(0xc3)]['CI']||process[_0x18b624(0xc3)][_0x18b624(0xf0)]);}['setContext'](_0x25f2fd){const _0x459645=_0x1a99f6;if(_0x25f2fd[_0x459645(0xe1)])this[_0x459645(0xe1)]=_0x25f2fd['featureId'];if(_0x25f2fd[_0x459645(0xdb)])this[_0x459645(0xdb)]=_0x25f2fd['checklistItemId'];if(_0x25f2fd[_0x459645(0xef)])this['browserSessionId']=_0x25f2fd['browserSessionId'];if(_0x25f2fd['transport'])this['transport']=_0x25f2fd[_0x459645(0xc5)];}async['trackCommandStart'](_0x34f5cc){const _0x2e8528=_0x1a99f6,_0x24783e=this['buildEvent']({'eventType':_0x2e8528(0xb3),'metadata':_0x34f5cc});await this['sendImmediate'](_0x24783e);}async['trackCommandEnd'](_0x1021c8,_0x49cb1e){const _0x3862f3=_0x1a99f6,_0x4367a3={'biCSY':'command_end','wjuSE':function(_0x311547,_0x14bec5){return _0x311547-_0x14bec5;}},_0x16b408=this[_0x3862f3(0xcd)]({'eventType':_0x4367a3[_0x3862f3(0xed)],'outcome':_0x1021c8,'durationMs':_0x4367a3['wjuSE'](Date[_0x3862f3(0xbd)](),this[_0x3862f3(0xc7)]),'metadata':_0x49cb1e});await this['sendImmediate'](_0x16b408),await this[_0x3862f3(0xec)]();}async[_0x1a99f6(0xb5)](_0x39a535,_0x4868c6){const _0x3f1b55=_0x1a99f6,_0x5c6d49={'TCPOE':_0x3f1b55(0xbf),'Bhkcu':'Unknown'},_0x1e8e0c=this[_0x3f1b55(0xcd)]({'eventType':_0x5c6d49[_0x3f1b55(0xd0)],'errorMessage':truncate(_0x39a535 instanceof Error?_0x39a535[_0x3f1b55(0xd4)]:String(_0x39a535),0x1f4),'errorType':_0x39a535 instanceof Error?_0x39a535['constructor']['name']:_0x5c6d49['Bhkcu'],'durationMs':Date['now']()-this['commandStartTime'],'metadata':_0x4868c6});await this['sendImmediate'](_0x1e8e0c),await this['flush']();}['trackPhaseStart'](_0x5e10c4,_0x49b8a3){const _0x377fac=_0x1a99f6;this[_0x377fac(0xe8)]++,this['phaseStartTimes']['set'](_0x5e10c4,Date[_0x377fac(0xbd)]());const _0x17d493=this['buildEvent']({'eventType':_0x377fac(0xae),'phase':_0x5e10c4,'phaseIndex':this['phaseCounter'],'metadata':_0x49b8a3});this['buffer'][_0x377fac(0xca)](_0x17d493);}['trackPhaseEnd'](_0x12b4bd,_0x36a619){const _0x217458=_0x1a99f6,_0x5c0a30={'FfDce':function(_0x4ad8e2,_0x317c2d){return _0x4ad8e2-_0x317c2d;}},_0x38f43e=this[_0x217458(0xba)]['get'](_0x12b4bd),_0x5c66c5=_0x38f43e?_0x5c0a30['FfDce'](Date['now'](),_0x38f43e):undefined;this[_0x217458(0xba)][_0x217458(0xac)](_0x12b4bd);const _0x16f103=this['buildEvent']({'eventType':'phase_end','phase':_0x12b4bd,'durationMs':_0x5c66c5,'metadata':_0x36a619});this[_0x217458(0xe7)][_0x217458(0xca)](_0x16f103),this[_0x217458(0xe7)][_0x217458(0xbc)]>=0xa&&this[_0x217458(0xb7)]();}async[_0x1a99f6(0xce)](_0x4367f7,_0x594c62,_0x3dfa1c){const _0x378c17=_0x1a99f6,_0x5aa1e8={'lXYKa':function(_0x3862d2,_0x28fc48,_0x57ad22){return _0x3862d2(_0x28fc48,_0x57ad22);},'fYoSQ':function(_0x5b5c8b,_0x2d319d){return _0x5b5c8b instanceof _0x2d319d;},'UAcvV':'Unknown'},_0x3b9783=this[_0x378c17(0xba)]['get'](_0x4367f7),_0x2457c1=_0x3b9783?Date[_0x378c17(0xbd)]()-_0x3b9783:undefined;this['phaseStartTimes'][_0x378c17(0xac)](_0x4367f7);const _0x553e07=this[_0x378c17(0xcd)]({'eventType':'phase_error','phase':_0x4367f7,'durationMs':_0x2457c1,'errorMessage':_0x5aa1e8[_0x378c17(0xdf)](truncate,_0x594c62 instanceof Error?_0x594c62[_0x378c17(0xd4)]:String(_0x594c62),0x1f4),'errorType':_0x5aa1e8['fYoSQ'](_0x594c62,Error)?_0x594c62[_0x378c17(0xeb)][_0x378c17(0xb4)]:_0x5aa1e8['UAcvV'],'metadata':_0x3dfa1c});await this[_0x378c17(0xde)](_0x553e07);}async['flush'](){const _0x5b584f=_0x1a99f6;if(this['buffer'][_0x5b584f(0xbc)]===0x0)return;const _0x136e59=this['buffer']['splice'](0x0);try{await this[_0x5b584f(0xcc)](_0x136e59);}catch{}}['buildEvent'](_0x53c992){const _0x3f91a4=_0x1a99f6;return{'eventType':_0x53c992['eventType'],'command':this[_0x3f91a4(0xb8)],'commandId':this[_0x3f91a4(0xb1)],'deviceId':this[_0x3f91a4(0xcf)],'timestamp':new Date()['toISOString'](),'durationMs':_0x53c992[_0x3f91a4(0xaf)],'phase':_0x53c992['phase'],'phaseIndex':_0x53c992[_0x3f91a4(0xa5)],'outcome':_0x53c992[_0x3f91a4(0xa8)],'errorMessage':_0x53c992[_0x3f91a4(0xe2)],'errorType':_0x53c992['errorType'],'featureId':this[_0x3f91a4(0xe1)],'checklistItemId':this[_0x3f91a4(0xdb)],'browserSessionId':this[_0x3f91a4(0xef)],'transport':this[_0x3f91a4(0xc5)],'evaluation':_0x53c992[_0x3f91a4(0xa9)],'cliVersion':this[_0x3f91a4(0xd7)],'nodeVersion':this[_0x3f91a4(0xbe)],'platform':this[_0x3f91a4(0xee)],'cwd':process[_0x3f91a4(0xd2)](),'isTty':this['isTty'],'isCI':this['isCI'],'metadata':_0x53c992['metadata']};}async[_0x1a99f6(0xde)](_0x5c8263){try{await this['sendBatch']([_0x5c8263]);}catch{}}['flushAsync'](){const _0x337a64=_0x1a99f6;if(this[_0x337a64(0xda)])return;this[_0x337a64(0xda)]=this[_0x337a64(0xec)]()[_0x337a64(0xdd)](()=>{const _0x5b0e47=_0x337a64;this[_0x5b0e47(0xda)]=null;});}async[_0x1a99f6(0xcc)](_0x31719b){const _0x262f8c=_0x1a99f6,_0xd6694f={'STmWX':_0x262f8c(0xe4),'GBLta':_0x262f8c(0xe9)},_0x451657=await getToken()[_0x262f8c(0xc6)](()=>null),_0x1c4a0e=getApiBaseUrl(),_0x72d14d={'Content-Type':_0x262f8c(0xaa)};_0x451657&&(_0x72d14d[_0xd6694f['STmWX']]='Bearer\x20'+_0x451657);const _0x16d555={'events':_0x31719b};process['env'][_0x262f8c(0xdc)]&&console['error'](_0x262f8c(0xea)+_0x31719b['length']+'\x20event(s)\x20to\x20'+_0x1c4a0e+'/api/v1/mcp/cli-telemetry');const _0x509942=new AbortController(),_0x2fdac3=setTimeout(()=>_0x509942[_0x262f8c(0xd1)](),0x1388);try{await fetch(_0x1c4a0e+_0x262f8c(0xa7),{'method':_0xd6694f['GBLta'],'headers':_0x72d14d,'body':JSON['stringify'](_0x16d555),'signal':_0x509942['signal']});}finally{clearTimeout(_0x2fdac3);}}}let currentCollector=null;export function createTelemetryCollector(_0x50f295){return currentCollector=new TelemetryCollector(_0x50f295),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x1af449,_0x398e34,_0xe37b5e){const _0x3eeab5=_0x1a99f6,_0x1362f3={'ipmrE':function(_0x5c5166,_0x2cdbb2){return _0x5c5166(_0x2cdbb2);}},_0x678079=_0x1362f3['ipmrE'](createTelemetryCollector,_0x1af449);await _0x678079['trackCommandStart'](_0xe37b5e);try{const _0x14b532=await _0x1362f3[_0x3eeab5(0xab)](_0x398e34,_0x678079);return await _0x678079[_0x3eeab5(0xc8)]('success'),_0x14b532;}catch(_0x4b1523){await _0x678079['trackCommandError'](_0x4b1523);throw _0x4b1523;}finally{await _0x678079[_0x3eeab5(0xec)]();}}function truncate(_0x10299a,_0x298df3){const _0x50a253=_0x1a99f6,_0x139774={'HSmFW':'...'};return _0x10299a['length']>_0x298df3?_0x10299a[_0x50a253(0xc9)](0x0,_0x298df3)+_0x139774[_0x50a253(0xc1)]:_0x10299a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1ca5(_0xb4efaf,_0x4c065f){_0xb4efaf=_0xb4efaf-0xfe;const _0x5bf638=_0x5bf6();let _0x1ca5ca=_0x5bf638[_0xb4efaf];return _0x1ca5ca;}(function(_0x578373,_0x268fa0){const _0x252ea8=_0x1ca5,_0x5c3dab=_0x578373();while(!![]){try{const _0x4a47f5=-parseInt(_0x252ea8(0x113))/0x1+-parseInt(_0x252ea8(0x10f))/0x2*(parseInt(_0x252ea8(0x101))/0x3)+-parseInt(_0x252ea8(0x108))/0x4*(-parseInt(_0x252ea8(0x116))/0x5)+parseInt(_0x252ea8(0x104))/0x6+-parseInt(_0x252ea8(0xfe))/0x7*(-parseInt(_0x252ea8(0xff))/0x8)+parseInt(_0x252ea8(0x112))/0x9+-parseInt(_0x252ea8(0x10c))/0xa*(parseInt(_0x252ea8(0x10b))/0xb);if(_0x4a47f5===_0x268fa0)break;else _0x5c3dab['push'](_0x5c3dab['shift']());}catch(_0x130475){_0x5c3dab['push'](_0x5c3dab['shift']());}}}(_0x5bf6,0x7bb44));import{getApiBaseUrl}from'./environment.js';function _0x5bf6(){const _0x52d2da=['token','374AvEzqI','404350aGxPlv','persistRefreshToken','/cli-auth/partner-refresh','20dgnkyg','stringify','POST','6336882vRIUiV','577445TKYUGo','NIroe','timeout','10FcJRsu','595217QyIjUg','64FHFOdS','RZMAt','210030zquREe','KYvUa','json','5308746fsHlQJ','application/json','/cli-auth/refresh','YSoEG','1779780EWqRAb','crFMk'];_0x5bf6=function(){return _0x52d2da;};return _0x5bf6();}import{getRefreshToken,storeToken,storeRefreshToken}from'./keychain.js';export async function refreshCliToken(){const _0x4fdac5=_0x1ca5,_0x77ba41={'KYvUa':function(_0x11b6c3){return _0x11b6c3();},'Jisoq':function(_0x1c511e,_0x3a0f79){return _0x1c511e(_0x3a0f79);}},_0x50c399=await _0x77ba41[_0x4fdac5(0x102)](getRefreshToken);if(!_0x50c399)return null;const _0x3a94e8=await _0x77ba41['Jisoq'](tryPartnerRefresh,_0x50c399);if(_0x3a94e8)return _0x3a94e8;return tryWorkosRefresh(_0x50c399);}export async function refreshPartnerCliToken(_0x53633e,_0x1eb696={}){const _0x17c9e9=_0x1ca5,_0x692463={'NIroe':function(_0x4f911b,_0x40cbcd){return _0x4f911b(_0x40cbcd);}},_0x61be76=await _0x692463[_0x17c9e9(0x114)](tryPartnerRefresh,_0x53633e);return _0x61be76&&_0x1eb696[_0x17c9e9(0x10d)]&&await _0x692463[_0x17c9e9(0x114)](storeRefreshToken,_0x53633e),_0x61be76;}async function tryPartnerRefresh(_0x11a752){const _0x1663e9=_0x1ca5,_0x28dd4b={'RZMAt':function(_0x5305a7,_0x1e484d,_0x2d7f9d){return _0x5305a7(_0x1e484d,_0x2d7f9d);},'crFMk':'POST','eXHoJ':_0x1663e9(0x105)},_0x2224bf=getApiBaseUrl();try{const _0x23f3c6=await _0x28dd4b[_0x1663e9(0x100)](fetch,_0x2224bf+_0x1663e9(0x10e),{'method':_0x28dd4b[_0x1663e9(0x109)],'headers':{'Content-Type':_0x28dd4b['eXHoJ']},'body':JSON[_0x1663e9(0x110)]({'refreshToken':_0x11a752}),'signal':AbortSignal[_0x1663e9(0x115)](0x2710)});if(!_0x23f3c6['ok'])return null;const _0x7c087b=await _0x23f3c6[_0x1663e9(0x103)]();return await storeToken(_0x7c087b['token']),_0x7c087b[_0x1663e9(0x10a)];}catch{return null;}}async function tryWorkosRefresh(_0x102a39){const _0x7ca5e7=_0x1ca5,_0x57cdcf={'YSoEG':function(_0x329076,_0x35e1ca){return _0x329076(_0x35e1ca);}},_0x156139=getApiBaseUrl();try{const _0x270441=await fetch(_0x156139+_0x7ca5e7(0x106),{'method':_0x7ca5e7(0x111),'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'refreshToken':_0x102a39}),'signal':AbortSignal[_0x7ca5e7(0x115)](0x2710)});if(!_0x270441['ok'])return null;const _0x16971b=await _0x270441['json']();return await storeToken(_0x16971b['token']),await _0x57cdcf[_0x7ca5e7(0x107)](storeRefreshToken,_0x16971b['refreshToken']),_0x16971b['token'];}catch{return null;}}
|