/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var Q=["require","exports","vs/base/common/lifecycle","vs/base/common/async","vs/base/common/event","vs/base/common/types","vs/nls","vs/nls!vs/code/node/cliProcessMain","vs/platform/instantiation/common/instantiation","vs/platform/log/common/log","vs/base/common/uri","vs/base/common/errors","vs/base/common/platform","vs/platform/files/common/files","vs/base/common/path","vs/base/common/buffer","vs/base/common/network","vs/platform/environment/common/environment","vs/base/common/resources","vs/base/common/arrays","vs/base/node/pfs","vs/platform/configuration/common/configuration","vs/platform/extensionManagement/common/extensionManagement","vs/platform/extensionManagement/common/extensionManagementUtil","vs/base/common/cancellation","vs/platform/userDataProfile/common/userDataProfile","vs/base/common/objects","vs/base/common/strings","vs/platform/product/common/productService","vs/platform/uriIdentity/common/uriIdentity","vs/base/common/uuid","vs/base/common/errorMessage","vs/base/common/process","vs/platform/registry/common/platform","vs/platform/extensions/common/extensions","vs/platform/telemetry/common/telemetry","vs/platform/policy/common/policy","os","vs/base/common/semver/semver","vs/base/common/map","vs/platform/configuration/common/configurationRegistry","vs/platform/extensionManagement/common/extensionsProfileScannerService","vs/platform/telemetry/common/telemetryUtils","vs/base/common/stream","vs/base/common/marshalling","vs/platform/extensions/common/extensionValidator","vs/platform/instantiation/common/descriptors","vs/platform/request/common/request","vs/platform/extensionManagement/common/extensionsScannerService","vs/base/common/decorators","vs/base/common/json","vs/base/common/processes","vs/base/common/observableValue","vs/base/common/hash","vs/base/common/severity","vs/base/node/processes","vs/base/parts/ipc/common/ipc","child_process","vs/platform/download/common/download","vs/platform/extensionManagement/node/extensionSignatureVerificationService","vs/platform/files/common/io","vs/platform/files/common/watcher","vs/platform/instantiation/common/serviceCollection","vs/platform/languagePacks/common/languagePacks","vs/base/common/iterator","vs/platform/configuration/common/configurationModels","vs/platform/state/node/state","vs/platform/telemetry/common/commonProperties","vs/base/node/zip","vs/base/common/assert","vs/base/common/skipList","vs/nls!vs/base/common/date","vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/base/common/jsonErrorMessages","vs/base/common/jsonErrorMessages","vs/base/common/console","vs/base/node/powershell","vs/base/node/shell","vs/base/parts/ipc/node/ipc.cp","vs/base/parts/storage/common/storage","vs/nls!vs/base/node/zip","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/extensionManagement/common/abstractExtensionManagementService","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionManagementCLI","vs/nls!vs/platform/extensionManagement/common/extensionNls","vs/nls!vs/platform/extensionManagement/common/extensionsScannerService","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/nls!vs/platform/extensionManagement/node/extensionManagementUtil","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/files/common/fileService","vs/nls!vs/platform/files/common/io","vs/nls!vs/platform/files/node/diskFileSystemProvider","vs/nls!vs/platform/languagePacks/common/languagePacks","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/shell/node/shellEnv","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/userDataProfile/common/userDataProfile","vs/nls!vs/platform/workspace/common/workspace","vs/platform/environment/common/environmentService","vs/platform/environment/node/userDataPath","vs/platform/environment/node/environmentService","vs/platform/extensionManagement/common/extensionNls","vs/platform/externalServices/common/serviceMachineId","vs/platform/instantiation/common/extensions","vs/platform/instantiation/common/graph","vs/platform/files/node/watcher/nodejs/nodejsWatcher","vs/platform/files/node/watcher/nodejs/nodejsClient","vs/platform/files/node/watcher/watcherClient","vs/platform/instantiation/common/instantiationService","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/base/common/ternarySearchTree","vs/base/common/performance","vs/platform/files/node/diskFileSystemProvider","fs","vs/platform/log/node/spdlogLog","vs/platform/policy/common/filePolicyService","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/configuration/common/configurations","vs/platform/configuration/common/configurationService","vs/platform/remote/common/remoteHosts","vs/platform/extensionManagement/common/extensionManagementCLI","vs/platform/extensionManagement/node/extensionDownloader","vs/platform/extensionManagement/node/extensionsManifestCache","vs/platform/languagePacks/node/languagePacks","vs/platform/download/common/downloadService","vs/platform/request/node/proxy","url","vs/platform/shell/node/shellEnv","vs/platform/state/node/stateService","vs/platform/externalServices/common/marketplace","vs/platform/telemetry/common/1dsAppender","vs/platform/telemetry/common/telemetryService","vs/platform/product/common/product","vs/platform/telemetry/node/1dsAppender","vs/platform/telemetry/node/telemetry","vs/platform/extensionManagement/node/extensionsWatcher","vs/platform/uriIdentity/common/uriIdentityService","vs/platform/workspace/common/workspace","vs/platform/extensionManagement/common/abstractExtensionManagementService","vs/platform/extensionManagement/node/extensionLifecycle","vs/platform/extensionManagement/node/extensionsScannerService","vs/platform/storage/common/storage","vs/platform/extensionManagement/common/extensionGalleryService","vs/platform/userDataProfile/node/userDataProfile","vs/platform/policy/node/nativePolicyService","vs/platform/extensionManagement/node/extensionManagementUtil","vs/platform/extensionManagement/node/extensionManagementService","vs/platform/request/node/requestService","path","vs/base/common/glob","vs/platform/files/node/watcher/nodejs/nodejsWatcherLib","vs/base/common/linkedList","graceful-fs","vs/base/common/extpath","crypto","vs/platform/environment/node/argvHelper","https","vscode-policy-watcher","yauzl","yazl","zlib","vs/code/node/cliProcessMain"],Z=function(_){for(var e=[],C=0,R=_.length;C{let w=null,b=null;if(typeof h.value=="function"?(w="value",b=h.value):typeof h.get=="function"&&(w="get",b=h.get),!b)throw new Error("not supported");h[w]=O(b,d)}}e.createDecorator=C;function R(O,v,d){let h=null,w=null;if(typeof d.value=="function"?(h="value",w=d.value,w.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof d.get=="function"&&(h="get",w=d.get),!w)throw new Error("not supported");const b=`$memoize$${v}`;d[h]=function(...g){return this.hasOwnProperty(b)||Object.defineProperty(this,b,{configurable:!1,enumerable:!1,writable:!1,value:w.apply(this,g)}),this[b]}}e.memoize=R;function I(O,v,d){return C((h,w)=>{const b=`$debounce$${w}`,g=`$debounce$result$${w}`;return function(...S){this[g]||(this[g]=d?d():void 0),clearTimeout(this[b]),v&&(this[g]=v(this[g],...S),S=[this[g]]),this[b]=setTimeout(()=>{h.apply(this,S),this[g]=d?d():void 0},O)}})}e.debounce=I;function k(O,v,d){return C((h,w)=>{const b=`$throttle$timer$${w}`,g=`$throttle$result$${w}`,S=`$throttle$lastRun$${w}`,p=`$throttle$pending$${w}`;return function(...P){if(this[g]||(this[g]=d?d():void 0),(this[S]===null||this[S]===void 0)&&(this[S]=-Number.MAX_VALUE),v&&(this[g]=v(this[g],...P)),this[p])return;const y=this[S]+O;y<=Date.now()?(this[S]=Date.now(),h.apply(this,[this[g]]),this[g]=d?d():void 0):(this[p]=!0,this[b]=setTimeout(()=>{this[p]=!1,this[S]=Date.now(),h.apply(this,[this[g]]),this[g]=d?d():void 0},y-Date.now()))}})}e.throttle=k}),define(Q[69],Z([0,1,11]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function R(d,h){if(!d)throw new Error(h?`Assertion failed (${h})`:"Assertion Failed")}e.ok=R;function I(d,h="Unreachable"){throw new Error(h)}e.assertNever=I;function k(d){if(!d)throw new C.BugIndicatingError("Assertion Failed")}e.assert=k;function O(d){if(!d()){debugger;d(),(0,C.onUnexpectedError)(new C.BugIndicatingError("Assertion Failed"))}}e.assertFn=O;function v(d,h){let w=0;for(;w=48&&te<=57)ce=ce*16+te-48;else if(te>=65&&te<=70)ce=ce*16+te-65+10;else if(te>=97&&te<=102)ce=ce*16+te-97+10;else break;i++,ge++}return ge=r){re+=t.substring(ge,i),f=2;break}const ce=t.charCodeAt(i);if(ce===34){re+=t.substring(ge,i),i++;break}if(ce===92){if(re+=t.substring(ge,i),i++,i>=r){f=2;break}switch(t.charCodeAt(i++)){case 34:re+='"';break;case 92:re+="\\";break;case 47:re+="/";break;case 98:re+="\b";break;case 102:re+="\f";break;case 110:re+=` `;break;case 114:re+="\r";break;case 116:re+=" ";break;case 117:{const j=D(4);j>=0?re+=String.fromCharCode(j):f=4;break}default:f=5}ge=i;continue}if(ce>=0&&ce<=31)if(d(ce)){re+=t.substring(ge,i),f=2;break}else f=6;i++}return re}function J(){if(o="",f=0,c=i,i>=r)return c=r,a=17;let re=t.charCodeAt(i);if(v(re)){do i++,o+=String.fromCharCode(re),re=t.charCodeAt(i);while(v(re));return a=15}if(d(re))return i++,o+=String.fromCharCode(re),re===13&&t.charCodeAt(i)===10&&(i++,o+=` `),a=14;switch(re){case 123:return i++,a=1;case 125:return i++,a=2;case 91:return i++,a=3;case 93:return i++,a=4;case 58:return i++,a=6;case 44:return i++,a=5;case 34:return i++,o=X(),a=10;case 47:{const ge=i-1;if(t.charCodeAt(i+1)===47){for(i+=2;i=12&&re<=15);return re}return{setPosition:N,getPosition:()=>i,scan:n?ne:J,getToken:()=>a,getTokenValue:()=>o,getTokenOffset:()=>c,getTokenLength:()=>i-c,getTokenError:()=>f}}e.createScanner=O;function v(t){return t===32||t===9||t===11||t===12||t===160||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function d(t){return t===10||t===13||t===8232||t===8233}function h(t){return t>=48&&t<=57}var w;(function(t){t[t.nullCharacter=0]="nullCharacter",t[t.maxAsciiCharacter=127]="maxAsciiCharacter",t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.lineSeparator=8232]="lineSeparator",t[t.paragraphSeparator=8233]="paragraphSeparator",t[t.nextLine=133]="nextLine",t[t.space=32]="space",t[t.nonBreakingSpace=160]="nonBreakingSpace",t[t.enQuad=8192]="enQuad",t[t.emQuad=8193]="emQuad",t[t.enSpace=8194]="enSpace",t[t.emSpace=8195]="emSpace",t[t.threePerEmSpace=8196]="threePerEmSpace",t[t.fourPerEmSpace=8197]="fourPerEmSpace",t[t.sixPerEmSpace=8198]="sixPerEmSpace",t[t.figureSpace=8199]="figureSpace",t[t.punctuationSpace=8200]="punctuationSpace",t[t.thinSpace=8201]="thinSpace",t[t.hairSpace=8202]="hairSpace",t[t.zeroWidthSpace=8203]="zeroWidthSpace",t[t.narrowNoBreakSpace=8239]="narrowNoBreakSpace",t[t.ideographicSpace=12288]="ideographicSpace",t[t.mathematicalSpace=8287]="mathematicalSpace",t[t.ogham=5760]="ogham",t[t._=95]="_",t[t.$=36]="$",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.ampersand=38]="ampersand",t[t.asterisk=42]="asterisk",t[t.at=64]="at",t[t.backslash=92]="backslash",t[t.bar=124]="bar",t[t.caret=94]="caret",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.closeParen=41]="closeParen",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.equals=61]="equals",t[t.exclamation=33]="exclamation",t[t.greaterThan=62]="greaterThan",t[t.lessThan=60]="lessThan",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.openParen=40]="openParen",t[t.percent=37]="percent",t[t.plus=43]="plus",t[t.question=63]="question",t[t.semicolon=59]="semicolon",t[t.singleQuote=39]="singleQuote",t[t.slash=47]="slash",t[t.tilde=126]="tilde",t[t.backspace=8]="backspace",t[t.formFeed=12]="formFeed",t[t.byteOrderMark=65279]="byteOrderMark",t[t.tab=9]="tab",t[t.verticalTab=11]="verticalTab"})(w||(w={}));function b(t,n){const i=[],r=new Object;let o;const c={value:{},offset:0,length:0,type:"object",parent:void 0};let a=!1;function f(D,N,B,X){c.value=D,c.offset=N,c.length=B,c.type=X,c.colonOffset=void 0,o=c}try{E(t,{onObjectBegin:(D,N)=>{if(n<=D)throw r;o=void 0,a=n>D,i.push("")},onObjectProperty:(D,N,B)=>{if(n{if(n<=D)throw r;o=void 0,i.pop()},onArrayBegin:(D,N)=>{if(n<=D)throw r;o=void 0,i.push(0)},onArrayEnd:(D,N)=>{if(n<=D)throw r;o=void 0,i.pop()},onLiteralValue:(D,N,B)=>{if(n{if(n<=N)throw r;if(D===":"&&o&&o.type==="property")o.colonOffset=N,a=!1,o=void 0;else if(D===","){const X=i[i.length-1];typeof X=="number"?i[i.length-1]=X+1:(a=!0,i[i.length-1]=""),o=void 0}}})}catch(D){if(D!==r)throw D}return{path:i,previousNode:o,isAtPropertyKey:a,matches:D=>{let N=0;for(let B=0;N{const D={};a(D),c.push(o),o=D,r=null},onObjectProperty:D=>{r=D},onObjectEnd:()=>{o=c.pop()},onArrayBegin:()=>{const D=[];a(D),c.push(o),o=D,r=null},onArrayEnd:()=>{o=c.pop()},onLiteralValue:a,onError:(D,N,B)=>{n.push({error:D,offset:N,length:B})}},i),o[0]}e.parse=g;function S(t,n=[],i=k.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(D){r.type==="property"&&(r.length=D-r.offset,r=r.parent)}function c(D){return r.children.push(D),D}E(t,{onObjectBegin:D=>{r=c({type:"object",offset:D,length:-1,parent:r,children:[]})},onObjectProperty:(D,N,B)=>{r=c({type:"property",offset:N,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:D,offset:N,length:B,parent:r})},onObjectEnd:(D,N)=>{r.length=D+N-r.offset,r=r.parent,o(D+N)},onArrayBegin:(D,N)=>{r=c({type:"array",offset:D,length:-1,parent:r,children:[]})},onArrayEnd:(D,N)=>{r.length=D+N-r.offset,r=r.parent,o(D+N)},onLiteralValue:(D,N,B)=>{c({type:s(D),offset:N,length:B,parent:r,value:D}),o(N+B)},onSeparator:(D,N,B)=>{r.type==="property"&&(D===":"?r.colonOffset=N:D===","&&o(N))},onError:(D,N,B)=>{n.push({error:D,offset:N,length:B})}},i);const f=r.children[0];return f&&delete f.parent,f}e.parseTree=S;function p(t,n){if(!t)return;let i=t;for(const r of n)if(typeof r=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;let o=!1;for(const c of i.children)if(Array.isArray(c.children)&&c.children[0].value===r){i=c.children[1],o=!0;break}if(!o)return}else{const o=r;if(i.type!=="array"||o<0||!Array.isArray(i.children)||o>=i.children.length)return;i=i.children[o]}return i}e.findNodeAtLocation=p;function P(t){if(!t.parent||!t.parent.children)return[];const n=P(t.parent);if(t.parent.type==="property"){const i=t.parent.children[0].value;n.push(i)}else if(t.parent.type==="array"){const i=t.parent.children.indexOf(t);i!==-1&&n.push(i)}return n}e.getNodePath=P;function y(t){switch(t.type){case"array":return t.children.map(y);case"object":{const n=Object.create(null);for(const i of t.children){const r=i.children[1];r&&(n[i.children[0].value]=y(r))}return n}case"null":case"string":case"number":case"boolean":return t.value;default:return}}e.getNodeValue=y;function l(t,n,i=!1){return n>=t.offset&&nA(r.getTokenOffset(),r.getTokenLength()):()=>!0}function c(A){return A?V=>A(V,r.getTokenOffset(),r.getTokenLength()):()=>!0}const a=o(n.onObjectBegin),f=c(n.onObjectProperty),D=o(n.onObjectEnd),N=o(n.onArrayBegin),B=o(n.onArrayEnd),X=c(n.onLiteralValue),J=c(n.onSeparator),se=o(n.onComment),ne=c(n.onError),re=i&&i.disallowComments,ge=i&&i.allowTrailingComma;function ce(){for(;;){const A=r.scan();switch(r.getTokenError()){case 4:te(14);break;case 5:te(15);break;case 3:te(13);break;case 1:re||te(11);break;case 2:te(12);break;case 6:te(16);break}switch(A){case 12:case 13:re?te(10):se();break;case 16:te(1);break;case 15:case 14:break;default:return A}}}function te(A,V=[],L=[]){if(ne(A),V.length+L.length>0){let T=r.getToken();for(;T!==17;){if(V.indexOf(T)!==-1){ce();break}else if(L.indexOf(T)!==-1)break;T=ce()}}}function j(A){const V=r.getTokenValue();return A?X(V):f(V),ce(),!0}function M(){switch(r.getToken()){case 11:{let A=0;try{A=JSON.parse(r.getTokenValue()),typeof A!="number"&&(te(2),A=0)}catch{te(2)}X(A);break}case 7:X(null);break;case 8:X(!0);break;case 9:X(!1);break;default:return!1}return ce(),!0}function F(){return r.getToken()!==10?(te(3,[],[2,5]),!1):(j(!1),r.getToken()===6?(J(":"),ce(),Y()||te(4,[],[2,5])):te(5,[],[2,5]),!0)}function z(){a(),ce();let A=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(A||te(4,[],[]),J(","),ce(),r.getToken()===2&&ge)break}else A&&te(6,[],[]);F()||te(4,[],[2,5]),A=!0}return D(),r.getToken()!==2?te(7,[2],[]):ce(),!0}function $(){N(),ce();let A=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(A||te(4,[],[]),J(","),ce(),r.getToken()===4&&ge)break}else A&&te(6,[],[]);Y()||te(4,[],[4,5]),A=!0}return B(),r.getToken()!==4?te(8,[4],[]):ce(),!0}function Y(){switch(r.getToken()){case 3:return $();case 1:return z();case 10:return j(!0);default:return M()}}return ce(),r.getToken()===17?i.allowEmptyContent?!0:(te(4,[],[]),!1):Y()?(r.getToken()!==17&&te(9,[],[]),!0):(te(4,[],[]),!1)}e.visit=E;function u(t,n){const i=O(t),r=[];let o,c=0,a;do switch(a=i.getPosition(),o=i.scan(),o){case 12:case 13:case 17:c!==a&&r.push(t.substring(c,a)),n!==void 0&&r.push(i.getTokenValue().replace(/[^\r\n]/g,n)),c=i.getPosition();break}while(o!==17);return r.join("")}e.stripComments=u;function s(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=s}),function(){function _(I){const k=[];typeof I=="number"&&k.push("code/timeOrigin",I);function O(d){k.push(d,Date.now())}function v(){const d=[];for(let h=0;h)?=?)";var o=h++;d[o]=d[b]+"|x|X|\\*";var c=h++;d[c]=d[w]+"|x|X|\\*";var a=h++;d[a]="[v=\\s]*("+d[c]+")(?:\\.("+d[c]+")(?:\\.("+d[c]+")(?:"+d[l]+")?"+d[u]+"?)?)?";var f=h++;d[f]="[v=\\s]*("+d[o]+")(?:\\.("+d[o]+")(?:\\.("+d[o]+")(?:"+d[m]+")?"+d[u]+"?)?)?";var D=h++;d[D]="^"+d[r]+"\\s*"+d[a]+"$";var N=h++;d[N]="^"+d[r]+"\\s*"+d[f]+"$";var B=h++;d[B]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var X=h++;d[X]="(?:~>?)";var J=h++;d[J]="(\\s*)"+d[X]+"\\s+",v[J]=new RegExp(d[J],"g");var se=h++;d[se]="^"+d[X]+d[a]+"$";var ne=h++;d[ne]="^"+d[X]+d[f]+"$";var re=h++;d[re]="(?:\\^)";var ge=h++;d[ge]="(\\s*)"+d[re]+"\\s+",v[ge]=new RegExp(d[ge],"g");var ce=h++;d[ce]="^"+d[re]+d[a]+"$";var te=h++;d[te]="^"+d[re]+d[f]+"$";var j=h++;d[j]="^"+d[r]+"\\s*("+n+")$|^$";var M=h++;d[M]="^"+d[r]+"\\s*("+t+")$|^$";var F=h++;d[F]="(\\s*)"+d[r]+"\\s*("+n+"|"+d[a]+")",v[F]=new RegExp(d[F],"g");var z=h++;d[z]="^\\s*("+d[a]+")\\s+-\\s+("+d[a]+")\\s*$";var $=h++;d[$]="^\\s*("+d[f]+")\\s+-\\s+("+d[f]+")\\s*$";var Y=h++;d[Y]="(<|>)?=?\\s*\\*";for(var A=0;A<35;A++)I(A,d[A]),v[A]||(v[A]=new RegExp(d[A]));function V(x,G){if(x instanceof L)return x;if(typeof x!="string"||x.length>k||!(G?v[i]:v[s]).test(x))return null;try{return new L(x,G)}catch{return null}}function L(x,G){if(x instanceof L){if(x.loose===G)return x;x=x.version}else if(typeof x!="string")throw new TypeError("Invalid Version: "+x);if(x.length>k)throw new TypeError("version is longer than "+k+" characters");if(!(this instanceof L))return new L(x,G);I("SemVer",x,G),this.loose=G;var K=x.trim().match(G?v[i]:v[s]);if(!K)throw new TypeError("Invalid Version: "+x);if(this.raw=x,this.major=+K[1],this.minor=+K[2],this.patch=+K[3],this.major>O||this.major<0)throw new TypeError("Invalid major version");if(this.minor>O||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>O||this.patch<0)throw new TypeError("Invalid patch version");K[4]?this.prerelease=K[4].split(".").map(function(he){if(/^[0-9]+$/.test(he)){var me=+he;if(me>=0&&me=0;)typeof this.prerelease[K]=="number"&&(this.prerelease[K]++,K=-2);K===-1&&this.prerelease.push(0)}G&&(this.prerelease[0]===G?isNaN(this.prerelease[1])&&(this.prerelease=[G,0]):this.prerelease=[G,0]);break;default:throw new Error("invalid increment argument: "+x)}return this.format(),this.raw=this.version,this},e.inc=function(x,G,K,he){typeof K=="string"&&(he=K,K=void 0);try{return new L(x,K).inc(G,he).version}catch{return null}},e.diff=function(x,G){if(oe(x,G))return null;var K=V(x),he=V(G);if(K.prerelease.length||he.prerelease.length){for(var me in K)if((me==="major"||me==="minor"||me==="patch")&&K[me]!==he[me])return"pre"+me;return"prerelease"}for(var me in K)if((me==="major"||me==="minor"||me==="patch")&&K[me]!==he[me])return me},e.compareIdentifiers=U;var T=/^[0-9]+$/;function U(x,G){var K=T.test(x),he=T.test(G);return K&&he&&(x=+x,G=+G),K&&!he?-1:he&&!K?1:xG?1:0}function W(x,G,K){return new L(x,K).compare(new L(G,K))}function q(x,G,K){return W(x,G,K)>0}function H(x,G,K){return W(x,G,K)<0}function oe(x,G,K){return W(x,G,K)===0}function ue(x,G,K){return W(x,G,K)!==0}function ve(x,G,K){return W(x,G,K)>=0}function Se(x,G,K){return W(x,G,K)<=0}function le(x,G,K,he){var me;switch(G){case"===":typeof x=="object"&&(x=x.version),typeof K=="object"&&(K=K.version),me=x===K;break;case"!==":typeof x=="object"&&(x=x.version),typeof K=="object"&&(K=K.version),me=x!==K;break;case"":case"=":case"==":me=oe(x,K,he);break;case"!=":me=ue(x,K,he);break;case">":me=q(x,K,he);break;case">=":me=ve(x,K,he);break;case"<":me=H(x,K,he);break;case"<=":me=Se(x,K,he);break;default:throw new TypeError("Invalid operator: "+G)}return me}function ie(x,G){if(x instanceof ie){if(x.loose===G)return x;x=x.value}if(!(this instanceof ie))return new ie(x,G);I("comparator",x,G),this.loose=G,this.parse(x),this.semver===fe?this.value="":this.value=this.operator+this.semver.version,I("comp",this)}e.rcompareIdentifiers=function(x,G){return U(G,x)},e.major=function(x,G){return new L(x,G).major},e.minor=function(x,G){return new L(x,G).minor},e.patch=function(x,G){return new L(x,G).patch},e.compare=W,e.compareLoose=function(x,G){return W(x,G,!0)},e.rcompare=function(x,G,K){return W(G,x,K)},e.sort=function(x,G){return x.sort(function(K,he){return e.compare(K,he,G)})},e.rsort=function(x,G){return x.sort(function(K,he){return e.rcompare(K,he,G)})},e.gt=q,e.lt=H,e.eq=oe,e.neq=ue,e.gte=ve,e.lte=Se,e.cmp=le,e.Comparator=ie;var fe={};function ae(x,G){if(x instanceof ae)return x.loose===G?x:new ae(x.raw,G);if(x instanceof ie)return new ae(x.value,G);if(!(this instanceof ae))return new ae(x,G);if(this.loose=G,this.raw=x,this.set=x.split(/\s*\|\|\s*/).map(function(K){return this.parseRange(K.trim())},this).filter(function(K){return K.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+x);this.format()}function pe(x){return!x||x.toLowerCase()==="x"||x==="*"}function Fe(x,G,K,he,me,De,we,Re,Ie,ke,Ne,Ce,Le){return((G=pe(K)?"":pe(he)?">="+K+".0.0":pe(me)?">="+K+"."+he+".0":">="+G)+" "+(Re=pe(Ie)?"":pe(ke)?"<"+(+Ie+1)+".0.0":pe(Ne)?"<"+Ie+"."+(+ke+1)+".0":Ce?"<="+Ie+"."+ke+"."+Ne+"-"+Ce:"<="+Re)).trim()}function Oe(x,G){for(var K=0;K0){var he=x[K].semver;if(he.major===G.major&&he.minor===G.minor&&he.patch===G.patch)return!0}return!1}return!0}function Ae(x,G,K){try{G=new ae(G,K)}catch{return!1}return G.test(x)}function Ve(x,G,K,he){var me,De,we,Re,Ie;switch(x=new L(x,he),G=new ae(G,he),K){case">":me=q,De=Se,we=H,Re=">",Ie=">=";break;case"<":me=H,De=ve,we=q,Re="<",Ie="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ae(x,G,he))return!1;for(var ke=0;ke=0.0.0")),Ce=Ce||Me,Le=Le||Me,me(Me.semver,Ce.semver,he)?Ce=Me:we(Me.semver,Le.semver,he)&&(Le=Me)}),Ce.operator===Re||Ce.operator===Ie||(!Le.operator||Le.operator===Re)&&De(x,Le.semver)||Le.operator===Ie&&we(x,Le.semver))return!1}return!0}ie.prototype.parse=function(x){var G=this.loose?v[j]:v[M],K=x.match(G);if(!K)throw new TypeError("Invalid comparator: "+x);this.operator=K[1],this.operator==="="&&(this.operator=""),K[2]?this.semver=new L(K[2],this.loose):this.semver=fe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(x){return I("Comparator.test",x,this.loose),this.semver===fe||(typeof x=="string"&&(x=new L(x,this.loose)),le(x,this.operator,this.semver,this.loose))},ie.prototype.intersects=function(x,G){if(!(x instanceof ie))throw new TypeError("a Comparator is required");var K;if(this.operator==="")return K=new ae(x.value,G),Ae(this.value,K,G);if(x.operator==="")return K=new ae(this.value,G),Ae(x.semver,K,G);var he=!(this.operator!==">="&&this.operator!==">"||x.operator!==">="&&x.operator!==">"),me=!(this.operator!=="<="&&this.operator!=="<"||x.operator!=="<="&&x.operator!=="<"),De=this.semver.version===x.semver.version,we=!(this.operator!==">="&&this.operator!=="<="||x.operator!==">="&&x.operator!=="<="),Re=le(this.semver,"<",x.semver,G)&&(this.operator===">="||this.operator===">")&&(x.operator==="<="||x.operator==="<"),Ie=le(this.semver,">",x.semver,G)&&(this.operator==="<="||this.operator==="<")&&(x.operator===">="||x.operator===">");return he||me||De&&we||Re||Ie},e.Range=ae,ae.prototype.format=function(){return this.range=this.set.map(function(x){return x.join(" ").trim()}).join("||").trim(),this.range},ae.prototype.toString=function(){return this.range},ae.prototype.parseRange=function(x){var G=this.loose;x=x.trim(),I("range",x,G);var K=G?v[$]:v[z];x=x.replace(K,Fe),I("hyphen replace",x),x=x.replace(v[F],"$1$2$3"),I("comparator trim",x,v[F]),x=(x=(x=x.replace(v[J],"$1~")).replace(v[ge],"$1^")).split(/\s+/).join(" ");var he=G?v[j]:v[M],me=x.split(" ").map(function(De){return function(we,Re){return I("comp",we),we=function(Ie,ke){return Ie.trim().split(/\s+/).map(function(Ne){return function(Ce,Le){I("caret",Ce,Le);var Me=Le?v[te]:v[ce];return Ce.replace(Me,function(Ue,ye,Ee,Pe,be){var Te;return I("caret",Ce,Ue,ye,Ee,Pe,be),pe(ye)?Te="":pe(Ee)?Te=">="+ye+".0.0 <"+(+ye+1)+".0.0":pe(Pe)?Te=ye==="0"?">="+ye+"."+Ee+".0 <"+ye+"."+(+Ee+1)+".0":">="+ye+"."+Ee+".0 <"+(+ye+1)+".0.0":be?(I("replaceCaret pr",be),be.charAt(0)!=="-"&&(be="-"+be),Te=ye==="0"?Ee==="0"?">="+ye+"."+Ee+"."+Pe+be+" <"+ye+"."+Ee+"."+(+Pe+1):">="+ye+"."+Ee+"."+Pe+be+" <"+ye+"."+(+Ee+1)+".0":">="+ye+"."+Ee+"."+Pe+be+" <"+(+ye+1)+".0.0"):(I("no pr"),Te=ye==="0"?Ee==="0"?">="+ye+"."+Ee+"."+Pe+" <"+ye+"."+Ee+"."+(+Pe+1):">="+ye+"."+Ee+"."+Pe+" <"+ye+"."+(+Ee+1)+".0":">="+ye+"."+Ee+"."+Pe+" <"+(+ye+1)+".0.0"),I("caret return",Te),Te})}(Ne,ke)}).join(" ")}(we,Re),I("caret",we),we=function(Ie,ke){return Ie.trim().split(/\s+/).map(function(Ne){return function(Ce,Le){var Me=Le?v[ne]:v[se];return Ce.replace(Me,function(Ue,ye,Ee,Pe,be){var Te;return I("tilde",Ce,Ue,ye,Ee,Pe,be),pe(ye)?Te="":pe(Ee)?Te=">="+ye+".0.0 <"+(+ye+1)+".0.0":pe(Pe)?Te=">="+ye+"."+Ee+".0 <"+ye+"."+(+Ee+1)+".0":be?(I("replaceTilde pr",be),be.charAt(0)!=="-"&&(be="-"+be),Te=">="+ye+"."+Ee+"."+Pe+be+" <"+ye+"."+(+Ee+1)+".0"):Te=">="+ye+"."+Ee+"."+Pe+" <"+ye+"."+(+Ee+1)+".0",I("tilde return",Te),Te})}(Ne,ke)}).join(" ")}(we,Re),I("tildes",we),we=function(Ie,ke){return I("replaceXRanges",Ie,ke),Ie.split(/\s+/).map(function(Ne){return function(Ce,Le){Ce=Ce.trim();var Me=Le?v[N]:v[D];return Ce.replace(Me,function(Ue,ye,Ee,Pe,be,Te){I("xRange",Ce,Ue,ye,Ee,Pe,be,Te);var $e=pe(Ee),xe=$e||pe(Pe),ze=xe||pe(be);return ye==="="&&ze&&(ye=""),$e?Ue=ye===">"||ye==="<"?"<0.0.0":"*":ye&&ze?(xe&&(Pe=0),ze&&(be=0),ye===">"?(ye=">=",xe?(Ee=+Ee+1,Pe=0,be=0):ze&&(Pe=+Pe+1,be=0)):ye==="<="&&(ye="<",xe?Ee=+Ee+1:Pe=+Pe+1),Ue=ye+Ee+"."+Pe+"."+be):xe?Ue=">="+Ee+".0.0 <"+(+Ee+1)+".0.0":ze&&(Ue=">="+Ee+"."+Pe+".0 <"+Ee+"."+(+Pe+1)+".0"),I("xRange return",Ue),Ue})}(Ne,ke)}).join(" ")}(we,Re),I("xrange",we),we=function(Ie,ke){return I("replaceStars",Ie,ke),Ie.trim().replace(v[Y],"")}(we,Re),I("stars",we),we}(De,G)}).join(" ").split(/\s+/);return this.loose&&(me=me.filter(function(De){return!!De.match(he)})),me=me.map(function(De){return new ie(De,G)})},ae.prototype.intersects=function(x,G){if(!(x instanceof ae))throw new TypeError("a Range is required");return this.set.some(function(K){return K.every(function(he){return x.set.some(function(me){return me.every(function(De){return he.intersects(De,G)})})})})},e.toComparators=function(x,G){return new ae(x,G).set.map(function(K){return K.map(function(he){return he.value}).join(" ").trim().split(" ")})},ae.prototype.test=function(x){if(!x)return!1;typeof x=="string"&&(x=new L(x,this.loose));for(var G=0;G",K)},e.outside=Ve,e.prerelease=function(x,G){var K=V(x,G);return K&&K.prerelease.length?K.prerelease:null},e.intersects=function(x,G,K){return x=new ae(x,K),G=new ae(G,K),x.intersects(G)},e.coerce=function(x){if(x instanceof L)return x;if(typeof x!="string")return null;var G=x.match(v[B]);return G==null?null:V((G[1]||"0")+"."+(G[2]||"0")+"."+(G[3]||"0"))}}).call(this,C(1))},function(_,e){var C,R,I=_.exports={};function k(){throw new Error("setTimeout has not been defined")}function O(){throw new Error("clearTimeout has not been defined")}function v(y){if(C===setTimeout)return setTimeout(y,0);if((C===k||!C)&&setTimeout)return C=setTimeout,setTimeout(y,0);try{return C(y,0)}catch{try{return C.call(null,y,0)}catch{return C.call(this,y,0)}}}(function(){try{C=typeof setTimeout=="function"?setTimeout:k}catch{C=k}try{R=typeof clearTimeout=="function"?clearTimeout:O}catch{R=O}})();var d,h=[],w=!1,b=-1;function g(){w&&d&&(w=!1,d.length?h=d.concat(h):b=-1,h.length&&S())}function S(){if(!w){var y=v(g);w=!0;for(var l=h.length;l;){for(d=h,h=[];++b1)for(var m=1;m=0;b--)for(;w.forward[b]&&h(w.forward[b].key,d)<0;)w=w.forward[b];if(w=w.forward[0],w&&h(w.key,d)===0)return w}static _insert(v,d,h,w){const b=[];let g=v._header;for(let S=v._level-1;S>=0;S--){for(;g.forward[S]&&w(g.forward[S].key,d)<0;)g=g.forward[S];b[S]=g}if(g=g.forward[0],g&&w(g.key,d)===0)return g.value=h,!1;{const S=k._randomLevel(v);if(S>v._level){for(let p=v._level;p=0;g--){for(;b.forward[g]&&h(b.forward[g].key,d)<0;)b=b.forward[g];w[g]=b}if(b=b.forward[0],!b||h(b.key,d)!==0)return!1;for(let g=0;g0&&v._header.forward[v._level-1]===I;)v._level-=1;return!0}}e.SkipList=k}),define(Q[43],Z([0,1,11,2]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function I(u){const s=u;return s?typeof s.read=="function":!1}e.isReadable=I;function k(u){const s=u;return s?[s.on,s.pause,s.resume,s.destroy].every(t=>typeof t=="function"):!1}e.isReadableStream=k;function O(u){const s=u;return s?k(s.stream)&&Array.isArray(s.buffer)&&typeof s.ended=="boolean":!1}e.isReadableBufferedStream=O;function v(u,s){return new d(u,s)}e.newWriteableStream=v;class d{constructor(s,t){this.reducer=s,this.options=t,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(s){if(!this.state.destroyed){if(this.state.flowing)this.emitData(s);else if(this.buffer.data.push(s),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(t=>this.pendingWritePromises.push(t))}}error(s){this.state.destroyed||(this.state.flowing?this.emitError(s):this.buffer.error.push(s))}end(s){this.state.destroyed||(typeof s<"u"&&this.write(s),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(s){this.listeners.data.slice(0).forEach(t=>t(s))}emitError(s){this.listeners.error.length===0?(0,C.onUnexpectedError)(s):this.listeners.error.slice(0).forEach(t=>t(s))}emitEnd(){this.listeners.end.slice(0).forEach(s=>s())}on(s,t){if(!this.state.destroyed)switch(s){case"data":this.listeners.data.push(t),this.resume();break;case"end":this.listeners.end.push(t),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(t),this.state.flowing&&this.flowErrors();break}}removeListener(s,t){if(this.state.destroyed)return;let n;switch(s){case"data":n=this.listeners.data;break;case"end":n=this.listeners.end;break;case"error":n=this.listeners.error;break}if(n){const i=n.indexOf(t);i>=0&&n.splice(i,1)}}flowData(){if(this.buffer.data.length>0){const s=this.reducer(this.buffer.data);this.emitData(s),this.buffer.data.length=0;const t=[...this.pendingWritePromises];this.pendingWritePromises.length=0,t.forEach(n=>n())}}flowErrors(){if(this.listeners.error.length>0){for(const s of this.buffer.error)this.emitError(s);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}function h(u,s){const t=[];let n;for(;(n=u.read())!==null;)t.push(n);return s(t)}e.consumeReadable=h;function w(u,s,t){const n=[];let i;for(;(i=u.read())!==null&&n.length0?s(n):{read:()=>{if(n.length>0)return n.shift();if(typeof i<"u"){const r=i;return i=void 0,r}return u.read()}}}e.peekReadable=w;function b(u,s){return new Promise((t,n)=>{const i=[];g(u,{onData:r=>{s&&i.push(r)},onError:r=>{s?n(r):t(void 0)},onEnd:()=>{t(s?s(i):void 0)}})})}e.consumeStream=b;function g(u,s){let t=!1;return u.on("error",n=>{t||s.onError(n)}),u.on("end",()=>{t||s.onEnd()}),u.on("data",n=>{t||s.onData(n)}),(0,R.toDisposable)(()=>t=!0)}e.listenStream=g;function S(u,s){return new Promise((t,n)=>{const i=new R.DisposableStore,r=[],o=f=>{if(r.push(f),r.length>s)return i.dispose(),u.pause(),t({stream:u,buffer:r,ended:!1})},c=f=>n(f),a=()=>t({stream:u,buffer:r,ended:!0});i.add((0,R.toDisposable)(()=>u.removeListener("error",c))),u.on("error",c),i.add((0,R.toDisposable)(()=>u.removeListener("end",a))),u.on("end",a),i.add((0,R.toDisposable)(()=>u.removeListener("data",o))),u.on("data",o)})}e.peekStream=S;function p(u,s){const t=v(s);return t.end(u),t}e.toStream=p;function P(){const u=v(()=>{throw new Error("not supported")});return u.end(),u}e.emptyStream=P;function y(u){let s=!1;return{read:()=>s?null:(s=!0,u)}}e.toReadable=y;function l(u,s,t){const n=v(t);return g(u,{onData:i=>n.write(s.data(i)),onError:i=>n.error(s.error?s.error(i):i),onEnd:()=>n.end()}),n}e.transform=l;function m(u,s,t){let n=!1;return{read:()=>{const i=s.read();return n?i:(n=!0,i!==null?t([u,i]):u)}}}e.prefixedReadable=m;function E(u,s,t){let n=!1;const i=v(t);return g(s,{onData:r=>n?i.write(r):(n=!0,i.write(t([u,r]))),onError:r=>i.error(r),onEnd:()=>{n||(n=!0,i.write(u)),i.end()}}),i}e.prefixedStream=E}),define(Q[15],Z([0,1,43]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const R=typeof Buffer<"u";let I,k;class O{static alloc(f){return R?new O(Buffer.allocUnsafe(f)):new O(new Uint8Array(f))}static wrap(f){return R&&!Buffer.isBuffer(f)&&(f=Buffer.from(f.buffer,f.byteOffset,f.byteLength)),new O(f)}static fromString(f,D){return!(D?.dontUseNodeBuffer||!1)&&R?new O(Buffer.from(f)):(I||(I=new TextEncoder),new O(I.encode(f)))}static fromByteArray(f){const D=O.alloc(f.length);for(let N=0,B=f.length;N"u"){D=0;for(let X=0,J=f.length;X>>0|a[f+1]<<8>>>0}e.readUInt16LE=v;function d(a,f,D){a[D+0]=f&255,f=f>>>8,a[D+1]=f&255}e.writeUInt16LE=d;function h(a,f){return a[f]*2**24+a[f+1]*2**16+a[f+2]*2**8+a[f+3]}e.readUInt32BE=h;function w(a,f,D){a[D+3]=f,f=f>>>8,a[D+2]=f,f=f>>>8,a[D+1]=f,f=f>>>8,a[D]=f}e.writeUInt32BE=w;function b(a,f){return a[f+0]<<0>>>0|a[f+1]<<8>>>0|a[f+2]<<16>>>0|a[f+3]<<24>>>0}e.readUInt32LE=b;function g(a,f,D){a[D+0]=f&255,f=f>>>8,a[D+1]=f&255,f=f>>>8,a[D+2]=f&255,f=f>>>8,a[D+3]=f&255}e.writeUInt32LE=g;function S(a,f){return a[f]}e.readUInt8=S;function p(a,f,D){a[D]=f}e.writeUInt8=p;function P(a){return C.consumeReadable(a,f=>O.concat(f))}e.readableToBuffer=P;function y(a){return C.toReadable(a)}e.bufferToReadable=y;function l(a){return C.consumeStream(a,f=>O.concat(f))}e.streamToBuffer=l;async function m(a){return a.ended?O.concat(a.buffer):O.concat([...a.buffer,await l(a.stream)])}e.bufferedStreamToBuffer=m;function E(a){return C.toStream(a,f=>O.concat(f))}e.bufferToStream=E;function u(a){return C.transform(a,{data:f=>typeof f=="string"?O.fromString(f):O.wrap(f)},f=>O.concat(f))}e.streamToBufferReadableStream=u;function s(a){return C.newWriteableStream(f=>O.concat(f),a)}e.newWriteableBufferStream=s;function t(a,f){return C.prefixedReadable(a,f,D=>O.concat(D))}e.prefixedBufferReadable=t;function n(a,f){return C.prefixedStream(a,f,D=>O.concat(D))}e.prefixedBufferStream=n;function i(a){let f=0,D=0,N=0;const B=new Uint8Array(Math.floor(a.length/4*3)),X=se=>{switch(D){case 3:B[N++]=f|se,D=0;break;case 2:B[N++]=f|se>>>2,f=se<<6,D=3;break;case 1:B[N++]=f|se>>>4,f=se<<4,D=2;break;default:f=se<<2,D=1}};for(let se=0;se=65&&ne<=90)X(ne-65);else if(ne>=97&&ne<=122)X(ne-97+26);else if(ne>=48&&ne<=57)X(ne-48+52);else if(ne===43||ne===45)X(62);else if(ne===47||ne===95)X(63);else{if(ne===61)break;throw new SyntaxError(`Unexpected base64 character ${a[se]}`)}}const J=N;for(;D>0;)X(0);return O.wrap(B).slice(0,J)}e.decodeBase64=i;const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function c({buffer:a},f=!0,D=!1){const N=D?o:r;let B="";const X=a.byteLength%3;let J=0;for(;J>>2],B+=N[(se<<4|ne>>>4)&63],B+=N[(ne<<2|re>>>6)&63],B+=N[re&63]}if(X===1){const se=a[J+0];B+=N[se>>>2],B+=N[se<<4&63],f&&(B+="==")}else if(X===2){const se=a[J+0],ne=a[J+1];B+=N[se>>>2],B+=N[(se<<4|ne>>>4)&63],B+=N[ne<<2&63],f&&(B+="=")}return B}e.encodeBase64=c}),define(Q[26],Z([0,1,5]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function R(l){if(!l||typeof l!="object"||l instanceof RegExp)return l;const m=Array.isArray(l)?[]:{};return Object.entries(l).forEach(([E,u])=>{m[E]=u&&typeof u=="object"?R(u):u}),m}e.deepClone=R;function I(l){if(!l||typeof l!="object")return l;const m=[l];for(;m.length>0;){const E=m.shift();Object.freeze(E);for(const u in E)if(k.call(E,u)){const s=E[u];typeof s=="object"&&!Object.isFrozen(s)&&!(0,C.isTypedArray)(s)&&m.push(s)}}return l}e.deepFreeze=I;const k=Object.prototype.hasOwnProperty;function O(l,m){return v(l,m,new Set)}e.cloneAndChange=O;function v(l,m,E){if((0,C.isUndefinedOrNull)(l))return l;const u=m(l);if(typeof u<"u")return u;if(Array.isArray(l)){const s=[];for(const t of l)s.push(v(t,m,E));return s}if((0,C.isObject)(l)){if(E.has(l))throw new Error("Cannot clone recursive data-structure");E.add(l);const s={};for(const t in l)k.call(l,t)&&(s[t]=v(l[t],m,E));return E.delete(l),s}return l}function d(l,m,E=!0){return(0,C.isObject)(l)?((0,C.isObject)(m)&&Object.keys(m).forEach(u=>{u in l?E&&((0,C.isObject)(l[u])&&(0,C.isObject)(m[u])?d(l[u],m[u],E):l[u]=m[u]):l[u]=m[u]}),l):m}e.mixin=d;function h(l,m){if(l===m)return!0;if(l==null||m===null||m===void 0||typeof l!=typeof m||typeof l!="object"||Array.isArray(l)!==Array.isArray(m))return!1;let E,u;if(Array.isArray(l)){if(l.length!==m.length)return!1;for(E=0;E{if((0,C.isObject)(u)||Array.isArray(u)){if(m.has(u))return"[Circular]";m.add(u)}return u})}e.safeStringify=w;function b(l,m){const E=Object.create(null);return!l||!m||Object.keys(m).forEach(s=>{const t=l[s],n=m[s];h(t,n)||(E[s]=n)}),E}e.distinct=b;function g(l,m){const E=m.toLowerCase(),u=Object.keys(l).find(s=>s.toLowerCase()===E);return u?l[u]:l[m]}e.getCaseInsensitive=g;function S(l,m){const E=Object.create(null);for(const[u,s]of Object.entries(l))m(u,s)&&(E[u]=s);return E}e.filter=S;function p(l){let m=[],E=Object.getPrototypeOf(l);for(;Object.prototype!==E;)m=m.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return m}e.getAllPropertyNames=p;function P(l){const m=[];for(const E of p(l))typeof l[E]=="function"&&m.push(E);return m}e.getAllMethodNames=P;function y(l,m){const E=s=>function(){const t=Array.prototype.slice.call(arguments,0);return m(s,t)},u={};for(const s of l)u[s]=E(s);return u}e.createProxyObject=y}),define(Q[30],Z([0,1]),function(_,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const C=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function R(I){return C.test(I)}e.isUUID=R,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let I;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?I=crypto.getRandomValues.bind(crypto):I=function(v){for(let d=0;d1?I.localize(4,null,p,S.length):p}if(R.isString(b))return b;if(b.detail){const S=b.detail;if(S.error)return k(S.error,g);if(S.exception)return k(S.exception,g)}return b.stack?k(b,g):b.message?b.message:I.localize(5,null)}e.toErrorMessage=d;function h(b){const g=b;return g instanceof Error&&Array.isArray(g.actions)}e.isErrorWithActions=h;function w(b,g){let S;return typeof b=="string"?S=new Error(b):S=b,S.actions=g,S}e.createErrorWithActions=w}),define(Q[74],Z([6,7]),function(_,e){return _.create("vs/base/common/jsonErrorMessages",e)}),define(Q[75],Z([0,1,74]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function R(I){switch(I){case 1:return(0,C.localize)(0,null);case 2:return(0,C.localize)(1,null);case 3:return(0,C.localize)(2,null);case 4:return(0,C.localize)(3,null);case 5:return(0,C.localize)(4,null);case 6:return(0,C.localize)(5,null);case 7:return(0,C.localize)(6,null);case 8:return(0,C.localize)(7,null);case 9:return(0,C.localize)(8,null);default:return""}}e.getParseErrorMessage=R}),define(Q[51],Z([0,1,12]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var R;(function(v){v[v.stdout=0]="stdout",v[v.stderr=1]="stderr"})(R=e.Source||(e.Source={}));var I;(function(v){v[v.Success=0]="Success",v[v.Unknown=1]="Unknown",v[v.AccessDenied=2]="AccessDenied",v[v.ProcessNotFound=3]="ProcessNotFound"})(I=e.TerminateResponseCode||(e.TerminateResponseCode={}));function k(v,...d){const h=d.reduce((g,S)=>(g[S]=!0,g),{}),w=[/^ELECTRON_.+$/,/^VSCODE_(?!SHELL_LOGIN).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(v).filter(g=>!h[g]).forEach(g=>{for(let S=0;S({onDidChange:C.Event.None,value:O});e.staticObservableValue=I;class k extends R.Disposable{get value(){return this._value}set value(v){v!==this._value&&(this._value=v,this.changeEmitter.fire(v))}constructor(v){super(),this._value=v,this.changeEmitter=this._register(new C.Emitter),this.onDidChange=this.changeEmitter.event}}e.MutableObservableValue=k}),define(Q[53],Z([0,1,27]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.Hasher=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function R(l){return I(l,0)}e.hash=R;function I(l,m){switch(typeof l){case"object":return l===null?k(349,m):Array.isArray(l)?d(l,m):h(l,m);case"string":return v(l,m);case"boolean":return O(l,m);case"number":return k(l,m);case"undefined":return k(937,m);default:return k(617,m)}}e.doHash=I;function k(l,m){return(m<<5)-m+l|0}e.numberHash=k;function O(l,m){return k(l?433:863,m)}function v(l,m){m=k(149417,m);for(let E=0,u=l.length;EI(u,E),m)}function h(l,m){return m=k(181387,m),Object.keys(l).sort().reduce((E,u)=>(E=v(u,E),I(l[u],E)),m)}class w{constructor(){this._value=0}get value(){return this._value}hash(m){return this._value=I(m,this._value),this._value}}e.Hasher=w;var b;(function(l){l[l.BLOCK_SIZE=64]="BLOCK_SIZE",l[l.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(b||(b={}));function g(l,m,E=32){const u=E-m,s=~((1<>>u)>>>0}function S(l,m=0,E=l.byteLength,u=0){for(let s=0;sE.toString(16).padStart(2,"0")).join(""):p((l>>>0).toString(16),m/4)}e.toHexString=P;class y{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(m){const E=m.length;if(E===0)return;const u=this._buff;let s=this._buffLen,t=this._leftoverHighSurrogate,n,i;for(t!==0?(n=t,i=-1,t=0):(n=m.charCodeAt(0),i=0);;){let r=n;if(C.isHighSurrogate(n))if(i+1>>6,m[E++]=128|(u&63)>>>0):u<65536?(m[E++]=224|(u&61440)>>>12,m[E++]=128|(u&4032)>>>6,m[E++]=128|(u&63)>>>0):(m[E++]=240|(u&1835008)>>>18,m[E++]=128|(u&258048)>>>12,m[E++]=128|(u&4032)>>>6,m[E++]=128|(u&63)>>>0),E>=64&&(this._step(),E-=64,this._totalLen+=64,m[0]=m[64+0],m[1]=m[64+1],m[2]=m[64+2]),E}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),P(this._h0)+P(this._h1)+P(this._h2)+P(this._h3)+P(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,S(this._buff,this._buffLen),this._buffLen>56&&(this._step(),S(this._buff));const m=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(m/4294967296),!1),this._buffDV.setUint32(60,m%4294967296,!1),this._step()}_step(){const m=y._bigBlock32,E=this._buffDV;for(let a=0;a<64;a+=4)m.setUint32(a,E.getUint32(a,!1),!1);for(let a=64;a<320;a+=4)m.setUint32(a,g(m.getUint32(a-12,!1)^m.getUint32(a-32,!1)^m.getUint32(a-56,!1)^m.getUint32(a-64,!1),1),!1);let u=this._h0,s=this._h1,t=this._h2,n=this._h3,i=this._h4,r,o,c;for(let a=0;a<80;a++)a<20?(r=s&t|~s&n,o=1518500249):a<40?(r=s^t^n,o=1859775393):a<60?(r=s&t|s&n|t&n,o=2400959708):(r=s^t^n,o=3395469782),c=g(u,5)+r+i+o+m.getUint32(a*4,!1)&4294967295,i=n,n=t,t=g(s,30),s=u,u=c;this._h0=this._h0+u&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+t&4294967295,this._h3=this._h3+n&4294967295,this._h4=this._h4+i&4294967295}}e.StringSHA1=y,y._bigBlock32=new DataView(new ArrayBuffer(320))}),define(Q[54],Z([0,1,27]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var R;(function(I){I[I.Ignore=0]="Ignore",I[I.Info=1]="Info",I[I.Warning=2]="Warning",I[I.Error=3]="Error"})(R||(R={})),function(I){const k="error",O="warning",v="warn",d="info",h="ignore";function w(g){return g?C.equalsIgnoreCase(k,g)?I.Error:C.equalsIgnoreCase(O,g)||C.equalsIgnoreCase(v,g)?I.Warning:C.equalsIgnoreCase(d,g)?I.Info:I.Ignore:I.Ignore}I.fromValue=w;function b(g){switch(g){case I.Error:return k;case I.Warning:return O;case I.Info:return d;default:return h}}I.toString=b}(R||(R={})),e.default=R}),define(Q[76],Z([0,1,10]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function R(h){const w=h;return w&&typeof w.type=="string"&&typeof w.severity=="string"}e.isRemoteConsoleLog=R;function I(h){const w=[];let b;try{const g=JSON.parse(h.arguments),S=g[g.length-1];S&&S.__$stack&&(g.pop(),b=S.__$stack),w.push(...g)}catch{w.push("Unable to log remote console arguments",h.arguments)}return{args:w,stack:b}}e.parse=I;function k(h){if(typeof h!="string")return k(I(h).stack);const w=h;if(w){const b=O(w),g=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(b||"");if(g&&g.length===4)return{uri:C.URI.file(g[1]),line:Number(g[2]),column:Number(g[3])}}}e.getFirstFrame=k;function O(h){if(!h)return h;const w=h.indexOf(` `);return w===-1?h:h.substring(0,w)}function v(h,w){const{args:b,stack:g}=I(h),S=typeof b[0]=="string"&&b.length===1;let p=O(g);p&&(p=`(${p.trim()})`);let P=[];if(typeof b[0]=="string"?p&&S?P=[`%c[${w}] %c${b[0]} %c${p}`,d("blue"),d(""),d("grey")]:P=[`%c[${w}] %c${b[0]}`,d("blue"),d(""),...b.slice(1)]:P=[`%c[${w}]%`,d("blue"),...b],p&&!S&&P.push(p),typeof console[h.severity]!="function")throw new Error("Unknown console method");console[h.severity].apply(console,P)}e.log=v;function d(h){return`color: ${h}`}}),define(Q[44],Z([0,1,15,27,10]),function(_,e,C,R,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function k(h){return JSON.stringify(h,v)}e.stringify=k;function O(h){let w=JSON.parse(h);return w=d(w),w}e.parse=O;function v(h,w){return w instanceof RegExp?{$mid:2,source:w.source,flags:(0,R.regExpFlags)(w)}:w}function d(h,w=0){if(!h||w>200)return h;if(typeof h=="object"){switch(h.$mid){case 1:return I.URI.revive(h);case 2:return new RegExp(h.source,h.flags);case 15:return new Date(h.source)}if(h instanceof C.VSBuffer||h instanceof Uint8Array)return h;if(Array.isArray(h))for(let b=0;b{if(l&&console.error(l),S=!1,g.length>0){const m=g.slice(0);g=[],m.forEach(E=>p(E))}})||R.isWindows)&&(S=!0)};return{send:p}}e.createQueuedSender=h;var w;(function(b){async function g(S,p,P){if(C.isAbsolute(S))return S;if(p===void 0&&(p=I.cwd()),C.dirname(S)!=="."||(P===void 0&&O.isString(I.env.PATH)&&(P=I.env.PATH.split(C.delimiter)),P===void 0||P.length===0))return C.join(p,S);async function l(m){if(await v.Promises.exists(m)){let E;try{E=await v.Promises.stat(m)}catch(u){u.message.startsWith("EACCES")&&(E=await v.Promises.lstat(m))}return E?!E.isDirectory():!1}return!1}for(const m of P){let E;if(C.isAbsolute(m)?E=C.join(m,S):E=C.join(p,m,S),await l(E))return E;let u=E+".com";if(await l(u)||(u=E+".exe",await l(u)))return u}return C.join(p,S)}b.findExecutable=g})(w=e.win32||(e.win32={}))}),define(Q[78],Z([0,1,37,12,77,55]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSystemShellSync=e.getSystemShell=void 0;async function O(S,p){return S===1?R.isWindows?b():k.getWindowsShell(p):h(S,p)}e.getSystemShell=O;function v(S,p){return S===1?R.isWindows?g(p):k.getWindowsShell(p):h(S,p)}e.getSystemShellSync=v;let d=null;function h(S,p){if(R.isLinux&&S===2||R.isMacintosh&&S===3)return"/bin/bash";if(!d){let P;if(R.isWindows)P="/bin/bash";else{if(P=p.SHELL,!P)try{P=(0,C.userInfo)().shell}catch{}P||(P="sh"),P==="/bin/false"&&(P="/bin/bash")}d=P}return d}let w=null;async function b(){return w||(w=(await(0,I.getFirstAvailablePowerShellInstallation)()).exePath),w}function g(S){if(w)return w;const p=R.isWindows&&parseFloat((0,C.release)())>=10,P=S.hasOwnProperty("PROCESSOR_ARCHITEW6432"),y=`${S.windir}\\${P?"Sysnative":"System32"}\\WindowsPowerShell\\v1.0\\powershell.exe`;return p?y:k.getWindowsShell(S)}});var de=this&&this.__decorate||function(_,e,C,R){var I=arguments.length,k=I<3?e:R===null?R=Object.getOwnPropertyDescriptor(e,C):R,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,e,C,R);else for(var v=_.length-1;v>=0;v--)(O=_[v])&&(k=(I<3?O(k):I>3?O(e,C,k):O(e,C))||k);return I>3&&k&&Object.defineProperty(e,C,k),k};define(Q[56],Z([0,1,19,3,15,24,49,11,4,2,44,27,5]),function(_,e,C,R,I,k,O,v,d,h,w,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.logWithColors=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.ResponseType=e.RequestType=void 0;var S;(function(M){M[M.Promise=100]="Promise",M[M.PromiseCancel=101]="PromiseCancel",M[M.EventListen=102]="EventListen",M[M.EventDispose=103]="EventDispose"})(S=e.RequestType||(e.RequestType={}));function p(M){switch(M){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var P;(function(M){M[M.Initialize=200]="Initialize",M[M.PromiseSuccess=201]="PromiseSuccess",M[M.PromiseError=202]="PromiseError",M[M.PromiseErrorObj=203]="PromiseErrorObj",M[M.EventFire=204]="EventFire"})(P=e.ResponseType||(e.ResponseType={}));function y(M){switch(M){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var l;(function(M){M[M.Uninitialized=0]="Uninitialized",M[M.Idle=1]="Idle"})(l||(l={}));class m{constructor(F){this.buffer=F,this.pos=0}read(F){const z=this.buffer.slice(this.pos,this.pos+F);return this.pos+=z.byteLength,z}}class E{constructor(){this.buffers=[]}get buffer(){return I.VSBuffer.concat(this.buffers)}write(F){this.buffers.push(F)}}var u;(function(M){M[M.Undefined=0]="Undefined",M[M.String=1]="String",M[M.Buffer=2]="Buffer",M[M.VSBuffer=3]="VSBuffer",M[M.Array=4]="Array",M[M.Object=5]="Object"})(u||(u={}));function s(M){const F=I.VSBuffer.alloc(4);return F.writeUInt32BE(M,0),F}function t(M){return M.read(4).readUInt32BE(0)}function n(M){const F=I.VSBuffer.alloc(1);return F.writeUInt8(M,0),F}const i={Undefined:n(u.Undefined),String:n(u.String),Buffer:n(u.Buffer),VSBuffer:n(u.VSBuffer),Array:n(u.Array),Object:n(u.Object)},r=typeof Buffer<"u";function o(M,F){if(typeof F>"u")M.write(i.Undefined);else if(typeof F=="string"){const z=I.VSBuffer.fromString(F);M.write(i.String),M.write(s(z.byteLength)),M.write(z)}else if(r&&Buffer.isBuffer(F)){const z=I.VSBuffer.wrap(F);M.write(i.Buffer),M.write(s(z.byteLength)),M.write(z)}else if(F instanceof I.VSBuffer)M.write(i.VSBuffer),M.write(s(F.byteLength)),M.write(F);else if(Array.isArray(F)){M.write(i.Array),M.write(s(F.length));for(const z of F)o(M,z)}else{const z=I.VSBuffer.fromString(JSON.stringify(F));M.write(i.Object),M.write(s(z.byteLength)),M.write(z)}}function c(M){switch(M.read(1).readUInt8(0)){case u.Undefined:return;case u.String:return M.read(t(M)).toString();case u.Buffer:return M.read(t(M)).buffer;case u.VSBuffer:return M.read(t(M));case u.Array:{const z=t(M),$=[];for(let Y=0;Ythis.onRawMessage(A)),this.sendResponse({type:200})}registerChannel(F,z){this.channels.set(F,z),setTimeout(()=>this.flushPendingRequests(F),0)}sendResponse(F){switch(F.type){case 200:{const z=this.send([F.type]);this.logger?.logOutgoing(z,0,1,y(F.type));return}case 201:case 202:case 204:case 203:{const z=this.send([F.type,F.id],F.data);this.logger?.logOutgoing(z,F.id,1,y(F.type),F.data);return}}}send(F,z=void 0){const $=new E;return o($,F),o($,z),this.sendBuffer($.buffer)}sendBuffer(F){try{return this.protocol.send(F),F.byteLength}catch{return 0}}onRawMessage(F){const z=new m(F),$=c(z),Y=c(z),A=$[0];switch(A){case 100:return this.logger?.logIncoming(F.byteLength,$[1],1,`${p(A)}: ${$[2]}.${$[3]}`,Y),this.onPromise({type:A,id:$[1],channelName:$[2],name:$[3],arg:Y});case 102:return this.logger?.logIncoming(F.byteLength,$[1],1,`${p(A)}: ${$[2]}.${$[3]}`,Y),this.onEventListen({type:A,id:$[1],channelName:$[2],name:$[3],arg:Y});case 101:return this.logger?.logIncoming(F.byteLength,$[1],1,`${p(A)}`),this.disposeActiveRequest({type:A,id:$[1]});case 103:return this.logger?.logIncoming(F.byteLength,$[1],1,`${p(A)}`),this.disposeActiveRequest({type:A,id:$[1]})}}onPromise(F){const z=this.channels.get(F.channelName);if(!z){this.collectPendingRequest(F);return}const $=new k.CancellationTokenSource;let Y;try{Y=z.call(this.ctx,F.name,F.arg,$.token)}catch(L){Y=Promise.reject(L)}const A=F.id;Y.then(L=>{this.sendResponse({id:A,data:L,type:201}),this.activeRequests.delete(F.id)},L=>{L instanceof Error?this.sendResponse({id:A,data:{message:L.message,name:L.name,stack:L.stack?L.stack.split?L.stack.split(` `):L.stack:void 0},type:202}):this.sendResponse({id:A,data:L,type:203}),this.activeRequests.delete(F.id)});const V=(0,h.toDisposable)(()=>$.cancel());this.activeRequests.set(F.id,V)}onEventListen(F){const z=this.channels.get(F.channelName);if(!z){this.collectPendingRequest(F);return}const $=F.id,A=z.listen(this.ctx,F.name,F.arg)(V=>this.sendResponse({id:$,data:V,type:204}));this.activeRequests.set(F.id,A)}disposeActiveRequest(F){const z=this.activeRequests.get(F.id);z&&(z.dispose(),this.activeRequests.delete(F.id))}collectPendingRequest(F){let z=this.pendingRequests.get(F.channelName);z||(z=[],this.pendingRequests.set(F.channelName,z));const $=setTimeout(()=>{console.error(`Unknown channel: ${F.channelName}`),F.type===100&&this.sendResponse({id:F.id,data:{name:"Unknown channel",message:`Channel name '${F.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);z.push({request:F,timeoutTimer:$})}flushPendingRequests(F){const z=this.pendingRequests.get(F);if(z){for(const $ of z)switch(clearTimeout($.timeoutTimer),$.request.type){case 100:this.onPromise($.request);break;case 102:this.onEventListen($.request);break}this.pendingRequests.delete(F)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,h.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=a;var f;(function(M){M[M.LocalSide=0]="LocalSide",M[M.OtherSide=1]="OtherSide"})(f=e.RequestInitiator||(e.RequestInitiator={}));class D{constructor(F,z=null){this.protocol=F,this.isDisposed=!1,this.state=l.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new d.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage($=>this.onBuffer($)),this.logger=z}getChannel(F){const z=this;return{call($,Y,A){return z.isDisposed?Promise.reject(new v.CancellationError):z.requestPromise(F,$,Y,A)},listen($,Y){return z.isDisposed?d.Event.None:z.requestEvent(F,$,Y)}}}requestPromise(F,z,$,Y=k.CancellationToken.None){const A=this.lastRequestId++,L={id:A,type:100,channelName:F,name:z,arg:$};if(Y.isCancellationRequested)return Promise.reject(new v.CancellationError);let T;return new Promise((W,q)=>{if(Y.isCancellationRequested)return q(new v.CancellationError);const H=()=>{const Se=le=>{switch(le.type){case 201:this.handlers.delete(A),W(le.data);break;case 202:{this.handlers.delete(A);const ie=new Error(le.data.message);ie.stack=Array.isArray(le.data.stack)?le.data.stack.join(` `):le.data.stack,ie.name=le.data.name,q(ie);break}case 203:this.handlers.delete(A),q(le.data);break}};this.handlers.set(A,Se),this.sendRequest(L)};let oe=null;this.state===l.Idle?H():(oe=(0,R.createCancelablePromise)(Se=>this.whenInitialized()),oe.then(()=>{oe=null,H()}));const ue=()=>{oe?(oe.cancel(),oe=null):this.sendRequest({id:A,type:101}),q(new v.CancellationError)},ve=Y.onCancellationRequested(ue);T=(0,h.combinedDisposable)((0,h.toDisposable)(ue),ve),this.activeRequests.add(T)}).finally(()=>{this.activeRequests.delete(T)})}requestEvent(F,z,$){const Y=this.lastRequestId++,V={id:Y,type:102,channelName:F,name:z,arg:$};let L=null;const T=new d.Emitter({onFirstListenerAdd:()=>{L=(0,R.createCancelablePromise)(W=>this.whenInitialized()),L.then(()=>{L=null,this.activeRequests.add(T),this.sendRequest(V)})},onLastListenerRemove:()=>{L?(L.cancel(),L=null):(this.activeRequests.delete(T),this.sendRequest({id:Y,type:103}))}}),U=W=>T.fire(W.data);return this.handlers.set(Y,U),T.event}sendRequest(F){switch(F.type){case 100:case 102:{const z=this.send([F.type,F.id,F.channelName,F.name],F.arg);this.logger?.logOutgoing(z,F.id,0,`${p(F.type)}: ${F.channelName}.${F.name}`,F.arg);return}case 101:case 103:{const z=this.send([F.type,F.id]);this.logger?.logOutgoing(z,F.id,0,p(F.type));return}}}send(F,z=void 0){const $=new E;return o($,F),o($,z),this.sendBuffer($.buffer)}sendBuffer(F){try{return this.protocol.send(F),F.byteLength}catch{return 0}}onBuffer(F){const z=new m(F),$=c(z),Y=c(z),A=$[0];switch(A){case 200:return this.logger?.logIncoming(F.byteLength,0,0,y(A)),this.onResponse({type:$[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(F.byteLength,$[1],0,y(A),Y),this.onResponse({type:$[0],id:$[1],data:Y})}}onResponse(F){if(F.type===200){this.state=l.Idle,this._onDidInitialize.fire();return}this.handlers.get(F.id)?.(F)}get onDidInitializePromise(){return d.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===l.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,h.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}de([O.memoize],D.prototype,"onDidInitializePromise",null),e.ChannelClient=D;class N{get connections(){const F=[];return this._connections.forEach(z=>F.push(z)),F}constructor(F){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new d.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new d.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,F(({protocol:z,onDidClientDisconnect:$})=>{d.Event.once(z.onMessage)(A=>{const V=new m(A),L=c(V),T=new a(z,L),U=new D(z);this.channels.forEach((q,H)=>T.registerChannel(H,q));const W={channelServer:T,channelClient:U,ctx:L};this._connections.add(W),this._onDidAddConnection.fire(W),$(()=>{T.dispose(),U.dispose(),this._connections.delete(W),this._onDidRemoveConnection.fire(W)})})})}getChannel(F,z){const $=this;return{call(Y,A,V){let L;if((0,g.isFunction)(z)){const U=(0,C.getRandomElement)($.connections.filter(z));L=U?Promise.resolve(U):d.Event.toPromise(d.Event.filter($.onDidAddConnection,z))}else L=z.routeCall($,Y,A);const T=L.then(U=>U.channelClient.getChannel(F));return X(T).call(Y,A,V)},listen(Y,A){if((0,g.isFunction)(z))return $.getMulticastEvent(F,z,Y,A);const V=z.routeEvent($,Y,A).then(L=>L.channelClient.getChannel(F));return X(V).listen(Y,A)}}}getMulticastEvent(F,z,$,Y){const A=this;let V=new h.DisposableStore;const L=new d.Emitter({onFirstListenerAdd:()=>{V=new h.DisposableStore;const T=new d.EventMultiplexer,U=new Map,W=H=>{const ue=H.channelClient.getChannel(F).listen($,Y),ve=T.add(ue);U.set(H,ve)},q=H=>{const oe=U.get(H);!oe||(oe.dispose(),U.delete(H))};A.connections.filter(z).forEach(W),d.Event.filter(A.onDidAddConnection,z)(W,void 0,V),A.onDidRemoveConnection(q,void 0,V),T.event(L.fire,L,V),V.add(T)},onLastListenerRemove:()=>{V.dispose()}});return L.event}registerChannel(F,z){this.channels.set(F,z),this._connections.forEach($=>{$.channelServer.registerChannel(F,z)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=N;class B{constructor(F,z,$=null){const Y=new E;o(Y,z),F.send(Y.buffer),this.channelClient=new D(F,$),this.channelServer=new a(F,z,$)}getChannel(F){return this.channelClient.getChannel(F)}registerChannel(F,z){this.channelServer.registerChannel(F,z)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=B;function X(M){return{call(F,z,$){return M.then(Y=>Y.call(F,z,$))},listen(F,z){const $=new d.Relay;return M.then(Y=>$.input=Y.listen(F,z)),$.event}}}e.getDelayedChannel=X;function J(M){let F=!1;return{call(z,$,Y){return F?M.call(z,$,Y):(0,R.timeout)(0).then(()=>F=!0).then(()=>M.call(z,$,Y))},listen(z,$){if(F)return M.listen(z,$);const Y=new d.Relay;return(0,R.timeout)(0).then(()=>F=!0).then(()=>Y.input=M.listen(z,$)),Y.event}}}e.getNextTickChannel=J;class se{constructor(F){this.fn=F}routeCall(F){return this.route(F)}routeEvent(F){return this.route(F)}async route(F){for(const z of F.connections)if(await Promise.resolve(this.fn(z.ctx)))return Promise.resolve(z);return await d.Event.toPromise(F.onDidAddConnection),await this.route(F)}}e.StaticRouter=se;var ne;(function(M){function F(A,V){const L=A,T=V&&V.disableMarshalling,U=new Map;for(const W in L)$(W)&&U.set(W,d.Event.buffer(L[W],!0));return new class{listen(W,q,H){const oe=U.get(q);if(oe)return oe;if(Y(q)){const ue=L[q];if(typeof ue=="function")return ue.call(L,H)}throw new Error(`Event not found: ${q}`)}call(W,q,H){const oe=L[q];if(typeof oe=="function"){if(!T&&Array.isArray(H))for(let ue=0;ue{try{process.send?.(m.buffer.toString("base64"))}catch{}},onMessage:d.Event.fromNodeEventEmitter(process,"message",m=>I.VSBuffer.wrap(Buffer.from(m,"base64")))},l),process.once("disconnect",()=>this.dispose())}}e.Server=p;class P{constructor(l,m){this.modulePath=l,this.options=m,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new d.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const E=m&&m.timeout?m.timeout:6e4;this.disposeDelayer=new R.Delayer(E),this.child=null,this._client=null}getChannel(l){const m=this;return{call(E,u,s){return m.requestPromise(l,E,u,s)},listen(E,u){return m.requestEvent(l,E,u)}}}requestPromise(l,m,E,u=k.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(u.isCancellationRequested)return Promise.reject(v.canceled());this.disposeDelayer.cancel();const s=this.getCachedChannel(l),t=(0,R.createCancelablePromise)(r=>s.call(m,E,r)),n=u.onCancellationRequested(()=>t.cancel()),i=(0,h.toDisposable)(()=>t.cancel());return this.activeRequests.add(i),t.finally(()=>{n.dispose(),this.activeRequests.delete(i),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),t}requestEvent(l,m,E){if(!this.disposeDelayer)return d.Event.None;this.disposeDelayer.cancel();let u;const s=new d.Emitter({onFirstListenerAdd:()=>{u=this.getCachedChannel(l).listen(m,E)(s.fire,s),this.activeRequests.add(u)},onLastListenerRemove:()=>{this.activeRequests.delete(u),u.dispose(),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return s.event}get client(){if(!this._client){const l=this.options&&this.options.args?this.options.args:[],m=Object.create(null);m.env={...(0,w.deepClone)(process.env),VSCODE_PARENT_PID:String(process.pid)},this.options&&this.options.env&&(m.env={...m.env,...this.options.env}),this.options&&this.options.freshExecArgv&&(m.execArgv=[]),this.options&&typeof this.options.debug=="number"&&(m.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&typeof this.options.debugBrk=="number"&&(m.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),m.execArgv===void 0&&(m.execArgv=process.execArgv.filter(o=>!/^--inspect(-brk)?=/.test(o))),(0,g.removeDangerousEnvVariables)(m.env),this.child=(0,C.fork)(this.modulePath,l,m);const E=new d.Emitter;d.Event.fromNodeEventEmitter(this.child,"message",o=>o)(o=>{if((0,O.isRemoteConsoleLog)(o)){(0,O.log)(o,`IPC Library: ${this.options.serverName}`);return}E.fire(I.VSBuffer.wrap(Buffer.from(o,"base64")))});const s=this.options.useQueue?(0,b.createQueuedSender)(this.child):this.child,t=o=>this.child&&this.child.connected&&s.send(o.buffer.toString("base64")),n=E.event,i={send:t,onMessage:n};this._client=new S.ChannelClient(i);const r=()=>this.disposeClient();process.once("exit",r),this.child.on("error",o=>console.warn('IPC "'+this.options.serverName+'" errored with '+o)),this.child.on("exit",(o,c)=>{process.removeListener("exit",r),this.activeRequests.forEach(a=>(0,h.dispose)(a)),this.activeRequests.clear(),o!==0&&c!=="SIGTERM"&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+o+" and signal "+c),this.disposeDelayer?.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:o,signal:c})})}return this._client}getCachedChannel(l){let m=this.channels.get(l);return m||(m=this.client.getChannel(l),this.channels.set(l,m)),m}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer&&(this.disposeDelayer.cancel(),this.disposeDelayer=void 0),this.disposeClient(),this.activeRequests.clear()}}e.Client=P}),define(Q[80],Z([0,1,3,4,2,5]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.isStorageItemsChangeEvent=e.StorageHint=void 0;var O;(function(b){b[b.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST"})(O=e.StorageHint||(e.StorageHint={}));function v(b){const g=b;return g?.changed instanceof Map||g?.deleted instanceof Set}e.isStorageItemsChangeEvent=v;var d;(function(b){b[b.None=0]="None",b[b.Initialized=1]="Initialized",b[b.Closed=2]="Closed"})(d=e.StorageState||(e.StorageState={}));class h extends I.Disposable{constructor(g,S=Object.create(null)){super(),this.database=g,this.options=S,this._onDidChangeStorage=this._register(new R.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=d.None,this.cache=new Map,this.flushDelayer=new C.ThrottledDelayer(h.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(g=>this.onDidChangeItemsExternal(g)))}onDidChangeItemsExternal(g){g.changed?.forEach((S,p)=>this.accept(p,S)),g.deleted?.forEach(S=>this.accept(S,void 0))}accept(g,S){if(this.state===d.Closed)return;let p=!1;(0,k.isUndefinedOrNull)(S)?p=this.cache.delete(g):this.cache.get(g)!==S&&(this.cache.set(g,S),p=!0),p&&this._onDidChangeStorage.fire(g)}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===d.None&&(this.state=d.Initialized,this.options.hint!==O.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(g,S){const p=this.cache.get(g);return(0,k.isUndefinedOrNull)(p)?S:p}getBoolean(g,S){const p=this.get(g);return(0,k.isUndefinedOrNull)(p)?S:p==="true"}getNumber(g,S){const p=this.get(g);return(0,k.isUndefinedOrNull)(p)?S:parseInt(p,10)}async set(g,S){if(this.state===d.Closed)return;if((0,k.isUndefinedOrNull)(S))return this.delete(g);const p=String(S);if(this.cache.get(g)!==p)return this.cache.set(g,p),this.pendingInserts.set(g,p),this.pendingDeletes.delete(g),this._onDidChangeStorage.fire(g),this.doFlush()}async delete(g){if(!(this.state===d.Closed||!this.cache.delete(g)))return this.pendingDeletes.has(g)||this.pendingDeletes.add(g),this.pendingInserts.delete(g),this._onDidChangeStorage.fire(g),this.doFlush()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=d.Closed;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const g={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(g).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(g){if(!!this.hasPending)return this.doFlush(g)}async doFlush(g){return this.flushDelayer.trigger(()=>this.flushPending(),g)}async whenFlushed(){if(!!this.hasPending)return new Promise(g=>this.whenFlushedCallbacks.push(g))}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=h,h.DEFAULT_FLUSH_DELAY=100;class w{constructor(){this.onDidChangeItemsExternal=R.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(g){g.insert?.forEach((S,p)=>this.items.set(p,S)),g.delete?.forEach(S=>this.items.delete(S))}async close(){}}e.InMemoryStorageDatabase=w}),define(Q[81],Z([6,7]),function(_,e){return _.create("vs/base/node/zip",e)}),define(Q[82],Z([6,7]),function(_,e){return _.create("vs/platform/configuration/common/configurationRegistry",e)}),define(Q[83],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/common/abstractExtensionManagementService",e)}),define(Q[84],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(Q[85],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/common/extensionManagementCLI",e)}),define(Q[86],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/common/extensionNls",e)}),define(Q[87],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/common/extensionsScannerService",e)}),define(Q[88],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/node/extensionManagementService",e)}),define(Q[89],Z([6,7]),function(_,e){return _.create("vs/platform/extensionManagement/node/extensionManagementUtil",e)}),define(Q[90],Z([6,7]),function(_,e){return _.create("vs/platform/extensions/common/extensionValidator",e)}),define(Q[91],Z([6,7]),function(_,e){return _.create("vs/platform/files/common/fileService",e)}),define(Q[92],Z([6,7]),function(_,e){return _.create("vs/platform/files/common/io",e)}),define(Q[93],Z([6,7]),function(_,e){return _.create("vs/platform/files/node/diskFileSystemProvider",e)}),define(Q[94],Z([6,7]),function(_,e){return _.create("vs/platform/languagePacks/common/languagePacks",e)}),define(Q[95],Z([6,7]),function(_,e){return _.create("vs/platform/request/common/request",e)}),define(Q[96],Z([6,7]),function(_,e){return _.create("vs/platform/shell/node/shellEnv",e)}),define(Q[97],Z([6,7]),function(_,e){return _.create("vs/platform/telemetry/common/telemetryService",e)}),define(Q[98],Z([6,7]),function(_,e){return _.create("vs/platform/userDataProfile/common/userDataProfile",e)}),define(Q[99],Z([6,7]),function(_,e){return _.create("vs/platform/workspace/common/workspace",e)}),define(Q[100],Z([0,1,72,49,16,14,32,18,10]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parsePtyHostPort=e.parseSearchPort=e.parseExtensionHostPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class h{get appRoot(){return(0,k.dirname)(I.FileAccess.asFileUri("",_).fsPath)}get userHome(){return d.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return d.URI.file((0,k.join)(this.userDataPath,"User"))}get tmpDir(){return d.URI.file(this.paths.tmpDir)}get cacheHome(){return d.URI.file(this.userDataPath)}get stateResource(){return(0,v.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome}get userDataSyncHome(){return(0,v.joinPath)(this.userRoamingDataHome,"sync")}get logsPath(){if(!this.args.logsPath){const P=(0,C.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,k.join)(this.userDataPath,"logs",P)}return this.args.logsPath}get userDataSyncLogResource(){return d.URI.file((0,k.join)(this.logsPath,"userDataSync.log"))}get editSessionsLogResource(){return d.URI.file((0,k.join)(this.logsPath,"editSessions.log"))}get remoteTunnelLogResource(){return d.URI.file((0,k.join)(this.logsPath,"remoteTunnel.log"))}get sync(){return this.args.sync}get machineSettingsResource(){return(0,v.joinPath)(d.URI.file((0,k.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,v.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,v.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,v.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const P=O.env.VSCODE_PORTABLE;return P?d.URI.file((0,k.join)(P,"argv.json")):(0,v.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return d.URI.file((0,k.join)(this.userDataPath,"Workspaces"))}get installSourcePath(){return(0,k.join)(this.userDataPath,"installSource")}get builtinExtensionsPath(){const P=this.args["builtin-extensions-dir"];return P?(0,k.resolve)(P):(0,k.normalize)((0,k.join)(I.FileAccess.asFileUri("",_).fsPath,"..","extensions"))}get extensionsDownloadLocation(){const P=this.args["extensions-download-dir"];return P?d.URI.file((0,k.resolve)(P)):d.URI.file((0,k.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const P=this.args["extensions-dir"];if(P)return(0,k.resolve)(P);const y=O.env.VSCODE_EXTENSIONS;if(y)return y;const l=O.env.VSCODE_PORTABLE;return l?(0,k.join)(l,"extensions"):(0,v.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const P=this.args.extensionDevelopmentPath;if(Array.isArray(P))return P.map(y=>/^[^:/?#]+?:\/\//.test(y)?d.URI.parse(y):d.URI.file((0,k.normalize)(y)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(P=>P==="ui"||P==="workspace"||P==="web"?P:"workspace")}get extensionTestsLocationURI(){const P=this.args.extensionTestsPath;if(P)return/^[^:/?#]+?:\/\//.test(P)?d.URI.parse(P):d.URI.file((0,k.normalize)(P))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const P=this.args["disable-extension"];if(P){if(typeof P=="string")return[P];if(Array.isArray(P)&&P.length>0)return P}return!1}get debugExtensionHost(){return w(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!O.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(P=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(P))}get extensionLogLevel(){const P=[];for(const y of this.args.log||[]){const l=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(y);l&&l[1]&&l[2]&&P.push([l[1],l[2]])}return P.length?P:void 0}get serviceMachineIdResource(){return(0,v.joinPath)(d.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get telemetryLogResource(){return d.URI.file((0,k.join)(this.logsPath,"telemetry.log"))}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get policyFile(){if(this.args["__enable-file-policy"]){const P=O.env.VSCODE_PORTABLE;return P?d.URI.file((0,k.join)(P,"policy.json")):(0,v.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(P){this.args.continueOn=P}get args(){return this._args}constructor(P,y,l){this._args=P,this.paths=y,this.productService=l,this.editSessionId=this.args.editSessionId}}de([R.memoize],h.prototype,"appRoot",null),de([R.memoize],h.prototype,"userHome",null),de([R.memoize],h.prototype,"userDataPath",null),de([R.memoize],h.prototype,"appSettingsHome",null),de([R.memoize],h.prototype,"tmpDir",null),de([R.memoize],h.prototype,"cacheHome",null),de([R.memoize],h.prototype,"stateResource",null),de([R.memoize],h.prototype,"userRoamingDataHome",null),de([R.memoize],h.prototype,"userDataSyncHome",null),de([R.memoize],h.prototype,"userDataSyncLogResource",null),de([R.memoize],h.prototype,"editSessionsLogResource",null),de([R.memoize],h.prototype,"remoteTunnelLogResource",null),de([R.memoize],h.prototype,"sync",null),de([R.memoize],h.prototype,"machineSettingsResource",null),de([R.memoize],h.prototype,"workspaceStorageHome",null),de([R.memoize],h.prototype,"localHistoryHome",null),de([R.memoize],h.prototype,"keyboardLayoutResource",null),de([R.memoize],h.prototype,"argvResource",null),de([R.memoize],h.prototype,"isExtensionDevelopment",null),de([R.memoize],h.prototype,"untitledWorkspacesHome",null),de([R.memoize],h.prototype,"installSourcePath",null),de([R.memoize],h.prototype,"builtinExtensionsPath",null),de([R.memoize],h.prototype,"extensionsPath",null),de([R.memoize],h.prototype,"extensionDevelopmentLocationURI",null),de([R.memoize],h.prototype,"extensionDevelopmentKind",null),de([R.memoize],h.prototype,"extensionTestsLocationURI",null),de([R.memoize],h.prototype,"debugExtensionHost",null),de([R.memoize],h.prototype,"logLevel",null),de([R.memoize],h.prototype,"extensionLogLevel",null),de([R.memoize],h.prototype,"serviceMachineIdResource",null),de([R.memoize],h.prototype,"telemetryLogResource",null),de([R.memoize],h.prototype,"disableWorkspaceTrust",null),de([R.memoize],h.prototype,"policyFile",null),e.AbstractNativeEnvironmentService=h;function w(p,P){return S(p["inspect-extensions"],p["inspect-brk-extensions"],5870,P,p.debugId,p.extensionEnvironment)}e.parseExtensionHostPort=w;function b(p,P){return S(p["inspect-search"],p["inspect-brk-search"],5876,P,p.extensionEnvironment)}e.parseSearchPort=b;function g(p,P){return S(p["inspect-ptyhost"],p["inspect-brk-ptyhost"],5877,P,p.extensionEnvironment)}e.parsePtyHostPort=g;function S(p,P,y,l,m,E){const s=Number(P||p)||(l?null:y),t=s?Boolean(!!P):!1;let n;if(E)try{n=JSON.parse(E)}catch{}return{port:s,break:t,debugId:m,env:n}}}),function(){"use strict";function _(e,C,R){function I(O,v){const d=k(O,v),h=[d];return e.isAbsolute(d)||h.unshift(R),e.resolve(...h)}function k(O,v){process.env.VSCODE_DEV&&(v="code-oss-dev");const d=process.env.VSCODE_PORTABLE;if(d)return e.join(d,"user-data");let h=process.env.VSCODE_APPDATA;if(h)return e.join(h,v);const w=O["user-data-dir"];if(w)return w;switch(process.platform){case"win32":if(h=process.env.APPDATA,!h){const b=process.env.USERPROFILE;if(typeof b!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");h=e.join(b,"AppData","Roaming")}break;case"darwin":h=e.join(C.homedir(),"Library","Application Support");break;case"linux":h=process.env.XDG_CONFIG_HOME||e.join(C.homedir(),".config");break;default:throw new Error("Platform not supported")}return e.join(h,v)}return{getUserDataPath:I}}if(typeof define=="function")define(Q[101],Z([151,37,32]),function(e,C,R){return _(e,C,R.cwd())});else if(typeof module=="object"&&typeof module.exports=="object"){const e=require("path"),C=require("os");module.exports=_(e,C,process.env.VSCODE_CWD||process.cwd())}else throw new Error("Unknown context")}(),define(Q[102],Z([0,1,37,100,101]),function(_,e,C,R,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeEnvironmentService=void 0;class k extends R.AbstractNativeEnvironmentService{constructor(v,d){super(v,{homeDir:(0,C.homedir)(),tmpDir:(0,C.tmpdir)(),userDataDir:(0,I.getUserDataPath)(v,d.nameShort)},d)}}e.NativeEnvironmentService=k}),define(Q[103],Z([0,1,5,86]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;function I(O,v,d){try{k(O,v,d)}catch{}return O}e.localizeManifest=I;function k(O,v,d){const h=(w,b,g)=>{const S=w[b];if((0,C.isString)(S)){const p=S,P=p.length;if(P>1&&p[0]==="%"&&p[P-1]==="%"){const y=p.substr(1,P-2);let l=v[y];l===void 0&&d&&(l=d[y]);const m=typeof l=="string"?l:l.message;if(m!==void 0){const E=d?.[y],u=typeof E=="string"?E:E?.message;if(g&&(b==="title"||b==="category")&&u&&u!==m){const s={value:m,original:u};w[b]=s}else w[b]=m}else console.warn(`[${O.name}]: ${(0,R.localize)(0,null,y)}`)}}else if((0,C.isObject)(S))for(const p in S)S.hasOwnProperty(p)&&(p==="commands"?h(S,p,!0):h(S,p,g));else if(Array.isArray(S))for(let p=0;p=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,v=/^-(\d{4})(\d{2})(\d{2})$/;function d(l){return l=l.trim(),l==="*"||O.test(l)}e.isValidVersionStr=d;function h(l){if(!d(l))return null;if(l=l.trim(),l==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const m=l.match(O);return m?{hasCaret:m[1]==="^",hasGreaterEquals:m[1]===">=",majorBase:m[2]==="x"?0:parseInt(m[2],10),majorMustEqual:m[2]!=="x",minorBase:m[4]==="x"?0:parseInt(m[4],10),minorMustEqual:m[4]!=="x",patchBase:m[6]==="x"?0:parseInt(m[6],10),patchMustEqual:m[6]!=="x",preRelease:m[8]||null}:null}e.parseVersion=h;function w(l){if(!l)return null;const m=l.majorBase,E=l.majorMustEqual,u=l.minorBase;let s=l.minorMustEqual;const t=l.patchBase;let n=l.patchMustEqual;l.hasCaret&&(m===0||(s=!1),n=!1);let i=0;if(l.preRelease){const r=v.exec(l.preRelease);if(r){const[,o,c,a]=r;i=Date.UTC(Number(o),Number(c)-1,Number(a))}}return{majorBase:m,majorMustEqual:E,minorBase:u,minorMustEqual:s,patchBase:t,patchMustEqual:n,isMinimum:l.hasGreaterEquals,notBefore:i}}e.normalizeVersion=w;function b(l,m,E){let u;typeof l=="string"?u=w(h(l)):u=l;let s;m instanceof Date?s=m.getTime():typeof m=="string"&&(s=new Date(m).getTime());let t;if(typeof E=="string"?t=w(h(E)):t=E,!u||!t)return!1;const n=u.majorBase,i=u.minorBase,r=u.patchBase;let o=t.majorBase,c=t.minorBase,a=t.patchBase;const f=t.notBefore;let D=t.majorMustEqual,N=t.minorMustEqual,B=t.patchMustEqual;return t.isMinimum?n>o?!0:nc?!0:i=a:(n===1&&o===0&&(!D||!N||!B)&&(o=1,c=0,a=0,D=!0,N=!1,B=!1),no?!D:ic?!N:ra?!B:!(s&&s"u"&&typeof u.browser>"u")return t.push([R.default.Error,I.localize(7,null,"activationEvents","main")]),t}if(typeof u.extensionKind<"u"&&typeof u.main>"u"&&t.push([R.default.Warning,I.localize(8,null,"extensionKind")]),typeof u.main<"u"){if(typeof u.main!="string")return t.push([R.default.Error,I.localize(9,null,"main")]),t;{const r=(0,C.joinPath)(E,u.main);(0,C.isEqualOrParent)(r,E)||t.push([R.default.Warning,I.localize(10,null,r.path,E.path)])}if(typeof u.activationEvents>"u")return t.push([R.default.Error,I.localize(11,null,"activationEvents","main")]),t}if(typeof u.browser<"u"){if(typeof u.browser!="string")return t.push([R.default.Error,I.localize(12,null,"browser")]),t;{const r=(0,C.joinPath)(E,u.browser);(0,C.isEqualOrParent)(r,E)||t.push([R.default.Warning,I.localize(13,null,r.path,E.path)])}if(typeof u.activationEvents>"u")return t.push([R.default.Error,I.localize(14,null,"activationEvents","browser")]),t}if(!k.valid(u.version))return t.push([R.default.Error,I.localize(15,null)]),t;const n=[];if(!S(l,m,u,s,n))for(const r of n)t.push([R.default.Error,r]);return t}e.validateExtensionManifest=g;function S(l,m,E,u,s){return u||typeof E.main>"u"&&typeof E.browser>"u"?!0:P(l,m,E.engines.vscode,s)}e.isValidExtensionVersion=S;function p(l,m,E){return l==="*"||P(m,E,l)}e.isEngineValid=p;function P(l,m,E,u=[]){const s=w(h(E));if(!s)return u.push(I.localize(16,null,E)),!1;if(s.majorBase===0){if(!s.majorMustEqual||!s.minorMustEqual)return u.push(I.localize(17,null,E)),!1}else if(!s.majorMustEqual)return u.push(I.localize(18,null,E)),!1;return b(l,m,s)?!0:(u.push(I.localize(19,null,l,E)),!1)}function y(l){if(!Array.isArray(l))return!1;for(let m=0,E=l.length;m incoming)[${[...v.incoming.keys()].join(", ")}] (outgoing ->)[${[...v.outgoing.keys()].join(",")}] `);return k.join(` `)}findCycleSlow(){for(const[k,O]of this._nodes){const v=new Set([k]),d=this._findCycle(O,v);if(d)return d}}_findCycle(k,O){for(const[v,d]of k.outgoing){if(O.has(v))return[...O,v].join(" -> ");O.add(v);const h=this._findCycle(d,O);if(h)return h;O.delete(v)}}}e.Graph=R}),define(Q[21],Z([0,1,5,10,8]),function(_,e,C,R,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.getMigratedSettingValue=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,I.createDecorator)("configurationService");function k(l){return l&&typeof l=="object"&&(!l.overrideIdentifier||typeof l.overrideIdentifier=="string")&&(!l.resource||l.resource instanceof R.URI)}e.isConfigurationOverrides=k;function O(l){return l&&typeof l=="object"&&(!l.overrideIdentifiers||Array.isArray(l.overrideIdentifiers))&&!l.overrideIdentifier&&(!l.resource||l.resource instanceof R.URI)}e.isConfigurationUpdateOverrides=O;var v;(function(l){l[l.APPLICATION=1]="APPLICATION",l[l.USER=2]="USER",l[l.USER_LOCAL=3]="USER_LOCAL",l[l.USER_REMOTE=4]="USER_REMOTE",l[l.WORKSPACE=5]="WORKSPACE",l[l.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",l[l.DEFAULT=7]="DEFAULT",l[l.MEMORY=8]="MEMORY"})(v=e.ConfigurationTarget||(e.ConfigurationTarget={}));function d(l){switch(l){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=d;function h(l,m){const E=Object.create(null);for(const u in l)w(E,u,l[u],m);return E}e.toValuesTree=h;function w(l,m,E,u){const s=m.split("."),t=s.pop();let n=l;for(let i=0;i"u"?E:t}e.getConfigurationValue=S;function p(l,m,E){Object.keys(m).forEach(u=>{u!=="__proto__"&&(u in l?C.isObject(l[u])&&C.isObject(m[u])?p(l[u],m[u],E):E&&(l[u]=m[u]):l[u]=m[u])})}e.merge=p;function P(l,m,E){const u=l.inspect(m),s=l.inspect(E);return typeof u.userValue<"u"||typeof u.workspaceValue<"u"||typeof u.workspaceFolderValue<"u"?u.value:typeof s.userValue<"u"||typeof s.workspaceValue<"u"||typeof s.workspaceFolderValue<"u"?s.value:u.defaultValue}e.getMigratedSettingValue=P;function y(l){return l.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=y}),define(Q[58],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDownloadService=void 0,e.IDownloadService=(0,C.createDecorator)("downloadService")}),define(Q[17],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,C.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,C.refineServiceDecorator)(e.IEnvironmentService)}),define(Q[22],Z([0,1,84,8]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesLocalizedLabel=e.PreferencesLabel=e.ExtensionsLocalizedLabel=e.ExtensionsLabel=e.IExtensionTipsService=e.IGlobalExtensionEnablementService=e.ENABLED_EXTENSIONS_STORAGE_PATH=e.DISABLED_EXTENSIONS_STORAGE_PATH=e.IExtensionManagementService=e.ExtensionManagementError=e.ExtensionManagementErrorCode=e.IExtensionGalleryService=e.InstallOperation=e.StatisticType=e.SortOrder=e.SortBy=e.isIExtensionIdentifier=e.getFallbackTargetPlarforms=e.isTargetPlatformCompatible=e.isNotWebExtensionInWebTargetPlatform=e.getTargetPlatform=e.toTargetPlatform=e.TargetPlatformToString=e.WEB_EXTENSION_TAG=e.EXTENSION_IDENTIFIER_REGEX=e.EXTENSION_IDENTIFIER_PATTERN=void 0,e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.EXTENSION_IDENTIFIER_REGEX=new RegExp(e.EXTENSION_IDENTIFIER_PATTERN),e.WEB_EXTENSION_TAG="__web_extension";function I(l){switch(l){case"win32-x64":return"Windows 64 bit";case"win32-ia32":return"Windows 32 bit";case"win32-arm64":return"Windows ARM";case"linux-x64":return"Linux 64 bit";case"linux-arm64":return"Linux ARM 64";case"linux-armhf":return"Linux ARM";case"alpine-x64":return"Alpine Linux 64 bit";case"alpine-arm64":return"Alpine ARM 64";case"darwin-x64":return"Mac";case"darwin-arm64":return"Mac Silicon";case"web":return"Web";case"universal":return"universal";case"unknown":return"unknown";case"undefined":return"undefined"}}e.TargetPlatformToString=I;function k(l){switch(l){case"win32-x64":return"win32-x64";case"win32-ia32":return"win32-ia32";case"win32-arm64":return"win32-arm64";case"linux-x64":return"linux-x64";case"linux-arm64":return"linux-arm64";case"linux-armhf":return"linux-armhf";case"alpine-x64":return"alpine-x64";case"alpine-arm64":return"alpine-arm64";case"darwin-x64":return"darwin-x64";case"darwin-arm64":return"darwin-arm64";case"web":return"web";case"universal":return"universal";default:return"unknown"}}e.toTargetPlatform=k;function O(l,m){switch(l){case 3:return m==="x64"?"win32-x64":m==="ia32"?"win32-ia32":m==="arm64"?"win32-arm64":"unknown";case 2:return m==="x64"?"linux-x64":m==="arm64"?"linux-arm64":m==="arm"?"linux-armhf":"unknown";case"alpine":return m==="x64"?"alpine-x64":m==="arm64"?"alpine-arm64":"unknown";case 1:return m==="x64"?"darwin-x64":m==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=O;function v(l,m){return m==="web"&&!l.includes("web")}e.isNotWebExtensionInWebTargetPlatform=v;function d(l,m,E){return v(m,E)?!1:l==="undefined"||l==="universal"?!0:l==="unknown"?!1:l===E?!0:h(E).includes(l)}e.isTargetPlatformCompatible=d;function h(l){switch(l){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=h;function w(l){return l&&typeof l=="object"&&typeof l.id=="string"&&(!l.uuid||typeof l.uuid=="string")}e.isIExtensionIdentifier=w;var b;(function(l){l[l.NoneOrRelevance=0]="NoneOrRelevance",l[l.LastUpdatedDate=1]="LastUpdatedDate",l[l.Title=2]="Title",l[l.PublisherName=3]="PublisherName",l[l.InstallCount=4]="InstallCount",l[l.PublishedDate=10]="PublishedDate",l[l.AverageRating=6]="AverageRating",l[l.WeightedRating=12]="WeightedRating"})(b=e.SortBy||(e.SortBy={}));var g;(function(l){l[l.Default=0]="Default",l[l.Ascending=1]="Ascending",l[l.Descending=2]="Descending"})(g=e.SortOrder||(e.SortOrder={}));var S;(function(l){l.Install="install",l.Uninstall="uninstall"})(S=e.StatisticType||(e.StatisticType={}));var p;(function(l){l[l.None=1]="None",l[l.Install=2]="Install",l[l.Update=3]="Update",l[l.Migrate=4]="Migrate"})(p=e.InstallOperation||(e.InstallOperation={})),e.IExtensionGalleryService=(0,R.createDecorator)("extensionGalleryService");var P;(function(l){l.Unsupported="Unsupported",l.Deprecated="Deprecated",l.Malicious="Malicious",l.Incompatible="Incompatible",l.IncompatiblePreRelease="IncompatiblePreRelease",l.IncompatibleTargetPlatform="IncompatibleTargetPlatform",l.ReleaseVersionNotFound="ReleaseVersionNotFound",l.Invalid="Invalid",l.Download="Download",l.Extract="Extract",l.Delete="Delete",l.Rename="Rename",l.CorruptZip="CorruptZip",l.IncompleteZip="IncompleteZip",l.Internal="Internal",l.Signature="Signature"})(P=e.ExtensionManagementErrorCode||(e.ExtensionManagementErrorCode={}));class y extends Error{constructor(m,E){super(m),this.code=E,this.name=E}}e.ExtensionManagementError=y,e.IExtensionManagementService=(0,R.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,R.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,R.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,C.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.PreferencesLabel=(0,C.localize)(1,null),e.PreferencesLocalizedLabel={value:e.PreferencesLabel,original:"Preferences"}}),define(Q[59],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionSignatureVerificationService=e.IExtensionSignatureVerificationService=void 0,e.IExtensionSignatureVerificationService=(0,C.createDecorator)("IExtensionSignatureVerificationService");class R{vsceSign(){return this.moduleLoadingPromise||(this.moduleLoadingPromise=new Promise((k,O)=>_(["node-vsce-sign"],async v=>k(v),O))),this.moduleLoadingPromise}async verify(k,O){let v;try{v=await this.vsceSign()}catch{return!1}return v.verify(k,O)}}e.ExtensionSignatureVerificationService=R}),define(Q[60],Z([0,1,15,11,92,13]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function O(w,b,g,S,p,P){let y;try{await v(w,b,g,S,p,P)}catch(l){y=l}finally{y&&p.errorTransformer&&(y=p.errorTransformer(y)),typeof y<"u"&&g.error(y),g.end()}}e.readFileIntoStream=O;async function v(w,b,g,S,p,P){d(P);const y=await w.open(b,{create:!1});try{d(P);let l=0,m=0,E=p&&typeof p.length=="number"?p.length:void 0,u=C.VSBuffer.alloc(Math.min(p.bufferSize,typeof E=="number"?E:p.bufferSize)),s=p&&typeof p.position=="number"?p.position:0,t=0;do m=await w.read(y,s,u.buffer,t,u.byteLength-t),s+=m,t+=m,l+=m,typeof E=="number"&&(E-=m),t===u.byteLength&&(await g.write(S(u)),u=C.VSBuffer.alloc(Math.min(p.bufferSize,typeof E=="number"?E:p.bufferSize)),t=0);while(m>0&&(typeof E!="number"||E>0)&&d(P)&&h(l,p));if(t>0){let n=t;typeof E=="number"&&(n=Math.min(t,E)),g.write(S(u.slice(0,n)))}}catch(l){throw(0,k.ensureFileSystemProviderError)(l)}finally{await w.close(y)}}function d(w){if(w.isCancellationRequested)throw(0,R.canceled)();return!0}function h(w,b){if(b?.limits){if(typeof b.limits.memory=="number"&&w>b.limits.memory)throw(0,k.createFileSystemProviderError)((0,I.localize)(0,null),k.FileSystemProviderErrorCode.FileExceedsMemoryLimit);if(typeof b.limits.size=="number"&&w>b.limits.size)throw(0,k.createFileSystemProviderError)((0,I.localize)(1,null),k.FileSystemProviderErrorCode.FileTooLarge)}return!0}}),define(Q[107],Z([0,1,4,152,2,12,153]),function(_,e,C,R,I,k,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcher=void 0;class v extends I.Disposable{constructor(){super(...arguments),this._onDidChangeFile=this._register(new C.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidLogMessage=this._register(new C.Emitter),this.onDidLogMessage=this._onDidLogMessage.event,this.onDidError=C.Event.None,this.watchers=new Map,this.verboseLogging=!1}async watch(h){const w=this.normalizeRequests(h),b=w.filter(S=>{const p=this.watchers.get(S.path);return p?!(0,R.patternsEquals)(p.request.excludes,S.excludes)||!(0,R.patternsEquals)(p.request.includes,S.includes):!0}),g=Array.from(this.watchers.values()).filter(({request:S})=>!w.find(p=>p.path===S.path&&(0,R.patternsEquals)(p.excludes,S.excludes)&&(0,R.patternsEquals)(p.includes,S.includes))).map(({request:S})=>S.path);b.length&&this.trace(`Request to start watching: ${b.map(S=>`${S.path} (excludes: ${S.excludes.length>0?S.excludes:""}, includes: ${S.includes&&S.includes.length>0?JSON.stringify(S.includes):""})`).join(",")}`),g.length&&this.trace(`Request to stop watching: ${g.join(",")}`);for(const S of g)this.stopWatching(S);for(const S of b)this.startWatching(S)}startWatching(h){const w=new O.NodeJSFileWatcherLibrary(h,g=>this._onDidChangeFile.fire(g),g=>this._onDidLogMessage.fire(g),this.verboseLogging),b={request:h,instance:w};this.watchers.set(h.path,b)}async stop(){for(const[h]of this.watchers)this.stopWatching(h);this.watchers.clear()}stopWatching(h){const w=this.watchers.get(h);w&&(this.watchers.delete(h),w.instance.dispose())}normalizeRequests(h){const w=new Map;for(const b of h){const g=k.isLinux?b.path:b.path.toLowerCase();w.set(g,b)}return Array.from(w.values())}async setVerboseLogging(h){this.verboseLogging=h;for(const[,w]of this.watchers)w.instance.setVerboseLogging(h)}trace(h){this.verboseLogging&&this._onDidLogMessage.fire({type:"trace",message:this.toMessage(h)})}toMessage(h,w){return w?`[File Watcher (node.js)] ${h} (path: ${w.request.path})`:`[File Watcher (node.js)] ${h}`}}e.NodeJSWatcher=v}),define(Q[108],Z([0,1,61,107]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcherClient=void 0;class I extends C.AbstractNonRecursiveWatcherClient{constructor(O,v,d){super(O,v,d),this.init()}createWatcher(){return new R.NodeJSWatcher}}e.NodeJSWatcherClient=I}),define(Q[109],Z([0,1,16,56,79,61]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class O extends k.AbstractUniversalWatcherClient{constructor(d,h,w){super(d,h,w),this.init()}createWatcher(d){const h=d.add(new I.Client(C.FileAccess.asFileUri("bootstrap-fork",_).fsPath,{serverName:"File Watcher",args:["--type=fileWatcher"],env:{VSCODE_AMD_ENTRYPOINT:"vs/platform/files/node/watcher/watcherMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true"}}));return d.add(h.onDidProcessExit(({code:w,signal:b})=>this.onError(`terminated by itself with code ${w}, signal: ${b}`))),R.ProxyChannel.toService((0,R.getNextTickChannel)(h.getChannel("watcher")))}}e.UniversalWatcherClient=O}),define(Q[62],Z([0,1]),function(_,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class C{constructor(...I){this._entries=new Map;for(const[k,O]of I)this.set(k,O)}set(I,k){const O=this._entries.get(I);return this._entries.set(I,k),O}has(I){return this._entries.has(I)}get(I){return this._entries.get(I)}}e.ServiceCollection=C}),define(Q[110],Z([0,1,3,11,2,46,106,8,62,154]),function(_,e,C,R,I,k,O,v,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const w=!1;class b extends Error{constructor(y){super("cyclic dependency between services"),this.message=y.findCycleSlow()??`UNABLE to detect cycle, dumping graph: ${y.toString()}`}}class g{constructor(y=new d.ServiceCollection,l=!1,m,E=w){this._services=y,this._strict=l,this._parent=m,this._enableTracing=E,this._activeInstantiations=new Set,this._services.set(v.IInstantiationService,this),this._globalGraph=E?m?._globalGraph??new O.Graph(u=>u):void 0}createChild(y){return new g(y,this._strict,this,this._enableTracing)}invokeFunction(y,...l){const m=p.traceInvocation(this._enableTracing,y);let E=!1;try{return y({get:s=>{if(E)throw(0,R.illegalState)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(s,m);if(!t)throw new Error(`[invokeFunction] unknown service '${s}'`);return t}},...l)}finally{E=!0,m.stop()}}createInstance(y,...l){let m,E;return y instanceof k.SyncDescriptor?(m=p.traceCreation(this._enableTracing,y.ctor),E=this._createInstance(y.ctor,y.staticArguments.concat(l),m)):(m=p.traceCreation(this._enableTracing,y),E=this._createInstance(y,l,m)),m.stop(),E}_createInstance(y,l=[],m){const E=v._util.getServiceDependencies(y).sort((t,n)=>t.index-n.index),u=[];for(const t of E){const n=this._getOrCreateServiceInstance(t.id,m);n||this._throwIfStrict(`[createInstance] ${y.name} depends on UNKNOWN service ${t.id}.`,!1),u.push(n)}const s=E.length>0?E[0].index:l.length;if(l.length!==s){console.trace(`[createInstance] First service dependency of ${y.name} at position ${s+1} conflicts with ${l.length} static arguments`);const t=s-l.length;t>0?l=l.concat(new Array(t)):l=l.slice(0,s)}return Reflect.construct(y,l.concat(u))}_setServiceInstance(y,l){if(this._services.get(y)instanceof k.SyncDescriptor)this._services.set(y,l);else if(this._parent)this._parent._setServiceInstance(y,l);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(y){const l=this._services.get(y);return!l&&this._parent?this._parent._getServiceInstanceOrDescriptor(y):l}_getOrCreateServiceInstance(y,l){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(y));const m=this._getServiceInstanceOrDescriptor(y);return m instanceof k.SyncDescriptor?this._safeCreateAndCacheServiceInstance(y,m,l.branch(y,!0)):(l.branch(y,!1),m)}_safeCreateAndCacheServiceInstance(y,l,m){if(this._activeInstantiations.has(y))throw new Error(`illegal state - RECURSIVELY instantiating service '${y}'`);this._activeInstantiations.add(y);try{return this._createAndCacheServiceInstance(y,l,m)}finally{this._activeInstantiations.delete(y)}}_createAndCacheServiceInstance(y,l,m){const E=new O.Graph(t=>t.id.toString());let u=0;const s=[{id:y,desc:l,_trace:m}];for(;s.length;){const t=s.pop();if(E.lookupOrInsertNode(t),u++>1e3)throw new b(E);for(const n of v._util.getServiceDependencies(t.desc.ctor)){const i=this._getServiceInstanceOrDescriptor(n.id);if(i||this._throwIfStrict(`[createInstance] ${y} depends on ${n.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(n.id)),i instanceof k.SyncDescriptor){const r={id:n.id,desc:i,_trace:t._trace.branch(n.id,!0)};E.insertEdge(t,r),s.push(r)}}}for(;;){const t=E.roots();if(t.length===0){if(!E.isEmpty())throw new b(E);break}for(const{data:n}of t){if(this._getServiceInstanceOrDescriptor(n.id)instanceof k.SyncDescriptor){const r=this._createServiceInstanceWithOwner(n.id,n.desc.ctor,n.desc.staticArguments,n.desc.supportsDelayedInstantiation,n._trace);this._setServiceInstance(n.id,r)}E.removeNode(n)}}return this._getServiceInstanceOrDescriptor(y)}_createServiceInstanceWithOwner(y,l,m=[],E,u){if(this._services.get(y)instanceof k.SyncDescriptor)return this._createServiceInstance(y,l,m,E,u);if(this._parent)return this._parent._createServiceInstanceWithOwner(y,l,m,E,u);throw new Error(`illegalState - creating UNKNOWN service instance ${l.name}`)}_createServiceInstance(y,l,m=[],E,u){if(E){const s=new g(void 0,this._strict,this,this._enableTracing);s._globalGraphImplicitDependency=String(y);const t=new Map,n=new C.IdleValue(()=>{const i=s._createInstance(l,m,u);for(const[r,o]of t){const c=i[r];if(typeof c=="function")for(const a of o)c.apply(i,a)}return t.clear(),i});return new Proxy(Object.create(null),{get(i,r){if(!n.isInitialized&&typeof r=="string"&&(r.startsWith("onDid")||r.startsWith("onWill"))){let a=t.get(r);return a||(a=new h.LinkedList,t.set(r,a)),(D,N,B)=>{const X=a.push([D,N,B]);return(0,I.toDisposable)(X)}}if(r in i)return i[r];const o=n.value;let c=o[r];return typeof c!="function"||(c=c.bind(o),i[r]=c),c},set(i,r,o){return n.value[r]=o,!0}})}else return this._createInstance(l,m,u)}_throwIfStrict(y,l){if(l&&console.warn(y),this._strict)throw new Error(y)}}e.InstantiationService=g;var S;(function(P){P[P.Creation=0]="Creation",P[P.Invocation=1]="Invocation",P[P.Branch=2]="Branch"})(S||(S={}));class p{static traceInvocation(y,l){return y?new p(1,l.name||new Error().stack.split(` `).slice(3,4).join(` `)):p._None}static traceCreation(y,l){return y?new p(0,l.name):p._None}constructor(y,l){this.type=y,this.name=l,this._start=Date.now(),this._dep=[]}branch(y,l){const m=new p(2,y.toString());return this._dep.push([y,l,m]),m}stop(){const y=Date.now()-this._start;p._totals+=y;let l=!1;function m(u,s){const t=[],n=new Array(u+1).join(" ");for(const[i,r,o]of s._dep)if(r&&o){l=!0,t.push(`${n}CREATES -> ${i}`);const c=m(u+1,o);c&&t.push(c)}else t.push(`${n}uses -> ${i}`);return t.join(` `)}const E=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${m(1,this)}`,`DONE, took ${y.toFixed(2)}ms (grand total ${p._totals.toFixed(2)}ms)`];(y>2||l)&&p.all.add(E.join(` `))}}e.Trace=p,p.all=new Set,p._None=new class extends p{constructor(){super(-1,null)}stop(){}branch(){return this}},p._totals=0});var ee=this&&this.__param||function(_,e){return function(C,R){e(C,R,_)}};define(Q[63],Z([0,1,24,2,12,94,22,8]),function(_,e,C,R,I,k,O,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagePackBaseService=e.ILanguagePackService=void 0,e.ILanguagePackService=(0,v.createDecorator)("languagePackService");let d=class extends R.Disposable{constructor(w){super(),this.extensionGalleryService=w}async getAvailableLanguages(){const w=new C.CancellationTokenSource;setTimeout(()=>w.cancel(),1e3);let b;try{b=await this.extensionGalleryService.query({text:'category:"language packs"',pageSize:20},w.token)}catch{return[]}const S=b.firstPage.filter(p=>p.properties.localizedLanguages?.length&&p.tags.some(P=>P.startsWith("lp-"))).map(p=>{const P=p.properties.localizedLanguages?.[0],y=this.getLocale(p);return{...this.createQuickPickItem(y,P,p),extensionId:p.identifier.id,galleryExtension:p}});return S.push({...this.createQuickPickItem("en","English"),extensionId:"default"}),S}getLocale(w){return w.tags.find(b=>b.startsWith("lp-"))?.split("lp-")[1]}createQuickPickItem(w,b,g){const S=b??w;let p;if(S!==w&&(p=`(${w})`),w.toLowerCase()===I.language.toLowerCase()&&(p??="",p+=(0,k.localize)(0,null)),g?.installCount){p??="";const P=g.installCount;let y;P>1e6?y=`${Math.floor(P/1e5)/10}M`:P>1e3?y=`${Math.floor(P/1e3)}K`:y=String(P),p+=` $(cloud-download) ${y}`}return{id:w,label:S,description:p}}};d=de([ee(0,O.IExtensionGalleryService)],d),e.LanguagePackBaseService=d}),define(Q[9],Z([0,1,31,4,2,39,12,10,8]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelToString=e.parseLogLevel=e.getLogLevel=e.NullLoggerService=e.NullLogService=e.NullLogger=e.AbstractLoggerService=e.LogService=e.MultiplexLogService=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.format=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,d.createDecorator)("logService"),e.ILoggerService=(0,d.createDecorator)("loggerService");function h(){return new Date().toISOString()}var w;(function(c){c[c.Trace=0]="Trace",c[c.Debug=1]="Debug",c[c.Info=2]="Info",c[c.Warning=3]="Warning",c[c.Error=4]="Error",c[c.Critical=5]="Critical",c[c.Off=6]="Off"})(w=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=w.Info;function b(c,a,f){switch(a){case w.Trace:c.trace(f);break;case w.Debug:c.debug(f);break;case w.Info:c.info(f);break;case w.Warning:c.warn(f);break;case w.Error:c.error(f);break;case w.Critical:c.critical(f);break;default:throw new Error("Invalid log level")}}e.log=b;function g(c){let a="";for(let f=0;f0?" ":"")+D}return a}e.format=g;class S extends I.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new R.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(a){this.level!==a&&(this.level=a,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=S;class p extends S{constructor(a){super(),this.logAlways=a}checkLogLevel(a){return this.logAlways||this.getLevel()<=a}trace(a,...f){this.checkLogLevel(w.Trace)&&this.log(w.Trace,g([a,...f]))}debug(a,...f){this.checkLogLevel(w.Debug)&&this.log(w.Debug,g([a,...f]))}info(a,...f){this.checkLogLevel(w.Info)&&this.log(w.Info,g([a,...f]))}warn(a,...f){this.checkLogLevel(w.Warning)&&this.log(w.Warning,g([a,...f]))}error(a,...f){if(this.checkLogLevel(w.Error))if(a instanceof Error){const D=Array.prototype.slice.call(arguments);D[0]=a.stack,this.log(w.Error,g(D))}else this.log(w.Error,g([a,...f]))}critical(a,...f){this.checkLogLevel(w.Critical)&&this.log(w.Critical,g([a,...f]))}flush(){}}e.AbstractMessageLogger=p;class P extends S{constructor(a=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(a),this.useColors=!O.isWindows}trace(a,...f){this.getLevel()<=w.Trace&&(this.useColors?console.log(`\x1B[90m[main ${h()}]\x1B[0m`,a,...f):console.log(`[main ${h()}]`,a,...f))}debug(a,...f){this.getLevel()<=w.Debug&&(this.useColors?console.log(`\x1B[90m[main ${h()}]\x1B[0m`,a,...f):console.log(`[main ${h()}]`,a,...f))}info(a,...f){this.getLevel()<=w.Info&&(this.useColors?console.log(`\x1B[90m[main ${h()}]\x1B[0m`,a,...f):console.log(`[main ${h()}]`,a,...f))}warn(a,...f){this.getLevel()<=w.Warning&&(this.useColors?console.warn(`\x1B[93m[main ${h()}]\x1B[0m`,a,...f):console.warn(`[main ${h()}]`,a,...f))}error(a,...f){this.getLevel()<=w.Error&&(this.useColors?console.error(`\x1B[91m[main ${h()}]\x1B[0m`,a,...f):console.error(`[main ${h()}]`,a,...f))}critical(a,...f){this.getLevel()<=w.Critical&&(this.useColors?console.error(`\x1B[90m[main ${h()}]\x1B[0m`,a,...f):console.error(`[main ${h()}]`,a,...f))}dispose(){}flush(){}}e.ConsoleMainLogger=P;class y extends S{constructor(a=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(a)}trace(a,...f){this.getLevel()<=w.Trace&&console.log("%cTRACE","color: #888",a,...f)}debug(a,...f){this.getLevel()<=w.Debug&&console.log("%cDEBUG","background: #eee; color: #888",a,...f)}info(a,...f){this.getLevel()<=w.Info&&console.log("%c INFO","color: #33f",a,...f)}warn(a,...f){this.getLevel()<=w.Warning&&console.log("%c WARN","color: #993",a,...f)}error(a,...f){this.getLevel()<=w.Error&&console.log("%c ERR","color: #f33",a,...f)}critical(a,...f){this.getLevel()<=w.Critical&&console.log("%cCRITI","background: #f33; color: white",a,...f)}dispose(){}flush(){}}e.ConsoleLogger=y;class l extends S{constructor(a,f=e.DEFAULT_LOG_LEVEL){super(),this.adapter=a,this.setLevel(f)}trace(a,...f){this.getLevel()<=w.Trace&&this.adapter.log(w.Trace,[this.extractMessage(a),...f])}debug(a,...f){this.getLevel()<=w.Debug&&this.adapter.log(w.Debug,[this.extractMessage(a),...f])}info(a,...f){this.getLevel()<=w.Info&&this.adapter.log(w.Info,[this.extractMessage(a),...f])}warn(a,...f){this.getLevel()<=w.Warning&&this.adapter.log(w.Warning,[this.extractMessage(a),...f])}error(a,...f){this.getLevel()<=w.Error&&this.adapter.log(w.Error,[this.extractMessage(a),...f])}critical(a,...f){this.getLevel()<=w.Critical&&this.adapter.log(w.Critical,[this.extractMessage(a),...f])}extractMessage(a){return typeof a=="string"?a:(0,C.toErrorMessage)(a,this.getLevel()<=w.Trace)}dispose(){}flush(){}}e.AdapterLogger=l;class m extends S{constructor(a){super(),this.logServices=a,a.length&&this.setLevel(a[0].getLevel())}setLevel(a){for(const f of this.logServices)f.setLevel(a);super.setLevel(a)}trace(a,...f){for(const D of this.logServices)D.trace(a,...f)}debug(a,...f){for(const D of this.logServices)D.debug(a,...f)}info(a,...f){for(const D of this.logServices)D.info(a,...f)}warn(a,...f){for(const D of this.logServices)D.warn(a,...f)}error(a,...f){for(const D of this.logServices)D.error(a,...f)}critical(a,...f){for(const D of this.logServices)D.critical(a,...f)}flush(){for(const a of this.logServices)a.flush()}dispose(){for(const a of this.logServices)a.dispose()}}e.MultiplexLogService=m;class E extends I.Disposable{constructor(a){super(),this.logger=a,this._register(a)}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(a){this.logger.setLevel(a)}getLevel(){return this.logger.getLevel()}trace(a,...f){this.logger.trace(a,...f)}debug(a,...f){this.logger.debug(a,...f)}info(a,...f){this.logger.info(a,...f)}warn(a,...f){this.logger.warn(a,...f)}error(a,...f){this.logger.error(a,...f)}critical(a,...f){this.logger.critical(a,...f)}flush(){this.logger.flush()}}e.LogService=E;class u extends I.Disposable{constructor(a,f){super(),this.logLevel=a,this.loggerItems=new k.ResourceMap,this._register(f(D=>this.setLevel(D)))}getLoggers(){return[...this.loggerItems.values()].map(({logger:a})=>a)}getLogger(a){return this.loggerItems.get(a)?.logger}createLogger(a,f,D){let N=this.loggerItems.get(a)?.logger;return N||(D=f?.always?w.Trace:D,N=this.doCreateLogger(a,D??this.logLevel,f),this.loggerItems.set(a,{logger:N,logLevel:D})),N}setLevel(a,f){const D=v.URI.isUri(a)?a:void 0,N=D?f:a;if(D){const B=this.loggerItems.get(D);B&&B.logLevel!==N&&(B.logLevel=N,B.logger.setLevel(N))}else this.logLevel=N,this.loggerItems.forEach(({logLevel:B,logger:X})=>{B===void 0&&X.setLevel(this.logLevel)})}getLogLevel(a){return this.loggerItems.get(a)?.logLevel}dispose(){this.loggerItems.forEach(({logger:a})=>a.dispose()),this.loggerItems.clear(),super.dispose()}}e.AbstractLoggerService=u;class s{constructor(){this.onDidChangeLogLevel=new R.Emitter().event}setLevel(a){}getLevel(){return w.Info}trace(a,...f){}debug(a,...f){}info(a,...f){}warn(a,...f){}error(a,...f){}critical(a,...f){}dispose(){}flush(){}}e.NullLogger=s;class t extends s{}e.NullLogService=t;class n extends u{constructor(){super(w.Info,R.Event.None)}doCreateLogger(a,f,D){return new s}}e.NullLoggerService=n;function i(c){if(c.verbose)return w.Trace;if(typeof c.logLevel=="string"){const a=r(c.logLevel.toLowerCase());if(a!==void 0)return a}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=i;function r(c){switch(c){case"trace":return w.Trace;case"debug":return w.Debug;case"info":return w.Info;case"warn":return w.Warning;case"error":return w.Error;case"critical":return w.Critical;case"off":return w.Off}}e.parseLogLevel=r;function o(c){switch(c){case w.Trace:return"trace";case w.Debug:return"debug";case w.Info:return"info";case w.Warning:return"warn";case w.Error:return"error";case w.Critical:return"critical";case w.Off:return"off"}}e.LogLevelToString=o}),define(Q[111],Z([0,1,19,3,11,4,2,14,61,9]),function(_,e,C,R,I,k,O,v,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class w extends O.Disposable{constructor(g,S){super(),this.logService=g,this.options=S,this._onDidChangeFile=this._register(new k.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidWatchError=this._register(new k.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.universalPathsToWatch=[],this.universalWatchRequestDelayer=this._register(new R.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new R.ThrottledDelayer(0))}watch(g,S){return S.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(g,S):this.watchNonRecursive(g,S)}watchUniversal(g,S){const p={path:this.toFilePath(g),excludes:S.excludes,includes:S.includes,recursive:S.recursive},P=(0,C.insert)(this.universalPathsToWatch,p);return this.refreshUniversalWatchers(),(0,O.toDisposable)(()=>{P(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(g=>(0,I.onUnexpectedError)(g))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(S=>this._onDidChangeFile.fire((0,d.toFileChanges)(S)),S=>this.onWatcherLogMessage(S),this.logService.getLevel()===h.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===h.LogLevel.Trace)})));const g=this.options?.watcher?.recursive?.usePolling;if(g===!0)for(const S of this.universalPathsToWatch)(0,d.isRecursiveWatchRequest)(S)&&(S.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(g))for(const S of this.universalPathsToWatch)(0,d.isRecursiveWatchRequest)(S)&&g.includes(S.path)&&(S.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(g,S){const p={path:this.toFilePath(g),excludes:S.excludes,includes:S.includes,recursive:!1},P=(0,C.insert)(this.nonRecursivePathsToWatch,p);return this.refreshNonRecursiveWatchers(),(0,O.toDisposable)(()=>{P(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(g=>(0,I.onUnexpectedError)(g))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(g=>this._onDidChangeFile.fire((0,d.toFileChanges)(g)),g=>this.onWatcherLogMessage(g),this.logService.getLevel()===h.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===h.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(g){g.type==="error"&&this._onDidWatchError.fire(g.message),this.logService[g.type](g.message)}toFilePath(g){return(0,v.normalize)(g.fsPath)}}e.AbstractDiskFileSystemProvider=w}),define(Q[112],Z([0,1,19,3,15,24,4,53,64,2,113,16,114,18,43,91,13,60,9]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let E=class extends h.Disposable{constructor(s){super(),this.logService=s,this.BUFFER_SIZE=256*1024,this._onDidChangeFileSystemProviderRegistrations=this._register(new O.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new O.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new O.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new O.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onDidFilesChange=this._register(new O.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this._onDidWatchError=this._register(new O.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new R.ResourceQueue)}registerProvider(s,t){if(this.provider.has(s))throw new Error(`A filesystem provider for the scheme '${s}' is already registered.`);(0,g.mark)(`code/registerFilesystem/${s}`);const n=new h.DisposableStore;return this.provider.set(s,t),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:s,provider:t}),n.add(t.onDidChangeFile(i=>this._onDidFilesChange.fire(new y.FileChangesEvent(i,!this.isPathCaseSensitive(t))))),typeof t.onDidWatchError=="function"&&n.add(t.onDidWatchError(i=>this._onDidWatchError.fire(new Error(i)))),n.add(t.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:t,scheme:s}))),(0,h.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:s,provider:t}),this.provider.delete(s),(0,h.dispose)(n)})}getProvider(s){return this.provider.get(s)}async activateProvider(s){const t=[];this._onWillActivateFileSystemProvider.fire({scheme:s,join(n){t.push(n)}}),!this.provider.has(s)&&await R.Promises.settled(t)}async canHandleResource(s){return await this.activateProvider(s.scheme),this.hasProvider(s)}hasProvider(s){return this.provider.has(s.scheme)}hasCapability(s,t){const n=this.provider.get(s.scheme);return!!(n&&n.capabilities&t)}listCapabilities(){return d.Iterable.map(this.provider,([s,t])=>({scheme:s,capabilities:t.capabilities}))}async withProvider(s){if(!(0,S.isAbsolutePath)(s))throw new y.FileOperationError((0,P.localize)(0,null,this.resourceForError(s)),8);await this.activateProvider(s.scheme);const t=this.provider.get(s.scheme);if(!t){const n=new Error;throw n.name="ENOPRO",n.message=(0,P.localize)(1,null,s.toString()),n}return t}async withReadProvider(s){const t=await this.withProvider(s);if((0,y.hasOpenReadWriteCloseCapability)(t)||(0,y.hasReadWriteCapability)(t)||(0,y.hasFileReadStreamCapability)(t))return t;throw new Error(`Filesystem provider for scheme '${s.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(s){const t=await this.withProvider(s);if((0,y.hasOpenReadWriteCloseCapability)(t)||(0,y.hasReadWriteCapability)(t))return t;throw new Error(`Filesystem provider for scheme '${s.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(s,t){try{return await this.doResolveFile(s,t)}catch(n){throw(0,y.toFileSystemProviderErrorCode)(n)===y.FileSystemProviderErrorCode.FileNotFound?new y.FileOperationError((0,P.localize)(2,null,this.resourceForError(s)),1):(0,y.ensureFileSystemProviderError)(n)}}async doResolveFile(s,t){const n=await this.withProvider(s),i=this.isPathCaseSensitive(n),r=t?.resolveTo,o=t?.resolveSingleChildDescendants,c=t?.resolveMetadata,a=await n.stat(s);let f;return this.toFileStat(n,s,a,void 0,!!c,(D,N)=>(f||(f=w.TernarySearchTree.forUris(()=>!i),f.set(s,!0),r&&f.fill(!0,r)),f.get(D.resource)||f.findSuperstr(D.resource.with({query:null,fragment:null}))?!0:D.isDirectory&&o?N===1:!1))}async toFileStat(s,t,n,i,r,o){const{providerExtUri:c}=this.getExtUri(s),a={resource:t,name:c.basename(t),isFile:(n.type&y.FileType.File)!==0,isDirectory:(n.type&y.FileType.Directory)!==0,isSymbolicLink:(n.type&y.FileType.SymbolicLink)!==0,mtime:n.mtime,ctime:n.ctime,size:n.size,readonly:Boolean((n.permissions??0)&y.FilePermission.Readonly)||Boolean(s.capabilities&2048),etag:(0,y.etag)({mtime:n.mtime,size:n.size}),children:void 0};if(a.isDirectory&&o(a,i)){try{const f=await s.readdir(t),D=await R.Promises.settled(f.map(async([N,B])=>{try{const X=c.joinPath(t,N),J=r?await s.stat(X):{type:B};return await this.toFileStat(s,X,J,f.length,r,o)}catch(X){return this.logService.trace(X),null}}));a.children=(0,C.coalesce)(D)}catch(f){this.logService.trace(f),a.children=[]}return a}return a}async resolveAll(s){return R.Promises.settled(s.map(async t=>{try{return{stat:await this.doResolveFile(t.resource,t.options),success:!0}}catch(n){return this.logService.trace(n),{stat:void 0,success:!1}}}))}async stat(s){const t=await this.withProvider(s),n=await t.stat(s);return this.toFileStat(t,s,n,void 0,!0,()=>!1)}async exists(s){const t=await this.withProvider(s);try{return!!await t.stat(s)}catch{return!1}}async canCreateFile(s,t){try{await this.doValidateCreateFile(s,t)}catch(n){return n}return!0}async doValidateCreateFile(s,t){if(!t?.overwrite&&await this.exists(s))throw new y.FileOperationError((0,P.localize)(3,null,this.resourceForError(s)),3,t)}async createFile(s,t=I.VSBuffer.fromString(""),n){await this.doValidateCreateFile(s,n);const i=await this.writeFile(s,t);return this._onDidRunOperation.fire(new y.FileOperationEvent(s,0,i)),i}async writeFile(s,t,n){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(s),s),{providerExtUri:r}=this.getExtUri(i);try{await this.validateWriteFile(i,s,n)||await this.mkdirp(i,r.dirname(s));let c;if((0,y.hasReadWriteCapability)(i)&&!(t instanceof I.VSBuffer))if((0,p.isReadableStream)(t)){const a=await(0,p.peekStream)(t,3);a.ended?c=I.VSBuffer.concat(a.buffer):c=a}else c=(0,p.peekReadable)(t,a=>I.VSBuffer.concat(a),3);else c=t;!(0,y.hasOpenReadWriteCloseCapability)(i)||(0,y.hasReadWriteCapability)(i)&&c instanceof I.VSBuffer?await this.doWriteUnbuffered(i,s,n,c):await this.doWriteBuffered(i,s,n,c instanceof I.VSBuffer?(0,I.bufferToReadable)(c):c),this._onDidRunOperation.fire(new y.FileOperationEvent(s,4))}catch(o){throw new y.FileOperationError((0,P.localize)(4,null,this.resourceForError(s),(0,y.ensureFileSystemProviderError)(o).toString()),(0,y.toFileOperationResult)(o),n)}return this.resolve(s,{resolveMetadata:!0})}async validateWriteFile(s,t,n){if(!!n?.unlock&&!(s.capabilities&8192))throw new Error((0,P.localize)(5,null,this.resourceForError(t)));let r;try{r=await s.stat(t)}catch{return}if((r.type&y.FileType.Directory)!==0)throw new y.FileOperationError((0,P.localize)(6,null,this.resourceForError(t)),0,n);if(this.throwIfFileIsReadonly(t,r),typeof n?.mtime=="number"&&typeof n.etag=="string"&&n.etag!==y.ETAG_DISABLED&&typeof r.mtime=="number"&&typeof r.size=="number"&&n.mtime{this.writeQueue.queueFor(t,this.getExtUri(s).providerExtUri).queue(async()=>{try{const c=await this.doReadFile(s,t,n,i);r(c)}catch(c){o(c)}})})}async doReadFile(s,t,n,i){const r=await this.doReadFileStream(s,t,{...n,preferUnbuffered:!0},i);return{...r,value:await(0,I.streamToBuffer)(r.value)}}async readFileStream(s,t,n){const i=await this.withReadProvider(s);return this.doReadFileStream(i,s,t,n)}async doReadFileStream(s,t,n,i){const r=new k.CancellationTokenSource(i),o=this.validateReadFile(t,n).then(a=>a,a=>{throw r.cancel(),a});let c;try{return typeof n?.etag=="string"&&n.etag!==y.ETAG_DISABLED&&await o,n?.atomic&&(0,y.hasFileAtomicReadCapability)(s)||!((0,y.hasOpenReadWriteCloseCapability)(s)||(0,y.hasFileReadStreamCapability)(s))||(0,y.hasReadWriteCapability)(s)&&n?.preferUnbuffered?c=this.readFileUnbuffered(s,t,n):(0,y.hasFileReadStreamCapability)(s)?c=this.readFileStreamed(s,t,r.token,n):c=this.readFileBuffered(s,t,r.token,n),{...await o,value:c}}catch(a){c&&await(0,p.consumeStream)(c);const f=(0,P.localize)(8,null,this.resourceForError(t),(0,y.ensureFileSystemProviderError)(a).toString());throw a instanceof y.NotModifiedSinceFileOperationError?new y.NotModifiedSinceFileOperationError(f,a.stat,n):new y.FileOperationError(f,(0,y.toFileOperationResult)(a),n)}}readFileStreamed(s,t,n,i=Object.create(null)){const r=s.readFileStream(t,i,n);return(0,p.transform)(r,{data:o=>o instanceof I.VSBuffer?o:I.VSBuffer.wrap(o),error:o=>new y.FileOperationError((0,P.localize)(9,null,this.resourceForError(t),(0,y.ensureFileSystemProviderError)(o).toString()),(0,y.toFileOperationResult)(o),i)},o=>I.VSBuffer.concat(o))}readFileBuffered(s,t,n,i=Object.create(null)){const r=(0,I.newWriteableBufferStream)();return(0,l.readFileIntoStream)(s,t,r,o=>o,{...i,bufferSize:this.BUFFER_SIZE,errorTransformer:o=>new y.FileOperationError((0,P.localize)(10,null,this.resourceForError(t),(0,y.ensureFileSystemProviderError)(o).toString()),(0,y.toFileOperationResult)(o),i)},n),r}readFileUnbuffered(s,t,n){const i=(0,p.newWriteableStream)(r=>I.VSBuffer.concat(r));return(async()=>{try{let r;n?.atomic&&(0,y.hasFileAtomicReadCapability)(s)?r=await s.readFile(t,{atomic:!0}):r=await s.readFile(t),typeof n?.position=="number"&&(r=r.slice(n.position)),typeof n?.length=="number"&&(r=r.slice(0,n.length)),this.validateReadFileLimits(t,r.byteLength,n),i.end(I.VSBuffer.wrap(r))}catch(r){i.error(r),i.end()}})(),i}async validateReadFile(s,t){const n=await this.resolve(s,{resolveMetadata:!0});if(n.isDirectory)throw new y.FileOperationError((0,P.localize)(11,null,this.resourceForError(s)),0,t);if(typeof t?.etag=="string"&&t.etag!==y.ETAG_DISABLED&&t.etag===n.etag)throw new y.NotModifiedSinceFileOperationError((0,P.localize)(12,null),n,t);return this.validateReadFileLimits(s,n.size,t),n}validateReadFileLimits(s,t,n){if(n?.limits){let i;if(typeof n.limits.memory=="number"&&t>n.limits.memory&&(i=9),typeof n.limits.size=="number"&&t>n.limits.size&&(i=7),typeof i=="number")throw new y.FileOperationError((0,P.localize)(13,null,this.resourceForError(s)),i)}}async canMove(s,t,n){return this.doCanMoveCopy(s,t,"move",n)}async canCopy(s,t,n){return this.doCanMoveCopy(s,t,"copy",n)}async doCanMoveCopy(s,t,n,i){if(s.toString()!==t.toString())try{const r=n==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(s),s):await this.withReadProvider(s),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);await this.doValidateMoveCopy(r,s,o,t,n,i)}catch(r){return r}return!0}async move(s,t,n){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(s),s),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),o=await this.doMoveCopy(i,s,r,t,"move",!!n),c=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new y.FileOperationEvent(s,o==="move"?2:3,c)),c}async copy(s,t,n){const i=await this.withReadProvider(s),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),o=await this.doMoveCopy(i,s,r,t,"copy",!!n),c=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new y.FileOperationEvent(s,o==="copy"?3:2,c)),c}async doMoveCopy(s,t,n,i,r,o){if(t.toString()===i.toString())return r;const{exists:c,isSameResourceWithDifferentPathCase:a}=await this.doValidateMoveCopy(s,t,n,i,r,o);if(c&&!a&&o&&await this.del(i,{recursive:!0}),await this.mkdirp(n,this.getExtUri(n).providerExtUri.dirname(i)),r==="copy"){if(s===n&&(0,y.hasFileFolderCopyCapability)(s))await s.copy(t,i,{overwrite:o});else{const f=await this.resolve(t);f.isDirectory?await this.doCopyFolder(s,f,n,i):await this.doCopyFile(s,t,n,i)}return r}else return s===n?(await s.rename(t,i,{overwrite:o}),r):(await this.doMoveCopy(s,t,n,i,"copy",o),await this.del(t,{recursive:!0}),"copy")}async doCopyFile(s,t,n,i){if((0,y.hasOpenReadWriteCloseCapability)(s)&&(0,y.hasOpenReadWriteCloseCapability)(n))return this.doPipeBuffered(s,t,n,i);if((0,y.hasOpenReadWriteCloseCapability)(s)&&(0,y.hasReadWriteCapability)(n))return this.doPipeBufferedToUnbuffered(s,t,n,i);if((0,y.hasReadWriteCapability)(s)&&(0,y.hasOpenReadWriteCloseCapability)(n))return this.doPipeUnbufferedToBuffered(s,t,n,i);if((0,y.hasReadWriteCapability)(s)&&(0,y.hasReadWriteCapability)(n))return this.doPipeUnbuffered(s,t,n,i)}async doCopyFolder(s,t,n,i){await n.mkdir(i),Array.isArray(t.children)&&await R.Promises.settled(t.children.map(async r=>{const o=this.getExtUri(n).providerExtUri.joinPath(i,r.name);return r.isDirectory?this.doCopyFolder(s,await this.resolve(r.resource),n,o):this.doCopyFile(s,r.resource,n,o)}))}async doValidateMoveCopy(s,t,n,i,r,o){let c=!1;if(s===n){const{providerExtUri:f,isPathCaseSensitive:D}=this.getExtUri(s);if(D||(c=f.isEqual(t,i)),c&&r==="copy")throw new Error((0,P.localize)(14,null,this.resourceForError(t),this.resourceForError(i)));if(!c&&f.isEqualOrParent(i,t))throw new Error((0,P.localize)(15,null,this.resourceForError(t),this.resourceForError(i)))}const a=await this.exists(i);if(a&&!c){if(!o)throw new y.FileOperationError((0,P.localize)(16,null,this.resourceForError(t),this.resourceForError(i)),4);if(s===n){const{providerExtUri:f}=this.getExtUri(s);if(f.isEqualOrParent(t,i))throw new Error((0,P.localize)(17,null,this.resourceForError(t),this.resourceForError(i)))}}return{exists:a,isSameResourceWithDifferentPathCase:c}}getExtUri(s){const t=this.isPathCaseSensitive(s);return{providerExtUri:t?S.extUri:S.extUriIgnorePathCase,isPathCaseSensitive:t}}isPathCaseSensitive(s){return!!(s.capabilities&1024)}async createFolder(s){const t=this.throwIfFileSystemIsReadonly(await this.withProvider(s),s);await this.mkdirp(t,s);const n=await this.resolve(s,{resolveMetadata:!0});return this._onDidRunOperation.fire(new y.FileOperationEvent(s,0,n)),n}async mkdirp(s,t){const n=[],{providerExtUri:i}=this.getExtUri(s);for(;!i.isEqual(t,i.dirname(t));)try{if(((await s.stat(t)).type&y.FileType.Directory)===0)throw new Error((0,P.localize)(18,null,this.resourceForError(t)));break}catch(r){if((0,y.toFileSystemProviderErrorCode)(r)!==y.FileSystemProviderErrorCode.FileNotFound)throw r;n.push(i.basename(t)),t=i.dirname(t)}for(let r=n.length-1;r>=0;r--){t=i.joinPath(t,n[r]);try{await s.mkdir(t)}catch(o){if((0,y.toFileSystemProviderErrorCode)(o)!==y.FileSystemProviderErrorCode.FileExists)throw o}}}async canDelete(s,t){try{await this.doValidateDelete(s,t)}catch(n){return n}return!0}async doValidateDelete(s,t){const n=this.throwIfFileSystemIsReadonly(await this.withProvider(s),s);if(!!t?.useTrash&&!(n.capabilities&4096))throw new Error((0,P.localize)(19,null,this.resourceForError(s)));let r;try{r=await n.stat(s)}catch{}if(r)this.throwIfFileIsReadonly(s,r);else throw new y.FileOperationError((0,P.localize)(20,null,this.resourceForError(s)),1);if(!!!t?.recursive){const c=await this.resolve(s);if(c.isDirectory&&Array.isArray(c.children)&&c.children.length>0)throw new Error((0,P.localize)(21,null,this.resourceForError(s)))}return n}async del(s,t){const n=await this.doValidateDelete(s,t),i=!!t?.useTrash,r=!!t?.recursive;await n.delete(s,{recursive:r,useTrash:i}),this._onDidRunOperation.fire(new y.FileOperationEvent(s,1))}async cloneFile(s,t){const n=await this.withProvider(s),i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t);if(n===i&&this.getExtUri(n).providerExtUri.isEqual(s,t))return;if(n===i&&(0,y.hasFileCloneCapability)(n))return n.cloneFile(s,t);await this.mkdirp(i,this.getExtUri(i).providerExtUri.dirname(t));const r=this.writeQueue.queueFor(s,this.getExtUri(n).providerExtUri);return n===i&&(0,y.hasFileFolderCopyCapability)(n)?r.queue(()=>n.copy(s,t,{overwrite:!0})):r.queue(()=>this.doCopyFile(n,s,i,t))}watch(s,t={recursive:!1,excludes:[]}){const n=new h.DisposableStore;let i=!1,r=()=>{i=!0};return n.add((0,h.toDisposable)(()=>r())),(async()=>{try{const o=await this.doWatch(s,t);i?(0,h.dispose)(o):r=()=>(0,h.dispose)(o)}catch(o){this.logService.error(o)}})(),n}async doWatch(s,t){const n=await this.withProvider(s),i=(0,v.hash)([this.getExtUri(n).providerExtUri.getComparisonKey(s),t]);let r=this.activeWatchers.get(i);return r||(r={count:0,disposable:n.watch(s,t)},this.activeWatchers.set(i,r)),r.count+=1,(0,h.toDisposable)(()=>{r&&(r.count--,r.count===0&&((0,h.dispose)(r.disposable),this.activeWatchers.delete(i)))})}dispose(){super.dispose();for(const[,s]of this.activeWatchers)(0,h.dispose)(s.disposable);this.activeWatchers.clear()}async doWriteBuffered(s,t,n,i){return this.writeQueue.queueFor(t,this.getExtUri(s).providerExtUri).queue(async()=>{const r=await s.open(t,{create:!0,unlock:n?.unlock??!1});try{(0,p.isReadableStream)(i)||(0,p.isReadableBufferedStream)(i)?await this.doWriteStreamBufferedQueued(s,r,i):await this.doWriteReadableBufferedQueued(s,r,i)}catch(o){throw(0,y.ensureFileSystemProviderError)(o)}finally{await s.close(r)}})}async doWriteStreamBufferedQueued(s,t,n){let i=0,r;if((0,p.isReadableBufferedStream)(n)){if(n.buffer.length>0){const o=I.VSBuffer.concat(n.buffer);await this.doWriteBuffer(s,t,o,o.byteLength,i,0),i+=o.byteLength}if(n.ended)return;r=n.stream}else r=n;return new Promise((o,c)=>{(0,p.listenStream)(r,{onData:async a=>{r.pause();try{await this.doWriteBuffer(s,t,a,a.byteLength,i,0)}catch(f){return c(f)}i+=a.byteLength,setTimeout(()=>r.resume())},onError:a=>c(a),onEnd:()=>o()})})}async doWriteReadableBufferedQueued(s,t,n){let i=0,r;for(;(r=n.read())!==null;)await this.doWriteBuffer(s,t,r,r.byteLength,i,0),i+=r.byteLength}async doWriteBuffer(s,t,n,i,r,o){let c=0;for(;cthis.doWriteUnbufferedQueued(s,t,n,i))}async doWriteUnbufferedQueued(s,t,n,i){let r;i instanceof I.VSBuffer?r=i:(0,p.isReadableStream)(i)?r=await(0,I.streamToBuffer)(i):(0,p.isReadableBufferedStream)(i)?r=await(0,I.bufferedStreamToBuffer)(i):r=(0,I.readableToBuffer)(i),await s.writeFile(t,r.buffer,{create:!0,overwrite:!0,unlock:n?.unlock??!1})}async doPipeBuffered(s,t,n,i){return this.writeQueue.queueFor(i,this.getExtUri(n).providerExtUri).queue(()=>this.doPipeBufferedQueued(s,t,n,i))}async doPipeBufferedQueued(s,t,n,i){let r,o;try{r=await s.open(t,{create:!1}),o=await n.open(i,{create:!0,unlock:!1});const c=I.VSBuffer.alloc(this.BUFFER_SIZE);let a=0,f=0,D=0;do D=await s.read(r,a,c.buffer,f,c.byteLength-f),await this.doWriteBuffer(n,o,c,D,a,f),a+=D,f+=D,f===c.byteLength&&(f=0);while(D>0)}catch(c){throw(0,y.ensureFileSystemProviderError)(c)}finally{await R.Promises.settled([typeof r=="number"?s.close(r):Promise.resolve(),typeof o=="number"?n.close(o):Promise.resolve()])}}async doPipeUnbuffered(s,t,n,i){return this.writeQueue.queueFor(i,this.getExtUri(n).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(s,t,n,i))}async doPipeUnbufferedQueued(s,t,n,i){return n.writeFile(i,await s.readFile(t),{create:!0,overwrite:!0,unlock:!1})}async doPipeUnbufferedToBuffered(s,t,n,i){return this.writeQueue.queueFor(i,this.getExtUri(n).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(s,t,n,i))}async doPipeUnbufferedToBufferedQueued(s,t,n,i){const r=await n.open(i,{create:!0,unlock:!1});try{const o=await s.readFile(t);await this.doWriteBuffer(n,r,I.VSBuffer.wrap(o),o.byteLength,0,0)}catch(o){throw(0,y.ensureFileSystemProviderError)(o)}finally{await n.close(r)}}async doPipeBufferedToUnbuffered(s,t,n,i){const r=await(0,I.streamToBuffer)(this.readFileBuffered(s,t,k.CancellationToken.None));await this.doWriteUnbuffered(n,i,void 0,r)}throwIfFileSystemIsReadonly(s,t){if(s.capabilities&2048)throw new y.FileOperationError((0,P.localize)(22,null,this.resourceForError(t)),6);return s}throwIfFileIsReadonly(s,t){if((t.permissions??0)&y.FilePermission.Readonly)throw new y.FileOperationError((0,P.localize)(23,null,this.resourceForError(s)),6)}resourceForError(s){return s.scheme===b.Schemas.file?s.fsPath:s.toString(!0)}};E=de([ee(0,m.ILogService)],E),e.FileService=E}),define(Q[115],Z([0,1,116,155,3,39,15,4,156,2,14,12,18,43,20,93,13,60,111,31,109,108]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m,E,u,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0,(()=>{try{(0,R.gracefulify)(C)}catch(n){console.error(`Error enabling graceful-fs: ${(0,E.toErrorMessage)(n)}`)}})();class t extends m.AbstractDiskFileSystemProvider{constructor(i,r){super(i,r),this.onDidChangeCapabilities=v.Event.None,this.resourceLocks=new k.ResourceMap(o=>g.extUriBiasedIgnorePathCase.getComparisonKey(o)),this.mapHandleToPos=new Map,this.mapHandleToLock=new Map,this.writeHandles=new Map}get capabilities(){return this._capabilities||(this._capabilities=57374,b.isLinux&&(this._capabilities|=1024)),this._capabilities}async stat(i){try{const{stat:r,symbolicLink:o}=await p.SymlinkSupport.stat(this.toFilePath(i));return{type:this.toType(r,o),ctime:r.birthtime.getTime(),mtime:r.mtime.getTime(),size:r.size}}catch(r){throw this.toFileSystemProviderError(r)}}async readdir(i){try{const r=await p.Promises.readdir(this.toFilePath(i),{withFileTypes:!0}),o=[];return await Promise.all(r.map(async c=>{try{let a;c.isSymbolicLink()?a=(await this.stat((0,g.joinPath)(i,c.name))).type:a=this.toType(c),o.push([c.name,a])}catch(a){this.logService.trace(a)}})),o}catch(r){throw this.toFileSystemProviderError(r)}}toType(i,r){let o;return r?.dangling?o=y.FileType.Unknown:i.isFile()?o=y.FileType.File:i.isDirectory()?o=y.FileType.Directory:o=y.FileType.Unknown,r&&(o|=y.FileType.SymbolicLink),o}async createResourceLock(i){const r=this.toFilePath(i);this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - request to acquire resource lock (${r})`);let o;for(;o=this.resourceLocks.get(i);)this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - waiting for resource lock to be released (${r})`),await o.wait();const c=new I.Barrier;return this.resourceLocks.set(i,c),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - new resource lock created (${r})`),(0,h.toDisposable)(()=>{this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock dispose() (${r})`),this.resourceLocks.get(i)===c&&(this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock removed from resource-lock map (${r})`),this.resourceLocks.delete(i)),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock barrier open() (${r})`),c.open()})}async readFile(i,r){let o;try{r?.atomic&&(this.traceLock(`[Disk FileSystemProvider]: atomic read operation started (${this.toFilePath(i)})`),o=await this.createResourceLock(i));const c=this.toFilePath(i);return await p.Promises.readFile(c)}catch(c){throw this.toFileSystemProviderError(c)}finally{o?.dispose()}}traceLock(i){t.TRACE_LOG_RESOURCE_LOCKS&&this.logService.trace(i)}readFileStream(i,r,o){const c=(0,S.newWriteableStream)(a=>O.VSBuffer.concat(a.map(f=>O.VSBuffer.wrap(f))).buffer);return(0,l.readFileIntoStream)(this,i,c,a=>a.buffer,{...r,bufferSize:256*1024},o),c}async writeFile(i,r,o){let c;try{const a=this.toFilePath(i);if(!o.create||!o.overwrite){if(await p.Promises.exists(a)){if(!o.overwrite)throw(0,y.createFileSystemProviderError)((0,P.localize)(0,null),y.FileSystemProviderErrorCode.FileExists)}else if(!o.create)throw(0,y.createFileSystemProviderError)((0,P.localize)(1,null),y.FileSystemProviderErrorCode.FileNotFound)}c=await this.open(i,{create:!0,unlock:o.unlock}),await this.write(c,0,r,0,r.byteLength)}catch(a){throw await this.toFileSystemProviderWriteError(i,a)}finally{typeof c=="number"&&await this.close(c)}}static configureFlushOnWrite(i){t.canFlush=i}async open(i,r){const o=this.toFilePath(i);let c;(0,y.isFileOpenForWriteOptions)(r)&&(c=await this.createResourceLock(i));let a;try{if((0,y.isFileOpenForWriteOptions)(r)&&r.unlock)try{const{stat:D}=await p.SymlinkSupport.stat(o);D.mode&128||await p.Promises.chmod(o,D.mode|128)}catch(D){this.logService.trace(D)}let f;if((0,y.isFileOpenForWriteOptions)(r)){if(b.isWindows)try{await p.Promises.truncate(o,0),f="r+"}catch(D){D.code!=="ENOENT"&&this.logService.trace(D)}f||(f="w")}else f="r";a=await p.Promises.open(o,f)}catch(f){throw c?.dispose(),(0,y.isFileOpenForWriteOptions)(r)?await this.toFileSystemProviderWriteError(i,f):this.toFileSystemProviderError(f)}if(this.mapHandleToPos.set(a,0),(0,y.isFileOpenForWriteOptions)(r)&&this.writeHandles.set(a,i),c){const f=this.mapHandleToLock.get(a);this.traceLock(`[Disk FileSystemProvider]: open() - storing lock for handle ${a} (${o})`),this.mapHandleToLock.set(a,c),f&&(this.traceLock(`[Disk FileSystemProvider]: open() - disposing a previous lock that was still stored on same handle ${a} (${o})`),f.dispose())}return a}async close(i){const r=this.mapHandleToLock.get(i);try{if(this.mapHandleToPos.delete(i),this.writeHandles.delete(i)&&t.canFlush)try{await p.Promises.fdatasync(i)}catch(o){t.configureFlushOnWrite(!1),this.logService.error(o)}return await p.Promises.close(i)}catch(o){throw this.toFileSystemProviderError(o)}finally{r&&(this.mapHandleToLock.get(i)===r&&(this.traceLock(`[Disk FileSystemProvider]: close() - resource lock removed from handle-lock map ${i}`),this.mapHandleToLock.delete(i)),this.traceLock(`[Disk FileSystemProvider]: close() - disposing lock for handle ${i}`),r.dispose())}}async read(i,r,o,c,a){const f=this.normalizePos(i,r);let D=null;try{D=(await p.Promises.read(i,o,c,a,f)).bytesRead}catch(N){throw this.toFileSystemProviderError(N)}finally{this.updatePos(i,f,D)}return D}normalizePos(i,r){return r===this.mapHandleToPos.get(i)?null:r}updatePos(i,r,o){const c=this.mapHandleToPos.get(i);typeof c=="number"&&(typeof r=="number"||(typeof o=="number"?this.mapHandleToPos.set(i,c+o):this.mapHandleToPos.delete(i)))}async write(i,r,o,c,a){return(0,I.retry)(()=>this.doWrite(i,r,o,c,a),100,3)}async doWrite(i,r,o,c,a){const f=this.normalizePos(i,r);let D=null;try{D=(await p.Promises.write(i,o,c,a,f)).bytesWritten}catch(N){throw await this.toFileSystemProviderWriteError(this.writeHandles.get(i),N)}finally{this.updatePos(i,f,D)}return D}async mkdir(i){try{await p.Promises.mkdir(this.toFilePath(i))}catch(r){throw this.toFileSystemProviderError(r)}}async delete(i,r){try{const o=this.toFilePath(i);r.recursive?await p.Promises.rm(o,p.RimRafMode.MOVE):await p.Promises.unlink(o)}catch(o){throw this.toFileSystemProviderError(o)}}async rename(i,r,o){const c=this.toFilePath(i),a=this.toFilePath(r);if(c!==a)try{await this.validateTargetDeleted(i,r,"move",o.overwrite),await p.Promises.move(c,a)}catch(f){throw(f.code==="EINVAL"||f.code==="EBUSY"||f.code==="ENAMETOOLONG")&&(f=new Error((0,P.localize)(2,null,(0,w.basename)(c),(0,w.basename)((0,w.dirname)(a)),f.toString()))),this.toFileSystemProviderError(f)}}async copy(i,r,o){const c=this.toFilePath(i),a=this.toFilePath(r);if(c!==a)try{await this.validateTargetDeleted(i,r,"copy",o.overwrite),await p.Promises.copy(c,a,{preserveSymlinks:!0})}catch(f){throw(f.code==="EINVAL"||f.code==="EBUSY"||f.code==="ENAMETOOLONG")&&(f=new Error((0,P.localize)(3,null,(0,w.basename)(c),(0,w.basename)((0,w.dirname)(a)),f.toString()))),this.toFileSystemProviderError(f)}}async validateTargetDeleted(i,r,o,c){const a=this.toFilePath(i),f=this.toFilePath(r);let D=!1;if(!!(this.capabilities&1024)||(D=(0,d.isEqual)(a,f,!0)),D&&o==="copy")throw(0,y.createFileSystemProviderError)((0,P.localize)(4,null),y.FileSystemProviderErrorCode.FileExists);if(!D&&await p.Promises.exists(f)){if(!c)throw(0,y.createFileSystemProviderError)((0,P.localize)(5,null),y.FileSystemProviderErrorCode.FileExists);await this.delete(r,{recursive:!0,useTrash:!1})}}async cloneFile(i,r){return this.doCloneFile(i,r,!1)}async doCloneFile(i,r,o){const c=this.toFilePath(i),a=this.toFilePath(r),f=!!(this.capabilities&1024);if((0,d.isEqual)(c,a,!f))return;const D=new h.DisposableStore;try{const[N,B]=await Promise.all([this.createResourceLock(i),this.createResourceLock(r)]);D.add(N),D.add(B),o&&await p.Promises.mkdir((0,w.dirname)(a),{recursive:!0}),await p.Promises.copyFile(c,a)}catch(N){if(N.code==="ENOENT"&&!o)return this.doCloneFile(i,r,!0);throw this.toFileSystemProviderError(N)}finally{D.dispose()}}createUniversalWatcher(i,r,o){return new u.UniversalWatcherClient(c=>i(c),c=>r(c),o)}createNonRecursiveWatcher(i,r,o){return new s.NodeJSWatcherClient(c=>i(c),c=>r(c),o)}toFileSystemProviderError(i){if(i instanceof y.FileSystemProviderError)return i;let r;switch(i.code){case"ENOENT":r=y.FileSystemProviderErrorCode.FileNotFound;break;case"EISDIR":r=y.FileSystemProviderErrorCode.FileIsADirectory;break;case"ENOTDIR":r=y.FileSystemProviderErrorCode.FileNotADirectory;break;case"EEXIST":r=y.FileSystemProviderErrorCode.FileExists;break;case"EPERM":case"EACCES":r=y.FileSystemProviderErrorCode.NoPermissions;break;default:r=y.FileSystemProviderErrorCode.Unknown}return(0,y.createFileSystemProviderError)(i,r)}async toFileSystemProviderWriteError(i,r){let o=this.toFileSystemProviderError(r);if(i&&o.code===y.FileSystemProviderErrorCode.NoPermissions)try{const{stat:c}=await p.SymlinkSupport.stat(this.toFilePath(i));c.mode&128||(o=(0,y.createFileSystemProviderError)(r,y.FileSystemProviderErrorCode.FileWriteLocked))}catch(c){this.logService.trace(c)}return o}}e.DiskFileSystemProvider=t,t.TRACE_LOG_RESOURCE_LOCKS=!1,t.canFlush=!0}),define(Q[117],Z([0,1,13,9]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpdLogLogger=void 0;async function I(v,d,h,w,b){try{const g=await new Promise((p,P)=>{_(["spdlog"],p,P)});g.setFlushOn(R.LogLevel.Trace);const S=await g.createAsyncRotatingLogger(v,d,h,w);return b?S.clearFormatters():S.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"),S}catch(g){console.error(g)}return null}function k(v,d,h){switch(d){case R.LogLevel.Trace:v.trace(h);break;case R.LogLevel.Debug:v.debug(h);break;case R.LogLevel.Info:v.info(h);break;case R.LogLevel.Warning:v.warn(h);break;case R.LogLevel.Error:v.error(h);break;case R.LogLevel.Critical:v.critical(h);break;default:throw new Error("Invalid log level")}}class O extends R.AbstractMessageLogger{constructor(d,h,w,b,g){super(),this.buffer=[],this.setLevel(g),this._loggerCreationPromise=this._createSpdLogLogger(d,h,w,b),this._register(this.onDidChangeLogLevel(S=>{this._logger?.setLevel(S)}))}async _createSpdLogLogger(d,h,w,b){const g=w?6:1,S=30/g*C.ByteSize.MB,p=await I(d,h,S,g,b);if(p){this._logger=p,this._logger.setLevel(this.getLevel());for(const{level:P,message:y}of this.buffer)k(this._logger,P,y);this.buffer=[]}}log(d,h){this._logger?k(this._logger,d,h):this.getLevel()<=d&&this.buffer.push({level:d,message:h})}flush(){this._logger?this._logger.flush():this._loggerCreationPromise.then(()=>this.flush())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise.then(()=>this.disposeLogger())}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}}e.SpdLogLogger=O}),define(Q[36],Z([0,1,4,64,2,8]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullPolicyService=e.AbstractPolicyService=e.IPolicyService=void 0,e.IPolicyService=(0,k.createDecorator)("policy");class O extends I.Disposable{constructor(){super(...arguments),this.policyDefinitions={},this.policies=new Map,this._onDidChange=this._register(new C.Emitter),this.onDidChange=this._onDidChange.event}async registerPolicyDefinitions(h){const w=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...h,...this.policyDefinitions},w!==Object.keys(this.policyDefinitions).length&&await this.initializePolicies(h),R.Iterable.reduce(this.policies.entries(),(b,[g,S])=>({...b,[g]:S}),{})}getPolicyValue(h){return this.policies.get(h)}serialize(){return R.Iterable.reduce(Object.entries(this.policyDefinitions),(h,[w,b])=>({...h,[w]:{definition:b,value:this.policies.get(w)}}),{})}}e.AbstractPolicyService=O;class v{constructor(){this.onDidChange=C.Event.None}async registerPolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}e.NullPolicyService=v}),define(Q[118],Z([0,1,3,4,64,5,13,9,36]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilePolicyService=void 0;function h(b,g){const S=[];for(const p of I.Iterable.concat(b.keys(),g.keys()))b.get(p)!==g.get(p)&&S.push(p);return S}let w=class extends d.AbstractPolicyService{constructor(g,S,p){super(),this.file=g,this.fileService=S,this.logService=p,this.throttledDelayer=this._register(new C.ThrottledDelayer(500));const P=R.Event.filter(S.onDidFilesChange,y=>y.affects(g));this._register(S.watch(g)),this._register(P(()=>this.throttledDelayer.trigger(()=>this.refresh())))}async initializePolicies(g){await this.refresh()}async read(){const g=new Map;try{const S=await this.fileService.readFile(this.file),p=JSON.parse(S.value.toString());if(!(0,k.isObject)(p))throw new Error("Policy file isn't a JSON object");for(const P of Object.keys(p))this.policyDefinitions[P]&&g.set(P,p[P])}catch(S){S.fileOperationResult!==1&&this.logService.error("[FilePolicyService] Failed to read policies",S)}return g}async refresh(){const g=await this.read(),S=h(this.policies,g);this.policies=g,S.length>0&&this._onDidChange.fire(S)}};w=de([ee(1,O.IFileService),ee(2,v.ILogService)],w),e.FilePolicyService=w}),define(Q[28],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,C.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(Q[33],Z([0,1,69,5]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class I{constructor(){this.data=new Map}add(O,v){C.ok(R.isString(O)),C.ok(R.isObject(v)),C.ok(!this.data.has(O),"There is already an extension with this id"),this.data.set(O,v)}knows(O){return this.data.has(O)}as(O){return this.data.get(O)||null}}e.Registry=new I}),define(Q[119],Z([0,1,4,33]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function I(v){return v.length>0&&v.charAt(v.length-1)==="#"?v.substring(0,v.length-1):v}class k{constructor(){this._onDidChangeSchema=new C.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(d,h){this.schemasById[I(d)]=h,this._onDidChangeSchema.fire(d)}notifySchemaChanged(d){this._onDidChangeSchema.fire(d)}getSchemaContributions(){return{schemas:this.schemasById}}}const O=new k;R.Registry.add(e.Extensions.JSONContribution,O)}),define(Q[40],Z([0,1,19,4,5,82,21,119,33]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var h;(function(s){s.Multiline="multilineText",s.Singleline="singlelineText"})(h=e.EditPresentationTypes||(e.EditPresentationTypes={})),e.Extensions={Configuration:"base.contributions.configuration"};var w;(function(s){s[s.APPLICATION=1]="APPLICATION",s[s.MACHINE=2]="MACHINE",s[s.WINDOW=3]="WINDOW",s[s.RESOURCE=4]="RESOURCE",s[s.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",s[s.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(w=e.ConfigurationScope||(e.ConfigurationScope={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const b=d.Registry.as(v.Extensions.JSONContribution);class g{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new R.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new R.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:k.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(t,n=!0){this.registerConfigurations([t],n)}registerConfigurations(t,n=!0){const i=this.doRegisterConfigurations(t,n);b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}deregisterConfigurations(t){const n=this.doDeregisterConfigurations(t);b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}updateConfigurations({add:t,remove:n}){const i=[];i.push(...this.doDeregisterConfigurations(n)),i.push(...this.doRegisterConfigurations(t,!1)),b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:(0,C.distinct)(i)})}registerDefaultConfigurations(t){const n=[],i=[];for(const{overrides:r,source:o}of t)for(const c in r)if(n.push(c),e.OVERRIDE_PROPERTY_REGEX.test(c)){const a=this.configurationDefaultsOverrides.get(c),f=a?.valuesSources??new Map;if(o)for(const X of Object.keys(r[c]))f.set(X,o);const D={...a?.value||{},...r[c]};this.configurationDefaultsOverrides.set(c,{source:o,value:D,valuesSources:f});const N=(0,O.getLanguageTagSettingPlainKey)(c),B={type:"object",default:D,description:k.localize(1,null,N),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:D,source:I.isString(o)?void 0:o,defaultValueSource:o};i.push(...P(c)),this.configurationProperties[c]=B,this.defaultLanguageConfigurationOverridesNode.properties[c]=B}else{this.configurationDefaultsOverrides.set(c,{value:r[c],source:o});const a=this.configurationProperties[c];a&&(this.updatePropertyDefaultValue(c,a),this.updateSchema(c,a))}this.registerOverrideIdentifiers(i),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}deregisterDefaultConfigurations(t){const n=[];for(const{overrides:i,source:r}of t)for(const o in i){const c=this.configurationDefaultsOverrides.get(o),a=I.isString(r)?r:r?.id,f=I.isString(c?.source)?c?.source:c?.source?.id;if(a===f)if(n.push(o),this.configurationDefaultsOverrides.delete(o),e.OVERRIDE_PROPERTY_REGEX.test(o))delete this.configurationProperties[o],delete this.defaultLanguageConfigurationOverridesNode.properties[o];else{const D=this.configurationProperties[o];D&&(this.updatePropertyDefaultValue(o,D),this.updateSchema(o,D))}}this.updateOverridePropertyPatternKey(),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}notifyConfigurationSchemaUpdated(...t){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(t){for(const n of t)this.overrideIdentifiers.add(n);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(t,n){const i=[];return t.forEach(r=>{i.push(...this.validateAndRegisterProperties(r,n,r.extensionInfo,r.restrictedProperties)),this.configurationContributors.push(r),this.registerJSONConfiguration(r)}),i}doDeregisterConfigurations(t){const n=[],i=r=>{if(r.properties)for(const o in r.properties){n.push(o);const c=this.configurationProperties[o];c?.policy?.name&&this.policyConfigurations.delete(c.policy.name),delete this.configurationProperties[o],this.removeFromSchema(o,r.properties[o])}r.allOf?.forEach(o=>i(o))};for(const r of t){i(r);const o=this.configurationContributors.indexOf(r);o!==-1&&this.configurationContributors.splice(o,1)}return n}validateAndRegisterProperties(t,n=!0,i,r,o=3){o=I.isUndefinedOrNull(t.scope)?o:t.scope;const c=[],a=t.properties;if(a)for(const D in a){const N=a[D];if(n&&E(D,N)){delete a[D];continue}if(N.source=i,N.defaultDefaultValue=a[D].default,this.updatePropertyDefaultValue(D,N),e.OVERRIDE_PROPERTY_REGEX.test(D)?N.scope=void 0:(N.scope=I.isUndefinedOrNull(N.scope)?o:N.scope,N.restricted=I.isUndefinedOrNull(N.restricted)?!!r?.includes(D):N.restricted),a[D].hasOwnProperty("included")&&!a[D].included){this.excludedConfigurationProperties[D]=a[D],delete a[D];continue}else this.configurationProperties[D]=a[D],a[D].policy?.name&&this.policyConfigurations.set(a[D].policy.name,D);!a[D].deprecationMessage&&a[D].markdownDeprecationMessage&&(a[D].deprecationMessage=a[D].markdownDeprecationMessage),c.push(D)}const f=t.allOf;if(f)for(const D of f)c.push(...this.validateAndRegisterProperties(D,n,i,r,o));return c}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(t){const n=i=>{const r=i.properties;if(r)for(const c in r)this.updateSchema(c,r[c]);i.allOf?.forEach(n)};n(t)}updateSchema(t,n){switch(e.allSettings.properties[t]=n,n.scope){case 1:e.applicationSettings.properties[t]=n;break;case 2:e.machineSettings.properties[t]=n;break;case 6:e.machineOverridableSettings.properties[t]=n;break;case 3:e.windowSettings.properties[t]=n;break;case 4:e.resourceSettings.properties[t]=n;break;case 5:e.resourceSettings.properties[t]=n,this.resourceLanguageSettingsSchema.properties[t]=n;break}}removeFromSchema(t,n){switch(delete e.allSettings.properties[t],n.scope){case 1:delete e.applicationSettings.properties[t];break;case 2:delete e.machineSettings.properties[t];break;case 6:delete e.machineOverridableSettings.properties[t];break;case 3:delete e.windowSettings.properties[t];break;case 4:case 5:delete e.resourceSettings.properties[t],delete this.resourceLanguageSettingsSchema.properties[t];break}}updateOverridePropertyPatternKey(){for(const t of this.overrideIdentifiers.values()){const n=`[${t}]`,i={type:"object",description:k.localize(2,null),errorMessage:k.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(n,i),e.allSettings.properties[n]=i,e.applicationSettings.properties[n]=i,e.machineSettings.properties[n]=i,e.machineOverridableSettings.properties[n]=i,e.windowSettings.properties[n]=i,e.resourceSettings.properties[n]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const t={type:"object",description:k.localize(4,null),errorMessage:k.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(t,n){const i=this.configurationDefaultsOverrides.get(t);let r=i?.value,o=i?.source;I.isUndefined(r)&&(r=n.defaultDefaultValue,o=void 0),I.isUndefined(r)&&(r=l(n.type)),n.default=r,n.defaultValueSource=o}}const S="\\[([^\\]]+)\\]",p=new RegExp(S,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${S})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function P(s){const t=[];if(e.OVERRIDE_PROPERTY_REGEX.test(s)){let n=p.exec(s);for(;n?.length;){const i=n[1].trim();i&&t.push(i),n=p.exec(s)}}return(0,C.distinct)(t)}e.overrideIdentifiersFromKey=P;function y(s){return s.reduce((t,n)=>`${t}[${n}]`,"")}e.keyFromOverrideIdentifiers=y;function l(s){switch(Array.isArray(s)?s[0]:s){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=l;const m=new g;d.Registry.add(e.Extensions.Configuration,m);function E(s,t){return s.trim()?e.OVERRIDE_PROPERTY_REGEX.test(s)?k.localize(7,null,s):m.getConfigurationProperties()[s]!==void 0?k.localize(8,null,s):t.policy?.name&&m.getPolicyConfigurations().get(t.policy?.name)!==void 0?k.localize(9,null,s,t.policy?.name,m.getPolicyConfigurations().get(t.policy?.name)):null:k.localize(6,null)}e.validateProperty=E;function u(){const s=[],t=m.getConfigurationProperties();for(const n of Object.keys(t))s.push([n,t[n].scope]);return s.push(["launch",4]),s.push(["task",4]),s}e.getScopes=u}),define(Q[65],Z([0,1,19,4,50,2,39,26,5,10,21,40,33]),function(_,e,C,R,I,k,O,v,d,h,w,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;class S{constructor(n={},i=[],r=[],o){this._contents=n,this._keys=i,this._overrides=r,this.raw=o,this.frozen=!1,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const n=this.raw.map(i=>{if(i instanceof S)return i;const r=new p("");return r.parseRaw(i),r.configurationModel});this._rawConfiguration=n.reduce((i,r)=>r===i?r:i.merge(r),n[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}isFrozen(){return this.frozen}getValue(n){return n?(0,w.getConfigurationValue)(this.contents,n):this.contents}inspect(n,i){const r=this.rawConfiguration.getValue(n),o=i?this.rawConfiguration.getOverrideValue(n,i):void 0,c=i?this.rawConfiguration.override(i).getValue(n):r;return{value:r,override:o,merged:c}}getOverrideValue(n,i){const r=this.getContentsForOverrideIdentifer(i);return r?n?(0,w.getConfigurationValue)(r,n):r:void 0}getKeysForOverrideIdentifier(n){const i=[];for(const r of this.overrides)r.identifiers.includes(n)&&i.push(...r.keys);return C.distinct(i)}getAllOverrideIdentifiers(){const n=[];for(const i of this.overrides)n.push(...i.identifiers);return C.distinct(n)}override(n){let i=this.overrideConfigurations.get(n);return i||(i=this.createOverrideConfigurationModel(n),this.overrideConfigurations.set(n,i)),i}merge(...n){const i=v.deepClone(this.contents),r=v.deepClone(this.overrides),o=[...this.keys],c=this.raw?.length?[...this.raw]:[this];for(const a of n)if(c.push(...a.raw?.length?a.raw:[a]),!a.isEmpty()){this.mergeContents(i,a.contents);for(const f of a.overrides){const[D]=r.filter(N=>C.equals(N.identifiers,f.identifiers));D?(this.mergeContents(D.contents,f.contents),D.keys.push(...f.keys),D.keys=C.distinct(D.keys)):r.push(v.deepClone(f))}for(const f of a.keys)o.indexOf(f)===-1&&o.push(f)}return new S(i,o,r,c.every(a=>a instanceof S)?void 0:c)}freeze(){return this.frozen=!0,this}clone(){return new S(v.deepClone(this.contents),[...this.keys],v.deepClone(this.overrides))}createOverrideConfigurationModel(n){const i=this.getContentsForOverrideIdentifer(n);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const r={};for(const o of C.distinct([...Object.keys(this.contents),...Object.keys(i)])){let c=this.contents[o];const a=i[o];a&&(typeof c=="object"&&typeof a=="object"?(c=v.deepClone(c),this.mergeContents(c,a)):c=a),r[o]=c}return new S(r,this.keys,this.overrides)}mergeContents(n,i){for(const r of Object.keys(i)){if(r in n&&d.isObject(n[r])&&d.isObject(i[r])){this.mergeContents(n[r],i[r]);continue}n[r]=v.deepClone(i[r])}}checkAndFreeze(n){return this.frozen&&!Object.isFrozen(n)?v.deepFreeze(n):n}getContentsForOverrideIdentifer(n){let i=null,r=null;const o=c=>{c&&(r?this.mergeContents(r,c):r=v.deepClone(c))};for(const c of this.overrides)C.equals(c.identifiers,[n])?i=c.contents:c.identifiers.includes(n)&&o(c.contents);return o(i),r}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(n,i){this.addKey(n),(0,w.addToValueTree)(this.contents,n,i,r=>{throw new Error(r)})}removeValue(n){this.removeKey(n)&&(0,w.removeFromValueTree)(this.contents,n)}addKey(n){let i=this.keys.length;for(let r=0;r{const N={};f(N),c.push(o),o=N,r=null},onObjectProperty:N=>{r=N},onObjectEnd:()=>{o=c.pop()},onArrayBegin:()=>{const N=[];f(N),c.push(o),o=N,r=null},onArrayEnd:()=>{o=c.pop()},onLiteralValue:f,onError:(N,B,X)=>{a.push({error:N,offset:B,length:X})}};if(n)try{I.visit(n,D),i=o[0]||{}}catch(N){console.error(`Error while parsing settings file ${this._name}: ${N}`),this._parseErrors=[N]}return i}doParseRaw(n,i){const r=g.Registry.as(b.Extensions.Configuration).getConfigurationProperties(),o=this.filter(n,r,!0,i);n=o.raw;const c=(0,w.toValuesTree)(n,D=>console.error(`Conflict in settings file ${this._name}: ${D}`)),a=Object.keys(n),f=this.toOverrides(n,D=>console.error(`Conflict in settings file ${this._name}: ${D}`));return{contents:c,keys:a,overrides:f,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(n,i,r,o){let c=!1;if(!o?.scopes&&!o?.skipRestricted)return{raw:n,restricted:[],hasExcludedProperties:c};const a={},f=[];for(const D in n)if(b.OVERRIDE_PROPERTY_REGEX.test(D)&&r){const N=this.filter(n[D],i,!1,o);a[D]=N.raw,c=c||N.hasExcludedProperties,f.push(...N.restricted)}else{const N=i[D],B=N?typeof N.scope<"u"?N.scope:3:void 0;N?.restricted&&f.push(D),(B===void 0||o.scopes===void 0||o.scopes.includes(B))&&!(o.skipRestricted&&N?.restricted)?a[D]=n[D]:c=!0}return{raw:a,restricted:f,hasExcludedProperties:c}}toOverrides(n,i){const r=[];for(const o of Object.keys(n))if(b.OVERRIDE_PROPERTY_REGEX.test(o)){const c={};for(const a in n[o])c[a]=n[o][a];r.push({identifiers:(0,b.overrideIdentifiersFromKey)(o),keys:Object.keys(c),contents:(0,w.toValuesTree)(c,i)})}return r}}e.ConfigurationModelParser=p;class P extends k.Disposable{constructor(n,i,r,o){super(),this.userSettingsResource=n,this.scopes=i,this.fileService=o,this._onDidChange=this._register(new R.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new p(this.userSettingsResource.toString()),this.parseOptions={scopes:this.scopes},this._register(this.fileService.watch(r.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(R.Event.any(R.Event.filter(this.fileService.onDidFilesChange,c=>c.contains(this.userSettingsResource)),R.Event.filter(this.fileService.onDidRunOperation,c=>(c.isOperation(0)||c.isOperation(3)||c.isOperation(1)||c.isOperation(4))&&r.isEqual(c.resource,n)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const n=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(n.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new S}}reparse(){return this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=P;class y{constructor(n,i,r,o,c,a,f,D,N,B,X,J,se){this.key=n,this.overrides=i,this.value=r,this.overrideIdentifiers=o,this.defaultConfiguration=c,this.policyConfiguration=a,this.applicationConfiguration=f,this.userConfiguration=D,this.localUserConfiguration=N,this.remoteUserConfiguration=B,this.workspaceConfiguration=X,this.folderConfigurationModel=J,this.memoryInspectValue=se}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.localUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.remoteUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class l{constructor(n,i,r,o,c=new S,a=new S,f=new O.ResourceMap,D=new S,N=new O.ResourceMap,B=!0){this._defaultConfiguration=n,this._policyConfiguration=i,this._applicationConfiguration=r,this._localUserConfiguration=o,this._remoteUserConfiguration=c,this._workspaceConfiguration=a,this._folderConfigurations=f,this._memoryConfiguration=D,this._memoryConfigurationByResource=N,this._freeze=B,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new O.ResourceMap,this._userConfiguration=null}getValue(n,i,r){return this.getConsolidatedConfigurationModel(n,i,r).getValue(n)}updateValue(n,i,r={}){let o;r.resource?(o=this._memoryConfigurationByResource.get(r.resource),o||(o=new S,this._memoryConfigurationByResource.set(r.resource,o))):o=this._memoryConfiguration,i===void 0?o.removeValue(n):o.setValue(n,i),r.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(n,i,r){const o=this.getConsolidatedConfigurationModel(n,i,r),c=C.distinct(o.overrides.map(D=>D.identifiers).flat()).filter(D=>o.getOverrideValue(n,D)!==void 0),a=this.getFolderConfigurationModelForResource(i.resource,r),f=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration;return new y(n,i,o.getValue(n),c.length?c:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration.freeze(),this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration.freeze(),this.userConfiguration.freeze(),this.localUserConfiguration.freeze(),this.remoteUserConfiguration.freeze(),r?this._workspaceConfiguration.freeze():void 0,a?a.freeze():void 0,f.inspect(n,i.overrideIdentifier))}keys(n){const i=this.getFolderConfigurationModelForResource(void 0,n);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:i?i.freeze().keys:[]}}updateDefaultConfiguration(n){this._defaultConfiguration=n,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(n){this._policyConfiguration=n}updateApplicationConfiguration(n){this._applicationConfiguration=n,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(n){this._localUserConfiguration=n,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(n){this._remoteUserConfiguration=n,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(n){this._workspaceConfiguration=n,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(n,i){this._folderConfigurations.set(n,i),this._foldersConsolidatedConfigurations.delete(n)}deleteFolderConfiguration(n){this.folderConfigurations.delete(n),this._foldersConsolidatedConfigurations.delete(n)}compareAndUpdateDefaultConfiguration(n,i){const r=[];if(!i){const{added:o,updated:c,removed:a}=u(this._defaultConfiguration,n);i=[...o,...c,...a]}for(const o of i)for(const c of(0,b.overrideIdentifiersFromKey)(o)){const a=this._defaultConfiguration.getKeysForOverrideIdentifier(c),f=n.getKeysForOverrideIdentifier(c),D=[...f.filter(N=>a.indexOf(N)===-1),...a.filter(N=>f.indexOf(N)===-1),...a.filter(N=>!v.equals(this._defaultConfiguration.override(c).getValue(N),n.override(c).getValue(N)))];r.push([c,D])}return this.updateDefaultConfiguration(n),{keys:i,overrides:r}}compareAndUpdatePolicyConfiguration(n){const{added:i,updated:r,removed:o}=u(this._policyConfiguration,n),c=[...i,...r,...o];return c.length&&this.updatePolicyConfiguration(n),{keys:c,overrides:[]}}compareAndUpdateApplicationConfiguration(n){const{added:i,updated:r,removed:o,overrides:c}=u(this.applicationConfiguration,n),a=[...i,...r,...o];return a.length&&this.updateApplicationConfiguration(n),{keys:a,overrides:c}}compareAndUpdateLocalUserConfiguration(n){const{added:i,updated:r,removed:o,overrides:c}=u(this.localUserConfiguration,n),a=[...i,...r,...o];return a.length&&this.updateLocalUserConfiguration(n),{keys:a,overrides:c}}compareAndUpdateRemoteUserConfiguration(n){const{added:i,updated:r,removed:o,overrides:c}=u(this.remoteUserConfiguration,n),a=[...i,...r,...o];return a.length&&this.updateRemoteUserConfiguration(n),{keys:a,overrides:c}}compareAndUpdateWorkspaceConfiguration(n){const{added:i,updated:r,removed:o,overrides:c}=u(this.workspaceConfiguration,n),a=[...i,...r,...o];return a.length&&this.updateWorkspaceConfiguration(n),{keys:a,overrides:c}}compareAndUpdateFolderConfiguration(n,i){const r=this.folderConfigurations.get(n),{added:o,updated:c,removed:a,overrides:f}=u(r,i),D=[...o,...c,...a];return(D.length||!r)&&this.updateFolderConfiguration(n,i),{keys:D,overrides:f}}compareAndDeleteFolderConfiguration(n){const i=this.folderConfigurations.get(n);if(!i)throw new Error("Unknown folder");this.deleteFolderConfiguration(n);const{added:r,updated:o,removed:c,overrides:a}=u(i,void 0);return{keys:[...r,...o,...c],overrides:a}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidatedConfigurationModel(n,i,r){let o=this.getConsolidatedConfigurationModelForResource(i,r);return i.overrideIdentifier&&(o=o.override(i.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(n)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:n},i){let r=this.getWorkspaceConsolidatedConfiguration();if(i&&n){const o=i.getFolder(n);o&&(r=this.getFolderConsolidatedConfiguration(o.uri)||r);const c=this._memoryConfigurationByResource.get(n);c&&(r=r.merge(c))}return r}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(n){let i=this._foldersConsolidatedConfigurations.get(n);if(!i){const r=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(n);o?(i=r.merge(o),this._freeze&&(i=i.freeze()),this._foldersConsolidatedConfigurations.set(n,i)):i=r}return i}getFolderConfigurationModelForResource(n,i){if(i&&n){const r=i.getFolder(n);if(r)return this._folderConfigurations.get(r.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((n,i)=>{const{contents:r,overrides:o,keys:c}=this._folderConfigurations.get(i);return n.push([i,{contents:r,overrides:o,keys:c}]),n},[])}}allKeys(){const n=new Set;return this._defaultConfiguration.freeze().keys.forEach(i=>n.add(i)),this.userConfiguration.freeze().keys.forEach(i=>n.add(i)),this._workspaceConfiguration.freeze().keys.forEach(i=>n.add(i)),this._folderConfigurations.forEach(i=>i.freeze().keys.forEach(r=>n.add(r))),[...n.values()]}allOverrideIdentifiers(){const n=new Set;return this._defaultConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>n.add(i)),this.userConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>n.add(i)),this._workspaceConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>n.add(i)),this._folderConfigurations.forEach(i=>i.freeze().getAllOverrideIdentifiers().forEach(r=>n.add(r))),[...n.values()]}getAllKeysForOverrideIdentifier(n){const i=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(n).forEach(r=>i.add(r)),this.userConfiguration.getKeysForOverrideIdentifier(n).forEach(r=>i.add(r)),this._workspaceConfiguration.getKeysForOverrideIdentifier(n).forEach(r=>i.add(r)),this._folderConfigurations.forEach(r=>r.getKeysForOverrideIdentifier(n).forEach(o=>i.add(o))),[...i.values()]}static parse(n){const i=this.parseConfigurationModel(n.defaults),r=this.parseConfigurationModel(n.policy),o=this.parseConfigurationModel(n.application),c=this.parseConfigurationModel(n.user),a=this.parseConfigurationModel(n.workspace),f=n.folders.reduce((D,N)=>(D.set(h.URI.revive(N[0]),this.parseConfigurationModel(N[1])),D),new O.ResourceMap);return new l(i,r,o,c,new S,a,f,new S,new O.ResourceMap,!1)}static parseConfigurationModel(n){return new S(n.contents,n.keys,n.overrides).freeze()}}e.Configuration=l;function m(...t){if(t.length===0)return{keys:[],overrides:[]};if(t.length===1)return t[0];const n=new Set,i=new Map;for(const o of t)o.keys.forEach(c=>n.add(c)),o.overrides.forEach(([c,a])=>{const f=(0,O.getOrSet)(i,c,new Set);a.forEach(D=>f.add(D))});const r=[];return i.forEach((o,c)=>r.push([c,[...o.values()]])),{keys:[...n.values()],overrides:r}}e.mergeChanges=m;class E{constructor(n,i,r,o){this.change=n,this.previous=i,this.currentConfiguraiton=r,this.currentWorkspace=o,this._previousConfiguration=void 0;const c=new Set;n.keys.forEach(f=>c.add(f)),n.overrides.forEach(([,f])=>f.forEach(D=>c.add(D))),this.affectedKeys=[...c.values()];const a=new S;this.affectedKeys.forEach(f=>a.setValue(f,{})),this.affectedKeysTree=a.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=l.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(n,i){if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,n)){if(i){const r=this.previousConfiguration?this.previousConfiguration.getValue(n,i,this.previous?.workspace):void 0,o=this.currentConfiguraiton.getValue(n,i,this.currentWorkspace);return!v.equals(r,o)}return!0}return!1}doesAffectedKeysTreeContains(n,i){let r=(0,w.toValuesTree)({[i]:!0},()=>{}),o;for(;typeof r=="object"&&(o=Object.keys(r)[0]);){if(n=n[o],!n)return!1;r=r[o]}return!0}}e.ConfigurationChangeEvent=E;function u(t,n){const{added:i,removed:r,updated:o}=s(n?.rawConfiguration,t?.rawConfiguration),c=[],a=t?.getAllOverrideIdentifiers()||[],f=n?.getAllOverrideIdentifiers()||[];if(n){const D=f.filter(N=>!a.includes(N));for(const N of D)c.push([N,n.getKeysForOverrideIdentifier(N)])}if(t){const D=a.filter(N=>!f.includes(N));for(const N of D)c.push([N,t.getKeysForOverrideIdentifier(N)])}if(n&&t){for(const D of a)if(f.includes(D)){const N=s({contents:t.getOverrideValue(void 0,D)||{},keys:t.getKeysForOverrideIdentifier(D)},{contents:n.getOverrideValue(void 0,D)||{},keys:n.getKeysForOverrideIdentifier(D)});c.push([D,[...N.added,...N.removed,...N.updated]])}}return{added:i,removed:r,updated:o,overrides:c}}function s(t,n){const i=t?n?t.keys.filter(c=>n.keys.indexOf(c)===-1):[...t.keys]:[],r=n?t?n.keys.filter(c=>t.keys.indexOf(c)===-1):[...n.keys]:[],o=[];if(t&&n){for(const c of n.keys)if(t.keys.indexOf(c)!==-1){const a=(0,w.getConfigurationValue)(n.contents,c),f=(0,w.getConfigurationValue)(t.contents,c);v.equals(a,f)||o.push(c)}}return{added:i,removed:r,updated:o}}}),define(Q[120],Z([0,1,19,4,2,26,5,21,65,40,9,36,33]),function(_,e,C,R,I,k,O,v,d,h,w,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyConfiguration=e.NullPolicyConfiguration=e.DefaultConfigurationModel=e.DefaultConfiguration=void 0;class S extends I.Disposable{constructor(){super(...arguments),this._onDidChangeConfiguration=this._register(new R.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event}get configurationModel(){return this._configurationModel||(this._configurationModel=new p(this.getConfigurationDefaultOverrides())),this._configurationModel}async initialize(){return this._configurationModel=void 0,this._register(g.Registry.as(h.Extensions.Configuration).onDidUpdateConfiguration(({properties:m,defaultsOverrides:E})=>this.onDidUpdateConfiguration(m,E))),this.configurationModel}reload(){return this._configurationModel=void 0,this.configurationModel}onDidUpdateConfiguration(m,E){this._configurationModel=void 0,this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:m})}getConfigurationDefaultOverrides(){return{}}}e.DefaultConfiguration=S;class p extends d.ConfigurationModel{constructor(m={}){const E=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties(),u=Object.keys(E),s=Object.create(null),t=[];for(const n in E){const i=m[n],r=i!==void 0?i:E[n].default;(0,v.addToValueTree)(s,n,r,o=>console.error(`Conflict in default settings: ${o}`))}for(const n of Object.keys(s))h.OVERRIDE_PROPERTY_REGEX.test(n)&&t.push({identifiers:(0,h.overrideIdentifiersFromKey)(n),keys:Object.keys(s[n]),contents:(0,v.toValuesTree)(s[n],i=>console.error(`Conflict in default settings file: ${i}`))});super(s,u,t)}}e.DefaultConfigurationModel=p;class P{constructor(){this.onDidChangeConfiguration=R.Event.None,this.configurationModel=new d.ConfigurationModel}async initialize(){return this.configurationModel}}e.NullPolicyConfiguration=P;let y=class extends I.Disposable{get configurationModel(){return this._configurationModel}constructor(m,E,u){super(),this.defaultConfiguration=m,this.policyService=E,this.logService=u,this._onDidChangeConfiguration=this._register(new R.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new d.ConfigurationModel}async initialize(){return this.update(await this.registerPolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this._register(this.policyService.onDidChange(m=>this.onDidChangePolicies(m))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:m})=>this.update(await this.registerPolicyDefinitions(m),!0))),this._configurationModel}async registerPolicyDefinitions(m){const E={},u=[],s=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties();for(const t of m){const n=s[t];if(!n){u.push(t);continue}if(n.policy){if(n.type!=="string"&&n.type!=="number"){this.logService.warn(`Policy ${n.policy.name} has unsupported type ${n.type}`);continue}u.push(t),E[n.policy.name]={type:n.type}}}return(0,O.isEmptyObject)(E)||await this.policyService.registerPolicyDefinitions(E),u}onDidChangePolicies(m){const E=g.Registry.as(h.Extensions.Configuration).getPolicyConfigurations(),u=(0,C.coalesce)(m.map(s=>E.get(s)));this.update(u,!0)}update(m,E){const u=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties(),s=[],t=this._configurationModel.isEmpty();for(const n of m){const i=u[n]?.policy?.name;if(i){const r=this.policyService.getPolicyValue(i);(t?r!==void 0:!(0,k.equals)(this._configurationModel.getValue(n),r))&&s.push([n,r])}else this._configurationModel.getValue(n)!==void 0&&s.push([n,void 0])}if(s.length){const n=this._configurationModel;this._configurationModel=new d.ConfigurationModel;for(const i of n.keys)this._configurationModel.setValue(i,n.getValue(i));for(const[i,r]of s)r===void 0?this._configurationModel.removeValue(i):this._configurationModel.setValue(i,r);E&&this._onDidChangeConfiguration.fire(this._configurationModel)}}};y=de([ee(1,b.IPolicyService),ee(2,w.ILogService)],y),e.PolicyConfiguration=y}),define(Q[121],Z([0,1,3,4,2,18,21,65,120,36]),function(_,e,C,R,I,k,O,v,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationService=void 0;class w extends I.Disposable{constructor(g,S,p,P){super(),this.settingsResource=g,this._onDidChangeConfiguration=this._register(new R.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.defaultConfiguration=this._register(new d.DefaultConfiguration),this.policyConfiguration=p instanceof h.NullPolicyService?new d.NullPolicyConfiguration:this._register(new d.PolicyConfiguration(this.defaultConfiguration,p,P)),this.userConfiguration=this._register(new v.UserSettings(this.settingsResource,void 0,k.extUriBiasedIgnorePathCase,S)),this.configuration=new v.Configuration(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,new v.ConfigurationModel,new v.ConfigurationModel),this.reloadConfigurationScheduler=this._register(new C.RunOnceScheduler(()=>this.reloadConfiguration(),50)),this._register(this.defaultConfiguration.onDidChangeConfiguration(({defaults:y,properties:l})=>this.onDidDefaultConfigurationChange(y,l))),this._register(this.policyConfiguration.onDidChangeConfiguration(y=>this.onDidPolicyConfigurationChange(y))),this._register(this.userConfiguration.onDidChange(()=>this.reloadConfigurationScheduler.schedule()))}async initialize(){const[g,S,p]=await Promise.all([this.defaultConfiguration.initialize(),this.policyConfiguration.initialize(),this.userConfiguration.loadConfiguration()]);this.configuration=new v.Configuration(g,S,new v.ConfigurationModel,p)}getConfigurationData(){return this.configuration.toData()}getValue(g,S){const p=typeof g=="string"?g:void 0,P=(0,O.isConfigurationOverrides)(g)?g:(0,O.isConfigurationOverrides)(S)?S:{};return this.configuration.getValue(p,P,void 0)}updateValue(g,S,p,P){return Promise.reject(new Error("not supported"))}inspect(g){return this.configuration.inspect(g,{},void 0)}keys(){return this.configuration.keys(void 0)}async reloadConfiguration(){const g=await this.userConfiguration.loadConfiguration();this.onDidChangeUserConfiguration(g)}onDidChangeUserConfiguration(g){const S=this.configuration.toData(),p=this.configuration.compareAndUpdateLocalUserConfiguration(g);this.trigger(p,S,2)}onDidDefaultConfigurationChange(g,S){const p=this.configuration.toData(),P=this.configuration.compareAndUpdateDefaultConfiguration(g,S);this.trigger(P,p,7)}onDidPolicyConfigurationChange(g){const S=this.configuration.toData(),p=this.configuration.compareAndUpdatePolicyConfiguration(g);this.trigger(p,S,7)}trigger(g,S,p){const P=new v.ConfigurationChangeEvent(g,{data:S},this.configuration);P.source=p,P.sourceConfig=this.getTargetConfiguration(p),this._onDidChangeConfiguration.fire(P)}getTargetConfiguration(g){switch(g){case 7:return this.configuration.defaults.contents;case 2:return this.configuration.localUserConfiguration.contents}return{}}}e.ConfigurationService=w}),define(Q[122],Z([0,1,16]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function R(h){return h.scheme===C.Schemas.vscodeRemote?h.authority:void 0}e.getRemoteAuthority=R;function I(h){if(!h)return;const w=h.indexOf("+");return w<0?h:h.substr(0,w)}e.getRemoteName=I;function k(h){return`/${h.quality??"oss"}-${h.commit??"dev"}`}e.getRemoteServerRootPath=k;function O(h){const{host:w,port:b}=d(h);if(typeof b>"u")throw new Error("Remote authority doesn't contain a port!");return{host:w,port:b}}e.parseAuthorityWithPort=O;function v(h,w){let{host:b,port:g}=d(h);return typeof g>"u"&&(g=w),{host:b,port:g}}e.parseAuthorityWithOptionalPort=v;function d(h){const w=h.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(w)return{host:w[1],port:parseInt(w[2],10)};const b=h.match(/^(\[[0-9a-z:]+\])$/);if(b)return{host:b[1],port:void 0};const g=h.match(/(.*):(\d+)$/);return g?{host:g[1],port:parseInt(g[2],10)}:{host:h,port:void 0}}}),define(Q[34],Z([0,1,27,8,122]),function(_,e,C,R,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=e.ExtensionIdentifier=e.TargetPlatform=e.ExtensionType=e.EXTENSION_CATEGORIES=e.isIExtensionIdentifier=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=e.MANIFEST_CACHE_FOLDER=void 0,e.MANIFEST_CACHE_FOLDER="CachedExtensions",e.USER_MANIFEST_CACHE_FILE="user",e.BUILTIN_MANIFEST_CACHE_FILE="builtin",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function k(p){if(typeof p=="object"&&p!==null&&p.supported!==!0)return p.description}e.getWorkspaceSupportTypeMessage=k;function O(p){return p&&typeof p=="object"&&typeof p.id=="string"&&(!p.uuid||typeof p.uuid=="string")}e.isIExtensionIdentifier=O,e.EXTENSION_CATEGORIES=["Azure","Data Science","Debuggers","Extension Packs","Education","Formatters","Keymaps","Language Packs","Linters","Machine Learning","Notebooks","Programming Languages","SCM Providers","Snippets","Testing","Themes","Visualization","Other"];var v;(function(p){p[p.System=0]="System",p[p.User=1]="User"})(v=e.ExtensionType||(e.ExtensionType={}));var d;(function(p){p.WIN32_X64="win32-x64",p.WIN32_IA32="win32-ia32",p.WIN32_ARM64="win32-arm64",p.LINUX_X64="linux-x64",p.LINUX_ARM64="linux-arm64",p.LINUX_ARMHF="linux-armhf",p.ALPINE_X64="alpine-x64",p.ALPINE_ARM64="alpine-arm64",p.DARWIN_X64="darwin-x64",p.DARWIN_ARM64="darwin-arm64",p.WEB="web",p.UNIVERSAL="universal",p.UNKNOWN="unknown",p.UNDEFINED="undefined"})(d=e.TargetPlatform||(e.TargetPlatform={}));class h{constructor(P){this.value=P,this._lower=P.toLowerCase()}static equals(P,y){if(typeof P>"u"||P===null)return typeof y>"u"||y===null;if(typeof y>"u"||y===null)return!1;if(typeof P=="string"||typeof y=="string"){const l=typeof P=="string"?P:P.value,m=typeof y=="string"?y:y.value;return C.equalsIgnoreCase(l,m)}return P._lower===y._lower}static toKey(P){return typeof P=="string"?P.toLowerCase():P._lower}}e.ExtensionIdentifier=h;function w(p){return b(p)}e.isApplicationScopedExtension=w;function b(p){return p.contributes&&p.contributes.localizations?p.contributes.localizations.length>0:!1}e.isLanguagePackExtension=b;function g(p){return p.contributes&&p.contributes.authentication?p.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=g;function S(p,P){if(P){const y=`onResolveRemoteAuthority:${(0,I.getRemoteName)(P)}`;return p.activationEvents?.indexOf(y)!==-1}return!1}e.isResolverExtension=S,e.IBuiltinExtensionsScannerService=(0,R.createDecorator)("IBuiltinExtensionsScannerService")}),define(Q[23],Z([0,1,27,22,34,12,10,11,32]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.isAlpineLinux=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function h(n,i){return n.uuid&&i.uuid?n.uuid===i.uuid:n.id===i.id?!0:(0,C.compareIgnoreCase)(n.id,i.id)===0}e.areSameExtensions=h;const w=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class b{static create(i){const r=i.manifest?i.manifest.version:i.version,o=i.manifest?i.targetPlatform:i.properties.targetPlatform;return new b(i.identifier,r,o)}static parse(i){const r=w.exec(i);return r&&r[1]&&r[2]?new b({id:r[1]},r[2],r[4]||void 0):null}constructor(i,r,o="undefined"){this.version=r,this.targetPlatform=o,this.id=i.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(i){return i instanceof b?h(this,i)&&this.version===i.version&&this.targetPlatform===i.targetPlatform:!1}}e.ExtensionKey=b;const g=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function S(n){const i=g.exec(n);return i&&i[1]?[P(i[1]),i[2]]:[P(n),void 0]}e.getIdAndVersion=S;function p(n,i){return`${n}.${i}`}e.getExtensionId=p;function P(n){return n.toLocaleLowerCase()}e.adoptToGalleryExtensionId=P;function y(n,i){return P(p(n,i))}e.getGalleryExtensionId=y;function l(n,i){const r=[],o=c=>{for(const a of r)if(a.some(f=>h(i(f),i(c))))return a;return null};for(const c of n){const a=o(c);a?a.push(c):r.push([c])}return r}e.groupByExtension=l;function m(n){return{id:n.identifier.id,name:n.manifest.name,galleryId:null,publisherId:n.publisherId,publisherName:n.manifest.publisher,publisherDisplayName:n.publisherDisplayName,dependencies:n.manifest.extensionDependencies&&n.manifest.extensionDependencies.length>0}}e.getLocalExtensionTelemetryData=m;function E(n){return{id:n.identifier.id,name:n.name,galleryId:n.identifier.uuid,publisherId:n.publisherId,publisherName:n.publisher,publisherDisplayName:n.publisherDisplayName,isPreReleaseVersion:n.properties.isPreReleaseVersion,dependencies:!!(n.properties.dependencies&&n.properties.dependencies.length>0),isSigned:n.isSigned,...n.telemetryData}}e.getGalleryExtensionTelemetryData=E,e.BetterMergeId=new I.ExtensionIdentifier("pprice.better-merge");function u(n,i){const r=[],o=i.manifest.extensionDependencies?.slice(0)??[];for(;o.length;){const c=o.shift();if(c&&r.every(a=>!h(a.identifier,{id:c}))){const a=n.filter(f=>h(f.identifier,{id:c}));a.length===1&&(r.push(a[0]),o.push(...a[0].manifest.extensionDependencies?.slice(0)??[]))}}return r}e.getExtensionDependencies=u;async function s(n,i){if(!k.isLinux)return!1;let r;try{r=(await n.readFile(O.URI.file("/etc/os-release"))).value.toString()}catch{try{r=(await n.readFile(O.URI.file("/usr/lib/os-release"))).value.toString()}catch(c){i.debug("Error while getting the os-release file.",(0,v.getErrorMessage)(c))}}return!!r&&(r.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}e.isAlpineLinux=s;async function t(n,i){const r=await s(n,i),o=(0,R.getTargetPlatform)(r?"alpine":k.platform,d.arch);return i.debug("ComputeTargetPlatform:",o),o}e.computeTargetPlatform=t}),define(Q[123],Z([0,1,24,11,16,18,38,10,85,22,23,34]),function(_,e,C,R,I,k,O,v,d,h,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionManagementCLI=void 0;const g=y=>(0,d.localize)(0,null,y),S=(0,d.localize)(1,null,"ms-dotnettools.csharp");function p(y,l){return l?`${y.publisher}.${y.name}@${y.version}`:`${y.publisher}.${y.name}`}let P=class{constructor(l,m){this.extensionManagementService=l,this.extensionGalleryService=m}get location(){}async listExtensions(l,m,E,u=console){let s=await this.extensionManagementService.getInstalled(1,E);const t=b.EXTENSION_CATEGORIES.map(i=>i.toLowerCase());if(m&&m!==""){if(t.indexOf(m.toLowerCase())<0){u.log("Invalid category please enter a valid category. To list valid categories run --category without a category specified");return}s=s.filter(i=>i.manifest.categories?i.manifest.categories.map(o=>o.toLowerCase()).indexOf(m.toLowerCase())>-1:!1)}else if(m===""){u.log("Possible Categories: "),t.forEach(i=>{u.log(i)});return}this.location&&u.log((0,d.localize)(2,null,this.location)),s=s.sort((i,r)=>i.identifier.id.localeCompare(r.identifier.id));let n;for(const i of s)n!==i.identifier.id&&(n=i.identifier.id,u.log(p(i.manifest,l)))}async installExtensions(l,m,E,u,s=console){const t=[],n=[];l.length&&s.log(this.location?(0,d.localize)(3,null,this.location):(0,d.localize)(4,null));const i=await this.extensionManagementService.getInstalled(1,E.profileLocation),r=(f,D)=>{const N=i.find(B=>(0,w.areSameExtensions)(B.identifier,{id:f}));if(N){if(!u&&(!D||D==="prerelease"&&N.preRelease))return s.log((0,d.localize)(5,null,f,N.manifest.version,f)),!1;if(D&&N.manifest.version===D)return s.log((0,d.localize)(6,null,`${f}@${D}`)),!1}return!0},o=(f,D,N)=>{a.push({id:f,version:D!=="prerelease"?D:void 0,installOptions:{...E,isBuiltin:N,installPreReleaseVersion:D==="prerelease"||E.installPreReleaseVersion}})},c=[],a=[];for(const f of l)if(f instanceof v.URI)c.push(f);else{const[D,N]=(0,w.getIdAndVersion)(f);r(D,N)&&o(D,N,!1)}for(const f of m){const[D,N]=(0,w.getIdAndVersion)(f);r(D,N)&&o(D,N,!0)}if(c.length&&await Promise.all(c.map(async f=>{try{const D=await this.installVSIX(f,{...E,isBuiltin:!1},u,s);D&&n.push(D)}catch(D){s.error(D.message||D.stack||D),t.push(f.toString())}})),a.length){const f=await this.getGalleryExtensions(a);await Promise.all(a.map(async D=>{const N=f.get(D.id.toLowerCase());if(N)try{const B=await this.installFromGallery(D,N,i,u,s);B&&n.push(B)}catch(B){s.error(B.message||B.stack||B),t.push(D.id)}else s.error(`${g(D.version?`${D.id}@${D.version}`:D.id)} ${S}`),t.push(D.id)}))}if(t.length)throw new Error((0,d.localize)(7,null,t.join(", ")))}async installVSIX(l,m,E,u){const s=await this.extensionManagementService.getManifest(l);if(!s)throw new Error("Invalid vsix");if(await this.validateVSIX(s,E,m.profileLocation,u))try{return await this.extensionManagementService.install(l,m),u.log((0,d.localize)(8,null,(0,k.basename)(l))),s}catch(n){if((0,R.isCancellationError)(n))return u.log((0,d.localize)(9,null,(0,k.basename)(l))),null;throw n}return null}async getGalleryExtensions(l){const m=new Map,E=l.some(s=>s.installOptions.installPreReleaseVersion),u=await this.extensionGalleryService.getExtensions(l.map(s=>({...s,preRelease:E})),C.CancellationToken.None);for(const s of u)m.set(s.identifier.id.toLowerCase(),s);return m}async installFromGallery({id:l,version:m,installOptions:E},u,s,t,n){const i=await this.extensionGalleryService.getManifest(u,C.CancellationToken.None);if(i&&!this.validateExtensionKind(i,n))return null;const r=s.find(o=>(0,w.areSameExtensions)(o.identifier,u.identifier));if(r){if(u.version===r.manifest.version)return n.log((0,d.localize)(10,null,m?`${l}@${m}`:l)),null;n.log((0,d.localize)(11,null,l,u.version))}try{E.isBuiltin?n.log(m?(0,d.localize)(12,null,l,m):(0,d.localize)(13,null,l)):n.log(m?(0,d.localize)(14,null,l,m):(0,d.localize)(15,null,l));const o=await this.extensionManagementService.installFromGallery(u,{...E,installGivenVersion:!!m});return n.log((0,d.localize)(16,null,l,o.manifest.version)),i}catch(o){if((0,R.isCancellationError)(o))return n.log((0,d.localize)(17,null,l)),null;throw o}}validateExtensionKind(l,m){return!0}async validateVSIX(l,m,E,u){const s={id:(0,w.getGalleryExtensionId)(l.publisher,l.name)},n=(await this.extensionManagementService.getInstalled(1,E)).find(i=>(0,w.areSameExtensions)(s,i.identifier)&&(0,O.gt)(i.manifest.version,l.version));return n&&!m?(u.log((0,d.localize)(18,null,n.identifier.id,n.manifest.version,l.version)),!1):this.validateExtensionKind(l,u)}async uninstallExtensions(l,m,E,u=console){const s=async n=>{if(n instanceof v.URI){const i=await this.extensionManagementService.getManifest(n);return p(i)}return n},t=[];for(const n of l){const i=await s(n),o=(await this.extensionManagementService.getInstalled(void 0,E)).filter(c=>(0,w.areSameExtensions)(c.identifier,{id:i}));if(!o.length)throw new Error(`${this.notInstalled(i)} ${S}`);if(o.some(c=>c.type===0)){u.log((0,d.localize)(19,null,i));return}if(!m&&o.some(c=>c.isBuiltin)){u.log((0,d.localize)(20,null,i));return}u.log((0,d.localize)(21,null,i));for(const c of o)await this.extensionManagementService.uninstall(c,{profileLocation:E}),t.push(c);this.location?u.log((0,d.localize)(22,null,i,this.location)):u.log((0,d.localize)(23,null,i))}}async locateExtension(l,m=console){const E=await this.extensionManagementService.getInstalled();l.forEach(u=>{E.forEach(s=>{if(s.identifier.id===u&&s.location.scheme===I.Schemas.file){m.log(s.location.fsPath);return}})})}notInstalled(l){return this.location?(0,d.localize)(24,null,l,this.location):(0,d.localize)(25,null,l)}};P=de([ee(0,h.IExtensionManagementService),ee(1,h.IExtensionGalleryService)],P),e.ExtensionManagementCLI=P}),define(Q[41],Z([0,1,3,15,2,39,10,23,13,8,9]),function(_,e,C,R,I,k,O,v,d,h,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfileScannerService=e.IExtensionsProfileScannerService=void 0,e.IExtensionsProfileScannerService=(0,h.createDecorator)("IExtensionsProfileScannerService");let b=class extends I.Disposable{constructor(S,p){super(),this.fileService=S,this.logService=p,this.resourcesAccessQueueMap=new k.ResourceMap}scanProfileExtensions(S){return this.withProfileExtensions(S)}addExtensionsToProfile(S,p){return this.withProfileExtensions(p,P=>(P=P.filter(y=>S.some(([l])=>!(0,v.areSameExtensions)(y.identifier,l.identifier))),P.push(...S.map(([y,l])=>({identifier:y.identifier,version:y.manifest.version,location:y.location,metadata:l}))),P))}removeExtensionFromProfile(S,p){return this.withProfileExtensions(p,P=>P.filter(y=>!(0,v.areSameExtensions)(y.identifier,S)))}async withProfileExtensions(S,p){return this.getResourceAccessQueue(S).queue(async()=>{let P=[];try{const y=await this.fileService.readFile(S),l=JSON.parse(y.value.toString());for(const m of l){if(!m.identifier){this.logService.info("Ignoring invalid extension while scanning. Identifier does not exist.",m);continue}if(!m.location){this.logService.info("Ignoring invalid extension while scanning. Location does not exist.",m);continue}if(!m.version){this.logService.info("Ignoring invalid extension while scanning. Version does not exist.",m);continue}P.push({identifier:m.identifier,location:O.URI.revive(m.location),version:m.version,metadata:m.metadata})}}catch(y){y.fileOperationResult!==1&&this.logService.error(y)}if(p){P=p(P);const y=P.map(l=>({identifier:l.identifier,version:l.version,location:l.location.toJSON(),metadata:l.metadata}));await this.fileService.writeFile(S,R.VSBuffer.fromString(JSON.stringify(y)))}return P})}getResourceAccessQueue(S){let p=this.resourcesAccessQueueMap.get(S);return p||(p=new C.Queue,this.resourcesAccessQueueMap.set(S,p)),p}};b=de([ee(0,d.IFileService),ee(1,w.ILogService)],b),e.ExtensionsProfileScannerService=b}),define(Q[124],Z([0,1,3,11,2,16,12,18,38,30,20,21,17,22,23,59,13,9]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsDownloader=void 0;let m=class je extends I.Disposable{constructor(u,s,t,n,i,r){super(),this.fileService=s,this.extensionGalleryService=t,this.configurationService=n,this.extensionSignatureVerificationService=i,this.logService=r,this.extensionsDownloadDir=u.extensionsDownloadLocation,this.cache=20,this.cleanUpPromise=this.cleanUp()}async download(u,s){await this.cleanUpPromise;const t=(0,v.joinPath)(this.extensionsDownloadDir,this.getName(u));try{await this.downloadFile(u,t,i=>this.extensionGalleryService.download(u,i,s))}catch(i){throw new S.ExtensionManagementError(i.message,S.ExtensionManagementErrorCode.Download)}let n=!1;if(u.isSigned&&this.configurationService.getValue("extensions.verifySignature")===!0){const i=await this.downloadSignatureArchive(u);try{n=await this.extensionSignatureVerificationService.verify(t.fsPath,i.fsPath),this.logService.info(`Verified extension: ${u.identifier.id}`,n)}catch(r){throw await this.delete(i),await this.delete(t),new S.ExtensionManagementError(r.code,S.ExtensionManagementErrorCode.Signature)}}return{location:t,verified:n}}async downloadSignatureArchive(u){await this.cleanUpPromise;const s=(0,v.joinPath)(this.extensionsDownloadDir,`${this.getName(u)}${je.SignatureArchiveExtension}`);return await this.downloadFile(u,s,t=>this.extensionGalleryService.downloadSignatureArchive(u,t)),s}async downloadFile(u,s,t){if(await this.fileService.exists(s))return;if(s.scheme!==k.Schemas.file){await t(s);return}const n=(0,v.joinPath)(this.extensionsDownloadDir,`.${(0,h.generateUuid)()}`);await this.fileService.exists(n)||await t(n);try{await this.rename(n,s,Date.now()+2*60*1e3)}catch(i){try{await this.fileService.del(n)}catch{}if(i.code==="ENOTEMPTY")this.logService.info("Rename failed because the file was downloaded by another source. So ignoring renaming.",u.identifier.id,s.path);else throw this.logService.info(`Rename failed because of ${(0,R.getErrorMessage)(i)}. Deleted the file from downloaded location`,n.path),i}}async delete(u){await this.cleanUpPromise,await this.fileService.del(u)}async rename(u,s,t){try{await w.Promises.rename(u.fsPath,s.fsPath)}catch(n){if(O.isWindows&&n&&n.code==="EPERM"&&Date.now()o),r=[];for(const o of i)o.sort((c,a)=>d.rcompare(c[0].version,a[0].version)),s.push(...o.slice(1).map(c=>c[1].resource)),r.push(o[0][1]);r.sort((o,c)=>o.mtime-c.mtime),s.push(...r.slice(0,Math.max(0,r.length-this.cache)).map(o=>o.resource)),s.push(...n),await C.Promises.settled(s.map(o=>(this.logService.trace("Deleting from cache",o.path),this.fileService.del(o))))}}catch(u){this.logService.error(u)}}getName(u){return this.cache?p.ExtensionKey.create(u).toString().toLowerCase():(0,h.generateUuid)()}};m.SignatureArchiveExtension=".sigzip",m=de([ee(0,g.INativeEnvironmentService),ee(1,y.IFileService),ee(2,S.IExtensionGalleryService),ee(3,b.IConfigurationService),ee(4,P.IExtensionSignatureVerificationService),ee(5,l.ILogService)],m),e.ExtensionsDownloader=m}),define(Q[125],Z([0,1,2,14,20,34]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsManifestCache=void 0;class O extends C.Disposable{constructor(d,h){super(),this.environmentService=d,this.extensionsManifestCache=(0,R.join)(this.environmentService.userDataPath,k.MANIFEST_CACHE_FOLDER,k.USER_MANIFEST_CACHE_FILE),this._register(h.onDidInstallExtensions(w=>this.onDidInstallExtensions(w))),this._register(h.onDidUninstallExtension(w=>this.onDidUnInstallExtension(w)))}onDidInstallExtensions(d){d.some(h=>!!h.local)&&this.invalidate()}onDidUnInstallExtension(d){d.error||this.invalidate()}invalidate(){I.Promises.rm(this.extensionsManifestCache,I.RimRafMode.MOVE).then(()=>{},()=>{})}}e.ExtensionsManifestCache=O}),define(Q[126],Z([0,1,157,19,3,2,16,14,20,17,22,23,9,63,12,10]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLanguagePackService=void 0;let y=class extends S.LanguagePackBaseService{constructor(u,s,t,n){super(t),this.extensionManagementService=u,this.logService=n,this.cache=this._register(new l(s,n)),this.extensionManagementService.registerParticipant({postInstall:async i=>this.postInstallExtension(i),postUninstall:async i=>this.postUninstallExtension(i)})}async getBuiltInExtensionTranslationsUri(u){const t=(await this.cache.getLanguagePacks())[p.Language.value()];if(!t){this.logService.warn(`No language pack found for ${p.Language.value()}`);return}const n=t.translations[u];return n?P.URI.file(n):void 0}async getInstalledLanguages(){const u=await this.cache.getLanguagePacks(),s=Object.keys(u).map(t=>{const n=u[t];return{...this.createQuickPickItem(t,n.label),extensionId:n.extensions[0].extensionIdentifier.id}});return s.push({...this.createQuickPickItem("en","English"),extensionId:"default"}),s.sort((t,n)=>t.label.localeCompare(n.label)),s}async postInstallExtension(u){u&&u.manifest&&u.manifest.contributes&&u.manifest.contributes.localizations&&u.manifest.contributes.localizations.length&&(this.logService.info("Adding language packs from the extension",u.identifier.id),await this.update())}async postUninstallExtension(u){const s=await this.cache.getLanguagePacks();Object.keys(s).some(t=>s[t]&&s[t].extensions.some(n=>(0,b.areSameExtensions)(n.extensionIdentifier,u.identifier)))&&(this.logService.info("Removing language packs from the extension",u.identifier.id),await this.update())}async update(){const[u,s]=await Promise.all([this.cache.getLanguagePacks(),this.extensionManagementService.getInstalled()]),t=await this.cache.update(s);return!(0,R.equals)(Object.keys(u),Object.keys(t))}};y=de([ee(0,w.IExtensionManagementService),ee(1,h.INativeEnvironmentService),ee(2,w.IExtensionGalleryService),ee(3,g.ILogService)],y),e.NativeLanguagePackService=y;let l=class extends k.Disposable{constructor(u,s){super(),this.logService=s,this.languagePacks={},this.languagePacksFilePath=(0,v.join)(u.userDataPath,"languagepacks.json"),this.languagePacksFileLimiter=new I.Queue}getLanguagePacks(){return this.languagePacksFileLimiter.size||!this.initializedCache?this.withLanguagePacks().then(()=>this.languagePacks):Promise.resolve(this.languagePacks)}update(u){return this.withLanguagePacks(s=>{Object.keys(s).forEach(t=>delete s[t]),this.createLanguagePacksFromExtensions(s,...u)}).then(()=>this.languagePacks)}createLanguagePacksFromExtensions(u,...s){for(const t of s)t&&t.manifest&&t.manifest.contributes&&t.manifest.contributes.localizations&&t.manifest.contributes.localizations.length&&this.createLanguagePacksFromExtension(u,t);Object.keys(u).forEach(t=>this.updateHash(u[t]))}createLanguagePacksFromExtension(u,s){const t=s.identifier,n=s.manifest.contributes&&s.manifest.contributes.localizations?s.manifest.contributes.localizations:[];for(const i of n)if(s.location.scheme===O.Schemas.file&&m(i)){let r=u[i.languageId];r||(r={hash:"",extensions:[],translations:{},label:i.localizedLanguageName??i.languageName},u[i.languageId]=r);const o=r.extensions.filter(c=>(0,b.areSameExtensions)(c.extensionIdentifier,t))[0];o?o.version=s.manifest.version:r.extensions.push({extensionIdentifier:t,version:s.manifest.version});for(const c of i.translations)r.translations[c.id]=(0,v.join)(s.location.fsPath,c.path)}}updateHash(u){if(u){const s=(0,C.createHash)("md5");for(const t of u.extensions)s.update(t.extensionIdentifier.uuid||t.extensionIdentifier.id).update(t.version);u.hash=s.digest("hex")}}withLanguagePacks(u=()=>null){return this.languagePacksFileLimiter.queue(()=>{let s=null;return d.Promises.readFile(this.languagePacksFilePath,"utf8").then(void 0,t=>t.code==="ENOENT"?Promise.resolve("{}"):Promise.reject(t)).then(t=>{try{return JSON.parse(t)}catch{return{}}}).then(t=>(s=u(t),t)).then(t=>{for(const i of Object.keys(t))t[i]||delete t[i];this.languagePacks=t,this.initializedCache=!0;const n=JSON.stringify(this.languagePacks);return this.logService.debug("Writing language packs",n),d.Promises.writeFile(this.languagePacksFilePath,n)}).then(()=>s,t=>this.logService.error(t))})}};l=de([ee(0,h.INativeEnvironmentService),ee(1,g.ILogService)],l);function m(E){if(typeof E.languageId!="string"||!Array.isArray(E.translations)||E.translations.length===0)return!1;for(const u of E.translations)if(typeof u.id!="string"||typeof u.path!="string")return!1;return!(E.languageName&&typeof E.languageName!="string"||E.localizedLanguageName&&typeof E.localizedLanguageName!="string")}}),define(Q[47],Z([0,1,15,95,40,8,33]),function(_,e,C,R,I,k,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asTextOrError=e.asText=e.isSuccess=e.IRequestService=void 0,e.IRequestService=(0,k.createDecorator)("requestService");function v(P){return P.res.statusCode&&P.res.statusCode>=200&&P.res.statusCode<300||P.res.statusCode===1223}e.isSuccess=v;function d(P){return P.res.statusCode===204}async function h(P){return d(P)?null:(await(0,C.streamToBuffer)(P.stream)).toString()}e.asText=h;async function w(P){if(!v(P))throw new Error("Server returned "+P.res.statusCode);return h(P)}e.asTextOrError=w;async function b(P){if(!v(P))throw new Error("Server returned "+P.res.statusCode);if(d(P))return null;const l=(await(0,C.streamToBuffer)(P.stream)).toString();try{return JSON.parse(l)}catch(m){throw m.message+=`: `+l,m}}e.asJson=b;function g(P){p(P)}e.updateProxyConfigurationsScope=g;let S;function p(P){const y=O.Registry.as(I.Extensions.Configuration),l=S;S={id:"http",order:15,title:(0,R.localize)(0,null),type:"object",scope:P,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks5?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,R.localize)(1,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,R.localize)(2,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,R.localize)(3,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,R.localize)(4,null),(0,R.localize)(5,null),(0,R.localize)(6,null),(0,R.localize)(7,null)],default:"override",description:(0,R.localize)(8,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,R.localize)(9,null),restricted:!0}}},y.updateConfigurations({add:[S],remove:l?[l]:[]})}p(2)}),define(Q[127],Z([0,1,24,16,13,47]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadService=void 0;let O=class{constructor(d,h){this.requestService=d,this.fileService=h}async download(d,h,w=C.CancellationToken.None){if(d.scheme===R.Schemas.file||d.scheme===R.Schemas.vscodeRemote){await this.fileService.copy(d,h);return}const b={type:"GET",url:d.toString(!0)},g=await this.requestService.request(b,w);if(g.res.statusCode===200)await this.fileService.writeFile(h,g.stream);else{const S=await(0,k.asTextOrError)(g);throw new Error(`Expected 200, got back ${g.res.statusCode} instead. ${S}`)}}};O=de([ee(0,k.IRequestService),ee(1,I.IFileService)],O),e.DownloadService=O}),define(Q[128],Z([0,1,129,5]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProxyAgent=void 0;function I(O,v){return O.protocol==="http:"?v.HTTP_PROXY||v.http_proxy||null:O.protocol==="https:"&&(v.HTTPS_PROXY||v.https_proxy||v.HTTP_PROXY||v.http_proxy)||null}async function k(O,v,d={}){const h=(0,C.parse)(O),w=d.proxyUrl||I(h,v);if(!w)return null;const b=(0,C.parse)(w);if(!/^https?:$/.test(b.protocol||""))return null;const g={host:b.hostname||"",port:b.port||(b.protocol==="https"?"443":"80"),auth:b.auth,rejectUnauthorized:(0,R.isBoolean)(d.strictSSL)?d.strictSSL:!0};return h.protocol==="http:"?new(await new Promise((S,p)=>{_(["http-proxy-agent"],S,p)}))(g):new(await new Promise((S,p)=>{_(["https-proxy-agent"],S,p)}))(g)}e.getProxyAgent=k}),define(Q[130],Z([0,1,57,14,96,24,31,11,12,30,78,158,3]),function(_,e,C,R,I,k,O,v,d,h,w,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getResolvedShellEnv=void 0;const S=1e4;let p;async function P(l,m,E){return m["force-disable-user-env"]?(l.trace("resolveShellEnv(): skipped (--force-disable-user-env)"),{}):d.isWindows?(l.trace("resolveShellEnv(): skipped (Windows)"),{}):(0,b.isLaunchedFromCli)(E)&&!m["force-user-env"]?(l.trace("resolveShellEnv(): skipped (VSCODE_CLI is set)"),{}):((0,b.isLaunchedFromCli)(E)?l.trace("resolveShellEnv(): running (--force-user-env)"):l.trace("resolveShellEnv(): running (macOS/Linux)"),p||(p=g.Promises.withAsyncBody(async(u,s)=>{const t=new k.CancellationTokenSource,n=setTimeout(()=>{t.dispose(!0),s(new Error((0,I.localize)(0,null)))},S);try{u(await y(l,t.token))}catch(i){!(0,v.isCancellationError)(i)&&!t.token.isCancellationRequested?s(new Error((0,I.localize)(1,null,(0,O.toErrorMessage)(i)))):u({})}finally{clearTimeout(n),t.dispose()}})),p)}e.getResolvedShellEnv=P;async function y(l,m){const E=process.env.ELECTRON_RUN_AS_NODE;l.trace("getUnixShellEnvironment#runAsNode",E);const u=process.env.ELECTRON_NO_ATTACH_CONSOLE;l.trace("getUnixShellEnvironment#noAttach",u);const s=(0,h.generateUuid)().replace(/-/g,"").substr(0,12),t=new RegExp(s+"(.*)"+s),n={...process.env,ELECTRON_RUN_AS_NODE:"1",ELECTRON_NO_ATTACH_CONSOLE:"1"};l.trace("getUnixShellEnvironment#env",n);const i=await(0,w.getSystemShell)(d.OS,n);return l.trace("getUnixShellEnvironment#shell",i),new Promise((r,o)=>{if(m.isCancellationRequested)return o((0,v.canceled)());const c=(0,R.basename)(i);let a,f;const D=process.versions.electron&&process.versions["microsoft-build"]?"--ms-enable-electron-run-as-node":"";/^pwsh(-preview)?$/.test(c)?(a=`& '${process.execPath}' ${D} -p '''${s}'' + JSON.stringify(process.env) + ''${s}'''`,f=["-Login","-Command"]):(a=`'${process.execPath}' ${D} -p '"${s}" + JSON.stringify(process.env) + "${s}"'`,c==="tcsh"?f=["-ic"]:f=["-ilc"]),l.trace("getUnixShellEnvironment#spawn",JSON.stringify(f),a);const N=(0,C.spawn)(i,[...f,a],{detached:!0,stdio:["ignore","pipe","pipe"],env:n});m.onCancellationRequested(()=>(N.kill(),o((0,v.canceled)()))),N.on("error",J=>{l.error("getUnixShellEnvironment#errorChildProcess",(0,O.toErrorMessage)(J)),o(J)});const B=[];N.stdout.on("data",J=>B.push(J));const X=[];N.stderr.on("data",J=>X.push(J)),N.on("close",(J,se)=>{const ne=Buffer.concat(B).toString("utf8");l.trace("getUnixShellEnvironment#raw",ne);const re=Buffer.concat(X).toString("utf8");if(re.trim()&&l.trace("getUnixShellEnvironment#stderr",re),J||se)return o(new Error((0,I.localize)(2,null,J,se)));const ge=t.exec(ne),ce=ge?ge[1]:"{}";try{const te=JSON.parse(ce);E?te.ELECTRON_RUN_AS_NODE=E:delete te.ELECTRON_RUN_AS_NODE,u?te.ELECTRON_NO_ATTACH_CONSOLE=u:delete te.ELECTRON_NO_ATTACH_CONSOLE,delete te.XDG_RUNTIME_DIR,l.trace("getUnixShellEnvironment#result",te),r(te)}catch(te){l.error("getUnixShellEnvironment#errorCaught",(0,O.toErrorMessage)(te)),o(te)}})})}}),define(Q[66],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStateService=void 0,e.IStateService=(0,C.createDecorator)("stateService")}),define(Q[131],Z([0,1,3,15,5,17,13,9]),function(_,e,C,R,I,k,O,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StateService=e.FileStorage=void 0;class d{constructor(b,g,S){this.storagePath=b,this.logService=g,this.fileService=S,this.storage=Object.create(null),this.lastSavedStorageContents="",this.flushDelayer=new C.ThrottledDelayer(100),this.initializing=void 0,this.closing=void 0}init(){return this.initializing||(this.initializing=this.doInit()),this.initializing}async doInit(){try{this.lastSavedStorageContents=(await this.fileService.readFile(this.storagePath)).value.toString(),this.storage=JSON.parse(this.lastSavedStorageContents)}catch(b){b.fileOperationResult!==1&&this.logService.error(b)}}getItem(b,g){const S=this.storage[b];return(0,I.isUndefinedOrNull)(S)?g:S}setItem(b,g){this.setItems([{key:b,data:g}])}setItems(b){let g=!1;for(const{key:S,data:p}of b)this.storage[S]!==p&&((0,I.isUndefinedOrNull)(p)?(0,I.isUndefined)(this.storage[S])||(this.storage[S]=void 0,g=!0):(this.storage[S]=p,g=!0));g&&this.save()}removeItem(b){(0,I.isUndefined)(this.storage[b])||(this.storage[b]=void 0,this.save())}async save(){if(!this.closing)return this.flushDelayer.trigger(()=>this.doSave())}async doSave(){if(!this.initializing)return;await this.initializing;const b=JSON.stringify(this.storage,null,4);if(b!==this.lastSavedStorageContents)try{await this.fileService.writeFile(this.storagePath,R.VSBuffer.fromString(b)),this.lastSavedStorageContents=b}catch(g){this.logService.error(g)}}async close(){return this.closing||(this.closing=this.flushDelayer.trigger(()=>this.doSave(),0)),this.closing}}e.FileStorage=d;let h=class{constructor(b,g,S){this.fileStorage=new d(b.stateResource,g,S)}async init(){await this.fileStorage.init()}getItem(b,g){return this.fileStorage.getItem(b,g)}};h=de([ee(0,k.IEnvironmentService),ee(1,v.ILogService),ee(2,O.IFileService)],h),e.StateService=h}),define(Q[67],Z([0,1,12,32,10,30]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;function O(h){if(C.platform===2&&/^penguin(\.|$)/i.test(h))return"chromebook"}async function v(h,w,b,g,S,p,P,y,l,m){const E=Object.create(null);E["common.machineId"]=P,E.sessionID=(0,k.generateUuid)()+Date.now(),E.commitHash=S,E.version=p,E["common.platformVersion"]=(w||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),E["common.platform"]=(0,C.PlatformToString)(C.platform),E["common.nodePlatform"]=R.platform,E["common.nodeArch"]=g,E["common.product"]=m||"desktop",y&&(E["common.msftInternal"]=y);let u=0;const s=Date.now();Object.defineProperties(E,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-s,enumerable:!0},"common.sequence":{get:()=>u++,enumerable:!0}}),C.isLinuxSnap&&(E["common.snap"]="true");const t=O(b);t&&(E["common.platformDetail"]=t);try{const n=await h.readFile(I.URI.file(l));E["common.source"]=n.value.toString().slice(0,30)}catch{}return E}e.resolveCommonProperties=v;function d(h){const w=R.env.USERDNSDOMAIN;if(!w)return!1;const b=w.toLowerCase();return h.some(g=>b===g)}e.verifyMicrosoftInternalDomain=d}),define(Q[35],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,C.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,C.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var R;(function(k){k[k.NONE=0]="NONE",k[k.CRASH=1]="CRASH",k[k.ERROR=2]="ERROR",k[k.USAGE=3]="USAGE"})(R=e.TelemetryLevel||(e.TelemetryLevel={}));var I;(function(k){k.OFF="off",k.CRASH="crash",k.ERROR="error",k.ON="all"})(I=e.TelemetryConfiguration||(e.TelemetryConfiguration={}))}),define(Q[42],Z([0,1,26,52,5,21,67,35]),function(_,e,C,R,I,k,O,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=void 0;class d{constructor(){this.sendErrorTelemetry=!1,this.telemetryLevel=(0,R.staticObservableValue)(0)}publicLog(r,o){return Promise.resolve(void 0)}publicLog2(r,o){return this.publicLog(r,o)}publicLogError(r,o){return Promise.resolve(void 0)}publicLogError2(r,o){return this.publicLogError(r,o)}setExperimentProperty(){}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId",firstSessionDate:"someValue.firstSessionDate"})}}e.NullTelemetryServiceShape=d,e.NullTelemetryService=new d;class h{async publicLog(r,o,c){}async publicLogError(r,o,c){}}e.NullEndpointTelemetryService=h,e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function w(i,r){return r.onDidChangeConfiguration(o=>{o.source!==7&&i.publicLog2("updateConfiguration",{configurationSource:(0,k.ConfigurationTargetToString)(o.source),configurationKeys:l(o.sourceConfig)})})}e.configurationTelemetry=w;function b(i,r){return!(r.disableTelemetry||!i.enableTelemetry||r.extensionTestsLocationURI)}e.supportsTelemetry=b;function g(i){const r=i.getValue(v.TELEMETRY_SETTING_ID),o=i.getValue("telemetry.enableCrashReporter");if(i.getValue(v.TELEMETRY_OLD_SETTING_ID)===!1||o===!1)return 0;switch(r??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=g;function S(i){const r={},o={},c={};y(i,c);for(let a in c){a=a.length>150?a.substr(a.length-149):a;const f=c[a];typeof f=="number"?o[a]=f:typeof f=="boolean"?o[a]=f?1:0:typeof f=="string"?(f.length>8192&&console.warn(`Telemetry property: ${a} has been trimmed to 8192, the original length is ${f.length}`),r[a]=f.substring(0,8191)):typeof f<"u"&&f!==null&&(r[a]=f)}return{properties:r,measurements:o}}e.validateTelemetryData=S;const p=["ssh-remote","dev-container","attached-container","wsl","tunneling","codespaces"];function P(i){if(!i)return"none";for(const r of p)if(i.startsWith(`${r}+`))return r;return"other"}e.cleanRemoteAuthority=P;function y(i,r,o=0,c){if(!!i)for(const a of Object.getOwnPropertyNames(i)){const f=i[a],D=c?c+a:a;Array.isArray(f)?r[D]=(0,C.safeStringify)(f):f instanceof Date?r[D]=f.toISOString():(0,I.isObject)(f)?o<2?y(f,r,o+1,D+"."):r[D]=(0,C.safeStringify)(f):r[D]=f}}function l(i){if(!i)return[];const r=[];return m(r,"",i),r}function m(i,r,o){o&&typeof o=="object"&&!Array.isArray(o)?Object.keys(o).forEach(c=>m(i,r?`${r}.${c}`:c,o[c])):i.push(r)}function E(i,r){const o=i.msftInternalDomains||[],c=r.getValue("telemetry.internalTesting");return(0,O.verifyMicrosoftInternalDomain)(o)||c}e.isInternalTelemetry=E;function u(i){return[i.appRoot,i.extensionsPath,i.userHome.fsPath,i.tmpDir.fsPath,i.userDataPath]}e.getPiiPathsFromEnvironment=u;function s(i,r){if(!i||!i.includes("/")&&!i.includes("\\"))return i;let o=i;const c=[];for(const N of r)for(;;){const B=N.exec(i);if(!B)break;c.push([B.index,N.lastIndex])}const a=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,f=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let D=0;for(o="";;){const N=f.exec(i);if(!N)break;const B=c.some(([X,J])=>N.index",D=f.lastIndex)}return D`;return i}function n(i,r){return(0,C.cloneAndChange)(i,o=>{if(typeof o=="string"){let c=o;c=s(c,r);for(const a of r)c=c.replace(a,"");return c=t(c),c}})}e.cleanData=n}),define(Q[132],Z([0,1,104,42]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function I(k,O,v,d,h,w,b){const g={"X-Market-Client-Id":`VSCode ${k}`,"User-Agent":`VSCode ${k} (${O.nameShort})`};if((0,R.supportsTelemetry)(O,v)&&(0,R.getTelemetryLevel)(d)===3){const S=await(0,C.getServiceMachineId)(v,h,w),{sessionId:p}=await b.getTelemetryInfo();g["X-Market-User-Id"]=S,g["VSCode-SessionId"]=p}return g}e.resolveMarketplaceHeaders=I}),define(Q[133],Z([0,1,11,26,42]),function(_,e,C,R,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractOneDataSystemAppender=void 0;const k="https://mobile.events.data.microsoft.com/OneCollector/1.0";async function O(d,h,w){const b=await new Promise((y,l)=>{_(["@microsoft/1ds-core-js"],y,l)}),g=await new Promise((y,l)=>{_(["@microsoft/1ds-post-js"],y,l)}),S=new b.AppInsightsCore,p=new g.PostChannel,P={instrumentationKey:d,endpointUrl:k,loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[p]]};if(w){P.extensionConfig={};const y={alwaysUseXhrOverride:!0,httpXHROverride:w};P.extensionConfig[p.identifier]=y}return S.initialize(P,[]),S.addTelemetryInitializer(y=>{h&&(y.ext=y.ext??{},y.ext.utc=y.ext.utc??{},y.ext.utc.flags=8462029)}),S}class v{constructor(h,w,b,g,S){this._isInternalTelemetry=h,this._eventPrefix=w,this._defaultData=b,this._xhrOverride=S,this.endPointUrl=k,this._defaultData||(this._defaultData={}),typeof g=="function"?this._aiCoreOrKey=g():this._aiCoreOrKey=g,this._asyncAiCore=null}_withAIClient(h){if(!!this._aiCoreOrKey){if(typeof this._aiCoreOrKey!="string"){h(this._aiCoreOrKey);return}this._asyncAiCore||(this._asyncAiCore=O(this._aiCoreOrKey,this._isInternalTelemetry,this._xhrOverride)),this._asyncAiCore.then(w=>{h(w)},w=>{(0,C.onUnexpectedError)(w),console.error(w)})}}log(h,w){if(!this._aiCoreOrKey)return;w=(0,R.mixin)(w,this._defaultData),w=(0,I.validateTelemetryData)(w);const b=this._eventPrefix+"/"+h;try{this._withAIClient(g=>{g.pluginVersionString=w?.properties.version??"Unknown",g.track({name:b,baseData:{name:b,properties:w?.properties,measurements:w?.measurements}})})}catch{}}flush(){return this._aiCoreOrKey?new Promise(h=>{this._withAIClient(w=>{w.unload(!0,()=>{this._aiCoreOrKey=void 0,h(void 0)})})}):Promise.resolve(void 0)}}e.AbstractOneDataSystemAppender=v}),define(Q[134],Z([0,1,2,26,52,12,27,97,21,40,135,28,33,35,42]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let P=class{constructor(m,E,u){this._configurationService=E,this._productService=u,this._experimentProperties={},this.telemetryLevel=new I.MutableObservableValue(3),this._disposables=new C.DisposableStore,this._cleanupPatterns=[],this._appenders=m.appenders,this._commonProperties=m.commonProperties||Promise.resolve({}),this._piiPaths=m.piiPaths||[],this._sendErrorTelemetry=!!m.sendErrorTelemetry,this._cleanupPatterns=[/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi];for(const s of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,O.escapeRegExpCharacters)(s),"gi"));this._updateTelemetryLevel(),this._configurationService.onDidChangeConfiguration(this._updateTelemetryLevel,this,this._disposables)}setExperimentProperty(m,E){this._experimentProperties[m]=E}_updateTelemetryLevel(){let m=(0,p.getTelemetryLevel)(this._configurationService);const E=this._productService.enabledTelemetryLevels;if(E){this._sendErrorTelemetry=this.sendErrorTelemetry?E.error:!1;const u=E.usage?3:E.error?2:0;m=Math.min(m,u)}this.telemetryLevel.value=m}get sendErrorTelemetry(){return this._sendErrorTelemetry}async getTelemetryInfo(){const m=await this._commonProperties,E=m.sessionID,u=m["common.machineId"],s=m["common.firstSessionDate"],t=m["common.msftInternal"];return{sessionId:E,machineId:u,firstSessionDate:s,msftInternal:t}}dispose(){this._disposables.dispose()}_log(m,E,u,s){return this.telemetryLevel.value{u=(0,R.mixin)(u,this._experimentProperties),u=(0,p.cleanData)(u,this._cleanupPatterns),u=(0,R.mixin)(u,t),this._appenders.forEach(n=>n.log(m,u))},t=>{console.error(t)})}publicLog(m,E,u){return this._log(m,3,E,u)}publicLog2(m,E,u){return this.publicLog(m,E,u)}publicLogError(m,E){return this._sendErrorTelemetry?this._log(m,2,E,!0):Promise.resolve(void 0)}publicLogError2(m,E){return this.publicLogError(m,E)}};P.IDLE_START_EVENT_NAME="UserIdleStart",P.IDLE_STOP_EVENT_NAME="UserIdleStop",P=de([ee(1,d.IConfigurationService),ee(2,b.IProductService)],P),e.TelemetryService=P;function y(){const l=(0,v.localize)(0,null,w.default.nameLong),m=w.default.privacyStatementUrl?(0,v.localize)(2,null,"https://aka.ms/vscode-telemetry",w.default.privacyStatementUrl):(0,v.localize)(1,null,"https://aka.ms/vscode-telemetry"),E=k.isWeb?"":(0,v.localize)(3,null),u=(0,v.localize)(4,null),s=(0,v.localize)(5,null),t=(0,v.localize)(6,null),n=(0,v.localize)(7,null),i=` | | ${u} | ${s} | ${t} | |:------|:---------------------:|:---------------:|:--------------:| | all | \u2713 | \u2713 | \u2713 | | error | \u2713 | \u2713 | - | | crash | \u2713 | - | - | | off | - | - | - | `,r=(0,v.localize)(8,null);return` ${l} ${m} ${E}   ${n} ${i}   ${r} `}g.Registry.as(h.Extensions.Configuration).registerConfiguration({id:S.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,v.localize)(9,null),properties:{[S.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,v.localize)(10,null),(0,v.localize)(11,null),(0,v.localize)(12,null),(0,v.localize)(13,null)],markdownDescription:y(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),g.Registry.as(h.Extensions.Configuration).registerConfiguration({id:S.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,v.localize)(14,null),properties:{[S.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:w.default.privacyStatementUrl?(0,v.localize)(16,null,w.default.nameLong,w.default.privacyStatementUrl):(0,v.localize)(15,null,w.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,v.localize)(17,null,`\`#${S.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(Q[136],Z([0,1,159,133]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OneDataSystemAppender=void 0;class I extends R.AbstractOneDataSystemAppender{constructor(O,v,d,h){const w={sendPOST:(b,g)=>{const S={method:"POST",headers:{...b.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(b.data)}};try{const p=C.request(b.urlString,S,P=>{P.on("data",function(y){g(P.statusCode??200,P.headers,y.toString())}),P.on("error",function(y){g(0,{})})});p.write(b.data),p.end()}catch{g(0,{})}}};super(O,v,d,h,w)}}e.OneDataSystemAppender=I}),define(Q[137],Z([0,1,14,20]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildTelemetryMessage=void 0;async function I(k,O){const v=Object.create(null),d=(w,b)=>{const g=JSON.parse(w);v[b]=g};if(O){const w=[],b=await R.Promises.readdir(O);for(const S of b)try{(await R.Promises.stat((0,C.join)(O,S))).isDirectory()&&w.push(S)}catch{}const g=[];for(const S of w)(await R.Promises.readdir((0,C.join)(O,S))).filter(P=>P==="telemetry.json").length===1&&g.push(S);for(const S of g){const p=(await R.Promises.readFile((0,C.join)(O,S,"telemetry.json"))).toString();d(p,S)}}let h=(await R.Promises.readFile((0,C.join)(k,"telemetry-core.json"))).toString();return d(h,"vscode-core"),h=(await R.Promises.readFile((0,C.join)(k,"telemetry-extensions.json"))).toString(),d(h,"vscode-extensions"),JSON.stringify(v,null,4)}e.buildTelemetryMessage=I}),define(Q[29],Z([0,1,8]),function(_,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,C.createDecorator)("IUriIdentityService")}),define(Q[138],Z([0,1,4,2,10,17,23,13,9,29]),function(_,e,C,R,I,k,O,v,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsWatcher=void 0;let w=class extends R.Disposable{constructor(g,S,p,P,y){super(),this.extensionsManagementService=g,this.logService=P,this.uriIdentityService=y,this._onDidChangeExtensionsByAnotherSource=this._register(new C.Emitter),this.onDidChangeExtensionsByAnotherSource=this._onDidChangeExtensionsByAnotherSource.event,this.startTimestamp=0,this.installingExtensions=[],this.extensionsManagementService.getInstalled().then(m=>{this.installedExtensions=m.map(E=>E.identifier),this.startTimestamp=Date.now()}),this._register(g.onInstallExtension(m=>this.onInstallExtension(m))),this._register(g.onDidInstallExtensions(m=>this.onDidInstallExtensions(m))),this._register(g.onDidUninstallExtension(m=>this.onDidUninstallExtension(m)));const l=I.URI.file(p.extensionsPath);this._register(S.watch(l)),this._register(C.Event.filter(S.onDidFilesChange,m=>m.rawChanges.some(E=>this.doesChangeAffects(E,l)))(()=>this.onDidChange()))}doesChangeAffects(g,S){return g.type!==1&&g.type!==2||!this.uriIdentityService.extUri.isEqual(this.uriIdentityService.extUri.dirname(g.resource),S)?!1:this.uriIdentityService.extUri.isEqual(g.resource,this.uriIdentityService.extUri.joinPath(S,".obsolete"))?!0:!this.uriIdentityService.extUri.basename(g.resource).startsWith(".")}onInstallExtension(g){this.addInstallingExtension(g.identifier)}onDidInstallExtensions(g){for(const S of g)this.removeInstallingExtension(S.identifier),S.local&&this.addInstalledExtension(S.identifier)}onDidUninstallExtension(g){g.error||this.removeInstalledExtension(g.identifier)}addInstallingExtension(g){this.removeInstallingExtension(g),this.installingExtensions.push(g)}removeInstallingExtension(g){this.installingExtensions=this.installingExtensions.filter(S=>!(0,O.areSameExtensions)(S,g))}addInstalledExtension(g){this.installedExtensions&&(this.removeInstalledExtension(g),this.installedExtensions.push(g))}removeInstalledExtension(g){this.installedExtensions&&(this.installedExtensions=this.installedExtensions.filter(S=>!(0,O.areSameExtensions)(S,g)))}async onDidChange(){if(this.installedExtensions){const g=await this.extensionsManagementService.getInstalled(),S=g.filter(P=>[...this.installingExtensions,...this.installedExtensions].some(y=>(0,O.areSameExtensions)(y,P.identifier))?!1:P.installedTimestamp&&P.installedTimestamp>this.startTimestamp?(this.logService.info("Detected extension installed from another source",P.identifier.id),!0):(this.logService.info("Ignored extension installed by another source because of invalid timestamp",P.identifier.id),!1)),p=this.installedExtensions.filter(P=>this.installingExtensions.some(y=>(0,O.areSameExtensions)(y,P))?!1:g.every(y=>!(0,O.areSameExtensions)(y.identifier,P))?(this.logService.info("Detected extension removed from another source",P.id),!0):!1);this.installedExtensions=g.map(P=>P.identifier),(S.length||p.length)&&this._onDidChangeExtensionsByAnotherSource.fire({added:S,removed:p})}}};w=de([ee(1,v.IFileService),ee(2,k.INativeEnvironmentService),ee(3,d.ILogService),ee(4,h.IUriIdentityService)],w),e.ExtensionsWatcher=w}),define(Q[139],Z([0,1,29,105,13,18,70,4,2]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class h{constructor(g){this.uri=g,this.time=h._clock++}touch(){return this.time=h._clock++,this}}h._clock=0;let w=class{constructor(g){this._fileService=g,this._dispooables=new d.DisposableStore,this._limit=2**16;const S=new Map,p=P=>{let y=S.get(P.scheme);return y===void 0&&(y=g.hasProvider(P)&&!this._fileService.hasCapability(P,1024),S.set(P.scheme,y)),y};this._dispooables.add(v.Event.any(g.onDidChangeFileSystemProviderRegistrations,g.onDidChangeFileSystemProviderCapabilities)(P=>{S.delete(P.scheme)})),this.extUri=new k.ExtUri(p),this._canonicalUris=new O.SkipList((P,y)=>this.extUri.compare(P,y,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(g){this._fileService.hasProvider(g)&&(g=(0,k.normalizePath)(g));const S=this._canonicalUris.get(g);return S?S.touch().uri.with({fragment:g.fragment}):(this._canonicalUris.set(g,new h(g)),this._checkTrim(),g)}_checkTrim(){if(this._canonicalUris.sizep[1].touchP[1].touch?-1:0);h._clock=0,this._canonicalUris.clear();const S=this._limit*.5;for(let p=0;p"u")return typeof n=="string"?{id:(0,R.basename)(n)}:i?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:void 0;const r=n;if(r.configuration)return{id:r.id,configPath:r.configuration};if(r.folders.length===1)return{id:r.id,uri:r.folders[0].uri}}e.toWorkspaceIdentifier=w;function b(n){const i=n;return typeof i?.id=="string"&&O.URI.isUri(i.configPath)}e.isWorkspaceIdentifier=b;function g(n){const i=n;if(i?.uri)return{id:i.id,uri:O.URI.revive(i.uri)};const r=n;if(r?.configPath)return{id:r.id,configPath:O.URI.revive(r.configPath)};if(n?.id)return{id:n.id}}e.reviveIdentifier=g;var S;(function(n){n[n.EMPTY=1]="EMPTY",n[n.FOLDER=2]="FOLDER",n[n.WORKSPACE=3]="WORKSPACE"})(S=e.WorkbenchState||(e.WorkbenchState={}));function p(n){const i=n;return!!(i&&typeof i=="object"&&typeof i.id=="string"&&Array.isArray(i.folders))}e.isWorkspace=p;function P(n){const i=n;return!!(i&&typeof i=="object"&&O.URI.isUri(i.uri)&&typeof i.name=="string"&&typeof i.toResource=="function")}e.isWorkspaceFolder=P;class y{constructor(i,r,o,c,a){this._id=i,this._transient=o,this._configuration=c,this._ignorePathCasing=a,this._foldersMap=I.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=r}update(i){this._id=i.id,this._configuration=i.configuration,this._transient=i.transient,this._ignorePathCasing=i._ignorePathCasing,this.folders=i.folders}get folders(){return this._folders}set folders(i){this._folders=i,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(i){this._configuration=i}getFolder(i){return i&&this._foldersMap.findSubstr(i)||null}updateFoldersMap(){this._foldersMap=I.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const i of this.folders)this._foldersMap.set(i.uri,i)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=y;class l{constructor(i,r){this.raw=r,this.uri=i.uri,this.index=i.index,this.name=i.name}toResource(i){return(0,k.joinPath)(this.uri,i)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=l;function m(n){return new l({uri:n,index:0,name:(0,k.basenameOrAuthority)(n)},{uri:n.toString()})}e.toWorkspaceFolder=m,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,C.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function E(n,i){return k.extUriBiasedIgnorePathCase.isEqualOrParent(n,i.untitledWorkspacesHome)}e.isUntitledWorkspace=E;function u(n){let i;return O.URI.isUri(n)?i=n:i=n.configuration,i?.scheme===d.Schemas.tmp}e.isTemporaryWorkspace=u;function s(n,i){return!E(n,i)&&!u(n)}e.isSavedWorkspace=s;function t(n){return(typeof n=="string"?(0,R.extname)(n):(0,k.extname)(n))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=t}),define(Q[25],Z([0,1,53,4,2,18,5,10,98,17,13,8,9,140,39,29,3,30,27]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryUserDataProfilesService=e.UserDataProfilesService=e.toUserDataProfile=e.EXTENSIONS_RESOURCE_NAME=e.reviveProfile=e.IUserDataProfilesService=e.PROFILES_ENABLEMENT_CONFIG=e.isUserDataProfile=void 0;function E(i){const r=i;return!!(r&&typeof r=="object"&&typeof r.id=="string"&&typeof r.isDefault=="boolean"&&typeof r.name=="string"&&v.URI.isUri(r.location)&&v.URI.isUri(r.globalStorageHome)&&v.URI.isUri(r.settingsResource)&&v.URI.isUri(r.keybindingsResource)&&v.URI.isUri(r.tasksResource)&&v.URI.isUri(r.snippetsHome)&&((0,O.isUndefined)(r.extensionsResource)||v.URI.isUri(r.extensionsResource)))}e.isUserDataProfile=E,e.PROFILES_ENABLEMENT_CONFIG="workbench.experimental.settingsProfiles.enabled",e.IUserDataProfilesService=(0,b.createDecorator)("IUserDataProfilesService");function u(i,r){return{id:i.id,isDefault:i.isDefault,name:i.name,shortName:i.shortName,location:v.URI.revive(i.location).with({scheme:r}),globalStorageHome:v.URI.revive(i.globalStorageHome).with({scheme:r}),settingsResource:v.URI.revive(i.settingsResource).with({scheme:r}),keybindingsResource:v.URI.revive(i.keybindingsResource).with({scheme:r}),tasksResource:v.URI.revive(i.tasksResource).with({scheme:r}),snippetsHome:v.URI.revive(i.snippetsHome).with({scheme:r}),extensionsResource:v.URI.revive(i.extensionsResource)?.with({scheme:r}),useDefaultFlags:i.useDefaultFlags,isTransient:i.isTransient}}e.reviveProfile=u,e.EXTENSIONS_RESOURCE_NAME="extensions.json";function s(i,r,o,c){return{id:i,name:r,location:o,isDefault:!1,shortName:c?.shortName,globalStorageHome:(0,k.joinPath)(o,"globalStorage"),settingsResource:(0,k.joinPath)(o,"settings.json"),keybindingsResource:(0,k.joinPath)(o,"keybindings.json"),tasksResource:(0,k.joinPath)(o,"tasks.json"),snippetsHome:(0,k.joinPath)(o,"snippets"),extensionsResource:(0,k.joinPath)(o,e.EXTENSIONS_RESOURCE_NAME),useDefaultFlags:c?.useDefaultFlags,isTransient:c?.transient}}e.toUserDataProfile=s;let t=class extends I.Disposable{get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}constructor(r,o,c,a){super(),this.environmentService=r,this.fileService=o,this.uriIdentityService=c,this.logService=a,this.enabled=!1,this.defaultProfileShouldIncludeExtensionsResourceAlways=!1,this._onDidChangeProfiles=this._register(new R.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this._onWillCreateProfile=this._register(new R.Emitter),this.onWillCreateProfile=this._onWillCreateProfile.event,this._onWillRemoveProfile=this._register(new R.Emitter),this.onWillRemoveProfile=this._onWillRemoveProfile.event,this._onDidResetWorkspaces=this._register(new R.Emitter),this.onDidResetWorkspaces=this._onDidResetWorkspaces.event,this.profileCreationPromises=new Map,this.transientProfilesObject={profiles:[],workspaces:new p.ResourceMap},this.profilesHome=(0,k.joinPath)(this.environmentService.userRoamingDataHome,"profiles")}setEnablement(r){this.enabled!==r&&(this._profilesObject=void 0,this.enabled=r)}isEnabled(){return this.enabled}get profilesObject(){if(!this._profilesObject){const r=this.enabled?this.getStoredProfiles().map(f=>s((0,k.basename)(f.location),f.name,f.location,{shortName:f.shortName,useDefaultFlags:f.useDefaultFlags})):[];let o;const c=new p.ResourceMap,a=s((0,C.hash)(this.environmentService.userRoamingDataHome.path).toString(16),(0,d.localize)(0,null),this.environmentService.userRoamingDataHome);if(r.unshift({...a,isDefault:!0,extensionsResource:this.defaultProfileShouldIncludeExtensionsResourceAlways||r.length>0||this.transientProfilesObject.profiles.length>0?a.extensionsResource:void 0}),r.length){const f=this.getStoredProfileAssociations();if(f.workspaces)for(const[D,N]of Object.entries(f.workspaces)){const B=v.URI.parse(D),X=v.URI.parse(N),J=r.find(se=>this.uriIdentityService.extUri.isEqual(se.location,X));J&&c.set(B,J)}if(f.emptyWindow){const D=v.URI.parse(f.emptyWindow);o=r.find(N=>this.uriIdentityService.extUri.isEqual(N.location,D))}}this._profilesObject={profiles:r,workspaces:c,emptyWindow:o}}return this._profilesObject}async createTransientProfile(r){const o="Temp",c=new RegExp(`${(0,m.escapeRegExpCharacters)(o)}\\s(\\d+)`);let a=0;for(const D of this.profiles){const N=c.exec(D.name),B=N?parseInt(N[1]):0;a=B>a?B:a}const f=`${o} ${a+1}`;return this.createProfile((0,C.hash)((0,l.generateUuid)()).toString(16),f,{transient:!0},r)}async createNamedProfile(r,o,c){return this.createProfile((0,C.hash)((0,l.generateUuid)()).toString(16),r,o,c)}async createProfile(r,o,c,a){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);const f=await this.doCreateProfile(r,o,c);return a&&await this.setProfileForWorkspace(a,f),f}async doCreateProfile(r,o,c){let a=this.profileCreationPromises.get(o);return a||(a=(async()=>{try{const f=this.profiles.find(B=>B.name===o||B.id===r);if(f)return f;const D=s(r,o,(0,k.joinPath)(this.profilesHome,r),c);await this.fileService.createFolder(D.location);const N=[];return this._onWillCreateProfile.fire({profile:D,join(B){N.push(B)}}),await y.Promises.settled(N),this.updateProfiles([D],[],[]),D}finally{this.profileCreationPromises.delete(o)}})(),this.profileCreationPromises.set(o,a)),a}async updateProfile(r,o){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);let c=this.profiles.find(a=>a.id===r.id);if(!c)throw new Error(`Profile '${r.name}' does not exist`);return c=s(c.id,o.name??c.name,c.location,{shortName:o.shortName??c.shortName,transient:o.transient??c.isTransient,useDefaultFlags:o.useDefaultFlags??c.useDefaultFlags}),this.updateProfiles([],[],[c]),c}async removeProfile(r){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);if(r.isDefault)throw new Error("Cannot remove default profile");const o=this.profiles.find(a=>a.id===r.id);if(!o)throw new Error(`Profile '${r.name}' does not exist`);const c=[];this._onWillRemoveProfile.fire({profile:o,join(a){c.push(a)}});try{await Promise.allSettled(c)}catch(a){this.logService.error(a)}o.id===this.profilesObject.emptyWindow?.id&&(this.profilesObject.emptyWindow=void 0);for(const a of[...this.profilesObject.workspaces.keys()])o.id===this.profilesObject.workspaces.get(a)?.id&&this.profilesObject.workspaces.delete(a);this.updateStoredProfileAssociations(),this.updateProfiles([],[o],[]);try{this.profiles.length===1?await this.fileService.del(this.profilesHome,{recursive:!0}):await this.fileService.del(o.location,{recursive:!0})}catch(a){this.logService.error(a)}}getOrSetProfileForWorkspace(r,o=this.defaultProfile){if(!this.enabled)return this.defaultProfile;let c=this.getProfileForWorkspace(r);return c||(c=o,this.profiles.length>1&&this.setProfileForWorkspaceSync(r,c)),c}async setProfileForWorkspace(r,o){this.setProfileForWorkspaceSync(r,o)}setProfileForWorkspaceSync(r,o){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);const c=this.profiles.find(a=>a.id===o.id);if(!c)throw new Error(`Profile '${o.name}' does not exist`);this.updateWorkspaceAssociation(r,c)}unsetWorkspace(r,o){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);this.updateWorkspaceAssociation(r,void 0,o)}async resetWorkspaces(){this.transientProfilesObject.workspaces.clear(),this.transientProfilesObject.emptyWindow=void 0,this.profilesObject.workspaces.clear(),this.profilesObject.emptyWindow=void 0,this.updateStoredProfileAssociations(),this._onDidResetWorkspaces.fire()}async cleanUp(){if(!!this.enabled&&await this.fileService.exists(this.profilesHome)){const r=await this.fileService.resolve(this.profilesHome);await Promise.all((r.children||[]).filter(o=>o.isDirectory&&this.profiles.every(c=>!this.uriIdentityService.extUri.isEqual(c.location,o.resource))).map(o=>this.fileService.del(o.resource,{recursive:!0})))}}async cleanUpTransientProfiles(){if(!this.enabled)return;const r=this.transientProfilesObject.profiles.filter(o=>!this.isProfileAssociatedToWorkspace(o));await Promise.allSettled(r.map(o=>this.removeProfile(o)))}getProfileForWorkspace(r){const o=this.getWorkspace(r);return v.URI.isUri(o)?this.transientProfilesObject.workspaces.get(o)??this.profilesObject.workspaces.get(o):this.transientProfilesObject.emptyWindow??this.profilesObject.emptyWindow}getWorkspace(r){return(0,S.isSingleFolderWorkspaceIdentifier)(r)?r.uri:(0,S.isWorkspaceIdentifier)(r)?r.configPath:"empty-window"}isProfileAssociatedToWorkspace(r){return!!(this.uriIdentityService.extUri.isEqual(this.transientProfilesObject.emptyWindow?.location,r.location)||[...this.transientProfilesObject.workspaces.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,r.location))||this.uriIdentityService.extUri.isEqual(this.profilesObject.emptyWindow?.location,r.location)||[...this.profilesObject.workspaces.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,r.location)))}updateProfiles(r,o,c){const a=[...this.profiles,...r],f=[];this.transientProfilesObject.profiles=[];for(let D of a)D.isDefault||o.some(N=>D.id===N.id)||(D=c.find(N=>D.id===N.id)??D,D.isTransient?this.transientProfilesObject.profiles.push(D):f.push({location:D.location,name:D.name,shortName:D.shortName,useDefaultFlags:D.useDefaultFlags}));this.saveStoredProfiles(f),this._profilesObject=void 0,this.triggerProfilesChanges(r,o,c)}triggerProfilesChanges(r,o,c){this._onDidChangeProfiles.fire({added:r,removed:o,updated:c,all:this.profiles})}updateWorkspaceAssociation(r,o,c){c=o?.isTransient?!0:c,c||this.updateWorkspaceAssociation(r,void 0,!0);const a=this.getWorkspace(r),f=c?this.transientProfilesObject:this.profilesObject;v.URI.isUri(a)?(f.workspaces.delete(a),o&&f.workspaces.set(a,o)):f.emptyWindow=o,c||this.updateStoredProfileAssociations()}updateStoredProfileAssociations(){const r={};for(const[c,a]of this.profilesObject.workspaces.entries())r[c.toString()]=a.location.toString();const o=this.profilesObject.emptyWindow?.location.toString();this.saveStoredProfileAssociations({workspaces:r,emptyWindow:o}),this._profilesObject=void 0}getStoredProfiles(){return[]}saveStoredProfiles(r){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(r){throw new Error("not implemented")}};t.PROFILES_KEY="userDataProfiles",t.PROFILE_ASSOCIATIONS_KEY="profileAssociations",t=de([ee(0,h.IEnvironmentService),ee(1,w.IFileService),ee(2,P.IUriIdentityService),ee(3,g.ILogService)],t),e.UserDataProfilesService=t;class n extends t{constructor(){super(...arguments),this.storedProfiles=[],this.storedProfileAssociations={}}getStoredProfiles(){return this.storedProfiles}saveStoredProfiles(r){this.storedProfiles=r}getStoredProfileAssociations(){return this.storedProfileAssociations}saveStoredProfileAssociations(r){this.storedProfileAssociations=r}}e.InMemoryUserDataProfilesService=n}),define(Q[141],Z([0,1,19,3,24,11,4,2,12,10,83,22,23,34,9,28,35,25]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionTask=e.reportTelemetry=e.joinErrors=e.AbstractExtensionManagementService=void 0;let m=class extends v.Disposable{get onInstallExtension(){return this._onInstallExtension.event}get onDidInstallExtensions(){return this._onDidInstallExtensions.event}get onUninstallExtension(){return this._onUninstallExtension.event}get onDidUninstallExtension(){return this._onDidUninstallExtension.event}constructor(i,r,o,c,a){super(),this.galleryService=i,this.telemetryService=r,this.logService=o,this.productService=c,this.userDataProfilesService=a,this.lastReportTimestamp=0,this.installingExtensions=new Map,this.uninstallingExtensions=new Map,this._onInstallExtension=this._register(new O.Emitter),this._onDidInstallExtensions=this._register(new O.Emitter),this._onUninstallExtension=this._register(new O.Emitter),this._onDidUninstallExtension=this._register(new O.Emitter),this.participants=[],this._register((0,v.toDisposable)(()=>{this.installingExtensions.forEach(({task:f})=>f.cancel()),this.uninstallingExtensions.forEach(f=>f.cancel()),this.installingExtensions.clear(),this.uninstallingExtensions.clear()}))}async canInstall(i){const r=await this.getTargetPlatform();return i.allTargetPlatforms.some(o=>(0,b.isTargetPlatformCompatible)(o,i.allTargetPlatforms,r))}async installFromGallery(i,r={}){try{if(!this.galleryService.isEnabled())throw new b.ExtensionManagementError(w.localize(0,null),b.ExtensionManagementErrorCode.Internal);const o=await this.checkAndGetCompatibleVersion(i,!!r.installGivenVersion,!!r.installPreReleaseVersion);return await this.installExtension(o.manifest,o.extension,r)}catch(o){throw s(this.telemetryService,"extensionGallery:install",{extensionData:(0,g.getGalleryExtensionTelemetryData)(i),error:o}),this.logService.error("Failed to install extension.",i.identifier.id),this.logService.error(o),u(o)}}async uninstall(i,r={}){return this.logService.trace("ExtensionManagementService#uninstall",i.identifier.id),this.uninstallExtension(i,r)}async reinstallFromGallery(i){if(this.logService.trace("ExtensionManagementService#reinstallFromGallery",i.identifier.id),!this.galleryService.isEnabled())throw new Error(w.localize(1,null));const r=await this.getTargetPlatform(),[o]=await this.galleryService.getExtensions([{...i.identifier,preRelease:i.preRelease}],{targetPlatform:r,compatible:!0},I.CancellationToken.None);if(!o)throw new Error(w.localize(2,null));await this.createUninstallExtensionTask(i,{remove:!0,versionOnly:!0}).run(),await this.installFromGallery(o)}getExtensionsControlManifest(){const i=new Date().getTime();return(!this.extensionsControlManifest||i-this.lastReportTimestamp>1e3*60*5)&&(this.extensionsControlManifest=this.updateControlCache(),this.lastReportTimestamp=i),this.extensionsControlManifest}registerParticipant(i){this.participants.push(i)}async installExtension(i,r,o){const c=X=>`${g.ExtensionKey.create(X).toString()}${o.profileLocation?`-${o.profileLocation.toString()}`:""}`;if(!h.URI.isUri(r)){const X=this.installingExtensions.get(c(r));if(X){this.logService.info("Extensions is already requested to install",r.identifier.id);const{local:J}=await X.task.waitUntilTaskIsFinished();return J}o={...o,installOnlyNewlyAddedFromExtensionPack:!0}}const a=[],f=[],D=[],N=this.createInstallExtensionTask(i,r,o);h.URI.isUri(r)||this.installingExtensions.set(c(r),{task:N,waitingTasks:[]}),this._onInstallExtension.fire({identifier:N.identifier,source:r,profileLocation:o.profileLocation}),this.logService.info("Installing extension:",N.identifier.id),a.push({task:N,manifest:i});let B=!1;try{if(o.donotIncludePackAndDependencies)this.logService.info("Installing the extension without checking dependencies and pack",N.identifier.id);else try{const J=await this.getAllDepsAndPackExtensions(N.identifier,i,!!o.installOnlyNewlyAddedFromExtensionPack,!!o.installPreReleaseVersion,o.profileLocation),se=await this.getInstalled(void 0,o.profileLocation);for(const{gallery:ne,manifest:re}of J){B=B||!!re.extensionDependencies?.some(te=>(0,g.areSameExtensions)({id:te},N.identifier));const ge=c(ne),ce=this.installingExtensions.get(ge);if(ce){if(this.canWaitForTask(N,ce.task)){this.logService.info("Waiting for already requested installing extension",ne.identifier.id,N.identifier.id),ce.waitingTasks.push(N);const te=ce.task.identifier;f.push(O.Event.toPromise(O.Event.filter(this.onDidInstallExtensions,j=>j.some(M=>(0,g.areSameExtensions)(M.identifier,te)))).then(j=>{if(!j.find(F=>(0,g.areSameExtensions)(F.identifier,te))?.local)throw new Error(`Extension ${te.id} is not installed`)}))}}else if(!se.some(({identifier:te})=>(0,g.areSameExtensions)(te,ne.identifier))){const te=this.createInstallExtensionTask(re,ne,{...o,donotIncludePackAndDependencies:!0});this.installingExtensions.set(ge,{task:te,waitingTasks:[N]}),this._onInstallExtension.fire({identifier:te.identifier,source:ne,profileLocation:o.profileLocation}),this.logService.info("Installing extension:",te.identifier.id,N.identifier.id),a.push({task:te,manifest:re})}}}catch(J){if(h.URI.isUri(N.source))(0,C.isNonEmptyArray)(i.extensionDependencies)&&this.logService.warn("Cannot install dependencies of extension:",N.identifier.id,J.message),(0,C.isNonEmptyArray)(i.extensionPack)&&this.logService.warn("Cannot install packed extensions of extension:",N.identifier.id,J.message);else throw this.logService.error("Error while preparing to install dependencies and extension packs of the extension:",N.identifier.id),J}const X=a.reduce((J,{task:se,manifest:ne})=>(J.set(se.identifier.id.toLowerCase(),{task:se,manifest:ne}),J),new Map);for(;X.size;){let J;const se=[...X.values()].filter(({manifest:ne})=>!ne.extensionDependencies?.some(re=>X.has(re.toLowerCase())));se.length?J=X.size===1?se:se.filter(({task:ne})=>!(ne===N&&!B)):(this.logService.info("Found extensions with circular dependencies",se.map(({task:ne})=>ne.identifier.id)),J=[...X.values()]),await this.joinAllSettled(J.map(async({task:ne})=>{const re=new Date().getTime();try{const{local:ge}=await ne.run();if(await this.joinAllSettled(this.participants.map(ce=>ce.postInstall(ge,ne.source,o,I.CancellationToken.None))),!h.URI.isUri(ne.source)){const ce=ne.operation===3,te=ce?void 0:(new Date().getTime()-ne.source.lastUpdated)/1e3;if(s(this.telemetryService,ce?"extensionGallery:update":"extensionGallery:install",{extensionData:(0,g.getGalleryExtensionTelemetryData)(ne.source),wasVerified:ne.wasVerified,duration:new Date().getTime()-re,durationSinceUpdate:te}),d.isWeb&&ne.operation!==3)try{await this.galleryService.reportStatistic(ge.manifest.publisher,ge.manifest.name,ge.manifest.version,"install")}catch{}}D.push({local:ge,identifier:ne.identifier,operation:ne.operation,source:ne.source,context:o.context,profileLocation:o.profileLocation,applicationScoped:ge.isApplicationScoped})}catch(ge){throw h.URI.isUri(ne.source)||s(this.telemetryService,ne.operation===3?"extensionGallery:update":"extensionGallery:install",{extensionData:(0,g.getGalleryExtensionTelemetryData)(ne.source),wasVerified:ne.wasVerified,duration:new Date().getTime()-re,error:ge}),this.logService.error("Error while installing the extension:",ne.identifier.id),ge}finally{X.delete(ne.identifier.id.toLowerCase())}}))}return f.length&&await this.joinAllSettled(f),D.forEach(({identifier:J})=>this.logService.info("Extension installed successfully:",J.id)),this._onDidInstallExtensions.fire(D),D.filter(({identifier:J})=>(0,g.areSameExtensions)(J,N.identifier))[0].local}catch(X){if(a.forEach(({task:J})=>J.cancel()),D.length)try{const J=await Promise.allSettled(D.map(({local:se})=>this.createUninstallExtensionTask(se,{versionOnly:!0,profileLocation:o.profileLocation}).run()));for(let se=0;sese.id))}throw this._onDidInstallExtensions.fire(a.map(({task:J})=>({identifier:J.identifier,operation:2,source:J.source,context:o.context,profileLocation:o.profileLocation}))),X}finally{for(const[X,{task:J,waitingTasks:se}]of this.installingExtensions.entries()){const ne=se.indexOf(N);ne!==-1&&se.splice(ne,1),se.length===0&&(J===N||ne!==-1)&&this.installingExtensions.delete(X)}}}canWaitForTask(i,r){for(const[,{task:o,waitingTasks:c}]of this.installingExtensions.entries())if(o===i&&(c.includes(r)||c.some(a=>this.canWaitForTask(a,r)))||o===r&&c[0]&&!this.canWaitForTask(i,c[0]))return!1;return!0}async joinAllSettled(i){const r=[],o=[],c=await Promise.allSettled(i);for(const a of c)a.status==="fulfilled"?r.push(a.value):o.push(a.reason);if(o.length)throw E(o);return r}async getAllDepsAndPackExtensions(i,r,o,c,a){if(!this.galleryService.isEnabled())return[];const f=await this.getInstalled(void 0,a),D=[i],N=[],B=async(X,J)=>{const se=J.extensionDependencies||[],ne=[...se];if(J.extensionPack){const re=o?f.find(ge=>(0,g.areSameExtensions)(ge.identifier,X)):void 0;for(const ge of J.extensionPack)re&&re.manifest.extensionPack&&re.manifest.extensionPack.some(ce=>(0,g.areSameExtensions)({id:ce},{id:ge}))||ne.every(ce=>!(0,g.areSameExtensions)({id:ce},{id:ge}))&&ne.push(ge)}if(ne.length){const re=[...D,...N.map(ce=>ce.gallery.identifier)],ge=ne.filter(ce=>re.every(te=>!(0,g.areSameExtensions)(te,{id:ce})));if(ge.length){const ce=await this.galleryService.getExtensions(ge.map(te=>({id:te,preRelease:c})),I.CancellationToken.None);for(const te of ce){if(re.find(F=>(0,g.areSameExtensions)(F,te.identifier)))continue;const j=se.some(F=>(0,g.areSameExtensions)({id:F},te.identifier));let M;try{M=await this.checkAndGetCompatibleVersion(te,!1,c)}catch(F){if(F instanceof b.ExtensionManagementError&&F.code===b.ExtensionManagementErrorCode.IncompatibleTargetPlatform&&!j){this.logService.info("Skipping the packed extension as it cannot be installed",te.identifier.id);continue}else throw F}N.push({gallery:M.extension,manifest:M.manifest}),await B(M.extension.identifier,M.manifest)}}}};return await B(i,r),N}async checkAndGetCompatibleVersion(i,r,o){if((await this.getExtensionsControlManifest()).malicious.some(D=>(0,g.areSameExtensions)(i.identifier,D)))throw new b.ExtensionManagementError(w.localize(3,null,i.identifier.id),b.ExtensionManagementErrorCode.Malicious);if(!await this.canInstall(i)){const D=await this.getTargetPlatform();throw new b.ExtensionManagementError(w.localize(4,null,i.identifier.id,this.productService.nameLong,(0,b.TargetPlatformToString)(D)),b.ExtensionManagementErrorCode.IncompatibleTargetPlatform)}const a=await this.getCompatibleVersion(i,r,o);if(a){if(o&&!r&&i.hasPreReleaseVersion&&!a.properties.isPreReleaseVersion)throw new b.ExtensionManagementError(w.localize(5,null,i.identifier.id,this.productService.nameLong,this.productService.version),b.ExtensionManagementErrorCode.IncompatiblePreRelease)}else throw!o&&i.properties.isPreReleaseVersion&&(await this.galleryService.getExtensions([i.identifier],I.CancellationToken.None))[0]?new b.ExtensionManagementError(w.localize(6,null,i.identifier.id),b.ExtensionManagementErrorCode.ReleaseVersionNotFound):new b.ExtensionManagementError(w.localize(7,null,i.identifier.id,this.productService.nameLong,this.productService.version),b.ExtensionManagementErrorCode.Incompatible);this.logService.info("Getting Manifest...",a.identifier.id);const f=await this.galleryService.getManifest(a,I.CancellationToken.None);if(f===null)throw new b.ExtensionManagementError(`Missing manifest for extension ${i.identifier.id}`,b.ExtensionManagementErrorCode.Invalid);if(f.version!==a.version)throw new b.ExtensionManagementError(`Cannot install '${i.identifier.id}' extension because of version mismatch in Marketplace`,b.ExtensionManagementErrorCode.Invalid);return{extension:a,manifest:f}}async getCompatibleVersion(i,r,o){const c=await this.getTargetPlatform();let a=null;return!r&&i.hasPreReleaseVersion&&i.properties.isPreReleaseVersion!==o&&(a=(await this.galleryService.getExtensions([{...i.identifier,preRelease:o}],{targetPlatform:c,compatible:!0},I.CancellationToken.None))[0]||null),!a&&await this.galleryService.isExtensionCompatible(i,o,c)&&(a=i),a||(r?a=(await this.galleryService.getExtensions([{...i.identifier,version:i.version}],{targetPlatform:c,compatible:!0},I.CancellationToken.None))[0]||null:a=await this.galleryService.getCompatibleExtension(i,o,c)),a}async uninstallExtension(i,r){const o=B=>`${B.id.toLowerCase()}${r.versionOnly?`-${i.manifest.version}`:""}${r.profileLocation?`@${r.profileLocation.toString()}`:""}`,c=this.uninstallingExtensions.get(o(i.identifier));if(c)return this.logService.info("Extensions is already requested to uninstall",i.identifier.id),c.waitUntilTaskIsFinished();const a=(B,X)=>{const J=this.createUninstallExtensionTask(B,X);return this.uninstallingExtensions.set(o(J.extension.identifier),J),r.profileLocation?this.logService.info("Uninstalling extension from the profile:",`${B.identifier.id}@${B.manifest.version}`,r.profileLocation.toString()):this.logService.info("Uninstalling extension:",`${B.identifier.id}@${B.manifest.version}`),this._onUninstallExtension.fire({identifier:B.identifier,profileLocation:r.profileLocation,applicationScoped:B.isApplicationScoped}),J},f=(B,X)=>{X?r.profileLocation?this.logService.error("Failed to uninstall extension from the profile:",`${B.identifier.id}@${B.manifest.version}`,r.profileLocation.toString(),X.message):this.logService.error("Failed to uninstall extension:",`${B.identifier.id}@${B.manifest.version}`,X.message):r.profileLocation?this.logService.info("Successfully uninstalled extension from the profile",`${B.identifier.id}@${B.manifest.version}`,r.profileLocation.toString()):this.logService.info("Successfully uninstalled extension:",`${B.identifier.id}@${B.manifest.version}`),s(this.telemetryService,"extensionGallery:uninstall",{extensionData:(0,g.getLocalExtensionTelemetryData)(B),error:X}),this._onDidUninstallExtension.fire({identifier:B.identifier,version:B.manifest.version,error:X?.code,profileLocation:r.profileLocation,applicationScoped:B.isApplicationScoped})},D=[],N=[];try{D.push(a(i,r));const B=await this.getInstalled(1,r.profileLocation);if(r.donotIncludePack)this.logService.info("Uninstalling the extension without including packed extension",`${i.identifier.id}@${i.manifest.version}`);else{const X=this.getAllPackExtensionsToUninstall(i,B);for(const J of X)this.uninstallingExtensions.has(o(J.identifier))?this.logService.info("Extensions is already requested to uninstall",J.identifier.id):D.push(a(J,r))}r.donotCheckDependents?this.logService.info("Uninstalling the extension without checking dependents",`${i.identifier.id}@${i.manifest.version}`):this.checkForDependents(D.map(X=>X.extension),B,i),await this.joinAllSettled(D.map(async X=>{try{if(await X.run(),await this.joinAllSettled(this.participants.map(J=>J.postUninstall(X.extension,r,I.CancellationToken.None))),X.extension.identifier.uuid)try{await this.galleryService.reportStatistic(X.extension.manifest.publisher,X.extension.manifest.name,X.extension.manifest.version,"uninstall")}catch{}f(X.extension)}catch(J){const se=J instanceof b.ExtensionManagementError?J:new b.ExtensionManagementError((0,k.getErrorMessage)(J),b.ExtensionManagementErrorCode.Internal);throw f(X.extension,se),se}finally{N.push(X)}}))}catch(B){const X=B instanceof b.ExtensionManagementError?B:new b.ExtensionManagementError((0,k.getErrorMessage)(B),b.ExtensionManagementErrorCode.Internal);for(const J of D){try{J.cancel()}catch{}N.includes(J)||f(J.extension,X)}throw X}finally{for(const B of D)this.uninstallingExtensions.delete(o(B.extension.identifier))||this.logService.warn("Uninstallation task is not found in the cache",B.extension.identifier.id)}}checkForDependents(i,r,o){for(const c of i){const a=this.getDependents(c,r);if(a.length){const f=a.filter(D=>!i.some(N=>(0,g.areSameExtensions)(N.identifier,D.identifier)));if(f.length)throw new Error(this.getDependentsErrorMessage(c,f,o))}}}getDependentsErrorMessage(i,r,o){return o===i?r.length===1?w.localize(8,null,o.manifest.displayName||o.manifest.name,r[0].manifest.displayName||r[0].manifest.name):r.length===2?w.localize(9,null,o.manifest.displayName||o.manifest.name,r[0].manifest.displayName||r[0].manifest.name,r[1].manifest.displayName||r[1].manifest.name):w.localize(10,null,o.manifest.displayName||o.manifest.name,r[0].manifest.displayName||r[0].manifest.name,r[1].manifest.displayName||r[1].manifest.name):r.length===1?w.localize(11,null,o.manifest.displayName||o.manifest.name,i.manifest.displayName||i.manifest.name,r[0].manifest.displayName||r[0].manifest.name):r.length===2?w.localize(12,null,o.manifest.displayName||o.manifest.name,i.manifest.displayName||i.manifest.name,r[0].manifest.displayName||r[0].manifest.name,r[1].manifest.displayName||r[1].manifest.name):w.localize(13,null,o.manifest.displayName||o.manifest.name,i.manifest.displayName||i.manifest.name,r[0].manifest.displayName||r[0].manifest.name,r[1].manifest.displayName||r[1].manifest.name)}getAllPackExtensionsToUninstall(i,r,o=[]){if(o.indexOf(i)!==-1)return[];o.push(i);const c=i.manifest.extensionPack?i.manifest.extensionPack:[];if(c.length){const a=r.filter(D=>!D.isBuiltin&&c.some(N=>(0,g.areSameExtensions)({id:N},D.identifier))),f=[];for(const D of a)f.push(...this.getAllPackExtensionsToUninstall(D,r,o));return[...a,...f]}return[]}getDependents(i,r){return r.filter(o=>o.manifest.extensionDependencies&&o.manifest.extensionDependencies.some(c=>(0,g.areSameExtensions)({id:c},i.identifier)))}async updateControlCache(){try{this.logService.trace("ExtensionManagementService.refreshReportedCache");const i=await this.galleryService.getExtensionsControlManifest();return this.logService.trace("ExtensionManagementService.refreshControlCache",i),i}catch{return this.logService.trace("ExtensionManagementService.refreshControlCache - failed to get extension control manifest"),{malicious:[],deprecated:{}}}}createInstallExtensionTask(i,r,o){return o.profileLocation&&(0,S.isApplicationScopedExtension)(i)&&(o={...o,profileLocation:this.userDataProfilesService.defaultProfile.extensionsResource}),this.doCreateInstallExtensionTask(i,r,o)}createUninstallExtensionTask(i,r){return r.profileLocation&&i.isApplicationScoped&&(r={...r,profileLocation:this.userDataProfilesService.defaultProfile.extensionsResource}),this.doCreateUninstallExtensionTask(i,r)}};m=de([ee(0,b.IExtensionGalleryService),ee(1,y.ITelemetryService),ee(2,p.ILogService),ee(3,P.IProductService),ee(4,l.IUserDataProfilesService)],m),e.AbstractExtensionManagementService=m;function E(n){const i=Array.isArray(n)?n:[n];return i.length===1?i[0]instanceof Error?i[0]:new Error(i[0]):i.reduce((r,o)=>new Error(`${r.message}${r.message?",":""}${o instanceof Error?o.message:o}`),new Error(""))}e.joinErrors=E;function u(n){if(n instanceof b.ExtensionManagementError)return n;const i=new b.ExtensionManagementError(n.message,b.ExtensionManagementErrorCode.Internal);return i.stack=n.stack,i}function s(n,i,{extensionData:r,wasVerified:o,duration:c,error:a,durationSinceUpdate:f}){let D,N;a&&(a instanceof b.ExtensionManagementError?(D=a.code,a.code===b.ExtensionManagementErrorCode.Signature&&(N=a.message)):D=b.ExtensionManagementErrorCode.Internal),n.publicLog(i,{...r,wasVerified:o,success:!a,duration:c,errorcode:D,errorcodeDetail:N,durationSinceUpdate:f})}e.reportTelemetry=s;class t{constructor(){this.barrier=new R.Barrier}async waitUntilTaskIsFinished(){return await this.barrier.wait(),this.cancellablePromise}async run(){return this.cancellablePromise||(this.cancellablePromise=(0,R.createCancelablePromise)(i=>this.doRun(i))),this.barrier.open(),this.cancellablePromise}cancel(){this.cancellablePromise||(this.cancellablePromise=(0,R.createCancelablePromise)(i=>new Promise((r,o)=>{const c=i.onCancellationRequested(()=>{c.dispose(),o(new k.CancellationError)})})),this.barrier.open()),this.cancellablePromise.cancel()}}e.AbstractExtensionTask=t}),define(Q[48],Z([0,1,19,3,26,15,11,50,75,2,16,14,12,18,38,54,5,10,87,17,23,34,45,13,8,9,28,4,44,41,25,29,103]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m,E,u,s,t,n,i,r,o,c,a,f,D,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionsScannerService=e.toExtensionDescription=e.AbstractExtensionsScannerService=e.IExtensionsScannerService=e.Translations=void 0;var X;(function(te){function j(M,F){if(M===F)return!0;const z=Object.keys(M),$=new Set;for(const Y of Object.keys(F))$.add(Y);if(z.length!==$.size)return!1;for(const Y of z){if(M[Y]!==F[Y])return!1;$.delete(Y)}return $.size===0}te.equals=j})(X=e.Translations||(e.Translations={})),e.IExtensionsScannerService=(0,i.createDecorator)("IExtensionsScannerService");let J=class extends h.Disposable{constructor(j,M,F,z,$,Y,A,V,L,T,U){super(),this.systemExtensionsLocation=j,this.userExtensionsLocation=M,this.extensionsControlLocation=F,this.cacheLocation=z,this.userDataProfilesService=$,this.extensionsProfileScannerService=Y,this.fileService=A,this.logService=V,this.environmentService=L,this.productService=T,this.instantiationService=U,this._onDidChangeCache=this._register(new c.Emitter),this.onDidChangeCache=this._onDidChangeCache.event,this.obsoleteFile=(0,S.joinPath)(this.userExtensionsLocation,".obsolete"),this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(re,(0,S.joinPath)(this.cacheLocation,s.BUILTIN_MANIFEST_CACHE_FILE),this.obsoleteFile)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(re,(0,S.joinPath)(this.cacheLocation,s.USER_MANIFEST_CACHE_FILE),this.obsoleteFile)),this.extensionsScanner=this._register(this.instantiationService.createInstance(ne,this.obsoleteFile)),this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,u.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(j,M,F){const[z,$]=await Promise.all([this.scanSystemExtensions(j),this.scanUserExtensions(M)]),Y=F?await this.scanExtensionsUnderDevelopment(j,[...z,...$]):[];return this.dedupExtensions(z,$,Y,await this.getTargetPlatform(),!0)}async scanSystemExtensions(j){const M=[];M.push(this.scanDefaultSystemExtensions(!!j.useCache,j.language)),M.push(this.scanDevSystemExtensions(j.language,!!j.checkControlFile));const[F,z]=await Promise.all(M);return this.applyScanOptions([...F,...z],0,j,!1)}async scanUserExtensions(j){this.logService.trace("Started scanning user extensions");const M=await this.createExtensionScannerInput(j.profileLocation??this.userExtensionsLocation,!!j.profileLocation,1,!j.includeUninstalled,j.language);let z=await(j.useCache&&!M.devMode&&M.excludeObsolete?this.userExtensionsCachedScanner:this.extensionsScanner).scanExtensions(M);return z=await this.applyScanOptions(z,1,j,!0),this.logService.trace("Scanned user extensions:",z.length),z}async scanExtensionsUnderDevelopment(j,M){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){const F=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter(z=>z.scheme===w.Schemas.file).map(async z=>{const $=await this.createExtensionScannerInput(z,!1,1,!0,j.language,!1);return(await this.extensionsScanner.scanOneOrMultipleExtensions($)).map(A=>(A.type=M.find(V=>(0,u.areSameExtensions)(V.identifier,A.identifier))?.type??A.type,this.extensionsScanner.validate(A,$)))}))).flat();return this.applyScanOptions(F,"development",j,!0)}return[]}async scanExistingExtension(j,M,F){const z=await this.createExtensionScannerInput(j,!1,M,!0,F.language),$=await this.extensionsScanner.scanExtension(z);return!$||!F.includeInvalid&&!$.isValid?null:$}async scanOneOrMultipleExtensions(j,M,F){const z=await this.createExtensionScannerInput(j,!1,M,!0,F.language),$=await this.extensionsScanner.scanOneOrMultipleExtensions(z);return this.applyScanOptions($,M,F,!0)}async scanMetadata(j){const M=(0,S.joinPath)(j,"package.json"),F=(await this.fileService.readFile(M)).value.toString();return JSON.parse(F).__metadata}async updateMetadata(j,M){const F=(0,S.joinPath)(j,"package.json"),z=(await this.fileService.readFile(F)).value.toString(),$=JSON.parse(z);M.isMachineScoped=M.isMachineScoped||void 0,M.isBuiltin=M.isBuiltin||void 0,M.installedTimestamp=M.installedTimestamp||void 0,$.__metadata={...$.__metadata,...M},await this.fileService.writeFile((0,S.joinPath)(j,"package.json"),k.VSBuffer.fromString(JSON.stringify($,null," ")))}async applyScanOptions(j,M,F,z){return F.includeAllVersions||(j=this.dedupExtensions(M===0?j:void 0,M===1?j:void 0,M==="development"?j:void 0,await this.getTargetPlatform(),z)),F.includeInvalid||(j=j.filter($=>$.isValid)),j.sort(($,Y)=>{const A=b.basename($.location.fsPath),V=b.basename(Y.location.fsPath);return AV?1:0})}dedupExtensions(j,M,F,z,$){const Y=(V,L,T)=>{if(V.isValid&&!L.isValid)return!1;if(V.isValid===L.isValid){if($&&p.gt(V.manifest.version,L.manifest.version))return this.logService.debug(`Skipping extension ${L.location.path} with lower version ${L.manifest.version} in favour of ${V.location.path} with version ${V.manifest.version}`),!1;if(p.eq(V.manifest.version,L.manifest.version)){if(V.type===0)return this.logService.debug(`Skipping extension ${L.location.path} in favour of system extension ${V.location.path} with same version`),!1;if(V.targetPlatform===z)return this.logService.debug(`Skipping extension ${L.location.path} from different target platform ${L.targetPlatform}`),!1}}return T?this.logService.warn(`Overwriting user extension ${V.location.path} with ${L.location.path}.`):this.logService.debug(`Overwriting user extension ${V.location.path} with ${L.location.path}.`),!0},A=new Map;return j?.forEach(V=>{const L=s.ExtensionIdentifier.toKey(V.identifier.id),T=A.get(L);(!T||Y(T,V,!1))&&A.set(L,V)}),M?.forEach(V=>{const L=s.ExtensionIdentifier.toKey(V.identifier.id),T=A.get(L);if(!T&&j&&V.type===0){this.logService.debug(`Skipping obsolete system extension ${V.location.path}.`);return}(!T||Y(T,V,!1))&&A.set(L,V)}),F?.forEach(V=>{const L=s.ExtensionIdentifier.toKey(V.identifier.id),T=A.get(L);(!T||Y(T,V,!0))&&A.set(L,V),A.set(L,V)}),[...A.values()]}async scanDefaultSystemExtensions(j,M){this.logService.trace("Started scanning system extensions");const F=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,!0,M),$=await(j&&!F.devMode?this.systemExtensionsCachedScanner:this.extensionsScanner).scanExtensions(F);return this.logService.trace("Scanned system extensions:",$.length),$}async scanDevSystemExtensions(j,M){const F=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!F?.length)return[];this.logService.trace("Started scanning dev system extensions");const z=M?await this.getBuiltInExtensionControl():{},$=[],Y=l.URI.file(b.normalize(b.join(w.FileAccess.asFileUri("",_).fsPath,"..",".build","builtInExtensions")));for(const V of F){const L=z[V.name]||"marketplace";switch(L){case"disabled":break;case"marketplace":$.push((0,S.joinPath)(Y,V.name));break;default:$.push(l.URI.file(L));break}}const A=await Promise.all($.map(async V=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput(V,!1,0,!0,j))));return this.logService.trace("Scanned dev system extensions:",A.length),(0,C.coalesce)(A)}async getBuiltInExtensionControl(){try{const j=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(j.value.toString())}catch{return{}}}async createExtensionScannerInput(j,M,F,z,$,Y=!0){const A=await this.getTranslations($??g.language),V=await this.getMtime(j),L=M?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,T=L?await this.getMtime(L):void 0;return new se(j,V,L,T,M,F,z,Y,this.productService.version,this.productService.date,this.productService.commit,!this.environmentService.isBuilt,$,A)}async getMtime(j){try{const M=await this.fileService.stat(j);if(typeof M.mtime=="number")return M.mtime}catch{}}};J=de([ee(4,D.IUserDataProfilesService),ee(5,f.IExtensionsProfileScannerService),ee(6,n.IFileService),ee(7,r.ILogService),ee(8,E.IEnvironmentService),ee(9,o.IProductService),ee(10,i.IInstantiationService)],J),e.AbstractExtensionsScannerService=J;class se{constructor(j,M,F,z,$,Y,A,V,L,T,U,W,q,H){this.location=j,this.mtime=M,this.applicationExtensionslocation=F,this.applicationExtensionslocationMtime=z,this.profile=$,this.type=Y,this.excludeObsolete=A,this.validate=V,this.productVersion=L,this.productDate=T,this.productCommit=U,this.devMode=W,this.language=q,this.translations=H}static createNlsConfiguration(j){return{language:j.language,pseudo:j.language==="pseudo",devMode:j.devMode,translations:j.translations}}static equals(j,M){return(0,S.isEqual)(j.location,M.location)&&j.mtime===M.mtime&&(0,S.isEqual)(j.applicationExtensionslocation,M.applicationExtensionslocation)&&j.applicationExtensionslocationMtime===M.applicationExtensionslocationMtime&&j.profile===M.profile&&j.type===M.type&&j.excludeObsolete===M.excludeObsolete&&j.validate===M.validate&&j.productVersion===M.productVersion&&j.productDate===M.productDate&&j.productCommit===M.productCommit&&j.devMode===M.devMode&&j.language===M.language&&X.equals(j.translations,M.translations)}}let ne=class extends h.Disposable{constructor(j,M,F,z,$){super(),this.obsoleteFile=j,this.extensionsProfileScannerService=M,this.uriIdentityService=F,this.fileService=z,this.logService=$}async scanExtensions(j){const M=j.profile?await this.scanExtensionsFromProfile(j):await this.scanExtensionsFromLocation(j);let F={};if(j.excludeObsolete&&j.type===1)try{const z=(await this.fileService.readFile(this.obsoleteFile)).value.toString();F=JSON.parse(z)}catch{}return(0,y.isEmptyObject)(F)?M:M.filter(z=>!F[u.ExtensionKey.create(z).toString()])}async scanExtensionsFromLocation(j){const M=await this.fileService.resolve(j.location);if(!M.children?.length)return[];const F=await Promise.all(M.children.map(async z=>{if(!z.isDirectory||j.type===1&&(0,S.basename)(z.resource).indexOf(".")===0)return null;const $=new se(z.resource,j.mtime,j.applicationExtensionslocation,j.applicationExtensionslocationMtime,j.profile,j.type,j.excludeObsolete,j.validate,j.productVersion,j.productDate,j.productCommit,j.devMode,j.language,j.translations);return this.scanExtension($)}));return(0,C.coalesce)(F).sort((z,$)=>z.location.path<$.location.path?-1:1)}async scanExtensionsFromProfile(j){let M=await this.scanExtensionsFromProfileResource(j.location,()=>!0,j);if(j.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(j.location,j.applicationExtensionslocation)){M=M.filter(z=>!z.metadata?.isApplicationScoped);const F=await this.scanExtensionsFromProfileResource(j.applicationExtensionslocation,z=>!!z.metadata?.isApplicationScoped,j);M.push(...F)}return M}async scanExtensionsFromProfileResource(j,M,F){const z=await this.extensionsProfileScannerService.scanProfileExtensions(j);if(!z.length)return[];const $=await Promise.all(z.map(async Y=>{if(M(Y)){const A=new se(Y.location,F.mtime,F.applicationExtensionslocation,F.applicationExtensionslocationMtime,F.profile,F.type,F.excludeObsolete,F.validate,F.productVersion,F.productDate,F.productCommit,F.devMode,F.language,F.translations);return this.scanExtension(A,Y.metadata)}return null}));return(0,C.coalesce)($)}async scanOneOrMultipleExtensions(j){try{if(await this.fileService.exists((0,S.joinPath)(j.location,"package.json"))){const M=await this.scanExtension(j);return M?[M]:[]}else return await this.scanExtensions(j)}catch(M){return this.logService.error(`Error scanning extensions at ${j.location.path}:`,(0,O.getErrorMessage)(M)),[]}}async scanExtension(j,M){try{let F=await this.scanExtensionManifest(j.location);if(F){F.publisher||(F.publisher=s.UNDEFINED_PUBLISHER),M=M??F.__metadata,delete F.__metadata;const z=(0,u.getGalleryExtensionId)(F.publisher,F.name),$=M?.id?{id:z,uuid:M.id}:{id:z},Y=M?.isSystem?0:j.type,A=Y===0||!!M?.isBuiltin;F=await this.translateManifest(j.location,F,se.createNlsConfiguration(j));const V={type:Y,identifier:$,manifest:F,location:j.location,isBuiltin:A,targetPlatform:M?.targetPlatform??"undefined",metadata:M,isValid:!0,validations:[]};return j.validate?this.validate(V,j):V}}catch(F){j.type!==0&&this.logService.error(F)}return null}validate(j,M){let F=!0;const z=(0,t.validateExtensionManifest)(M.productVersion,M.productDate,M.location,j.manifest,j.isBuiltin);for(const[$,Y]of z)$===P.default.Error&&(F=!1,this.logService.error(this.formatMessage(M.location,Y)));return j.isValid=F,j.validations=z,j}async scanExtensionManifest(j){const M=(0,S.joinPath)(j,"package.json");let F;try{F=(await this.fileService.readFile(M)).value.toString()}catch($){return(0,n.toFileOperationResult)($)!==1&&this.logService.error(this.formatMessage(j,(0,m.localize)(0,null,M.path,$.message))),null}let z;try{z=JSON.parse(F)}catch{const Y=[];(0,v.parse)(F,Y);for(const A of Y)this.logService.error(this.formatMessage(j,(0,m.localize)(1,null,M.path,A.offset,A.length,(0,d.getParseErrorMessage)(A.error))));return null}return(0,v.getNodeType)(z)!=="object"?(this.logService.error(this.formatMessage(j,(0,m.localize)(2,null,M.path))),null):z}async translateManifest(j,M,F){const z=await this.getLocalizedMessages(j,M,F);if(z)try{const $=[],Y=await this.resolveOriginalMessageBundle(z.default,$);if($.length>0)return $.forEach(V=>{this.logService.error(this.formatMessage(j,(0,m.localize)(3,null,z.default?.path,(0,d.getParseErrorMessage)(V.error))))}),M;if((0,v.getNodeType)(z)!=="object")return this.logService.error(this.formatMessage(j,(0,m.localize)(4,null,z.default?.path))),M;const A=z.values||Object.create(null);return(0,B.localizeManifest)(M,A,Y)}catch{}return M}async getLocalizedMessages(j,M,F){const z=(0,S.joinPath)(j,"package.nls.json"),$=(L,T)=>{T.forEach(U=>{this.logService.error(this.formatMessage(j,(0,m.localize)(5,null,L?.path,(0,d.getParseErrorMessage)(U.error))))})},Y=L=>{this.logService.error(this.formatMessage(j,(0,m.localize)(6,null,L?.path)))},A=`${M.publisher}.${M.name}`,V=F.translations[A];if(V)try{const L=l.URI.file(V),T=(await this.fileService.readFile(L)).value.toString(),U=[],W=(0,v.parse)(T,U);return U.length>0?($(L,U),{values:void 0,default:z}):(0,v.getNodeType)(W)!=="object"?(Y(L),{values:void 0,default:z}):{values:W.contents?W.contents.package:void 0,default:z}}catch{return{values:void 0,default:z}}else{if(!await this.fileService.exists(z))return;let T;try{T=await this.findMessageBundles(j,F)}catch{return}if(!T.localized)return{values:void 0,default:T.original};try{const U=(await this.fileService.readFile(T.localized)).value.toString(),W=[],q=(0,v.parse)(U,W);return W.length>0?($(T.localized,W),{values:void 0,default:T.original}):(0,v.getNodeType)(q)!=="object"?(Y(T.localized),{values:void 0,default:T.original}):{values:q,default:T.original}}catch{return{values:void 0,default:T.original}}}}async resolveOriginalMessageBundle(j,M){if(j)try{const F=(await this.fileService.readFile(j)).value.toString();return(0,v.parse)(F,M)}catch{}}findMessageBundles(j,M){return new Promise((F,z)=>{const $=Y=>{const A=(0,S.joinPath)(j,`package.nls.${Y}.json`);this.fileService.exists(A).then(V=>{V&&F({localized:A,original:(0,S.joinPath)(j,"package.nls.json")});const L=Y.lastIndexOf("-");L===-1?F({localized:(0,S.joinPath)(j,"package.nls.json"),original:null}):(Y=Y.substring(0,L),$(Y))})};if(M.devMode||M.pseudo||!M.language)return F({localized:(0,S.joinPath)(j,"package.nls.json"),original:null});$(M.language)})}formatMessage(j,M){return`[${j.path}]: ${M}`}};ne=de([ee(1,f.IExtensionsProfileScannerService),ee(2,N.IUriIdentityService),ee(3,n.IFileService),ee(4,r.ILogService)],ne);let re=class extends ne{constructor(j,M,F,z,$,Y){super(M,F,z,$,Y),this.cacheFile=j,this.cacheValidatorThrottler=this._register(new R.ThrottledDelayer(3e3)),this._onDidChangeCache=this._register(new c.Emitter),this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(j){const M=await this.readExtensionCache();if(this.input=j,M&&M.input&&se.equals(M.input,this.input))return this.cacheValidatorThrottler.trigger(()=>this.validateCache()),M.result.map(z=>(z.location=l.URI.revive(z.location),z));const F=await super.scanExtensions(j);return await this.writeExtensionCache({input:j,result:F}),F}async readExtensionCache(){try{const j=await this.fileService.readFile(this.cacheFile),M=JSON.parse(j.value.toString());return{result:M.result,input:(0,a.revive)(M.input)}}catch(j){this.logService.debug("Error while reading the extension cache file:",this.cacheFile.path,(0,O.getErrorMessage)(j))}return null}async writeExtensionCache(j){try{await this.fileService.writeFile(this.cacheFile,k.VSBuffer.fromString(JSON.stringify(j)))}catch(M){this.logService.debug("Error while writing the extension cache file:",this.cacheFile.path,(0,O.getErrorMessage)(M))}}async validateCache(){if(!this.input)return;const j=await this.readExtensionCache();if(!j)return;const M=j.result,F=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!I.equals(F,M))try{await this.fileService.del(this.cacheFile),this._onDidChangeCache.fire()}catch(z){this.logService.error(z)}}};re=de([ee(2,f.IExtensionsProfileScannerService),ee(3,N.IUriIdentityService),ee(4,n.IFileService),ee(5,r.ILogService)],re);function ge(te,j){const M=(0,u.getExtensionId)(te.manifest.publisher,te.manifest.name);return{id:M,identifier:new s.ExtensionIdentifier(M),isBuiltin:te.type===0,isUserBuiltin:te.type===1&&te.isBuiltin,isUnderDevelopment:j,extensionLocation:te.location,uuid:te.identifier.uuid,targetPlatform:te.targetPlatform,...te.manifest}}e.toExtensionDescription=ge;class ce extends J{constructor(j,M,F,z,$,Y,A,V,L,T,U){super(j,M,(0,S.joinPath)(F,".vscode-oss-dev","extensions","control.json"),(0,S.joinPath)(z,s.MANIFEST_CACHE_FOLDER),$,Y,A,V,L,T,U),this.translationsPromise=(async()=>{if(g.translationsConfigFile)try{const W=await this.fileService.readFile(l.URI.file(g.translationsConfigFile));return JSON.parse(W.value.toString())}catch{}return Object.create(null)})()}getTranslations(j){return this.translationsPromise}}e.NativeExtensionsScannerService=ce}),define(Q[142],Z([0,1,57,3,31,4,2,16,14,20,9,25]),function(_,e,C,R,I,k,O,v,d,h,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsLifecycle=void 0;let g=class extends O.Disposable{constructor(p,P){super(),this.userDataProfilesService=p,this.logService=P,this.processesLimiter=new R.Limiter(5)}async postUninstall(p){const P=this.parseScript(p,"uninstall");return P&&(this.logService.info(p.identifier.id,p.manifest.version,"Running post uninstall script"),await this.processesLimiter.queue(()=>this.runLifecycleHook(P.script,"uninstall",P.args,!0,p).then(()=>this.logService.info(p.identifier.id,p.manifest.version,"Finished running post uninstall script"),y=>this.logService.error(p.identifier.id,p.manifest.version,`Failed to run post uninstall script: ${y}`)))),h.Promises.rm(this.getExtensionStoragePath(p)).then(void 0,y=>this.logService.error("Error while removing extension storage path",y))}parseScript(p,P){const y=`vscode:${P}`;if(p.location.scheme===v.Schemas.file&&p.manifest&&p.manifest.scripts&&typeof p.manifest.scripts[y]=="string"){const l=p.manifest.scripts[y].split(" ");return l.length<2||l[0]!=="node"||!l[1]?(this.logService.warn(p.identifier.id,p.manifest.version,`${y} should be a node script`),null):{script:(0,d.join)(p.location.fsPath,l[1]),args:l.slice(2)||[]}}return null}runLifecycleHook(p,P,y,l,m){return new Promise((E,u)=>{const s=this.start(p,P,y,m);let t;const n=i=>{t&&(clearTimeout(t),t=null),i?u(i):E(void 0)};s.on("error",i=>{n((0,I.toErrorMessage)(i)||"Unknown")}),s.on("exit",(i,r)=>{n(i?`post-${P} process exited with code ${i}`:void 0)}),l&&(t=setTimeout(()=>{t=null,s.kill(),u("timed out")},5e3))})}start(p,P,y,l){const m={silent:!0,execArgv:void 0},E=(0,C.fork)(p,[`--type=extension-post-${P}`,...y],m);E.stdout.setEncoding("utf8"),E.stderr.setEncoding("utf8");const u=k.Event.fromNodeEventEmitter(E.stdout,"data"),s=k.Event.fromNodeEventEmitter(E.stderr,"data");u(i=>this.logService.info(l.identifier.id,l.manifest.version,`post-${P}`,i)),s(i=>this.logService.error(l.identifier.id,l.manifest.version,`post-${P}`,i));const t=k.Event.any(k.Event.map(u,i=>({data:`%c${i}`,format:[""]})),k.Event.map(s,i=>({data:`%c${i}`,format:["color: red"]})));return k.Event.debounce(t,(i,r)=>i?{data:i.data+r.data,format:[...i.format,...r.format]}:{data:r.data,format:r.format},100)(i=>{console.group(l.identifier.id),console.log(i.data,...i.format),console.groupEnd()}),E}getExtensionStoragePath(p){return(0,d.join)(this.userDataProfilesService.defaultProfile.globalStorageHome.fsPath,p.identifier.id.toLowerCase())}};g=de([ee(0,b.IUserDataProfilesService),ee(1,w.ILogService)],g),e.ExtensionsLifecycle=g}),define(Q[143],Z([0,1,10,17,41,48,13,8,9,28,25]),function(_,e,C,R,I,k,O,v,d,h,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsScannerService=void 0;let b=class extends k.NativeExtensionsScannerService{constructor(S,p,P,y,l,m,E){super(C.URI.file(l.builtinExtensionsPath),C.URI.file(l.extensionsPath),l.userHome,C.URI.file(l.userDataPath),S,p,P,y,l,m,E)}};b=de([ee(0,w.IUserDataProfilesService),ee(1,I.IExtensionsProfileScannerService),ee(2,O.IFileService),ee(3,d.ILogService),ee(4,R.INativeEnvironmentService),ee(5,h.IProductService),ee(6,v.IInstantiationService)],b),e.ExtensionsScannerService=b}),define(Q[144],Z([0,1,3,4,2,114,5,80,8,25]),function(_,e,C,R,I,k,O,v,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.isProfileUsingDefaultStorage=e.AbstractStorageService=e.loadKeyTargets=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker",e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,d.createDecorator)("storageService");var w;(function(m){m[m.NONE=0]="NONE",m[m.SHUTDOWN=1]="SHUTDOWN"})(w=e.WillSaveStateReason||(e.WillSaveStateReason={}));var b;(function(m){m[m.APPLICATION=-1]="APPLICATION",m[m.PROFILE=0]="PROFILE",m[m.WORKSPACE=1]="WORKSPACE"})(b=e.StorageScope||(e.StorageScope={}));var g;(function(m){m[m.USER=0]="USER",m[m.MACHINE=1]="MACHINE"})(g=e.StorageTarget||(e.StorageTarget={}));function S(m){const E=m.get(e.TARGET_KEY);if(E)try{return JSON.parse(E)}catch{}return Object.create(null)}e.loadKeyTargets=S;class p extends I.Disposable{constructor(E={flushInterval:p.DEFAULT_FLUSH_INTERVAL}){super(),this.options=E,this._onDidChangeValue=this._register(new R.PauseableEmitter),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new R.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new R.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new C.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new I.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,C.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,I.dispose)([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{(0,k.mark)("code/willInitStorage");try{await this.doInitialize()}finally{(0,k.mark)("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(E,u){if(u===e.TARGET_KEY){switch(E){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:E})}else this._onDidChangeValue.fire({scope:E,key:u,target:this.getKeyTargets(E)[u]})}emitWillSaveState(E){this._onWillSaveState.fire({reason:E})}get(E,u,s){return this.getStorage(u)?.get(E,s)}getBoolean(E,u,s){return this.getStorage(u)?.getBoolean(E,s)}getNumber(E,u,s){return this.getStorage(u)?.getNumber(E,s)}store(E,u,s,t){if((0,O.isUndefinedOrNull)(u)){this.remove(E,s);return}this.withPausedEmitters(()=>{this.updateKeyTarget(E,s,t),this.getStorage(s)?.set(E,u)})}remove(E,u){this.withPausedEmitters(()=>{this.updateKeyTarget(E,u,void 0),this.getStorage(u)?.delete(E)})}withPausedEmitters(E){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{E()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(E,u){const s=[],t=this.getKeyTargets(E);for(const n of Object.keys(t))t[n]===u&&s.push(n);return s}updateKeyTarget(E,u,s){const t=this.getKeyTargets(u);typeof s=="number"?t[E]!==s&&(t[E]=s,this.getStorage(u)?.set(e.TARGET_KEY,JSON.stringify(t))):typeof t[E]=="number"&&(delete t[E],this.getStorage(u)?.set(e.TARGET_KEY,JSON.stringify(t)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(E){switch(E){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(E){const u=this.getStorage(E);return u?S(u):Object.create(null)}isNew(E){return this.getBoolean(e.IS_NEW_KEY,E)===!0}async flush(E=w.NONE){this._onWillSaveState.fire({reason:E});const u=this.getStorage(-1),s=this.getStorage(0),t=this.getStorage(1);switch(E){case w.NONE:await C.Promises.settled([u?.whenFlushed()??Promise.resolve(),s?.whenFlushed()??Promise.resolve(),t?.whenFlushed()??Promise.resolve()]);break;case w.SHUTDOWN:await C.Promises.settled([u?.flush(0)??Promise.resolve(),s?.flush(0)??Promise.resolve(),t?.flush(0)??Promise.resolve()]);break}}async log(){const E=this.getStorage(-1)?.items??new Map,u=this.getStorage(0)?.items??new Map,s=this.getStorage(1)?.items??new Map;return l(E,u,s,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async switch(E,u){return this.emitWillSaveState(w.NONE),(0,h.isUserDataProfile)(E)?this.switchToProfile(E,u):this.switchToWorkspace(E,u)}canSwitchProfile(E,u){return!(E.id===u.id||P(u)&&P(E))}switchData(E,u,s,t){this.withPausedEmitters(()=>{if(t)for(const[n,i]of E)u.set(n,i);else{const n=new Set;for(const[i,r]of E)n.add(i),u.get(i)!==r&&this.emitDidChangeValue(s,i);for(const[i]of u.items)n.has(i)||this.emitDidChangeValue(s,i)}})}}e.AbstractStorageService=p,p.DEFAULT_FLUSH_INTERVAL=60*1e3;function P(m){return m.isDefault||!!m.useDefaultFlags?.uiState}e.isProfileUsingDefaultStorage=P;class y extends p{constructor(){super(),this.applicationStorage=this._register(new v.Storage(new v.InMemoryStorageDatabase)),this.profileStorage=this._register(new v.Storage(new v.InMemoryStorageDatabase)),this.workspaceStorage=this._register(new v.Storage(new v.InMemoryStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(E=>this.emitDidChangeValue(1,E))),this._register(this.profileStorage.onDidChangeStorage(E=>this.emitDidChangeValue(0,E))),this._register(this.applicationStorage.onDidChangeStorage(E=>this.emitDidChangeValue(-1,E)))}getStorage(E){switch(E){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(E){switch(E){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(E){return!1}}e.InMemoryStorageService=y;async function l(m,E,u,s,t,n){const i=X=>{try{return JSON.parse(X)}catch{return X}},r=new Map,o=new Map;m.forEach((X,J)=>{r.set(J,X),o.set(J,i(X))});const c=new Map,a=new Map;E.forEach((X,J)=>{c.set(J,X),a.set(J,i(X))});const f=new Map,D=new Map;u.forEach((X,J)=>{f.set(J,X),D.set(J,i(X))}),console.group(s!==t?`Storage: Application (path: ${s})`:`Storage: Application & Profile (path: ${s}, default profile)`);const N=[];if(r.forEach((X,J)=>{N.push({key:J,value:X})}),console.table(N),console.groupEnd(),console.log(o),s!==t){console.group(`Storage: Profile (path: ${t}, profile specific)`);const X=[];c.forEach((J,se)=>{X.push({key:se,value:J})}),console.table(X),console.groupEnd(),console.log(a)}console.group(`Storage: Workspace (path: ${n})`);const B=[];f.forEach((X,J)=>{B.push({key:J,value:X})}),console.table(B),console.groupEnd(),console.log(D)}e.logStorage=l}),define(Q[145],Z([0,1,19,24,11,12,32,5,10,21,17,22,23,45,13,9,28,47,132,144,35]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m,E,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionGalleryServiceWithNoStorageService=e.ExtensionGalleryService=e.sortExtensionVersions=void 0;const s=k.isWeb?"web":(0,b.getTargetPlatform)(k.platform,O.arch);var t;(function(L){L[L.None=0]="None",L[L.IncludeVersions=1]="IncludeVersions",L[L.IncludeFiles=2]="IncludeFiles",L[L.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",L[L.IncludeSharedAccounts=8]="IncludeSharedAccounts",L[L.IncludeVersionProperties=16]="IncludeVersionProperties",L[L.ExcludeNonValidated=32]="ExcludeNonValidated",L[L.IncludeInstallationTargets=64]="IncludeInstallationTargets",L[L.IncludeAssetUri=128]="IncludeAssetUri",L[L.IncludeStatistics=256]="IncludeStatistics",L[L.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",L[L.Unpublished=4096]="Unpublished",L[L.IncludeNameConflictInfo=32768]="IncludeNameConflictInfo"})(t||(t={}));function n(...L){return String(L.reduce((T,U)=>T|U,0))}var i;(function(L){L[L.Tag=1]="Tag",L[L.ExtensionId=4]="ExtensionId",L[L.Category=5]="Category",L[L.ExtensionName=7]="ExtensionName",L[L.Target=8]="Target",L[L.Featured=9]="Featured",L[L.SearchText=10]="SearchText",L[L.ExcludeWithFlags=12]="ExcludeWithFlags"})(i||(i={}));const r={Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest",VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source",Signature:"Microsoft.VisualStudio.Services.VsixSignature"},o={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",PreRelease:"Microsoft.VisualStudio.Code.PreRelease",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages",WebExtension:"Microsoft.VisualStudio.Code.WebExtension",SponsorLink:"Microsoft.VisualStudio.Code.SponsorLink"},a={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:t.None,criteria:[],assetTypes:[]};class f{constructor(T=a){this.state=T}get pageNumber(){return this.state.pageNumber}get pageSize(){return this.state.pageSize}get sortBy(){return this.state.sortBy}get sortOrder(){return this.state.sortOrder}get flags(){return this.state.flags}get criteria(){return this.state.criteria}withPage(T,U=this.state.pageSize){return new f({...this.state,pageNumber:T,pageSize:U})}withFilter(T,...U){const W=[...this.state.criteria,...U.length?U.map(q=>({filterType:T,value:q})):[{filterType:T}]];return new f({...this.state,criteria:W})}withSortBy(T){return new f({...this.state,sortBy:T})}withSortOrder(T){return new f({...this.state,sortOrder:T})}withFlags(...T){return new f({...this.state,flags:T.reduce((U,W)=>U|W,0)})}withAssetTypes(...T){return new f({...this.state,assetTypes:T})}withSource(T){return new f({...this.state,source:T})}get raw(){const{criteria:T,pageNumber:U,pageSize:W,sortBy:q,sortOrder:H,flags:oe,assetTypes:ue}=this.state;return{filters:[{criteria:T,pageNumber:U,pageSize:W,sortBy:q,sortOrder:H}],assetTypes:ue,flags:oe}}get searchText(){const T=this.state.criteria.filter(U=>U.filterType===i.SearchText)[0];return T&&T.value?T.value:""}get telemetryData(){return{filterTypes:this.state.criteria.map(T=>String(T.filterType)),flags:this.state.flags,sortBy:String(this.sortBy),sortOrder:String(this.sortOrder),pageNumber:String(this.pageNumber),source:this.state.source,searchTextLength:this.searchText.length}}}function D(L,T){const U=(L||[]).filter(W=>W.statisticName===T)[0];return U?U.value:0}function N(L){const T="Microsoft.VisualStudio.Code.Translation.";return L.files.filter(W=>W.assetType.indexOf(T)===0).reduce((W,q)=>{const H=J(L,q.assetType);return H&&W.push([q.assetType.substring(T.length),H]),W},[])}function B(L){if(L.properties){const T=L.properties.filter(q=>q.key===r.Repository),U=new RegExp("((git|ssh|http(s)?)|(git@[\\w.]+))(:(//)?)([\\w.@:/\\-~]+)(.git)(/)?"),W=T.filter(q=>U.test(q.value))[0];return W?{uri:W.value,fallbackUri:W.value}:null}return J(L,r.Repository)}function X(L){return{uri:`${L.fallbackAssetUri}/${r.VSIX}?redirect=true${L.targetPlatform?`&targetPlatform=${L.targetPlatform}`:""}`,fallbackUri:`${L.fallbackAssetUri}/${r.VSIX}${L.targetPlatform?`?targetPlatform=${L.targetPlatform}`:""}`}}function J(L,T){return L.files.filter(W=>W.assetType===T)[0]?{uri:`${L.assetUri}/${T}${L.targetPlatform?`?targetPlatform=${L.targetPlatform}`:""}`,fallbackUri:`${L.fallbackAssetUri}/${T}${L.targetPlatform?`?targetPlatform=${L.targetPlatform}`:""}`}:null}function se(L,T){const U=L.properties?L.properties.filter(q=>q.key===T):[],W=U.length>0&&U[0].value;return W?W.split(",").map(q=>(0,g.adoptToGalleryExtensionId)(q)):[]}function ne(L){const T=L.properties?L.properties.filter(U=>U.key===o.Engine):[];return T.length>0&&T[0].value||""}function re(L){const T=L.properties?L.properties.filter(U=>U.key===o.PreRelease):[];return T.length>0&&T[0].value==="true"}function ge(L){const T=L.properties?L.properties.filter(W=>W.key===o.LocalizedLanguages):[],U=T.length>0&&T[0].value||"";return U?U.split(","):[]}function ce(L){return L.properties?.find(T=>T.key===o.SponsorLink)?.value}function te(L){return L.indexOf("preview")!==-1}function j(L){return L.targetPlatform?(0,b.toTargetPlatform)(L.targetPlatform):"undefined"}function M(L){const T=(0,C.distinct)(L.versions.map(j)),U=!!L.tags?.includes(b.WEB_EXTENSION_TAG),W=T.indexOf("web");return U?W===-1&&T.push("web"):W!==-1&&T.splice(W,1),T}function F(L,T){const U=(0,b.getFallbackTargetPlarforms)(T);for(let W=0;W0&&L[H-1].version===q.version;)H--;else if(U.includes(oe))for(;H>0&&L[H-1].version===q.version&&j(L[H-1])!==T;)H--;H!==W&&(L.splice(W,1),L.splice(H,0,q))}}return L}e.sortExtensionVersions=F;function z(L,T,U){L.telemetryData={index:T,querySource:U}}function $(L,T,U){const W=L.versions[0],q={manifest:J(T,r.Manifest),readme:J(T,r.Details),changelog:J(T,r.Changelog),license:J(T,r.License),repository:B(T),download:X(T),icon:J(T,r.Icon),signature:J(T,r.Signature),coreTranslations:N(T)};return{identifier:{id:(0,g.getGalleryExtensionId)(L.publisher.publisherName,L.extensionName),uuid:L.extensionId},name:L.extensionName,version:T.version,displayName:L.displayName,publisherId:L.publisher.publisherId,publisher:L.publisher.publisherName,publisherDisplayName:L.publisher.displayName,publisherDomain:L.publisher.domain?{link:L.publisher.domain,verified:!!L.publisher.isDomainVerified}:void 0,publisherSponsorLink:ce(W),description:L.shortDescription||"",installCount:D(L.statistics,"install"),rating:D(L.statistics,"averagerating"),ratingCount:D(L.statistics,"ratingcount"),categories:L.categories||[],tags:L.tags||[],releaseDate:Date.parse(L.releaseDate),lastUpdated:Date.parse(L.lastUpdated),allTargetPlatforms:U,assets:q,properties:{dependencies:se(T,o.Dependency),extensionPack:se(T,o.ExtensionPack),engine:ne(T),localizedLanguages:ge(T),targetPlatform:j(T),isPreReleaseVersion:re(T)},hasPreReleaseVersion:re(W),hasReleaseVersion:!0,preview:te(L.flags),isSigned:!!q.signature}}let Y=class{constructor(T,U,W,q,H,oe,ue,ve){this.requestService=U,this.logService=W,this.environmentService=q,this.telemetryService=H,this.fileService=oe,this.productService=ue,this.configurationService=ve;const Se=ue.extensionsGallery,le=Se?.servicePPEUrl&&ve.getValue("_extensionsGallery.enablePPE");this.extensionsGalleryUrl=le?Se.servicePPEUrl:Se?.serviceUrl,this.extensionsGallerySearchUrl=le?void 0:Se?.searchUrl,this.extensionsControlUrl=Se?.controlUrl,this.commonHeadersPromise=(0,m.resolveMarketplaceHeaders)(ue.version,ue,this.environmentService,this.configurationService,this.fileService,T,this.telemetryService)}api(T=""){return`${this.extensionsGalleryUrl}${T}`}isEnabled(){return!!this.extensionsGalleryUrl}async getExtensions(T,U,W){const q=R.CancellationToken.isCancellationToken(U)?{}:U,H=R.CancellationToken.isCancellationToken(U)?U:W,oe=[],ue=[],ve=[],Se=[];let le=!0;for(const ae of T){ae.uuid?ue.push(ae.uuid):oe.push(ae.id);const pe=!!(ae.version||ae.preRelease);ve.push({id:ae.id,uuid:ae.uuid,includePreRelease:pe}),ae.version&&Se.push({id:ae.id,uuid:ae.uuid,version:ae.version}),le=le&&!!ae.hasPreRelease&&!pe}if(!ue.length&&!oe.length)return[];let ie=new f().withPage(1,T.length);ue.length&&(ie=ie.withFilter(i.ExtensionId,...ue)),oe.length&&(ie=ie.withFilter(i.ExtensionName,...oe)),(q.queryAllVersions||le)&&(ie=ie.withFlags(ie.flags,t.IncludeVersions)),q.source&&(ie=ie.withSource(q.source));const{extensions:fe}=await this.queryGalleryExtensions(ie,{targetPlatform:q.targetPlatform??s,includePreRelease:ve,versions:Se,compatible:!!q.compatible},H);return q.source&&fe.forEach((ae,pe)=>z(ae,pe,q.source)),fe}async getCompatibleExtension(T,U,W){if((0,b.isNotWebExtensionInWebTargetPlatform)(T.allTargetPlatforms,W))return null;if(await this.isExtensionCompatible(T,U,W))return T;const q=new f().withFlags(t.IncludeVersions).withPage(1,1).withFilter(i.ExtensionId,T.identifier.uuid),{extensions:H}=await this.queryGalleryExtensions(q,{targetPlatform:W,compatible:!0,includePreRelease:U},R.CancellationToken.None);return H[0]||null}async isExtensionCompatible(T,U,W){if(!(0,b.isTargetPlatformCompatible)(T.properties.targetPlatform,T.allTargetPlatforms,W)||!U&&T.properties.isPreReleaseVersion)return!1;let q=T.properties.engine;if(!q){const H=await this.getManifest(T,R.CancellationToken.None);if(!H)throw new Error("Manifest was not found");q=H.engines.vscode}return(0,S.isEngineValid)(q,this.productService.version,this.productService.date)}async isValidVersion(T,U,W,q,H){if(!(0,b.isTargetPlatformCompatible)(j(T),q,H)||U!=="any"&&re(T)!==(U==="prerelease"))return!1;if(W)try{const oe=await this.getEngine(T);if(!(0,S.isEngineValid)(oe,this.productService.version,this.productService.date))return!1}catch(oe){return this.logService.error(`Error while getting the engine for the version ${T.version}.`,(0,I.getErrorMessage)(oe)),!1}return!0}async query(T,U){let W=T.text||"";const q=T.pageSize??50;let H=new f().withPage(1,q);W?(W=W.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(le,ie,fe)=>(H=H.withFilter(i.Category,fe||ie),"")),W=W.replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(le,ie,fe)=>(H=H.withFilter(i.Tag,fe||ie),"")),W=W.replace(/\bfeatured(\s+|\b|$)/g,()=>(H=H.withFilter(i.Featured),"")),W=W.trim(),W&&(W=W.length<200?W:W.substring(0,200),H=H.withFilter(i.SearchText,W)),H=H.withSortBy(0)):T.ids?H=H.withFilter(i.ExtensionId,...T.ids):T.names?H=H.withFilter(i.ExtensionName,...T.names):H=H.withSortBy(4),typeof T.sortBy=="number"&&(H=H.withSortBy(T.sortBy)),typeof T.sortOrder=="number"&&(H=H.withSortOrder(T.sortOrder)),T.source&&(H=H.withSource(T.source));const oe=async(le,ie)=>{const{extensions:fe,total:ae}=await this.queryGalleryExtensions(le,{targetPlatform:s,compatible:!1,includePreRelease:!!T.includePreRelease},ie);return fe.forEach((pe,Fe)=>z(pe,(le.pageNumber-1)*le.pageSize+Fe,T.source)),{extensions:fe,total:ae}},{extensions:ue,total:ve}=await oe(H,U),Se=async(le,ie)=>{if(ie.isCancellationRequested)throw new I.CancellationError;const{extensions:fe}=await oe(H.withPage(le+1),ie);return fe};return{firstPage:ue,total:ve,pageSize:H.pageSize,getPage:Se}}async queryGalleryExtensions(T,U,W){const q=T.flags;!!(T.flags&t.IncludeLatestVersionOnly)&&!!(T.flags&t.IncludeVersions)&&(T=T.withFlags(T.flags&~t.IncludeVersions,t.IncludeLatestVersionOnly)),!(T.flags&t.IncludeLatestVersionOnly)&&!(T.flags&t.IncludeVersions)&&(T=T.withFlags(T.flags,t.IncludeLatestVersionOnly)),U.versions?.length&&(T=T.withFlags(T.flags&~t.IncludeLatestVersionOnly,t.IncludeVersions)),T=T.withFlags(T.flags,t.IncludeAssetUri,t.IncludeCategoryAndTags,t.IncludeFiles,t.IncludeStatistics,t.IncludeVersionProperties);const{galleryExtensions:H,total:oe}=await this.queryRawGalleryExtensions(T,W);if(!(T.flags&t.IncludeLatestVersionOnly)){const le=[];for(const ie of H){const fe=await this.toGalleryExtensionWithCriteria(ie,U);fe&&le.push(fe)}return{extensions:le,total:oe}}const ve=[],Se=new Map;for(let le=0;le(0,g.areSameExtensions)(Fe,fe))?.includePreRelease;if(U.compatible&&(0,b.isNotWebExtensionInWebTargetPlatform)(M(ie),U.targetPlatform))continue;const pe=await this.toGalleryExtensionWithCriteria(ie,U);!pe||pe.properties.isPreReleaseVersion&&(!ae||!pe.hasReleaseVersion)||!pe.properties.isPreReleaseVersion&&pe.properties.targetPlatform!==U.targetPlatform&&pe.hasPreReleaseVersion?Se.set(ie.extensionId,le):ve.push([le,pe])}if(Se.size){const le=new Date().getTime(),ie=new f().withFlags(q&~t.IncludeLatestVersionOnly,t.IncludeVersions).withPage(1,Se.size).withFilter(i.ExtensionId,...Se.keys()),{extensions:fe}=await this.queryGalleryExtensions(ie,U,W);this.telemetryService.publicLog2("galleryService:additionalQuery",{duration:new Date().getTime()-le,count:Se.size});for(const ae of fe){const pe=Se.get(ae.identifier.uuid);ve.push([pe,ae])}}return{extensions:ve.sort((le,ie)=>le[0]-ie[0]).map(([,le])=>le),total:oe}}async toGalleryExtensionWithCriteria(T,U){const W={id:(0,g.getGalleryExtensionId)(T.publisher.publisherName,T.extensionName),uuid:T.extensionId},q=U.versions?.find(ve=>(0,g.areSameExtensions)(ve,W))?.version,H=(0,v.isBoolean)(U.includePreRelease)?U.includePreRelease:!!U.includePreRelease.find(ve=>(0,g.areSameExtensions)(ve,W))?.includePreRelease,oe=M(T),ue=F(T.versions,U.targetPlatform);if(U.compatible&&(0,b.isNotWebExtensionInWebTargetPlatform)(oe,U.targetPlatform))return null;for(let ve=0;veie.filterType===i.SearchText)?this.extensionsGallerySearchUrl:this.api("/extensionquery"),data:q,headers:H},U),ue.res.statusCode&&ue.res.statusCode>=400&&ue.res.statusCode<500)return{galleryExtensions:[],total:Se};const le=await(0,l.asJson)(ue);if(le){const ie=le.results[0],fe=ie.extensions,ae=ie.resultMetadata&&ie.resultMetadata.filter(pe=>pe.metadataType==="ResultCount")[0];return Se=ae&&ae.metadataItems.filter(pe=>pe.name==="TotalCount")[0].count||0,{galleryExtensions:fe,total:Se}}return{galleryExtensions:[],total:Se}}catch(le){throw ve=le,le}finally{this.telemetryService.publicLog2("galleryService:query",{...T.telemetryData,requestBodySize:String(q.length),duration:new Date().getTime()-oe,success:!!ue&&(0,l.isSuccess)(ue),responseBodySize:ue?.res.headers["Content-Length"],statusCode:ue?String(ue.res.statusCode):void 0,errorCode:ve?(0,I.isCancellationError)(ve)?"canceled":(0,I.getErrorMessage)(ve).startsWith("XHR timeout")?"timeout":"failed":void 0,count:String(Se)})}}async reportStatistic(T,U,W,q){if(!this.isEnabled())return;const H=k.isWeb?this.api(`/itemName/${T}.${U}/version/${W}/statType/${q==="install"?"1":"3"}/vscodewebextension`):this.api(`/publishers/${T}/extensions/${U}/${W}/stats?statType=${q}`),oe=k.isWeb?"api-version=6.1-preview.1":"*/*;api-version=4.0-preview.1",ve={...await this.commonHeadersPromise,Accept:oe};try{await this.requestService.request({type:"POST",url:H,headers:ve},R.CancellationToken.None)}catch{}}async download(T,U,W){this.logService.trace("ExtensionGalleryService#download",T.identifier.id);const q=(0,g.getGalleryExtensionTelemetryData)(T),H=new Date().getTime(),oe=le=>this.telemetryService.publicLog("galleryService:downloadVSIX",{...q,duration:le}),ue=W===2?"install":W===3?"update":"",ve=ue?{uri:`${T.assets.download.uri}${d.URI.parse(T.assets.download.uri).query?"&":"?"}${ue}=true`,fallbackUri:`${T.assets.download.fallbackUri}${d.URI.parse(T.assets.download.fallbackUri).query?"&":"?"}${ue}=true`}:T.assets.download,Se=await this.getAsset(ve);await this.fileService.writeFile(U,Se.stream),oe(new Date().getTime()-H)}async downloadSignatureArchive(T,U){if(!T.assets.signature)throw new Error("No signature asset found");this.logService.trace("ExtensionGalleryService#downloadSignatureArchive",T.identifier.id);const W=await this.getAsset(T.assets.signature);await this.fileService.writeFile(U,W.stream)}async getReadme(T,U){if(T.assets.readme){const W=await this.getAsset(T.assets.readme,{},U);return await(0,l.asTextOrError)(W)||""}return""}async getManifest(T,U){if(T.assets.manifest){const W=await this.getAsset(T.assets.manifest,{},U),q=await(0,l.asTextOrError)(W);return q?JSON.parse(q):null}return null}async getManifestFromRawExtensionVersion(T,U){const W=J(T,r.Manifest);if(!W)throw new Error("Manifest was not found");const q={"Accept-Encoding":"gzip"},H=await this.getAsset(W,{headers:q});return await(0,l.asJson)(H)}async getCoreTranslation(T,U){const W=T.assets.coreTranslations.filter(q=>q[0]===U.toUpperCase())[0];if(W){const q=await this.getAsset(W[1]),H=await(0,l.asTextOrError)(q);return H?JSON.parse(H):null}return null}async getChangelog(T,U){if(T.assets.changelog){const W=await this.getAsset(T.assets.changelog,{},U);return await(0,l.asTextOrError)(W)||""}return""}async getAllCompatibleVersions(T,U,W){let q=new f().withFlags(t.IncludeVersions,t.IncludeCategoryAndTags,t.IncludeFiles,t.IncludeVersionProperties).withPage(1,1);T.identifier.uuid?q=q.withFilter(i.ExtensionId,T.identifier.uuid):q=q.withFilter(i.ExtensionName,T.identifier.id);const{galleryExtensions:H}=await this.queryRawGalleryExtensions(q,R.CancellationToken.None);if(!H.length)return[];const oe=M(H[0]);if((0,b.isNotWebExtensionInWebTargetPlatform)(oe,W))return[];const ue=[];await Promise.all(H[0].versions.map(async le=>{try{await this.isValidVersion(le,U?"any":"release",!0,oe,W)&&ue.push(le)}catch{}}));const ve=[],Se=new Set;for(const le of F(ue,W))Se.has(le.version)||(Se.add(le.version),ve.push({version:le.version,date:le.lastUpdated,isPreReleaseVersion:re(le)}));return ve}async getAsset(T,U={},W=R.CancellationToken.None){const q=await this.commonHeadersPromise,H={type:"GET"},oe={...q,...U.headers||{}};U={...U,...H,headers:oe};const ue=T.uri,ve=T.fallbackUri,Se={...U,url:ue};try{const le=await this.requestService.request(Se,W);if(le.res.statusCode===200)return le;const ie=await(0,l.asTextOrError)(le);throw new Error(`Expected 200, got back ${le.res.statusCode} instead. ${ie}`)}catch(le){if((0,I.isCancellationError)(le))throw le;const ie=(0,I.getErrorMessage)(le);this.telemetryService.publicLog2("galleryService:cdnFallback",{url:ue,message:ie});const fe={...U,url:ve};return this.requestService.request(fe,W)}}async getEngine(T){let U=ne(T);if(!U){const W=await this.getManifestFromRawExtensionVersion(T,R.CancellationToken.None);if(!W)throw new Error("Manifest was not found");U=W.engines.vscode}return U}async getExtensionsControlManifest(){if(!this.isEnabled())throw new Error("No extension gallery service configured.");if(!this.extensionsControlUrl)return{malicious:[],deprecated:{}};const T=await this.requestService.request({type:"GET",url:this.extensionsControlUrl},R.CancellationToken.None);if(T.res.statusCode!==200)throw new Error("Could not get extensions report.");const U=await(0,l.asJson)(T),W=[],q={};if(U){for(const H of U.malicious)W.push({id:H});if(U.migrateToPreRelease)for(const[H,oe]of Object.entries(U.migrateToPreRelease))(!oe.engine||(0,S.isEngineValid)(oe.engine,this.productService.version,this.productService.date))&&(q[H.toLowerCase()]={disallowInstall:!0,extension:{id:oe.id,displayName:oe.displayName,autoMigrate:{storage:!!oe.migrateStorage},preRelease:!0}});if(U.deprecated)for(const[H,oe]of Object.entries(U.deprecated))oe&&(q[H.toLowerCase()]=(0,v.isBoolean)(oe)?{}:oe)}return{malicious:W,deprecated:q}}};Y=de([ee(1,l.IRequestService),ee(2,P.ILogService),ee(3,w.IEnvironmentService),ee(4,u.ITelemetryService),ee(5,p.IFileService),ee(6,y.IProductService),ee(7,h.IConfigurationService)],Y);let A=class extends Y{constructor(T,U,W,q,H,oe,ue,ve){super(T,U,W,q,H,oe,ue,ve)}};A=de([ee(0,E.IStorageService),ee(1,l.IRequestService),ee(2,P.ILogService),ee(3,w.IEnvironmentService),ee(4,u.ITelemetryService),ee(5,p.IFileService),ee(6,y.IProductService),ee(7,h.IConfigurationService)],A),e.ExtensionGalleryService=A;let V=class extends Y{constructor(T,U,W,q,H,oe,ue){super(void 0,T,U,W,q,H,oe,ue)}};V=de([ee(0,l.IRequestService),ee(1,P.ILogService),ee(2,w.IEnvironmentService),ee(3,u.ITelemetryService),ee(4,p.IFileService),ee(5,y.IProductService),ee(6,h.IConfigurationService)],V),e.ExtensionGalleryServiceWithNoStorageService=V}),define(Q[146],Z([0,1,44,17,13,9,66,29,25]),function(_,e,C,R,I,k,O,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesService=void 0;let h=class We extends d.UserDataProfilesService{constructor(b,g,S,p,P){super(S,p,g,P),this.stateService=b}getStoredProfiles(){return(0,C.revive)(this.stateService.getItem(We.PROFILES_KEY,[]))}getStoredProfileAssociations(){return(0,C.revive)(this.stateService.getItem(We.PROFILE_ASSOCIATIONS_KEY,{}))}};h=de([ee(0,O.IStateService),ee(1,v.IUriIdentityService),ee(2,R.IEnvironmentService),ee(3,I.IFileService),ee(4,k.ILogService)],h),e.UserDataProfilesService=h}),define(Q[147],Z([0,1,36,3,160,2]),function(_,e,C,R,I,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePolicyService=void 0;class O extends C.AbstractPolicyService{constructor(d){super(),this.productName=d,this.throttler=new R.Throttler,this.watcher=this._register(new k.MutableDisposable)}async initializePolicies(d){await this.throttler.queue(()=>new Promise((h,w)=>{try{this.watcher.value=(0,I.createWatcher)(this.productName,d,b=>{for(const g in b){const S=b[g];S===void 0?this.policies.delete(g):this.policies.set(g,S)}this._onDidChange.fire(Object.keys(b)),h()})}catch(b){w(b)}}))}}e.NativePolicyService=O}),define(Q[68],Z([0,1,116,3,14,5,20,81,161,162]),function(_,e,C,R,I,k,O,v,d,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=e.extract=e.zip=e.ExtractError=void 0;class w extends Error{constructor(t,n){let i=n.message;switch(t){case"CorruptZip":i=`Corrupt ZIP: ${i}`;break}super(i),this.type=t,this.cause=n}}e.ExtractError=w;function b(s){const t=s.externalFileAttributes>>16||33188;return[448,56,7].map(n=>t&n).reduce((n,i)=>n+i,t&61440)}function g(s){if(s instanceof w)return s;let t;return/end of central directory record signature not found/.test(s.message)&&(t="CorruptZip"),new w(t,s)}function S(s,t,n,i,r,o){const c=I.dirname(t),a=I.join(i,c);if(!a.startsWith(i))return Promise.reject(new Error(v.localize(0,null,t)));const f=I.join(i,t);let D;return o.onCancellationRequested(()=>{D?.destroy()}),Promise.resolve(O.Promises.mkdir(a,{recursive:!0})).then(()=>new Promise((N,B)=>{if(!o.isCancellationRequested)try{D=(0,C.createWriteStream)(f,{mode:n}),D.once("close",()=>N()),D.once("error",B),s.once("error",B),s.pipe(D)}catch(X){B(X)}}))}function p(s,t,n,i){let r=(0,R.createCancelablePromise)(()=>Promise.resolve()),o=0;return i.onCancellationRequested(()=>{r.cancel(),s.close()}),new Promise((c,a)=>{const f=new R.Sequencer,D=N=>{N.isCancellationRequested||(o++,s.readEntry())};s.once("error",a),s.once("close",()=>r.then(()=>{i.isCancellationRequested||s.entryCount===o?c():a(new w("Incomplete",new Error(v.localize(1,null,o,s.entryCount))))},a)),s.readEntry(),s.on("entry",N=>{if(i.isCancellationRequested)return;if(!n.sourcePathRegex.test(N.fileName)){D(i);return}const B=N.fileName.replace(n.sourcePathRegex,"");if(/\/$/.test(B)){const se=I.join(t,B);r=(0,R.createCancelablePromise)(ne=>O.Promises.mkdir(se,{recursive:!0}).then(()=>D(ne)).then(void 0,a));return}const X=y(s,N),J=b(N);r=(0,R.createCancelablePromise)(se=>f.queue(()=>X.then(ne=>S(ne,B,J,t,n,se).then(()=>D(se)))).then(null,a))})})}function P(s,t=!1){return new Promise((n,i)=>{(0,d.open)(s,t?{lazyEntries:!0}:void 0,(r,o)=>{r?i(g(r)):n((0,k.assertIsDefined)(o))})})}function y(s,t){return new Promise((n,i)=>{s.openReadStream(t,(r,o)=>{r?i(g(r)):n((0,k.assertIsDefined)(o))})})}function l(s,t){return new Promise((n,i)=>{const r=new h.ZipFile;t.forEach(c=>{c.contents?r.addBuffer(typeof c.contents=="string"?Buffer.from(c.contents,"utf8"):c.contents,c.path):c.localPath&&r.addFile(c.localPath,c.path)}),r.end();const o=(0,C.createWriteStream)(s);r.outputStream.pipe(o),r.outputStream.once("error",i),o.once("error",i),o.once("finish",()=>n(s))})}e.zip=l;function m(s,t,n={},i){const r=new RegExp(n.sourcePath?`^${n.sourcePath}`:"");let o=P(s,!0);return n.overwrite&&(o=o.then(c=>O.Promises.rm(t).then(()=>c))),o.then(c=>p(c,t,{sourcePathRegex:r},i))}e.extract=m;function E(s,t){return P(s).then(n=>new Promise((i,r)=>{n.on("entry",o=>{o.fileName===t&&y(n,o).then(c=>i(c),c=>r(c))}),n.once("close",()=>r(new Error(v.localize(2,null,t))))}))}function u(s,t){return E(s,t).then(n=>new Promise((i,r)=>{const o=[];n.once("error",r),n.on("data",c=>o.push(c)),n.on("end",()=>i(Buffer.concat(o)))}))}e.buffer=u}),define(Q[148],Z([0,1,68,89]),function(_,e,C,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getManifest=void 0;function I(k){return(0,C.buffer)(k,"extension/package.json").then(O=>{try{return JSON.parse(O.toString("utf8"))}catch{throw new Error((0,R.localize)(0,null))}})}e.getManifest=I}),define(Q[149],Z([0,1,3,31,11,2,16,14,12,18,38,5,10,30,20,68,88,58,17,141,22,23,41,48,124,142,148,125,138,34,45,13,8,9,28,35,29,25]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m,E,u,s,t,n,i,r,o,c,a,f,D,N,B,X,J,se,ne,re){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InstallGalleryExtensionTask=e.ExtensionsScanner=e.ExtensionManagementService=e.INativeServerExtensionManagementService=void 0,e.INativeServerExtensionManagementService=(0,B.refineServiceDecorator)(u.IExtensionManagementService);let ge=class extends E.AbstractExtensionManagementService{constructor(A,V,L,T,U,W,q,H,oe,ue,ve,Se){super(A,V,L,ue,Se),this.extensionsScannerService=U,this.extensionsProfileScannerService=W,this.downloadService=q,this.fileService=oe,this.installGalleryExtensionsTasks=new Map;const le=this._register(H.createInstance(r.ExtensionsLifecycle));this.extensionsScanner=this._register(H.createInstance(ce,fe=>le.postUninstall(fe))),this.manifestCache=this._register(new c.ExtensionsManifestCache(T,this)),this.extensionsDownloader=this._register(H.createInstance(i.ExtensionsDownloader));const ie=this._register(new a.ExtensionsWatcher(this,oe,T,L,ve));this._register(ie.onDidChangeExtensionsByAnotherSource(({added:fe,removed:ae})=>{fe.length&&this._onDidInstallExtensions.fire(fe.map(pe=>({identifier:pe.identifier,operation:1,local:pe}))),ae.forEach(pe=>this._onDidUninstallExtension.fire({identifier:pe}))}))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,s.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async zip(A){this.logService.trace("ExtensionManagementService#zip",A.identifier.id);const V=await this.collectFiles(A),L=await(0,P.zip)((0,h.joinPath)(this.extensionsDownloader.extensionsDownloadDir,(0,S.generateUuid)()).fsPath,V);return g.URI.file(L)}async unzip(A){return this.logService.trace("ExtensionManagementService#unzip",A.toString()),(await this.install(A)).identifier}async getManifest(A){const{location:V,cleanup:L}=await this.downloadVsix(A),T=v.resolve(V.fsPath);try{return await(0,o.getManifest)(T)}finally{await L()}}getInstalled(A,V){return this.extensionsScanner.scanExtensions(A??null,V)}getAllUserInstalled(){return this.extensionsScanner.scanUserExtensions(!1)}async install(A,V={}){this.logService.trace("ExtensionManagementService#install",A.toString());const{location:L,cleanup:T}=await this.downloadVsix(A);try{const U=await(0,o.getManifest)(v.resolve(L.fsPath));if(U.engines&&U.engines.vscode&&!(0,D.isEngineValid)(U.engines.vscode,this.productService.version,this.productService.date))throw new Error(y.localize(0,null,(0,s.getGalleryExtensionId)(U.publisher,U.name),this.productService.version));return await this.installExtension(U,L,V)}finally{await T()}}getMetadata(A){return this.extensionsScannerService.scanMetadata(A.location)}async updateMetadata(A,V){this.logService.trace("ExtensionManagementService#updateMetadata",A.identifier.id);const L={...V};return V.isPreReleaseVersion&&(L.preRelease=!0),A=await this.extensionsScanner.updateMetadata(A,L),this.manifestCache.invalidate(),A}async updateExtensionScope(A,V){return this.logService.trace("ExtensionManagementService#updateExtensionScope",A.identifier.id),A=await this.extensionsScanner.updateMetadata(A,{isMachineScoped:V}),this.manifestCache.invalidate(),A}removeUninstalledExtensions(A){return this.extensionsScanner.cleanUp(A)}async download(A,V){const{location:L}=await this.extensionsDownloader.download(A,V);return L}async downloadVsix(A){if(A.scheme===O.Schemas.file)return{location:A,async cleanup(){}};this.logService.trace("Downloading extension from",A.toString());const V=(0,h.joinPath)(this.extensionsDownloader.extensionsDownloadDir,(0,S.generateUuid)());return await this.downloadService.download(A,V),this.logService.info("Downloaded extension to",V.toString()),{location:V,cleanup:async()=>{try{await this.fileService.del(V)}catch(T){this.logService.error(T)}}}}doCreateInstallExtensionTask(A,V,L){let T;if(g.URI.isUri(V))T=new M(A,V,L,this.galleryService,this.extensionsScanner,this.logService);else{const U=s.ExtensionKey.create(V).toString();T=this.installGalleryExtensionsTasks.get(U),T||(this.installGalleryExtensionsTasks.set(U,T=new j(A,V,L,this.extensionsDownloader,this.extensionsScanner,this.logService)),T.waitUntilTaskIsFinished().then(()=>this.installGalleryExtensionsTasks.delete(U)))}return L.profileLocation?new F(T,L.profileLocation,this.extensionsProfileScannerService):T}doCreateUninstallExtensionTask(A,V){return V.profileLocation?new $(A,V.profileLocation,this.extensionsProfileScannerService):new z(A,V,this.extensionsScanner)}async collectFiles(A){const V=async T=>{let U=await p.Promises.readdir(T);U=U.map(H=>v.join(T,H));const W=await Promise.all(U.map(H=>p.Promises.stat(H)));let q=Promise.resolve([]);return W.forEach((H,oe)=>{const ue=U[oe];H.isFile()&&(q=q.then(ve=>[...ve,ue])),H.isDirectory()&&(q=q.then(ve=>V(ue).then(Se=>[...ve,...Se])))}),q};return(await V(A.location.fsPath)).map(T=>({path:`extension/${v.relative(A.location.fsPath,T)}`,localPath:T}))}};ge=de([ee(0,u.IExtensionGalleryService),ee(1,se.ITelemetryService),ee(2,X.ILogService),ee(3,m.INativeEnvironmentService),ee(4,n.IExtensionsScannerService),ee(5,t.IExtensionsProfileScannerService),ee(6,l.IDownloadService),ee(7,B.IInstantiationService),ee(8,N.IFileService),ee(9,J.IProductService),ee(10,ne.IUriIdentityService),ee(11,re.IUserDataProfilesService)],ge),e.ExtensionManagementService=ge;let ce=class extends k.Disposable{constructor(A,V,L,T){super(),this.beforeRemovingExtension=A,this.fileService=V,this.extensionsScannerService=L,this.logService=T,this.uninstalledPath=(0,h.joinPath)(this.extensionsScannerService.userExtensionsLocation,".obsolete").fsPath,this.uninstalledFileLimiter=new C.Queue}async cleanUp(A){await this.removeUninstalledExtensions(),A&&await this.removeOutdatedExtensions()}async scanExtensions(A,V){const L={includeInvalid:!0,profileLocation:V};let T=[];return A===null||A===0?T.push(...await this.extensionsScannerService.scanAllExtensions({includeInvalid:!0},L,!1)):A===1&&T.push(...await this.extensionsScannerService.scanUserExtensions(L)),T=A!==null?T.filter(U=>U.type===A):T,Promise.all(T.map(U=>this.toLocalExtension(U)))}async scanUserExtensions(A){const V=await this.extensionsScannerService.scanUserExtensions({includeAllVersions:!A,includeInvalid:!0});return Promise.all(V.map(L=>this.toLocalExtension(L)))}async extractUserExtension(A,V,L,T){const U=A.toString(),W=v.join(this.extensionsScannerService.userExtensionsLocation.fsPath,`.${(0,S.generateUuid)()}`),q=v.join(this.extensionsScannerService.userExtensionsLocation.fsPath,U);try{await p.Promises.rm(q)}catch{throw new u.ExtensionManagementError(y.localize(1,null,q,A.id),u.ExtensionManagementErrorCode.Delete)}await this.extractAtLocation(A,V,W,T),await this.extensionsScannerService.updateMetadata(g.URI.file(W),L);try{await this.rename(A,W,q,Date.now()+2*60*1e3),this.logService.info("Renamed to",q)}catch(H){try{await p.Promises.rm(W)}catch{}if(H.code==="ENOTEMPTY")this.logService.info("Rename failed because extension was installed by another source. So ignoring renaming.",A.id);else throw this.logService.info(`Rename failed because of ${(0,I.getErrorMessage)(H)}. Deleted from extracted location`,W),H}return this.scanLocalExtension(g.URI.file(q),1)}async updateMetadata(A,V){return await this.extensionsScannerService.updateMetadata(A.location,V),this.scanLocalExtension(A.location,A.type)}getUninstalledExtensions(){return this.withUninstalledExtensions()}async setUninstalled(...A){const V=A.map(L=>s.ExtensionKey.create(L));await this.withUninstalledExtensions(L=>{V.forEach(T=>L[T.toString()]=!0)})}async setInstalled(A){await this.withUninstalledExtensions(T=>delete T[A.toString()]);const L=(await this.scanUserExtensions(!0)).find(T=>s.ExtensionKey.create(T).equals(A))||null;return L?this.updateMetadata(L,{installedTimestamp:Date.now()}):null}async removeExtension(A,V){this.logService.trace(`Deleting ${V} extension from disk`,A.identifier.id,A.location.fsPath),await p.Promises.rm(A.location.fsPath),this.logService.info("Deleted from disk",A.identifier.id,A.location.fsPath)}async removeUninstalledExtension(A){await this.removeExtension(A,"uninstalled"),await this.withUninstalledExtensions(V=>delete V[s.ExtensionKey.create(A).toString()])}async withUninstalledExtensions(A){return this.uninstalledFileLimiter.queue(async()=>{let V;try{V=await p.Promises.readFile(this.uninstalledPath,"utf8")}catch(T){if(T.code!=="ENOENT")throw T}let L={};if(V)try{L=JSON.parse(V)}catch{}return A&&(A(L),Object.keys(L).length?await p.Promises.writeFile(this.uninstalledPath,JSON.stringify(L)):await p.Promises.rm(this.uninstalledPath)),L})}async extractAtLocation(A,V,L,T){this.logService.trace(`Started extracting the extension from ${V} to ${L}`);try{await p.Promises.rm(L)}catch(U){throw new u.ExtensionManagementError(this.joinErrors(U).message,u.ExtensionManagementErrorCode.Delete)}try{await(0,P.extract)(V,L,{sourcePath:"extension",overwrite:!0},T),this.logService.info(`Extracted extension to ${L}:`,A.id)}catch(U){try{await p.Promises.rm(L)}catch{}let W=u.ExtensionManagementErrorCode.Extract;throw U instanceof P.ExtractError&&(U.type==="CorruptZip"?W=u.ExtensionManagementErrorCode.CorruptZip:U.type==="Incomplete"&&(W=u.ExtensionManagementErrorCode.IncompleteZip)),new u.ExtensionManagementError(U.message,W)}}async rename(A,V,L,T){try{await p.Promises.rename(V,L)}catch(U){if(d.isWindows&&U&&U.code==="EPERM"&&Date.now()/^readme(\.txt|\.md|)$/i.test(U))?.resource,T=V.children.find(({name:U})=>/^changelog(\.txt|\.md|)$/i.test(U))?.resource),{identifier:A.identifier,type:A.type,isBuiltin:A.isBuiltin||!!A.metadata?.isBuiltin,location:A.location,manifest:A.manifest,targetPlatform:A.targetPlatform,validations:A.validations,isValid:A.isValid,readmeUrl:L,changelogUrl:T,publisherDisplayName:A.metadata?.publisherDisplayName||null,publisherId:A.metadata?.publisherId||null,isApplicationScoped:!!A.metadata?.isApplicationScoped,isMachineScoped:!!A.metadata?.isMachineScoped,isPreReleaseVersion:!!A.metadata?.isPreReleaseVersion,preRelease:!!A.metadata?.preRelease,installedTimestamp:A.metadata?.installedTimestamp,updated:!!A.metadata?.updated}}async removeUninstalledExtensions(){const A=await this.getUninstalledExtensions(),V=await this.extensionsScannerService.scanUserExtensions({includeAllVersions:!0,includeUninstalled:!0,includeInvalid:!0}),L=new Set;for(const W of V)A[s.ExtensionKey.create(W).toString()]||L.add(W.identifier.id.toLowerCase());const T=(0,s.groupByExtension)(V,W=>W.identifier);await C.Promises.settled(T.map(async W=>{const q=W.sort((H,oe)=>w.rcompare(H.manifest.version,oe.manifest.version))[0];L.has(q.identifier.id.toLowerCase())||await this.beforeRemovingExtension(await this.toLocalExtension(q))}));const U=V.filter(W=>A[s.ExtensionKey.create(W).toString()]);await C.Promises.settled(U.map(W=>this.removeUninstalledExtension(W)))}async removeOutdatedExtensions(){const A=await this.extensionsScannerService.scanSystemExtensions({}),V=await this.extensionsScannerService.scanUserExtensions({includeAllVersions:!0,includeUninstalled:!0,includeInvalid:!0}),L=[],T=await this.extensionsScannerService.getTargetPlatform(),U=(0,s.groupByExtension)(V,W=>W.identifier);for(const W of U)if(W.length>1&&L.push(...W.sort((q,H)=>{const oe=w.rcompare(q.manifest.version,H.manifest.version);return oe!==0?oe:q.targetPlatform===T?-1:1}).slice(1)),W[0].type===0){const q=A.find(H=>(0,s.areSameExtensions)(H.identifier,W[0].identifier));(!q||w.gte(q.manifest.version,W[0].manifest.version))&&L.push(W[0])}await C.Promises.settled(L.map(W=>this.removeExtension(W,"outdated")))}joinErrors(A){const V=Array.isArray(A)?A:[A];return V.length===1?V[0]instanceof Error?V[0]:new Error(V[0]):V.reduce((L,T)=>new Error(`${L.message}${L.message?",":""}${T instanceof Error?T.message:T}`),new Error(""))}};ce=de([ee(1,N.IFileService),ee(2,n.IExtensionsScannerService),ee(3,X.ILogService)],ce),e.ExtensionsScanner=ce;class te extends E.AbstractExtensionTask{get operation(){return(0,b.isUndefined)(this.options.operation)?this._operation:this.options.operation}constructor(A,V,L,T,U){super(),this.identifier=A,this.source=V,this.options=L,this.extensionsScanner=T,this.logService=U,this.wasVerified=!1,this._operation=2}async installExtension(A,V){try{const L=await this.unsetUninstalledAndGetLocal(A.key);if(L)return this.extensionsScanner.updateMetadata(L,A.metadata)}catch{throw d.isMacintosh?new u.ExtensionManagementError(y.localize(4,null),u.ExtensionManagementErrorCode.Internal):new u.ExtensionManagementError(y.localize(5,null),u.ExtensionManagementErrorCode.Internal)}return this.extract(A,V)}async unsetUninstalledAndGetLocal(A){if(!await this.isUninstalled(A))return null;this.logService.trace("Removing the extension from uninstalled list:",A.id);const L=await this.extensionsScanner.setInstalled(A);return this.logService.info("Removed the extension from uninstalled list:",A.id),L}async isUninstalled(A){return!!(await this.extensionsScanner.getUninstalledExtensions())[A.toString()]}async extract({zipPath:A,key:V,metadata:L},T){const U=await this.extensionsScanner.extractUserExtension(V,A,L,T);return this.logService.info("Extracting completed.",V.id),U}}class j extends te{constructor(A,V,L,T,U,W){super(V.identifier,V,L,U,W),this.manifest=A,this.gallery=V,this.extensionsDownloader=T}async doRun(A){const L=(await this.extensionsScanner.scanExtensions(null,void 0)).find(q=>(0,s.areSameExtensions)(q.identifier,this.gallery.identifier));L&&(this._operation=3);const T={id:this.gallery.identifier.uuid,publisherId:this.gallery.publisherId,publisherDisplayName:this.gallery.publisherDisplayName,targetPlatform:this.gallery.properties.targetPlatform,isApplicationScoped:(0,f.isApplicationScopedExtension)(this.manifest),isMachineScoped:this.options.isMachineScoped||L?.isMachineScoped,isBuiltin:this.options.isBuiltin||L?.isBuiltin,isSystem:L?.type===0?!0:void 0,updated:!!L,isPreReleaseVersion:this.gallery.properties.isPreReleaseVersion,installedTimestamp:Date.now(),preRelease:this.gallery.properties.isPreReleaseVersion||((0,b.isBoolean)(this.options.installPreReleaseVersion)?this.options.installPreReleaseVersion:L?.preRelease)};if(L?.manifest.version===this.gallery.version)return{local:await this.extensionsScanner.updateMetadata(L,T),metadata:T};const{location:U,verified:W}=await this.extensionsDownloader.download(this.gallery,this._operation);try{this.wasVerified=!!W,this.validateManifest(U.fsPath);const q=await this.installExtension({zipPath:U.fsPath,key:s.ExtensionKey.create(this.gallery),metadata:T},A);return L&&!this.options.profileLocation&&(L.targetPlatform!==q.targetPlatform||w.neq(L.manifest.version,q.manifest.version))&&await this.extensionsScanner.setUninstalled(L),{local:q,metadata:T}}catch(q){try{await this.extensionsDownloader.delete(U)}catch(H){this.logService.warn("Error while deleting the downloaded file",U.toString(),(0,I.getErrorMessage)(H))}throw q}}async validateManifest(A){try{await(0,o.getManifest)(A)}catch(V){throw new u.ExtensionManagementError((0,E.joinErrors)(V).message,u.ExtensionManagementErrorCode.Invalid)}}}e.InstallGalleryExtensionTask=j;class M extends te{constructor(A,V,L,T,U,W){super({id:(0,s.getGalleryExtensionId)(A.publisher,A.name)},V,L,U,W),this.manifest=A,this.location=V,this.galleryService=T}async doRun(A){const V=new s.ExtensionKey(this.identifier,this.manifest.version),T=(await this.extensionsScanner.scanExtensions(1,void 0)).find(q=>(0,s.areSameExtensions)(this.identifier,q.identifier)),U=await this.getMetadata(this.identifier.id,this.manifest.version,A);if(U.isApplicationScoped=(0,f.isApplicationScopedExtension)(this.manifest),U.isMachineScoped=this.options.isMachineScoped||T?.isMachineScoped,U.isBuiltin=this.options.isBuiltin||T?.isBuiltin,U.installedTimestamp=Date.now(),T)if(this._operation=3,V.equals(new s.ExtensionKey(T.identifier,T.manifest.version)))try{await this.extensionsScanner.removeExtension(T,"existing")}catch{throw new Error(y.localize(6,null,this.manifest.displayName||this.manifest.name))}else!this.options.profileLocation&&w.gt(T.manifest.version,this.manifest.version)&&await this.extensionsScanner.setUninstalled(T);else{const q=await this.unsetUninstalledAndGetLocal(V);if(q)try{await this.extensionsScanner.removeExtension(q,"existing")}catch{throw new Error(y.localize(7,null,this.manifest.displayName||this.manifest.name))}}return{local:await this.installExtension({zipPath:v.resolve(this.location.fsPath),key:V,metadata:U},A),metadata:U}}async getMetadata(A,V,L){try{let[T]=await this.galleryService.getExtensions([{id:A,version:V}],L);if(T||([T]=await this.galleryService.getExtensions([{id:A}],L)),T)return{id:T.identifier.uuid,publisherDisplayName:T.publisherDisplayName,publisherId:T.publisherId,isPreReleaseVersion:T.properties.isPreReleaseVersion,preRelease:T.properties.isPreReleaseVersion||this.options.installPreReleaseVersion}}catch{}return{}}}class F{constructor(A,V,L){this.task=A,this.profileLocation=V,this.extensionsProfileScannerService=L,this.identifier=this.task.identifier,this.source=this.task.source,this.operation=this.task.operation,this.promise=this.waitAndAddExtensionToProfile()}async waitAndAddExtensionToProfile(){const A=await this.task.waitUntilTaskIsFinished();return await this.extensionsProfileScannerService.addExtensionsToProfile([[A.local,A.metadata]],this.profileLocation),A}async run(){return await this.task.run(),this.promise}waitUntilTaskIsFinished(){return this.promise}cancel(){return this.task.cancel()}}class z extends E.AbstractExtensionTask{constructor(A,V,L){super(),this.extension=A,this.options=V,this.extensionsScanner=L}async doRun(A){const V=[],L=await this.extensionsScanner.scanUserExtensions(!1);if(this.options.versionOnly){const T=s.ExtensionKey.create(this.extension);V.push(...L.filter(U=>T.equals(s.ExtensionKey.create(U))))}else V.push(...L.filter(T=>(0,s.areSameExtensions)(T.identifier,this.extension.identifier)));if(!V.length)throw new Error(y.localize(8,null,this.extension.manifest.displayName||this.extension.manifest.name));if(await this.extensionsScanner.setUninstalled(...V),this.options.remove)for(const T of V)try{A.isCancellationRequested||await this.extensionsScanner.removeUninstalledExtension(T)}catch(U){throw new Error(y.localize(9,null,(0,R.toErrorMessage)(U)))}}}class $ extends E.AbstractExtensionTask{constructor(A,V,L){super(),this.extension=A,this.profileLocation=V,this.extensionsProfileScannerService=L}async doRun(A){await this.extensionsProfileScannerService.removeExtensionFromProfile(this.extension.identifier,this.profileLocation)}}}),define(Q[150],Z([0,1,129,3,15,11,2,5,21,17,130,9,128,163]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestService=void 0;let p=class extends O.Disposable{constructor(y,l,m){super(),this.environmentService=l,this.logService=m,this.configure(y.getValue()),this._register(y.onDidChangeConfiguration(()=>this.configure(y.getValue()),this))}configure(y){this.proxyUrl=y.http&&y.http.proxy,this.strictSSL=!!(y.http&&y.http.proxyStrictSSL),this.authorization=y.http&&y.http.proxyAuthorization}async request(y,l){this.logService.trace("RequestService#request (node) - begin",y.url);const{proxyUrl:m,strictSSL:E}=this;let u;try{u=await(0,w.getResolvedShellEnv)(this.logService,this.environmentService.args,process.env)}catch(n){this.shellEnvErrorLogged||(this.shellEnvErrorLogged=!0,this.logService.error("RequestService#request (node) resolving shell environment failed",n))}const s={...process.env,...u},t=y.agent?y.agent:await(0,g.getProxyAgent)(y.url||"",s,{proxyUrl:m,strictSSL:E});y.agent=t,y.strictSSL=E,this.authorization&&(y.headers={...y.headers||{},"Proxy-Authorization":this.authorization});try{const n=await this._request(y,l);return this.logService.trace("RequestService#request (node) - success",y.url),n}catch(n){throw this.logService.trace("RequestService#request (node) - error",y.url,n),n}}async getNodeRequest(y){return((0,C.parse)(y.url).protocol==="https:"?await new Promise((E,u)=>{_(["https"],E,u)}):await new Promise((E,u)=>{_(["http"],E,u)})).request}_request(y,l){return R.Promises.withAsyncBody(async(m,E)=>{const u=(0,C.parse)(y.url),s=y.getRawRequest?y.getRawRequest(y):await this.getNodeRequest(y),t={hostname:u.hostname,port:u.port?parseInt(u.port):u.protocol==="https:"?443:80,protocol:u.protocol,path:u.path,method:y.type||"GET",headers:y.headers,agent:y.agent,rejectUnauthorized:(0,v.isBoolean)(y.strictSSL)?y.strictSSL:!0};y.user&&y.password&&(t.auth=y.user+":"+y.password);const n=s(t,i=>{const r=(0,v.isNumber)(y.followRedirects)?y.followRedirects:3;if(i.statusCode&&i.statusCode>=300&&i.statusCode<400&&r>0&&i.headers.location)this._request({...y,url:i.headers.location,followRedirects:r-1},l).then(m,E);else{let o=i;i.headers["content-encoding"]==="gzip"&&(o=i.pipe((0,S.createGunzip)())),m({res:i,stream:(0,I.streamToBufferReadableStream)(o)})}});n.on("error",E),y.timeout&&n.setTimeout(y.timeout),y.data&&typeof y.data=="string"&&n.write(y.data),n.end(),l.onCancellationRequested(()=>{n.abort(),E(new k.CancellationError)})})}async resolveProxy(y){}};p=de([ee(0,d.IConfigurationService),ee(1,h.INativeEnvironmentService),ee(2,b.ILogService)],p),e.RequestService=p}),define(Q[164],Z([0,1,37,3,15,31,11,2,16,14,12,32,10,20,21,121,58,127,17,102,145,22,59,123,41,48,149,143,13,112,115,46,110,62,63,126,9,117,118,36,147,135,28,47,150,66,131,67,35,134,42,136,137,29,139,25,146]),function(_,e,C,R,I,k,O,v,d,h,w,b,g,S,p,P,y,l,m,E,u,s,t,n,i,r,o,c,a,f,D,N,B,X,J,se,ne,re,ge,ce,te,j,M,F,z,$,Y,A,V,L,T,U,W,q,H,oe,ue){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.main=void 0;class ve extends v.Disposable{constructor(ie){super(),this.argv=ie,this.registerListeners()}registerListeners(){process.once("exit",()=>this.dispose())}async run(){const[ie,fe]=await this.initServices();return ie.invokeFunction(async ae=>{const pe=ae.get(ne.ILogService),Fe=ae.get(a.IFileService),Oe=ae.get(m.INativeEnvironmentService),Ae=ae.get(oe.IUserDataProfilesService);pe.info("CLI main",this.argv),this.registerErrorHandler(pe),await this.doRun(Oe,Fe,Ae,ie),await Promise.all(fe.map(Ve=>{(0,R.raceTimeout)(Ve.flush(),1e3)}))})}async initServices(){const ie=new X.ServiceCollection,fe={_serviceBrand:void 0,...j.default};ie.set(M.IProductService,fe);const ae=new E.NativeEnvironmentService(this.argv,fe);ie.set(m.INativeEnvironmentService,ae),await Promise.all([ae.appSettingsHome.fsPath,ae.extensionsPath].map(Re=>Re?S.Promises.mkdir(Re,{recursive:!0}):void 0));const pe=(0,ne.getLogLevel)(ae),Fe=[];Fe.push(new re.SpdLogLogger("cli",(0,h.join)(ae.logsPath,"cli.log"),!0,!1,pe)),pe===ne.LogLevel.Trace&&Fe.push(new ne.ConsoleLogger(pe));const Oe=this._register(new ne.MultiplexLogService(Fe));ie.set(ne.ILogService,Oe);const Ae=this._register(new f.FileService(Oe));ie.set(a.IFileService,Ae);const Ve=this._register(new D.DiskFileSystemProvider(Oe));Ae.registerProvider(d.Schemas.file,Ve);const x=new Y.StateService(ae,Oe,Ae);ie.set($.IStateService,x);const G=new H.UriIdentityService(Ae);ie.set(q.IUriIdentityService,G);const K=new ue.UserDataProfilesService(x,G,ae,Ae,Oe);ie.set(oe.IUserDataProfilesService,K);const he=w.isWindows&&fe.win32RegValueName?this._register(new te.NativePolicyService(fe.win32RegValueName)):ae.policyFile?this._register(new ge.FilePolicyService(ae.policyFile,Ae,Oe)):new ce.NullPolicyService;ie.set(ce.IPolicyService,he);const me=this._register(new P.ConfigurationService(K.defaultProfile.settingsResource,Ae,he,Oe));ie.set(p.IConfigurationService,me),await Promise.all([x.init(),me.initialize()]),K.setEnablement(fe.quality!=="stable"||me.getValue(oe.PROFILES_ENABLEMENT_CONFIG)),ie.set(q.IUriIdentityService,new H.UriIdentityService(Ae)),ie.set(F.IRequestService,new N.SyncDescriptor(z.RequestService,void 0,!0)),ie.set(y.IDownloadService,new N.SyncDescriptor(l.DownloadService,void 0,!0)),ie.set(i.IExtensionsProfileScannerService,new N.SyncDescriptor(i.ExtensionsProfileScannerService,void 0,!0)),ie.set(r.IExtensionsScannerService,new N.SyncDescriptor(c.ExtensionsScannerService,void 0,!0)),ie.set(t.IExtensionSignatureVerificationService,new N.SyncDescriptor(t.ExtensionSignatureVerificationService,void 0,!0)),ie.set(o.INativeServerExtensionManagementService,new N.SyncDescriptor(o.ExtensionManagementService,void 0,!0)),ie.set(s.IExtensionGalleryService,new N.SyncDescriptor(u.ExtensionGalleryServiceWithNoStorageService,void 0,!0)),ie.set(J.ILanguagePackService,new N.SyncDescriptor(se.NativeLanguagePackService,void 0,!1));const De=[],we=(0,T.isInternalTelemetry)(fe,me);if((0,T.supportsTelemetry)(fe,ae)){fe.aiConfig&&fe.aiConfig.ariaKey&&De.push(new U.OneDataSystemAppender(we,"monacoworkbench",null,fe.aiConfig.ariaKey));const{installSourcePath:Re}=ae,Ie={appenders:De,sendErrorTelemetry:!1,commonProperties:(async()=>{let ke;try{const Ne=await S.Promises.readFile(ae.stateResource.fsPath);ke=JSON.parse(Ne.toString())[V.machineIdKey]}catch(Ne){Ne.code!=="ENOENT"&&Oe.error(Ne)}return(0,A.resolveCommonProperties)(Ae,(0,C.release)(),(0,C.hostname)(),process.arch,fe.commit,fe.version,ke,we,Re)})(),piiPaths:(0,T.getPiiPathsFromEnvironment)(ae)};ie.set(V.ITelemetryService,new N.SyncDescriptor(L.TelemetryService,[Ie],!1))}else ie.set(V.ITelemetryService,T.NullTelemetryService);return[new B.InstantiationService(ie),De]}registerErrorHandler(ie){(0,O.setUnexpectedErrorHandler)(fe=>{const ae=(0,k.toErrorMessage)(fe,!0);!ae||ie.error(`[uncaught exception in CLI]: ${ae}`)}),process.on("uncaughtException",fe=>(0,O.onUnexpectedError)(fe)),process.on("unhandledRejection",fe=>(0,O.onUnexpectedError)(fe))}async doRun(ie,fe,ae,pe){const Fe=ie.args.profile?ae.profiles.find(Oe=>Oe.name===ie.args.profile)?.extensionsResource:ae.defaultProfile.extensionsResource;if(this.argv["install-source"])return this.setInstallSource(ie,fe,this.argv["install-source"]);if(this.argv["list-extensions"])return pe.createInstance(n.ExtensionManagementCLI).listExtensions(!!this.argv["show-versions"],this.argv.category,Fe);if(this.argv["install-extension"]||this.argv["install-builtin-extension"]){const Oe={isMachineScoped:!!this.argv["do-not-sync"],installPreReleaseVersion:!!this.argv["pre-release"],profileLocation:Fe};return pe.createInstance(n.ExtensionManagementCLI).installExtensions(this.asExtensionIdOrVSIX(this.argv["install-extension"]||[]),this.argv["install-builtin-extension"]||[],Oe,!!this.argv.force)}else{if(this.argv["uninstall-extension"])return pe.createInstance(n.ExtensionManagementCLI).uninstallExtensions(this.asExtensionIdOrVSIX(this.argv["uninstall-extension"]),!!this.argv.force,Fe);if(this.argv["locate-extension"])return pe.createInstance(n.ExtensionManagementCLI).locateExtension(this.argv["locate-extension"]);this.argv.telemetry&&console.log(await(0,W.buildTelemetryMessage)(ie.appRoot,ie.extensionsPath))}}asExtensionIdOrVSIX(ie){return ie.map(fe=>/\.vsix$/i.test(fe)?g.URI.file((0,h.isAbsolute)(fe)?fe:(0,h.join)((0,b.cwd)(),fe)):fe)}async setInstallSource(ie,fe,ae){await fe.writeFile(g.URI.file(ie.installSourcePath),I.VSBuffer.fromString(ae.slice(0,30)))}}async function Se(le){const ie=new ve(le);try{await ie.run()}finally{ie.dispose()}}e.main=Se})}).call(this); //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/6261075646f055b99068d3688932416f2346dd3b/core/vs/code/node/cliProcessMain.js.map x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586