@ranger-testing/ranger-cli 3.0.1-alpha.ffffb5b-28 → 3.1.1-alpha.b22d278-38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -0
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -0
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -0
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5a16(_0x12de3e,_0x3e2f99){_0x12de3e=_0x12de3e-0x65;const _0x82b25=_0x82b2();let _0x5a165e=_0x82b25[_0x12de3e];return _0x5a165e;}const _0x7f3170=_0x5a16;(function(_0x5a96d4,_0x3bfb78){const _0x2758f=_0x5a16,_0x4159c4=_0x5a96d4();while(!![]){try{const _0x1c5c35=parseInt(_0x2758f(0x93))/0x1*(-parseInt(_0x2758f(0x8e))/0x2)+-parseInt(_0x2758f(0x9a))/0x3+-parseInt(_0x2758f(0x7c))/0x4+-parseInt(_0x2758f(0x6b))/0x5+-parseInt(_0x2758f(0x76))/0x6+-parseInt(_0x2758f(0x7a))/0x7+parseInt(_0x2758f(0x81))/0x8*(parseInt(_0x2758f(0x7d))/0x9);if(_0x1c5c35===_0x3bfb78)break;else _0x4159c4['push'](_0x4159c4['shift']());}catch(_0x53fe89){_0x4159c4['push'](_0x4159c4['shift']());}}}(_0x82b2,0x749bf));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_DURATION=0x4489,ID_VOID=0xec,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x26d9aa,_0x5bbf65){const _0x5f199b=_0x5a16,_0x56ec24={'ZpYRh':function(_0x5566cd,_0x6db2d1){return _0x5566cd>=_0x6db2d1;},'IpWLA':function(_0x2afb8f,_0x4b3903){return _0x2afb8f&_0x4b3903;},'RowAk':function(_0x3be7cb,_0x3a9d24){return _0x3be7cb-_0x3a9d24;},'FTcis':function(_0x37c03f,_0x1330da){return _0x37c03f<_0x1330da;},'jNdKx':function(_0x29a3e4,_0x5e3764){return _0x29a3e4+_0x5e3764;},'ttzEQ':function(_0x530351,_0x3840d2){return _0x530351+_0x3840d2;}};if(_0x56ec24['ZpYRh'](_0x5bbf65,_0x26d9aa['length']))return[0x0,0x0];const _0x512476=_0x26d9aa[_0x5bbf65];let _0x5e3603=0x1,_0xd936dc=0x80;while(_0x5e3603<=0x8&&!(_0x512476&_0xd936dc)){_0x5e3603++,_0xd936dc>>=0x1;}if(_0x5bbf65+_0x5e3603>_0x26d9aa['length'])return[0x0,0x0];let _0x1ef0ae=_0x56ec24['IpWLA'](_0x512476,_0x56ec24[_0x5f199b(0x66)](_0xd936dc,0x1));for(let _0x266e9e=0x1;_0x56ec24['FTcis'](_0x266e9e,_0x5e3603);_0x266e9e++){_0x1ef0ae=_0x56ec24['jNdKx'](_0x1ef0ae*0x100,_0x26d9aa[_0x56ec24[_0x5f199b(0x65)](_0x5bbf65,_0x266e9e)]);}return[_0x1ef0ae,_0x5e3603];}function readId(_0x3671b6,_0x3cb3a5){const _0x1c5445=_0x5a16,_0xf235bd={'nwtMr':function(_0x368bf5,_0x173716){return _0x368bf5>=_0x173716;},'PKHlP':function(_0x26acfc,_0x39a362){return _0x26acfc+_0x39a362;},'sUykQ':function(_0x5076ac,_0x298d9e){return _0x5076ac*_0x298d9e;}};if(_0x3cb3a5>=_0x3671b6[_0x1c5445(0xab)])return[0x0,0x0];const _0x52acc2=_0x3671b6[_0x3cb3a5];let _0x41d9e5;if(_0xf235bd[_0x1c5445(0x94)](_0x52acc2,0x80))_0x41d9e5=0x1;else{if(_0xf235bd['nwtMr'](_0x52acc2,0x40))_0x41d9e5=0x2;else{if(_0x52acc2>=0x20)_0x41d9e5=0x3;else{if(_0x52acc2>=0x10)_0x41d9e5=0x4;else return[_0x52acc2,0x1];}}}if(_0x3cb3a5+_0x41d9e5>_0x3671b6[_0x1c5445(0xab)])return[0x0,0x0];let _0x4badf5=0x0;for(let _0x23c557=0x0;_0x23c557<_0x41d9e5;_0x23c557++){_0x4badf5=_0xf235bd['PKHlP'](_0xf235bd[_0x1c5445(0x79)](_0x4badf5,0x100),_0x3671b6[_0x3cb3a5+_0x23c557]);}return[_0x4badf5,_0x41d9e5];}function readUint(_0x163ad8,_0x9ada75,_0x9d766f){const _0x4cee66={'idJOq':function(_0x37fe1d,_0x22ae91){return _0x37fe1d<_0x22ae91;}};let _0x1b16ec=0x0;for(let _0x120b9a=0x0;_0x4cee66['idJOq'](_0x120b9a,_0x9d766f);_0x120b9a++){_0x1b16ec=_0x1b16ec*0x100+_0x163ad8[_0x9ada75+_0x120b9a];}return _0x1b16ec;}function isUnknownSize(_0x164422,_0x35081a){const _0x51fc79=_0x5a16,_0x5e3b57={'dzrzQ':function(_0x4a5e33,_0x4bf932){return _0x4a5e33===_0x4bf932;}};return _0x5e3b57[_0x51fc79(0x89)](_0x164422,Math[_0x51fc79(0x88)](0x2,0x7*_0x35081a)-0x1);}function writeId(_0x420bc5){const _0x5b212c=_0x5a16,_0x59ce93={'TAoSg':function(_0x2aae38,_0x561264){return _0x2aae38<=_0x561264;},'cWvbF':function(_0x46cb76,_0x476a81){return _0x46cb76&_0x476a81;},'Pknrn':function(_0x545c50,_0xffa607){return _0x545c50>>_0xffa607;},'pjcin':function(_0x4a3065,_0x3629e9){return _0x4a3065&_0x3629e9;},'yDLXo':function(_0xb47430,_0x4d756c){return _0xb47430&_0x4d756c;},'WRSFi':function(_0x8fce19,_0x30e858){return _0x8fce19>>_0x30e858;}};if(_0x59ce93['TAoSg'](_0x420bc5,0xff))return Buffer[_0x5b212c(0x92)]([_0x420bc5]);if(_0x420bc5<=0xffff)return Buffer['from']([_0x59ce93['cWvbF'](_0x420bc5>>0x8,0xff),_0x420bc5&0xff]);if(_0x420bc5<=0xffffff)return Buffer['from']([_0x59ce93['cWvbF'](_0x420bc5>>0x10,0xff),_0x59ce93[_0x5b212c(0xa6)](_0x59ce93[_0x5b212c(0x86)](_0x420bc5,0x8),0xff),_0x59ce93[_0x5b212c(0x9f)](_0x420bc5,0xff)]);return Buffer['from']([_0x59ce93['yDLXo'](_0x59ce93['Pknrn'](_0x420bc5,0x18),0xff),_0x59ce93['Pknrn'](_0x420bc5,0x10)&0xff,_0x59ce93['cWvbF'](_0x59ce93['WRSFi'](_0x420bc5,0x8),0xff),_0x420bc5&0xff]);}function writeVint(_0x187bb4,_0x3fc523){const _0xc0c90f=_0x5a16,_0x4845b5={'MYbOK':function(_0x511514,_0x9c2ba){return _0x511514||_0x9c2ba;},'HnWyD':function(_0x4e9722,_0x42e2a6){return _0x4e9722<_0x42e2a6;},'VpdoS':function(_0x31c95c,_0x25d4c7){return _0x31c95c-_0x25d4c7;},'WLCko':function(_0x5a44d2,_0x24a5c2){return _0x5a44d2-_0x24a5c2;},'lcnTY':function(_0x2af771,_0x48b314){return _0x2af771>=_0x48b314;},'YOpFJ':function(_0x532551,_0x309b78){return _0x532551<<_0x309b78;}};let _0x257597=_0x4845b5[_0xc0c90f(0xa5)](_0x3fc523,0x1);while(_0x4845b5[_0xc0c90f(0x99)](_0x4845b5[_0xc0c90f(0xa4)](Math['pow'](0x2,0x7*_0x257597),0x2),_0x187bb4))_0x257597++;const _0x2dd26e=Buffer[_0xc0c90f(0xa3)](_0x257597);for(let _0x23e0ef=_0x4845b5[_0xc0c90f(0x7b)](_0x257597,0x1);_0x4845b5[_0xc0c90f(0x87)](_0x23e0ef,0x0);_0x23e0ef--){_0x2dd26e[_0x23e0ef]=_0x187bb4&0xff,_0x187bb4=Math[_0xc0c90f(0xa8)](_0x187bb4/0x100);}return _0x2dd26e[0x0]|=_0x4845b5[_0xc0c90f(0xa7)](0x1,_0x4845b5['VpdoS'](0x8,_0x257597)),_0x2dd26e;}function writeFloat64(_0x548772){const _0x35a090=Buffer['alloc'](0x8);return _0x35a090['writeDoubleBE'](_0x548772,0x0),_0x35a090;}function writeVoid(_0x2a8778){const _0x25946e=_0x5a16,_0x3f10c7={'ZJjPD':function(_0x3a4cd5,_0x170711){return _0x3a4cd5<=_0x170711;},'bdWWA':function(_0xfcb3ab,_0x1b9f4f){return _0xfcb3ab-_0x1b9f4f;},'CVDZV':function(_0x22669f,_0x410240){return _0x22669f*_0x410240;}};for(let _0x48d717=0x1;_0x3f10c7[_0x25946e(0xaa)](_0x48d717,0x8);_0x48d717++){const _0xc68129=_0x3f10c7['bdWWA'](_0x2a8778-0x1,_0x48d717);if(_0xc68129>=0x0&&_0xc68129<=_0x3f10c7['bdWWA'](Math['pow'](0x2,_0x3f10c7[_0x25946e(0x82)](0x7,_0x48d717)),0x2))return Buffer[_0x25946e(0x67)]([Buffer['from']([ID_VOID]),writeVint(_0xc68129,_0x48d717),Buffer['alloc'](_0xc68129)]);}return Buffer['alloc'](0x0);}function findElement(_0x85ece5,_0x5c3294,_0x29e236,_0xb4c066){const _0x34ff51=_0x5a16,_0x2d3afe={'WdKVB':function(_0x2bd58b,_0x256baf){return _0x2bd58b<_0x256baf;},'UYJBn':function(_0x413bb7,_0x123ecd,_0x1827ed){return _0x413bb7(_0x123ecd,_0x1827ed);},'keqqQ':function(_0x49d62e,_0x1f4b56){return _0x49d62e+_0x1f4b56;},'niynv':function(_0x2d0064,_0x42314c){return _0x2d0064+_0x42314c;}};let _0x296456=_0x5c3294;while(_0x2d3afe[_0x34ff51(0xa1)](_0x296456,_0x29e236)){const [_0x51a987,_0x160f50]=_0x2d3afe[_0x34ff51(0x96)](readId,_0x85ece5,_0x296456),[_0x323c51,_0x5c544c]=readVint(_0x85ece5,_0x296456+_0x160f50);if(_0x51a987===_0xb4c066)return{'offset':_0x296456,'idLen':_0x160f50,'sizeLen':_0x5c544c,'dataSize':_0x323c51,'dataOffset':_0x2d3afe[_0x34ff51(0x6a)](_0x296456,_0x160f50)+_0x5c544c};if(isUnknownSize(_0x323c51,_0x5c544c))break;_0x296456+=_0x2d3afe['niynv'](_0x160f50+_0x5c544c,_0x323c51);}return null;}function computeDurationMs(_0x81113e,_0x559fce){const _0x3d2e7d=_0x5a16,_0x4ecd14={'FJWPB':function(_0x56deae,_0x190056){return _0x56deae<_0x190056;},'pBcmp':function(_0x5a37ae,_0x59b92c,_0x177e54){return _0x5a37ae(_0x59b92c,_0x177e54);},'QBTIO':function(_0x169942,_0x513e8a){return _0x169942+_0x513e8a;},'DdnJd':function(_0x596432,_0x5b42f0){return _0x596432+_0x5b42f0;},'jDUiZ':function(_0x4206bd,_0x2b955b,_0x20009d){return _0x4206bd(_0x2b955b,_0x20009d);},'kUNOA':function(_0x31f09e,_0x413019){return _0x31f09e+_0x413019;},'JvUjg':function(_0x13c849,_0x354c28){return _0x13c849+_0x354c28;},'bCAbX':function(_0x28d02a,_0x4a254e,_0x4acb63){return _0x28d02a(_0x4a254e,_0x4acb63);},'RFodR':function(_0xaa328a,_0xf9d694){return _0xaa328a+_0xf9d694;},'TzvfE':function(_0x1d4b5d,_0x5703f7){return _0x1d4b5d===_0x5703f7;},'pknVp':function(_0x109a6c,_0x11e449){return _0x109a6c>=_0x11e449;},'VpNDQ':function(_0x5949ba,_0x499640){return _0x5949ba+_0x499640;},'ebNUG':function(_0x5d3b82,_0xbfa46b,_0x2d5759){return _0x5d3b82(_0xbfa46b,_0x2d5759);},'uqLmU':function(_0x18355d,_0x4c9a0c){return _0x18355d+_0x4c9a0c;},'CqtkG':function(_0x29ddcf,_0x4ccb48){return _0x29ddcf+_0x4ccb48;}};let _0x3aa528=0x0;const _0xcfd9e9=Buffer[_0x3d2e7d(0x92)]([0x1f,0x43,0xb6,0x75]);let _0x13830e=_0x81113e[_0x3d2e7d(0x90)](_0xcfd9e9);if(_0x13830e===-0x1)return 0x0;while(_0x4ecd14['FJWPB'](_0x13830e,_0x81113e[_0x3d2e7d(0xab)])){const [_0x2dfd2f,_0x450507]=readId(_0x81113e,_0x13830e);if(_0x2dfd2f!==ID_CLUSTER)break;const [_0x137191,_0x5c05d3]=_0x4ecd14['pBcmp'](readVint,_0x81113e,_0x4ecd14[_0x3d2e7d(0x75)](_0x13830e,_0x450507)),_0x4d0bac=_0x4ecd14[_0x3d2e7d(0x7e)](_0x13830e+_0x450507,_0x5c05d3),_0x5ad747=isUnknownSize(_0x137191,_0x5c05d3);let _0x3cda60;if(_0x5ad747){let _0x2450bd=_0x4d0bac;while(_0x2450bd<_0x81113e[_0x3d2e7d(0xab)]-0x4){const [_0x40b1eb,_0x41feff]=readId(_0x81113e,_0x2450bd);if(_0x40b1eb===ID_CLUSTER){_0x3cda60=_0x2450bd;break;}const [_0x566cc8,_0x4137fd]=readVint(_0x81113e,_0x2450bd+_0x41feff);if(_0x4ecd14[_0x3d2e7d(0x8f)](isUnknownSize,_0x566cc8,_0x4137fd)){_0x3cda60=_0x81113e['length'];break;}_0x2450bd+=_0x4ecd14['kUNOA'](_0x41feff,_0x4137fd)+_0x566cc8;}_0x3cda60??=_0x81113e[_0x3d2e7d(0xab)];}else _0x3cda60=_0x4ecd14['JvUjg'](_0x4d0bac,_0x137191);let _0x755ee=0x0,_0x44d580=_0x4d0bac;while(_0x44d580<_0x3cda60){const [_0x4434f3,_0x15c300]=_0x4ecd14['bCAbX'](readId,_0x81113e,_0x44d580),[_0x4bb077,_0x1e553c]=_0x4ecd14[_0x3d2e7d(0x95)](readVint,_0x81113e,_0x44d580+_0x15c300);if(_0x4434f3===ID_TIMESTAMP)_0x755ee=readUint(_0x81113e,_0x4ecd14['RFodR'](_0x44d580+_0x15c300,_0x1e553c),_0x4bb077);else{if(_0x4ecd14['TzvfE'](_0x4434f3,ID_SIMPLE_BLOCK)&&_0x4ecd14['pknVp'](_0x4bb077,0x4)){const _0x409f3b=_0x4ecd14[_0x3d2e7d(0x6c)](_0x44d580+_0x15c300,_0x1e553c),[,_0x229e21]=_0x4ecd14['ebNUG'](readVint,_0x81113e,_0x409f3b),_0x32f515=_0x81113e['readInt16BE'](_0x4ecd14[_0x3d2e7d(0x7e)](_0x409f3b,_0x229e21)),_0x3ec902=(_0x755ee+_0x32f515)*_0x559fce/0xf4240;_0x3ec902>_0x3aa528&&(_0x3aa528=_0x3ec902);}else{if(_0x4434f3===ID_CLUSTER)break;}}if(isUnknownSize(_0x4bb077,_0x1e553c))break;_0x44d580+=_0x4ecd14[_0x3d2e7d(0x71)](_0x4ecd14[_0x3d2e7d(0xac)](_0x15c300,_0x1e553c),_0x4bb077);}_0x13830e=_0x3cda60;}return _0x3aa528;}export function fixWebmDuration(_0x5e89c1,_0x37acf8){const _0x4fc547=_0x5a16,_0x3f43a5={'qnMzD':function(_0x4cb403,_0xc15090,_0x2e2106){return _0x4cb403(_0xc15090,_0x2e2106);},'Irwfu':function(_0x2bad47,_0x54584d){return _0x2bad47+_0x54584d;},'qUcRZ':function(_0x283007,_0x3436d8){return _0x283007+_0x3436d8;},'dresK':function(_0x243c4e,_0x2d1c24){return _0x243c4e+_0x2d1c24;},'CCUrS':'Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment','qwKaI':function(_0xbb424d,_0x5908d6){return _0xbb424d+_0x5908d6;},'vxEdS':function(_0x255338,_0x208338){return _0x255338+_0x208338;},'NnwmE':function(_0x398e75,_0xcc782f){return _0x398e75+_0xcc782f;},'ErtGD':function(_0x137d7c,_0x24a265){return _0x137d7c+_0x24a265;},'esIRP':function(_0x519b53,_0x5874e7){return _0x519b53===_0x5874e7;},'VnCBC':_0x4fc547(0x97),'CNWWI':function(_0x271868,_0x1dd9b8){return _0x271868(_0x1dd9b8);},'ZlTMV':function(_0x8196d5,_0x1fd053){return _0x8196d5(_0x1fd053);},'DYQRc':function(_0xc038cd,_0x38bdfe){return _0xc038cd<_0x38bdfe;},'fcmBk':function(_0x264cdc,_0x265501,_0x154572,_0xd733fc,_0x2a967c,_0x2c87b7,_0x144c5d){return _0x264cdc(_0x265501,_0x154572,_0xd733fc,_0x2a967c,_0x2c87b7,_0x144c5d);},'XwpWC':function(_0x5b1b0e,_0x4cd3aa){return _0x5b1b0e(_0x4cd3aa);}},_0x143b49=readFileSync(_0x5e89c1);let _0x59f233=0x0;const [_0x2b3807,_0x215b21]=_0x3f43a5[_0x4fc547(0x6f)](readId,_0x143b49,_0x59f233),[_0x5a1961,_0x1855cc]=readVint(_0x143b49,_0x3f43a5[_0x4fc547(0x6d)](_0x59f233,_0x215b21));_0x59f233+=_0x3f43a5[_0x4fc547(0x8a)](_0x3f43a5['dresK'](_0x215b21,_0x1855cc),_0x5a1961);const [_0x1151f6,_0x274d4e]=readId(_0x143b49,_0x59f233);if(_0x1151f6!==ID_SEGMENT)return console[_0x4fc547(0xa2)](_0x3f43a5[_0x4fc547(0x77)]),![];const [,_0x33a638]=_0x3f43a5[_0x4fc547(0x6f)](readVint,_0x143b49,_0x3f43a5[_0x4fc547(0x7f)](_0x59f233,_0x274d4e)),_0x7a9196=_0x3f43a5['qUcRZ'](_0x3f43a5['vxEdS'](_0x59f233,_0x274d4e),_0x33a638);let _0x2d78b0=_0x7a9196;const _0x1c793a=Math['min'](_0x143b49[_0x4fc547(0xab)],_0x3f43a5['dresK'](_0x7a9196,0x2710));let _0xc45cf2=null,_0x3aea2b=null;while(_0x2d78b0<_0x1c793a){const [_0x62df36,_0x52a380]=readId(_0x143b49,_0x2d78b0),[_0x23d4a0,_0x2b04d2]=readVint(_0x143b49,_0x3f43a5[_0x4fc547(0x9d)](_0x2d78b0,_0x52a380));_0x62df36===ID_VOID&&!_0xc45cf2&&(_0xc45cf2={'offset':_0x2d78b0,'idLen':_0x52a380,'sizeLen':_0x2b04d2,'dataSize':_0x23d4a0,'dataOffset':_0x3f43a5['Irwfu'](_0x2d78b0+_0x52a380,_0x2b04d2)});if(_0x62df36===ID_INFO){_0x3aea2b={'offset':_0x2d78b0,'idLen':_0x52a380,'sizeLen':_0x2b04d2,'dataSize':_0x23d4a0,'dataOffset':_0x3f43a5[_0x4fc547(0xa9)](_0x3f43a5['qwKaI'](_0x2d78b0,_0x52a380),_0x2b04d2)};break;}if(_0x3f43a5['esIRP'](_0x62df36,ID_CLUSTER))break;if(isUnknownSize(_0x23d4a0,_0x2b04d2))break;_0x2d78b0+=_0x52a380+_0x2b04d2+_0x23d4a0;}if(!_0x3aea2b)return console[_0x4fc547(0xa2)](_0x3f43a5['VnCBC']),![];const _0x4bf0f7=findElement(_0x143b49,_0x3aea2b['dataOffset'],_0x3aea2b['dataOffset']+_0x3aea2b[_0x4fc547(0x6e)],ID_DURATION);if(_0x4bf0f7)return![];const _0x5ab219=findElement(_0x143b49,_0x3aea2b['dataOffset'],_0x3aea2b['dataOffset']+_0x3aea2b['dataSize'],ID_TIMESTAMP_SCALE);let _0x32c37f=0xf4240;_0x5ab219&&(_0x32c37f=readUint(_0x143b49,_0x5ab219['dataOffset'],_0x5ab219['dataSize']));const _0x38b145=_0x3f43a5['qnMzD'](computeDurationMs,_0x143b49,_0x32c37f);if(_0x38b145<=0x0)return console[_0x4fc547(0xa2)](_0x4fc547(0x68)),![];const _0x1debd4=_0x38b145*0xf4240/_0x32c37f,_0x1e6bc7=Buffer[_0x4fc547(0x67)]([_0x3f43a5[_0x4fc547(0x8b)](writeId,ID_DURATION),_0x3f43a5['CNWWI'](writeVint,0x8),_0x3f43a5[_0x4fc547(0x70)](writeFloat64,_0x1debd4)]),_0x302727=_0x1e6bc7[_0x4fc547(0xab)];if(!_0xc45cf2||_0xc45cf2['offset']<_0x3aea2b['offset']){if(_0xc45cf2){const _0xaa477=_0xc45cf2['idLen']+_0xc45cf2[_0x4fc547(0x83)]+_0xc45cf2['dataSize'],_0x34a683=_0xaa477-_0x302727;if(_0x3f43a5[_0x4fc547(0x9b)](_0x34a683,0x2))return _0x3f43a5['fcmBk'](rewriteFile,_0x143b49,_0x3aea2b,_0x1e6bc7,_0x32c37f,_0x38b145,_0x37acf8);const _0x4d322c=_0x3aea2b['dataSize']+_0x302727,_0x11d517=Buffer['concat']([_0x3f43a5['XwpWC'](writeId,ID_INFO),writeVint(_0x4d322c,_0x3aea2b['sizeLen'])]),_0x5edc84=_0x143b49[_0x4fc547(0x91)](_0x3aea2b['dataOffset'],_0x3aea2b['dataOffset']+_0x3aea2b['dataSize']),_0x12220c=writeVoid(_0x34a683),_0x4151d2=_0x143b49['slice'](0x0,_0xc45cf2[_0x4fc547(0x78)]),_0x4851a6=_0x143b49[_0x4fc547(0x91)](_0x3aea2b['dataOffset']+_0x3aea2b['dataSize']);return writeFileSync(_0x37acf8,Buffer[_0x4fc547(0x67)]([_0x4151d2,_0x12220c,_0x11d517,_0x5edc84,_0x1e6bc7,_0x4851a6])),!![];}}return rewriteFile(_0x143b49,_0x3aea2b,_0x1e6bc7,_0x32c37f,_0x38b145,_0x37acf8);}function _0x82b2(){const _0xe6ec11=['OQoZK','Fixed:\x20','QBTIO','852492fAdVqL','CCUrS','offset','sUykQ','6530069MFgtCl','WLCko','1911920rwnbky','144TlPHES','DdnJd','qwKaI','fixWebmDuration.js','1274032QmMCCp','CVDZV','sizeLen','log','idLen','Pknrn','lcnTY','pow','dzrzQ','qUcRZ','CNWWI','Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>','EgLoX','8984zSeWCI','jDUiZ','indexOf','slice','from','27gQtXUk','nwtMr','pBcmp','UYJBn','Could\x20not\x20find\x20Info\x20element','AQssI','HnWyD','494292MTyvQx','DYQRc','exit','NnwmE','endsWith','pjcin','argv','WdKVB','error','alloc','VpdoS','MYbOK','cWvbF','YOpFJ','floor','ErtGD','ZJjPD','length','CqtkG','ttzEQ','RowAk','concat','Could\x20not\x20compute\x20duration','dataOffset','keqqQ','1157280stztuq','VpNDQ','Irwfu','dataSize','qnMzD','ZlTMV','uqLmU','fixWebmDuration.ts'];_0x82b2=function(){return _0xe6ec11;};return _0x82b2();}function rewriteFile(_0x3f645d,_0x2963b2,_0x40dfbe,_0x5f44ee,_0x446f19,_0x383c58){const _0x296e61=_0x5a16,_0x26ccf7={'OQoZK':function(_0x1e5489,_0x6aeefa){return _0x1e5489(_0x6aeefa);},'EgLoX':function(_0x2ed4e9,_0x36c016){return _0x2ed4e9+_0x36c016;},'AQssI':function(_0x159c6e,_0x11f592,_0x13d469){return _0x159c6e(_0x11f592,_0x13d469);}},_0xfff7ed=_0x2963b2[_0x296e61(0x6e)]+_0x40dfbe[_0x296e61(0xab)],_0x354cbc=Buffer['concat']([writeId(ID_INFO),_0x26ccf7[_0x296e61(0x73)](writeVint,_0xfff7ed)]),_0xc01503=_0x26ccf7['EgLoX'](_0x2963b2[_0x296e61(0x85)],_0x2963b2[_0x296e61(0x83)]),_0x223982=_0x3f645d['slice'](0x0,_0x2963b2['offset']),_0x5d49b4=_0x3f645d['slice'](_0x2963b2['dataOffset'],_0x2963b2[_0x296e61(0x69)]+_0x2963b2['dataSize']),_0x1e9759=_0x3f645d[_0x296e61(0x91)](_0x26ccf7[_0x296e61(0x8d)](_0x26ccf7['EgLoX'](_0x2963b2[_0x296e61(0x78)],_0xc01503),_0x2963b2[_0x296e61(0x6e)]));return _0x26ccf7[_0x296e61(0x98)](writeFileSync,_0x383c58,Buffer[_0x296e61(0x67)]([_0x223982,_0x354cbc,_0x5d49b4,_0x40dfbe,_0x1e9759])),!![];}if(process['argv'][0x1]?.['endsWith'](_0x7f3170(0x72))||process[_0x7f3170(0xa0)][0x1]?.[_0x7f3170(0x9e)](_0x7f3170(0x80))){const input=process['argv'][0x2],output=process['argv'][0x3];(!input||!output)&&(console[_0x7f3170(0xa2)](_0x7f3170(0x8c)),process[_0x7f3170(0x9c)](0x1));const fixed=fixWebmDuration(input,output);fixed?console[_0x7f3170(0x84)](_0x7f3170(0x74)+output):console[_0x7f3170(0x84)]('File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.');}
|
|
1
|
+
const _0x21383b=_0x23b8;(function(_0x264c6e,_0x2ce199){const _0x2ff70c=_0x23b8,_0x4779f7=_0x264c6e();while(!![]){try{const _0x5aedd5=-parseInt(_0x2ff70c(0x1f9))/0x1+parseInt(_0x2ff70c(0x1f1))/0x2+-parseInt(_0x2ff70c(0x215))/0x3+-parseInt(_0x2ff70c(0x20a))/0x4+-parseInt(_0x2ff70c(0x202))/0x5*(-parseInt(_0x2ff70c(0x1fa))/0x6)+-parseInt(_0x2ff70c(0x1e3))/0x7*(-parseInt(_0x2ff70c(0x207))/0x8)+-parseInt(_0x2ff70c(0x205))/0x9*(-parseInt(_0x2ff70c(0x1f4))/0xa);if(_0x5aedd5===_0x2ce199)break;else _0x4779f7['push'](_0x4779f7['shift']());}catch(_0x47f130){_0x4779f7['push'](_0x4779f7['shift']());}}}(_0x1480,0x26832));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_DURATION=0x4489,ID_VOID=0xec,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x490e3f,_0x56699b){const _0x11df0e=_0x23b8,_0x42db24={'UEXgx':function(_0x2715ff,_0x39d4e2){return _0x2715ff>=_0x39d4e2;},'aCVtY':function(_0x450f52,_0x36c49c){return _0x450f52&_0x36c49c;},'cOKTC':function(_0x2b7af3,_0x43c58b){return _0x2b7af3>_0x43c58b;},'EbQlI':function(_0x351215,_0x18dd72){return _0x351215+_0x18dd72;},'rJEly':function(_0x3d238a,_0x1bd266){return _0x3d238a&_0x1bd266;},'wCfeT':function(_0x18ec84,_0x51dd43){return _0x18ec84<_0x51dd43;},'YZleQ':function(_0xad23b8,_0x3fa5f8){return _0xad23b8*_0x3fa5f8;},'VuKrq':function(_0x477960,_0x346c36){return _0x477960+_0x346c36;}};if(_0x42db24['UEXgx'](_0x56699b,_0x490e3f[_0x11df0e(0x213)]))return[0x0,0x0];const _0x3fa5a3=_0x490e3f[_0x56699b];let _0x46ebeb=0x1,_0x2a5095=0x80;while(_0x46ebeb<=0x8&&!_0x42db24['aCVtY'](_0x3fa5a3,_0x2a5095)){_0x46ebeb++,_0x2a5095>>=0x1;}if(_0x42db24['cOKTC'](_0x42db24[_0x11df0e(0x203)](_0x56699b,_0x46ebeb),_0x490e3f['length']))return[0x0,0x0];let _0x56aa16=_0x42db24[_0x11df0e(0x1f5)](_0x3fa5a3,_0x2a5095-0x1);for(let _0x2596cd=0x1;_0x42db24['wCfeT'](_0x2596cd,_0x46ebeb);_0x2596cd++){_0x56aa16=_0x42db24['YZleQ'](_0x56aa16,0x100)+_0x490e3f[_0x42db24['VuKrq'](_0x56699b,_0x2596cd)];}return[_0x56aa16,_0x46ebeb];}function readId(_0x10bb30,_0x5e610b){const _0xdb775d=_0x23b8,_0x252557={'fRdln':function(_0x218086,_0x19b403){return _0x218086>=_0x19b403;},'dbmew':function(_0x4960e4,_0x49fb92){return _0x4960e4>=_0x49fb92;},'YmolI':function(_0x14b6dd,_0x28b536){return _0x14b6dd>=_0x28b536;},'EWHWk':function(_0x548a93,_0x5bb8e6){return _0x548a93+_0x5bb8e6;},'ddTgm':function(_0x17b2d7,_0x5345d5){return _0x17b2d7*_0x5345d5;}};if(_0x252557['fRdln'](_0x5e610b,_0x10bb30[_0xdb775d(0x213)]))return[0x0,0x0];const _0x105ee7=_0x10bb30[_0x5e610b];let _0x43fa34;if(_0x252557[_0xdb775d(0x1f3)](_0x105ee7,0x80))_0x43fa34=0x1;else{if(_0x252557['dbmew'](_0x105ee7,0x40))_0x43fa34=0x2;else{if(_0x252557[_0xdb775d(0x223)](_0x105ee7,0x20))_0x43fa34=0x3;else{if(_0x105ee7>=0x10)_0x43fa34=0x4;else return[_0x105ee7,0x1];}}}if(_0x5e610b+_0x43fa34>_0x10bb30[_0xdb775d(0x213)])return[0x0,0x0];let _0x2de39c=0x0;for(let _0x67f94a=0x0;_0x67f94a<_0x43fa34;_0x67f94a++){_0x2de39c=_0x252557[_0xdb775d(0x20e)](_0x252557['ddTgm'](_0x2de39c,0x100),_0x10bb30[_0x252557[_0xdb775d(0x20e)](_0x5e610b,_0x67f94a)]);}return[_0x2de39c,_0x43fa34];}function _0x23b8(_0x4b9e7b,_0x4b461e){_0x4b9e7b=_0x4b9e7b-0x1dd;const _0x1480ef=_0x1480();let _0x23b8ad=_0x1480ef[_0x4b9e7b];return _0x23b8ad;}function readUint(_0x4a588d,_0x54f48f,_0x332255){const _0x45dcc6=_0x23b8,_0x55eb12={'XBBXP':function(_0x562474,_0x358c2d){return _0x562474<_0x358c2d;}};let _0xddf71=0x0;for(let _0x23d5a9=0x0;_0x55eb12[_0x45dcc6(0x1ff)](_0x23d5a9,_0x332255);_0x23d5a9++){_0xddf71=_0xddf71*0x100+_0x4a588d[_0x54f48f+_0x23d5a9];}return _0xddf71;}function isUnknownSize(_0x51b90f,_0x80e68f){const _0x5736a4=_0x23b8,_0x3f7c19={'IYerA':function(_0x496a5b,_0x3845dd){return _0x496a5b-_0x3845dd;}};return _0x51b90f===_0x3f7c19['IYerA'](Math[_0x5736a4(0x208)](0x2,0x7*_0x80e68f),0x1);}function writeId(_0x28cadd){const _0x354299=_0x23b8,_0x25b11c={'Fpeue':function(_0xb5fed0,_0x5657bb){return _0xb5fed0<=_0x5657bb;},'CzHyU':function(_0x52fd39,_0x5f03ca){return _0x52fd39&_0x5f03ca;},'kXksu':function(_0x534d40,_0x2c5e49){return _0x534d40>>_0x2c5e49;},'Lzmbr':function(_0x4311b8,_0x4687b3){return _0x4311b8&_0x4687b3;},'qtEdm':function(_0x4a3967,_0xae972a){return _0x4a3967>>_0xae972a;},'QPVUd':function(_0x2de485,_0x33e25f){return _0x2de485>>_0x33e25f;},'vOQmi':function(_0x26b9c4,_0x341c39){return _0x26b9c4&_0x341c39;},'vfjYI':function(_0x526c86,_0xf40fbb){return _0x526c86&_0xf40fbb;},'jEyLK':function(_0x5a0816,_0x480510){return _0x5a0816>>_0x480510;},'Rsjrt':function(_0x51c5c6,_0x5dad2a){return _0x51c5c6&_0x5dad2a;}};if(_0x28cadd<=0xff)return Buffer[_0x354299(0x1f8)]([_0x28cadd]);if(_0x25b11c['Fpeue'](_0x28cadd,0xffff))return Buffer['from']([_0x25b11c[_0x354299(0x219)](_0x25b11c[_0x354299(0x1e9)](_0x28cadd,0x8),0xff),_0x25b11c['Lzmbr'](_0x28cadd,0xff)]);if(_0x28cadd<=0xffffff)return Buffer['from']([_0x25b11c[_0x354299(0x1ed)](_0x25b11c[_0x354299(0x1fb)](_0x28cadd,0x10),0xff),_0x25b11c['QPVUd'](_0x28cadd,0x8)&0xff,_0x28cadd&0xff]);return Buffer['from']([_0x25b11c[_0x354299(0x221)](_0x28cadd>>0x18,0xff),_0x25b11c['vfjYI'](_0x28cadd>>0x10,0xff),_0x25b11c['jEyLK'](_0x28cadd,0x8)&0xff,_0x25b11c[_0x354299(0x20f)](_0x28cadd,0xff)]);}function _0x1480(){const _0x589741=['ERHvp','354346NKlbOy','PKMEd','fRdln','498010OiKrbd','rJEly','DRtpr','fixWebmDuration.js','from','126940bckJJf','18MzbteK','qtEdm','JLECO','error','CtKhJ','XBBXP','alloc','endsWith','288840CqvRXs','EbQlI','EOjDD','18thuIOx','cevIe','501464hastyC','pow','hclrJ','287332pOMSMZ','pldfr','pSSVi','wpeRb','EWHWk','Rsjrt','bWzZG','FEpVL','jFYxb','length','File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.','468729yKmGBi','TDewH','Bwvdn','ddEAh','CzHyU','readInt16BE','VLywl','VopNh','yRZOt','dataOffset','ztOGo','strnO','vOQmi','Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment','YmolI','sizeLen','idLen','RGtEB','NyEfz','indexOf','cwuOy','gvSsF','slice','MvxzV','dataSize','Could\x20not\x20compute\x20duration','7LzWcmH','offset','concat','fixWebmDuration.ts','gsWHy','Could\x20not\x20find\x20Info\x20element','kXksu','kYUyC','log','YvrAP','Lzmbr','argv','IBMuW'];_0x1480=function(){return _0x589741;};return _0x1480();}function writeVint(_0x27b0c7,_0x385adf){const _0x313730=_0x23b8,_0x1fec1f={'fxvXr':function(_0x30a12e,_0x345a9e){return _0x30a12e||_0x345a9e;},'YvrAP':function(_0x2a943e,_0x3b4928){return _0x2a943e<_0x3b4928;},'ztOGo':function(_0x1626a9,_0x28ff23){return _0x1626a9-_0x28ff23;},'gsWHy':function(_0x23c43d,_0x22c49d){return _0x23c43d&_0x22c49d;},'wGHvN':function(_0x3c925c,_0x1c2fc1){return _0x3c925c<<_0x1c2fc1;},'pldfr':function(_0x25eebf,_0x5b6a6b){return _0x25eebf-_0x5b6a6b;}};let _0x37356a=_0x1fec1f['fxvXr'](_0x385adf,0x1);while(_0x1fec1f[_0x313730(0x1ec)](_0x1fec1f[_0x313730(0x21f)](Math[_0x313730(0x208)](0x2,0x7*_0x37356a),0x2),_0x27b0c7))_0x37356a++;const _0xf11ce4=Buffer['alloc'](_0x37356a);for(let _0x2a7b98=_0x37356a-0x1;_0x2a7b98>=0x0;_0x2a7b98--){_0xf11ce4[_0x2a7b98]=_0x1fec1f[_0x313730(0x1e7)](_0x27b0c7,0xff),_0x27b0c7=Math['floor'](_0x27b0c7/0x100);}return _0xf11ce4[0x0]|=_0x1fec1f['wGHvN'](0x1,_0x1fec1f[_0x313730(0x20b)](0x8,_0x37356a)),_0xf11ce4;}function writeFloat64(_0xb57183){const _0x50d89e=_0x23b8,_0x5d11a9=Buffer[_0x50d89e(0x200)](0x8);return _0x5d11a9['writeDoubleBE'](_0xb57183,0x0),_0x5d11a9;}function writeVoid(_0x4317b5){const _0x444d06=_0x23b8,_0x452a6c={'yRZOt':function(_0x33a91a,_0xbd7d3e){return _0x33a91a<=_0xbd7d3e;},'cwuOy':function(_0x5f2c1c,_0x482cca){return _0x5f2c1c>=_0x482cca;},'wpeRb':function(_0x247b77,_0x5b215a){return _0x247b77-_0x5b215a;},'DRtpr':function(_0x3b0ab5,_0x4a9fe8,_0x313e93){return _0x3b0ab5(_0x4a9fe8,_0x313e93);}};for(let _0x248252=0x1;_0x452a6c['yRZOt'](_0x248252,0x8);_0x248252++){const _0x1f7564=_0x4317b5-0x1-_0x248252;if(_0x452a6c[_0x444d06(0x1dd)](_0x1f7564,0x0)&&_0x452a6c[_0x444d06(0x21d)](_0x1f7564,_0x452a6c[_0x444d06(0x20d)](Math['pow'](0x2,0x7*_0x248252),0x2)))return Buffer['concat']([Buffer[_0x444d06(0x1f8)]([ID_VOID]),_0x452a6c[_0x444d06(0x1f6)](writeVint,_0x1f7564,_0x248252),Buffer['alloc'](_0x1f7564)]);}return Buffer[_0x444d06(0x200)](0x0);}function findElement(_0x562e00,_0x11fd18,_0xef280c,_0x2c4184){const _0xf3a1a=_0x23b8,_0x3a7512={'pxLwa':function(_0xd6d39b,_0x74696a){return _0xd6d39b<_0x74696a;},'sheXm':function(_0x1fa561,_0x34da75,_0x16fa39){return _0x1fa561(_0x34da75,_0x16fa39);},'pIwre':function(_0x43180e,_0x4cbffb){return _0x43180e+_0x4cbffb;},'EOjDD':function(_0x59c068,_0x13b6b5,_0x2a60ed){return _0x59c068(_0x13b6b5,_0x2a60ed);},'hclrJ':function(_0x7a7f80,_0x4b4484){return _0x7a7f80+_0x4b4484;}};let _0x27fdfa=_0x11fd18;while(_0x3a7512['pxLwa'](_0x27fdfa,_0xef280c)){const [_0x586352,_0xd413bf]=_0x3a7512['sheXm'](readId,_0x562e00,_0x27fdfa),[_0x324d1e,_0x18595d]=readVint(_0x562e00,_0x27fdfa+_0xd413bf);if(_0x586352===_0x2c4184)return{'offset':_0x27fdfa,'idLen':_0xd413bf,'sizeLen':_0x18595d,'dataSize':_0x324d1e,'dataOffset':_0x3a7512['pIwre'](_0x27fdfa+_0xd413bf,_0x18595d)};if(_0x3a7512[_0xf3a1a(0x204)](isUnknownSize,_0x324d1e,_0x18595d))break;_0x27fdfa+=_0x3a7512[_0xf3a1a(0x209)](_0xd413bf+_0x18595d,_0x324d1e);}return null;}function computeDurationMs(_0x364737,_0x4080a9){const _0x52f05d=_0x23b8,_0x5b2dcb={'NyEfz':function(_0x2ab7e0,_0x5221b3){return _0x2ab7e0===_0x5221b3;},'VopNh':function(_0x254d2a,_0x2d69d3,_0x392f8e){return _0x254d2a(_0x2d69d3,_0x392f8e);},'cevIe':function(_0x542840,_0x206c0e){return _0x542840+_0x206c0e;},'LFmac':function(_0x530498,_0x3df546){return _0x530498<_0x3df546;},'PKMEd':function(_0x5e2a87,_0x236c46,_0x3d2684){return _0x5e2a87(_0x236c46,_0x3d2684);},'CqbBd':function(_0x4c3b4b,_0x10102e,_0xbb8410){return _0x4c3b4b(_0x10102e,_0xbb8410);},'jjIjj':function(_0x3ee4b3,_0x2245b7){return _0x3ee4b3+_0x2245b7;},'iLArb':function(_0xb4d0e2,_0x53e583){return _0xb4d0e2*_0x53e583;},'JLECO':function(_0x15405e,_0x27ed2b,_0x263de5){return _0x15405e(_0x27ed2b,_0x263de5);},'VLywl':function(_0x4b51fb,_0x2f035a){return _0x4b51fb+_0x2f035a;},'rpVJL':function(_0x292a91,_0x2689b2){return _0x292a91+_0x2689b2;}};let _0x4e2860=0x0;const _0x4e459a=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x5b7c79=_0x364737[_0x52f05d(0x228)](_0x4e459a);if(_0x5b2dcb['NyEfz'](_0x5b7c79,-0x1))return 0x0;while(_0x5b7c79<_0x364737['length']){const [_0x212b9c,_0x66cceb]=readId(_0x364737,_0x5b7c79);if(_0x212b9c!==ID_CLUSTER)break;const [_0x1edd6c,_0x4ee10f]=_0x5b2dcb[_0x52f05d(0x21c)](readVint,_0x364737,_0x5b2dcb['cevIe'](_0x5b7c79,_0x66cceb)),_0x535596=_0x5b2dcb['cevIe'](_0x5b7c79,_0x66cceb)+_0x4ee10f,_0x135289=isUnknownSize(_0x1edd6c,_0x4ee10f);let _0x17c742;if(_0x135289){let _0x3ac9a7=_0x535596;while(_0x5b2dcb['LFmac'](_0x3ac9a7,_0x364737['length']-0x4)){const [_0x57e430,_0x5653b7]=readId(_0x364737,_0x3ac9a7);if(_0x5b2dcb['NyEfz'](_0x57e430,ID_CLUSTER)){_0x17c742=_0x3ac9a7;break;}const [_0xc52fb2,_0x1faa46]=readVint(_0x364737,_0x5b2dcb[_0x52f05d(0x206)](_0x3ac9a7,_0x5653b7));if(isUnknownSize(_0xc52fb2,_0x1faa46)){_0x17c742=_0x364737[_0x52f05d(0x213)];break;}_0x3ac9a7+=_0x5653b7+_0x1faa46+_0xc52fb2;}_0x17c742??=_0x364737[_0x52f05d(0x213)];}else _0x17c742=_0x535596+_0x1edd6c;let _0x3cf99d=0x0,_0x11c98a=_0x535596;while(_0x11c98a<_0x17c742){const [_0x3ce188,_0x56e254]=_0x5b2dcb[_0x52f05d(0x1f2)](readId,_0x364737,_0x11c98a),[_0x56f942,_0x1e9b0d]=_0x5b2dcb['CqbBd'](readVint,_0x364737,_0x5b2dcb['jjIjj'](_0x11c98a,_0x56e254));if(_0x3ce188===ID_TIMESTAMP)_0x3cf99d=readUint(_0x364737,_0x11c98a+_0x56e254+_0x1e9b0d,_0x56f942);else{if(_0x3ce188===ID_SIMPLE_BLOCK&&_0x56f942>=0x4){const _0x36a868=_0x5b2dcb['jjIjj'](_0x11c98a,_0x56e254)+_0x1e9b0d,[,_0x4bec73]=_0x5b2dcb['PKMEd'](readVint,_0x364737,_0x36a868),_0x3aaef1=_0x364737[_0x52f05d(0x21a)](_0x36a868+_0x4bec73),_0x393441=_0x5b2dcb['iLArb'](_0x5b2dcb['cevIe'](_0x3cf99d,_0x3aaef1),_0x4080a9)/0xf4240;_0x393441>_0x4e2860&&(_0x4e2860=_0x393441);}else{if(_0x5b2dcb[_0x52f05d(0x227)](_0x3ce188,ID_CLUSTER))break;}}if(_0x5b2dcb[_0x52f05d(0x1fc)](isUnknownSize,_0x56f942,_0x1e9b0d))break;_0x11c98a+=_0x5b2dcb[_0x52f05d(0x21b)](_0x5b2dcb['rpVJL'](_0x56e254,_0x1e9b0d),_0x56f942);}_0x5b7c79=_0x17c742;}return _0x4e2860;}export function fixWebmDuration(_0x3cb3ec,_0x45bc15){const _0x1d63f6=_0x23b8,_0xf46ba3={'RGtEB':function(_0x37d1ba,_0x213351,_0x3fd546){return _0x37d1ba(_0x213351,_0x3fd546);},'IBMuW':function(_0xb2eb2b,_0x25ce43){return _0xb2eb2b+_0x25ce43;},'pSSVi':function(_0x4d7fe7,_0x6bab1b){return _0x4d7fe7+_0x6bab1b;},'kYUyC':function(_0x10789e,_0x218ef9,_0x3bbaf8){return _0x10789e(_0x218ef9,_0x3bbaf8);},'jFYxb':_0x1d63f6(0x222),'gvSsF':function(_0x3a5257,_0x22715f,_0x3e8b36){return _0x3a5257(_0x22715f,_0x3e8b36);},'ERHvp':function(_0x26a054,_0x38ac23){return _0x26a054===_0x38ac23;},'strnO':function(_0xb7ff76,_0x1de8e2,_0x4e6e6a){return _0xb7ff76(_0x1de8e2,_0x4e6e6a);},'bWzZG':function(_0x562132,_0x296641){return _0x562132+_0x296641;},'QYleW':_0x1d63f6(0x1e2),'vrKgI':function(_0x1bae58,_0x5a9c1e){return _0x1bae58/_0x5a9c1e;},'MvxzV':function(_0x51435c,_0x58bb23){return _0x51435c*_0x58bb23;},'Bwvdn':function(_0x30c22c,_0xafcc62){return _0x30c22c(_0xafcc62);},'ddEAh':function(_0x241d94,_0x2b7fc1){return _0x241d94(_0x2b7fc1);},'FEpVL':function(_0x50db36,_0xa223c5){return _0x50db36(_0xa223c5);},'TtWuJ':function(_0x512228,_0x450160){return _0x512228<_0x450160;},'CtKhJ':function(_0x115600,_0x3122e9){return _0x115600+_0x3122e9;},'YsDbj':function(_0x346da3,_0x3abf93,_0x33901e,_0x508a57,_0x1b92d3,_0x189e86,_0x2e65aa){return _0x346da3(_0x3abf93,_0x33901e,_0x508a57,_0x1b92d3,_0x189e86,_0x2e65aa);},'iuYOm':function(_0x132323,_0x1ce1d1){return _0x132323+_0x1ce1d1;}},_0x2e43f1=readFileSync(_0x3cb3ec);let _0x11ba2c=0x0;const [_0x35f4eb,_0x1937d4]=_0xf46ba3[_0x1d63f6(0x226)](readId,_0x2e43f1,_0x11ba2c),[_0x4e6dbb,_0x173057]=readVint(_0x2e43f1,_0x11ba2c+_0x1937d4);_0x11ba2c+=_0xf46ba3[_0x1d63f6(0x1ef)](_0xf46ba3[_0x1d63f6(0x20c)](_0x1937d4,_0x173057),_0x4e6dbb);const [_0x46cebf,_0x4cefa2]=_0xf46ba3[_0x1d63f6(0x1ea)](readId,_0x2e43f1,_0x11ba2c);if(_0x46cebf!==ID_SEGMENT)return console['error'](_0xf46ba3[_0x1d63f6(0x212)]),![];const [,_0x15a31f]=readVint(_0x2e43f1,_0xf46ba3[_0x1d63f6(0x20c)](_0x11ba2c,_0x4cefa2)),_0x27d026=_0xf46ba3['IBMuW'](_0x11ba2c,_0x4cefa2)+_0x15a31f;let _0x53148b=_0x27d026;const _0x3e67fa=Math['min'](_0x2e43f1[_0x1d63f6(0x213)],_0x27d026+0x2710);let _0x2374de=null,_0x2b1b69=null;while(_0x53148b<_0x3e67fa){const [_0x499a78,_0x5b0605]=readId(_0x2e43f1,_0x53148b),[_0x2d7c4d,_0x335cfa]=_0xf46ba3[_0x1d63f6(0x1de)](readVint,_0x2e43f1,_0xf46ba3[_0x1d63f6(0x1ef)](_0x53148b,_0x5b0605));_0xf46ba3['ERHvp'](_0x499a78,ID_VOID)&&!_0x2374de&&(_0x2374de={'offset':_0x53148b,'idLen':_0x5b0605,'sizeLen':_0x335cfa,'dataSize':_0x2d7c4d,'dataOffset':_0xf46ba3[_0x1d63f6(0x1ef)](_0x53148b,_0x5b0605)+_0x335cfa});if(_0xf46ba3[_0x1d63f6(0x1f0)](_0x499a78,ID_INFO)){_0x2b1b69={'offset':_0x53148b,'idLen':_0x5b0605,'sizeLen':_0x335cfa,'dataSize':_0x2d7c4d,'dataOffset':_0xf46ba3['pSSVi'](_0x53148b+_0x5b0605,_0x335cfa)};break;}if(_0x499a78===ID_CLUSTER)break;if(_0xf46ba3[_0x1d63f6(0x220)](isUnknownSize,_0x2d7c4d,_0x335cfa))break;_0x53148b+=_0x5b0605+_0x335cfa+_0x2d7c4d;}if(!_0x2b1b69)return console[_0x1d63f6(0x1fd)](_0x1d63f6(0x1e8)),![];const _0x14c339=findElement(_0x2e43f1,_0x2b1b69[_0x1d63f6(0x21e)],_0x2b1b69[_0x1d63f6(0x21e)]+_0x2b1b69['dataSize'],ID_DURATION);if(_0x14c339)return![];const _0x41c6f7=findElement(_0x2e43f1,_0x2b1b69[_0x1d63f6(0x21e)],_0xf46ba3[_0x1d63f6(0x210)](_0x2b1b69['dataOffset'],_0x2b1b69[_0x1d63f6(0x1e1)]),ID_TIMESTAMP_SCALE);let _0x154050=0xf4240;_0x41c6f7&&(_0x154050=readUint(_0x2e43f1,_0x41c6f7['dataOffset'],_0x41c6f7[_0x1d63f6(0x1e1)]));const _0x29030e=computeDurationMs(_0x2e43f1,_0x154050);if(_0x29030e<=0x0)return console['error'](_0xf46ba3['QYleW']),![];const _0x45a23b=_0xf46ba3['vrKgI'](_0xf46ba3[_0x1d63f6(0x1e0)](_0x29030e,0xf4240),_0x154050),_0x184480=Buffer[_0x1d63f6(0x1e5)]([_0xf46ba3[_0x1d63f6(0x217)](writeId,ID_DURATION),_0xf46ba3['ddEAh'](writeVint,0x8),_0xf46ba3['FEpVL'](writeFloat64,_0x45a23b)]),_0x2baea7=_0x184480[_0x1d63f6(0x213)];if(!_0x2374de||_0xf46ba3['TtWuJ'](_0x2374de[_0x1d63f6(0x1e4)],_0x2b1b69[_0x1d63f6(0x1e4)])){if(_0x2374de){const _0x1407f8=_0xf46ba3[_0x1d63f6(0x1fe)](_0x2374de[_0x1d63f6(0x225)],_0x2374de[_0x1d63f6(0x224)])+_0x2374de['dataSize'],_0x418ea1=_0x1407f8-_0x2baea7;if(_0x418ea1<0x2)return _0xf46ba3['YsDbj'](rewriteFile,_0x2e43f1,_0x2b1b69,_0x184480,_0x154050,_0x29030e,_0x45bc15);const _0x3ab17b=_0x2b1b69[_0x1d63f6(0x1e1)]+_0x2baea7,_0x99f819=Buffer[_0x1d63f6(0x1e5)]([_0xf46ba3[_0x1d63f6(0x211)](writeId,ID_INFO),_0xf46ba3['RGtEB'](writeVint,_0x3ab17b,_0x2b1b69['sizeLen'])]),_0x4981ba=_0x2e43f1[_0x1d63f6(0x1df)](_0x2b1b69['dataOffset'],_0x2b1b69['dataOffset']+_0x2b1b69['dataSize']),_0x25ec0e=_0xf46ba3[_0x1d63f6(0x218)](writeVoid,_0x418ea1),_0xce806f=_0x2e43f1['slice'](0x0,_0x2374de['offset']),_0x42bf7c=_0x2e43f1[_0x1d63f6(0x1df)](_0xf46ba3['iuYOm'](_0x2b1b69['dataOffset'],_0x2b1b69['dataSize']));return writeFileSync(_0x45bc15,Buffer['concat']([_0xce806f,_0x25ec0e,_0x99f819,_0x4981ba,_0x184480,_0x42bf7c])),!![];}}return rewriteFile(_0x2e43f1,_0x2b1b69,_0x184480,_0x154050,_0x29030e,_0x45bc15);}function rewriteFile(_0x1f2ea3,_0x9e1d4f,_0x3ea79f,_0xacbbc3,_0x29ccdc,_0x3e51b1){const _0x4b0383=_0x23b8,_0x418f41={'MHlsx':function(_0x1d937a,_0x31170c){return _0x1d937a(_0x31170c);},'TDewH':function(_0x1d80cf,_0x545da1){return _0x1d80cf+_0x545da1;},'OvXAT':function(_0x46a574,_0x226534){return _0x46a574+_0x226534;}},_0x501008=_0x9e1d4f['dataSize']+_0x3ea79f[_0x4b0383(0x213)],_0x311ab5=Buffer['concat']([_0x418f41['MHlsx'](writeId,ID_INFO),writeVint(_0x501008)]),_0x5723a1=_0x418f41[_0x4b0383(0x216)](_0x9e1d4f['idLen'],_0x9e1d4f['sizeLen']),_0x9f07de=_0x1f2ea3[_0x4b0383(0x1df)](0x0,_0x9e1d4f[_0x4b0383(0x1e4)]),_0x45c5b0=_0x1f2ea3['slice'](_0x9e1d4f[_0x4b0383(0x21e)],_0x9e1d4f['dataOffset']+_0x9e1d4f[_0x4b0383(0x1e1)]),_0x36d3ff=_0x1f2ea3['slice'](_0x418f41['OvXAT'](_0x9e1d4f[_0x4b0383(0x1e4)],_0x5723a1)+_0x9e1d4f['dataSize']);return writeFileSync(_0x3e51b1,Buffer['concat']([_0x9f07de,_0x311ab5,_0x45c5b0,_0x3ea79f,_0x36d3ff])),!![];}if(process[_0x21383b(0x1ee)][0x1]?.[_0x21383b(0x201)](_0x21383b(0x1e6))||process['argv'][0x1]?.['endsWith'](_0x21383b(0x1f7))){const input=process['argv'][0x2],output=process[_0x21383b(0x1ee)][0x3];(!input||!output)&&(console['error']('Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>'),process['exit'](0x1));const fixed=fixWebmDuration(input,output);fixed?console['log']('Fixed:\x20'+output):console[_0x21383b(0x1eb)](_0x21383b(0x214));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xd365(_0x50803f,_0xa726e6){_0x50803f=_0x50803f-0x1ec;const _0x6b5d97=_0x6b5d();let _0xd3658d=_0x6b5d97[_0x50803f];return _0xd3658d;}(function(_0x30ec73,_0x5d85d0){const _0x4327ff=_0xd365,_0x39c039=_0x30ec73();while(!![]){try{const _0x15031a=parseInt(_0x4327ff(0x1f5))/0x1*(-parseInt(_0x4327ff(0x1f2))/0x2)+-parseInt(_0x4327ff(0x1f1))/0x3*(-parseInt(_0x4327ff(0x1f7))/0x4)+parseInt(_0x4327ff(0x1ec))/0x5*(parseInt(_0x4327ff(0x1f3))/0x6)+parseInt(_0x4327ff(0x1ed))/0x7+parseInt(_0x4327ff(0x1f6))/0x8+parseInt(_0x4327ff(0x1ef))/0x9*(-parseInt(_0x4327ff(0x1f4))/0xa)+-parseInt(_0x4327ff(0x1ee))/0xb;if(_0x15031a===_0x5d85d0)break;else _0x39c039['push'](_0x39c039['shift']());}catch(_0x5d08a8){_0x39c039['push'](_0x39c039['shift']());}}}(_0x6b5d,0x78161));import{execFile as _0x4544ec}from'child_process';import{promisify}from'util';function _0x6b5d(){const _0x4bc0ac=['30081cRCBZa','7458888KWbqOh','461788hqIZtK','28570WchdVk','1854216fZTTSI','4781733TUXaTq','263745ExjNsh','cwd','9nvzGrX','38eAsMey','660fdPOda','230vuDJix'];_0x6b5d=function(){return _0x4bc0ac;};return _0x6b5d();}const execFile=promisify(_0x4544ec);export async function isPathGitTracked(_0x319ac2){const _0x11f0f9=_0xd365,_0x54672e={'evQpR':'ls-files'};try{return await execFile('git',[_0x54672e['evQpR'],'--error-unmatch',_0x319ac2],{'cwd':process[_0x11f0f9(0x1f0)]()}),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x43e31e=_0x4f6e;(function(_0x5f5dfa,_0x450619){const _0x380f57=_0x4f6e,_0x4e38fa=_0x5f5dfa();while(!![]){try{const _0x3c5bb3=parseInt(_0x380f57(0x1b6))/0x1*(-parseInt(_0x380f57(0x1cd))/0x2)+parseInt(_0x380f57(0x1c6))/0x3*(-parseInt(_0x380f57(0x1fc))/0x4)+-parseInt(_0x380f57(0x1f4))/0x5*(-parseInt(_0x380f57(0x1e9))/0x6)+parseInt(_0x380f57(0x1f8))/0x7+-parseInt(_0x380f57(0x1ae))/0x8+parseInt(_0x380f57(0x1c4))/0x9*(parseInt(_0x380f57(0x1e7))/0xa)+parseInt(_0x380f57(0x1f0))/0xb*(parseInt(_0x380f57(0x1a9))/0xc);if(_0x3c5bb3===_0x450619)break;else _0x4e38fa['push'](_0x4e38fa['shift']());}catch(_0x30238c){_0x4e38fa['push'](_0x4e38fa['shift']());}}}(_0x3be1,0xac234));const _0x2b646c=(function(){const _0x12f5e0=_0x4f6e,_0x13fb02={'qoMyf':_0x12f5e0(0x1a6),'IlErJ':function(_0x5a6660,_0x32082c){return _0x5a6660!==_0x32082c;},'fJccd':_0x12f5e0(0x1e3),'sLNtf':_0x12f5e0(0x1ca)};let _0x335d18=!![];return function(_0x51c39d,_0x4826bf){const _0x42389c=_0x12f5e0;if(_0x13fb02[_0x42389c(0x1c9)](_0x13fb02['fJccd'],_0x13fb02['sLNtf'])){const _0x421599=_0x335d18?function(){const _0x7ec700=_0x42389c;if(_0x13fb02['qoMyf']!==_0x13fb02[_0x7ec700(0x1b0)])return![];else{if(_0x4826bf){const _0x5cee05=_0x4826bf['apply'](_0x51c39d,arguments);return _0x4826bf=null,_0x5cee05;}}}:function(){};return _0x335d18=![],_0x421599;}else return _0x1d85c1[_0x42389c(0x1df)][_0x45c48a];};}()),_0x5bc648=_0x2b646c(this,function(){const _0x3f61d4=_0x4f6e,_0x2015c6={'DpJkv':'(((.+)+)+)+$'};return _0x5bc648[_0x3f61d4(0x1c3)]()[_0x3f61d4(0x1d8)](_0x2015c6[_0x3f61d4(0x202)])['toString']()['constructor'](_0x5bc648)[_0x3f61d4(0x1d8)](_0x2015c6[_0x3f61d4(0x202)]);});_0x5bc648();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN=_0x43e31e(0x1be),ENV_TOKEN_LEGACY=_0x43e31e(0x1e0),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,_0x43e31e(0x1af)),REFRESH_TOKEN_PATH=join(TOKEN_DIR,_0x43e31e(0x1b1));function isGitHubCI(){const _0x34b6b4=_0x43e31e;return!!process[_0x34b6b4(0x1df)][_0x34b6b4(0x1a8)];}async function writeToGitHubEnv(_0xb053e7,_0x3be3a8){const _0x5683ba=_0x43e31e,_0x1076b7={'tIRgk':_0x5683ba(0x1f6),'VoPPJ':'mczuP','ZnffQ':function(_0x590212,_0x2f86b5,_0x2513b8){return _0x590212(_0x2f86b5,_0x2513b8);}},_0xc9f521=process['env'][_0x5683ba(0x1a8)];if(_0xc9f521){if(_0x1076b7[_0x5683ba(0x1e1)]!==_0x1076b7[_0x5683ba(0x1bb)])await _0x1076b7[_0x5683ba(0x1cc)](appendFile,_0xc9f521,_0xb053e7+'='+_0x3be3a8+'\x0a');else{if(_0x4274b8){const _0x442967=_0x48e830[_0x5683ba(0x1ea)](_0x1d6117,arguments);return _0x18cbbe=null,_0x442967;}}}}export async function storeToken(_0x3fc586){const _0x494aa5=_0x43e31e,_0x366024={'wOHdr':_0x494aa5(0x1cf),'asyLB':function(_0x2a15b9){return _0x2a15b9();},'DHCwd':function(_0x210755,_0x4ab8fb){return _0x210755===_0x4ab8fb;},'JMBsa':function(_0x3d4c64,_0x32ef64,_0x828a43){return _0x3d4c64(_0x32ef64,_0x828a43);},'dKoEw':_0x494aa5(0x1eb),'ijgBd':_0x494aa5(0x1d1),'BJQAc':function(_0x58e29b,_0x12e85c,_0x4af0d1,_0x3b5dde){return _0x58e29b(_0x12e85c,_0x4af0d1,_0x3b5dde);}};if(_0x366024[_0x494aa5(0x200)](isGitHubCI)){if(_0x366024['DHCwd']('gsTox',_0x494aa5(0x1c2)))return _0x21b63f[_0x494aa5(0x1c3)]()[_0x494aa5(0x1d8)](oAuLza[_0x494aa5(0x1b2)])[_0x494aa5(0x1c3)]()[_0x494aa5(0x1b4)](_0x1e745e)[_0x494aa5(0x1d8)](oAuLza[_0x494aa5(0x1b2)]);else await _0x366024[_0x494aa5(0x1a7)](writeToGitHubEnv,ENV_TOKEN,_0x3fc586);}else _0x366024[_0x494aa5(0x1bc)]!==_0x366024[_0x494aa5(0x1c7)]?(await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x366024[_0x494aa5(0x1d5)](writeFile,TOKEN_PATH,_0x3fc586,{'mode':0x180})):_0x42b49f(_0x453890);}export async function getToken(){const _0x13cf76=_0x43e31e,_0x2d11c8={'KIIzK':function(_0x568d32,_0x4a7114){return _0x568d32 instanceof _0x4a7114;},'tNkbg':function(_0x3cadf2,_0x262761){return _0x3cadf2(_0x262761);},'ZFVvu':function(_0xf31817,_0x81a48b){return _0xf31817+_0x81a48b;},'BuZip':_0x13cf76(0x1fa),'bTpLK':function(_0x5b91f3,_0x2addf3,_0x3965cb){return _0x5b91f3(_0x2addf3,_0x3965cb);},'jUbct':_0x13cf76(0x1f1),'RlJpR':_0x13cf76(0x1ef),'HYzfr':function(_0x494b89){return _0x494b89();},'cbExd':function(_0x439614,_0x275505){return _0x439614(_0x275505);},'bITty':function(_0x1374ec){return _0x1374ec();},'XkXkp':_0x13cf76(0x1ed),'phPmD':function(_0x4294f6){return _0x4294f6();},'koOEY':_0x13cf76(0x1c1),'ebhhK':function(_0x9a2852,_0x4bc651){return _0x9a2852 instanceof _0x4bc651;},'AjeaN':function(_0x21c889,_0x4351bf){return _0x21c889+_0x4351bf;},'sFtzA':_0x13cf76(0x1c0)};if(process['env'][ENV_TOKEN])return process[_0x13cf76(0x1df)][ENV_TOKEN];if(process[_0x13cf76(0x1df)][ENV_TOKEN_LEGACY])return process[_0x13cf76(0x1df)][ENV_TOKEN_LEGACY];let _0x4a520f=null;try{_0x4a520f=(await _0x2d11c8['bTpLK'](readFile,TOKEN_PATH,_0x13cf76(0x1d0)))[_0x13cf76(0x1f5)]()||null;}catch{if(_0x2d11c8[_0x13cf76(0x1b9)]===_0x2d11c8[_0x13cf76(0x203)]){const _0x4ef91b=_0x4321ee['apply'](_0x56f9b7,arguments);return _0x26a9c0=null,_0x4ef91b;}else{const _0x510c4d=await _0x2d11c8[_0x13cf76(0x1f9)](tryRefreshToken);return _0x510c4d;}}if(!_0x4a520f)return null;const _0x3f987d=await _0x2d11c8[_0x13cf76(0x1ce)](checkTokenValid,_0x4a520f);if(_0x3f987d)return _0x4a520f;const _0x2beddd=await tryPromoteRefreshToken(_0x4a520f);if(_0x2beddd)return _0x2beddd;const _0xdfbc85=await _0x2d11c8[_0x13cf76(0x1db)](tryRefreshToken);if(_0xdfbc85)return _0xdfbc85;const {getMcpAuthOrigin:_0x2e0f08,mcpBootstrap:_0x144631}=await import(_0x2d11c8[_0x13cf76(0x1dc)]),_0x342dc0=await _0x2d11c8[_0x13cf76(0x1d9)](_0x2e0f08);if(_0x342dc0)try{if(_0x2d11c8['koOEY']!==_0x2d11c8[_0x13cf76(0x1d4)]){const _0xabd1b2=_0x2d11c8[_0x13cf76(0x201)](_0x1f286a,_0x529ec2)?_0x5920ed[_0x13cf76(0x1ad)]:_0x2d11c8[_0x13cf76(0x1e5)](_0x3edfdb,_0x3c9b70);throw new _0x5bc530(_0x2d11c8[_0x13cf76(0x1dd)]('MCP\x20re-authentication\x20failed:\x20'+_0xabd1b2+'\x0a',_0x2d11c8[_0x13cf76(0x1ab)]));}else{console[_0x13cf76(0x1d2)]('Session\x20expired.\x20Re-authenticating\x20via\x20MCP\x20bootstrap...'),await _0x2d11c8[_0x13cf76(0x1f9)](_0x144631);const _0x17fca8=await _0x2d11c8['bITty'](tryRefreshToken);if(_0x17fca8)return _0x17fca8;}}catch(_0x21f8ec){const _0x57d76b=_0x2d11c8[_0x13cf76(0x1e6)](_0x21f8ec,Error)?_0x21f8ec[_0x13cf76(0x1ad)]:_0x2d11c8[_0x13cf76(0x1ce)](String,_0x21f8ec);throw new Error(_0x2d11c8[_0x13cf76(0x1aa)](_0x13cf76(0x1d3)+_0x57d76b+'\x0a','Re-authorize\x20the\x20Ranger\x20MCP\x20connection,\x20then\x20retry.'));}throw new Error(_0x2d11c8[_0x13cf76(0x1fd)]);}async function checkTokenValid(_0x31ac16){const _0x5267b1=_0x43e31e,_0x1662be={'NmjuA':function(_0x4ea292,_0x1ebe38,_0x16b87d){return _0x4ea292(_0x1ebe38,_0x16b87d);},'GSAPm':function(_0x6e0d47){return _0x6e0d47();},'XtGPE':_0x5267b1(0x1de),'UBtVr':function(_0x3bce9c,_0x304cc3){return _0x3bce9c!==_0x304cc3;},'ZayAP':'Kxkry'},_0x1e330c=new AbortController(),_0x15de4a=_0x1662be['NmjuA'](setTimeout,()=>_0x1e330c[_0x5267b1(0x1c5)](),0x1388);try{const {getApiBaseUrl:_0x5a3df1}=await import(_0x5267b1(0x1ac)),_0x515850=_0x1662be[_0x5267b1(0x1a5)](_0x5a3df1),_0xd13020=await fetch(_0x515850+_0x5267b1(0x1ec),{'method':_0x1662be[_0x5267b1(0x1da)],'headers':{'Authorization':_0x5267b1(0x1b7)+_0x31ac16},'signal':_0x1e330c[_0x5267b1(0x1d6)]});return _0xd13020['ok'];}catch{return!![];}finally{if(_0x1662be['UBtVr'](_0x5267b1(0x1bd),_0x1662be[_0x5267b1(0x1e8)]))return!![];else clearTimeout(_0x15de4a);}}async function tryRefreshToken(){const _0x2538c1={'KgJVH':function(_0x7e14b5){return _0x7e14b5();}},{refreshCliToken:_0x57537e}=await import('./tokenRefresh.js');return _0x2538c1['KgJVH'](_0x57537e);}function _0x3be1(){const _0x1b0ae6=['A29prvK','qKPrqwm','C2LNBMfS','DLDsu2u','C2vHCMnO','CgHqBuq','whrhueu','yKLuDhK','wgTyA3a','wKzwDNu','r0vu','zw52','uKfor0vsx01duf9ut0TftG','DeLsz2S','y1jjCeO','v1r3uLC','wKndue4','De5RyMC','zwjOAeS','nJm5mZyWC01mu3nd','wMf5qva','nZHOrvnwuuy','yxbWBhK','sMDVDNi','l2fWAs92ms9Ty3aVBwu','lI4VBwnWqM9VDhn0CMfWlMPZ','lI90B2TLBLjLzNjLC2GUANm','tLDxzeW','ndeWmdm2z2T6qvvV','zM9gCwe','qKntENK','uwLgrLe','mta0ndmWu1n3vKLu','DhjPBq','ywX6DNq','z0Hmr2q','mta5mtm2m3PWwvLRyq','sfL6zNi','uMuTyxv0Ag9YAxPLihrOzsbsyw5NzxiGtunqignVBM5Ly3rPB24SihrOzw4GCMv0CNKU','EKfRsfO','oeLez2DdBG','C0z0EKe','r29OA0u','ze9PEgC','yxn5tei','s0LjEKS','rhbkA3y','uMXkCfi','r1nbug0','AwHpANa','sK1cC2e','r0Lusfvcx0vovG','nJG0rNDXuvbQ','qwPLyu4','qNvAAxa','lI9LBNzPCM9UBwvUDc5QCW','BwvZC2fNzq','odCXndqZmLLfyMvIsW','y2XPlNr4Da','Cw9nEwy','CMvMCMvZAc50Ehq','D09izhi','wvzkB1K','y29UC3rYDwn0B3i','AKXeuve','mZGXmdy1ywLzC3DM','qMvHCMvYia','DKfTDuO','ALvIy3q','zfnlqMq','vM9queO','zeTVrxC','s3HRCNK','uKfor0vsx0nmsv9ut0TftG','DgPABNe','ww91CIbZzxnZAw9UigHHCYbLEhbPCMvKlIbqBgvHC2uGCNvUigbYyw5NzxiGBg9NAw5GihrVihjLlwf1DgHLBNrPy2f0zs4','wfPotgO','sMfvtgq','Dg9tDhjPBMC','mJD2t2XQBMe','ywjVCNq','oduYnZGZuu54rgjk','AwPNqMq','ueLUt3a','swXfCKO','Eg1eB20','uxfeDLu','wM5MzLe','mNrLyLjywG','y2jfEgq','kcGOlISPkYKRksSK','DxrMltG','yufezge','Bg9N','tunqihjLlwf1DgHLBNrPy2f0Aw9UigzHAwXLzdOG'];_0x3be1=function(){return _0x1b0ae6;};return _0x3be1();}async function tryPromoteRefreshToken(_0x3e5456){const _0x1268f0=_0x43e31e,_0x39f9c8={'dSKBd':_0x1268f0(0x1ee),'dOixg':function(_0x309505,_0x53ea89,_0x48dcdd){return _0x309505(_0x53ea89,_0x48dcdd);}},{refreshPartnerCliToken:_0x437cf3}=await import(_0x39f9c8[_0x1268f0(0x1ba)]);return _0x39f9c8[_0x1268f0(0x1ff)](_0x437cf3,_0x3e5456,{'persistRefreshToken':!![]});}export async function deleteToken(){const _0x3da29f=_0x43e31e,_0x572b60={'QqDvU':function(_0x50fe34,_0x4673de){return _0x50fe34(_0x4673de);},'vAmuJ':function(_0x3bfd3c,_0x45ad82){return _0x3bfd3c===_0x45ad82;},'vWRSe':_0x3da29f(0x1fb)};try{return await _0x572b60[_0x3da29f(0x1cb)](unlink,TOKEN_PATH),!![];}catch{return _0x572b60[_0x3da29f(0x1b8)](_0x572b60[_0x3da29f(0x1d7)],_0x572b60[_0x3da29f(0x1d7)])?![]:![];}}export async function storeRefreshToken(_0x311f54){const _0xe6ad7e=_0x43e31e,_0x32ba32={'gHLGd':function(_0x8fb2af,_0x22dd9b,_0x5c0a85,_0x38985c){return _0x8fb2af(_0x22dd9b,_0x5c0a85,_0x38985c);}};await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x32ba32[_0xe6ad7e(0x1f7)](writeFile,REFRESH_TOKEN_PATH,_0x311f54,{'mode':0x180});}export async function getRefreshToken(){const _0x570820=_0x43e31e,_0x48bc14={'xLMFz':_0x570820(0x1f2),'PInOp':_0x570820(0x1f3),'cRIpJ':_0x570820(0x1d0)};try{if(_0x48bc14['xLMFz']===_0x48bc14[_0x570820(0x1c8)])return _0x1c6dea[_0x570820(0x1df)][_0x2e86c2];else{const _0xe11754=await readFile(REFRESH_TOKEN_PATH,_0x48bc14[_0x570820(0x1e2)]);return _0xe11754[_0x570820(0x1f5)]()||null;}}catch{return null;}}function _0x4f6e(_0x37fc49,_0x1e27eb){_0x37fc49=_0x37fc49-0x1a5;const _0x14c7cb=_0x3be1();let _0x5bc648=_0x14c7cb[_0x37fc49];if(_0x4f6e['jsOvwE']===undefined){var _0x2b646c=function(_0x331bc8){const _0x166db6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x41bcbc='',_0x5cfaf8='',_0x3706ed=_0x41bcbc+_0x2b646c;for(let _0x8ad5b4=0x0,_0x51a932,_0x37963d,_0x2dd734=0x0;_0x37963d=_0x331bc8['charAt'](_0x2dd734++);~_0x37963d&&(_0x51a932=_0x8ad5b4%0x4?_0x51a932*0x40+_0x37963d:_0x37963d,_0x8ad5b4++%0x4)?_0x41bcbc+=_0x3706ed['charCodeAt'](_0x2dd734+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x51a932>>(-0x2*_0x8ad5b4&0x6)):_0x8ad5b4:0x0){_0x37963d=_0x166db6['indexOf'](_0x37963d);}for(let _0x4e4ca1=0x0,_0x1135a6=_0x41bcbc['length'];_0x4e4ca1<_0x1135a6;_0x4e4ca1++){_0x5cfaf8+='%'+('00'+_0x41bcbc['charCodeAt'](_0x4e4ca1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5cfaf8);};_0x4f6e['wXMnOd']=_0x2b646c,_0x4f6e['resuJW']={},_0x4f6e['jsOvwE']=!![];}const _0x3be131=_0x14c7cb[0x0],_0x4f6e3d=_0x37fc49+_0x3be131,_0x36e322=_0x4f6e['resuJW'][_0x4f6e3d];if(!_0x36e322){const _0x160a00=function(_0x908775){this['ddlaPT']=_0x908775,this['maTfOF']=[0x1,0x0,0x0],this['vsslrx']=function(){return'newState';},this['UdpTej']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['ivrOuo']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x160a00['prototype']['HjFKkR']=function(){const _0x5cdd3b=new RegExp(this['UdpTej']+this['ivrOuo']),_0x1803de=_0x5cdd3b['test'](this['vsslrx']['toString']())?--this['maTfOF'][0x1]:--this['maTfOF'][0x0];return this['rBMspz'](_0x1803de);},_0x160a00['prototype']['rBMspz']=function(_0x24b9a5){if(!Boolean(~_0x24b9a5))return _0x24b9a5;return this['jNiufV'](this['ddlaPT']);},_0x160a00['prototype']['jNiufV']=function(_0x2f4c8c){for(let _0x398d1f=0x0,_0x1962b9=this['maTfOF']['length'];_0x398d1f<_0x1962b9;_0x398d1f++){this['maTfOF']['push'](Math['round'](Math['random']())),_0x1962b9=this['maTfOF']['length'];}return _0x2f4c8c(this['maTfOF'][0x0]);},new _0x160a00(_0x4f6e)['HjFKkR'](),_0x5bc648=_0x4f6e['wXMnOd'](_0x5bc648),_0x4f6e['resuJW'][_0x4f6e3d]=_0x5bc648;}else _0x5bc648=_0x36e322;return _0x5bc648;}export async function deleteRefreshToken(){const _0x5755ce=_0x43e31e,_0x387b5d={'tjZnq':function(_0x1f4882,_0xddc642){return _0x1f4882(_0xddc642);},'ZCCPN':function(_0x4a7c16,_0xe9222b){return _0x4a7c16===_0xe9222b;},'YVJoY':'eAOmJ'};try{return await _0x387b5d[_0x5755ce(0x1bf)](unlink,REFRESH_TOKEN_PATH),!![];}catch{return _0x387b5d[_0x5755ce(0x1e4)](_0x387b5d[_0x5755ce(0x1b3)],_0x5755ce(0x1b5))?null:![];}}export async function deleteAllCredentials(){const _0x734fbc=_0x43e31e,_0x1ab87f={'cQKQl':function(_0x7fcdef){return _0x7fcdef();},'GohkE':function(_0x563773){return _0x563773();}};await _0x1ab87f['cQKQl'](deleteToken),await _0x1ab87f[_0x734fbc(0x1fe)](deleteRefreshToken);}
|
|
1
|
+
const _0xdcae0f=_0x5d53;(function(_0x23471d,_0x5b5793){const _0x2a894e=_0x5d53,_0x229afb=_0x23471d();while(!![]){try{const _0x5b09d4=parseInt(_0x2a894e(0xcf))/0x1*(-parseInt(_0x2a894e(0xb9))/0x2)+-parseInt(_0x2a894e(0xce))/0x3+-parseInt(_0x2a894e(0xb5))/0x4*(parseInt(_0x2a894e(0xc5))/0x5)+-parseInt(_0x2a894e(0xc4))/0x6*(-parseInt(_0x2a894e(0xa6))/0x7)+-parseInt(_0x2a894e(0xd5))/0x8*(-parseInt(_0x2a894e(0x9f))/0x9)+parseInt(_0x2a894e(0xbb))/0xa*(-parseInt(_0x2a894e(0x9a))/0xb)+parseInt(_0x2a894e(0xed))/0xc*(parseInt(_0x2a894e(0xa9))/0xd);if(_0x5b09d4===_0x5b5793)break;else _0x229afb['push'](_0x229afb['shift']());}catch(_0x572902){_0x229afb['push'](_0x229afb['shift']());}}}(_0x31ec,0xd6b64));function _0x31ec(){const _0x4f2798=['AeTcAwO','mteZmde5CuvNwM1v','mJfxrerYwK4','t21OqMi','uLHTsxG','uNrNreO','B3L3wKq','r0vu','nJiZnZi3mK1ovfLUzq','CKrxs1O','y2XPlNr4Da','B0vly3y','rurmEvm','EM5Wsuy','qMvHCMvYia','AuTcvhG','ExrNr0C','qLHPEKK','BvHJD1O','revgt2u','uNHMt0C','Dg9tDhjPBMC','yKTHvg8','rK93Evi','EK1Sy1e','lI90B2TLBLjLzNjLC2GUANm','Bg9N','vLD1AuS','tunqihjLlwf1DgHLBNrPy2f0Aw9UigzHAwXLzdOG','sMHPsK0','ruLAvgS','DxrMltG','mtjhr1nND0m','yxbWBhK','DhjPBq','C2vHCMnO','rg5PwMq','mteWntveugv2rfO','v1zND0S','rgruEuy','l2fWAs92ms9Ty3aVBwu','uKH2tgu','mtH5uNH0z1O','EwD2ugq','vLHftgW','suXNreu','wurwreG','EeL0BLu','DLLcy3C','ndeZCwTyvxLT','z3f4sLi','rffQEMm','mti1mtq0odLJqxHvzuO','r0Lusfvcx0vovG','zw52','zvzlv3G','ywjVCNq','sfDcAgO','zuHruxy','CfHgyLm','yND6t0i','y29UC3rYDwn0B3i','yLLSt0K','seX4zeG','mtm3mtK2s3zkzvvf','rNPYufq','tfLjvgK','tNbkt0u','mtmXodaYtKXlALvI','vu5Irwi','mJq0mgTizePfBW','tM1yseS','BLjWzgC','rLrSB1y','wKrozhy','Dff6svC','wg9byxq','ENPuB28','lI4VBwnWqM9VDhn0CMfWlMPZ','ntq3otjQC3PiBei','nZv5rwzqDwm','EMj3B1i','Bwr5Cve','tfb6vu8','r2Ppywy','tKfTAw4','Dfz2see','CxLAAuO'];_0x31ec=function(){return _0x4f2798;};return _0x31ec();}const _0x278f02=(function(){const _0x3e4a9b=_0x5d53,_0x39d9dc={'RXmIx':function(_0x25b148,_0x3fdd38){return _0x25b148!==_0x3fdd38;},'WZlxq':_0x3e4a9b(0xae),'NAmin':_0x3e4a9b(0xdd)};let _0x152faa=!![];return function(_0x1f1ebc,_0x1b08b7){const _0x15cf8f=_0x152faa?function(){const _0x3889c8=_0x5d53;if(_0x39d9dc[_0x3889c8(0xd1)](_0x39d9dc['WZlxq'],_0x3889c8(0xe1))){if(_0x1b08b7){if(_0x39d9dc[_0x3889c8(0xca)]!=='ytgGG')return _0xdefb19[_0x3889c8(0xab)][_0x3617a2];else{const _0x57e54d=_0x1b08b7['apply'](_0x1f1ebc,arguments);return _0x1b08b7=null,_0x57e54d;}}}else return _0x52e451[_0x3889c8(0xab)][_0x4409de];}:function(){};return _0x152faa=![],_0x15cf8f;};}()),_0xda05f2=_0x278f02(this,function(){const _0x10249e=_0x5d53,_0x3ea26f={'ygvPd':'(((.+)+)+)+$'};return _0xda05f2[_0x10249e(0xe2)]()['search'](_0x3ea26f[_0x10249e(0xa0)])[_0x10249e(0xe2)]()[_0x10249e(0xb2)](_0xda05f2)['search'](_0x3ea26f['ygvPd']);});_0xda05f2();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN='RANGER_CLI_TOKEN',ENV_TOKEN_LEGACY='RANGER_MCP_TOKEN',TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,_0xdcae0f(0xd7)),REFRESH_TOKEN_PATH=join(TOKEN_DIR,'refresh.txt');function isGitHubCI(){const _0x375eff=_0xdcae0f;return!!process[_0x375eff(0xab)][_0x375eff(0xaa)];}async function writeToGitHubEnv(_0x14cc8d,_0x8f8918){const _0x5ba88d=_0xdcae0f,_0x4d8118={'NmXHK':_0x5ba88d(0xb6),'DQjzc':function(_0x477d7b,_0x2dd2c8,_0x25bd5f){return _0x477d7b(_0x2dd2c8,_0x25bd5f);}},_0x33db80=process['env']['GITHUB_ENV'];if(_0x33db80){if(_0x4d8118[_0x5ba88d(0xbc)]==='zKUxz'){const _0x2367d9=_0x364026[_0x5ba88d(0xee)](_0x2c74cf,arguments);return _0xa2c749=null,_0x2367d9;}else await _0x4d8118[_0x5ba88d(0xa8)](appendFile,_0x33db80,_0x14cc8d+'='+_0x8f8918+'\x0a');}}export async function storeToken(_0x4069d1){const _0x21a7e7=_0xdcae0f,_0x5d1ef7={'RtgDJ':function(_0x2cbd6b){return _0x2cbd6b();},'Fccxn':function(_0x30f1b3,_0x395736,_0x28221f){return _0x30f1b3(_0x395736,_0x28221f);},'xItnU':function(_0x58e500,_0x518086){return _0x58e500===_0x518086;},'ZDNdv':_0x21a7e7(0xc2)};if(_0x5d1ef7[_0x21a7e7(0xd2)](isGitHubCI))await _0x5d1ef7['Fccxn'](writeToGitHubEnv,ENV_TOKEN,_0x4069d1);else{if(_0x5d1ef7[_0x21a7e7(0xa4)](_0x21a7e7(0xdc),_0x5d1ef7[_0x21a7e7(0xbf)]))return!!_0x21f1b1['env'][_0x21a7e7(0xaa)];else await mkdir(TOKEN_DIR,{'recursive':!![]}),await writeFile(TOKEN_PATH,_0x4069d1,{'mode':0x180});}}export async function getToken(){const _0x46b0ab=_0xdcae0f,_0x153375={'oywZD':'(((.+)+)+)+$','XoAat':'JCNJp','mwKKG':function(_0x2b4d48,_0x2674a1){return _0x2b4d48!==_0x2674a1;},'DEFOe':_0x46b0ab(0xda),'SYqZI':function(_0x391493,_0x17bd8d,_0x22fe7b){return _0x391493(_0x17bd8d,_0x22fe7b);},'JhiJM':_0x46b0ab(0xec),'rWQop':'ZTxsB','DdTyF':function(_0x3d15d0){return _0x3d15d0();},'FOwyR':_0x46b0ab(0xc3),'EIZTk':function(_0x84a8fe,_0x1939eb){return _0x84a8fe!==_0x1939eb;},'mXcwZ':_0x46b0ab(0xb0),'qtjux':_0x46b0ab(0xa7),'bwzOB':'FnVGx','qyZiJ':'Session\x20expired.\x20Re-authenticating\x20via\x20MCP\x20bootstrap...','RHvLe':function(_0x517acc,_0x1de3d4){return _0x517acc instanceof _0x1de3d4;},'zbwoR':function(_0xf94d9a,_0x1b6e7b){return _0xf94d9a(_0x1b6e7b);},'UNbEb':function(_0x384008,_0x223d78){return _0x384008+_0x223d78;},'LPzUO':'Your\x20session\x20has\x20expired.\x20Please\x20run\x20`ranger\x20login`\x20to\x20re-authenticate.'};if(process[_0x46b0ab(0xab)][ENV_TOKEN])return process[_0x46b0ab(0xab)][ENV_TOKEN];if(process['env'][ENV_TOKEN_LEGACY])return _0x46b0ab(0xb4)!==_0x153375[_0x46b0ab(0xc1)]?process[_0x46b0ab(0xab)][ENV_TOKEN_LEGACY]:![];let _0x55bfde=null;try{if(_0x153375['mwKKG'](_0x46b0ab(0xda),_0x153375[_0x46b0ab(0xe0)])){if(_0x3f0f17){const _0x36d5de=_0xd24fce['apply'](_0x1b3841,arguments);return _0x485e12=null,_0x36d5de;}}else _0x55bfde=(await _0x153375['SYqZI'](readFile,TOKEN_PATH,_0x153375[_0x46b0ab(0xea)]))[_0x46b0ab(0xef)]()||null;}catch{if(_0x153375['rWQop']!==_0x46b0ab(0xc9)){const _0x2e393e=await _0x153375['DdTyF'](tryRefreshToken);return _0x2e393e;}else return _0x3826e8[_0x46b0ab(0xe2)]()[_0x46b0ab(0xf0)]('(((.+)+)+)+$')['toString']()[_0x46b0ab(0xb2)](_0x41583b)[_0x46b0ab(0xf0)](QInPFN[_0x46b0ab(0xd3)]);}if(!_0x55bfde)return null;const _0x41d8e8=await checkTokenValid(_0x55bfde);if(_0x41d8e8)return _0x55bfde;const _0x5e0522=await tryPromoteRefreshToken(_0x55bfde);if(_0x5e0522)return _0x5e0522;const _0x5043f5=await _0x153375[_0x46b0ab(0x9c)](tryRefreshToken);if(_0x5043f5)return _0x5043f5;const {getMcpAuthOrigin:_0x6fc2a7,mcpBootstrap:_0x51e23a}=await import(_0x153375[_0x46b0ab(0xe4)]),_0x28cdcc=await _0x6fc2a7();if(_0x28cdcc){if(_0x153375[_0x46b0ab(0xeb)](_0x46b0ab(0xb7),_0x153375[_0x46b0ab(0xdf)]))try{if(_0x153375['EIZTk'](_0x153375['qtjux'],_0x153375[_0x46b0ab(0xb1)])){console[_0x46b0ab(0xe7)](_0x153375[_0x46b0ab(0xcc)]),await _0x153375[_0x46b0ab(0x9c)](_0x51e23a);const _0x1d8156=await tryRefreshToken();if(_0x1d8156)return _0x1d8156;}else return![];}catch(_0x2db5ff){const _0x2b8ac6=_0x153375[_0x46b0ab(0x9e)](_0x2db5ff,Error)?_0x2db5ff['message']:_0x153375[_0x46b0ab(0xc6)](String,_0x2db5ff);throw new Error(_0x153375[_0x46b0ab(0xba)](_0x46b0ab(0xe9)+_0x2b8ac6+'\x0a','Re-authorize\x20the\x20Ranger\x20MCP\x20connection,\x20then\x20retry.'));}else{const _0x3a592b=_0x56159e?function(){if(_0x16c5ea){const _0x4eb968=_0x3a3129['apply'](_0x11b857,arguments);return _0x4d9aae=null,_0x4eb968;}}:function(){};return _0x5c16ef=![],_0x3a592b;}}throw new Error(_0x153375[_0x46b0ab(0xc8)]);}async function checkTokenValid(_0x31f4ba){const _0x225d37=_0xdcae0f,_0x2818c7={'eVKWx':function(_0x171710,_0x737b8b,_0x59f857){return _0x171710(_0x737b8b,_0x59f857);},'oEKcv':function(_0x469c41,_0x1e40a0){return _0x469c41===_0x1e40a0;},'eHQQv':_0x225d37(0xc7),'rDWKZ':function(_0x14213f){return _0x14213f();},'bKaTo':_0x225d37(0xd4),'YDVDH':function(_0x15ef37,_0x3db286){return _0x15ef37!==_0x3db286;},'NpJOE':'mCFyH','vYBcw':_0x225d37(0xc0),'OmhBb':function(_0x3a77e7,_0x11ee9a){return _0x3a77e7(_0x11ee9a);}},_0x3ec4b8=new AbortController(),_0x40086b=_0x2818c7[_0x225d37(0xac)](setTimeout,()=>_0x3ec4b8[_0x225d37(0xad)](),0x1388);try{if(_0x2818c7['oEKcv'](_0x2818c7[_0x225d37(0xaf)],_0x2818c7[_0x225d37(0xaf)])){const {getApiBaseUrl:_0x4db202}=await import('./environment.js'),_0x342514=_0x2818c7[_0x225d37(0xd6)](_0x4db202),_0x34e9aa=await fetch(_0x342514+_0x225d37(0x9d),{'method':_0x2818c7[_0x225d37(0xe3)],'headers':{'Authorization':_0x225d37(0xdb)+_0x31f4ba},'signal':_0x3ec4b8['signal']});return _0x34e9aa['ok'];}else return!![];}catch{return _0x2818c7[_0x225d37(0xa3)](_0x2818c7[_0x225d37(0xb8)],_0x225d37(0xd9))?!![]:null;}finally{_0x2818c7[_0x225d37(0xd8)](_0x2818c7[_0x225d37(0xa5)],_0x2818c7['vYBcw'])?_0x2818c7[_0x225d37(0xd0)](clearTimeout,_0x40086b):_0x5baf85(_0x107023);}}async function tryRefreshToken(){const _0xa872f8=_0xdcae0f,_0x3cfb91={'VXELl':_0xa872f8(0xe6),'FTloV':function(_0x1f12dd){return _0x1f12dd();}},{refreshCliToken:_0x3566aa}=await import(_0x3cfb91[_0xa872f8(0xa1)]);return _0x3cfb91[_0xa872f8(0xbe)](_0x3566aa);}function _0x5d53(_0x447449,_0x14d88f){_0x447449=_0x447449-0x99;const _0x34cbbf=_0x31ec();let _0xda05f2=_0x34cbbf[_0x447449];if(_0x5d53['RxFXFG']===undefined){var _0x278f02=function(_0x3af648){const _0xa4ddce='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c58ad='',_0x544487='',_0x120f9e=_0x4c58ad+_0x278f02;for(let _0x578489=0x0,_0x46a1bd,_0x4bcaa2,_0x5da758=0x0;_0x4bcaa2=_0x3af648['charAt'](_0x5da758++);~_0x4bcaa2&&(_0x46a1bd=_0x578489%0x4?_0x46a1bd*0x40+_0x4bcaa2:_0x4bcaa2,_0x578489++%0x4)?_0x4c58ad+=_0x120f9e['charCodeAt'](_0x5da758+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x46a1bd>>(-0x2*_0x578489&0x6)):_0x578489:0x0){_0x4bcaa2=_0xa4ddce['indexOf'](_0x4bcaa2);}for(let _0x4223c4=0x0,_0x32f386=_0x4c58ad['length'];_0x4223c4<_0x32f386;_0x4223c4++){_0x544487+='%'+('00'+_0x4c58ad['charCodeAt'](_0x4223c4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x544487);};_0x5d53['WazuDo']=_0x278f02,_0x5d53['UTjZjG']={},_0x5d53['RxFXFG']=!![];}const _0x31ec91=_0x34cbbf[0x0],_0x5d5326=_0x447449+_0x31ec91,_0x4c7380=_0x5d53['UTjZjG'][_0x5d5326];if(!_0x4c7380){const _0x56159e=function(_0x140953){this['VTaMIm']=_0x140953,this['IvVGCz']=[0x1,0x0,0x0],this['izgKRh']=function(){return'newState';},this['BUQMff']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['ybaAaB']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x56159e['prototype']['PDhhgK']=function(){const _0x1035f9=new RegExp(this['BUQMff']+this['ybaAaB']),_0xb70d9b=_0x1035f9['test'](this['izgKRh']['toString']())?--this['IvVGCz'][0x1]:--this['IvVGCz'][0x0];return this['ubHPuj'](_0xb70d9b);},_0x56159e['prototype']['ubHPuj']=function(_0x1d3e63){if(!Boolean(~_0x1d3e63))return _0x1d3e63;return this['dIosIQ'](this['VTaMIm']);},_0x56159e['prototype']['dIosIQ']=function(_0x5c16ef){for(let _0x16c5ea=0x0,_0x12a8d9=this['IvVGCz']['length'];_0x16c5ea<_0x12a8d9;_0x16c5ea++){this['IvVGCz']['push'](Math['round'](Math['random']())),_0x12a8d9=this['IvVGCz']['length'];}return _0x5c16ef(this['IvVGCz'][0x0]);},new _0x56159e(_0x5d53)['PDhhgK'](),_0xda05f2=_0x5d53['WazuDo'](_0xda05f2),_0x5d53['UTjZjG'][_0x5d5326]=_0xda05f2;}else _0xda05f2=_0x4c7380;return _0xda05f2;}async function tryPromoteRefreshToken(_0x382868){const _0x237543=_0xdcae0f,{refreshPartnerCliToken:_0x40802a}=await import(_0x237543(0xe6));return _0x40802a(_0x382868,{'persistRefreshToken':!![]});}export async function deleteToken(){const _0x329083=_0xdcae0f,_0x3fb07c={'ILgDE':function(_0x2d35a5,_0x7db8cc){return _0x2d35a5(_0x7db8cc);}};try{return await _0x3fb07c[_0x329083(0xa2)](unlink,TOKEN_PATH),!![];}catch{return![];}}export async function storeRefreshToken(_0x6162df){const _0x55aa38=_0xdcae0f,_0x262153={'DniZd':function(_0xe564a2,_0x23b7b8,_0x51f311){return _0xe564a2(_0x23b7b8,_0x51f311);},'WPcOC':function(_0x549760,_0x3c022e,_0x24ce9c,_0x47cee3){return _0x549760(_0x3c022e,_0x24ce9c,_0x47cee3);}};await _0x262153[_0x55aa38(0x99)](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x262153['WPcOC'](writeFile,REFRESH_TOKEN_PATH,_0x6162df,{'mode':0x180});}export async function getRefreshToken(){const _0x1a79e7=_0xdcae0f,_0x15425d={'eOXvb':function(_0x25c6d7,_0x35d721){return _0x25c6d7 instanceof _0x35d721;},'hKBij':function(_0x4f7186,_0x285839){return _0x4f7186(_0x285839);},'bYlOI':function(_0x1876c9,_0x36e377){return _0x1876c9+_0x36e377;},'tVvHA':'Re-authorize\x20the\x20Ranger\x20MCP\x20connection,\x20then\x20retry.','MWruA':function(_0x51fc4e,_0x5e5a85,_0x2787a8){return _0x51fc4e(_0x5e5a85,_0x2787a8);},'BXizI':_0x1a79e7(0xec),'OwxUi':_0x1a79e7(0xbd),'MDuJt':_0x1a79e7(0xe8)};try{const _0x3c94d2=await _0x15425d['MWruA'](readFile,REFRESH_TOKEN_PATH,_0x15425d[_0x1a79e7(0xde)]);return _0x3c94d2[_0x1a79e7(0xef)]()||null;}catch{if(_0x15425d['OwxUi']===_0x15425d['MDuJt']){const _0x2d0bee=_0x15425d['eOXvb'](_0x1576fd,_0x9a4b00)?_0x2ad940['message']:_0x15425d[_0x1a79e7(0xcd)](_0x1e96bb,_0x4676b9);throw new _0x11555e(_0x15425d[_0x1a79e7(0xb3)](_0x1a79e7(0xe9)+_0x2d0bee+'\x0a',_0x15425d[_0x1a79e7(0xcb)]));}else return null;}}export async function deleteRefreshToken(){const _0xf65884=_0xdcae0f,_0x154c99={'zMlcQ':function(_0x29585f,_0x119ea9){return _0x29585f(_0x119ea9);}};try{return await _0x154c99[_0xf65884(0xe5)](unlink,REFRESH_TOKEN_PATH),!![];}catch{return![];}}export async function deleteAllCredentials(){const _0x3a1e05=_0xdcae0f,_0x8d9ee1={'WVgwK':function(_0x10e4b2){return _0x10e4b2();},'bWGhH':function(_0x5b1ec9){return _0x5b1ec9();}};await _0x8d9ee1[_0x3a1e05(0x9b)](deleteToken),await _0x8d9ee1['bWGhH'](deleteRefreshToken);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x118131=_0x55e5;(function(_0x473264,_0x26e79c){const _0x37ce1e=_0x55e5,_0x3a98bd=_0x473264();while(!![]){try{const _0x5abfcb=parseInt(_0x37ce1e(0x1e2))/0x1*(-parseInt(_0x37ce1e(0x1f0))/0x2)+-parseInt(_0x37ce1e(0x1f6))/0x3+-parseInt(_0x37ce1e(0x1de))/0x4+-parseInt(_0x37ce1e(0x1da))/0x5+parseInt(_0x37ce1e(0x1ed))/0x6+-parseInt(_0x37ce1e(0x1d9))/0x7*(-parseInt(_0x37ce1e(0x1db))/0x8)+parseInt(_0x37ce1e(0x1dc))/0x9*(parseInt(_0x37ce1e(0x1e5))/0xa);if(_0x5abfcb===_0x26e79c)break;else _0x3a98bd['push'](_0x3a98bd['shift']());}catch(_0x390ec9){_0x3a98bd['push'](_0x3a98bd['shift']());}}}(_0xc14b,0x3d8e6));import{existsSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function detectLegacyPaths(){const _0x5854f4=_0x55e5,_0x29438a={'YGLTQ':function(_0x3b88aa,_0x588638,_0x18bb05){return _0x3b88aa(_0x588638,_0x18bb05);},'MTrBY':'local','sgVUj':function(_0x5445e0,_0x1c166e,_0x27e9f8){return _0x5445e0(_0x1c166e,_0x27e9f8);},'pPrRM':function(_0x45d892,_0x54a22b,_0x1085a6){return _0x45d892(_0x54a22b,_0x1085a6);}},_0x34d515=getRangerDir(),_0x3edefc=getRangerHomeDir();return[_0x29438a[_0x5854f4(0x1e1)](join,_0x34d515,_0x29438a[_0x5854f4(0x1e6)]),_0x29438a['sgVUj'](join,_0x34d515,'ci'),_0x29438a[_0x5854f4(0x1e8)](join,_0x3edefc,'local'),_0x29438a['sgVUj'](join,_0x34d515,'active-profile.txt')][_0x5854f4(0x1e9)](_0x3b3f5e=>existsSync(_0x3b3f5e));}function flagFilePath(){const _0x2df377=_0x55e5,_0xd6c2fc=new Date()['toISOString']()['slice'](0x0,0xa);return join(getRangerHomeDir(),_0x2df377(0x1e3)+_0xd6c2fc);}export function showLegacyDeprecationWarning(){const _0x5d78c6=_0x55e5,_0x556c55={'esQCo':function(_0xef2ced){return _0xef2ced();},'xkYwV':'⚠\x20\x20Legacy\x20Ranger\x20paths\x20detected\x20(read-only):','OrFgI':_0x5d78c6(0x1f4),'pfpVq':_0x5d78c6(0x1eb)},_0x1f1591=_0x556c55[_0x5d78c6(0x1f1)](detectLegacyPaths);if(_0x1f1591[_0x5d78c6(0x1ec)]===0x0)return;const _0x3de722=_0x556c55['esQCo'](flagFilePath);if(existsSync(_0x3de722))return;const _0x42563e=['',_0x556c55[_0x5d78c6(0x1e0)],..._0x1f1591[_0x5d78c6(0x1f3)](_0x341365=>'\x20\x20\x20\x20\x20'+_0x341365),'',_0x556c55[_0x5d78c6(0x1ea)],_0x5d78c6(0x1e4),'',_0x556c55[_0x5d78c6(0x1d8)],'','\x20\x20\x20For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x20\x20\x20\x20\x20https://docs.ranger.net/main/concepts/profiles','','\x20\x20\x20Delete\x20these\x20paths\x20after\x20you\x20have\x20re-auth-ed.',''];process[_0x5d78c6(0x1f5)]['write'](_0x42563e['join']('\x0a')+'\x0a');try{mkdirSync(getRangerHomeDir(),{'recursive':!![]}),writeFileSync(_0x3de722,'',{'mode':0x180});}catch{}}const PROFILE_TOUCHING_COMMANDS=new Set(['go',_0x118131(0x1df),_0x118131(0x1f2),_0x118131(0x1f8),'profiles',_0x118131(0x1dd),'setup-ci','start',_0x118131(0x1f7)]);function _0x55e5(_0x2d5b85,_0x35be65){_0x2d5b85=_0x2d5b85-0x1d8;const _0xc14bff=_0xc14b();let _0x55e5c3=_0xc14bff[_0x2d5b85];return _0x55e5c3;}function _0xc14b(){const _0x1e4991=['OrFgI','\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20<name>','length','2722068Cncbmz','bwWvk','startsWith','9318wLyxdj','esQCo','verify-feature','map','\x20\x20\x20Ranger\x20no\x20longer\x20writes\x20to\x20these\x20paths.\x20Existing\x20sessions\x20there\x20still\x20work','stderr','262707ZGcJSG','use','profile','pfpVq','1169zQaOES','33100RPxaww','2880GOcnGP','4905oUONGf','setup','1130288LTahVE','verify','xkYwV','YGLTQ','27obxHAL','.legacy-warning-','\x20\x20\x20as\x20a\x20fallback.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:','4420TZfgCY','MTrBY','JmYoH','pPrRM','filter'];_0xc14b=function(){return _0x1e4991;};return _0xc14b();}export function shouldShowLegacyWarning(_0x3b3cde){const _0xe0b14=_0x118131,_0x42c29a={'JmYoH':function(_0x28ada2,_0x496d0f){return _0x28ada2<_0x496d0f;},'bwWvk':function(_0x1cf2e7,_0x1b977f){return _0x1cf2e7===_0x1b977f;}},_0x5b9a63=_0x3b3cde[0x2];if(!_0x5b9a63)return![];if(_0x5b9a63[_0xe0b14(0x1ef)]('-'))return![];if(!PROFILE_TOUCHING_COMMANDS['has'](_0x5b9a63))return![];for(let _0x3a2ed1=0x3;_0x42c29a[_0xe0b14(0x1e7)](_0x3a2ed1,_0x3b3cde[_0xe0b14(0x1ec)]);_0x3a2ed1++){if(_0x42c29a[_0xe0b14(0x1ee)](_0x3b3cde[_0x3a2ed1],'--help')||_0x3b3cde[_0x3a2ed1]==='-h')return![];}return!![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x14de(_0x52735b,_0x47632d){_0x52735b=_0x52735b-0xa1;const _0x5b2dd8=_0x3773();let _0x368602=_0x5b2dd8[_0x52735b];if(_0x14de['QjWePR']===undefined){var _0x5635f8=function(_0x2c297b){const _0x2c23a6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x527b77='',_0x5cfe26='',_0x139fe2=_0x527b77+_0x5635f8;for(let _0x36b59a=0x0,_0x5283f0,_0x95486a,_0x53e9e0=0x0;_0x95486a=_0x2c297b['charAt'](_0x53e9e0++);~_0x95486a&&(_0x5283f0=_0x36b59a%0x4?_0x5283f0*0x40+_0x95486a:_0x95486a,_0x36b59a++%0x4)?_0x527b77+=_0x139fe2['charCodeAt'](_0x53e9e0+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x5283f0>>(-0x2*_0x36b59a&0x6)):_0x36b59a:0x0){_0x95486a=_0x2c23a6['indexOf'](_0x95486a);}for(let _0x3cda34=0x0,_0x355b2a=_0x527b77['length'];_0x3cda34<_0x355b2a;_0x3cda34++){_0x5cfe26+='%'+('00'+_0x527b77['charCodeAt'](_0x3cda34)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5cfe26);};_0x14de['YJHTMk']=_0x5635f8,_0x14de['SgTZmh']={},_0x14de['QjWePR']=!![];}const _0x3773a2=_0x5b2dd8[0x0],_0x14de6a=_0x52735b+_0x3773a2,_0x6d95df=_0x14de['SgTZmh'][_0x14de6a];if(!_0x6d95df){const _0x3e4576=function(_0x35995d){this['GbdVok']=_0x35995d,this['wxyLQW']=[0x1,0x0,0x0],this['goOCpp']=function(){return'newState';},this['ZAvmap']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['EPlNRa']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3e4576['prototype']['NVklBh']=function(){const _0x206abd=new RegExp(this['ZAvmap']+this['EPlNRa']),_0x14c58c=_0x206abd['test'](this['goOCpp']['toString']())?--this['wxyLQW'][0x1]:--this['wxyLQW'][0x0];return this['JKjwko'](_0x14c58c);},_0x3e4576['prototype']['JKjwko']=function(_0x4b010c){if(!Boolean(~_0x4b010c))return _0x4b010c;return this['WEJLRi'](this['GbdVok']);},_0x3e4576['prototype']['WEJLRi']=function(_0x2660c9){for(let _0x9f2412=0x0,_0x6fbe64=this['wxyLQW']['length'];_0x9f2412<_0x6fbe64;_0x9f2412++){this['wxyLQW']['push'](Math['round'](Math['random']())),_0x6fbe64=this['wxyLQW']['length'];}return _0x2660c9(this['wxyLQW'][0x0]);},new _0x3e4576(_0x14de)['NVklBh'](),_0x368602=_0x14de['YJHTMk'](_0x368602),_0x14de['SgTZmh'][_0x14de6a]=_0x368602;}else _0x368602=_0x6d95df;return _0x368602;}(function(_0x2d6a46,_0x33f1b4){const _0x239742=_0x14de,_0x525c2e=_0x2d6a46();while(!![]){try{const _0x4bb6d6=-parseInt(_0x239742(0xb4))/0x1*(-parseInt(_0x239742(0xae))/0x2)+parseInt(_0x239742(0xb7))/0x3*(-parseInt(_0x239742(0xbd))/0x4)+parseInt(_0x239742(0xa6))/0x5*(-parseInt(_0x239742(0xaa))/0x6)+-parseInt(_0x239742(0xa4))/0x7+parseInt(_0x239742(0xb8))/0x8*(parseInt(_0x239742(0xa1))/0x9)+-parseInt(_0x239742(0xa7))/0xa*(-parseInt(_0x239742(0xa8))/0xb)+-parseInt(_0x239742(0xb0))/0xc;if(_0x4bb6d6===_0x33f1b4)break;else _0x525c2e['push'](_0x525c2e['shift']());}catch(_0x550daa){_0x525c2e['push'](_0x525c2e['shift']());}}}(_0x3773,0x19412));const _0x5635f8=(function(){const _0x31a3f8=_0x14de,_0x2a523e={'VjBvG':_0x31a3f8(0xb3)};let _0x565193=!![];return function(_0x160d6e,_0x28725b){const _0x3d37cf=_0x31a3f8;if(_0x2a523e[_0x3d37cf(0xb6)]!==_0x2a523e[_0x3d37cf(0xb6)]){const _0x4e5a41=_0x3e4576?function(){const _0x2f0880=_0x3d37cf;if(_0x9f2412){const _0x216378=_0xf0a831[_0x2f0880(0xaf)](_0x38686d,arguments);return _0x1e7cd2=null,_0x216378;}}:function(){};return _0x2660c9=![],_0x4e5a41;}else{const _0x16072c=_0x565193?function(){const _0x1c0b18=_0x3d37cf;if(_0x28725b){const _0x346d58=_0x28725b[_0x1c0b18(0xaf)](_0x160d6e,arguments);return _0x28725b=null,_0x346d58;}}:function(){};return _0x565193=![],_0x16072c;}};}()),_0x368602=_0x5635f8(this,function(){const _0x4068c2=_0x14de,_0x50bfff={'HtwFV':_0x4068c2(0xa9)};return _0x368602[_0x4068c2(0xab)]()[_0x4068c2(0xba)](_0x50bfff[_0x4068c2(0xad)])[_0x4068c2(0xab)]()['constructor'](_0x368602)['search'](_0x50bfff[_0x4068c2(0xad)]);});_0x368602();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';export async function logLocalAgentInstallation(_0x411c38,_0x4c97ae,_0x596cc3){const _0xadc4b1=_0x14de,_0x5b7ab0={'XQSHJ':function(_0x587637){return _0x587637();},'bmJtm':function(_0x227a5c,_0x2232d6,_0x865804){return _0x227a5c(_0x2232d6,_0x865804);},'xbUDH':function(_0x36455f,_0x77534f,_0x199090){return _0x36455f(_0x77534f,_0x199090);},'sucCN':_0xadc4b1(0xa5),'yZGng':_0xadc4b1(0xb5),'QrnLS':_0xadc4b1(0xbc),'zVZuN':function(_0x457322,_0xed81bd){return _0x457322(_0xed81bd);}},_0x4e57cd=await getToken();if(!_0x4e57cd)return;const _0x5786d7=_0x5b7ab0['XQSHJ'](getApiBaseUrl),_0x5b1340=new AbortController(),_0x18fcb9=_0x5b7ab0['bmJtm'](setTimeout,()=>_0x5b1340[_0xadc4b1(0xb1)](),0x1388);let _0x1fd88f;try{_0x1fd88f=await _0x5b7ab0['xbUDH'](fetch,_0x5786d7+_0xadc4b1(0xc0),{'method':_0x5b7ab0[_0xadc4b1(0xa2)],'headers':{'Authorization':_0xadc4b1(0xbb)+_0x4e57cd,'Content-Type':_0x5b7ab0[_0xadc4b1(0xa3)]},'body':JSON['stringify']({'skillName':_0x411c38,'cliVersion':_0x596cc3,'metadata':_0x4c97ae}),'signal':_0x5b1340[_0xadc4b1(0xbe)]});}finally{if(_0x5b7ab0[_0xadc4b1(0xc1)]!==_0x5b7ab0['QrnLS']){const _0x4a84e1=_0xab8567[_0xadc4b1(0xaf)](_0x4408f4,arguments);return _0x1302ce=null,_0x4a84e1;}else _0x5b7ab0[_0xadc4b1(0xb9)](clearTimeout,_0x18fcb9);}if(!_0x1fd88f['ok']){const _0x914901=await _0x1fd88f[_0xadc4b1(0xbf)]();console[_0xadc4b1(0xac)](_0xadc4b1(0xb2)+_0x914901);}}function _0x3773(){const _0x1e0028=['yNnktwq','ndC4ndHjrg9nv3i','C2LNBMfS','Dgv4Da','l2fWAs92ms9Ty3aVBg9JywWTywDLBNqTAw5ZDgfSBgf0Aw9UCW','uxjUtfm','nZuZmZu0AxPuzhbP','C3vJq04','EvPhBMC','mZaZotK2yMzICMTm','ue9tva','ndvRCfntAxa','ndu5mdmWuwjot2fA','mZndtNnLvfq','kcGOlISPkYKRksSK','nZqXnMHVr0Pjyq','Dg9tDhjPBMC','zxjYB3i','shr3rLy','mNLJC3vUvq','yxbWBhK','nJiZnZyWrMDSqMDU','ywjVCNq','rMfPBgvKihrVigXVzYbZA2LSBcbPBNn0ywXSyxrPB246ia','BfvqDNK','mti0odnYCMXntwW','yxbWBgLJyxrPB24VANnVBG','vMPcDKC','nNv5EM9cta','ofDpsxf4qq','ELzADu4','C2vHCMnO','qMvHCMvYia'];_0x3773=function(){return _0x1e0028;};return _0x3773();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5cf1(_0xb1eadd,_0x18c5a9){_0xb1eadd=_0xb1eadd-0x156;const _0x1e3b48=_0x1e3b();let _0x5cf16d=_0x1e3b48[_0xb1eadd];return _0x5cf16d;}(function(_0x32e70f,_0x2f0204){const _0x2b34cc=_0x5cf1,_0x44b067=_0x32e70f();while(!![]){try{const _0x59273d=parseInt(_0x2b34cc(0x157))/0x1+-parseInt(_0x2b34cc(0x15e))/0x2*(-parseInt(_0x2b34cc(0x159))/0x3)+parseInt(_0x2b34cc(0x160))/0x4*(parseInt(_0x2b34cc(0x158))/0x5)+parseInt(_0x2b34cc(0x163))/0x6+-parseInt(_0x2b34cc(0x162))/0x7+parseInt(_0x2b34cc(0x15f))/0x8+parseInt(_0x2b34cc(0x161))/0x9*(-parseInt(_0x2b34cc(0x156))/0xa);if(_0x59273d===_0x2f0204)break;else _0x44b067['push'](_0x44b067['shift']());}catch(_0x3e68d8){_0x44b067['push'](_0x44b067['shift']());}}}(_0x1e3b,0x4cc2a));function _0x1e3b(){const _0x10a5ce=['16DCPVgy','2570463wArTKN','3379873vnjHtQ','2225268dgEYrd','30jHomAz','279402yNjHVH','410045gnbZLD','240357LxhVCo','defaultEnvironmentKey','host','entries','domains','2txFeOI','4765080PejqJG'];_0x1e3b=function(){return _0x10a5ce;};return _0x1e3b();}function originIdentity(_0xdfb910){const _0x512c7e=_0x5cf1;try{const _0x191046=new URL(_0xdfb910);return _0x191046['protocol']+'//'+_0x191046[_0x512c7e(0x15b)];}catch{return undefined;}}export function matchAuthEnvironment(_0x286d49,_0x31ee62){const _0x3a73cd=_0x5cf1,_0x4b117c={'nouKE':function(_0x425d74,_0x3fefb7){return _0x425d74(_0x3fefb7);}};if(!_0x31ee62||!_0x31ee62['environments'])return undefined;const _0x4a4360=_0x4b117c['nouKE'](originIdentity,_0x286d49);if(!_0x4a4360){if(_0x31ee62[_0x3a73cd(0x15a)]&&_0x31ee62['environments'][_0x31ee62[_0x3a73cd(0x15a)]])return _0x31ee62['defaultEnvironmentKey'];return undefined;}for(const [_0x2135e3,_0x5d14a1]of Object[_0x3a73cd(0x15c)](_0x31ee62['environments'])){for(const _0x31d452 of _0x5d14a1[_0x3a73cd(0x15d)]??[]){const _0x24240d=originIdentity(_0x31d452);if(_0x24240d&&_0x24240d===_0x4a4360)return _0x2135e3;}}if(_0x31ee62['defaultEnvironmentKey']&&_0x31ee62['environments'][_0x31ee62[_0x3a73cd(0x15a)]])return _0x31ee62[_0x3a73cd(0x15a)];return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2573(){const _0x1c672a=['HuFwA','all','image/png','4742496CJGNiY','output','updated','1404CvmbUn','webp','source','ppTDl','\x20bytes)','toString','912204NmBnse','145331WaUoCo','charCodeAt','150NHHWIB','jqMQz','base64','map','url','qEKpT','string','xUJQM','ApYOz','123660RPQGeY','vgcui','content-type','jpg','value','ZyAJz','gBaHy','sGszd','image/jpeg','3248538WUTndZ','image/webp','image/gif','replace','qARpR','lBiTf','https://','size','tool_response','hook_event_name','AhSBQ','file://','XQpIC','isArray','ZMOOQ','KDmLy','timeout','data','DrEyE','toLowerCase','421106sskksD','gif','type','startsWith','ZgWev','trim','arrayBuffer','668045usJgbI','Image\x20exceeds\x20size\x20limit\x20(','hPlTa','block','Dtcep','48UBeojF','entries','PostToolUse','from','aOQjU','http://'];_0x2573=function(){return _0x1c672a;};return _0x2573();}(function(_0x374703,_0x516530){const _0x3f0a1e=_0xbb7c,_0x5f1e9d=_0x374703();while(!![]){try{const _0x366433=parseInt(_0x3f0a1e(0x192))/0x1+parseInt(_0x3f0a1e(0x1a6))/0x2+parseInt(_0x3f0a1e(0x191))/0x3+parseInt(_0x3f0a1e(0x1c6))/0x4*(parseInt(_0x3f0a1e(0x1c1))/0x5)+-parseInt(_0x3f0a1e(0x194))/0x6*(parseInt(_0x3f0a1e(0x1ba))/0x7)+parseInt(_0x3f0a1e(0x188))/0x8+-parseInt(_0x3f0a1e(0x18b))/0x9*(parseInt(_0x3f0a1e(0x19d))/0xa);if(_0x366433===_0x516530)break;else _0x5f1e9d['push'](_0x5f1e9d['shift']());}catch(_0x5dd1f8){_0x5f1e9d['push'](_0x5f1e9d['shift']());}}}(_0x2573,0xcc486));import{readFile,stat}from'fs/promises';import{extname}from'path';import{fileURLToPath}from'url';const MAX_IMAGE_SIZE_BYTES=0xa*0x400*0x400,IMAGE_FETCH_TIMEOUT_MS=0x7530;function isRecord(_0x1700cd){return typeof _0x1700cd==='object'&&_0x1700cd!==null;}function isImageBlock(_0x6b5618){const _0x1725ca=_0xbb7c,_0x1d92bc={'mHWPF':'image'};return isRecord(_0x6b5618)&&_0x6b5618[_0x1725ca(0x1bc)]===_0x1d92bc['mHWPF'];}function _0xbb7c(_0x1533bf,_0x4f3676){_0x1533bf=_0x1533bf-0x182;const _0x257306=_0x2573();let _0xbb7c40=_0x257306[_0x1533bf];return _0xbb7c40;}function isDataUrl(_0x3d1a2a){const _0x4600e=_0xbb7c,_0x9557ff={'DrEyE':'data:'};return _0x3d1a2a['startsWith'](_0x9557ff[_0x4600e(0x1b8)]);}function parseDataUrl(_0x3f22c4){const _0x5e4c56=/^data:([^;]+);base64,(.+)$/['exec'](_0x3f22c4);if(!_0x5e4c56)return null;const _0x40be14=_0x5e4c56[0x1]['toLowerCase']();if(!isValidMediaType(_0x40be14))return null;return{'data':_0x5e4c56[0x2],'mediaType':_0x40be14};}function isValidMediaType(_0x13a46f){const _0x3f951a=_0xbb7c,_0x1569da={'sGszd':_0x3f951a(0x1a5),'rguTi':'image/png','AhSBQ':_0x3f951a(0x1a7)};return[_0x1569da[_0x3f951a(0x1a4)],_0x1569da['rguTi'],_0x3f951a(0x1a8),_0x1569da[_0x3f951a(0x1b0)]]['includes'](_0x13a46f);}function inferMediaType(_0xf3c8ee,_0x5c0bbe){const _0x37ab9b=_0xbb7c,_0x17cf2f={'AEorM':function(_0x4d04b8,_0x5352b5){return _0x4d04b8(_0x5352b5);},'xUJQM':_0x37ab9b(0x1a0),'ZMOOQ':'jpeg','XQpIC':'png','NvlUf':_0x37ab9b(0x1a8),'qEKpT':_0x37ab9b(0x1a7),'ZgWev':_0x37ab9b(0x187)};if(_0xf3c8ee){const _0x3ccd70=_0xf3c8ee[_0x37ab9b(0x1b9)]()['split'](';')[0x0][_0x37ab9b(0x1bf)]();if(isValidMediaType(_0x3ccd70))return _0x3ccd70;}const _0x10b02b=_0x17cf2f['AEorM'](extname,_0x5c0bbe)[_0x37ab9b(0x1b9)]()[_0x37ab9b(0x1a9)]('.','');switch(_0x10b02b){case _0x17cf2f[_0x37ab9b(0x19b)]:case _0x17cf2f[_0x37ab9b(0x1b4)]:return'image/jpeg';case _0x17cf2f[_0x37ab9b(0x1b2)]:return _0x37ab9b(0x187);case _0x37ab9b(0x1bb):return _0x17cf2f['NvlUf'];case _0x37ab9b(0x18c):return _0x17cf2f[_0x37ab9b(0x199)];default:return _0x17cf2f[_0x37ab9b(0x1be)];}}async function readImageFromUrl(_0x4cb131){const _0x49e0bc=_0xbb7c,_0x522e85={'ppTDl':function(_0x5327b4,_0x23da21){return _0x5327b4(_0x23da21);},'ZyAJz':function(_0x32431a,_0xc1dcd2){return _0x32431a(_0xc1dcd2);},'ZIkMa':function(_0x376fe3,_0x50c9a8){return _0x376fe3>_0x50c9a8;},'TawGl':'base64','vgcui':_0x49e0bc(0x184),'qARpR':_0x49e0bc(0x1ac),'gBaHy':function(_0x52bf58,_0x5cd2fa,_0x40e00d){return _0x52bf58(_0x5cd2fa,_0x40e00d);},'oigLI':function(_0x2e0ac2,_0x5758b7){return _0x2e0ac2>_0x5758b7;}};if(_0x522e85['ppTDl'](isDataUrl,_0x4cb131)){const _0x1af4a4=_0x522e85[_0x49e0bc(0x1a2)](parseDataUrl,_0x4cb131);if(_0x1af4a4)return _0x1af4a4;throw new Error('Unsupported\x20or\x20invalid\x20data\x20URL\x20for\x20image\x20content');}if(_0x4cb131[_0x49e0bc(0x1bd)](_0x49e0bc(0x1b1))){const _0x47c529=_0x522e85['ZyAJz'](fileURLToPath,_0x4cb131),_0x2869aa=await stat(_0x47c529);if(_0x522e85['ZIkMa'](_0x2869aa['size'],MAX_IMAGE_SIZE_BYTES))throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+_0x49e0bc(0x18f));const _0x405b3d=await readFile(_0x47c529);return{'data':_0x405b3d[_0x49e0bc(0x190)](_0x522e85['TawGl']),'mediaType':inferMediaType(null,_0x47c529)};}if(_0x4cb131[_0x49e0bc(0x1bd)](_0x522e85[_0x49e0bc(0x19e)])||_0x4cb131[_0x49e0bc(0x1bd)](_0x522e85[_0x49e0bc(0x1aa)])){const _0x52282b=await _0x522e85['gBaHy'](fetch,_0x4cb131,{'signal':AbortSignal[_0x49e0bc(0x1b6)](IMAGE_FETCH_TIMEOUT_MS)});if(!_0x52282b['ok'])throw new Error('Failed\x20to\x20fetch\x20image:\x20'+_0x52282b['status']);const _0x1bd0c5=_0x52282b['headers']['get']('content-length');if(_0x1bd0c5){const _0x794534=_0x522e85[_0x49e0bc(0x18e)](Number,_0x1bd0c5);if(!Number['isNaN'](_0x794534)&&_0x522e85['oigLI'](_0x794534,MAX_IMAGE_SIZE_BYTES))throw new Error(_0x49e0bc(0x1c2)+MAX_IMAGE_SIZE_BYTES+_0x49e0bc(0x18f));}const _0x4cc00d=await _0x52282b[_0x49e0bc(0x1c0)]();if(_0x522e85['oigLI'](_0x4cc00d['byteLength'],MAX_IMAGE_SIZE_BYTES))throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');return{'data':Buffer[_0x49e0bc(0x182)](_0x4cc00d)[_0x49e0bc(0x190)]('base64'),'mediaType':inferMediaType(_0x52282b['headers']['get'](_0x49e0bc(0x19f)),_0x4cb131)};}const _0x28cb9b=await _0x522e85['ZyAJz'](stat,_0x4cb131);if(_0x28cb9b[_0x49e0bc(0x1ad)]>MAX_IMAGE_SIZE_BYTES)throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');const _0x5ef92c=await readFile(_0x4cb131);return{'data':_0x5ef92c['toString'](_0x49e0bc(0x196)),'mediaType':_0x522e85[_0x49e0bc(0x1a3)](inferMediaType,null,_0x4cb131)};}async function convertImageBlockToBase64(_0x1a893b){const _0x503181=_0xbb7c,_0x4fb753={'HuFwA':'base64','ApYOz':function(_0x22f538,_0x160680){return _0x22f538(_0x160680);}};if(_0x1a893b[_0x503181(0x18d)]?.[_0x503181(0x1bc)]===_0x4fb753[_0x503181(0x185)])return{'updated':![],'block':_0x1a893b};if(_0x1a893b[_0x503181(0x1b7)]&&_0x1a893b['mimeType'])return{'updated':![],'block':_0x1a893b};const _0x462f31=_0x1a893b[_0x503181(0x18d)]?.[_0x503181(0x198)]??_0x1a893b[_0x503181(0x198)];if(!_0x462f31)return{'updated':![],'block':_0x1a893b};const _0xa23b37=await _0x4fb753[_0x503181(0x19c)](readImageFromUrl,_0x462f31);return{'updated':!![],'block':{..._0x1a893b,'source':{'type':_0x503181(0x196),'media_type':_0xa23b37['mediaType'],'data':_0xa23b37[_0x503181(0x1b7)]},'url':undefined}};}async function convertToolOutputImagesToBase64(_0x3f7678){const _0x1a4840=_0xbb7c;if(!isRecord(_0x3f7678))return{'updated':![],'output':_0x3f7678};const _0x52f789=_0x3f7678['content'];if(!Array[_0x1a4840(0x1b3)](_0x52f789))return{'updated':![],'output':_0x3f7678};let _0x1985b3=![];const _0x3ce366=await Promise[_0x1a4840(0x186)](_0x52f789[_0x1a4840(0x197)](async _0x29eb1f=>{const _0x22a466=_0x1a4840;if(!isImageBlock(_0x29eb1f))return _0x29eb1f;try{const _0x1c7322=await convertImageBlockToBase64(_0x29eb1f);if(_0x1c7322['updated'])_0x1985b3=!![];return _0x1c7322[_0x22a466(0x1c4)];}catch{return _0x29eb1f;}}));if(!_0x1985b3)return{'updated':![],'output':_0x3f7678};return{'updated':!![],'output':{..._0x3f7678,'content':_0x3ce366}};}function sanitizeLoneSurrogates(_0x2c2d6e){const _0x52714a=_0xbb7c,_0x1e415d={'zrZJt':function(_0x1cdd9e,_0x455a55){return _0x1cdd9e>=_0x455a55;},'jqMQz':function(_0x167151,_0x22fc50){return _0x167151<=_0x22fc50;},'Dtcep':function(_0x5d358f,_0x2ea316){return _0x5d358f+_0x2ea316;},'tbSkc':function(_0x1d8086,_0x1a2490){return _0x1d8086+_0x1a2490;},'lBiTf':function(_0x4aeee9,_0x3a5f1a){return _0x4aeee9>=_0x3a5f1a;}};let _0x47d57e=![],_0x54e8c5='';for(let _0x19ed47=0x0;_0x19ed47<_0x2c2d6e['length'];_0x19ed47+=0x1){const _0x26c800=_0x2c2d6e['charCodeAt'](_0x19ed47);if(_0x1e415d['zrZJt'](_0x26c800,0xd800)&&_0x1e415d[_0x52714a(0x195)](_0x26c800,0xdbff)){const _0x1aca1b=_0x2c2d6e[_0x52714a(0x193)](_0x1e415d['Dtcep'](_0x19ed47,0x1));if(_0x1aca1b>=0xdc00&&_0x1aca1b<=0xdfff){_0x54e8c5+=_0x1e415d['tbSkc'](_0x2c2d6e[_0x19ed47],_0x2c2d6e[_0x1e415d[_0x52714a(0x1c5)](_0x19ed47,0x1)]),_0x19ed47+=0x1;continue;}_0x47d57e=!![],_0x54e8c5+='�';continue;}if(_0x1e415d[_0x52714a(0x1ab)](_0x26c800,0xdc00)&&_0x1e415d['jqMQz'](_0x26c800,0xdfff)){_0x47d57e=!![],_0x54e8c5+='�';continue;}_0x54e8c5+=_0x2c2d6e[_0x19ed47];}return _0x47d57e?{'updated':_0x47d57e,'value':_0x54e8c5}:{'updated':_0x47d57e,'value':_0x2c2d6e};}function sanitizeLoneSurrogatesDeep(_0x2796cd){const _0x3220ba=_0xbb7c,_0x10c01b={'hPlTa':function(_0xa6cb01,_0x4286a7){return _0xa6cb01(_0x4286a7);},'aOQjU':function(_0x501472,_0x5adc1f){return _0x501472===_0x5adc1f;}};if(_0x10c01b[_0x3220ba(0x183)](typeof _0x2796cd,_0x3220ba(0x19a)))return sanitizeLoneSurrogates(_0x2796cd);if(Array[_0x3220ba(0x1b3)](_0x2796cd)){let _0x3d09c1=![];const _0x292d1=_0x2796cd['map'](_0x49a6e5=>{const _0x3b9c8c=_0x3220ba,_0x5e1150=_0x10c01b[_0x3b9c8c(0x1c3)](sanitizeLoneSurrogatesDeep,_0x49a6e5);return _0x5e1150[_0x3b9c8c(0x18a)]&&(_0x3d09c1=!![]),_0x5e1150[_0x3b9c8c(0x1a1)];});return _0x3d09c1?{'updated':!![],'value':_0x292d1}:{'updated':![],'value':_0x2796cd};}if(!isRecord(_0x2796cd))return{'updated':![],'value':_0x2796cd};let _0xf98c0d=![];const _0x4d3c7e=Object[_0x3220ba(0x1c7)](_0x2796cd)['map'](([_0x22bce8,_0x5a59a6])=>{const _0x1be3d4=_0x3220ba,_0x43b09a=sanitizeLoneSurrogatesDeep(_0x5a59a6);return _0x43b09a[_0x1be3d4(0x18a)]&&(_0xf98c0d=!![]),[_0x22bce8,_0x43b09a['value']];});return _0xf98c0d?{'updated':!![],'value':Object['fromEntries'](_0x4d3c7e)}:{'updated':![],'value':_0x2796cd};}export function createMcpImageBase64Hook(){const _0x4df0a5=_0xbb7c,_0x4febc8={'CwCNB':_0x4df0a5(0x1c8),'KDmLy':function(_0x2cf27f,_0x33be54){return _0x2cf27f(_0x33be54);}};return async _0xd62a35=>{const _0x7abd05=_0x4df0a5;if(_0xd62a35[_0x7abd05(0x1af)]!==_0x4febc8['CwCNB'])return{};const _0x20f686=_0xd62a35,_0x339286=await convertToolOutputImagesToBase64(_0x20f686[_0x7abd05(0x1ae)]),_0x3ac38b=_0x4febc8[_0x7abd05(0x1b5)](sanitizeLoneSurrogatesDeep,_0x339286[_0x7abd05(0x189)]),_0x4c4bdc=_0x339286[_0x7abd05(0x18a)]||_0x3ac38b[_0x7abd05(0x18a)];if(!_0x4c4bdc)return{};return{'hookSpecificOutput':{'hookEventName':_0x4febc8['CwCNB'],'updatedMCPToolOutput':_0x3ac38b['value']}};};}
|
|
1
|
+
function _0x272f(_0x29b470,_0x56e887){_0x29b470=_0x29b470-0xf8;const _0x538bb7=_0x538b();let _0x272f29=_0x538bb7[_0x29b470];return _0x272f29;}(function(_0x3d0ae1,_0x789830){const _0x3884cd=_0x272f,_0x2a3567=_0x3d0ae1();while(!![]){try{const _0x3ade9f=parseInt(_0x3884cd(0x10c))/0x1+-parseInt(_0x3884cd(0x101))/0x2+-parseInt(_0x3884cd(0x110))/0x3*(-parseInt(_0x3884cd(0x104))/0x4)+parseInt(_0x3884cd(0x103))/0x5*(parseInt(_0x3884cd(0x106))/0x6)+-parseInt(_0x3884cd(0x11b))/0x7*(-parseInt(_0x3884cd(0x118))/0x8)+-parseInt(_0x3884cd(0x10e))/0x9*(parseInt(_0x3884cd(0x114))/0xa)+-parseInt(_0x3884cd(0x11e))/0xb;if(_0x3ade9f===_0x789830)break;else _0x2a3567['push'](_0x2a3567['shift']());}catch(_0x4603d1){_0x2a3567['push'](_0x2a3567['shift']());}}}(_0x538b,0xd7868));import{readFile,stat}from'fs/promises';import{extname}from'path';import{fileURLToPath}from'url';const MAX_IMAGE_SIZE_BYTES=0xa*0x400*0x400,IMAGE_FETCH_TIMEOUT_MS=0x7530;function isRecord(_0x49de39){const _0x2f2878=_0x272f,_0x3067d6={'JiWLV':function(_0xfad317,_0x16d4e4){return _0xfad317===_0x16d4e4;}};return _0x3067d6['JiWLV'](typeof _0x49de39,_0x2f2878(0xfb))&&_0x49de39!==null;}function isImageBlock(_0x21a2c3){const _0x3a6fc9=_0x272f,_0x1493b9={'cVvHb':function(_0xf36f80,_0x3bbd8e){return _0xf36f80===_0x3bbd8e;},'KIZLI':_0x3a6fc9(0x105)};return isRecord(_0x21a2c3)&&_0x1493b9['cVvHb'](_0x21a2c3[_0x3a6fc9(0x107)],_0x1493b9['KIZLI']);}function isDataUrl(_0x312f83){const _0x4b9c89=_0x272f;return _0x312f83['startsWith'](_0x4b9c89(0x12b));}function parseDataUrl(_0x54703e){const _0x3c5c37=_0x272f,_0x34eee8=/^data:([^;]+);base64,(.+)$/[_0x3c5c37(0x117)](_0x54703e);if(!_0x34eee8)return null;const _0x155fa0=_0x34eee8[0x1]['toLowerCase']();if(!isValidMediaType(_0x155fa0))return null;return{'data':_0x34eee8[0x2],'mediaType':_0x155fa0};}function isValidMediaType(_0x53ea2b){const _0x4a1c65=_0x272f,_0x1dee65={'Chyvt':_0x4a1c65(0x116),'yTZjd':'image/gif','RvEwt':'image/webp'};return['image/jpeg',_0x1dee65[_0x4a1c65(0x10f)],_0x1dee65['yTZjd'],_0x1dee65[_0x4a1c65(0x12f)]]['includes'](_0x53ea2b);}function inferMediaType(_0x196eda,_0x5b4243){const _0x38797a=_0x272f,_0x41b475={'gPIAE':function(_0x4caccf,_0x54c78b){return _0x4caccf(_0x54c78b);},'JIvMQ':'jpeg','aJqUE':_0x38797a(0x116),'IOlHL':_0x38797a(0x11a),'kroLq':'webp'};if(_0x196eda){const _0x346979=_0x196eda['toLowerCase']()['split'](';')[0x0][_0x38797a(0x129)]();if(isValidMediaType(_0x346979))return _0x346979;}const _0x4c4a13=_0x41b475['gPIAE'](extname,_0x5b4243)[_0x38797a(0x11f)]()['replace']('.','');switch(_0x4c4a13){case'jpg':case _0x41b475[_0x38797a(0x128)]:return'image/jpeg';case'png':return _0x41b475[_0x38797a(0x134)];case _0x41b475[_0x38797a(0x10a)]:return _0x38797a(0x12a);case _0x41b475[_0x38797a(0xf8)]:return'image/webp';default:return _0x41b475[_0x38797a(0x134)];}}async function readImageFromUrl(_0x525636){const _0x18f1ee=_0x272f,_0x5f1003={'NnZTY':function(_0x2abdb7,_0x528659){return _0x2abdb7(_0x528659);},'opFmA':function(_0x3e669d,_0x363170){return _0x3e669d>_0x363170;},'bHQaf':function(_0x21f48a,_0x2ee76b){return _0x21f48a(_0x2ee76b);},'aOCmb':'base64','ZpmUC':'http://','IuWsX':'content-length','hWjLy':_0x18f1ee(0x126)};if(isDataUrl(_0x525636)){const _0x2829c0=_0x5f1003['NnZTY'](parseDataUrl,_0x525636);if(_0x2829c0)return _0x2829c0;throw new Error(_0x18f1ee(0x127));}if(_0x525636['startsWith']('file://')){const _0x2db1ab=fileURLToPath(_0x525636),_0x58a60a=await stat(_0x2db1ab);if(_0x5f1003[_0x18f1ee(0xfe)](_0x58a60a['size'],MAX_IMAGE_SIZE_BYTES))throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');const _0x2de273=await _0x5f1003['bHQaf'](readFile,_0x2db1ab);return{'data':_0x2de273['toString'](_0x5f1003[_0x18f1ee(0x12e)]),'mediaType':inferMediaType(null,_0x2db1ab)};}if(_0x525636[_0x18f1ee(0x125)](_0x5f1003[_0x18f1ee(0x12d)])||_0x525636[_0x18f1ee(0x125)]('https://')){const _0x1a5644=await fetch(_0x525636,{'signal':AbortSignal['timeout'](IMAGE_FETCH_TIMEOUT_MS)});if(!_0x1a5644['ok'])throw new Error(_0x18f1ee(0x123)+_0x1a5644[_0x18f1ee(0x112)]);const _0x862473=_0x1a5644[_0x18f1ee(0xfa)][_0x18f1ee(0x11c)](_0x5f1003['IuWsX']);if(_0x862473){const _0x2556da=_0x5f1003['NnZTY'](Number,_0x862473);if(!Number['isNaN'](_0x2556da)&&_0x2556da>MAX_IMAGE_SIZE_BYTES)throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');}const _0x45164a=await _0x1a5644[_0x18f1ee(0x111)]();if(_0x45164a['byteLength']>MAX_IMAGE_SIZE_BYTES)throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');return{'data':Buffer[_0x18f1ee(0x124)](_0x45164a)['toString'](_0x5f1003[_0x18f1ee(0x12e)]),'mediaType':inferMediaType(_0x1a5644['headers']['get'](_0x5f1003[_0x18f1ee(0x121)]),_0x525636)};}const _0x558a6d=await stat(_0x525636);if(_0x558a6d['size']>MAX_IMAGE_SIZE_BYTES)throw new Error(_0x18f1ee(0x113)+MAX_IMAGE_SIZE_BYTES+_0x18f1ee(0x108));const _0x23ea8b=await readFile(_0x525636);return{'data':_0x23ea8b['toString'](_0x5f1003['aOCmb']),'mediaType':inferMediaType(null,_0x525636)};}async function convertImageBlockToBase64(_0x4e212c){const _0x1d52a8=_0x272f,_0x577f0e={'vueAy':function(_0x585239,_0x1cbc5f){return _0x585239===_0x1cbc5f;}};if(_0x577f0e[_0x1d52a8(0x109)](_0x4e212c['source']?.[_0x1d52a8(0x107)],_0x1d52a8(0x130)))return{'updated':![],'block':_0x4e212c};if(_0x4e212c[_0x1d52a8(0x10d)]&&_0x4e212c['mimeType'])return{'updated':![],'block':_0x4e212c};const _0x83de27=_0x4e212c[_0x1d52a8(0x133)]?.[_0x1d52a8(0x10b)]??_0x4e212c['url'];if(!_0x83de27)return{'updated':![],'block':_0x4e212c};const _0x186260=await readImageFromUrl(_0x83de27);return{'updated':!![],'block':{..._0x4e212c,'source':{'type':'base64','media_type':_0x186260[_0x1d52a8(0x120)],'data':_0x186260[_0x1d52a8(0x10d)]},'url':undefined}};}async function convertToolOutputImagesToBase64(_0x36b0bf){const _0x1b4cf9=_0x272f,_0x2c1d42={'RcjFX':function(_0x1685a0,_0x498067){return _0x1685a0(_0x498067);}};if(!isRecord(_0x36b0bf))return{'updated':![],'output':_0x36b0bf};const _0x135947=_0x36b0bf['content'];if(!Array[_0x1b4cf9(0xfc)](_0x135947))return{'updated':![],'output':_0x36b0bf};let _0x2e33fc=![];const _0x21b7e0=await Promise['all'](_0x135947[_0x1b4cf9(0x132)](async _0x537c9f=>{const _0xa30070=_0x1b4cf9;if(!_0x2c1d42[_0xa30070(0xfd)](isImageBlock,_0x537c9f))return _0x537c9f;try{const _0x32bcef=await convertImageBlockToBase64(_0x537c9f);if(_0x32bcef[_0xa30070(0xff)])_0x2e33fc=!![];return _0x32bcef['block'];}catch{return _0x537c9f;}}));if(!_0x2e33fc)return{'updated':![],'output':_0x36b0bf};return{'updated':!![],'output':{..._0x36b0bf,'content':_0x21b7e0}};}function sanitizeLoneSurrogates(_0x40095e){const _0x1cacad=_0x272f,_0x180d3a={'PkiIZ':function(_0x159a0f,_0x2c9780){return _0x159a0f>=_0x2c9780;},'rgqhb':function(_0x5221e3,_0x32d2d1){return _0x5221e3+_0x32d2d1;},'GMkXb':function(_0xacf66a,_0x823f13){return _0xacf66a<=_0x823f13;}};let _0x41c602=![],_0x4c8862='';for(let _0x392b2a=0x0;_0x392b2a<_0x40095e[_0x1cacad(0x12c)];_0x392b2a+=0x1){const _0xf41635=_0x40095e['charCodeAt'](_0x392b2a);if(_0x180d3a['PkiIZ'](_0xf41635,0xd800)&&_0xf41635<=0xdbff){const _0x95bb1=_0x40095e['charCodeAt'](_0x180d3a[_0x1cacad(0x100)](_0x392b2a,0x1));if(_0x95bb1>=0xdc00&&_0x95bb1<=0xdfff){_0x4c8862+=_0x40095e[_0x392b2a]+_0x40095e[_0x392b2a+0x1],_0x392b2a+=0x1;continue;}_0x41c602=!![],_0x4c8862+='�';continue;}if(_0xf41635>=0xdc00&&_0x180d3a['GMkXb'](_0xf41635,0xdfff)){_0x41c602=!![],_0x4c8862+='�';continue;}_0x4c8862+=_0x40095e[_0x392b2a];}return _0x41c602?{'updated':_0x41c602,'value':_0x4c8862}:{'updated':_0x41c602,'value':_0x40095e};}function sanitizeLoneSurrogatesDeep(_0x38ab90){const _0x30317b=_0x272f,_0x4f42e8={'RtweC':function(_0x1a58b4,_0x3e61e1){return _0x1a58b4(_0x3e61e1);},'sgfiy':function(_0x3144ce,_0x278935){return _0x3144ce===_0x278935;},'RJSnp':function(_0x31d4b4,_0x4e65ad){return _0x31d4b4(_0x4e65ad);}};if(_0x4f42e8[_0x30317b(0x11d)](typeof _0x38ab90,'string'))return _0x4f42e8[_0x30317b(0x115)](sanitizeLoneSurrogates,_0x38ab90);if(Array[_0x30317b(0xfc)](_0x38ab90)){let _0x2a4459=![];const _0x1b7746=_0x38ab90['map'](_0x45612c=>{const _0x3780ce=_0x30317b,_0x265171=_0x4f42e8['RtweC'](sanitizeLoneSurrogatesDeep,_0x45612c);return _0x265171['updated']&&(_0x2a4459=!![]),_0x265171[_0x3780ce(0x102)];});return _0x2a4459?{'updated':!![],'value':_0x1b7746}:{'updated':![],'value':_0x38ab90};}if(!_0x4f42e8['RJSnp'](isRecord,_0x38ab90))return{'updated':![],'value':_0x38ab90};let _0x461b26=![];const _0x48875f=Object['entries'](_0x38ab90)['map'](([_0x258dd8,_0x364e98])=>{const _0xfb02a0=_0x30317b,_0x318918=sanitizeLoneSurrogatesDeep(_0x364e98);return _0x318918[_0xfb02a0(0xff)]&&(_0x461b26=!![]),[_0x258dd8,_0x318918[_0xfb02a0(0x102)]];});return _0x461b26?{'updated':!![],'value':Object['fromEntries'](_0x48875f)}:{'updated':![],'value':_0x38ab90};}function _0x538b(){const _0x50754c=['output','headers','object','isArray','RcjFX','opFmA','updated','rgqhb','1157090wihXRj','value','5nNyhrc','40mpEtAb','image','7180326PItunt','type','\x20bytes)','vueAy','IOlHL','url','511027dmJZKD','data','72wIJvPW','Chyvt','181647SYMJZv','arrayBuffer','status','Image\x20exceeds\x20size\x20limit\x20(','519360nuxIMn','RtweC','image/png','exec','4960qTYzuy','tool_response','gif','8890JBrgnl','get','sgfiy','13461943wstxgE','toLowerCase','mediaType','hWjLy','PostToolUse','Failed\x20to\x20fetch\x20image:\x20','from','startsWith','content-type','Unsupported\x20or\x20invalid\x20data\x20URL\x20for\x20image\x20content','JIvMQ','trim','image/gif','data:','length','ZpmUC','aOCmb','RvEwt','base64','uaqlL','map','source','aJqUE','kroLq'];_0x538b=function(){return _0x50754c;};return _0x538b();}export function createMcpImageBase64Hook(){const _0x14a335={'uaqlL':function(_0x4985d3,_0x23a7eb){return _0x4985d3(_0x23a7eb);},'WrYoi':'PostToolUse'};return async _0x55cb74=>{const _0x1d9090=_0x272f;if(_0x55cb74['hook_event_name']!==_0x1d9090(0x122))return{};const _0x3d878c=_0x55cb74,_0x35ff9c=await _0x14a335[_0x1d9090(0x131)](convertToolOutputImagesToBase64,_0x3d878c[_0x1d9090(0x119)]),_0x18a0f9=sanitizeLoneSurrogatesDeep(_0x35ff9c[_0x1d9090(0xf9)]),_0x4717df=_0x35ff9c['updated']||_0x18a0f9[_0x1d9090(0xff)];if(!_0x4717df)return{};return{'hookSpecificOutput':{'hookEventName':_0x14a335['WrYoi'],'updatedMCPToolOutput':_0x18a0f9[_0x1d9090(0x102)]}};};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x371e(_0x3f2507,_0x5155b4){_0x3f2507=_0x3f2507-0x76;const _0x118ca6=_0x118c();let _0x371e47=_0x118ca6[_0x3f2507];return _0x371e47;}(function(_0x2a88b0,_0x1317b0){const _0x3fe6ea=_0x371e,_0x132cad=_0x2a88b0();while(!![]){try{const _0x314a8d=-parseInt(_0x3fe6ea(0x7c))/0x1*(-parseInt(_0x3fe6ea(0x81))/0x2)+-parseInt(_0x3fe6ea(0x7f))/0x3*(-parseInt(_0x3fe6ea(0x82))/0x4)+-parseInt(_0x3fe6ea(0x7a))/0x5+parseInt(_0x3fe6ea(0x7d))/0x6*(-parseInt(_0x3fe6ea(0x80))/0x7)+-parseInt(_0x3fe6ea(0x76))/0x8*(parseInt(_0x3fe6ea(0x77))/0x9)+-parseInt(_0x3fe6ea(0x78))/0xa*(parseInt(_0x3fe6ea(0x7b))/0xb)+-parseInt(_0x3fe6ea(0x7e))/0xc*(-parseInt(_0x3fe6ea(0x79))/0xd);if(_0x314a8d===_0x1317b0)break;else _0x132cad['push'](_0x132cad['shift']());}catch(_0x4f209d){_0x132cad['push'](_0x132cad['shift']());}}}(_0x118c,0xbdde8));function _0x118c(){const _0x53f331=['17534AKhgBY','112867wgdmWe','6146178EoKcWL','36jxMbKb','4349928xBbXTR','7UutSFc','22fLqhtZ','4EOfpeH','328qTLROb','52128FAJRhr','2950woERjB','1119274SbKQrG','2200190fHQFxi'];_0x118c=function(){return _0x53f331;};return _0x118c();}const VERIFY_MODEL_ALIASES={'opus':'claude-opus-4-6','sonnet':'claude-sonnet-4-6'};export const DEFAULT_VERIFY_MODEL='claude-sonnet-4-6';export function resolveVerifyModel(_0x3e9b9a){if(!_0x3e9b9a)return undefined;const _0x4e4a91=_0x3e9b9a['trim']();if(!_0x4e4a91)return undefined;const _0x416a5d=VERIFY_MODEL_ALIASES[_0x4e4a91['toLowerCase']()];return _0x416a5d??_0x4e4a91;}
|