@myagentroam/node 0.9.10 → 0.9.12
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/dist/connector.js +1 -1
- package/dist/native-session-history.js +1 -1
- package/dist/runtime-state.js +1 -1
- package/dist/service/conversation-history-service.js +1 -1
- package/dist/service/native-session-watch-service.js +1 -1
- package/dist/service/node-run-event-bridge.js +1 -1
- package/dist/service/recent-run-projection-service.js +1 -1
- package/dist/service/workbench-event-service.js +1 -1
- package/dist/service/workspace-file-service.js +1 -1
- package/dist/service/workspace-workbench-service.js +1 -1
- package/dist/terminal.js +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +2 -2
package/dist/workspace.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0x350254=_0x57ac;(function(_0x1591cd,_0x489f69){const _0x254f97=_0x57ac,_0x27f1f6=_0x1591cd();while(!![]){try{const _0x5c9310=parseInt(_0x254f97(0x121))/(0x1*0x2194+-0x72a+-0x1a69*0x1)*(-parseInt(_0x254f97(0x1da))/(-0x15b4+0x4fc*-0x7+-0x12de*-0x3))+-parseInt(_0x254f97(0x119))/(0x8f5*-0x1+-0x2598+0x2e90)+parseInt(_0x254f97(0x18b))/(0x33e+-0x1d6a+0x1a30)+-parseInt(_0x254f97(0x11a))/(-0x44*0x59+-0x7bd+0x1f66)*(-parseInt(_0x254f97(0x1b1))/(-0x6*-0x4c5+-0x44a*0x6+-0x2*0x16e))+-parseInt(_0x254f97(0x1be))/(0x223*0x3+0x26b0+-0x2d12)+-parseInt(_0x254f97(0x196))/(-0x92b+0x5*0x4+-0x91f*-0x1)*(-parseInt(_0x254f97(0x15e))/(0x172b+-0x1*-0x26a+-0xda*0x1e))+parseInt(_0x254f97(0x1ef))/(-0x25b3+0x3*-0x4bd+0x33f4);if(_0x5c9310===_0x489f69)break;else _0x27f1f6['push'](_0x27f1f6['shift']());}catch(_0x19a73b){_0x27f1f6['push'](_0x27f1f6['shift']());}}}(_0x4e33,-0x162*0x413+-0x27f54+0xb8351));import{createHash}from'node:crypto';import{watch}from'node:fs';import{lstat,mkdir,opendir,open,readdir,readFile,realpath,rename,rm,stat,unlink,writeFile}from'node:fs/promises';import{homedir,platform as _0xd083e6}from'node:os';import{dirname,isAbsolute,posix,relative,resolve,sep,win32}from'node:path';import{spawn}from'node:child_process';import{minimatch}from'minimatch';const GIT_TIMEOUT_MS=0x381*-0x5+0x150c+0x1001,GIT_OUTPUT_LIMIT=(0x35*0x39+-0x194f+0x18d*0xa)*(0x2*0x11+0x144c+-0x106e),FILE_READ_LIMIT=(0x1804+-0x18d+0x193*-0xd)*(0x2*0x6bb+0x1ac*0xf+-0x228a*0x1),DIRECTORY_PAGE_LIMIT=0x178+0x1ff8+0x2f8*-0xb,DIRECTORY_PICKER_LIMIT=0x1e8f+-0x215f+0x398,SEARCH_RESULT_LIMIT=0x65e+0x1523*-0x1+0x52f*0x3,FILE_INDEX_IDLE_TTL_MS=(0x138b*0x1+0x51d*-0x3+-0x3f8)*(-0x1f1f+0x588*0x7+0x91*-0xd)*(0x25b*0xd+0x1ffb+-0x3ab2),FILE_INDEX_ENTRY_LIMIT=0x17*-0x1eb5+0x22188+0x9*0x3d43,FILE_INDEX_FALLBACK_POLL_MS=0xc57a+-0x9a23*-0x1+0x1*-0xea6d,FILE_INDEX_METADATA_CONCURRENCY=0x1*0xc77+0x20b5*-0x1+0x145e,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x350254(0x1d2),_0x350254(0x1c6),_0x350254(0x221),_0x350254(0x211),_0x350254(0x129),_0x350254(0x174),_0x350254(0x200),_0x350254(0x203),_0x350254(0x15b),_0x350254(0x130),_0x350254(0x116),_0x350254(0x1bc),_0x350254(0x142),_0x350254(0x1e3),_0x350254(0x201),_0x350254(0x1a6),_0x350254(0x21e),_0x350254(0x167),_0x350254(0x134),_0x350254(0x139),_0x350254(0x110),_0x350254(0x17f),_0x350254(0x133),_0x350254(0x229),_0x350254(0x12b)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x128c62,_0x4b2171,_0xecf42d){const _0x8bdf9b=_0x350254,_0x113dda=_0x4b2171[_0x8bdf9b(0x1cf)]();if(_0x113dda[_0x8bdf9b(0x149)]===0x2a1+0x1d*-0x70+0xa0f||_0x113dda[_0x8bdf9b(0x149)]>-0x697*-0x1+0x33*-0x10+-0x1*0x268||_0x113dda==='.'||_0x113dda==='..'||_0x113dda[_0x8bdf9b(0x185)]('/')||_0x113dda[_0x8bdf9b(0x185)]('\x5c')||_0x113dda[_0x8bdf9b(0x185)]('\x00'))throw new Error(_0x8bdf9b(0x179));const _0x2f6887=await Promise[_0x8bdf9b(0x13a)](_0xecf42d[_0x8bdf9b(0x11d)](_0x2c692b=>realpath(_0x2c692b))),_0x4ed31a=await realpath(_0x128c62)[_0x8bdf9b(0x13e)](()=>{const _0x592f43=_0x8bdf9b;throw new Error(_0x592f43(0x160));}),_0x3cab1f=await stat(_0x4ed31a)[_0x8bdf9b(0x13e)](()=>undefined);if(_0x3cab1f?.[_0x8bdf9b(0x1d3)]()!==!![]||!isWithinAllowedRoot(_0x4ed31a,_0x2f6887))throw new Error(_0x8bdf9b(0x160));const _0x297239=resolve(_0x4ed31a,_0x113dda);if(dirname(_0x297239)!==_0x4ed31a||!isWithinAllowedRoot(_0x297239,_0x2f6887))throw new Error(_0x8bdf9b(0x179));try{await mkdir(_0x297239);}catch(_0x4a6052){if(_0x4a6052[_0x8bdf9b(0x141)]===_0x8bdf9b(0x173))throw new Error(_0x8bdf9b(0x158));throw _0x4a6052;}return _0x297239;}export class WorkspaceFileIndex{[_0x350254(0x1c3)];[_0x350254(0x171)];[_0x350254(0x1b5)]=[];[_0x350254(0x18a)]=![];[_0x350254(0x1d5)];[_0x350254(0x182)];[_0x350254(0x18d)]=!![];[_0x350254(0x135)];[_0x350254(0x195)];[_0x350254(0x15a)];[_0x350254(0x14c)]='';constructor(_0x1ee006,_0x320a5f={}){const _0x138adf=_0x350254;this[_0x138adf(0x1c3)]=_0x1ee006,this[_0x138adf(0x171)]=_0x320a5f;}async[_0x350254(0x218)](){const _0x4f53e8=_0x350254;await this[_0x4f53e8(0x13d)](),this[_0x4f53e8(0x1ca)]();}async[_0x350254(0x170)](){const _0x8e19e5=_0x350254;return await this[_0x8e19e5(0x13d)](),this[_0x8e19e5(0x1ca)](),{'entries':this[_0x8e19e5(0x1b5)][_0x8e19e5(0x215)](_0x59ab02=>_0x59ab02[_0x8e19e5(0x163)]===_0x8e19e5(0x14d)),'truncated':this[_0x8e19e5(0x18a)]};}[_0x350254(0x13f)](){const _0x3863ad=_0x350254;if(this[_0x3863ad(0x195)]!==undefined)clearTimeout(this[_0x3863ad(0x195)]);this[_0x3863ad(0x195)]=undefined,this[_0x3863ad(0x135)]?.[_0x3863ad(0x1af)](),this[_0x3863ad(0x135)]=undefined;if(this[_0x3863ad(0x15a)]!==undefined)clearInterval(this[_0x3863ad(0x15a)]);this[_0x3863ad(0x15a)]=undefined,this[_0x3863ad(0x1b5)]=[],this[_0x3863ad(0x18a)]=![],this[_0x3863ad(0x18d)]=!![],this[_0x3863ad(0x14c)]='';}async[_0x350254(0x223)](_0x2ea345,_0x5716fd,_0x5aba52=SEARCH_RESULT_LIMIT,_0x16e44b=![]){const _0x4bb1b8=_0x350254;if(_0x2ea345[_0x4bb1b8(0x1cf)]()[_0x4bb1b8(0x149)]===-0x1ef8+-0x1f6b*-0x1+-0x73||_0x2ea345[_0x4bb1b8(0x149)]>-0x1*-0x24d9+-0x1ffe+-0x3db||!Number[_0x4bb1b8(0x1eb)](_0x5aba52)||_0x5aba52<0x28*0x2a+-0x3d9*0x8+0xd*0x1dd||_0x5aba52>SEARCH_RESULT_LIMIT)throw new Error(_0x4bb1b8(0x213));await this[_0x4bb1b8(0x13d)](),this[_0x4bb1b8(0x1ca)]();const _0x374928=decodeSearchCursor(_0x5716fd,_0x2ea345),_0x3394d5=_0x374928===undefined?undefined:this[_0x4bb1b8(0x1b5)][_0x4bb1b8(0x1dd)](_0x189365=>_0x189365[_0x4bb1b8(0x1bd)]===_0x374928&&(_0x16e44b||_0x189365[_0x4bb1b8(0x163)]===_0x4bb1b8(0x14d))),_0x2d19ae=_0x3394d5===undefined?-(-0x11*0x2b+0x3*-0xa47+0xf*0x23f):fuzzyPathScore(_0x3394d5[_0x4bb1b8(0x1bd)],_0x2ea345),_0x28b865=_0x3394d5===undefined||_0x2d19ae<0x5*-0x17+0x381+-0x30e?undefined:{'entry':_0x3394d5,'score':_0x2d19ae},_0x2b9c43=new RankedCandidateHeap(_0x5aba52+(0x2*0x4a6+-0x72b*0x5+0x1a8c));for(const _0x5a5d0c of this[_0x4bb1b8(0x1b5)]){if(!_0x16e44b&&_0x5a5d0c[_0x4bb1b8(0x163)]!==_0x4bb1b8(0x14d))continue;const _0x4f1dd2=fuzzyPathScore(_0x5a5d0c[_0x4bb1b8(0x1bd)],_0x2ea345);if(_0x4f1dd2<0xb3f*-0x3+-0x1a1*0x1+-0x1f7*-0x12)continue;const _0x540235={'entry':_0x5a5d0c,'score':_0x4f1dd2};if(_0x28b865!==undefined&&compareRankedCandidate(_0x540235,_0x28b865)<=-0x12a8+-0x1*0xff3+0x229b)continue;_0x2b9c43[_0x4bb1b8(0x1a1)](_0x540235);}const _0x1c682d=_0x2b9c43[_0x4bb1b8(0x1e8)](),_0x2c6a9a=_0x1c682d[_0x4bb1b8(0x20e)](0x2*-0x8a7+0x1bfa*0x1+0x556*-0x2,_0x5aba52)[_0x4bb1b8(0x11d)](_0x552d6f=>_0x552d6f[_0x4bb1b8(0x147)]),_0x1d0e4b=_0x1c682d[_0x5aba52]?.[_0x4bb1b8(0x147)][_0x4bb1b8(0x1bd)];return{'entries':_0x2c6a9a,'nextCursor':_0x1d0e4b===undefined?null:encodeSearchCursor(_0x2ea345,_0x2c6a9a['at'](-(-0x1549+-0x25a2+0x4e9*0xc))?.[_0x4bb1b8(0x1bd)]??_0x374928??''),'truncated':_0x1d0e4b!==undefined||this[_0x4bb1b8(0x18a)]};}async[_0x350254(0x13d)](){const _0x39f1f4=_0x350254;if(!this[_0x39f1f4(0x18d)]&&this[_0x39f1f4(0x1d5)]!==undefined)return;this[_0x39f1f4(0x182)]===undefined&&(this[_0x39f1f4(0x182)]=this[_0x39f1f4(0x127)]()[_0x39f1f4(0x113)](()=>{const _0x45e0fb=_0x39f1f4;this[_0x45e0fb(0x182)]=undefined;})),await this[_0x39f1f4(0x182)];}[_0x350254(0x1ca)](){const _0x26a3dd=_0x350254;if(this[_0x26a3dd(0x195)]!==undefined)clearTimeout(this[_0x26a3dd(0x195)]);this[_0x26a3dd(0x195)]=setTimeout(()=>this[_0x26a3dd(0x13f)](),this[_0x26a3dd(0x171)][_0x26a3dd(0x1cd)]??FILE_INDEX_IDLE_TTL_MS),this[_0x26a3dd(0x195)][_0x26a3dd(0x205)]();}async[_0x350254(0x127)](){const _0x2ebb19=_0x350254,_0x50ca28=await realpath(this[_0x2ebb19(0x1c3)]),_0x26aa92=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x50ca28)],_0x34e862=[],_0x4abbda=this[_0x2ebb19(0x171)][_0x2ebb19(0x16e)]??FILE_INDEX_ENTRY_LIMIT;let _0x51e1b1=![];const _0x2e7787=['.'];let _0x46b783=0x23*0x56+0x19c9+-0x258b;while(_0x46b783<_0x2e7787[_0x2ebb19(0x149)]&&!_0x51e1b1){const _0x4f2bb3=_0x2e7787[_0x46b783];_0x46b783+=-0x697+-0xd*-0x17b+0x4f*-0x29;const _0x18e0ea=await resolveWorkspaceEntryFromCanonicalRoot(_0x50ca28,_0x4f2bb3,!![])[_0x2ebb19(0x13e)](()=>undefined);if(_0x18e0ea===undefined)continue;const _0xe049f6=await opendir(_0x18e0ea)[_0x2ebb19(0x13e)](()=>undefined);if(_0xe049f6===undefined)continue;let _0x646edf=[];const _0x3a75cb=async()=>{const _0x52ccac=_0x2ebb19,_0x4dd5d5=await Promise[_0x52ccac(0x13a)](_0x646edf);_0x646edf=[];for(const _0x520952 of _0x4dd5d5){if(_0x520952===undefined)continue;if(_0x520952[_0x52ccac(0x1bd)]===_0x52ccac(0x11b)||_0x520952[_0x52ccac(0x1bd)][_0x52ccac(0x1f7)](_0x52ccac(0x1bf))||isExcluded(_0x520952[_0x52ccac(0x1bd)],_0x26aa92))continue;if(_0x520952[_0x52ccac(0x163)]===_0x52ccac(0x1d6))_0x2e7787[_0x52ccac(0x152)](_0x520952[_0x52ccac(0x1bd)]);_0x34e862[_0x52ccac(0x152)](_0x520952);if(_0x34e862[_0x52ccac(0x149)]>=_0x4abbda){_0x51e1b1=!![];break;}}};for await(const _0x1aa7c3 of _0xe049f6){const _0x13f515=_0x4f2bb3==='.'?_0x1aa7c3[_0x2ebb19(0x1e2)]:posix[_0x2ebb19(0x1a9)](_0x4f2bb3[_0x2ebb19(0x1a8)]('\x5c','/'),_0x1aa7c3[_0x2ebb19(0x1e2)]);if(_0x13f515===_0x2ebb19(0x11b)||_0x13f515[_0x2ebb19(0x1f7)](_0x2ebb19(0x1bf))||isExcluded(_0x13f515,_0x26aa92))continue;_0x646edf[_0x2ebb19(0x152)](inspectWorkspaceIndexEntry(_0x50ca28,_0x13f515,_0x1aa7c3[_0x2ebb19(0x1e2)]));if(_0x646edf[_0x2ebb19(0x149)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0x3a75cb();if(_0x51e1b1)break;}if(!_0x51e1b1&&_0x646edf[_0x2ebb19(0x149)]>-0x3ee*0x3+0x17*-0x57+-0x7*-0x2cd)await _0x3a75cb();}this[_0x2ebb19(0x1d5)]=_0x50ca28,this[_0x2ebb19(0x1b5)]=_0x34e862,this[_0x2ebb19(0x18a)]=_0x51e1b1,this[_0x2ebb19(0x14c)]=fileIndexSignature(_0x34e862,_0x51e1b1),this[_0x2ebb19(0x18d)]=![],this[_0x2ebb19(0x135)]?.[_0x2ebb19(0x1af)]();try{this[_0x2ebb19(0x135)]=watch(_0x50ca28,{'persistent':![],'recursive':!![]},(_0x5804c4,_0x2cd8c5)=>{const _0x5d5357=_0x2ebb19;if(_0x2cd8c5!==null){const _0x81fd60=_0x2cd8c5[_0x5d5357(0x220)]()[_0x5d5357(0x1a8)]('\x5c','/');if(_0x81fd60===_0x5d5357(0x11b)||_0x81fd60[_0x5d5357(0x1f7)](_0x5d5357(0x1bf))||isExcluded(_0x81fd60,_0x26aa92))return;}this[_0x5d5357(0x20a)]();}),this[_0x2ebb19(0x135)]['on'](_0x2ebb19(0x20d),()=>{const _0x40f779=_0x2ebb19;this[_0x40f779(0x20a)](),this[_0x40f779(0x135)]?.[_0x40f779(0x1af)](),this[_0x40f779(0x135)]=undefined,this[_0x40f779(0x19b)]();});}catch{this[_0x2ebb19(0x135)]=undefined,this[_0x2ebb19(0x19b)]();}}[_0x350254(0x19b)](){const _0x419464=_0x350254;if(this[_0x419464(0x15a)]!==undefined)return;this[_0x419464(0x15a)]=setInterval(()=>void this[_0x419464(0x228)](),FILE_INDEX_FALLBACK_POLL_MS),this[_0x419464(0x15a)][_0x419464(0x205)]();}async[_0x350254(0x228)](){const _0x321e0b=_0x350254;if(this[_0x321e0b(0x182)]!==undefined)return;const _0xc437c6=this[_0x321e0b(0x14c)];this[_0x321e0b(0x18d)]=!![];try{await this[_0x321e0b(0x13d)]();if(_0xc437c6!==this[_0x321e0b(0x14c)])this[_0x321e0b(0x171)][_0x321e0b(0x1b6)]?.();}catch{this[_0x321e0b(0x18d)]=![];}}[_0x350254(0x20a)](){const _0x55e2ec=_0x350254;if(this[_0x55e2ec(0x18d)])return;this[_0x55e2ec(0x18d)]=!![],this[_0x55e2ec(0x171)][_0x55e2ec(0x1b6)]?.();}}function fileIndexSignature(_0x13ce0a,_0xcb203){const _0xff61ac=_0x350254,_0x1bf4cd=createHash(_0xff61ac(0x194));_0x1bf4cd[_0xff61ac(0x1a2)](_0xcb203?'1\x00':'0\x00');for(const _0x485804 of _0x13ce0a)_0x1bf4cd[_0xff61ac(0x1a2)](_0x485804[_0xff61ac(0x1bd)]+'\x00'+String(_0x485804[_0xff61ac(0x20c)])+'\x00'+String(_0x485804[_0xff61ac(0x1a4)])+'\x00');return _0x1bf4cd[_0xff61ac(0x145)](_0xff61ac(0x1a3));}async function workspaceExcludePatterns(_0x4d0c8c){const _0x21e50e=_0x350254,_0x4eeefa=resolve(_0x4d0c8c,_0x21e50e(0x1e6)),_0x16f718=await readFile(_0x4eeefa,_0x21e50e(0x1b9))[_0x21e50e(0x1c5)](JSON[_0x21e50e(0x1d7)])[_0x21e50e(0x13e)](()=>undefined);if(typeof _0x16f718!==_0x21e50e(0x12f)||_0x16f718===null)return[];return[_0x21e50e(0x1f0),_0x21e50e(0x165)][_0x21e50e(0x183)](_0x423e43=>{const _0x2f2b98=_0x21e50e,_0x56ccfe=_0x16f718[_0x423e43];return typeof _0x56ccfe===_0x2f2b98(0x12f)&&_0x56ccfe!==null?Object[_0x2f2b98(0x1b5)](_0x56ccfe)[_0x2f2b98(0x183)](([_0x41cbc8,_0x193ecf])=>_0x193ecf===!![]?[_0x41cbc8]:[]):[];});}function isExcluded(_0x3a79ff,_0x4019a2){const _0x492292=_0x350254;return _0x4019a2[_0x492292(0x16b)](_0x1f1255=>minimatch(_0x3a79ff,_0x1f1255,{'dot':!![],'nocase':_0xd083e6()!==_0x492292(0x12c)})||minimatch(_0x3a79ff+'/',_0x1f1255,{'dot':!![],'nocase':_0xd083e6()!==_0x492292(0x12c)}));}function compareRankedCandidate(_0x59381f,_0x50bc0c){const _0x874da6=_0x350254;return _0x50bc0c[_0x874da6(0x1e7)]-_0x59381f[_0x874da6(0x1e7)]||_0x59381f[_0x874da6(0x147)][_0x874da6(0x1bd)][_0x874da6(0x1dc)](_0x50bc0c[_0x874da6(0x147)][_0x874da6(0x1bd)]);}class RankedCandidateHeap{[_0x350254(0x189)];[_0x350254(0x188)]=[];constructor(_0x1fb1a4){const _0x141fb1=_0x350254;this[_0x141fb1(0x189)]=_0x1fb1a4;}[_0x350254(0x1a1)](_0x4b414a){const _0x1e8f44=_0x350254;if(this[_0x1e8f44(0x188)][_0x1e8f44(0x149)]<this[_0x1e8f44(0x189)]){this[_0x1e8f44(0x188)][_0x1e8f44(0x152)](_0x4b414a),this[_0x1e8f44(0x146)](this[_0x1e8f44(0x188)][_0x1e8f44(0x149)]-(-0x19f1+0x3b*-0x9+-0x9*-0x31d));return;}if(compareRankedCandidate(_0x4b414a,this[_0x1e8f44(0x188)][-0x1da5+-0x2*-0x376+0x16b9])>=-0x1*-0x1071+0xb*-0x187+0x5c*0x1)return;this[_0x1e8f44(0x188)][-0x1eef*-0x1+-0x128f*0x2+-0x1*-0x62f]=_0x4b414a,this[_0x1e8f44(0x14e)](0x5f*-0x5e+0x17*-0x139+-0x3f01*-0x1);}[_0x350254(0x1e8)](){const _0x4dc11d=_0x350254;return[...this[_0x4dc11d(0x188)]][_0x4dc11d(0x180)](compareRankedCandidate);}[_0x350254(0x146)](_0x3826d2){const _0x3953a6=_0x350254;let _0x1f1afd=_0x3826d2;while(_0x1f1afd>-0x3*-0x67f+-0x4cb+-0xeb2){const _0x255d33=Math[_0x3953a6(0x193)]((_0x1f1afd-(0x1*-0x2322+0x3*-0xcf1+0x49f6))/(0xed4+0x19dd+-0x1*0x28af));if(compareRankedCandidate(this[_0x3953a6(0x188)][_0x1f1afd],this[_0x3953a6(0x188)][_0x255d33])<=0x7*-0x2e5+0x4*0x89b+0x5*-0x2d5)break;[this[_0x3953a6(0x188)][_0x1f1afd],this[_0x3953a6(0x188)][_0x255d33]]=[this[_0x3953a6(0x188)][_0x255d33],this[_0x3953a6(0x188)][_0x1f1afd]],_0x1f1afd=_0x255d33;}}[_0x350254(0x14e)](_0x59c700){const _0x34e643=_0x350254;let _0x376d70=_0x59c700;while(!![]){const _0x5310d3=_0x376d70*(-0x967+0x6d6+0x293)+(-0x1*0x9fd+0x1954+-0xf56);if(_0x5310d3>=this[_0x34e643(0x188)][_0x34e643(0x149)])return;const _0x3f73be=_0x5310d3+(0x16e4*0x1+0x609*0x3+0x3ba*-0xb),_0x45c555=_0x3f73be<this[_0x34e643(0x188)][_0x34e643(0x149)]&&compareRankedCandidate(this[_0x34e643(0x188)][_0x3f73be],this[_0x34e643(0x188)][_0x5310d3])>0x1301+-0xc2+-0x123f?_0x3f73be:_0x5310d3;if(compareRankedCandidate(this[_0x34e643(0x188)][_0x45c555],this[_0x34e643(0x188)][_0x376d70])<=0x4*-0x1de+-0x121e+0x1996)return;[this[_0x34e643(0x188)][_0x376d70],this[_0x34e643(0x188)][_0x45c555]]=[this[_0x34e643(0x188)][_0x45c555],this[_0x34e643(0x188)][_0x376d70]],_0x376d70=_0x45c555;}}}function fuzzyPathScore(_0xe44e38,_0x49d3bf){const _0x23c592=_0x350254,_0x2e232f=_0xe44e38[_0x23c592(0x222)](),_0x5814ce=_0x49d3bf[_0x23c592(0x1cf)]()[_0x23c592(0x222)]();let _0x2916ad=0x9b*0xb+-0x3*0x742+-0x49*-0x35,_0x16ca5e=0x1*0x16e1+0x1004+0x26e5*-0x1,_0x264b80=-(0x1530+0x178+-0x16a6);for(const _0x4aceee of _0x5814ce){const _0x28a387=_0x2e232f[_0x23c592(0x1f4)](_0x4aceee,_0x2916ad);if(_0x28a387===-(-0x11*-0x1df+-0xff+-0x1ecf))return-(-0x8b9+0xc*0x151+-0x712);_0x16ca5e+=_0x28a387===_0x264b80+(0x8fc+-0x1f6*0x10+0x1665)?-0xccd*-0x3+-0x1df6+-0x865:-0x1a2*-0x15+-0x17cb+-0xa7e;if(_0x28a387===0x11e*0x7+0x1802+0x7f5*-0x4||_0x23c592(0x197)[_0x23c592(0x185)](_0x2e232f[_0x28a387-(-0x2a2+0x41d+-0x17a)]??''))_0x16ca5e+=-0xe*0x293+0x9d2+-0x5*-0x540;_0x264b80=_0x28a387,_0x2916ad=_0x28a387+(-0x2230+-0x19b*0x13+0x40b2);}const _0x1c8396=_0xe44e38[_0x23c592(0x20e)](_0xe44e38[_0x23c592(0x21a)]('/')+(0x2393+-0xf4e+-0x1444))[_0x23c592(0x222)]();if(_0x1c8396[_0x23c592(0x185)](_0x5814ce))_0x16ca5e+=0x2ee*0x5+0x379*-0x1+-0xb05;else{if(_0x2e232f[_0x23c592(0x185)](_0x5814ce))_0x16ca5e+=-0x5b2+0xa8d*0x1+-0x4cb*0x1;}return _0x16ca5e-_0xe44e38[_0x23c592(0x149)]/(0x195d+-0x760*-0x1+0x1*-0x1cd5);}export async function listWorkspaceDirectories(_0x128de3,_0x42d433,_0x4826da=homedir()){const _0x18ef59=_0x350254,_0x185113=await realpath(_0x4826da),_0x1fb6b7=await Promise[_0x18ef59(0x13a)](_0x42d433[_0x18ef59(0x11d)](_0x2c88bf=>realpath(_0x2c88bf))),_0x420f13=[...new Set([_0x185113,..._0x1fb6b7])],_0x2c7631=_0x128de3===undefined?_0x1fb6b7[0x1985*0x1+0x603+0x1f88*-0x1]??_0x185113:await realpath(_0x128de3),_0x6afb89=await stat(_0x2c7631);if(!_0x6afb89[_0x18ef59(0x1d3)]()||!isWithinAllowedRoot(_0x2c7631,_0x420f13))throw new Error(_0x18ef59(0x160));const _0x3954d0=await readdir(_0x2c7631,{'withFileTypes':!![]}),_0x1d007f=[];for(const _0x2486c2 of _0x3954d0[_0x18ef59(0x180)]((_0x1ed79e,_0x48f278)=>_0x1ed79e[_0x18ef59(0x1e2)][_0x18ef59(0x1dc)](_0x48f278[_0x18ef59(0x1e2)]))){if(!_0x2486c2[_0x18ef59(0x1d3)]()&&!_0x2486c2[_0x18ef59(0x159)]())continue;const _0x452edd=await realpath(resolve(_0x2c7631,_0x2486c2[_0x18ef59(0x1e2)]))[_0x18ef59(0x13e)](()=>undefined);if(_0x452edd===undefined||!isWithinAllowedRoot(_0x452edd,_0x420f13))continue;const _0x3d5287=await stat(_0x452edd)[_0x18ef59(0x13e)](()=>undefined);if(_0x3d5287===undefined||!_0x3d5287[_0x18ef59(0x1d3)]())continue;_0x1d007f[_0x18ef59(0x152)]({'path':_0x452edd,'name':_0x2486c2[_0x18ef59(0x1e2)],'selectable':isWithinAllowedRoot(_0x452edd,_0x1fb6b7)});if(_0x1d007f[_0x18ef59(0x149)]>DIRECTORY_PICKER_LIMIT)break;}const _0x12680b=dirname(_0x2c7631);return{'homePath':_0x185113,'currentPath':_0x2c7631,'parentPath':_0x12680b===_0x2c7631||!isWithinAllowedRoot(_0x12680b,_0x420f13)?null:_0x12680b,'browseRoots':_0x1fb6b7,'selectable':isWithinAllowedRoot(_0x2c7631,_0x1fb6b7),'entries':_0x1d007f[_0x18ef59(0x20e)](0x194b+0x19*0x4a+-0x2085,DIRECTORY_PICKER_LIMIT),'truncated':_0x1d007f[_0x18ef59(0x149)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x1618a7,_0x29ffe7='.',_0x4d2637,_0x22eac1=DIRECTORY_PAGE_LIMIT){const _0x4c0896=_0x350254;if(!Number[_0x4c0896(0x1eb)](_0x22eac1)||_0x22eac1<0x1*0x1ad9+0x1*0x1c51+-0x3729||_0x22eac1>DIRECTORY_PAGE_LIMIT)throw new Error(_0x4c0896(0x17c));const _0x5a7012=await resolveWorkspaceEntry(_0x1618a7,_0x29ffe7,!![]),_0x48ac98=await readdir(_0x5a7012,{'withFileTypes':!![]}),_0x37631e=await realpath(_0x1618a7),_0xc606e4=decodeDirectoryCursor(_0x4d2637,_0x29ffe7),_0x151aa8=_0x48ac98[_0x4c0896(0x215)](_0x3ac1ab=>_0x3ac1ab[_0x4c0896(0x1e2)]!==_0x4c0896(0x11b)&&!isWorkspaceUploadTemporaryName(_0x3ac1ab[_0x4c0896(0x1e2)]))[_0x4c0896(0x11d)](_0x1e3260=>_0x1e3260[_0x4c0896(0x1e2)])[_0x4c0896(0x180)]((_0x327e36,_0x5163fb)=>_0x327e36[_0x4c0896(0x1dc)](_0x5163fb)),_0x1de3c0=_0xc606e4===undefined?0x2709+0xe6e+-0x3577:_0x151aa8[_0x4c0896(0x11f)](_0x111a1e=>_0x111a1e>_0xc606e4);if(_0xc606e4!==undefined&&_0x1de3c0===-(0x1003+0x1bfc+0xeaa*-0x3))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x32ebc7=_0x151aa8[_0x4c0896(0x20e)](_0x1de3c0,_0x1de3c0+_0x22eac1),_0x5aa03b=[];for(const _0x3fce81 of _0x32ebc7){const _0x5222f3=await resolveWorkspaceEntry(_0x37631e,relative(_0x37631e,resolve(_0x5a7012,_0x3fce81)),![])[_0x4c0896(0x13e)](_0x1cb5bf=>{if(isSkippableWorkspaceEntryError(_0x1cb5bf))return undefined;throw _0x1cb5bf;});if(_0x5222f3===undefined)continue;const _0xab9ed6=await lstat(_0x5222f3)[_0x4c0896(0x13e)](_0xe92cf0=>{const _0x32100a=_0x4c0896;if(_0xe92cf0[_0x32100a(0x141)]===_0x32100a(0x217))return undefined;throw _0xe92cf0;});if(_0xab9ed6===undefined||!_0xab9ed6[_0x4c0896(0x16c)]()&&!_0xab9ed6[_0x4c0896(0x1d3)]())continue;_0x5aa03b[_0x4c0896(0x152)]({'path':relative(_0x37631e,_0x5222f3)[_0x4c0896(0x219)](sep)[_0x4c0896(0x1a9)]('/'),'name':_0x3fce81,'kind':_0xab9ed6[_0x4c0896(0x1d3)]()?_0x4c0896(0x1d6):_0x4c0896(0x14d),'size':_0xab9ed6[_0x4c0896(0x16c)]()?_0xab9ed6[_0x4c0896(0x20c)]:null,'modifiedAt':_0xab9ed6[_0x4c0896(0x13b)]});}const _0x576f90=_0x151aa8[_0x1de3c0+_0x32ebc7[_0x4c0896(0x149)]];return{'entries':_0x5aa03b,'nextCursor':_0x576f90===undefined||_0x32ebc7[_0x4c0896(0x149)]===-0x245b*0x1+-0x1*0x2c7+-0x1391*-0x2?null:encodeDirectoryCursor(_0x29ffe7,_0x32ebc7[_0x32ebc7[_0x4c0896(0x149)]-(0x2af+-0x1383+0x10d5)]),'truncated':_0x576f90!==undefined};}export async function mutateWorkspaceFile(_0x4549f8,_0x6391f7){const _0x4848f9=_0x350254,_0x6b7fdf=await realpath(_0x4549f8);if(_0x6391f7[_0x4848f9(0x15f)]===_0x4848f9(0x14b)||_0x6391f7[_0x4848f9(0x15f)]===_0x4848f9(0x19c)){const _0x246d96=await resolveNewWorkspaceEntry(_0x6b7fdf,_0x6391f7[_0x4848f9(0x1bd)]);if(_0x6391f7[_0x4848f9(0x15f)]===_0x4848f9(0x14b))await writeFile(_0x246d96,'',{'flag':'wx'});else await mkdir(_0x246d96);return{'path':workspaceRelativePath(_0x6b7fdf,_0x246d96)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x6b7fdf,_0x6391f7[_0x4848f9(0x1bd)]);const _0x31b542=await resolveWorkspaceEntryMetadata(_0x6b7fdf,_0x6391f7[_0x4848f9(0x1bd)]);if(workspaceRelativePath(_0x6b7fdf,_0x31b542[_0x4848f9(0x1bd)])==='.')throw new Error(_0x4848f9(0x1d9));if(_0x6391f7[_0x4848f9(0x15f)]===_0x4848f9(0x1e0))return await rm(_0x31b542[_0x4848f9(0x1bd)],{'recursive':_0x31b542[_0x4848f9(0x111)][_0x4848f9(0x1d3)](),'force':![]}),{'deleted':!![]};const _0x3e2524=await resolveNewWorkspaceEntry(_0x6b7fdf,_0x6391f7[_0x4848f9(0x15d)]);if(_0x31b542[_0x4848f9(0x111)][_0x4848f9(0x1d3)]()){const _0x14dbba=relative(_0x31b542[_0x4848f9(0x1bd)],_0x3e2524);if(_0x14dbba===''||!isAbsolute(_0x14dbba)&&_0x14dbba!=='..'&&!_0x14dbba[_0x4848f9(0x1f7)]('..'+sep))throw new Error(_0x4848f9(0x172));}return await rename(_0x31b542[_0x4848f9(0x1bd)],_0x3e2524),{'path':workspaceRelativePath(_0x6b7fdf,_0x3e2524)};}async function resolveNewWorkspaceEntry(_0x5d662a,_0x296aac){const _0x529df5=_0x350254,_0x514a94=_0x296aac[_0x529df5(0x1a8)]('\x5c','/'),_0x1e229e=_0x514a94[_0x529df5(0x219)]('/'),_0x284419=_0x1e229e['at'](-(0x1*0x12d9+0x1*-0x1871+0x599));if(_0x296aac[_0x529df5(0x185)]('\x00')||_0x514a94[_0x529df5(0x1f7)]('/')||isAbsolute(_0x296aac)||win32[_0x529df5(0x1f9)](_0x514a94)||_0x284419===undefined||_0x284419[_0x529df5(0x149)]===-0x1e2b*-0x1+0x184+0x1faf*-0x1||_0x1e229e[_0x529df5(0x16b)](invalidWorkspaceMutationSegment))throw new Error(_0x529df5(0x150));const _0x5e0404=_0x1e229e[_0x529df5(0x149)]===0x448*-0x8+-0x24*-0x5c+0x1551?'.':_0x1e229e[_0x529df5(0x20e)](0x4c1+-0x1*0x343+-0x1*0x17e,-(-0xcd1+-0x1819+0x2d7*0xd))[_0x529df5(0x1a9)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0x5d662a,_0x5e0404);const _0xaeb17=await resolveWorkspaceEntryFromCanonicalRoot(_0x5d662a,_0x5e0404,!![]),_0x11b143=resolve(_0xaeb17,_0x284419);try{await lstat(_0x11b143);throw new Error(_0x529df5(0x1b0));}catch(_0x36ebdd){if(_0x36ebdd[_0x529df5(0x141)]!==_0x529df5(0x217))throw _0x36ebdd;}return _0x11b143;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x25d0b5,_0x2fe6f6){const _0x22a5cb=_0x350254,_0x5e95d1=_0x2fe6f6[_0x22a5cb(0x1a8)]('\x5c','/');if(_0x5e95d1==='.')return;const _0x3c9166=_0x5e95d1[_0x22a5cb(0x219)]('/');if(_0x2fe6f6[_0x22a5cb(0x185)]('\x00')||_0x5e95d1[_0x22a5cb(0x1f7)]('/')||isAbsolute(_0x2fe6f6)||win32[_0x22a5cb(0x1f9)](_0x5e95d1)||_0x3c9166[_0x22a5cb(0x16b)](invalidWorkspaceMutationSegment))throw new Error(_0x22a5cb(0x150));let _0x5a1c70=_0x25d0b5;for(const _0x22a54c of _0x3c9166){_0x5a1c70=resolve(_0x5a1c70,_0x22a54c);const _0x2bc42e=await lstat(_0x5a1c70)[_0x22a5cb(0x13e)](_0x31305e=>{const _0x4fbe10=_0x22a5cb;if(_0x31305e[_0x4fbe10(0x141)]===_0x4fbe10(0x217))throw new Error(_0x4fbe10(0x114));throw _0x31305e;});if(_0x2bc42e[_0x22a5cb(0x159)]())throw new Error(_0x22a5cb(0x150));}}function invalidWorkspaceMutationSegment(_0x38c529){const _0x16eec1=_0x350254;if(_0x38c529[_0x16eec1(0x149)]===0x16ef+-0xec4+-0x33*0x29||_0x38c529==='.'||_0x38c529==='..'||_0x38c529===_0x16eec1(0x11b))return!![];if(_0xd083e6()!==_0x16eec1(0x184))return![];const _0x54d2de=_0x38c529[_0x16eec1(0x157)](/[. ]+$/u,'')[_0x16eec1(0x12d)]();return/[<>:"|?*]/u[_0x16eec1(0x117)](_0x38c529)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x16eec1(0x117)](_0x54d2de);}function workspaceRelativePath(_0x2515c3,_0x3dc7a9){const _0x5d1c61=_0x350254,_0x3a88dd=relative(_0x2515c3,_0x3dc7a9)[_0x5d1c61(0x219)](sep)[_0x5d1c61(0x1a9)]('/');return _0x3a88dd[_0x5d1c61(0x149)]===-0x471+0x2*0xc65+-0x1459?'.':_0x3a88dd;}function isSkippableWorkspaceEntryError(_0x5477ad){const _0x21ec11=_0x350254;return _0x5477ad instanceof Error&&(_0x5477ad[_0x21ec11(0x1c0)]===_0x21ec11(0x150)||_0x5477ad[_0x21ec11(0x1c0)]===_0x21ec11(0x114)||_0x5477ad[_0x21ec11(0x1c0)]===_0x21ec11(0x21b));}export async function preflightWorkspaceUpload(_0x1c48fd,_0x4d06c7,_0x205f4d){const _0x50bd72=_0x350254;if(_0x205f4d[_0x50bd72(0x149)]===0x2*0x12b5+-0x1*0x10ad+-0x14bd||_0x205f4d==='.'||_0x205f4d==='..'||_0x205f4d[_0x50bd72(0x185)]('\x00')||_0x205f4d[_0x50bd72(0x185)]('/')||_0x205f4d[_0x50bd72(0x185)]('\x5c')||isWorkspaceUploadTemporaryName(_0x205f4d))return{'path':'','absolutePath':'','status':_0x50bd72(0x138)};const _0x1b307d=await realpath(_0x1c48fd),_0x49bbac=await resolveWorkspaceEntry(_0x1b307d,_0x4d06c7,!![]),_0x12f40c=resolve(_0x49bbac,_0x205f4d);if(dirname(_0x12f40c)!==_0x49bbac)throw new Error(_0x50bd72(0x150));const _0x5e1cb4=relative(_0x1b307d,_0x12f40c)[_0x50bd72(0x219)](sep)[_0x50bd72(0x1a9)]('/'),_0x1f77f5=await lstat(_0x12f40c)[_0x50bd72(0x13e)](_0x5cd491=>{const _0x450b46=_0x50bd72;if(_0x5cd491[_0x450b46(0x141)]===_0x450b46(0x217))return undefined;throw _0x5cd491;});if(_0x1f77f5===undefined)return{'path':_0x5e1cb4,'absolutePath':_0x12f40c,'status':_0x50bd72(0x1b2)};if(_0x1f77f5[_0x50bd72(0x159)]())throw new Error(_0x50bd72(0x150));if(_0x1f77f5[_0x50bd72(0x16c)]())return{'path':_0x5e1cb4,'absolutePath':_0x12f40c,'status':_0x50bd72(0x1ad)};return{'path':_0x5e1cb4,'absolutePath':_0x12f40c,'status':_0x50bd72(0x1f5)};}export function workspaceUploadTemporaryName(_0x536a95){const _0x38599b=_0x350254;return _0x38599b(0x1b7)+_0x536a95+_0x38599b(0x11c);}function isWorkspaceUploadTemporaryName(_0x12e9dc){const _0x4ec659=_0x350254;return/^\.mar-upload-[0-9a-f-]{36}\.part$/i[_0x4ec659(0x117)](_0x12e9dc);}export async function readWorkspaceTextFile(_0x22349f,_0x235a98,_0x1182c9=-0x1*0x23d0+0x4*-0x3df+-0x19a6*-0x2,_0x2da92c=FILE_READ_LIMIT){const _0x1848cb=_0x350254;if(!Number[_0x1848cb(0x1eb)](_0x1182c9)||_0x1182c9<0x698+-0x1*-0x135b+0x1*-0x19f3||!Number[_0x1848cb(0x1eb)](_0x2da92c)||_0x2da92c<-0xc52*0x1+-0x6*0x51b+-0x7*-0x623||_0x2da92c>FILE_READ_LIMIT)throw new Error(_0x1848cb(0x1c2));const _0x366f90=await realpath(_0x22349f),_0x15223e=await resolveWorkspaceEntry(_0x366f90,_0x235a98,![]),_0xf6226c=await lstat(_0x15223e);if(!_0xf6226c[_0x1848cb(0x16c)]())throw new Error(_0x1848cb(0x21b));if(_0xf6226c[_0x1848cb(0x20c)]>FILE_READ_LIMIT*(-0x43f+0x1*0xaf4+0x3f*-0x1b))throw new Error(_0x1848cb(0x161));const _0x8b80b1=await readFile(_0x15223e),_0x419996=_0x8b80b1[_0x1848cb(0x185)](-0x79f*-0x1+-0xdf6*0x2+0x144d)||!isValidUtf8(_0x8b80b1);if(_0x419996){const _0x266514=Math[_0x1848cb(0x19e)](_0x8b80b1[_0x1848cb(0x149)],_0x1182c9+_0x2da92c),_0x4bab99=_0x8b80b1[_0x1848cb(0x16a)](_0x1182c9,_0x266514);return{'path':relative(_0x366f90,_0x15223e)[_0x1848cb(0x219)](sep)[_0x1848cb(0x1a9)]('/'),'encoding':_0x1848cb(0x168),'size':_0x8b80b1[_0x1848cb(0x149)],'content':_0x4bab99[_0x1848cb(0x220)](_0x1848cb(0x168)),'truncated':_0x266514<_0x8b80b1[_0x1848cb(0x149)],'nextOffset':_0x266514<_0x8b80b1[_0x1848cb(0x149)]?_0x266514:null};}if(_0x1182c9>-0xca2+-0x1656+-0x6*-0x5d4&&_0x1182c9<_0x8b80b1[_0x1848cb(0x149)]&&isUtf8ContinuationByte(_0x8b80b1[_0x1182c9]))throw new Error(_0x1848cb(0x1c2));let _0x137ed8=Math[_0x1848cb(0x19e)](_0x8b80b1[_0x1848cb(0x149)],_0x1182c9+_0x2da92c);if(_0x137ed8<_0x8b80b1[_0x1848cb(0x149)]&&isUtf8ContinuationByte(_0x8b80b1[_0x137ed8])){while(_0x137ed8>_0x1182c9&&isUtf8ContinuationByte(_0x8b80b1[_0x137ed8]))_0x137ed8-=-0x219+-0x1a*0x133+0x2148;if(_0x137ed8===_0x1182c9){_0x137ed8+=-0x485*0x7+-0x5*0x2c7+0x2d87;while(_0x137ed8<_0x8b80b1[_0x1848cb(0x149)]&&isUtf8ContinuationByte(_0x8b80b1[_0x137ed8]))_0x137ed8+=0x13b*-0x11+0x2635+-0x1149;}}const _0x39efd6=_0x8b80b1[_0x1848cb(0x16a)](_0x1182c9,_0x137ed8),_0x4eba95=new TextDecoder(_0x1848cb(0x1d8),{'fatal':!![]})[_0x1848cb(0x1f6)](_0x39efd6),_0x1c719e=_0x137ed8<_0x8b80b1[_0x1848cb(0x149)]?_0x137ed8:null;return{'path':relative(_0x366f90,_0x15223e)[_0x1848cb(0x219)](sep)[_0x1848cb(0x1a9)]('/'),'encoding':_0x1848cb(0x1d8),'size':_0x8b80b1[_0x1848cb(0x149)],'content':_0x4eba95,'truncated':_0x1c719e!==null,'nextOffset':_0x1c719e};}export async function readWorkspaceFileContentRange(_0x2c745f,_0x357e3e,_0x216c44=-0x2095+0x1b03+0x592,_0x53f405=FILE_READ_LIMIT){const _0x5e7860=_0x350254;if(!Number[_0x5e7860(0x1eb)](_0x216c44)||_0x216c44<0x191c+-0x23dd+0xac1||!Number[_0x5e7860(0x1eb)](_0x53f405)||_0x53f405<-0xeab+0x239d+-0x14f1||_0x53f405>FILE_READ_LIMIT)throw new Error(_0x5e7860(0x1c2));const _0x65929c=await realpath(_0x2c745f),_0x4f0d2b=await resolveWorkspaceEntry(_0x65929c,_0x357e3e,![]),_0x4440af=await lstat(_0x4f0d2b);if(!_0x4440af[_0x5e7860(0x16c)]())throw new Error(_0x5e7860(0x21b));if(_0x216c44>_0x4440af[_0x5e7860(0x20c)])throw new Error(_0x5e7860(0x1c2));const _0x250d2a=Math[_0x5e7860(0x19e)](_0x53f405,_0x4440af[_0x5e7860(0x20c)]-_0x216c44),_0xaf99c3=Buffer[_0x5e7860(0x19a)](_0x250d2a),_0x4f5f46=await open(_0x4f0d2b,'r');try{const {bytesRead:_0x2eae7e}=await _0x4f5f46[_0x5e7860(0x1ce)](_0xaf99c3,0x164+0xb57*-0x2+0x221*0xa,_0x250d2a,_0x216c44),_0x5362b9=_0x216c44+_0x2eae7e;return{'path':relative(_0x65929c,_0x4f0d2b)[_0x5e7860(0x219)](sep)[_0x5e7860(0x1a9)]('/'),'size':_0x4440af[_0x5e7860(0x20c)],'offset':_0x216c44,'contentBase64':_0xaf99c3[_0x5e7860(0x16a)](-0x1ee+0x1a2b+-0x183d,_0x2eae7e)[_0x5e7860(0x220)](_0x5e7860(0x168)),'nextOffset':_0x5362b9<_0x4440af[_0x5e7860(0x20c)]?_0x5362b9:null};}finally{await _0x4f5f46[_0x5e7860(0x1af)]();}}export async function readAllowedTextFile(_0x5764a3,_0x5e86b8,_0x2786a1=0x104+-0xacb*-0x3+0x1*-0x2165,_0x4455b6=FILE_READ_LIMIT){const _0x12f65a=_0x350254;if(!isAbsolute(_0x5764a3))throw new Error(_0x12f65a(0x150));const _0x259244=await realpath(_0x5764a3)[_0x12f65a(0x13e)](_0x1e5130=>{const _0x452058=_0x12f65a;if(_0x1e5130[_0x452058(0x141)]===_0x452058(0x217))throw new Error(_0x452058(0x114));throw _0x1e5130;}),_0x494a38=await Promise[_0x12f65a(0x13a)](_0x5e86b8[_0x12f65a(0x11d)](_0x170280=>realpath(_0x170280)));if(!isWithinAllowedRoot(_0x259244,_0x494a38))throw new Error(_0x12f65a(0x150));const _0x53de50=await lstat(_0x259244);if(!_0x53de50[_0x12f65a(0x16c)]())throw new Error(_0x12f65a(0x21b));if(_0x53de50[_0x12f65a(0x20c)]>FILE_READ_LIMIT*(-0x1763+-0xb7d*0x3+-0x1*-0x39ea))throw new Error(_0x12f65a(0x161));if(!Number[_0x12f65a(0x1eb)](_0x2786a1)||_0x2786a1<0x31c+-0x3*0x71e+0x123e||!Number[_0x12f65a(0x1eb)](_0x4455b6)||_0x4455b6<0x1899+-0x8*0xb+0x610*-0x4||_0x4455b6>FILE_READ_LIMIT)throw new Error(_0x12f65a(0x1c2));const _0x228550=await readFile(_0x259244),_0x54418b=_0x228550[_0x12f65a(0x185)](0x8ad+0x1*0x1165+-0x1a12)||!isValidUtf8(_0x228550),_0x6488a2=Math[_0x12f65a(0x19e)](_0x228550[_0x12f65a(0x149)],_0x2786a1+_0x4455b6);if(_0x54418b){const _0x54c824=_0x228550[_0x12f65a(0x16a)](_0x2786a1,_0x6488a2);return{'path':_0x259244,'encoding':_0x12f65a(0x168),'size':_0x228550[_0x12f65a(0x149)],'content':_0x54c824[_0x12f65a(0x220)](_0x12f65a(0x168)),'truncated':_0x6488a2<_0x228550[_0x12f65a(0x149)],'nextOffset':_0x6488a2<_0x228550[_0x12f65a(0x149)]?_0x6488a2:null};}if(_0x2786a1>0x1*-0x20a1+0x1238+0xe69&&_0x2786a1<_0x228550[_0x12f65a(0x149)]&&isUtf8ContinuationByte(_0x228550[_0x2786a1]))throw new Error(_0x12f65a(0x1c2));let _0x1b1112=_0x6488a2;if(_0x1b1112<_0x228550[_0x12f65a(0x149)]&&isUtf8ContinuationByte(_0x228550[_0x1b1112])){while(_0x1b1112>_0x2786a1&&isUtf8ContinuationByte(_0x228550[_0x1b1112]))_0x1b1112-=-0x7eb+0xb5f+-0x373;if(_0x1b1112===_0x2786a1){_0x1b1112+=0x2660+0xee7+-0x3546;while(_0x1b1112<_0x228550[_0x12f65a(0x149)]&&isUtf8ContinuationByte(_0x228550[_0x1b1112]))_0x1b1112+=0xded+-0x226e+0x1482;}}const _0x304f2f=_0x1b1112<_0x228550[_0x12f65a(0x149)]?_0x1b1112:null;return{'path':_0x259244,'encoding':_0x12f65a(0x1d8),'size':_0x228550[_0x12f65a(0x149)],'content':new TextDecoder(_0x12f65a(0x1d8),{'fatal':!![]})[_0x12f65a(0x1f6)](_0x228550[_0x12f65a(0x16a)](_0x2786a1,_0x1b1112)),'truncated':_0x304f2f!==null,'nextOffset':_0x304f2f};}function isValidUtf8(_0x1fa135){const _0x51b025=_0x350254;try{return new TextDecoder(_0x51b025(0x1d8),{'fatal':!![]})[_0x51b025(0x1f6)](_0x1fa135),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x48adfa){return(_0x48adfa&0x28d*0x9+0x114b+-0x8*0x4f0)===0xc24+-0x203c+-0x293*-0x8;}export async function searchWorkspaceFiles(_0x561fd4,_0x21bd8f,_0x136901,_0x4ec71a=SEARCH_RESULT_LIMIT,_0x1cf101=![]){const _0x4ec4a1=_0x350254,_0x270ed9=new WorkspaceFileIndex(_0x561fd4);try{return await _0x270ed9[_0x4ec4a1(0x223)](_0x21bd8f,_0x136901,_0x4ec71a,_0x1cf101);}finally{_0x270ed9[_0x4ec4a1(0x13f)]();}}async function resolveWorkspaceEntry(_0x473fb4,_0xd1b994,_0x54a8a1){const _0x1c9b46=await realpath(_0x473fb4);return resolveWorkspaceEntryFromCanonicalRoot(_0x1c9b46,_0xd1b994,_0x54a8a1);}async function resolveWorkspaceEntryFromCanonicalRoot(_0x583a47,_0x57a9f7,_0xe01e00){const _0x1407ae=_0x350254,_0x2c6bc6=await resolveWorkspaceEntryMetadata(_0x583a47,_0x57a9f7);if(_0xe01e00?!_0x2c6bc6[_0x1407ae(0x111)][_0x1407ae(0x1d3)]():!_0x2c6bc6[_0x1407ae(0x111)][_0x1407ae(0x16c)]()&&!_0x2c6bc6[_0x1407ae(0x111)][_0x1407ae(0x1d3)]())throw new Error(_0xe01e00?_0x1407ae(0x18c):_0x1407ae(0x21b));return _0x2c6bc6[_0x1407ae(0x1bd)];}async function resolveWorkspaceEntryMetadata(_0x37973b,_0x522647){const _0x24ca87=_0x350254;if(_0x522647[_0x24ca87(0x185)]('\x00')||_0x522647[_0x24ca87(0x149)]===0x24d*0x2+-0x1*-0x1889+-0x1*0x1d23||_0x522647[_0x24ca87(0x1f7)]('/')||_0x522647[_0x24ca87(0x1f7)]('\x5c'))throw new Error(_0x24ca87(0x150));const _0x33f0b7=_0x522647[_0x24ca87(0x1a8)]('\x5c','/');if(_0x33f0b7[_0x24ca87(0x219)]('/')[_0x24ca87(0x16b)](_0x230fcb=>_0x230fcb==='..'||_0x230fcb===_0x24ca87(0x11b)))throw new Error(_0x24ca87(0x150));let _0x454d58;try{_0x454d58=await realpath(resolve(_0x37973b,_0x33f0b7));}catch(_0x1ec848){if(_0x1ec848[_0x24ca87(0x141)]===_0x24ca87(0x217))throw new Error(_0x24ca87(0x114));throw _0x1ec848;}const _0x1d7cb7=relative(_0x37973b,_0x454d58);if(isAbsolute(_0x1d7cb7)||_0x1d7cb7[_0x24ca87(0x1f7)]('..')||_0x1d7cb7==='..'||_0x1d7cb7[_0x24ca87(0x1f7)]('..'+sep))throw new Error(_0x24ca87(0x150));const _0x49c9f3=await lstat(_0x454d58);return{'path':_0x454d58,'metadata':_0x49c9f3};}async function inspectWorkspaceIndexEntry(_0x3d9a0c,_0x329d44,_0x4c0316){const _0x3fa30d=_0x350254;try{const _0x1c1767=await resolveWorkspaceEntryMetadata(_0x3d9a0c,_0x329d44);if(!_0x1c1767[_0x3fa30d(0x111)][_0x3fa30d(0x16c)]()&&!_0x1c1767[_0x3fa30d(0x111)][_0x3fa30d(0x1d3)]())return undefined;const _0x59b2be=relative(_0x3d9a0c,_0x1c1767[_0x3fa30d(0x1bd)])[_0x3fa30d(0x219)](sep)[_0x3fa30d(0x1a9)]('/');return _0x1c1767[_0x3fa30d(0x111)][_0x3fa30d(0x1d3)]()?{'path':_0x59b2be,'name':_0x4c0316,'kind':_0x3fa30d(0x1d6),'size':null,'modifiedAt':_0x1c1767[_0x3fa30d(0x111)][_0x3fa30d(0x13b)]}:{'path':_0x59b2be,'name':_0x4c0316,'kind':_0x3fa30d(0x14d),'size':_0x1c1767[_0x3fa30d(0x111)][_0x3fa30d(0x20c)],'modifiedAt':_0x1c1767[_0x3fa30d(0x111)][_0x3fa30d(0x13b)]};}catch{return undefined;}}function _0x57ac(_0x3ee6a3,_0x7c5196){_0x3ee6a3=_0x3ee6a3-(0x7a7*-0x1+-0xfd3+-0x15d*-0x12);const _0x512a67=_0x4e33();let _0x460dc0=_0x512a67[_0x3ee6a3];if(_0x57ac['eKLugk']===undefined){var _0x3d9a8f=function(_0x32e543){const _0x2033ef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4bf711='',_0x4c9eee='';for(let _0x43df65=-0xd57+-0x25dd+0x1d*0x1c4,_0x2bbcae,_0x37bbde,_0x2bcce3=0x209f+-0x8c*0x20+0x31*-0x4f;_0x37bbde=_0x32e543['charAt'](_0x2bcce3++);~_0x37bbde&&(_0x2bbcae=_0x43df65%(0x1*-0xf9f+0x32*0xb8+-0x1*0x144d)?_0x2bbcae*(-0x1ebe+0x1804+0x6fa)+_0x37bbde:_0x37bbde,_0x43df65++%(0x56*0x2b+0xb*0x2a7+0xb7*-0x3d))?_0x4bf711+=String['fromCharCode'](0xa*0x2+-0x2154+0x223f&_0x2bbcae>>(-(-0xe6f*-0x2+0x1f16+-0x3bf2)*_0x43df65&-0x21b4+0x65e+0xdae*0x2)):-0x1b*-0x169+0xea*0x1f+0x4269*-0x1){_0x37bbde=_0x2033ef['indexOf'](_0x37bbde);}for(let _0x376d63=-0x77*0x29+0x1f1f*-0x1+0x10ba*0x3,_0xa99c00=_0x4bf711['length'];_0x376d63<_0xa99c00;_0x376d63++){_0x4c9eee+='%'+('00'+_0x4bf711['charCodeAt'](_0x376d63)['toString'](0x25b*0xd+0x1ffb+-0x3e8a))['slice'](-(0x1*-0x2351+0x1b47+0x14*0x67));}return decodeURIComponent(_0x4c9eee);};_0x57ac['BguahL']=_0x3d9a8f,_0x57ac['zKeojI']={},_0x57ac['eKLugk']=!![];}const _0x5bd606=_0x512a67[0x20ea+-0x19b1*-0x1+0x3*-0x1389];_0x57ac['OQNEQC']!==_0x5bd606&&(_0x57ac['zKeojI']={},_0x57ac['OQNEQC']=_0x5bd606);const _0x1a206=_0x57ac['zKeojI'][_0x3ee6a3];return _0x1a206===undefined?(_0x460dc0=_0x57ac['BguahL'](_0x460dc0),_0x57ac['zKeojI'][_0x3ee6a3]=_0x460dc0):_0x460dc0=_0x1a206,_0x460dc0;}function encodeDirectoryCursor(_0x39ca37,_0x2d0aee){const _0x5b7381=_0x350254;return Buffer[_0x5b7381(0x120)](JSON[_0x5b7381(0x123)]({'path':_0x39ca37,'name':_0x2d0aee}))[_0x5b7381(0x220)](_0x5b7381(0x187));}function decodeDirectoryCursor(_0x53b306,_0x3841af){const _0x5f0786=_0x350254;if(_0x53b306===undefined)return undefined;try{const _0x4ce307=JSON[_0x5f0786(0x1d7)](Buffer[_0x5f0786(0x120)](_0x53b306,_0x5f0786(0x187))[_0x5f0786(0x220)](_0x5f0786(0x1b9)));if(typeof _0x4ce307!==_0x5f0786(0x12f)||_0x4ce307===null||_0x4ce307[_0x5f0786(0x1bd)]!==_0x3841af||typeof _0x4ce307[_0x5f0786(0x1e2)]!==_0x5f0786(0x19d))throw new Error();return _0x4ce307[_0x5f0786(0x1e2)];}catch{throw new Error(_0x5f0786(0x17c));}}function encodeSearchCursor(_0x73bc45,_0x15293e){const _0x1deaf4=_0x350254;return Buffer[_0x1deaf4(0x120)](JSON[_0x1deaf4(0x123)]({'query':_0x73bc45,'path':_0x15293e}))[_0x1deaf4(0x220)](_0x1deaf4(0x187));}function decodeSearchCursor(_0x302b06,_0x42061e){const _0x51de9a=_0x350254;if(_0x302b06===undefined)return undefined;try{const _0x43124f=JSON[_0x51de9a(0x1d7)](Buffer[_0x51de9a(0x120)](_0x302b06,_0x51de9a(0x187))[_0x51de9a(0x220)](_0x51de9a(0x1b9)));if(typeof _0x43124f!==_0x51de9a(0x12f)||_0x43124f===null||_0x43124f[_0x51de9a(0x19f)]!==_0x42061e||typeof _0x43124f[_0x51de9a(0x1bd)]!==_0x51de9a(0x19d))throw new Error();return _0x43124f[_0x51de9a(0x1bd)];}catch{throw new Error(_0x51de9a(0x17c));}}export function normalizeWorkspacePath(_0x58b33c,_0x491db3=_0xd083e6()){const _0x1ea757=_0x350254;if(_0x58b33c[_0x1ea757(0x149)]===0xaa9*-0x1+-0xdfd*-0x2+-0x1151||_0x58b33c[_0x1ea757(0x185)]('\u0000'))throw new Error(_0x1ea757(0x202));if(_0x491db3===_0x1ea757(0x184)){if(/^\\\\[?.]/[_0x1ea757(0x117)](_0x58b33c))throw new Error(_0x1ea757(0x227));const _0x599d31=win32[_0x1ea757(0x1ee)](_0x58b33c[_0x1ea757(0x1a8)]('/','\x5c'));if(!win32[_0x1ea757(0x1f9)](_0x599d31))throw new Error(_0x1ea757(0x1bb));return _0x599d31[_0x1ea757(0x157)](/\\+$/,'')[_0x1ea757(0x1ba)]();}if(_0x491db3!==_0x1ea757(0x12c))throw new Error(_0x1ea757(0x140));const _0x270f55=posix[_0x1ea757(0x1ee)](_0x58b33c);if(!posix[_0x1ea757(0x1f9)](_0x270f55))throw new Error(_0x1ea757(0x1bb));return _0x270f55==='/'?_0x270f55:_0x270f55[_0x1ea757(0x157)](/\/+$/,'');}export function isWithinAllowedRoot(_0x2b5db5,_0x52cc06,_0x1a9b98=_0xd083e6()){const _0x201310=_0x350254,_0x540a81=normalizeWorkspacePath(_0x2b5db5,_0x1a9b98),_0x4f0044=_0x1a9b98===_0x201310(0x184)?win32:posix;return _0x52cc06[_0x201310(0x16b)](_0x223003=>{const _0x9af94a=_0x201310,_0x409bd0=normalizeWorkspacePath(_0x223003,_0x1a9b98),_0x15fe13=_0x4f0044[_0x9af94a(0x14a)](_0x409bd0,_0x540a81);return _0x15fe13===''||!_0x15fe13[_0x9af94a(0x1f7)]('..')&&!_0x4f0044[_0x9af94a(0x1f9)](_0x15fe13);});}export async function inspectWorkspace(_0xd72dec,_0x2da7bb){const _0x349c98=_0x350254,_0x20b0c1=await realpath(_0xd72dec),_0x40d83e=await Promise[_0x349c98(0x13a)](_0x2da7bb[_0x349c98(0x11d)](_0x39e612=>realpath(_0x39e612))),_0x13521f=await stat(_0x20b0c1);if(!_0x13521f[_0x349c98(0x1d3)]()||!isWithinAllowedRoot(_0x20b0c1,_0x40d83e))throw new Error(_0x349c98(0x1d4));try{const _0x6ec246=await readGitSummary(_0x20b0c1);return{'path':_0x20b0c1,'kind':_0x349c98(0x224),'gitSummary':_0x6ec246};}catch(_0x5c487d){if(_0x5c487d instanceof GitCommandError&&_0x5c487d[_0x349c98(0x141)]===-0x1a47*-0x1+0x5*0x209+-0x23f4||isGitUnavailable(_0x5c487d))return{'path':_0x20b0c1,'kind':_0x349c98(0x1d6)};throw _0x5c487d;}}export async function readGitSummary(_0x21a6da){const _0x2989cb=_0x350254,_0x5c4883=(await runGit(_0x21a6da,[_0x2989cb(0x1b8),_0x2989cb(0x1c8)]))[_0x2989cb(0x14f)][_0x2989cb(0x1cf)](),_0x18686d=(await runGit(_0x21a6da,[_0x2989cb(0x1b8),_0x2989cb(0x225),_0x2989cb(0x154)]))[_0x2989cb(0x14f)][_0x2989cb(0x1cf)](),_0x155802=await runGitAllowFailure(_0x21a6da,[_0x2989cb(0x18f),_0x2989cb(0x1c4),_0x2989cb(0x143),_0x2989cb(0x154)]),_0xb9fb75=(await runGit(_0x21a6da,[_0x2989cb(0x1a0),_0x2989cb(0x132),'-z']))[_0x2989cb(0x125)][_0x2989cb(0x149)]>0x220*0xc+-0x6d+0x31*-0x83,_0x23f04c=await runGit(_0x21a6da,[_0x2989cb(0x1a0),_0x2989cb(0x132)])[_0x2989cb(0x1c5)](_0x16cb2d=>_0x16cb2d[_0x2989cb(0x14f)]);return{'commonDir':_0x5c4883,'head':_0x18686d,'branch':_0x155802[_0x2989cb(0x141)]===0x1b51+-0x27*0x63+0x74*-0x1b?_0x155802[_0x2989cb(0x14f)][_0x2989cb(0x1cf)]():null,'dirty':_0xb9fb75,'snapshot':summarizeText(_0x23f04c)};}export function assertSafeGitRef(_0x494bf9){const _0x5cb506=_0x350254;if(!REF_PATTERN[_0x5cb506(0x117)](_0x494bf9))throw new Error(_0x5cb506(0x122));}export async function readRestrictedDiff(_0x24129d,_0x482733,_0x1b8958){const _0x9ec07d=_0x350254;assertSafeGitRef(_0x482733),assertSafeGitRef(_0x1b8958);const _0x4cd416=await runGit(_0x24129d,[_0x9ec07d(0x1ab),_0x9ec07d(0x18e),_0x9ec07d(0x1e9),_0x482733,_0x1b8958]),_0x42413d=_0x4cd416[_0x9ec07d(0x125)][_0x9ec07d(0x185)](0x24d6+-0x237d+-0x159)||_0x4cd416[_0x9ec07d(0x14f)][_0x9ec07d(0x185)](_0x9ec07d(0x206));if(_0x42413d)return{'binary':!![],'summary':_0x9ec07d(0x156)+createHash(_0x9ec07d(0x194))[_0x9ec07d(0x1a2)](_0x4cd416[_0x9ec07d(0x125)])[_0x9ec07d(0x145)](_0x9ec07d(0x1a3))+_0x9ec07d(0x20b)+_0x4cd416[_0x9ec07d(0x125)][_0x9ec07d(0x149)],'truncated':_0x4cd416[_0x9ec07d(0x18a)]};return{'binary':![],'text':_0x4cd416[_0x9ec07d(0x14f)],'truncated':_0x4cd416[_0x9ec07d(0x18a)]};}function currentBranchFromStatusHeader(_0x60df63){const _0xb3f13d=_0x350254,_0x329b33=_0x60df63[_0xb3f13d(0x20e)](0xe76+-0x163b+-0xf9*-0x8);if(_0x329b33[_0xb3f13d(0x1f7)](_0xb3f13d(0x112)))return null;const _0x383b65=/^(?:No commits yet on|Initial commit on) (.+)$/[_0xb3f13d(0x12e)](_0x329b33);if(_0x383b65!==null)return _0x383b65[-0x1557+-0x1b*-0x12b+-0xa31*0x1]??null;return _0x329b33[_0xb3f13d(0x219)](_0xb3f13d(0x1fd))[-0xe5d+0x1*-0xfd4+0x3b*0x83]?.[_0xb3f13d(0x219)]('\x20')[-0x1*-0x3d7+0x1*0x1a93+0xf35*-0x2]??null;}export async function readCurrentChangesSummary(_0x2a9250){const _0x3d0ddd=_0x350254,_0x27702b=await runGit(_0x2a9250,[_0x3d0ddd(0x1a0),_0x3d0ddd(0x132),'-z',_0x3d0ddd(0x1e4),_0x3d0ddd(0x1cc)]),_0x3e0b8d=_0x27702b[_0x3d0ddd(0x14f)][_0x3d0ddd(0x219)]('\x00'),_0x390499=_0x3e0b8d[_0x3d0ddd(0x1d0)]()??'',_0x234d33=[];for(let _0x41cd47=0x14*-0x107+0x2587+-0x10fb;_0x41cd47<_0x3e0b8d[_0x3d0ddd(0x149)];_0x41cd47+=0xfd7+-0x1437+0x461){const _0x501248=_0x3e0b8d[_0x41cd47];if(_0x501248[_0x3d0ddd(0x149)]<0xa91+-0x9c1+-0xcc)continue;const _0x10591c=_0x501248[-0x1*0x1b05+-0x2*-0x33b+0x1*0x148f],_0x24dec1=_0x501248[0x69*0x1e+-0x1a55+0xe08],_0x5b1833=_0x501248[_0x3d0ddd(0x20e)](0x293+0x12ea+-0x157a);if(_0x10591c==='?'&&_0x24dec1==='?'){_0x234d33[_0x3d0ddd(0x152)]({'path':_0x5b1833,'state':_0x3d0ddd(0x1ae),'change':_0x3d0ddd(0x1f3)});continue;}_0x10591c!=='\x20'&&_0x234d33[_0x3d0ddd(0x152)]({'path':_0x5b1833,'state':_0x3d0ddd(0x1ed),'change':gitChange(_0x10591c)});_0x24dec1!=='\x20'&&_0x234d33[_0x3d0ddd(0x152)]({'path':_0x5b1833,'state':_0x3d0ddd(0x1f8),'change':gitChange(_0x24dec1)});if(_0x10591c==='R'||_0x10591c==='C'||_0x24dec1==='R'||_0x24dec1==='C')_0x41cd47+=0xad9*0x1+0x23*0x4c+-0x153c;}return{'branch':_0x390499[_0x3d0ddd(0x1f7)](_0x3d0ddd(0x1fe))?currentBranchFromStatusHeader(_0x390499):null,'changes':_0x234d33};}export async function listInitializedSubmodulePaths(_0x21d083){const _0x11a81c=_0x350254,_0x1c39e9=await runGit(_0x21d083,[_0x11a81c(0x181),_0x11a81c(0x1a0),_0x11a81c(0x17b)]);return _0x1c39e9[_0x11a81c(0x14f)][_0x11a81c(0x219)](/\r?\n/)[_0x11a81c(0x183)](_0x5bb524=>{const _0xc3a1c1=_0x11a81c;if(_0x5bb524[_0xc3a1c1(0x149)]<-0x109d+0x79c+0x92b)return[];const _0x181937=_0x5bb524[0x2316+0x1762+-0x3a78];if(_0x181937==='-')return[];const _0x164cf1=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0xc3a1c1(0x12e)](_0x5bb524),_0x26be17=_0x164cf1?.[0x1fe1+0x2176+-0x2*0x20ab]?.[_0xc3a1c1(0x1a8)]('\x5c','/');return _0x26be17===undefined||_0x26be17[_0xc3a1c1(0x149)]===0xcb5*0x1+0x1aeb+0x2*-0x13d0?[]:[_0x26be17];})[_0x11a81c(0x180)]((_0xca3c21,_0x1f84cf)=>_0xca3c21[_0x11a81c(0x1dc)](_0x1f84cf));}export async function resolveGitRepository(_0x17d897,_0xa2a066){const _0x51f7a3=_0x350254;if(_0xa2a066[_0x51f7a3(0x149)]===0x2fc+0x856*-0x2+-0x248*-0x6)return realpath(_0x17d897);if(_0xa2a066[_0x51f7a3(0x185)]('\x00')||_0xa2a066[_0x51f7a3(0x1f7)]('/')||_0xa2a066[_0x51f7a3(0x1f7)]('\x5c')||_0xa2a066[_0x51f7a3(0x219)]('/')[_0x51f7a3(0x16b)](_0x2054e2=>_0x2054e2[_0x51f7a3(0x149)]===0x2106+0x6*-0x3b7+-0x1*0xabc||_0x2054e2==='.'||_0x2054e2==='..'))throw new Error(_0x51f7a3(0x210));const _0x4b1363=await listInitializedSubmodulePaths(_0x17d897);if(!_0x4b1363[_0x51f7a3(0x185)](_0xa2a066))throw new Error(_0x51f7a3(0x210));const _0x3e3c29=resolve(await realpath(_0x17d897),_0xa2a066);try{await readGitSummary(_0x3e3c29);}catch{throw new Error(_0x51f7a3(0x210));}return _0x3e3c29;}export async function listGitHistoryRefs(_0x26f634){const _0x23eee4=_0x350254,_0xd1bdcf=await runGit(_0x26f634,[_0x23eee4(0x153),_0x23eee4(0x1ff),_0x23eee4(0x190),_0x23eee4(0x204)]);return _0xd1bdcf[_0x23eee4(0x14f)][_0x23eee4(0x219)](/\r?\n/)[_0x23eee4(0x183)](_0x35afea=>{const _0x5cd114=_0x23eee4,[_0x4e36f8,_0x329a97,_0x34b440,_0x3f19db,_0x3e455e]=_0x35afea[_0x5cd114(0x219)]('\x09');if(_0x4e36f8===undefined||_0x329a97===undefined||_0x34b440===undefined||_0x3e455e===undefined||_0x3e455e[_0x5cd114(0x149)]>-0x1ec4+0x40*-0x28+0x28c4||!/^[0-9a-f]{40,64}$/[_0x5cd114(0x117)](_0x34b440))return[];const _0x1b4544=_0x4e36f8[_0x5cd114(0x1f7)](_0x5cd114(0x1aa))?_0x5cd114(0x11e):_0x4e36f8[_0x5cd114(0x1f7)](_0x5cd114(0x164))?_0x5cd114(0x126):undefined;return _0x1b4544===undefined?[]:[{'name':_0x4e36f8,'displayName':_0x329a97,'kind':_0x1b4544,'hash':_0x34b440,'current':_0x3f19db==='*'}];})[_0x23eee4(0x180)]((_0x12aa6f,_0x1336bc)=>_0x12aa6f[_0x23eee4(0x163)][_0x23eee4(0x1dc)](_0x1336bc[_0x23eee4(0x163)])||_0x12aa6f[_0x23eee4(0x1f2)][_0x23eee4(0x1dc)](_0x1336bc[_0x23eee4(0x1f2)]));}function selectedHistoryRefs(_0x5a5e40,_0x9e3d4e){const _0x57963f=_0x350254;if(_0x9e3d4e===undefined||_0x9e3d4e[_0x57963f(0x149)]===0x1ae1+-0x42e*-0x4+0x1*-0x2b99)return _0x5a5e40;const _0x256d56=[...new Set(_0x9e3d4e)],_0x1575f8=_0x256d56[_0x57963f(0x11d)](_0x8aef4a=>_0x5a5e40[_0x57963f(0x1dd)](_0x4304f9=>_0x4304f9[_0x57963f(0x1e2)]===_0x8aef4a));if(_0x1575f8[_0x57963f(0x16b)](_0x46e74f=>_0x46e74f===undefined))throw new Error(_0x57963f(0x151));return _0x1575f8;}function historyCursor(_0x1fe512,_0x144af2){const _0x21bcfb=_0x350254;return Buffer[_0x21bcfb(0x120)](JSON[_0x21bcfb(0x123)]({'offset':_0x1fe512,'fingerprint':_0x144af2}))[_0x21bcfb(0x220)](_0x21bcfb(0x187));}function parseHistoryCursor(_0x1e6e07,_0x1e7620){const _0x1a55f9=_0x350254;if(_0x1e6e07===undefined)return 0x5*0x78d+-0x5ce*0x2+0x45*-0x61;try{const _0x252046=JSON[_0x1a55f9(0x1d7)](Buffer[_0x1a55f9(0x120)](_0x1e6e07,_0x1a55f9(0x187))[_0x1a55f9(0x220)](_0x1a55f9(0x1b9)));if(!Number[_0x1a55f9(0x17e)](_0x252046[_0x1a55f9(0x1f1)])||_0x252046[_0x1a55f9(0x1f1)]<0x3f*0x3+-0x11a1+0x10e4||_0x252046[_0x1a55f9(0x137)]!==_0x1e7620)throw new Error(_0x1a55f9(0x124));return _0x252046[_0x1a55f9(0x1f1)];}catch{throw new Error(_0x1a55f9(0x1b4));}}export async function readGitHistory(_0x240b22,_0x19d426){const _0x28ef4d=_0x350254,_0x4dfdfc=await listGitHistoryRefs(_0x240b22),_0x2a5b35=selectedHistoryRefs(_0x4dfdfc,_0x19d426[_0x28ef4d(0x214)]);if(_0x2a5b35[_0x28ef4d(0x149)]===-0x1be3+-0xb7a+0x275d)return{'commits':[],'nextCursor':null};const _0x40034b=_0x19d426[_0x28ef4d(0x1c9)]??0x39f+0xcbd+-0x102a*0x1;if(!Number[_0x28ef4d(0x17e)](_0x40034b)||_0x40034b<0x6c*-0x1e+0x1a39*0x1+0x70*-0x1f||_0x40034b>0xaa*0x2f+-0x2371*-0x1+-0x4243)throw new Error(_0x28ef4d(0x212));const _0x41100e=_0x2a5b35[_0x28ef4d(0x11d)](_0x16f733=>_0x16f733[_0x28ef4d(0x1e2)])[_0x28ef4d(0x180)](),_0x1b90bf=createHash(_0x28ef4d(0x194))[_0x28ef4d(0x1a2)](_0x2a5b35[_0x28ef4d(0x11d)](_0x415156=>_0x415156[_0x28ef4d(0x1e2)]+'\x00'+_0x415156[_0x28ef4d(0x162)])[_0x28ef4d(0x180)]()[_0x28ef4d(0x1a9)]('\x00'))[_0x28ef4d(0x145)](_0x28ef4d(0x1a3)),_0x159246=parseHistoryCursor(_0x19d426[_0x28ef4d(0x155)],_0x1b90bf),_0x4bf1cd=await runGit(_0x240b22,[_0x28ef4d(0x1fa),_0x28ef4d(0x178),_0x28ef4d(0x1e5),_0x28ef4d(0x177)+_0x159246,_0x28ef4d(0x207)+(_0x40034b+(0x2070+-0x160b+0x85*-0x14)),'-z',_0x28ef4d(0x175),..._0x41100e,'--']),_0x5706c7=new Map();for(const _0x4962d0 of _0x4dfdfc){const _0x563a2a=_0x5706c7[_0x28ef4d(0x115)](_0x4962d0[_0x28ef4d(0x162)])??[];_0x563a2a[_0x28ef4d(0x152)](_0x4962d0[_0x28ef4d(0x1f2)]),_0x5706c7[_0x28ef4d(0x13c)](_0x4962d0[_0x28ef4d(0x162)],_0x563a2a);}const _0x52ca52=_0x4bf1cd[_0x28ef4d(0x14f)][_0x28ef4d(0x219)]('\x00'),_0xa8b70b=[];for(let _0x4bc283=-0xd*-0x1bd+-0xfbb+0x1*-0x6de;_0x4bc283+(-0x175c+0x1164+0xdb*0x7)<_0x52ca52[_0x28ef4d(0x149)];_0x4bc283+=0x34*0x34+-0x19c*-0x11+-0x25e6){const [_0x16f0f6,_0x25c24e='',_0x597879='',_0x208064='',_0x59b5d5='0',_0x46afcc='']=_0x52ca52[_0x28ef4d(0x20e)](_0x4bc283,_0x4bc283+(-0x61*-0x1d+0xd1*0xd+-0x1594));if(_0x16f0f6===undefined||!/^[0-9a-f]{40,64}$/[_0x28ef4d(0x117)](_0x16f0f6))continue;_0xa8b70b[_0x28ef4d(0x152)]({'hash':_0x16f0f6,'parents':_0x25c24e[_0x28ef4d(0x149)]===-0x1039+0x2*0x548+0x5a9?[]:_0x25c24e[_0x28ef4d(0x219)]('\x20'),'authorName':_0x597879,'authorEmail':_0x208064,'committedAt':Number(_0x59b5d5)*(-0x2*0xec5+-0x18de*-0x1+0xf4*0x9),'subject':_0x46afcc,'refs':_0x5706c7[_0x28ef4d(0x115)](_0x16f0f6)??[]});}const _0x2fba24=_0xa8b70b[_0x28ef4d(0x149)]>_0x40034b;return{'commits':_0xa8b70b[_0x28ef4d(0x20e)](-0x5c6+0x1f*-0xc2+-0x1*-0x1d44,_0x40034b),'nextCursor':_0x2fba24?historyCursor(_0x159246+_0x40034b,_0x1b90bf):null};}async function assertHistoryCommitReachable(_0x1a4a55,_0x5883bf,_0x1a4369){const _0x503f1b=_0x350254;if(!/^[0-9a-f]{40,64}$/[_0x503f1b(0x117)](_0x5883bf))throw new Error(_0x503f1b(0x1ec));const _0xb955ca=selectedHistoryRefs(await listGitHistoryRefs(_0x1a4a55),_0x1a4369);for(const _0x577ce6 of _0xb955ca){const _0x5d0857=await runGitAllowFailure(_0x1a4a55,[_0x503f1b(0x1db),_0x503f1b(0x12a),_0x5883bf,_0x577ce6[_0x503f1b(0x1e2)]]);if(_0x5d0857[_0x503f1b(0x141)]===-0x157*0x1+-0x1*-0x1633+-0x14dc)return;}throw new Error(_0x503f1b(0x1ec));}export async function readGitHistoryFiles(_0x34396b,_0x4d3d03,_0x2a2086){const _0x404c79=_0x350254;await assertHistoryCommitReachable(_0x34396b,_0x4d3d03,_0x2a2086);const _0x3a1931=await runGit(_0x34396b,[_0x404c79(0x1cb),_0x404c79(0x1fb),_0x404c79(0x1a7),_0x404c79(0x144),'-r','-z','-M','-C',_0x404c79(0x209),_0x4d3d03]),_0x2de919=_0x3a1931[_0x404c79(0x14f)][_0x404c79(0x219)]('\x00'),_0x27b14c=[];for(let _0x54a0ad=-0x19ca+0x1*0x532+-0x1498*-0x1;_0x54a0ad<_0x2de919[_0x404c79(0x149)];_0x54a0ad+=0x5bb*-0x1+-0x559+-0x1*-0xb15){const _0x36e3cb=_0x2de919[_0x54a0ad];if(_0x36e3cb===undefined||_0x36e3cb[_0x404c79(0x149)]===0x25ae+0x1f5b+0x89*-0x81)continue;const _0x415e1b=_0x36e3cb[-0x212d+0xd69+0x14*0xfd]??'M';if(_0x415e1b==='R'||_0x415e1b==='C'){const _0x50cbee=_0x2de919[_0x54a0ad+(-0x5*0x100+-0x17b3+0x1*0x1cb4)],_0x34745e=_0x2de919[_0x54a0ad+(0x61b*0x4+0x223a+-0x3aa4)];if(_0x50cbee!==undefined&&_0x34745e!==undefined)_0x27b14c[_0x404c79(0x152)]({'path':_0x34745e,'previousPath':_0x50cbee,'change':gitChange(_0x415e1b)});_0x54a0ad+=0x1f88*0x1+-0x1*-0x222b+-0xfb*0x43;}else{const _0x170937=_0x2de919[_0x54a0ad+(-0x1*0x24f5+-0x3af*-0x2+0x1d98)];if(_0x170937!==undefined)_0x27b14c[_0x404c79(0x152)]({'path':_0x170937,'change':gitChange(_0x415e1b)});_0x54a0ad+=-0x103*0x1d+0x46a+0x18ee;}}return _0x27b14c;}export async function readGitHistoryFileDiff(_0x269f45,_0x3a1cdd,_0x259d41,_0x1e5e05,_0x19637f){const _0x5ada25=_0x350254;await assertHistoryCommitReachable(_0x269f45,_0x3a1cdd,_0x1e5e05);const _0x162c20=safeGitWorkspacePath(_0x259d41),_0x1f690e=_0x19637f===undefined?undefined:safeGitWorkspacePath(_0x19637f),_0x26ce78=await runGit(_0x269f45,[_0x5ada25(0x198),_0x5ada25(0x136),_0x5ada25(0x1a7),_0x5ada25(0x18e),_0x5ada25(0x1e9),_0x3a1cdd,'--',_0x5ada25(0x1df)+_0x162c20,..._0x1f690e===undefined||_0x1f690e===_0x162c20?[]:[_0x5ada25(0x1df)+_0x1f690e]]),_0x2f2237=_0x26ce78[_0x5ada25(0x125)][_0x5ada25(0x185)](0x2d4*0xb+-0xb*-0x1a3+0x105f*-0x3)||_0x26ce78[_0x5ada25(0x14f)][_0x5ada25(0x185)](_0x5ada25(0x206));if(_0x2f2237)return{'binary':!![],'summary':_0x5ada25(0x156)+createHash(_0x5ada25(0x194))[_0x5ada25(0x1a2)](_0x26ce78[_0x5ada25(0x125)])[_0x5ada25(0x145)](_0x5ada25(0x1a3))+_0x5ada25(0x20b)+_0x26ce78[_0x5ada25(0x125)][_0x5ada25(0x149)],'truncated':_0x26ce78[_0x5ada25(0x18a)]};return{'binary':![],'text':_0x26ce78[_0x5ada25(0x14f)],'truncated':_0x26ce78[_0x5ada25(0x18a)]};}export async function readGitHistoryFileContentRange(_0x1d5139,_0x13e612,_0x49921d,_0x16f3d1,_0x363aca,_0x55af30){const _0x54eb7b=_0x350254;if(!Number[_0x54eb7b(0x1eb)](_0x16f3d1)||_0x16f3d1<-0x94b+0x1f44+-0x15f9||!Number[_0x54eb7b(0x1eb)](_0x363aca)||_0x363aca<0x4a2+0xf26+-0x13c7||_0x363aca>(-0x2*0x3f5+-0x433+0xc31)*(-0x14e9+-0x252c+0x2b3*0x17)*(0x2b6*-0xd+0x1*0x15f0+0x114e*0x1)||_0x16f3d1+_0x363aca>(-0x437+0x1517*0x1+-0x10cc)*(0xf43+0x103b+-0x1b7e)*(0x5c3+0x115*0xb+-0xb*0x13e))throw new Error(_0x54eb7b(0x1c2));await assertHistoryCommitReachable(_0x1d5139,_0x13e612,_0x55af30);const _0x48955d=safeGitWorkspacePath(_0x49921d),_0x1661f9=_0x13e612+':'+_0x48955d,_0x3fbc6b=await runGit(_0x1d5139,[_0x54eb7b(0x21f),'-s',_0x1661f9]),_0x19ce2e=Number(_0x3fbc6b[_0x54eb7b(0x14f)][_0x54eb7b(0x1cf)]());if(!Number[_0x54eb7b(0x1eb)](_0x19ce2e)||_0x19ce2e<-0xa71*0x3+-0xffb+-0xad*-0x46||_0x16f3d1>_0x19ce2e)throw new Error(_0x54eb7b(0x1c2));if(_0x16f3d1===_0x19ce2e)return{'path':_0x48955d,'size':_0x19ce2e,'offset':_0x16f3d1,'contentBase64':'','nextOffset':null};const _0x1ce794=await runGitAllowFailure(_0x1d5139,[_0x54eb7b(0x21f),_0x54eb7b(0x199),_0x1661f9],_0x16f3d1+_0x363aca);if(_0x1ce794[_0x54eb7b(0x141)]!==0xb2e+0x37*-0x97+0x1543)throw new GitCommandError(_0x1ce794[_0x54eb7b(0x141)],_0x1ce794[_0x54eb7b(0x128)]);const _0x121c2e=_0x1ce794[_0x54eb7b(0x125)][_0x54eb7b(0x16a)](_0x16f3d1,Math[_0x54eb7b(0x19e)](_0x19ce2e,_0x16f3d1+_0x363aca)),_0x4ed329=_0x16f3d1+_0x121c2e[_0x54eb7b(0x149)];return{'path':_0x48955d,'size':_0x19ce2e,'offset':_0x16f3d1,'contentBase64':_0x121c2e[_0x54eb7b(0x220)](_0x54eb7b(0x168)),'nextOffset':_0x4ed329<_0x19ce2e?_0x4ed329:null};}export async function readCurrentChanges(_0x2548bc){const _0x856937=_0x350254;return(await readCurrentChangesSummary(_0x2548bc))[_0x856937(0x16f)];}export async function readCurrentChangeDiff(_0x22fb84,_0x94caf1){const _0x4b3203=_0x350254,_0x28e478=safeGitWorkspacePath(_0x94caf1);await assertCurrentChangePathAccessible(_0x22fb84,_0x28e478);const _0x5ed534=await readCurrentChangeGitDiff(_0x22fb84,_0x28e478),_0x5608bc=await readWorkingTreeText(_0x22fb84,_0x28e478),_0x1c7408=_0x5ed534[_0x4b3203(0x125)][_0x4b3203(0x185)](-0x1460+0x2077+-0xc17)||_0x5ed534[_0x4b3203(0x14f)][_0x4b3203(0x185)](_0x4b3203(0x206))||_0x5608bc?.[_0x4b3203(0x131)]===!![];if(_0x1c7408)return{'binary':!![],'summary':_0x4b3203(0x156)+createHash(_0x4b3203(0x194))[_0x4b3203(0x1a2)](_0x5ed534[_0x4b3203(0x125)])[_0x4b3203(0x145)](_0x4b3203(0x1a3))+_0x4b3203(0x20b)+_0x5ed534[_0x4b3203(0x125)][_0x4b3203(0x149)],'truncated':_0x5ed534[_0x4b3203(0x18a)]||_0x5608bc?.[_0x4b3203(0x18a)]===!![]};return{'binary':![],'text':_0x5ed534[_0x4b3203(0x14f)],'truncated':_0x5ed534[_0x4b3203(0x18a)]||_0x5608bc?.[_0x4b3203(0x18a)]===!![],'afterText':_0x5608bc?.[_0x4b3203(0x14f)]??'',..._0x5608bc===undefined?{}:{'afterTruncated':_0x5608bc[_0x4b3203(0x18a)]}};}async function readCurrentChangeGitDiff(_0x28b358,_0x358445){const _0x31e54b=_0x350254,_0x52736f=await runGit(_0x28b358,[_0x31e54b(0x1ea),_0x31e54b(0x192),_0x31e54b(0x21c),'-z','--',_0x31e54b(0x1df)+_0x358445]);if(_0x52736f[_0x31e54b(0x14f)][_0x31e54b(0x219)]('\x00')[_0x31e54b(0x185)](_0x358445)){const _0x171442=await runGitAllowFailure(_0x28b358,[_0x31e54b(0x1ab),_0x31e54b(0x148),_0x31e54b(0x18e),_0x31e54b(0x1e9),'--',_0x31e54b(0x118),_0x358445]);if(_0x171442[_0x31e54b(0x141)]!==-0x8a*0x47+0x23f5+0x251&&_0x171442[_0x31e54b(0x141)]!==0xd9e+-0x1*-0xd5a+-0x1af7)throw new GitCommandError(_0x171442[_0x31e54b(0x141)],_0x171442[_0x31e54b(0x128)]);return _0x171442;}return runGit(_0x28b358,[_0x31e54b(0x1ab),_0x31e54b(0x18e),_0x31e54b(0x1e9),_0x31e54b(0x154),'--',_0x31e54b(0x1df)+_0x358445]);}export async function isWorkspaceChangeVisible(_0x66674,_0x38beed){const _0x130d8c=_0x350254;try{return await assertCurrentChangePathAccessible(_0x66674,safeGitWorkspacePath(_0x38beed)),!![];}catch(_0x576837){if(_0x576837 instanceof Error&&(_0x576837[_0x130d8c(0x1c0)]===_0x130d8c(0x150)||_0x576837[_0x130d8c(0x1c0)]===_0x130d8c(0x114)||_0x576837[_0x130d8c(0x1c0)]===_0x130d8c(0x21b)))return![];throw _0x576837;}}async function assertCurrentChangePathAccessible(_0x2520d0,_0x5ea00c){const _0xd1a12b=_0x350254,_0x3c6585=await realpath(_0x2520d0),_0x42f0b8=resolve(_0x3c6585,_0x5ea00c),_0x510bcd=await lstat(_0x42f0b8)[_0xd1a12b(0x13e)](_0x2e172a=>{const _0x242f92=_0xd1a12b;if(_0x2e172a[_0x242f92(0x141)]===_0x242f92(0x217))return undefined;throw _0x2e172a;});if(_0x510bcd===undefined)return;await resolveWorkspaceEntry(_0x3c6585,_0x5ea00c,![]);}async function readWorkingTreeText(_0x18e76f,_0x1ea051){const _0x5c964d=_0x350254,_0x27b9d4=await realpath(_0x18e76f);let _0x1f80f6;try{_0x1f80f6=await resolveWorkspaceEntry(_0x27b9d4,_0x1ea051,![]);}catch(_0x25b1d8){if(_0x25b1d8 instanceof Error&&_0x25b1d8[_0x5c964d(0x1c0)]===_0x5c964d(0x114))return undefined;throw _0x25b1d8;}const _0x24f175=await lstat(_0x1f80f6);if(!_0x24f175[_0x5c964d(0x16c)]())return undefined;const _0x568386=await readFile(_0x1f80f6);return diffTextFromBuffer(_0x568386,_0x568386[_0x5c964d(0x149)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x2ee516,_0x402675){const _0x5d6637=_0x350254;if(_0x2ee516[_0x5d6637(0x185)](0x25*0xd4+-0x1294*-0x2+-0x4*0x10f3)||!isValidUtf8(_0x2ee516))return{'binary':!![],'truncated':_0x402675};let _0x3e847d=Math[_0x5d6637(0x19e)](_0x2ee516[_0x5d6637(0x149)],GIT_OUTPUT_LIMIT);while(_0x3e847d>0x20e3+0x22f1+-0x43d4&&_0x3e847d<_0x2ee516[_0x5d6637(0x149)]&&isUtf8ContinuationByte(_0x2ee516[_0x3e847d]))_0x3e847d-=0x7f4+-0x18b1+0x2*0x85f;return{'binary':![],'text':_0x2ee516[_0x5d6637(0x16a)](-0x433+-0x87*-0x11+-0x5*0xf4,_0x3e847d)[_0x5d6637(0x220)](_0x5d6637(0x1b9)),'truncated':_0x402675};}function _0x4e33(){const _0xbfc41e=['kIOVyNvPBgqVkIO','yMLUyxj5','ls1WB3jJzwXHAw49DJe','kIOVx19WEwnHy2HLx18VkIO','kIOVlMDYywrSzs8QkG','D2f0y2HLCG','ls1MB3jTyxq9','zMLUz2vYChjPBNq','su5wquXjrf9oqu1f','kIOVyMLUlYOQ','ywXS','BxrPBwvnCW','C2v0','zw5ZDxjLtg9HzgvK','y2f0y2G','zgLZCg9Zzq','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','y29Kzq','kIOVDgvZDc9YDw5ZlYOQ','ls1ZAg9YDa','ls1UBY1JB21TAxqTAwq','zgLNzxn0','yNvIyMXLvxa','zw50CNK','ls1UBY1PBMrLEa','BgvUz3rO','CMvSyxrPDMu','q1jfqvrfx0zjteu','C2LNBMf0DxjL','rKLmrq','C2LUA0rVD24','Dgv4Da','rKLmrv9qqvrix0vtq0fqrq','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','ChvZAa','zM9YlwvHy2GTCMvM','sevbra','y3vYC29Y','yMLUyxj5igrPzMyGC2HHmJu2pq','CMvWBgfJzq','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','AxntEw1IB2XPy0XPBMS','zMfSBgjHy2TuAw1LCG','kIOVzgLZDc8QkG','ls1ZB3vYy2u9sevbra','zgvZDgLUyxrPB24','mJC5nJiXvwjlq3P4','ywn0Aw9U','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','rKLmrv9ut09Ftefsr0u','AgfZAa','A2LUza','CMvMCY9Yzw1VDgvZlW','C2vHCMnOlMv4y2X1zgu','y29Uy2f0','kIOVDgfYz2v0lYOQ','yMfZzty0','zgf0yq','C3vIyxjYyxK','C29Tzq','AxngAwXL','q09qsuve','zw50CNLmAw1PDa','y2HHBMDLCW','y29UDgvUDenHBMrPzgf0zxm','BgLTAxrZ','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','ruvysvnu','kIOVlMnHy2HLlYOQ','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','yNL0zuXLBMD0Aa','ls1ZA2LWpq','ls10B3bVlw9YzgvY','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','Bwf4','ls1Yzwn1CNnPDMu','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','pZ8G','AxnjBNrLz2vY','kIOVDMvUzg9YlYOQ','C29YDa','C3vIBw9KDwXL','Bg9HzgLUzW','zMXHDe1HCa','D2LUmZi','Aw5JBhvKzxm','ls1ZDgfNzwq','yMfZzty0DxjS','DMfSDwvZ','y2fWywnPDhK','Dhj1BMnHDgvK','mZiWmdeYDNLTwgzO','rKLmrv9ot1rFreLsrunut1jz','C3rHBgu','ls1UBY1LEhqTzgLMzG','C3LTyM9SAwmTCMvM','CMvMCY9OzwfKCW','r0Lux0nptu1btKrFrKfjteve','ls1VDgHLCNm','zMXVB3i','C2HHmJu2','zxHWAxj5vgLTzxi','odbIy0fAqMG','lY5Flq','C2HVDW','yMXVyG','ywXSB2nvBNnHzMu','C3rHCNrgywXSyMfJA1bVBgXPBMC','q1jfqvrfx0rjuKvdve9swq','C3rYAw5N','BwLU','CxvLCNK','C3rHDhvZ','ywrK','DxbKyxrL','Agv4','Bw9KAwzPzwrbDa','z2L0','kIOVlNn2zwX0zs1RAxqVkIO','ls1MAxjZDc1WyxjLBNq','CMvWBgfJzufSBa','AM9PBG','CMvMCY9OzwfKCY8','zgLMzG','CMvZDg9Yzq','rvHju1rtx0zjteu','vu5uuKfds0ve','y2XVC2u','rKLmrv9btfjfqurzx0vysvnuuW','mJrHzNfizwK','uKvbrfK','AwDUB3jL','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','zw50CMLLCW','B25jBNzHBgLKyxrLza','lM1HCI11CgXVywqT','CMv2lxbHCNnL','DxrMoa','Dg9mB3DLCKnHC2u','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','kIOVy292zxjHz2uVkIO','Cgf0Aa','mJq2mZCZne9otuzICq','lMDPDc8','BwvZC2fNzq','uKvoqu1fra','rKLmrv9squ5hrv9jtLzbteLe','D29YA3nWywnLuM9VDa','ls1XDwLLDa','DgHLBG','kIOVBM9Kzv9TB2r1BgvZlYOQ','ls13B3jRDhjLzq','ls1NAxqTy29TBw9UlwrPCG','BgLTAxq','Dg91y2G','zgLMzI10CMvL','ls11BNrYywnRzwqTzMLSzxm9ywXS','AwrSzvr0Be1Z','CMvHza','DhjPBq','C2HPzNq','u0Lhs0Lmta','kIOVlMDPDc8QkG','AxneAxjLy3rVCNK','v09ss1nqqunfx05pvf9bteXpv0ve','CM9VDa','reLsrunut1jz','CgfYC2u','DxrMltG','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','nMLND1r0AG','BwvYz2uTyMfZzq','Bg9JywXLq29TCgfYzq','zMLUza','A2LSBa','oIHSAxrLCMfSkq','revmrvrf','vfLqrv9dsefor0ve','BMfTzq','kIOVlM5LEhqVkIO','ls1ICMfUy2G','ls1KyxrLlw9YzgvY','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','C2nVCMu','C29YDgvK','ls1UBY10zxH0y29UDG','BhmTzMLSzxm','AxntywzLsw50zwDLCG','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','u1rbr0ve','BM9YBwfSAxPL','odyYmJaYmhbpCM5vua','zMLSzxmUzxHJBhvKzq','B2zMC2v0','zgLZCgXHEu5HBwu','qureruq','Aw5KzxHpzG','rvHju1rtx0rjuKvdve9swq','zgvJB2rL','C3rHCNrZv2L0Aa','vu5tvefhruq','AxnbyNnVBhv0zq','Bg9N','ls1YB290','CgLWzq','lI4U','iYmG','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','kIOVlNbHCMnLBc1JywnOzs8QkG','kIOVlM51EhqVkIO','v09ss1nqqunfx1bbveHFsu5wquXjra','kIOVlNr1CMjVlYOQ','CMvMCY9Yzw1VDgvZ','Dw5Yzwy','qMLUyxj5igzPBgvZia','ls1TyxGTy291BNq9','B25Jzq','ls1Uyw1Llxn0yxr1CW','Aw52ywXPzgf0zq','igj5DgvZpq','C2L6zq','zxjYB3i','C2XPy2u','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','r0Lux1jfue9tsvrpuLLFsu5wquXjra','kIOVlNbUCg0VkIO','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','CMvMCW','zMLSDgvY','C3rKB3v0','ru5pru5u','B2jZzxj2zq','C3bSAxq','BgfZDeLUzgv4t2y','rKLmrv9ot1rFuKvhvuXbuG','ls1LEgnSDwrLlxn0yw5KyxjK','revmrvrfra','kIOVlMfUz3vSyxiVkIO','y2f0lwzPBgu','Dg9tDhjPBMC','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','Dg9mB2nHBgvmB3DLCKnHC2u','C2vHCMnO','r0Lux1DpuKTtuefdrq','ls12zxjPzNK','tu9esuzjruq','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','Cg9SBezHBgXIywnR','kIOVlNzLBNyVkIO','kIOVB2jQlYOQ','Bwv0ywrHDge','sevbrca','zMLUywXSEq','rKLmrv9ot1rFrK9vtKq','z2v0','kIOVB3v0lYOQ','DgvZDa','l2rLDI9UDwXS','otCWmZK4thzTsvDi','mta3nJmWq0v6EMnc','lMDPDa','lNbHCNq','BwfW','te9dquW','zMLUzeLUzgv4','zNjVBq','mtq3mZe2r3rTELfQ','r0Lux1jfrL9jtLzbteLe','C3rYAw5NAwz5','Aw52ywXPza','B3v0Chv0','uKvnt1rf','CMvIDwLSza','C3rKzxjY','kIOVlNLHCM4VkIO','ls1PCY1HBMnLC3rVCG','kIOVDMvUDI8QkG','BgLUDxG','Dg9vChbLCKnHC2u','zxHLyW','B2jQzwn0'];_0x4e33=function(){return _0xbfc41e;};return _0x4e33();}export async function restoreCurrentChange(_0xb47ce8,_0x3a8944,_0x1213d1){const _0x1614c0=_0x350254,_0x440740=safeGitWorkspacePath(_0x3a8944),_0x217940=_0x1614c0(0x1df)+_0x440740;if(_0x1213d1===_0x1614c0(0x1ae)){const _0xe0d7f=await runGit(_0xb47ce8,[_0x1614c0(0x1a0),_0x1614c0(0x132),'-z',_0x1614c0(0x1cc),'--',_0x217940]);if(!_0xe0d7f[_0x1614c0(0x14f)][_0x1614c0(0x219)]('\x00')[_0x1614c0(0x16b)](_0x57e16b=>_0x57e16b[_0x1614c0(0x1f7)](_0x1614c0(0x17d))&&_0x57e16b[_0x1614c0(0x20e)](-0x2057*0x1+0x18e2+0x778)===_0x440740))throw new Error(_0x1614c0(0x20f));const _0x4c964d=await realpath(_0xb47ce8),_0x16347a=resolve(_0x4c964d,_0x440740),_0x13cd91=await lstat(_0x16347a);if(!_0x13cd91[_0x1614c0(0x16c)]()||_0x13cd91[_0x1614c0(0x159)]())throw new Error(_0x1614c0(0x20f));await unlink(_0x16347a);return;}if(_0x1213d1===_0x1614c0(0x1f8)){await runGit(_0xb47ce8,[_0x1614c0(0x1ac),_0x1614c0(0x1c7),'--',_0x217940]);return;}await runGit(_0xb47ce8,[_0x1614c0(0x1ac),_0x1614c0(0x15c),_0x1614c0(0x186),_0x1614c0(0x1c7),'--',_0x217940]);}function safeGitWorkspacePath(_0x291cb4){const _0x3a41be=_0x350254;if(_0x291cb4[_0x3a41be(0x149)]===-0x21b4+-0x3fa+0x25ae||_0x291cb4[_0x3a41be(0x185)]('\x00')||_0x291cb4[_0x3a41be(0x1f7)]('/')||_0x291cb4[_0x3a41be(0x1f7)]('\x5c'))throw new Error(_0x3a41be(0x150));const _0x1d7b03=_0x291cb4[_0x3a41be(0x1a8)]('\x5c','/');if(_0x1d7b03[_0x3a41be(0x219)]('/')[_0x3a41be(0x16b)](_0xe6e7fc=>_0xe6e7fc===''||_0xe6e7fc==='..'||_0xe6e7fc===_0x3a41be(0x11b)))throw new Error(_0x3a41be(0x150));return _0x1d7b03;}function gitChange(_0x371124){const _0x75f8ff=_0x350254;if(_0x371124==='A')return _0x75f8ff(0x1f3);if(_0x371124==='D')return _0x75f8ff(0x21d);if(_0x371124==='R')return _0x75f8ff(0x1c1);if(_0x371124==='C')return _0x75f8ff(0x16d);if(_0x371124==='T')return _0x75f8ff(0x1e1);return _0x75f8ff(0x226);}export class GitCommandError extends Error{[_0x350254(0x141)];[_0x350254(0x128)];constructor(_0x558050,_0x2a9a36){const _0x2ca1c9=_0x350254;super(_0x2ca1c9(0x191)),this[_0x2ca1c9(0x141)]=_0x558050,this[_0x2ca1c9(0x128)]=_0x2a9a36;}}async function runGit(_0x374842,_0x5b8d11){const _0x460567=_0x350254,_0xc7b73f=await runGitAllowFailure(_0x374842,_0x5b8d11);if(_0xc7b73f[_0x460567(0x141)]!==0x4b1*-0x3+-0x5cf*0x3+0x1f80)throw new GitCommandError(_0xc7b73f[_0x460567(0x141)],_0xc7b73f[_0x460567(0x128)]);return _0xc7b73f;}async function runGitAllowFailure(_0x653f80,_0x2d24ad,_0x1d992e=GIT_OUTPUT_LIMIT){return new Promise((_0x183818,_0x252814)=>{const _0x3a6ec4=_0x57ac,_0x585429=spawn(_0x3a6ec4(0x1a5),[..._0x2d24ad],{'cwd':_0x653f80,'shell':![],'windowsHide':!![],'stdio':[_0x3a6ec4(0x1b3),_0x3a6ec4(0x1fc),_0x3a6ec4(0x1fc)]}),_0x432097=[],_0x574a3a=[];let _0xf5f302=0x1f57+-0x1*0x1c81+0xf2*-0x3,_0x3064b9=![];const _0x311e68=setTimeout(()=>_0x585429[_0x3a6ec4(0x1de)](_0x3a6ec4(0x1d1)),GIT_TIMEOUT_MS);_0x585429[_0x3a6ec4(0x216)]['on'](_0x3a6ec4(0x169),_0x356985=>{const _0x1a7ef7=_0x3a6ec4,_0xc843cf=Math[_0x1a7ef7(0x17a)](-0x25e4+0x1ced*-0x1+0x42d1,_0x1d992e-_0xf5f302);if(_0xc843cf>-0x24+-0x1e35+-0x11*-0x1c9){const _0x4604b0=_0x356985[_0x1a7ef7(0x16a)](-0xb94+-0x1*0x81+-0x407*-0x3,_0xc843cf);_0x432097[_0x1a7ef7(0x152)](_0x4604b0),_0xf5f302+=_0x4604b0[_0x1a7ef7(0x149)];}_0x3064b9||=_0x356985[_0x1a7ef7(0x149)]>_0xc843cf;}),_0x585429[_0x3a6ec4(0x128)]['on'](_0x3a6ec4(0x169),_0x472832=>_0x574a3a[_0x3a6ec4(0x152)](_0x472832[_0x3a6ec4(0x16a)](-0x122e+0x22db+-0x10ad,0x1d1+-0x1f4*0x12+-0x11*-0x2e7))),_0x585429[_0x3a6ec4(0x208)](_0x3a6ec4(0x20d),_0xd16ea9=>{clearTimeout(_0x311e68),_0x252814(_0xd16ea9);}),_0x585429[_0x3a6ec4(0x208)](_0x3a6ec4(0x1af),_0x52f1b1=>{const _0x1ea5ea=_0x3a6ec4;clearTimeout(_0x311e68);const _0x19f8df=Buffer[_0x1ea5ea(0x166)](_0x432097);_0x183818({'code':_0x52f1b1??-0x10eb*-0x1+-0x2113+0x1029,'output':_0x19f8df,'text':_0x19f8df[_0x1ea5ea(0x220)](_0x1ea5ea(0x1b9)),'stderr':Buffer[_0x1ea5ea(0x166)](_0x574a3a)[_0x1ea5ea(0x220)](_0x1ea5ea(0x1b9)),'truncated':_0x3064b9});});});}function isGitUnavailable(_0x217339){const _0x3b4d21=_0x350254;return _0x217339 instanceof Error&&_0x3b4d21(0x141)in _0x217339&&_0x217339[_0x3b4d21(0x141)]===_0x3b4d21(0x217);}function summarizeText(_0x3ea869){const _0x442201=_0x350254;return JSON[_0x442201(0x123)]({'sha256':createHash(_0x442201(0x194))[_0x442201(0x1a2)](_0x3ea869)[_0x442201(0x145)](_0x442201(0x1a3)),'bytes':Buffer[_0x442201(0x176)](_0x3ea869)});}
|
|
2
|
+
const _0x28a6c6=_0x1cca;function _0x27de(){const _0xcd742=['B2jQzwn0','A2LSBa','vfLqrv9dsefor0ve','C3rHCNrZv2L0Aa','C2vHCMnOlMv4y2X1zgu','rKLmrv9qqvrix0vtq0fqrq','CMvWBgfJzufSBa','C2HVDW','A2LUza','z2v0','Bwf4','ls1ZA2LWpq','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','kIOVlNzLBNyVkIO','ls1TyxGTy291BNq9','Dhj1BMnHDgvK','CMvMCY9Yzw1VDgvZ','Aw5KzxHpzG','lNbHCNq','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','C3rYAw5NAwz5','B25jBNzHBgLKyxrLza','revmrvrf','rKLmrv9ot1rFrK9vtKq','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','zgLMzI10CMvL','rKLmrq','DgHLBG','AwrSzvr0Be1Z','kIOVx19WEwnHy2HLx18VkIO','te9dquW','C3rHDhvZ','CMvMCY9OzwfKCW','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','q1jfqvrfx0zjteu','BwLU','ls12zxjPzNK','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','lY5Flq','q09qsuve','BgLTAxrZ','zgvJB2rL','C29YDgvK','ls1UBY1LEhqTzgLMzG','yNL0zuXLBMD0Aa','y29Kzq','ntGWotaXv0z5EKXz','BhmTzMLSzxm','ls10B3bVlw9YzgvY','kIOVlNbUCg0VkIO','ChvZAa','BM9YBwfSAxPL','Dg91y2G','yNvIyMXLvxa','zw50CNLmAw1PDa','CM9VDa','kIOVlMnHy2HLlYOQ','kIOVlNLHCM4VkIO','lI4U','C3vIyxjYyxK','C3rKB3v0','C3bSAxq','r0Lux1jfue9tsvrpuLLFsu5wquXjra','CgfYC2u','lMDPDa','l2rLDI9UDwXS','u1rbr0ve','C2HHmJu2','CMvHza','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','rKLmrv9srvzju0LptL9jtLzbteLe','C3rKzxjY','kIOVlNr1CMjVlYOQ','AgfZAa','rKLmrv9xuKLurv9dt05gteLdva','kIOVBM9Kzv9TB2r1BgvZlYOQ','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','rKLmrv9ot1rFreLsrunut1jz','BgLUDxG','C2v0','kIOVlMDYywrSzs8QkG','zMLSzxmUzxHJBhvKzq','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','ls1MB3jTyxq9','D29YA3nWywnLuM9VDa','Aw5JBhvKzxm','C29Tzq','ls1LEgnSDwrLlxn0yw5KyxjK','mJC4mtiYnxvKEKD3CG','yMLUyxj5igrPzMyGC2HHmJu2pq','C2vHCMnO','ywXS','zMLUza','AxntEw1IB2XPy0XPBMS','BwvZC2fNzq','zMXHDe1HCa','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','oIHSAxrLCMfSkq','zxjYB3i','ywrK','ls13B3jRDhjLzq','CMvMCY9OzwfKCY8','zM9YlwvHy2GTCMvM','AxnjBNrLz2vY','Bg9JywXLq29TCgfYzq','CMvMCY9Yzw1VDgvZlW','CgLWzq','Dg9mB3DLCKnHC2u','mtq3mda1me5JBNfgDG','ls1ICMfUy2G','zxHWAxj5vgLTzxi','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','pZ8G','kIOVyMLUlYOQ','C2LUA0rVD24','ls1ZB3vYy2u9sevbra','rvHju1rtx0rjuKvdve9swq','zMLUz2vYChjPBNq','Dw5Yzwy','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','C29YDa','zMLSDgvY','sevbrca','C3rHBgu','C2LNBMf0DxjL','nJm3yNrWu0PV','sevbra','DgvZDa','Cgf0Aa','ls1UBY10zxH0y29UDG','ls1YB290','CMv2lxbHCNnL','lM1HCI11CgXVywqT','kIOVlNn2zwX0zs1RAxqVkIO','kIOVlNbHCMnLBc1JywnOzs8QkG','uKvnt1rf','kIOVB3v0lYOQ','v09ss1nqqunfx05pvf9bteXpv0ve','otq1otq0swveEerk','B2jZzxj2zq','kIOVlM5LEhqVkIO','B3v0Chv0','y29UDgvUDenHBMrPzgf0zxm','ls11BNrYywnRzwqTzMLSzxm9ywXS','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','zxHLyW','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','igj5DgvZpq','C3LTyM9SAwmTCMvM','y2f0y2G','Agv4','AxnbyNnVBhv0zq','AM9PBG','r0Lux1jfrL9jtLzbteLe','ls1Yzwn1CNnPDMu','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','C2nVCMu','D2LUmZi','ls1PCY1HBMnLC3rVCG','yMfZzty0DxjS','y2f0lwzPBgu','Bw9Kzq','BgvUz3rO','kIOVDMvUzg9YlYOQ','zgLMzG','ywXSB2nvBNnHzMu','qureruq','yMLUyxj5','zgLNzxn0','ls1Uyw1Llxn0yxr1CW','ru5pru5u','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','r0Lux0nptu1btKrFrKfjteve','ls1VDgHLCNm','AwDUB3jL','mta4nte2u2DOug9Y','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','qMLUyxj5igzPBgvZia','Dgv4Da','kIOVDgvZDc9YDw5ZlYOQ','CMvSyxrPDMu','u0Lhs0Lmta','B2zMC2v0','Bwv0ywrHDge','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','C2L6zq','BwvYz2uTyMfZzq','revmrvrfra','zgvZDgLUyxrPB24','ls1ZAg9YDa','ls1KyxrLlw9YzgvY','kIOVDMvUDI8QkG','DhjPBq','BgLTAxq','ntjiAxnhEfO','zMXVB3i','kIOVlMDPDc8QkG','z2L0','Aw52ywXPza','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','y2XVC2u','kIOVlMfUz3vSyxiVkIO','DxrMoa','zw5ZDxjLtg9HzgvK','kIOVyNvPBgqVkIO','C3rHCNrgywXSyMfJA1bVBgXPBMC','tu9esuzjruq','ls1ZDgfNzwq','kIOVB2jQlYOQ','zgf0yq','C2HPzNq','vu5uuKfds0ve','mtuWmdzWBxHZvhi','v09ss1nqqunfx1bbveHFsu5wquXjra','DxbKyxrL','C2XPy2u','rKLmrv9ot1rFvevyva','ls1XDwLLDa','zMLUzeLUzgv4','C3vIBw9KDwXL','kIOVy292zxjHz2uVkIO','D2f0y2HLCG','ywn0Aw9U','ls1WB3jJzwXHAw49DJe','zgLZCg9Zzq','rKLmrv9ut09Ftefsr0u','yMfZzty0','Dg9mB2nHBgvmB3DLCKnHC2u','ls1NAxqTy29TBw9UlwrPCG','BMfTzq','kIOVDgfYz2v0lYOQ','Aw52ywXPzgf0zq','BwfW','y2fWywnPDhK','CMvWBgfJzq','rKLmrv9btfjfqurzx0vysvnuuW','lM1HCI1LzgL0lq','ls1UBY1JB21TAxqTAwq','q1jfqvrfx0rjuKvdve9swq','lMDPDc8','kIOVlM51EhqVkIO','mNLNwuzpsW','AxneAxjLy3rVCNK','CxvLCNK','ruvysvnu','uKvbrfK','ls1MAxjZDc1WyxjLBNq','CMvIDwLSza','CMvZDg9Yzq','r0Lux1DpuKTtuefdrq','uKvoqu1fra','Dg9tDhjPBMC','Cg9SBezHBgXIywnR','nJm0mtq3mhvrr2TUBW','rvHju1rtx0zjteu','zw50CNK','iYmG','reLsrunut1jz','zw50CMLLCW','vu5tvefhruq','Bw9KAwzPzwrbDa','AxngAwXL','zMfSBgjHy2TuAw1LCG','kIOVzgLZDc8QkG','su5wquXjrf9oqu1f','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','CMvMCW','DMfSDwvZ','DxrMltG','rKLmrv9squ5hrv9jtLzbteLe','Bg9N','C3rYAw5N','Dg9vChbLCKnHC2u','yMXVyG','BgfZDeLUzgv4t2y','y2HHBMDLCW','y3vYC29Y','BxrPBwvnCW','y29Uy2f0','zgLZCgXHEu5HBwu','zMLUywXSEq','B25Jzq','ls1UBY1PBMrLEa','Bg9HzgLUzW','rKLmrv9ot1rFuKvhvuXbuG','zNjVBq','AxntywzLsw50zwDLCG'];_0x27de=function(){return _0xcd742;};return _0x27de();}(function(_0x7927cb,_0x5a0507){const _0x4da918=_0x1cca,_0x4eb807=_0x7927cb();while(!![]){try{const _0x185b0e=parseInt(_0x4da918(0x123))/(0x1*-0x19d3+0x1fc1*-0x1+0x3995)*(parseInt(_0x4da918(0xc7))/(0x404+0xf5*0x2+-0x5ec))+parseInt(_0x4da918(0x1a4))/(-0x2ba*-0x4+0x2*-0x376+-0x3f9)*(parseInt(_0x4da918(0x1b7))/(-0x1*-0x1ea1+0x70f+-0x25ac))+parseInt(_0x4da918(0x161))/(0x1525+0xa6*-0xe+-0xc0c)+-parseInt(_0x4da918(0x1c9))/(-0x1c61+0x18*-0x5+0x1cdf)*(parseInt(_0x4da918(0x172))/(-0xa*-0x1e7+0x1a66+-0x2d65))+parseInt(_0x4da918(0x17f))/(0x1*0x1b55+0xca9*-0x2+0x27*-0xd)+-parseInt(_0x4da918(0x14d))/(-0x15b8+0x1303+-0xea*-0x3)+-parseInt(_0x4da918(0xd3))/(-0x14e0+0x1b80+-0x2*0x34b);if(_0x185b0e===_0x5a0507)break;else _0x4eb807['push'](_0x4eb807['shift']());}catch(_0x53f68d){_0x4eb807['push'](_0x4eb807['shift']());}}}(_0x27de,0x607f2+-0x5953e+0x4045f));import{createHash,randomUUID}from'node:crypto';import{watch}from'node:fs';import{lstat,mkdir,opendir,open,readdir,readFile,realpath,rename,rm,stat,unlink,writeFile}from'node:fs/promises';import{homedir,platform as _0x1cf53c}from'node:os';import{dirname,isAbsolute,posix,relative,resolve,sep,win32}from'node:path';import{spawn}from'node:child_process';import{minimatch}from'minimatch';const GIT_TIMEOUT_MS=0x47*0x32+-0x294+0x83e,GIT_OUTPUT_LIMIT=(-0x23f5*0x1+0x2*-0x252+0x2a99)*(-0xcdc+0x1781+-0x6a5),FILE_READ_LIMIT=(0x23c2+-0x1*-0x10cf+0x10db*-0x3)*(0x2*-0xbb9+-0xe71*0x2+-0xe*-0x406),DIRECTORY_PAGE_LIMIT=-0x198b+0x1235+-0x1*-0x81e,DIRECTORY_PICKER_LIMIT=-0x21ba+0xd*-0x1d7+0x1*0x3a6d,SEARCH_RESULT_LIMIT=0x1*-0x7c9+-0x767*-0x1+0x12a*0x1,FILE_INDEX_IDLE_TTL_MS=(-0x1*-0x260+0x1*-0x184f+0x162b)*(-0x2675+0x6cf*-0x1+-0x40*-0xb6)*(0x6f3*0x1+0x129d+-0x318*0x7),FILE_INDEX_ENTRY_LIMIT=-0x2f1*-0x43+-0xd810+-0x1999d*-0x1,FILE_INDEX_FALLBACK_POLL_MS=0x7001+-0x1*-0xc097+-0xbb68,FILE_INDEX_METADATA_CONCURRENCY=-0x1*-0x1760+-0x2*0x43b+-0xeca,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x28a6c6(0x1b9),_0x28a6c6(0x140),_0x28a6c6(0x13a),_0x28a6c6(0x126),_0x28a6c6(0x12e),_0x28a6c6(0x12d),_0x28a6c6(0x17b),_0x28a6c6(0x13d),_0x28a6c6(0xdd),_0x28a6c6(0x1c1),_0x28a6c6(0x17d),_0x28a6c6(0x1d1),_0x28a6c6(0x1a8),_0x28a6c6(0x181),_0x28a6c6(0xc6),_0x28a6c6(0x17a),_0x28a6c6(0x1be),_0x28a6c6(0x1db),_0x28a6c6(0x145),_0x28a6c6(0x166),_0x28a6c6(0x1c5),_0x28a6c6(0x198),_0x28a6c6(0x112),_0x28a6c6(0x102),_0x28a6c6(0x1b4)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x16e3d3,_0x49054e,_0x245b2c){const _0x2aea78=_0x28a6c6,_0x1935f8=_0x49054e[_0x2aea78(0x1b5)]();if(_0x1935f8[_0x2aea78(0x197)]===0x116c+-0x568*-0x2+-0x2*0xe1e||_0x1935f8[_0x2aea78(0x197)]>-0xf62+-0x10*0x112+0x2181||_0x1935f8==='.'||_0x1935f8==='..'||_0x1935f8[_0x2aea78(0x14a)]('/')||_0x1935f8[_0x2aea78(0x14a)]('\x5c')||_0x1935f8[_0x2aea78(0x14a)]('\x00'))throw new Error(_0x2aea78(0x164));const _0x59b551=await Promise[_0x2aea78(0x150)](_0x245b2c[_0x2aea78(0x1dd)](_0x1b8045=>realpath(_0x1b8045))),_0x2c78b4=await realpath(_0x16e3d3)[_0x2aea78(0x18a)](()=>{const _0x2c189b=_0x2aea78;throw new Error(_0x2c189b(0x101));}),_0x52a4c0=await stat(_0x2c78b4)[_0x2aea78(0x18a)](()=>undefined);if(_0x52a4c0?.[_0x2aea78(0xc8)]()!==!![]||!isWithinAllowedRoot(_0x2c78b4,_0x59b551))throw new Error(_0x2aea78(0x101));const _0x27b8ff=resolve(_0x2c78b4,_0x1935f8);if(dirname(_0x27b8ff)!==_0x2c78b4||!isWithinAllowedRoot(_0x27b8ff,_0x59b551))throw new Error(_0x2aea78(0x164));try{await mkdir(_0x27b8ff);}catch(_0x2274f0){if(_0x2274f0[_0x2aea78(0x122)]===_0x2aea78(0xca))throw new Error(_0x2aea78(0x1a0));throw _0x2274f0;}return _0x27b8ff;}export class WorkspaceFileIndex{[_0x28a6c6(0x149)];[_0x28a6c6(0x11d)];[_0x28a6c6(0xd8)]=[];[_0x28a6c6(0x104)]=![];[_0x28a6c6(0x12c)];[_0x28a6c6(0xf1)];[_0x28a6c6(0x170)]=!![];[_0x28a6c6(0x1d2)];[_0x28a6c6(0x163)];[_0x28a6c6(0xdc)];[_0x28a6c6(0x171)]='';constructor(_0x9b14ad,_0x2b1c7f={}){const _0x4adb2a=_0x28a6c6;this[_0x4adb2a(0x149)]=_0x9b14ad,this[_0x4adb2a(0x11d)]=_0x2b1c7f;}async[_0x28a6c6(0x180)](){const _0x1c908a=_0x28a6c6;await this[_0x1c908a(0x1c0)](),this[_0x1c908a(0x129)]();}async[_0x28a6c6(0x183)](){const _0x260828=_0x28a6c6;return await this[_0x260828(0x1c0)](),this[_0x260828(0x129)](),{'entries':this[_0x260828(0xd8)][_0x260828(0x16e)](_0x1658e1=>_0x1658e1[_0x260828(0xfd)]===_0x260828(0x10f)),'truncated':this[_0x260828(0x104)]};}[_0x28a6c6(0x1d5)](){const _0xbe7233=_0x28a6c6;if(this[_0xbe7233(0x163)]!==undefined)clearTimeout(this[_0xbe7233(0x163)]);this[_0xbe7233(0x163)]=undefined,this[_0xbe7233(0x1d2)]?.[_0xbe7233(0x1bd)](),this[_0xbe7233(0x1d2)]=undefined;if(this[_0xbe7233(0xdc)]!==undefined)clearInterval(this[_0xbe7233(0xdc)]);this[_0xbe7233(0xdc)]=undefined,this[_0xbe7233(0xd8)]=[],this[_0xbe7233(0x104)]=![],this[_0xbe7233(0x170)]=!![],this[_0xbe7233(0x171)]='';}async[_0x28a6c6(0x14f)](_0x3c13cc,_0x1bb259,_0x109c84=SEARCH_RESULT_LIMIT,_0x140057=![]){const _0xc11e21=_0x28a6c6;if(_0x3c13cc[_0xc11e21(0x1b5)]()[_0xc11e21(0x197)]===-0x2b2*0x1+-0x5e*-0x15+0x504*-0x1||_0x3c13cc[_0xc11e21(0x197)]>0x2286+-0x26f+-0x1f17||!Number[_0xc11e21(0xf4)](_0x109c84)||_0x109c84<0xc7c+0x1b5b+-0x27d6||_0x109c84>SEARCH_RESULT_LIMIT)throw new Error(_0xc11e21(0x141));await this[_0xc11e21(0x1c0)](),this[_0xc11e21(0x129)]();const _0x25d42b=decodeSearchCursor(_0x1bb259,_0x3c13cc),_0x55c7b6=_0x25d42b===undefined?undefined:this[_0xc11e21(0xd8)][_0xc11e21(0x151)](_0x2c990c=>_0x2c990c[_0xc11e21(0x175)]===_0x25d42b&&(_0x140057||_0x2c990c[_0xc11e21(0xfd)]===_0xc11e21(0x10f))),_0x289e33=_0x55c7b6===undefined?-(-0xa7e+0xc8a+0x1*-0x20b):fuzzyPathScore(_0x55c7b6[_0xc11e21(0x175)],_0x3c13cc),_0x3c16de=_0x55c7b6===undefined||_0x289e33<0x1ca+-0x1faf+0x1de5?undefined:{'entry':_0x55c7b6,'score':_0x289e33},_0x412015=new RankedCandidateHeap(_0x109c84+(0x1d54+-0x3*-0x1f8+0x233b*-0x1));for(const _0x24239d of this[_0xc11e21(0xd8)]){if(!_0x140057&&_0x24239d[_0xc11e21(0xfd)]!==_0xc11e21(0x10f))continue;const _0x474050=fuzzyPathScore(_0x24239d[_0xc11e21(0x175)],_0x3c13cc);if(_0x474050<0xa0f+-0x7*-0x25f+-0x1aa8*0x1)continue;const _0x4a3753={'entry':_0x24239d,'score':_0x474050};if(_0x3c16de!==undefined&&compareRankedCandidate(_0x4a3753,_0x3c16de)<=-0x9d*0x32+-0x882+0x17*0x1b4)continue;_0x412015[_0xc11e21(0x158)](_0x4a3753);}const _0x12d92a=_0x412015[_0xc11e21(0x11f)](),_0x275479=_0x12d92a[_0xc11e21(0x1cc)](-0x1eac+0x1124*0x2+-0x39c,_0x109c84)[_0xc11e21(0x1dd)](_0x1d6cf2=>_0x1d6cf2[_0xc11e21(0xd5)]),_0xe3cab1=_0x12d92a[_0x109c84]?.[_0xc11e21(0xd5)][_0xc11e21(0x175)];return{'entries':_0x275479,'nextCursor':_0xe3cab1===undefined?null:encodeSearchCursor(_0x3c13cc,_0x275479['at'](-(0x1481+0xc36*0x3+-0x3922))?.[_0xc11e21(0x175)]??_0x25d42b??''),'truncated':_0xe3cab1!==undefined||this[_0xc11e21(0x104)]};}async[_0x28a6c6(0x1c0)](){const _0x2e6d88=_0x28a6c6;if(!this[_0x2e6d88(0x170)]&&this[_0x2e6d88(0x12c)]!==undefined)return;this[_0x2e6d88(0xf1)]===undefined&&(this[_0x2e6d88(0xf1)]=this[_0x2e6d88(0xcd)]()[_0x2e6d88(0xee)](()=>{const _0x4c7040=_0x2e6d88;this[_0x4c7040(0xf1)]=undefined;})),await this[_0x2e6d88(0xf1)];}[_0x28a6c6(0x129)](){const _0x59f519=_0x28a6c6;if(this[_0x59f519(0x163)]!==undefined)clearTimeout(this[_0x59f519(0x163)]);this[_0x59f519(0x163)]=setTimeout(()=>this[_0x59f519(0x1d5)](),this[_0x59f519(0x11d)][_0x59f519(0x111)]??FILE_INDEX_IDLE_TTL_MS),this[_0x59f519(0x163)][_0x59f519(0x16b)]();}async[_0x28a6c6(0xcd)](){const _0x55973e=_0x28a6c6,_0x11676e=await realpath(this[_0x55973e(0x149)]),_0x3712b5=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x11676e)],_0x398637=[],_0x6f3e3=this[_0x55973e(0x11d)][_0x55973e(0x12b)]??FILE_INDEX_ENTRY_LIMIT;let _0x1873c2=![];const _0x517553=['.'];let _0x59f751=-0x1e0f+0x1b1d*-0x1+0x392c;while(_0x59f751<_0x517553[_0x55973e(0x197)]&&!_0x1873c2){const _0x441500=_0x517553[_0x59f751];_0x59f751+=0x3a0+0x8cf+-0x2b*0x4a;const _0x4f8ebb=await resolveWorkspaceEntryFromCanonicalRoot(_0x11676e,_0x441500,!![])[_0x55973e(0x18a)](()=>undefined);if(_0x4f8ebb===undefined)continue;const _0x5038ff=await opendir(_0x4f8ebb)[_0x55973e(0x18a)](()=>undefined);if(_0x5038ff===undefined)continue;let _0xba2329=[];const _0x10240a=async()=>{const _0x12665f=_0x55973e,_0x508fe4=await Promise[_0x12665f(0x150)](_0xba2329);_0xba2329=[];for(const _0xf5cb93 of _0x508fe4){if(_0xf5cb93===undefined)continue;if(_0xf5cb93[_0x12665f(0x175)]===_0x12665f(0x135)||_0xf5cb93[_0x12665f(0x175)][_0x12665f(0xf8)](_0x12665f(0xc5))||isExcluded(_0xf5cb93[_0x12665f(0x175)],_0x3712b5))continue;if(_0xf5cb93[_0x12665f(0xfd)]===_0x12665f(0xd7))_0x517553[_0x12665f(0x127)](_0xf5cb93[_0x12665f(0x175)]);_0x398637[_0x12665f(0x127)](_0xf5cb93);if(_0x398637[_0x12665f(0x197)]>=_0x6f3e3){_0x1873c2=!![];break;}}};for await(const _0x2ce870 of _0x5038ff){const _0x250934=_0x441500==='.'?_0x2ce870[_0x55973e(0x1da)]:posix[_0x55973e(0x18d)](_0x441500[_0x55973e(0xfb)]('\x5c','/'),_0x2ce870[_0x55973e(0x1da)]);if(_0x250934===_0x55973e(0x135)||_0x250934[_0x55973e(0xf8)](_0x55973e(0xc5))||isExcluded(_0x250934,_0x3712b5))continue;_0xba2329[_0x55973e(0x127)](inspectWorkspaceIndexEntry(_0x11676e,_0x250934,_0x2ce870[_0x55973e(0x1da)]));if(_0xba2329[_0x55973e(0x197)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0x10240a();if(_0x1873c2)break;}if(!_0x1873c2&&_0xba2329[_0x55973e(0x197)]>0xd8b*-0x1+-0x1fae*-0x1+-0x1*0x1223)await _0x10240a();}this[_0x55973e(0x12c)]=_0x11676e,this[_0x55973e(0xd8)]=_0x398637,this[_0x55973e(0x104)]=_0x1873c2,this[_0x55973e(0x171)]=fileIndexSignature(_0x398637,_0x1873c2),this[_0x55973e(0x170)]=![],this[_0x55973e(0x1d2)]?.[_0x55973e(0x1bd)]();try{this[_0x55973e(0x1d2)]=watch(_0x11676e,{'persistent':![],'recursive':!![]},(_0x34c581,_0x1ac7c7)=>{const _0x606f0=_0x55973e;if(_0x1ac7c7!==null){const _0x55269f=_0x1ac7c7[_0x606f0(0xd1)]()[_0x606f0(0xfb)]('\x5c','/');if(_0x55269f===_0x606f0(0x135)||_0x55269f[_0x606f0(0xf8)](_0x606f0(0xc5))||isExcluded(_0x55269f,_0x3712b5))return;}this[_0x606f0(0x1dc)]();}),this[_0x55973e(0x1d2)]['on'](_0x55973e(0x157),()=>{const _0x22c752=_0x55973e;this[_0x22c752(0x1dc)](),this[_0x22c752(0x1d2)]?.[_0x22c752(0x1bd)](),this[_0x22c752(0x1d2)]=undefined,this[_0x22c752(0x1c2)]();});}catch{this[_0x55973e(0x1d2)]=undefined,this[_0x55973e(0x1c2)]();}}[_0x28a6c6(0x1c2)](){const _0x346544=_0x28a6c6;if(this[_0x346544(0xdc)]!==undefined)return;this[_0x346544(0xdc)]=setInterval(()=>void this[_0x346544(0xd2)](),FILE_INDEX_FALLBACK_POLL_MS),this[_0x346544(0xdc)][_0x346544(0x16b)]();}async[_0x28a6c6(0xd2)](){const _0x131ad4=_0x28a6c6;if(this[_0x131ad4(0xf1)]!==undefined)return;const _0x1fc6d0=this[_0x131ad4(0x171)];this[_0x131ad4(0x170)]=!![];try{await this[_0x131ad4(0x1c0)]();if(_0x1fc6d0!==this[_0x131ad4(0x171)])this[_0x131ad4(0x11d)][_0x131ad4(0x10a)]?.();}catch{this[_0x131ad4(0x170)]=![];}}[_0x28a6c6(0x1dc)](){const _0x35b043=_0x28a6c6;if(this[_0x35b043(0x170)])return;this[_0x35b043(0x170)]=!![],this[_0x35b043(0x11d)][_0x35b043(0x10a)]?.();}}function fileIndexSignature(_0x2f10ee,_0x29c478){const _0x76864d=_0x28a6c6,_0x21606b=createHash(_0x76864d(0x138));_0x21606b[_0x76864d(0x1cb)](_0x29c478?'1\x00':'0\x00');for(const _0x2b82b2 of _0x2f10ee)_0x21606b[_0x76864d(0x1cb)](_0x2b82b2[_0x76864d(0x175)]+'\x00'+String(_0x2b82b2[_0x76864d(0x1ae)])+'\x00'+String(_0x2b82b2[_0x76864d(0xda)])+'\x00');return _0x21606b[_0x76864d(0x19d)](_0x76864d(0x18b));}async function workspaceExcludePatterns(_0x60d01e){const _0x14d204=_0x28a6c6,_0x57c175=resolve(_0x60d01e,_0x14d204(0xdf)),_0xf7ee1d=await readFile(_0x57c175,_0x14d204(0x1bf))[_0x14d204(0x110)](JSON[_0x14d204(0x134)])[_0x14d204(0x18a)](()=>undefined);if(typeof _0xf7ee1d!==_0x14d204(0xf5)||_0xf7ee1d===null)return[];return[_0x14d204(0x146),_0x14d204(0xf9)][_0x14d204(0x154)](_0x5d92f1=>{const _0x242215=_0x14d204,_0x1f29f1=_0xf7ee1d[_0x5d92f1];return typeof _0x1f29f1===_0x242215(0xf5)&&_0x1f29f1!==null?Object[_0x242215(0xd8)](_0x1f29f1)[_0x242215(0x154)](([_0x227304,_0x4d77f2])=>_0x4d77f2===!![]?[_0x227304]:[]):[];});}function isExcluded(_0x305f91,_0x4225e5){const _0x2aeb76=_0x28a6c6;return _0x4225e5[_0x2aeb76(0x14b)](_0xd9c624=>minimatch(_0x305f91,_0xd9c624,{'dot':!![],'nocase':_0x1cf53c()!==_0x2aeb76(0x143)})||minimatch(_0x305f91+'/',_0xd9c624,{'dot':!![],'nocase':_0x1cf53c()!==_0x2aeb76(0x143)}));}function compareRankedCandidate(_0x1de76c,_0x459b74){const _0x2c2cba=_0x28a6c6;return _0x459b74[_0x2c2cba(0x191)]-_0x1de76c[_0x2c2cba(0x191)]||_0x1de76c[_0x2c2cba(0xd5)][_0x2c2cba(0x175)][_0x2c2cba(0x15d)](_0x459b74[_0x2c2cba(0xd5)][_0x2c2cba(0x175)]);}class RankedCandidateHeap{[_0x28a6c6(0x1de)];[_0x28a6c6(0xe1)]=[];constructor(_0x390662){const _0x10099a=_0x28a6c6;this[_0x10099a(0x1de)]=_0x390662;}[_0x28a6c6(0x158)](_0x310386){const _0x5292f3=_0x28a6c6;if(this[_0x5292f3(0xe1)][_0x5292f3(0x197)]<this[_0x5292f3(0x1de)]){this[_0x5292f3(0xe1)][_0x5292f3(0x127)](_0x310386),this[_0x5292f3(0x12a)](this[_0x5292f3(0xe1)][_0x5292f3(0x197)]-(0xe9e+0x24a4+0x3341*-0x1));return;}if(compareRankedCandidate(_0x310386,this[_0x5292f3(0xe1)][-0x1c56+0x25b8+-0x962])>=-0x1a73+-0x3a*-0x1b+0x1455)return;this[_0x5292f3(0xe1)][-0x16be+-0x2*0xc0a+-0xd*-0x39a]=_0x310386,this[_0x5292f3(0x167)](0x109*-0x8+0x1*0x1da7+0x155f*-0x1);}[_0x28a6c6(0x11f)](){const _0x1fb5ae=_0x28a6c6;return[...this[_0x1fb5ae(0xe1)]][_0x1fb5ae(0x16d)](compareRankedCandidate);}[_0x28a6c6(0x12a)](_0x57979b){const _0x2972a3=_0x28a6c6;let _0x1854f7=_0x57979b;while(_0x1854f7>0x37d+-0x1*0x1a+-0x363*0x1){const _0x13ea57=Math[_0x2972a3(0x1b8)]((_0x1854f7-(-0x1*0x8db+0x2b*0x1c+0x428))/(0x1*-0x45f+-0x215+-0x2*-0x33b));if(compareRankedCandidate(this[_0x2972a3(0xe1)][_0x1854f7],this[_0x2972a3(0xe1)][_0x13ea57])<=-0x1d6*0x2+-0xe*-0x3f+0x3a)break;[this[_0x2972a3(0xe1)][_0x1854f7],this[_0x2972a3(0xe1)][_0x13ea57]]=[this[_0x2972a3(0xe1)][_0x13ea57],this[_0x2972a3(0xe1)][_0x1854f7]],_0x1854f7=_0x13ea57;}}[_0x28a6c6(0x167)](_0x535262){const _0x701e3f=_0x28a6c6;let _0xcc80b4=_0x535262;while(!![]){const _0x394928=_0xcc80b4*(0x17c1+0x3f*0x54+0x1*-0x2c6b)+(0x1425+0x17b3+-0x4df*0x9);if(_0x394928>=this[_0x701e3f(0xe1)][_0x701e3f(0x197)])return;const _0x25177d=_0x394928+(0x1*0x1bb4+0x2*-0x9d6+-0xf*0x89),_0x2fb100=_0x25177d<this[_0x701e3f(0xe1)][_0x701e3f(0x197)]&&compareRankedCandidate(this[_0x701e3f(0xe1)][_0x25177d],this[_0x701e3f(0xe1)][_0x394928])>-0x15c6+-0x1a59+0x301f?_0x25177d:_0x394928;if(compareRankedCandidate(this[_0x701e3f(0xe1)][_0x2fb100],this[_0x701e3f(0xe1)][_0xcc80b4])<=-0x1*-0x1328+0x1*-0xc97+0x29*-0x29)return;[this[_0x701e3f(0xe1)][_0xcc80b4],this[_0x701e3f(0xe1)][_0x2fb100]]=[this[_0x701e3f(0xe1)][_0x2fb100],this[_0x701e3f(0xe1)][_0xcc80b4]],_0xcc80b4=_0x2fb100;}}}function fuzzyPathScore(_0x2d48b2,_0x3407ee){const _0x4b2178=_0x28a6c6,_0x1bdb7a=_0x2d48b2[_0x4b2178(0x1d8)](),_0x1886c2=_0x3407ee[_0x4b2178(0x1b5)]()[_0x4b2178(0x1d8)]();let _0x52644e=-0xba*-0x33+-0x1564+0x2*-0x7d5,_0x500de2=0xc4+-0xc24+0x68*0x1c,_0x44fd3f=-(-0x9*-0x3c2+-0x2b*0xdf+0x3a5);for(const _0x135410 of _0x1886c2){const _0x9fe47c=_0x1bdb7a[_0x4b2178(0x106)](_0x135410,_0x52644e);if(_0x9fe47c===-(-0x2*-0x5e7+-0x557+-0x676))return-(0x21cc+0x6ad*-0x1+-0x1b1e);_0x500de2+=_0x9fe47c===_0x44fd3f+(-0x1224+0x1*0x20fb+0x1*-0xed6)?0x1ce7+-0x9b5+-0x1326*0x1:-0x180c+0x2f9+0x1514;if(_0x9fe47c===-0x845*-0x3+-0x4*0x4d5+-0x57b||_0x4b2178(0x11b)[_0x4b2178(0x14a)](_0x1bdb7a[_0x9fe47c-(-0x1349+0x1*0x1b8e+-0x422*0x2)]??''))_0x500de2+=-0xb93+0x805*0x4+-0x1479;_0x44fd3f=_0x9fe47c,_0x52644e=_0x9fe47c+(-0x1c61*-0x1+-0x1cb*-0x6+0x1*-0x2722);}const _0x123f87=_0x2d48b2[_0x4b2178(0x1cc)](_0x2d48b2[_0x4b2178(0xe8)]('/')+(0xa3a+0x1ee2+0x291b*-0x1))[_0x4b2178(0x1d8)]();if(_0x123f87[_0x4b2178(0x14a)](_0x1886c2))_0x500de2+=0xe4*0x11+-0x29a+-0x631*0x2;else{if(_0x1bdb7a[_0x4b2178(0x14a)](_0x1886c2))_0x500de2+=-0x827*0x4+-0x30*0x29+0x285c;}return _0x500de2-_0x2d48b2[_0x4b2178(0x197)]/(-0x1b8b+-0x66b*-0x1+0x1908);}export async function listWorkspaceDirectories(_0x4f7a6c,_0x33c88c,_0x420882=homedir()){const _0x404c5d=_0x28a6c6,_0x27b921=await realpath(_0x420882),_0x1fb45a=await Promise[_0x404c5d(0x150)](_0x33c88c[_0x404c5d(0x1dd)](_0x86721d=>realpath(_0x86721d))),_0x51e5ab=[...new Set([_0x27b921,..._0x1fb45a])],_0x4ae166=_0x4f7a6c===undefined?_0x1fb45a[0x1*-0x53+-0x1a1+0x1f4]??_0x27b921:await realpath(_0x4f7a6c),_0x531b5e=await stat(_0x4ae166);if(!_0x531b5e[_0x404c5d(0xc8)]()||!isWithinAllowedRoot(_0x4ae166,_0x51e5ab))throw new Error(_0x404c5d(0x101));const _0x5e1195=await readdir(_0x4ae166,{'withFileTypes':!![]}),_0x303a68=[];for(const _0x27adb0 of _0x5e1195[_0x404c5d(0x16d)]((_0x3773ea,_0x2e0562)=>_0x3773ea[_0x404c5d(0x1da)][_0x404c5d(0x15d)](_0x2e0562[_0x404c5d(0x1da)]))){if(!_0x27adb0[_0x404c5d(0xc8)]()&&!_0x27adb0[_0x404c5d(0x152)]())continue;const _0x658633=await realpath(resolve(_0x4ae166,_0x27adb0[_0x404c5d(0x1da)]))[_0x404c5d(0x18a)](()=>undefined);if(_0x658633===undefined||!isWithinAllowedRoot(_0x658633,_0x51e5ab))continue;const _0x2ac499=await stat(_0x658633)[_0x404c5d(0x18a)](()=>undefined);if(_0x2ac499===undefined||!_0x2ac499[_0x404c5d(0xc8)]())continue;_0x303a68[_0x404c5d(0x127)]({'path':_0x658633,'name':_0x27adb0[_0x404c5d(0x1da)],'selectable':isWithinAllowedRoot(_0x658633,_0x1fb45a)});if(_0x303a68[_0x404c5d(0x197)]>DIRECTORY_PICKER_LIMIT)break;}const _0x474df5=dirname(_0x4ae166);return{'homePath':_0x27b921,'currentPath':_0x4ae166,'parentPath':_0x474df5===_0x4ae166||!isWithinAllowedRoot(_0x474df5,_0x51e5ab)?null:_0x474df5,'browseRoots':_0x1fb45a,'selectable':isWithinAllowedRoot(_0x4ae166,_0x1fb45a),'entries':_0x303a68[_0x404c5d(0x1cc)](-0x755+0x68a+0xcb,DIRECTORY_PICKER_LIMIT),'truncated':_0x303a68[_0x404c5d(0x197)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x1d56a0,_0x137658='.',_0x2d6880,_0x542824=DIRECTORY_PAGE_LIMIT){const _0x5b2155=_0x28a6c6;if(!Number[_0x5b2155(0xf4)](_0x542824)||_0x542824<0x1430+-0x2523*-0x1+-0x3952||_0x542824>DIRECTORY_PAGE_LIMIT)throw new Error(_0x5b2155(0x187));const _0xfb0e0a=await resolveWorkspaceEntry(_0x1d56a0,_0x137658,!![]),_0x459955=await readdir(_0xfb0e0a,{'withFileTypes':!![]}),_0x202ff7=await realpath(_0x1d56a0),_0x4a017d=decodeDirectoryCursor(_0x2d6880,_0x137658),_0x12db5a=_0x459955[_0x5b2155(0x16e)](_0x113f7d=>_0x113f7d[_0x5b2155(0x1da)]!==_0x5b2155(0x135)&&!isWorkspaceUploadTemporaryName(_0x113f7d[_0x5b2155(0x1da)]))[_0x5b2155(0x1dd)](_0x3c0f57=>_0x3c0f57[_0x5b2155(0x1da)])[_0x5b2155(0x16d)]((_0x5f5453,_0x5bfd01)=>_0x5f5453[_0x5b2155(0x15d)](_0x5bfd01)),_0x24760f=_0x4a017d===undefined?-0x36*0x71+0x9c4*-0x1+0x219a:_0x12db5a[_0x5b2155(0x1cf)](_0x41ddfd=>_0x41ddfd>_0x4a017d);if(_0x4a017d!==undefined&&_0x24760f===-(-0x11*-0xed+-0x1*-0x2225+-0x31e1))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x1955d8=_0x12db5a[_0x5b2155(0x1cc)](_0x24760f,_0x24760f+_0x542824),_0x16d4a8=[];for(const _0x4ffd07 of _0x1955d8){const _0x599ff2=await resolveWorkspaceEntry(_0x202ff7,relative(_0x202ff7,resolve(_0xfb0e0a,_0x4ffd07)),![])[_0x5b2155(0x18a)](_0x4bfa88=>{if(isSkippableWorkspaceEntryError(_0x4bfa88))return undefined;throw _0x4bfa88;});if(_0x599ff2===undefined)continue;const _0x2057f7=await lstat(_0x599ff2)[_0x5b2155(0x18a)](_0x1b6d11=>{const _0x29592b=_0x5b2155;if(_0x1b6d11[_0x29592b(0x122)]===_0x29592b(0x19f))return undefined;throw _0x1b6d11;});if(_0x2057f7===undefined||!_0x2057f7[_0x5b2155(0xdb)]()&&!_0x2057f7[_0x5b2155(0xc8)]())continue;_0x16d4a8[_0x5b2155(0x127)]({'path':relative(_0x202ff7,_0x599ff2)[_0x5b2155(0x132)](sep)[_0x5b2155(0x18d)]('/'),'name':_0x4ffd07,'kind':_0x2057f7[_0x5b2155(0xc8)]()?_0x5b2155(0xd7):_0x5b2155(0x10f),'size':_0x2057f7[_0x5b2155(0xdb)]()?_0x2057f7[_0x5b2155(0x1ae)]:null,'modifiedAt':_0x2057f7[_0x5b2155(0xeb)]});}const _0x3eaf76=_0x12db5a[_0x24760f+_0x1955d8[_0x5b2155(0x197)]];return{'entries':_0x16d4a8,'nextCursor':_0x3eaf76===undefined||_0x1955d8[_0x5b2155(0x197)]===0x1*0x210d+0x11*-0x21+-0x1edc?null:encodeDirectoryCursor(_0x137658,_0x1955d8[_0x1955d8[_0x5b2155(0x197)]-(-0x10ae+0x14d5+-0x426)]),'truncated':_0x3eaf76!==undefined};}export async function mutateWorkspaceFile(_0x164a91,_0x56e25d){const _0x292a59=_0x28a6c6,_0x14af8f=await realpath(_0x164a91);if(_0x56e25d[_0x292a59(0x1d3)]===_0x292a59(0x117)||_0x56e25d[_0x292a59(0x1d3)]===_0x292a59(0xc4)){const _0xc079a3=await resolveNewWorkspaceEntry(_0x14af8f,_0x56e25d[_0x292a59(0x175)]);if(_0x56e25d[_0x292a59(0x1d3)]===_0x292a59(0x117))await writeFile(_0xc079a3,'',{'flag':'wx'});else await mkdir(_0xc079a3);return{'path':workspaceRelativePath(_0x14af8f,_0xc079a3)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x14af8f,_0x56e25d[_0x292a59(0x175)]);const _0x4fef8f=await resolveWorkspaceEntryMetadata(_0x14af8f,_0x56e25d[_0x292a59(0x175)]);if(workspaceRelativePath(_0x14af8f,_0x4fef8f[_0x292a59(0x175)])==='.')throw new Error(_0x292a59(0x16c));if(_0x56e25d[_0x292a59(0x1d3)]===_0x292a59(0x10b))return await rm(_0x4fef8f[_0x292a59(0x175)],{'recursive':_0x4fef8f[_0x292a59(0x1ac)][_0x292a59(0xc8)](),'force':![]}),{'deleted':!![]};const _0x5a8593=await resolveNewWorkspaceEntry(_0x14af8f,_0x56e25d[_0x292a59(0x1b1)]);if(_0x4fef8f[_0x292a59(0x1ac)][_0x292a59(0xc8)]()){const _0x1cf3f3=relative(_0x4fef8f[_0x292a59(0x175)],_0x5a8593);if(_0x1cf3f3===''||!isAbsolute(_0x1cf3f3)&&_0x1cf3f3!=='..'&&!_0x1cf3f3[_0x292a59(0xf8)]('..'+sep))throw new Error(_0x292a59(0x1a5));}return await rename(_0x4fef8f[_0x292a59(0x175)],_0x5a8593),{'path':workspaceRelativePath(_0x14af8f,_0x5a8593)};}async function resolveNewWorkspaceEntry(_0x143282,_0x216b9d){const _0x5c84f9=_0x28a6c6,_0x32b2ed=_0x216b9d[_0x5c84f9(0xfb)]('\x5c','/'),_0x417328=_0x32b2ed[_0x5c84f9(0x132)]('/'),_0x2ce045=_0x417328['at'](-(-0x7a2*-0x3+0x20*-0xef+-0x1*-0x6fb));if(_0x216b9d[_0x5c84f9(0x14a)]('\x00')||_0x32b2ed[_0x5c84f9(0xf8)]('/')||isAbsolute(_0x216b9d)||win32[_0x5c84f9(0x18c)](_0x32b2ed)||_0x2ce045===undefined||_0x2ce045[_0x5c84f9(0x197)]===0x1841+0x9c6+-0x2207||_0x417328[_0x5c84f9(0x14b)](invalidWorkspaceMutationSegment))throw new Error(_0x5c84f9(0xfa));const _0x314c8b=_0x417328[_0x5c84f9(0x197)]===0xd1*0xb+0x19c3+0x1*-0x22bd?'.':_0x417328[_0x5c84f9(0x1cc)](0x1*-0x1b7d+-0x2487+0x4004,-(0x1215+0x6*-0x53a+0x19*0x88))[_0x5c84f9(0x18d)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0x143282,_0x314c8b);const _0x10e8fb=await resolveWorkspaceEntryFromCanonicalRoot(_0x143282,_0x314c8b,!![]),_0x4c3060=resolve(_0x10e8fb,_0x2ce045);try{await lstat(_0x4c3060);throw new Error(_0x5c84f9(0x1e0));}catch(_0x3128e8){if(_0x3128e8[_0x5c84f9(0x122)]!==_0x5c84f9(0x19f))throw _0x3128e8;}return _0x4c3060;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x14a92b,_0x3b5f3){const _0x3c9c89=_0x28a6c6,_0x4dabbf=_0x3b5f3[_0x3c9c89(0xfb)]('\x5c','/');if(_0x4dabbf==='.')return;const _0x3215aa=_0x4dabbf[_0x3c9c89(0x132)]('/');if(_0x3b5f3[_0x3c9c89(0x14a)]('\x00')||_0x4dabbf[_0x3c9c89(0xf8)]('/')||isAbsolute(_0x3b5f3)||win32[_0x3c9c89(0x18c)](_0x4dabbf)||_0x3215aa[_0x3c9c89(0x14b)](invalidWorkspaceMutationSegment))throw new Error(_0x3c9c89(0xfa));let _0x1fac3d=_0x14a92b;for(const _0x4df5b3 of _0x3215aa){_0x1fac3d=resolve(_0x1fac3d,_0x4df5b3);const _0x17887d=await lstat(_0x1fac3d)[_0x3c9c89(0x18a)](_0x532396=>{const _0x1928e9=_0x3c9c89;if(_0x532396[_0x1928e9(0x122)]===_0x1928e9(0x19f))throw new Error(_0x1928e9(0x10c));throw _0x532396;});if(_0x17887d[_0x3c9c89(0x152)]())throw new Error(_0x3c9c89(0xfa));}}function invalidWorkspaceMutationSegment(_0x2a48b4){const _0x82d188=_0x28a6c6;if(_0x2a48b4[_0x82d188(0x197)]===-0x158d+0x28d*0x5+0x466*0x2||_0x2a48b4==='.'||_0x2a48b4==='..'||_0x2a48b4===_0x82d188(0x135))return!![];if(_0x1cf53c()!==_0x82d188(0x192))return![];const _0x40381f=_0x2a48b4[_0x82d188(0x1df)](/[. ]+$/u,'')[_0x82d188(0xe6)]();return/[<>:"|?*]/u[_0x82d188(0x174)](_0x2a48b4)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x82d188(0x174)](_0x40381f);}function workspaceRelativePath(_0x2da54d,_0x467761){const _0x4ebcd2=_0x28a6c6,_0x4d076a=relative(_0x2da54d,_0x467761)[_0x4ebcd2(0x132)](sep)[_0x4ebcd2(0x18d)]('/');return _0x4d076a[_0x4ebcd2(0x197)]===-0x2487+-0x12cf+-0x6*-0x939?'.':_0x4d076a;}function isSkippableWorkspaceEntryError(_0x5209bf){const _0x1e7789=_0x28a6c6;return _0x5209bf instanceof Error&&(_0x5209bf[_0x1e7789(0x153)]===_0x1e7789(0xfa)||_0x5209bf[_0x1e7789(0x153)]===_0x1e7789(0x10c)||_0x5209bf[_0x1e7789(0x153)]===_0x1e7789(0xf2));}export async function preflightWorkspaceUpload(_0x4759c0,_0x876ec9,_0x455920){const _0x4195c8=_0x28a6c6;if(_0x455920[_0x4195c8(0x197)]===0x1541+-0xd33+-0x80e*0x1||_0x455920==='.'||_0x455920==='..'||_0x455920[_0x4195c8(0x14a)]('\x00')||_0x455920[_0x4195c8(0x14a)]('/')||_0x455920[_0x4195c8(0x14a)]('\x5c')||isWorkspaceUploadTemporaryName(_0x455920))return{'path':'','absolutePath':'','status':_0x4195c8(0xde)};const _0x416f3c=await realpath(_0x4759c0),_0x113b79=await resolveWorkspaceEntry(_0x416f3c,_0x876ec9,!![]),_0x289064=resolve(_0x113b79,_0x455920);if(dirname(_0x289064)!==_0x113b79)throw new Error(_0x4195c8(0xfa));const _0x4e2c80=relative(_0x416f3c,_0x289064)[_0x4195c8(0x132)](sep)[_0x4195c8(0x18d)]('/'),_0x2f8354=await lstat(_0x289064)[_0x4195c8(0x18a)](_0x1a9fe2=>{const _0x30e65d=_0x4195c8;if(_0x1a9fe2[_0x30e65d(0x122)]===_0x30e65d(0x19f))return undefined;throw _0x1a9fe2;});if(_0x2f8354===undefined)return{'path':_0x4e2c80,'absolutePath':_0x289064,'status':_0x4195c8(0xcb)};if(_0x2f8354[_0x4195c8(0x152)]())throw new Error(_0x4195c8(0xfa));if(_0x2f8354[_0x4195c8(0xdb)]())return{'path':_0x4e2c80,'absolutePath':_0x289064,'status':_0x4195c8(0xd4)};return{'path':_0x4e2c80,'absolutePath':_0x289064,'status':_0x4195c8(0x169)};}export function workspaceUploadTemporaryName(_0xa7eb51){const _0x2cab83=_0x28a6c6;return _0x2cab83(0x179)+_0xa7eb51+_0x2cab83(0x107);}function isWorkspaceUploadTemporaryName(_0x4d11b7){const _0xb5452d=_0x28a6c6;return/^\.mar-upload-[0-9a-f-]{36}\.part$/iu[_0xb5452d(0x174)](_0x4d11b7)||/^\.mar-edit-[0-9a-f-]{36}\.part$/iu[_0xb5452d(0x174)](_0x4d11b7);}export async function readWorkspaceTextFile(_0x20baa3,_0x5b67d0,_0x3b24f5=-0x239+0x1*-0x12b6+0x14ef,_0x3caeb5=FILE_READ_LIMIT){const _0x1df4eb=_0x28a6c6;if(!Number[_0x1df4eb(0xf4)](_0x3b24f5)||_0x3b24f5<0x173c*-0x1+-0xe7f+-0x25bb*-0x1||!Number[_0x1df4eb(0xf4)](_0x3caeb5)||_0x3caeb5<0x18a8*-0x1+-0x37d+0x1c26||_0x3caeb5>FILE_READ_LIMIT)throw new Error(_0x1df4eb(0xe3));const _0x185e1a=await realpath(_0x20baa3),_0x1f8578=await resolveWorkspaceEntry(_0x185e1a,_0x5b67d0,![]),_0x251794=await lstat(_0x1f8578);if(!_0x251794[_0x1df4eb(0xdb)]())throw new Error(_0x1df4eb(0xf2));if(_0x251794[_0x1df4eb(0x1ae)]>FILE_READ_LIMIT*(0x3*-0x713+0x2*0x503+0x1*0xb43))throw new Error(_0x1df4eb(0x1d6));const _0x38b00d=await readFile(_0x1f8578),_0x47e3d5=createHash(_0x1df4eb(0x138))[_0x1df4eb(0x1cb)](_0x38b00d)[_0x1df4eb(0x19d)](_0x1df4eb(0x18b)),_0x3cd100=_0x38b00d[_0x1df4eb(0x14a)](-0xe8*-0x1c+-0x61f*-0x1+-0x1f7f)||!isValidUtf8(_0x38b00d);if(_0x3cd100){const _0x555135=Math[_0x1df4eb(0x118)](_0x38b00d[_0x1df4eb(0x197)],_0x3b24f5+_0x3caeb5),_0x1a353c=_0x38b00d[_0x1df4eb(0x130)](_0x3b24f5,_0x555135);return{'path':relative(_0x185e1a,_0x1f8578)[_0x1df4eb(0x132)](sep)[_0x1df4eb(0x18d)]('/'),'encoding':_0x1df4eb(0x1d7),'size':_0x38b00d[_0x1df4eb(0x197)],'content':_0x1a353c[_0x1df4eb(0xd1)](_0x1df4eb(0x1d7)),'truncated':_0x555135<_0x38b00d[_0x1df4eb(0x197)],'nextOffset':_0x555135<_0x38b00d[_0x1df4eb(0x197)]?_0x555135:null,'revision':_0x47e3d5};}if(_0x3b24f5>0x1*-0x20dd+0x179b+0x942&&_0x3b24f5<_0x38b00d[_0x1df4eb(0x197)]&&isUtf8ContinuationByte(_0x38b00d[_0x3b24f5]))throw new Error(_0x1df4eb(0xe3));let _0x2e0ba1=Math[_0x1df4eb(0x118)](_0x38b00d[_0x1df4eb(0x197)],_0x3b24f5+_0x3caeb5);if(_0x2e0ba1<_0x38b00d[_0x1df4eb(0x197)]&&isUtf8ContinuationByte(_0x38b00d[_0x2e0ba1])){while(_0x2e0ba1>_0x3b24f5&&isUtf8ContinuationByte(_0x38b00d[_0x2e0ba1]))_0x2e0ba1-=-0x2524+0x377+0x21ae;if(_0x2e0ba1===_0x3b24f5){_0x2e0ba1+=0x1*0x1048+-0x1*-0x1418+-0x245f;while(_0x2e0ba1<_0x38b00d[_0x1df4eb(0x197)]&&isUtf8ContinuationByte(_0x38b00d[_0x2e0ba1]))_0x2e0ba1+=0x2410+-0x5*0x2c+-0x1*0x2333;}}const _0x4e539d=_0x38b00d[_0x1df4eb(0x130)](_0x3b24f5,_0x2e0ba1),_0xcdceed=new TextDecoder(_0x1df4eb(0xe2),{'fatal':!![]})[_0x1df4eb(0x11e)](_0x4e539d),_0x33d884=_0x2e0ba1<_0x38b00d[_0x1df4eb(0x197)]?_0x2e0ba1:null;return{'path':relative(_0x185e1a,_0x1f8578)[_0x1df4eb(0x132)](sep)[_0x1df4eb(0x18d)]('/'),'encoding':_0x1df4eb(0xe2),'size':_0x38b00d[_0x1df4eb(0x197)],'content':_0xcdceed,'truncated':_0x33d884!==null,'nextOffset':_0x33d884,'revision':_0x47e3d5};}export async function writeWorkspaceTextFile(_0x2cb394,_0x575706,_0x2a4788,_0x1a8e43){const _0x5f08fc=_0x28a6c6;if(!/^[0-9a-f]{64}$/u[_0x5f08fc(0x174)](_0x1a8e43))throw new Error(_0x5f08fc(0x13b));const _0x5dfa27=Buffer[_0x5f08fc(0xf3)](_0x2a4788,_0x5f08fc(0x1bf));if(_0x5dfa27[_0x5f08fc(0x197)]>FILE_READ_LIMIT*(-0x25a7+0xb46+0x1a71))throw new Error(_0x5f08fc(0x1d6));if(_0x5dfa27[_0x5f08fc(0x14a)](0x176b*-0x1+0x2469+0x1*-0xcfe))throw new Error(_0x5f08fc(0x1cd));const _0x9bd393=await realpath(_0x2cb394);await assertWorkspaceMutationPathHasNoSymlinks(_0x9bd393,_0x575706);const _0x14f2fc=await resolveWorkspaceEntry(_0x9bd393,_0x575706,![]),_0x1641c8=await lstat(_0x14f2fc);if(!_0x1641c8[_0x5f08fc(0xdb)]())throw new Error(_0x5f08fc(0xf2));const _0x18d3bb=await readFile(_0x14f2fc);if(_0x18d3bb[_0x5f08fc(0x14a)](-0x9e8+-0x1*0x1537+-0x1f*-0x101)||!isValidUtf8(_0x18d3bb))throw new Error(_0x5f08fc(0x1cd));const _0x5ab51c=createHash(_0x5f08fc(0x138))[_0x5f08fc(0x1cb)](_0x18d3bb)[_0x5f08fc(0x19d)](_0x5f08fc(0x18b));if(_0x5ab51c!==_0x1a8e43)throw new Error(_0x5f08fc(0x13f));const _0x4d5752=createHash(_0x5f08fc(0x138))[_0x5f08fc(0x1cb)](_0x5dfa27)[_0x5f08fc(0x19d)](_0x5f08fc(0x18b)),_0x826aa5=resolve(dirname(_0x14f2fc),_0x5f08fc(0x1e1)+randomUUID()+_0x5f08fc(0x107));try{await writeFile(_0x826aa5,_0x5dfa27,{'flag':'wx','mode':_0x1641c8[_0x5f08fc(0x196)]}),await rename(_0x826aa5,_0x14f2fc);}finally{await rm(_0x826aa5,{'force':!![]})[_0x5f08fc(0x18a)](()=>undefined);}return{'path':workspaceRelativePath(_0x9bd393,_0x14f2fc),'revision':_0x4d5752,'size':_0x5dfa27[_0x5f08fc(0x197)]};}export async function readWorkspaceFileContentRange(_0x3f4f0c,_0x21c77f,_0x239e80=0x17a+0x3*-0x332+0x81c,_0x5bb52d=FILE_READ_LIMIT){const _0x4aba9d=_0x28a6c6;if(!Number[_0x4aba9d(0xf4)](_0x239e80)||_0x239e80<-0x25dc+0x817*-0x3+0x3e21||!Number[_0x4aba9d(0xf4)](_0x5bb52d)||_0x5bb52d<-0x1*0x33b+-0xb50+0xe8c||_0x5bb52d>FILE_READ_LIMIT)throw new Error(_0x4aba9d(0xe3));const _0x4c8aa8=await realpath(_0x3f4f0c),_0x528920=await resolveWorkspaceEntry(_0x4c8aa8,_0x21c77f,![]),_0x48ff8c=await lstat(_0x528920);if(!_0x48ff8c[_0x4aba9d(0xdb)]())throw new Error(_0x4aba9d(0xf2));if(_0x239e80>_0x48ff8c[_0x4aba9d(0x1ae)])throw new Error(_0x4aba9d(0xe3));const _0x1b6b83=Math[_0x4aba9d(0x118)](_0x5bb52d,_0x48ff8c[_0x4aba9d(0x1ae)]-_0x239e80),_0x199659=Buffer[_0x4aba9d(0x19a)](_0x1b6b83),_0x78c743=await open(_0x528920,'r');try{const {bytesRead:_0x53a956}=await _0x78c743[_0x4aba9d(0x139)](_0x199659,0x1*-0x18e5+0x1321*0x1+0x5c4,_0x1b6b83,_0x239e80),_0x6eb9f=_0x239e80+_0x53a956;return{'path':relative(_0x4c8aa8,_0x528920)[_0x4aba9d(0x132)](sep)[_0x4aba9d(0x18d)]('/'),'size':_0x48ff8c[_0x4aba9d(0x1ae)],'offset':_0x239e80,'contentBase64':_0x199659[_0x4aba9d(0x130)](0xc75*-0x1+-0x1*0xa45+0x16ba,_0x53a956)[_0x4aba9d(0xd1)](_0x4aba9d(0x1d7)),'nextOffset':_0x6eb9f<_0x48ff8c[_0x4aba9d(0x1ae)]?_0x6eb9f:null};}finally{await _0x78c743[_0x4aba9d(0x1bd)]();}}export async function readAllowedTextFile(_0x3d0be5,_0x4c57dd,_0x1b8a60=0x1825+-0x1a6c+0x247,_0x2e263d=FILE_READ_LIMIT){const _0x7bb795=_0x28a6c6;if(!isAbsolute(_0x3d0be5))throw new Error(_0x7bb795(0xfa));const _0x448d0a=await realpath(_0x3d0be5)[_0x7bb795(0x18a)](_0x277500=>{const _0x5587ad=_0x7bb795;if(_0x277500[_0x5587ad(0x122)]===_0x5587ad(0x19f))throw new Error(_0x5587ad(0x10c));throw _0x277500;}),_0x1407b5=await Promise[_0x7bb795(0x150)](_0x4c57dd[_0x7bb795(0x1dd)](_0x836f55=>realpath(_0x836f55)));if(!isWithinAllowedRoot(_0x448d0a,_0x1407b5))throw new Error(_0x7bb795(0xfa));const _0xea205=await lstat(_0x448d0a);if(!_0xea205[_0x7bb795(0xdb)]())throw new Error(_0x7bb795(0xf2));if(_0xea205[_0x7bb795(0x1ae)]>FILE_READ_LIMIT*(0xa*0x212+0x1222+-0x26c6))throw new Error(_0x7bb795(0x1d6));if(!Number[_0x7bb795(0xf4)](_0x1b8a60)||_0x1b8a60<0x727+0x226b+-0x2992||!Number[_0x7bb795(0xf4)](_0x2e263d)||_0x2e263d<0x2*-0xb22+-0xfb0+0x25f5||_0x2e263d>FILE_READ_LIMIT)throw new Error(_0x7bb795(0xe3));const _0x162a0f=await readFile(_0x448d0a),_0x4114e2=_0x162a0f[_0x7bb795(0x14a)](0x2*0xa06+0x751*0x1+-0x1b5d)||!isValidUtf8(_0x162a0f),_0x5ed175=Math[_0x7bb795(0x118)](_0x162a0f[_0x7bb795(0x197)],_0x1b8a60+_0x2e263d);if(_0x4114e2){const _0x4c7ffc=_0x162a0f[_0x7bb795(0x130)](_0x1b8a60,_0x5ed175);return{'path':_0x448d0a,'encoding':_0x7bb795(0x1d7),'size':_0x162a0f[_0x7bb795(0x197)],'content':_0x4c7ffc[_0x7bb795(0xd1)](_0x7bb795(0x1d7)),'truncated':_0x5ed175<_0x162a0f[_0x7bb795(0x197)],'nextOffset':_0x5ed175<_0x162a0f[_0x7bb795(0x197)]?_0x5ed175:null};}if(_0x1b8a60>0x1cbe+-0x18bc+0x36*-0x13&&_0x1b8a60<_0x162a0f[_0x7bb795(0x197)]&&isUtf8ContinuationByte(_0x162a0f[_0x1b8a60]))throw new Error(_0x7bb795(0xe3));let _0x5e02d7=_0x5ed175;if(_0x5e02d7<_0x162a0f[_0x7bb795(0x197)]&&isUtf8ContinuationByte(_0x162a0f[_0x5e02d7])){while(_0x5e02d7>_0x1b8a60&&isUtf8ContinuationByte(_0x162a0f[_0x5e02d7]))_0x5e02d7-=-0x259f+-0x7b5+-0xb*-0x41f;if(_0x5e02d7===_0x1b8a60){_0x5e02d7+=0x1361+-0x14+0x104*-0x13;while(_0x5e02d7<_0x162a0f[_0x7bb795(0x197)]&&isUtf8ContinuationByte(_0x162a0f[_0x5e02d7]))_0x5e02d7+=-0x98e+0x1*0x1393+-0xa04;}}const _0x257882=_0x5e02d7<_0x162a0f[_0x7bb795(0x197)]?_0x5e02d7:null;return{'path':_0x448d0a,'encoding':_0x7bb795(0xe2),'size':_0x162a0f[_0x7bb795(0x197)],'content':new TextDecoder(_0x7bb795(0xe2),{'fatal':!![]})[_0x7bb795(0x11e)](_0x162a0f[_0x7bb795(0x130)](_0x1b8a60,_0x5e02d7)),'truncated':_0x257882!==null,'nextOffset':_0x257882};}function isValidUtf8(_0x10ba2d){const _0x17a035=_0x28a6c6;try{return new TextDecoder(_0x17a035(0xe2),{'fatal':!![]})[_0x17a035(0x11e)](_0x10ba2d),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x237a5){return(_0x237a5&-0x26*0x12+0x6*-0x221+0x1032)===0x19ae+-0xb57+0x3*-0x49d;}export async function searchWorkspaceFiles(_0x2b1f16,_0x59b5f6,_0x506b14,_0x43fcfa=SEARCH_RESULT_LIMIT,_0x5ba12c=![]){const _0x3483ce=_0x28a6c6,_0x5b170b=new WorkspaceFileIndex(_0x2b1f16);try{return await _0x5b170b[_0x3483ce(0x14f)](_0x59b5f6,_0x506b14,_0x43fcfa,_0x5ba12c);}finally{_0x5b170b[_0x3483ce(0x1d5)]();}}async function resolveWorkspaceEntry(_0x178f9a,_0x1aab56,_0x12b8c3){const _0x11ec29=await realpath(_0x178f9a);return resolveWorkspaceEntryFromCanonicalRoot(_0x11ec29,_0x1aab56,_0x12b8c3);}async function resolveWorkspaceEntryFromCanonicalRoot(_0x2df223,_0x521b58,_0x3e313a){const _0x2c6950=_0x28a6c6,_0x2a4be8=await resolveWorkspaceEntryMetadata(_0x2df223,_0x521b58);if(_0x3e313a?!_0x2a4be8[_0x2c6950(0x1ac)][_0x2c6950(0xc8)]():!_0x2a4be8[_0x2c6950(0x1ac)][_0x2c6950(0xdb)]()&&!_0x2a4be8[_0x2c6950(0x1ac)][_0x2c6950(0xc8)]())throw new Error(_0x3e313a?_0x2c6950(0x142):_0x2c6950(0xf2));return _0x2a4be8[_0x2c6950(0x175)];}async function resolveWorkspaceEntryMetadata(_0x31d7c8,_0x18ecb1){const _0x3b5a03=_0x28a6c6;if(_0x18ecb1[_0x3b5a03(0x14a)]('\x00')||_0x18ecb1[_0x3b5a03(0x197)]===-0x205c+0x17ba+-0x5*-0x1ba||_0x18ecb1[_0x3b5a03(0xf8)]('/')||_0x18ecb1[_0x3b5a03(0xf8)]('\x5c'))throw new Error(_0x3b5a03(0xfa));const _0x371cbc=_0x18ecb1[_0x3b5a03(0xfb)]('\x5c','/');if(_0x371cbc[_0x3b5a03(0x132)]('/')[_0x3b5a03(0x14b)](_0x507a4d=>_0x507a4d==='..'||_0x507a4d===_0x3b5a03(0x135)))throw new Error(_0x3b5a03(0xfa));let _0x3a1765;try{_0x3a1765=await realpath(resolve(_0x31d7c8,_0x371cbc));}catch(_0x57ac6d){if(_0x57ac6d[_0x3b5a03(0x122)]===_0x3b5a03(0x19f))throw new Error(_0x3b5a03(0x10c));throw _0x57ac6d;}const _0x11f190=relative(_0x31d7c8,_0x3a1765);if(isAbsolute(_0x11f190)||_0x11f190[_0x3b5a03(0xf8)]('..')||_0x11f190==='..'||_0x11f190[_0x3b5a03(0xf8)]('..'+sep))throw new Error(_0x3b5a03(0xfa));const _0x3e02b7=await lstat(_0x3a1765);return{'path':_0x3a1765,'metadata':_0x3e02b7};}async function inspectWorkspaceIndexEntry(_0x5bd37c,_0x441621,_0x58332e){const _0x3e3585=_0x28a6c6;try{const _0x259473=await resolveWorkspaceEntryMetadata(_0x5bd37c,_0x441621);if(!_0x259473[_0x3e3585(0x1ac)][_0x3e3585(0xdb)]()&&!_0x259473[_0x3e3585(0x1ac)][_0x3e3585(0xc8)]())return undefined;const _0x37a464=relative(_0x5bd37c,_0x259473[_0x3e3585(0x175)])[_0x3e3585(0x132)](sep)[_0x3e3585(0x18d)]('/');return _0x259473[_0x3e3585(0x1ac)][_0x3e3585(0xc8)]()?{'path':_0x37a464,'name':_0x58332e,'kind':_0x3e3585(0xd7),'size':null,'modifiedAt':_0x259473[_0x3e3585(0x1ac)][_0x3e3585(0xeb)]}:{'path':_0x37a464,'name':_0x58332e,'kind':_0x3e3585(0x10f),'size':_0x259473[_0x3e3585(0x1ac)][_0x3e3585(0x1ae)],'modifiedAt':_0x259473[_0x3e3585(0x1ac)][_0x3e3585(0xeb)]};}catch{return undefined;}}function encodeDirectoryCursor(_0x177d90,_0x3e49ab){const _0x34d889=_0x28a6c6;return Buffer[_0x34d889(0xf3)](JSON[_0x34d889(0x109)]({'path':_0x177d90,'name':_0x3e49ab}))[_0x34d889(0xd1)](_0x34d889(0x194));}function decodeDirectoryCursor(_0xfa9286,_0xfbb202){const _0x23267f=_0x28a6c6;if(_0xfa9286===undefined)return undefined;try{const _0x15a91f=JSON[_0x23267f(0x134)](Buffer[_0x23267f(0xf3)](_0xfa9286,_0x23267f(0x194))[_0x23267f(0xd1)](_0x23267f(0x1bf)));if(typeof _0x15a91f!==_0x23267f(0xf5)||_0x15a91f===null||_0x15a91f[_0x23267f(0x175)]!==_0xfbb202||typeof _0x15a91f[_0x23267f(0x1da)]!==_0x23267f(0xe5))throw new Error();return _0x15a91f[_0x23267f(0x1da)];}catch{throw new Error(_0x23267f(0x187));}}function encodeSearchCursor(_0x165bf2,_0x41becd){const _0x3bd056=_0x28a6c6;return Buffer[_0x3bd056(0xf3)](JSON[_0x3bd056(0x109)]({'query':_0x165bf2,'path':_0x41becd}))[_0x3bd056(0xd1)](_0x3bd056(0x194));}function decodeSearchCursor(_0x52c693,_0x5029c7){const _0x153b3a=_0x28a6c6;if(_0x52c693===undefined)return undefined;try{const _0x49e770=JSON[_0x153b3a(0x134)](Buffer[_0x153b3a(0xf3)](_0x52c693,_0x153b3a(0x194))[_0x153b3a(0xd1)](_0x153b3a(0x1bf)));if(typeof _0x49e770!==_0x153b3a(0xf5)||_0x49e770===null||_0x49e770[_0x153b3a(0xc9)]!==_0x5029c7||typeof _0x49e770[_0x153b3a(0x175)]!==_0x153b3a(0xe5))throw new Error();return _0x49e770[_0x153b3a(0x175)];}catch{throw new Error(_0x153b3a(0x187));}}export function normalizeWorkspacePath(_0x5874fd,_0x20009e=_0x1cf53c()){const _0x516508=_0x28a6c6;if(_0x5874fd[_0x516508(0x197)]===0x20a2*-0x1+-0xcd9+-0x3*-0xf29||_0x5874fd[_0x516508(0x14a)]('\u0000'))throw new Error(_0x516508(0x1ca));if(_0x20009e===_0x516508(0x192)){if(/^\\\\[?.]/[_0x516508(0x174)](_0x5874fd))throw new Error(_0x516508(0x108));const _0x3d0e66=win32[_0x516508(0x128)](_0x5874fd[_0x516508(0xfb)]('/','\x5c'));if(!win32[_0x516508(0x18c)](_0x3d0e66))throw new Error(_0x516508(0x116));return _0x3d0e66[_0x516508(0x1df)](/\\+$/,'')[_0x516508(0x160)]();}if(_0x20009e!==_0x516508(0x143))throw new Error(_0x516508(0x1ad));const _0xc06e02=posix[_0x516508(0x128)](_0x5874fd);if(!posix[_0x516508(0x18c)](_0xc06e02))throw new Error(_0x516508(0x116));return _0xc06e02==='/'?_0xc06e02:_0xc06e02[_0x516508(0x1df)](/\/+$/,'');}export function isWithinAllowedRoot(_0x1f575a,_0xad3a1b,_0x2e0dff=_0x1cf53c()){const _0x48b9ed=_0x28a6c6,_0x232035=normalizeWorkspacePath(_0x1f575a,_0x2e0dff),_0x2b412e=_0x2e0dff===_0x48b9ed(0x192)?win32:posix;return _0xad3a1b[_0x48b9ed(0x14b)](_0x32e982=>{const _0xe64829=_0x48b9ed,_0x541574=normalizeWorkspacePath(_0x32e982,_0x2e0dff),_0xdfafcd=_0x2b412e[_0xe64829(0x1a9)](_0x541574,_0x232035);return _0xdfafcd===''||!_0xdfafcd[_0xe64829(0xf8)]('..')&&!_0x2b412e[_0xe64829(0x18c)](_0xdfafcd);});}export async function inspectWorkspace(_0x1bc931,_0x38e06c){const _0x4ea55f=_0x28a6c6,_0x966787=await realpath(_0x1bc931),_0x213f35=await Promise[_0x4ea55f(0x150)](_0x38e06c[_0x4ea55f(0x1dd)](_0x49942f=>realpath(_0x49942f))),_0x54e0c5=await stat(_0x966787);if(!_0x54e0c5[_0x4ea55f(0xc8)]()||!isWithinAllowedRoot(_0x966787,_0x213f35))throw new Error(_0x4ea55f(0x17e));try{const _0x47eaf6=await readGitSummary(_0x966787);return{'path':_0x966787,'kind':_0x4ea55f(0xcf),'gitSummary':_0x47eaf6};}catch(_0x37e041){if(_0x37e041 instanceof GitCommandError&&_0x37e041[_0x4ea55f(0x122)]===0x1*-0x1f05+-0x263*0xa+0x1*0x3763||isGitUnavailable(_0x37e041))return{'path':_0x966787,'kind':_0x4ea55f(0xd7)};throw _0x37e041;}}export async function readGitSummary(_0xe7ab8d){const _0x301967=_0x28a6c6,_0x432679=(await runGit(_0xe7ab8d,[_0x301967(0x178),_0x301967(0x1d9)]))[_0x301967(0x1a7)][_0x301967(0x1b5)](),_0x55b567=(await runGit(_0xe7ab8d,[_0x301967(0x178),_0x301967(0x119),_0x301967(0x173)]))[_0x301967(0x1a7)][_0x301967(0x1b5)](),_0x290867=await runGitAllowFailure(_0xe7ab8d,[_0x301967(0x189),_0x301967(0x1ce),_0x301967(0x1b2),_0x301967(0x173)]),_0x5ed9c6=(await runGit(_0xe7ab8d,[_0x301967(0x114),_0x301967(0x1d4),'-z']))[_0x301967(0x182)][_0x301967(0x197)]>0x6e8*0x1+-0x11*-0x23b+-0x11*0x2a3,_0x5d24bc=await runGit(_0xe7ab8d,[_0x301967(0x114),_0x301967(0x1d4)])[_0x301967(0x110)](_0x2c8d2a=>_0x2c8d2a[_0x301967(0x1a7)]);return{'commonDir':_0x432679,'head':_0x55b567,'branch':_0x290867[_0x301967(0x122)]===-0x11*0x1e2+0x10d*-0x13+-0x1*-0x33f9?_0x290867[_0x301967(0x1a7)][_0x301967(0x1b5)]():null,'dirty':_0x5ed9c6,'snapshot':summarizeText(_0x5d24bc)};}export function assertSafeGitRef(_0x4f8923){const _0x9bd2d5=_0x28a6c6;if(!REF_PATTERN[_0x9bd2d5(0x174)](_0x4f8923))throw new Error(_0x9bd2d5(0x18e));}export async function readRestrictedDiff(_0x283a87,_0x5809f4,_0xd67053){const _0x377af7=_0x28a6c6;assertSafeGitRef(_0x5809f4),assertSafeGitRef(_0xd67053);const _0x443c3e=await runGit(_0x283a87,[_0x377af7(0x199),_0x377af7(0x120),_0x377af7(0x176),_0x5809f4,_0xd67053]),_0x57f056=_0x443c3e[_0x377af7(0x182)][_0x377af7(0x14a)](-0x31+-0xcbd+0x296*0x5)||_0x443c3e[_0x377af7(0x1a7)][_0x377af7(0x14a)](_0x377af7(0x1a6));if(_0x57f056)return{'binary':!![],'summary':_0x377af7(0x14e)+createHash(_0x377af7(0x138))[_0x377af7(0x1cb)](_0x443c3e[_0x377af7(0x182)])[_0x377af7(0x19d)](_0x377af7(0x18b))+_0x377af7(0x188)+_0x443c3e[_0x377af7(0x182)][_0x377af7(0x197)],'truncated':_0x443c3e[_0x377af7(0x104)]};return{'binary':![],'text':_0x443c3e[_0x377af7(0x1a7)],'truncated':_0x443c3e[_0x377af7(0x104)]};}function currentBranchFromStatusHeader(_0x4b3ac1){const _0x2b4b4f=_0x28a6c6,_0x2d5300=_0x4b3ac1[_0x2b4b4f(0x1cc)](-0x85*-0x45+0x25e5+-0x2f3*0x19);if(_0x2d5300[_0x2b4b4f(0xf8)](_0x2b4b4f(0x16f)))return null;const _0x714eb=/^(?:No commits yet on|Initial commit on) (.+)$/[_0x2b4b4f(0x186)](_0x2d5300);if(_0x714eb!==null)return _0x714eb[0x12e4+-0xa66*-0x2+0x1*-0x27af]??null;return _0x2d5300[_0x2b4b4f(0x132)](_0x2b4b4f(0x12f))[-0x13*-0x179+-0x1*-0x42d+0x55c*-0x6]?.[_0x2b4b4f(0x132)]('\x20')[0x21e0+0x73e+-0x1*0x291e]??null;}export async function readCurrentChangesSummary(_0x2d5738){const _0x3c6aff=_0x28a6c6,_0x5cc3b6=await runGit(_0x2d5738,[_0x3c6aff(0x114),_0x3c6aff(0x1d4),'-z',_0x3c6aff(0x162),_0x3c6aff(0x184)]),_0x5e1db5=_0x5cc3b6[_0x3c6aff(0x1a7)][_0x3c6aff(0x132)]('\x00'),_0x13ba22=_0x5e1db5[_0x3c6aff(0x1c7)]()??'',_0x37d94f=[];for(let _0x4784e0=-0x1e08+-0x104e+0x2e56;_0x4784e0<_0x5e1db5[_0x3c6aff(0x197)];_0x4784e0+=0x20c5+0x1f34+-0x2c8*0x17){const _0x1e2ffa=_0x5e1db5[_0x4784e0];if(_0x1e2ffa[_0x3c6aff(0x197)]<0x24ee+0x92*-0x21+0x243*-0x8)continue;const _0x5743a6=_0x1e2ffa[-0x7fe+-0x1da6+-0x36c*-0xb],_0x4bb9a1=_0x1e2ffa[0x1ce+-0x7*-0x15+-0x260],_0x44d915=_0x1e2ffa[_0x3c6aff(0x1cc)](-0x1*0x463+-0x16f2+0x1b58);if(_0x5743a6==='?'&&_0x4bb9a1==='?'){_0x37d94f[_0x3c6aff(0x127)]({'path':_0x44d915,'state':_0x3c6aff(0x1c8),'change':_0x3c6aff(0x19b)});continue;}_0x5743a6!=='\x20'&&_0x37d94f[_0x3c6aff(0x127)]({'path':_0x44d915,'state':_0x3c6aff(0x137),'change':gitChange(_0x5743a6)});_0x4bb9a1!=='\x20'&&_0x37d94f[_0x3c6aff(0x127)]({'path':_0x44d915,'state':_0x3c6aff(0xd9),'change':gitChange(_0x4bb9a1)});if(_0x5743a6==='R'||_0x5743a6==='C'||_0x4bb9a1==='R'||_0x4bb9a1==='C')_0x4784e0+=0x17d8+0x38f+-0x1b66;}return{'branch':_0x13ba22[_0x3c6aff(0xf8)](_0x3c6aff(0xd6))?currentBranchFromStatusHeader(_0x13ba22):null,'changes':_0x37d94f};}export async function listInitializedSubmodulePaths(_0x4765a7){const _0x34446e=_0x28a6c6,_0x51d5cb=await runGit(_0x4765a7,[_0x34446e(0x1d0),_0x34446e(0x114),_0x34446e(0x18f)]);return _0x51d5cb[_0x34446e(0x1a7)][_0x34446e(0x132)](/\r?\n/)[_0x34446e(0x154)](_0x3c9b2b=>{const _0x3b81ec=_0x34446e;if(_0x3c9b2b[_0x3b81ec(0x197)]<-0x22aa+0x6aa*-0x2+0x5c*0x86)return[];const _0x4dff75=_0x3c9b2b[-0x2260+0x1b7*-0x15+0x4663];if(_0x4dff75==='-')return[];const _0x1de1d4=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0x3b81ec(0x186)](_0x3c9b2b),_0x4039ef=_0x1de1d4?.[0xa74+0xd*-0x2d1+-0x1a2a*-0x1]?.[_0x3b81ec(0xfb)]('\x5c','/');return _0x4039ef===undefined||_0x4039ef[_0x3b81ec(0x197)]===0xaa9*-0x3+0xad9*0x2+0xa49?[]:[_0x4039ef];})[_0x34446e(0x16d)]((_0x3f6a17,_0x576569)=>_0x3f6a17[_0x34446e(0x15d)](_0x576569));}export async function resolveGitRepository(_0x2ca7df,_0x39ea93){const _0x21c891=_0x28a6c6;if(_0x39ea93[_0x21c891(0x197)]===0x1*0xd+-0x1*-0x146+0x71*-0x3)return realpath(_0x2ca7df);if(_0x39ea93[_0x21c891(0x14a)]('\x00')||_0x39ea93[_0x21c891(0xf8)]('/')||_0x39ea93[_0x21c891(0xf8)]('\x5c')||_0x39ea93[_0x21c891(0x132)]('/')[_0x21c891(0x14b)](_0x83e413=>_0x83e413[_0x21c891(0x197)]===0x91*0x3b+-0x1*0x1c88+0x1a1*-0x3||_0x83e413==='.'||_0x83e413==='..'))throw new Error(_0x21c891(0x133));const _0x3ead23=await listInitializedSubmodulePaths(_0x2ca7df);if(!_0x3ead23[_0x21c891(0x14a)](_0x39ea93))throw new Error(_0x21c891(0x133));const _0x5947d0=resolve(await realpath(_0x2ca7df),_0x39ea93);try{await readGitSummary(_0x5947d0);}catch{throw new Error(_0x21c891(0x133));}return _0x5947d0;}export async function listGitHistoryRefs(_0x49516b){const _0xab06bf=_0x28a6c6,_0x1bf8fb=await runGit(_0x49516b,[_0xab06bf(0x15b),_0xab06bf(0x190),_0xab06bf(0x115),_0xab06bf(0x105)]);return _0x1bf8fb[_0xab06bf(0x1a7)][_0xab06bf(0x132)](/\r?\n/)[_0xab06bf(0x154)](_0x18ac4a=>{const _0x35d4be=_0xab06bf,[_0x34bad3,_0x207562,_0x47594f,_0x476821,_0xe74d6]=_0x18ac4a[_0x35d4be(0x132)]('\x09');if(_0x34bad3===undefined||_0x207562===undefined||_0x47594f===undefined||_0xe74d6===undefined||_0xe74d6[_0x35d4be(0x197)]>-0x1f8+-0xdf2+0x123*0xe||!/^[0-9a-f]{40,64}$/[_0x35d4be(0x174)](_0x47594f))return[];const _0x142db5=_0x34bad3[_0x35d4be(0xf8)](_0x35d4be(0x15a))?_0x35d4be(0x113):_0x34bad3[_0x35d4be(0xf8)](_0x35d4be(0x15e))?_0x35d4be(0x17c):undefined;return _0x142db5===undefined?[]:[{'name':_0x34bad3,'displayName':_0x207562,'kind':_0x142db5,'hash':_0x47594f,'current':_0x476821==='*'}];})[_0xab06bf(0x16d)]((_0x3f7730,_0xd5d879)=>_0x3f7730[_0xab06bf(0xfd)][_0xab06bf(0x15d)](_0xd5d879[_0xab06bf(0xfd)])||_0x3f7730[_0xab06bf(0xed)][_0xab06bf(0x15d)](_0xd5d879[_0xab06bf(0xed)]));}function selectedHistoryRefs(_0x1e0992,_0x4f8810){const _0x369ab8=_0x28a6c6;if(_0x4f8810===undefined||_0x4f8810[_0x369ab8(0x197)]===-0x14a9+-0x1*-0x12e5+0x1c4*0x1)return _0x1e0992;const _0x3224f8=[...new Set(_0x4f8810)],_0x2e6c8d=_0x3224f8[_0x369ab8(0x1dd)](_0x56268a=>_0x1e0992[_0x369ab8(0x151)](_0x361467=>_0x361467[_0x369ab8(0x1da)]===_0x56268a));if(_0x2e6c8d[_0x369ab8(0x14b)](_0x551d7f=>_0x551d7f===undefined))throw new Error(_0x369ab8(0x11a));return _0x2e6c8d;}function historyCursor(_0x3b698e,_0x224369){const _0x462953=_0x28a6c6;return Buffer[_0x462953(0xf3)](JSON[_0x462953(0x109)]({'offset':_0x3b698e,'fingerprint':_0x224369}))[_0x462953(0xd1)](_0x462953(0x194));}function parseHistoryCursor(_0x16d379,_0x4bcc35){const _0x1649dd=_0x28a6c6;if(_0x16d379===undefined)return 0x1*0x705+0x11be*-0x2+-0x97d*-0x3;try{const _0x4937b0=JSON[_0x1649dd(0x134)](Buffer[_0x1649dd(0xf3)](_0x16d379,_0x1649dd(0x194))[_0x1649dd(0xd1)](_0x1649dd(0x1bf)));if(!Number[_0x1649dd(0x15c)](_0x4937b0[_0x1649dd(0x1ab)])||_0x4937b0[_0x1649dd(0x1ab)]<-0x89e*0x2+-0xa6d+0x1ba9||_0x4937b0[_0x1649dd(0x16a)]!==_0x4bcc35)throw new Error(_0x1649dd(0x1bb));return _0x4937b0[_0x1649dd(0x1ab)];}catch{throw new Error(_0x1649dd(0x155));}}export async function readGitHistory(_0x2dab2e,_0x102fdb){const _0x13ccd7=_0x28a6c6,_0x9e7f65=await listGitHistoryRefs(_0x2dab2e),_0x356c4d=selectedHistoryRefs(_0x9e7f65,_0x102fdb[_0x13ccd7(0xe0)]);if(_0x356c4d[_0x13ccd7(0x197)]===-0x1*0xc46+0x1*-0x1b14+-0x1b6*-0x17)return{'commits':[],'nextCursor':null};const _0x424449=_0x102fdb[_0x13ccd7(0x1b6)]??-0x3*-0x4a9+-0x2*-0xdfd+0x1*-0x29c3;if(!Number[_0x13ccd7(0x15c)](_0x424449)||_0x424449<0x2*0x3b6+0xb*-0x7b+-0x222||_0x424449>0x7*-0x301+-0x1075*0x2+0x3655)throw new Error(_0x13ccd7(0x10d));const _0x4add65=_0x356c4d[_0x13ccd7(0x1dd)](_0x520522=>_0x520522[_0x13ccd7(0x1da)])[_0x13ccd7(0x16d)](),_0x18c387=createHash(_0x13ccd7(0x138))[_0x13ccd7(0x1cb)](_0x356c4d[_0x13ccd7(0x1dd)](_0x544c88=>_0x544c88[_0x13ccd7(0x1da)]+'\x00'+_0x544c88[_0x13ccd7(0x13e)])[_0x13ccd7(0x16d)]()[_0x13ccd7(0x18d)]('\x00'))[_0x13ccd7(0x19d)](_0x13ccd7(0x18b)),_0x58e8f4=parseHistoryCursor(_0x102fdb[_0x13ccd7(0xea)],_0x18c387),_0x324241=await runGit(_0x2dab2e,[_0x13ccd7(0xe4),_0x13ccd7(0x125),_0x13ccd7(0x1b3),_0x13ccd7(0x100)+_0x58e8f4,_0x13ccd7(0x103)+(_0x424449+(0x5*-0x1f9+-0x1832+0x2210)),'-z',_0x13ccd7(0x147),..._0x4add65,'--']),_0x4c5aed=new Map();for(const _0x52bf88 of _0x9e7f65){const _0x3cd2ad=_0x4c5aed[_0x13ccd7(0xfe)](_0x52bf88[_0x13ccd7(0x13e)])??[];_0x3cd2ad[_0x13ccd7(0x127)](_0x52bf88[_0x13ccd7(0xed)]),_0x4c5aed[_0x13ccd7(0x144)](_0x52bf88[_0x13ccd7(0x13e)],_0x3cd2ad);}const _0x4fad04=_0x324241[_0x13ccd7(0x1a7)][_0x13ccd7(0x132)]('\x00'),_0x22d06e=[];for(let _0x1ceeba=-0x1*0x1adf+0x1883+0x25c;_0x1ceeba+(0x18e4+-0xff9+-0x2*0x473)<_0x4fad04[_0x13ccd7(0x197)];_0x1ceeba+=0x2*-0x1032+0xdda+0x1290){const [_0x5ac380,_0x5516f1='',_0xfe590b='',_0x2db1c5='',_0xe3bd4a='0',_0xf8bf32='']=_0x4fad04[_0x13ccd7(0x1cc)](_0x1ceeba,_0x1ceeba+(0x1*0x1da5+0x2*0x62a+-0x29f3));if(_0x5ac380===undefined||!/^[0-9a-f]{40,64}$/[_0x13ccd7(0x174)](_0x5ac380))continue;_0x22d06e[_0x13ccd7(0x127)]({'hash':_0x5ac380,'parents':_0x5516f1[_0x13ccd7(0x197)]===-0x1418+0x2d1+-0x1147*-0x1?[]:_0x5516f1[_0x13ccd7(0x132)]('\x20'),'authorName':_0xfe590b,'authorEmail':_0x2db1c5,'committedAt':Number(_0xe3bd4a)*(0x6c8+-0xe38+0xb58),'subject':_0xf8bf32,'refs':_0x4c5aed[_0x13ccd7(0xfe)](_0x5ac380)??[]});}const _0x1c4f0c=_0x22d06e[_0x13ccd7(0x197)]>_0x424449;return{'commits':_0x22d06e[_0x13ccd7(0x1cc)](0xf5c*0x1+0x3*-0x43b+-0x2ab,_0x424449),'nextCursor':_0x1c4f0c?historyCursor(_0x58e8f4+_0x424449,_0x18c387):null};}async function assertHistoryCommitReachable(_0x1b04df,_0x606f30,_0x34503e){const _0x4be247=_0x28a6c6;if(!/^[0-9a-f]{40,64}$/[_0x4be247(0x174)](_0x606f30))throw new Error(_0x4be247(0x185));const _0x5dbd4d=selectedHistoryRefs(await listGitHistoryRefs(_0x1b04df),_0x34503e);for(const _0x2c793f of _0x5dbd4d){const _0x2fdd91=await runGitAllowFailure(_0x1b04df,[_0x4be247(0x1af),_0x4be247(0x193),_0x606f30,_0x2c793f[_0x4be247(0x1da)]]);if(_0x2fdd91[_0x4be247(0x122)]===0x21*0x67+-0xaaa+-0x29d)return;}throw new Error(_0x4be247(0x185));}export async function readGitHistoryFiles(_0x15c0c2,_0x2d3f06,_0x4cb36e){const _0x4803bd=_0x28a6c6;await assertHistoryCommitReachable(_0x15c0c2,_0x2d3f06,_0x4cb36e);const _0x29f647=await runGit(_0x15c0c2,[_0x4803bd(0x10e),_0x4803bd(0x177),_0x4803bd(0xcc),_0x4803bd(0x1e2),'-r','-z','-M','-C',_0x4803bd(0x19e),_0x2d3f06]),_0xfd91d3=_0x29f647[_0x4803bd(0x1a7)][_0x4803bd(0x132)]('\x00'),_0x591166=[];for(let _0x85df60=0x9*-0x197+-0x21a6+0x1*0x2ff5;_0x85df60<_0xfd91d3[_0x4803bd(0x197)];_0x85df60+=0x16ed+0x19f7+0x5*-0x9c7){const _0x492cfa=_0xfd91d3[_0x85df60];if(_0x492cfa===undefined||_0x492cfa[_0x4803bd(0x197)]===-0x1ec4+-0x13d5+-0x3299*-0x1)continue;const _0x3f78d4=_0x492cfa[0xeb9+0x11d1+0x5*-0x682]??'M';if(_0x3f78d4==='R'||_0x3f78d4==='C'){const _0x4fc34e=_0xfd91d3[_0x85df60+(-0x8db*-0x1+0x21*-0xcb+0x1151)],_0x3bed77=_0xfd91d3[_0x85df60+(-0x1871+-0x35e+0x1bd1)];if(_0x4fc34e!==undefined&&_0x3bed77!==undefined)_0x591166[_0x4803bd(0x127)]({'path':_0x3bed77,'previousPath':_0x4fc34e,'change':gitChange(_0x3f78d4)});_0x85df60+=0x1342+0x1e42+0x18c1*-0x2;}else{const _0x43fe15=_0xfd91d3[_0x85df60+(-0xc11*0x3+-0x19a6+-0x111*-0x3a)];if(_0x43fe15!==undefined)_0x591166[_0x4803bd(0x127)]({'path':_0x43fe15,'change':gitChange(_0x3f78d4)});_0x85df60+=-0x1*-0xb6a+-0x86*0x2f+0xd31;}}return _0x591166;}export async function readGitHistoryFileDiff(_0x5986d7,_0x5aca16,_0x4c4e1a,_0x419bac,_0x5d8eb4){const _0x30dcf0=_0x28a6c6;await assertHistoryCommitReachable(_0x5986d7,_0x5aca16,_0x419bac);const _0x1558e6=safeGitWorkspacePath(_0x4c4e1a),_0x4c5856=_0x5d8eb4===undefined?undefined:safeGitWorkspacePath(_0x5d8eb4),_0x5ba08b=await runGit(_0x5986d7,[_0x30dcf0(0xfc),_0x30dcf0(0x148),_0x30dcf0(0xcc),_0x30dcf0(0x120),_0x30dcf0(0x176),_0x5aca16,'--',_0x30dcf0(0x156)+_0x1558e6,..._0x4c5856===undefined||_0x4c5856===_0x1558e6?[]:[_0x30dcf0(0x156)+_0x4c5856]]),_0x452037=_0x5ba08b[_0x30dcf0(0x182)][_0x30dcf0(0x14a)](-0x23e7+0x2127+0x2c0)||_0x5ba08b[_0x30dcf0(0x1a7)][_0x30dcf0(0x14a)](_0x30dcf0(0x1a6));if(_0x452037)return{'binary':!![],'summary':_0x30dcf0(0x14e)+createHash(_0x30dcf0(0x138))[_0x30dcf0(0x1cb)](_0x5ba08b[_0x30dcf0(0x182)])[_0x30dcf0(0x19d)](_0x30dcf0(0x18b))+_0x30dcf0(0x188)+_0x5ba08b[_0x30dcf0(0x182)][_0x30dcf0(0x197)],'truncated':_0x5ba08b[_0x30dcf0(0x104)]};return{'binary':![],'text':_0x5ba08b[_0x30dcf0(0x1a7)],'truncated':_0x5ba08b[_0x30dcf0(0x104)]};}export async function readGitHistoryFileContentRange(_0x1610bf,_0x48bc80,_0x32e248,_0x28e7d5,_0x3f13b6,_0x28eed7){const _0x25964b=_0x28a6c6;if(!Number[_0x25964b(0xf4)](_0x28e7d5)||_0x28e7d5<-0x4*-0x378+0x1*0xf35+-0x5d1*0x5||!Number[_0x25964b(0xf4)](_0x3f13b6)||_0x3f13b6<-0x1136+-0xb*-0xc9+-0x7a*-0x12||_0x3f13b6>(-0x3*0x716+-0x19*-0x1e+0x1268)*(0x2*0x6d+0x1734+-0x140e)*(-0x355*-0x4+-0x793+0x1*-0x1c1)||_0x28e7d5+_0x3f13b6>(0x12df*0x1+0xe5*-0x28+-0x1*-0x10fd)*(0x1e*-0x6d+0x16e*0x9+0x3e8)*(-0x2441+-0xbc7+0x3408))throw new Error(_0x25964b(0xe3));await assertHistoryCommitReachable(_0x1610bf,_0x48bc80,_0x28eed7);const _0xf0e630=safeGitWorkspacePath(_0x32e248),_0x33f574=_0x48bc80+':'+_0xf0e630,_0x5d0fbd=await runGit(_0x1610bf,[_0x25964b(0x195),'-s',_0x33f574]),_0x214407=Number(_0x5d0fbd[_0x25964b(0x1a7)][_0x25964b(0x1b5)]());if(!Number[_0x25964b(0xf4)](_0x214407)||_0x214407<-0xd*0x5b+-0xd31+0x98*0x1e||_0x28e7d5>_0x214407)throw new Error(_0x25964b(0xe3));if(_0x28e7d5===_0x214407)return{'path':_0xf0e630,'size':_0x214407,'offset':_0x28e7d5,'contentBase64':'','nextOffset':null};const _0x2070e8=await runGitAllowFailure(_0x1610bf,[_0x25964b(0x195),_0x25964b(0xe7),_0x33f574],_0x28e7d5+_0x3f13b6);if(_0x2070e8[_0x25964b(0x122)]!==0x21da+-0x13*-0xdd+-0x19f*0x1f)throw new GitCommandError(_0x2070e8[_0x25964b(0x122)],_0x2070e8[_0x25964b(0x13c)]);const _0x255f80=_0x2070e8[_0x25964b(0x182)][_0x25964b(0x130)](_0x28e7d5,Math[_0x25964b(0x118)](_0x214407,_0x28e7d5+_0x3f13b6)),_0xf36f3d=_0x28e7d5+_0x255f80[_0x25964b(0x197)];return{'path':_0xf0e630,'size':_0x214407,'offset':_0x28e7d5,'contentBase64':_0x255f80[_0x25964b(0xd1)](_0x25964b(0x1d7)),'nextOffset':_0xf36f3d<_0x214407?_0xf36f3d:null};}export async function readCurrentChanges(_0x451903){const _0xb191e1=_0x28a6c6;return(await readCurrentChangesSummary(_0x451903))[_0xb191e1(0xe9)];}function _0x1cca(_0x46792f,_0x56ddd0){_0x46792f=_0x46792f-(0x233+-0x1547+0x8*0x27b);const _0x42bc20=_0x27de();let _0x2fd464=_0x42bc20[_0x46792f];if(_0x1cca['zYktmo']===undefined){var _0x293eb9=function(_0x255c3d){const _0x31038a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2db605='',_0x3713ba='';for(let _0x283800=0x1c2a+0x2e*-0x7a+-0x63e,_0x1d871e,_0x44f363,_0x3ce28a=0x1546+0x158e+-0x2ad4;_0x44f363=_0x255c3d['charAt'](_0x3ce28a++);~_0x44f363&&(_0x1d871e=_0x283800%(-0x4a4+0x1*0x117a+-0xcd2)?_0x1d871e*(-0xcdc+0x1781+-0xa65)+_0x44f363:_0x44f363,_0x283800++%(0x23c2+-0x1*-0x10cf+0x348d*-0x1))?_0x2db605+=String['fromCharCode'](0x2*-0xbb9+-0xe71*0x2+-0x11*-0x323&_0x1d871e>>(-(-0x198b+0x1235+-0x1*-0x758)*_0x283800&-0x21ba+0xd*-0x1d7+0x13*0x309)):0x1*-0x7c9+-0x767*-0x1+0x62*0x1){_0x44f363=_0x31038a['indexOf'](_0x44f363);}for(let _0x87e0cc=-0x1*-0x260+0x1*-0x184f+0x15ef,_0x5daf51=_0x2db605['length'];_0x87e0cc<_0x5daf51;_0x87e0cc++){_0x3713ba+='%'+('00'+_0x2db605['charCodeAt'](_0x87e0cc)['toString'](-0x2675+0x6cf*-0x1+-0xc*-0x3c7))['slice'](-(0x6f3*0x1+0x129d+-0x198e*0x1));}return decodeURIComponent(_0x3713ba);};_0x1cca['UEctOb']=_0x293eb9,_0x1cca['pdFkGP']={},_0x1cca['zYktmo']=!![];}const _0x1503e4=_0x42bc20[-0x349*-0x3+-0xace+-0xf3*-0x1];_0x1cca['nAMHRQ']!==_0x1503e4&&(_0x1cca['pdFkGP']={},_0x1cca['nAMHRQ']=_0x1503e4);const _0x4c3855=_0x1cca['pdFkGP'][_0x46792f];return _0x4c3855===undefined?(_0x2fd464=_0x1cca['UEctOb'](_0x2fd464),_0x1cca['pdFkGP'][_0x46792f]=_0x2fd464):_0x2fd464=_0x4c3855,_0x2fd464;}export async function readCurrentChangeDiff(_0x160b17,_0x485789){const _0x41b6a1=_0x28a6c6,_0x4fc81f=safeGitWorkspacePath(_0x485789);await assertCurrentChangePathAccessible(_0x160b17,_0x4fc81f);const _0x438c8d=await readCurrentChangeGitDiff(_0x160b17,_0x4fc81f),_0x1127fc=await readWorkingTreeText(_0x160b17,_0x4fc81f),_0x5eee04=_0x438c8d[_0x41b6a1(0x182)][_0x41b6a1(0x14a)](-0x1e80+-0x169*0xd+-0x1cf*-0x1b)||_0x438c8d[_0x41b6a1(0x1a7)][_0x41b6a1(0x14a)](_0x41b6a1(0x1a6))||_0x1127fc?.[_0x41b6a1(0x19c)]===!![];if(_0x5eee04)return{'binary':!![],'summary':_0x41b6a1(0x14e)+createHash(_0x41b6a1(0x138))[_0x41b6a1(0x1cb)](_0x438c8d[_0x41b6a1(0x182)])[_0x41b6a1(0x19d)](_0x41b6a1(0x18b))+_0x41b6a1(0x188)+_0x438c8d[_0x41b6a1(0x182)][_0x41b6a1(0x197)],'truncated':_0x438c8d[_0x41b6a1(0x104)]||_0x1127fc?.[_0x41b6a1(0x104)]===!![]};return{'binary':![],'text':_0x438c8d[_0x41b6a1(0x1a7)],'truncated':_0x438c8d[_0x41b6a1(0x104)]||_0x1127fc?.[_0x41b6a1(0x104)]===!![],'afterText':_0x1127fc?.[_0x41b6a1(0x1a7)]??'',..._0x1127fc===undefined?{}:{'afterTruncated':_0x1127fc[_0x41b6a1(0x104)]}};}async function readCurrentChangeGitDiff(_0x59abb7,_0x23afab){const _0x3b940d=_0x28a6c6,_0x216e0e=await runGit(_0x59abb7,[_0x3b940d(0x124),_0x3b940d(0x1a2),_0x3b940d(0x14c),'-z','--',_0x3b940d(0x156)+_0x23afab]);if(_0x216e0e[_0x3b940d(0x1a7)][_0x3b940d(0x132)]('\x00')[_0x3b940d(0x14a)](_0x23afab)){const _0x11e3cc=await runGitAllowFailure(_0x59abb7,[_0x3b940d(0x199),_0x3b940d(0xf0),_0x3b940d(0x120),_0x3b940d(0x176),'--',_0x3b940d(0x136),_0x23afab]);if(_0x11e3cc[_0x3b940d(0x122)]!==0x994+-0x95*-0x8+-0xe3c&&_0x11e3cc[_0x3b940d(0x122)]!==-0x1*-0xef6+0x1d9f+-0x2c94)throw new GitCommandError(_0x11e3cc[_0x3b940d(0x122)],_0x11e3cc[_0x3b940d(0x13c)]);return _0x11e3cc;}return runGit(_0x59abb7,[_0x3b940d(0x199),_0x3b940d(0x120),_0x3b940d(0x176),_0x3b940d(0x173),'--',_0x3b940d(0x156)+_0x23afab]);}export async function isWorkspaceChangeVisible(_0x5418cb,_0x1ab002){const _0x4b6c01=_0x28a6c6;try{return await assertCurrentChangePathAccessible(_0x5418cb,safeGitWorkspacePath(_0x1ab002)),!![];}catch(_0x4ffac8){if(_0x4ffac8 instanceof Error&&(_0x4ffac8[_0x4b6c01(0x153)]===_0x4b6c01(0xfa)||_0x4ffac8[_0x4b6c01(0x153)]===_0x4b6c01(0x10c)||_0x4ffac8[_0x4b6c01(0x153)]===_0x4b6c01(0xf2)))return![];throw _0x4ffac8;}}async function assertCurrentChangePathAccessible(_0x442c81,_0x5ef99c){const _0x302f4f=_0x28a6c6,_0x2b9c5c=await realpath(_0x442c81),_0x505fb8=resolve(_0x2b9c5c,_0x5ef99c),_0xf1fee1=await lstat(_0x505fb8)[_0x302f4f(0x18a)](_0x553409=>{const _0x59fe89=_0x302f4f;if(_0x553409[_0x59fe89(0x122)]===_0x59fe89(0x19f))return undefined;throw _0x553409;});if(_0xf1fee1===undefined)return;await resolveWorkspaceEntry(_0x2b9c5c,_0x5ef99c,![]);}async function readWorkingTreeText(_0x41c3c9,_0x183a44){const _0x5412d7=_0x28a6c6,_0x591197=await realpath(_0x41c3c9);let _0x559317;try{_0x559317=await resolveWorkspaceEntry(_0x591197,_0x183a44,![]);}catch(_0x5cb0e8){if(_0x5cb0e8 instanceof Error&&_0x5cb0e8[_0x5412d7(0x153)]===_0x5412d7(0x10c))return undefined;throw _0x5cb0e8;}const _0xe86cc4=await lstat(_0x559317);if(!_0xe86cc4[_0x5412d7(0xdb)]())return undefined;const _0x9a6907=await readFile(_0x559317);return diffTextFromBuffer(_0x9a6907,_0x9a6907[_0x5412d7(0x197)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x4fbb7e,_0x508e12){const _0x6d2f1b=_0x28a6c6;if(_0x4fbb7e[_0x6d2f1b(0x14a)](0xc88+-0x486+-0x1*0x802)||!isValidUtf8(_0x4fbb7e))return{'binary':!![],'truncated':_0x508e12};let _0x5d8378=Math[_0x6d2f1b(0x118)](_0x4fbb7e[_0x6d2f1b(0x197)],GIT_OUTPUT_LIMIT);while(_0x5d8378>-0x109*0xe+-0xe60+-0x1*-0x1cde&&_0x5d8378<_0x4fbb7e[_0x6d2f1b(0x197)]&&isUtf8ContinuationByte(_0x4fbb7e[_0x5d8378]))_0x5d8378-=0xbad+-0x24a9+0x1*0x18fd;return{'binary':![],'text':_0x4fbb7e[_0x6d2f1b(0x130)](-0x2*0x1337+0x18f9+0x35*0x41,_0x5d8378)[_0x6d2f1b(0xd1)](_0x6d2f1b(0x1bf)),'truncated':_0x508e12};}export async function restoreCurrentChange(_0x3ec004,_0x27dbb9,_0x8b7d15){const _0x2e0462=_0x28a6c6,_0x553732=safeGitWorkspacePath(_0x27dbb9),_0x356450=_0x2e0462(0x156)+_0x553732;if(_0x8b7d15===_0x2e0462(0x1c8)){const _0x2e9fa6=await runGit(_0x3ec004,[_0x2e0462(0x114),_0x2e0462(0x1d4),'-z',_0x2e0462(0x184),'--',_0x356450]);if(!_0x2e9fa6[_0x2e0462(0x1a7)][_0x2e0462(0x132)]('\x00')[_0x2e0462(0x14b)](_0x2a7353=>_0x2a7353[_0x2e0462(0xf8)](_0x2e0462(0x165))&&_0x2a7353[_0x2e0462(0x1cc)](0x1*-0x1c8f+-0x16d9+0x1*0x336b)===_0x553732))throw new Error(_0x2e0462(0x1bc));const _0x1f7aa3=await realpath(_0x3ec004),_0x31acc4=resolve(_0x1f7aa3,_0x553732),_0x5dc229=await lstat(_0x31acc4);if(!_0x5dc229[_0x2e0462(0xdb)]()||_0x5dc229[_0x2e0462(0x152)]())throw new Error(_0x2e0462(0x1bc));await unlink(_0x31acc4);return;}if(_0x8b7d15===_0x2e0462(0xd9)){await runGit(_0x3ec004,[_0x2e0462(0xce),_0x2e0462(0x159),'--',_0x356450]);return;}await runGit(_0x3ec004,[_0x2e0462(0xce),_0x2e0462(0x168),_0x2e0462(0x1c4),_0x2e0462(0x159),'--',_0x356450]);}function safeGitWorkspacePath(_0x585b88){const _0x5a5842=_0x28a6c6;if(_0x585b88[_0x5a5842(0x197)]===0x2185+-0x83*-0x45+0x371*-0x14||_0x585b88[_0x5a5842(0x14a)]('\x00')||_0x585b88[_0x5a5842(0xf8)]('/')||_0x585b88[_0x5a5842(0xf8)]('\x5c'))throw new Error(_0x5a5842(0xfa));const _0x3a0ea5=_0x585b88[_0x5a5842(0xfb)]('\x5c','/');if(_0x3a0ea5[_0x5a5842(0x132)]('/')[_0x5a5842(0x14b)](_0x4b28a4=>_0x4b28a4===''||_0x4b28a4==='..'||_0x4b28a4===_0x5a5842(0x135)))throw new Error(_0x5a5842(0xfa));return _0x3a0ea5;}function gitChange(_0x18af5f){const _0x4d1fbd=_0x28a6c6;if(_0x18af5f==='A')return _0x4d1fbd(0x19b);if(_0x18af5f==='D')return _0x4d1fbd(0x1b0);if(_0x18af5f==='R')return _0x4d1fbd(0xd0);if(_0x18af5f==='C')return _0x4d1fbd(0x11c);if(_0x18af5f==='T')return _0x4d1fbd(0xf7);return _0x4d1fbd(0x1c3);}export class GitCommandError extends Error{[_0x28a6c6(0x122)];[_0x28a6c6(0x13c)];constructor(_0x14c3aa,_0x431db8){const _0x81fe66=_0x28a6c6;super(_0x81fe66(0x1a1)),this[_0x81fe66(0x122)]=_0x14c3aa,this[_0x81fe66(0x13c)]=_0x431db8;}}async function runGit(_0x313784,_0x57885f){const _0x3de9cd=_0x28a6c6,_0x4d1ae5=await runGitAllowFailure(_0x313784,_0x57885f);if(_0x4d1ae5[_0x3de9cd(0x122)]!==0x43*-0x73+-0xcef+0x2b08)throw new GitCommandError(_0x4d1ae5[_0x3de9cd(0x122)],_0x4d1ae5[_0x3de9cd(0x13c)]);return _0x4d1ae5;}async function runGitAllowFailure(_0x237787,_0x362508,_0x45d6af=GIT_OUTPUT_LIMIT){return new Promise((_0x583a93,_0x5bbf57)=>{const _0x23b739=_0x1cca,_0x29705b=spawn(_0x23b739(0x1ba),[..._0x362508],{'cwd':_0x237787,'shell':![],'windowsHide':!![],'stdio':[_0x23b739(0x1a3),_0x23b739(0x15f),_0x23b739(0x15f)]}),_0x4918c1=[],_0x19c1f0=[];let _0x1c9ab4=0x4*-0xe8+0x9d*0x15+0x941*-0x1,_0x369efc=![];const _0x18559a=setTimeout(()=>_0x29705b[_0x23b739(0xf6)](_0x23b739(0x1aa)),GIT_TIMEOUT_MS);_0x29705b[_0x23b739(0x131)]['on'](_0x23b739(0x1c6),_0x5c99f5=>{const _0x240c4f=_0x23b739,_0xca488f=Math[_0x240c4f(0xff)](0x1c93+-0x1702+0x5*-0x11d,_0x45d6af-_0x1c9ab4);if(_0xca488f>-0x2f*0x79+-0x1*-0x25ab+0x7ba*-0x2){const _0x4b1f23=_0x5c99f5[_0x240c4f(0x130)](0x1*0x1e61+-0x1df7*-0x1+-0x4*0xf16,_0xca488f);_0x4918c1[_0x240c4f(0x127)](_0x4b1f23),_0x1c9ab4+=_0x4b1f23[_0x240c4f(0x197)];}_0x369efc||=_0x5c99f5[_0x240c4f(0x197)]>_0xca488f;}),_0x29705b[_0x23b739(0x13c)]['on'](_0x23b739(0x1c6),_0x5a4af5=>_0x19c1f0[_0x23b739(0x127)](_0x5a4af5[_0x23b739(0x130)](0x15f0+0x2450+-0x2*0x1d20,0x1da+-0x1489+-0xd*-0x2ab))),_0x29705b[_0x23b739(0xef)](_0x23b739(0x157),_0x1c2d33=>{clearTimeout(_0x18559a),_0x5bbf57(_0x1c2d33);}),_0x29705b[_0x23b739(0xef)](_0x23b739(0x1bd),_0x896854=>{const _0xa6ce6b=_0x23b739;clearTimeout(_0x18559a);const _0x34551f=Buffer[_0xa6ce6b(0xec)](_0x4918c1);_0x583a93({'code':_0x896854??0x2422+0x44+-0x4d*0x79,'output':_0x34551f,'text':_0x34551f[_0xa6ce6b(0xd1)](_0xa6ce6b(0x1bf)),'stderr':Buffer[_0xa6ce6b(0xec)](_0x19c1f0)[_0xa6ce6b(0xd1)](_0xa6ce6b(0x1bf)),'truncated':_0x369efc});});});}function isGitUnavailable(_0x57c722){const _0x48152b=_0x28a6c6;return _0x57c722 instanceof Error&&_0x48152b(0x122)in _0x57c722&&_0x57c722[_0x48152b(0x122)]===_0x48152b(0x19f);}function summarizeText(_0x3edcaa){const _0x4932f8=_0x28a6c6;return JSON[_0x4932f8(0x109)]({'sha256':createHash(_0x4932f8(0x138))[_0x4932f8(0x1cb)](_0x3edcaa)[_0x4932f8(0x19d)](_0x4932f8(0x18b)),'bytes':Buffer[_0x4932f8(0x121)](_0x3edcaa)});}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.12",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node-pty": "1.1.0",
|
|
25
25
|
"ws": "^8.21.3",
|
|
26
26
|
"zod": "4.4.3",
|
|
27
|
-
"@myagentroam/protocol": "^0.9.
|
|
27
|
+
"@myagentroam/protocol": "^0.9.12"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/ws": "^8.18.1"
|