/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/base/common/winjs.base","vs/platform/instantiation/common/instantiation","vs/nls!vs/code/node/cliProcessMain","vs/base/common/types","vs/nls","vs/base/common/objects","path","vs/base/common/event","vs/platform/log/common/log","vs/base/common/strings","vs/base/common/lifecycle","vs/platform/registry/common/platform","vs/platform/configuration/common/configuration","vs/base/node/pfs","vs/base/common/async","vs/base/common/errors","vs/platform/configuration/common/configurationRegistry","vs/base/common/platform","vs/platform/environment/common/environment","vs/base/common/paths","vs/base/common/arrays","vs/platform/node/package","vs/base/common/uri","vs/base/common/severity","vs/platform/extensionManagement/common/extensionManagement","fs","os","vs/platform/telemetry/common/telemetry","vs/platform/extensionManagement/common/extensionManagementUtil","vs/base/common/network","vs/base/node/extfs","vs/platform/instantiation/common/serviceCollection","vs/platform/node/product","vs/base/node/request","vs/base/common/errorMessage","vs/platform/request/node/request","vs/platform/extensions/node/extensionValidator","vs/base/common/uuid","vs/platform/configuration/common/configurationModels","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/descriptors","vs/base/common/map","vs/base/common/json","vs/base/common/assert","vs/base/node/paths","vs/nls!vs/platform/request/node/request","vs/platform/dialogs/node/dialogService","vs/platform/request/node/requestService","vs/nls!vs/platform/extensions/node/extensionValidator","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensions","vs/platform/extensionManagement/node/extensionsManifestCache","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/dialogs/node/dialogService","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/platform/download/common/download","vs/nls!vs/base/node/zip","vs/nls!vs/base/common/severity","vs/nls!vs/base/common/errorMessage","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/keybinding","vs/base/node/config","vs/platform/extensionManagement/node/extensionLifecycle","vs/platform/extensionManagement/node/extensionGalleryService","vs/platform/log/node/spdlogService","url","vs/base/node/proxy","vs/platform/environment/node/environmentService","vs/base/common/collections","vs/base/common/amd","vs/nls!vs/platform/telemetry/common/telemetryService","vs/base/common/mime","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/base/common/glob","semver","vs/base/common/labels","vs/platform/configuration/node/configuration","vs/platform/configuration/node/configurationService","vs/base/common/graph","vs/platform/state/common/state","vs/platform/state/node/stateService","vs/base/common/date","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryUtils","vs/platform/telemetry/node/appInsightsAppender","vs/platform/extensionManagement/node/extensionManagementService","vs/platform/telemetry/node/commonProperties","vs/base/common/decorators","vs/base/node/zip","yauzl","yazl","applicationinsights","vs/base/common/resources","crypto","zlib","child_process","readline","vs/code/node/cliProcessMain"],t=function(t){
for(var n=[],r=0,i=t.length;r<i;r++)n[r]=e[t[r]];return n};define(e[45],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(e[72],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.hasOwnProperty;t.values=function(e){var t=[];for(var r in e)n.call(e,r)&&t.push(e[r]);return t},t.size=function(e){var t=0;for(var r in e)n.call(e,r)&&(t+=1);return t},t.first=function(e){for(var t in e)if(n.call(e,t))return e[t]},t.forEach=function(e,t){var r=function(r){if(n.call(e,r)&&!1===t({key:r,value:e[r]},function(){delete e[r]}))return{value:void 0}};for(var i in e){var o=r(i);if("object"==typeof o)return o.value}},t.remove=function(e,t){return!!n.call(e,t)&&(delete e[t],!0)},t.groupBy=function(e,t){for(var n=Object.create(null),r=0,i=e;r<i.length;r++){var o=i[r],a=t(o),s=n[a];s||(s=n[a]=[]),s.push(o)}return n}}),
define(e[91],t([0,1]),function(e,t){"use strict";function n(e){return function(t,n,r){var i=null,o=null;if("function"==typeof r.value?(i="value",o=r.value):"function"==typeof r.get&&(i="get",o=r.get),!o)throw new Error("not supported");r[i]=e(o,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=n,t.memoize=function(e,t,n){var r=null,i=null;if("function"==typeof n.value?(r="value",0!==(i=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(r="get",i=n.get),!i)throw new Error("not supported");var o="$memoize$"+t;n[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[o]}},t.debounce=function(e,t,r){return n(function(n,i){var o="$debounce$"+i,a="$debounce$result$"+i;return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u]
;this[a]||(this[a]=r?r():void 0),clearTimeout(this[o]),t&&(this[a]=t.apply(void 0,[this[a]].concat(s)),s=[this[a]]),this[o]=setTimeout(function(){n.apply(i,s),i[a]=r?r():void 0},e)}})}}),define(e[44],t([0,1]),function(e,t){"use strict";function n(e,t){function n(t,n){for(var r=0,i=0;r<t||!n;){var o=e.charCodeAt(s);if(o>=48&&o<=57)i=16*i+o-48;else if(o>=65&&o<=70)i=16*i+o-65+10;else{if(!(o>=97&&o<=102))break;i=16*i+o-97+10}s++,r++}return r<t&&(i=-1),i}function a(){if(f="",g=u.None,p=s,s>=l)return p=l,d=c.EOF;var t=e.charCodeAt(s);if(r(t)){do{s++,f+=String.fromCharCode(t),t=e.charCodeAt(s)}while(r(t));return d=c.Trivia}if(i(t))return s++,f+=String.fromCharCode(t),13===t&&10===e.charCodeAt(s)&&(s++,f+="\n"),d=c.LineBreakTrivia;switch(t){case 123:return s++,d=c.OpenBraceToken;case 125:return s++,d=c.CloseBraceToken;case 91:return s++,d=c.OpenBracketToken;case 93:return s++,d=c.CloseBracketToken;case 58:return s++,d=c.ColonToken;case 44:return s++,d=c.CommaToken;case 34:return s++,f=function(){for(var t="",r=s;;){
if(s>=l){t+=e.substring(r,s),g=u.UnexpectedEndOfString;break}var o=e.charCodeAt(s);if(34===o){t+=e.substring(r,s),s++;break}if(92!==o){if(o>=0&&o<=31){if(i(o)){t+=e.substring(r,s),g=u.UnexpectedEndOfString;break}g=u.InvalidCharacter}s++}else{if(t+=e.substring(r,s),++s>=l){g=u.UnexpectedEndOfString;break}switch(o=e.charCodeAt(s++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=n(4,!0);a>=0?t+=String.fromCharCode(a):g=u.InvalidUnicode;break;default:g=u.InvalidEscapeCharacter}r=s}}return t}(),d=c.StringLiteral;case 47:var a=s-1;if(47===e.charCodeAt(s+1)){for(s+=2;s<l&&!i(e.charCodeAt(s));)s++;return f=e.substring(a,s),d=c.LineCommentTrivia}if(42===e.charCodeAt(s+1)){s+=2;for(var h=l-1,m=!1;s<h;){if(42===e.charCodeAt(s)&&47===e.charCodeAt(s+1)){s+=2,m=!0;break}s++}return m||(s++,g=u.UnexpectedEndOfComment),f=e.substring(a,s),d=c.BlockCommentTrivia}
return f+=String.fromCharCode(t),s++,d=c.Unknown;case 45:if(f+=String.fromCharCode(t),++s===l||!o(e.charCodeAt(s)))return d=c.Unknown;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return f+=function(){var t=s;if(48===e.charCodeAt(s))s++;else for(s++;s<e.length&&o(e.charCodeAt(s));)s++;if(s<e.length&&46===e.charCodeAt(s)){if(!(++s<e.length&&o(e.charCodeAt(s))))return g=u.UnexpectedEndOfNumber,e.substring(t,s);for(s++;s<e.length&&o(e.charCodeAt(s));)s++}var n=s;if(s<e.length&&(69===e.charCodeAt(s)||101===e.charCodeAt(s)))if((++s<e.length&&43===e.charCodeAt(s)||45===e.charCodeAt(s))&&s++,s<e.length&&o(e.charCodeAt(s))){for(s++;s<e.length&&o(e.charCodeAt(s));)s++;n=s}else g=u.UnexpectedEndOfNumber;return e.substring(t,n)}(),d=c.NumericLiteral;default:for(;s<l&&function(e){if(r(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}(t);)s++,t=e.charCodeAt(s);if(p!==s){switch(f=e.substring(p,s)){case"true":
return d=c.TrueKeyword;case"false":return d=c.FalseKeyword;case"null":return d=c.NullKeyword}return d=c.Unknown}return f+=String.fromCharCode(t),s++,d=c.Unknown}}void 0===t&&(t=!1);var s=0,l=e.length,f="",p=0,d=c.Unknown,g=u.None;return{setPosition:function(e){s=e,f="",p=0,d=c.Unknown,g=u.None},getPosition:function(){return s},scan:t?function(){var e;do{e=a()}while(e>=c.LineCommentTrivia&&e<=c.Trivia);return e}:a,getToken:function(){return d},getTokenValue:function(){return f},getTokenOffset:function(){return p},getTokenLength:function(){return s-p},getTokenError:function(){return g}}}function r(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function i(e){return 10===e||13===e||8232===e||8233===e}function o(e){return e>=48&&e<=57}function a(e){if("array"===e.type)return e.children.map(a);if("object"===e.type){for(var t={},n=0,r=e.children;n<r.length;n++){var i=r[n];t[i.children[0].value]=a(i.children[1])}return t}return e.value}
function s(e,t,r){function i(e){return e?function(){return e(d.getTokenOffset(),d.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,d.getTokenOffset(),d.getTokenLength())}:function(){return!0}}function a(){for(;;){var e=d.scan();switch(e){case c.LineCommentTrivia:case c.BlockCommentTrivia:x&&s(f.InvalidSymbol);break;case c.Unknown:s(f.InvalidSymbol);break;case c.Trivia:case c.LineBreakTrivia:break;default:return e}}}function s(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),S(e),t.length+n.length>0)for(var r=d.getToken();r!==c.EOF;){if(-1!==t.indexOf(r)){a();break}if(-1!==n.indexOf(r))break;r=a()}}function u(e){var t=d.getTokenValue();return e?b(t):h(t),a(),!0}function l(){return d.getToken()!==c.StringLiteral?(s(f.PropertyNameExpected,[],[c.CloseBraceToken,c.CommaToken]),!1):(u(!1),d.getToken()===c.ColonToken?(E(":"),a(),p()||s(f.ValueExpected,[],[c.CloseBraceToken,c.CommaToken])):s(f.ColonExpected,[],[c.CloseBraceToken,c.CommaToken]),!0)}function p(){switch(d.getToken()){
case c.OpenBracketToken:return function(){v(),a();for(var e=!1;d.getToken()!==c.CloseBracketToken&&d.getToken()!==c.EOF;){if(d.getToken()===c.CommaToken){if(e||s(f.ValueExpected,[],[]),E(","),a(),d.getToken()===c.CloseBracketToken&&!C)break}else e&&s(f.CommaExpected,[],[]);p()||s(f.ValueExpected,[],[c.CloseBracketToken,c.CommaToken]),e=!0}return y(),d.getToken()!==c.CloseBracketToken?s(f.CloseBracketExpected,[c.CloseBracketToken],[]):a(),!0}();case c.OpenBraceToken:return function(){g(),a();for(var e=!1;d.getToken()!==c.CloseBraceToken&&d.getToken()!==c.EOF;){if(d.getToken()===c.CommaToken){if(e||s(f.ValueExpected,[],[]),E(","),a(),d.getToken()===c.CloseBraceToken&&!C)break}else e&&s(f.CommaExpected,[],[]);l()||s(f.ValueExpected,[],[c.CloseBraceToken,c.CommaToken]),e=!0}return m(),d.getToken()!==c.CloseBraceToken?s(f.CloseBraceExpected,[c.CloseBraceToken],[]):a(),!0}();case c.StringLiteral:return u(!0);default:return function(){switch(d.getToken()){case c.NumericLiteral:var e=0;try{
"number"!=typeof(e=JSON.parse(d.getTokenValue()))&&(s(f.InvalidNumberFormat),e=0)}catch(e){s(f.InvalidNumberFormat)}b(e);break;case c.NullKeyword:b(null);break;case c.TrueKeyword:b(!0);break;case c.FalseKeyword:b(!1);break;default:return!1}return a(),!0}()}}var d=n(e,!1),g=i(t.onObjectBegin),h=o(t.onObjectProperty),m=i(t.onObjectEnd),v=i(t.onArrayBegin),y=i(t.onArrayEnd),b=o(t.onLiteralValue),E=o(t.onSeparator),S=o(t.onError),x=r&&r.disallowComments,C=r&&r.disallowTrailingComma;return a(),d.getToken()===c.EOF||(p()?(d.getToken()!==c.EOF&&s(f.EndOfFileExpected,[],[]),!0):(s(f.ValueExpected,[],[]),!1))}Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"
}(u=t.ScanError||(t.ScanError={}));var c;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.EOF=16]="EOF"}(c=t.SyntaxKind||(t.SyntaxKind={})),t.createScanner=n;var l;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",
e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",
e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",
e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(l||(l={}));var f;!function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",e[e.CloseBracketExpected=7]="CloseBracketExpected",e[e.EndOfFileExpected=8]="EndOfFileExpected"}(f=t.ParseErrorCode||(t.ParseErrorCode={})),t.parse=function(e,t,n){function r(e){Array.isArray(o)?o.push(e):i&&(o[i]=e)}
void 0===t&&(t=[]);var i=null,o=[],a=[];return s(e,{onObjectBegin:function(){var e={};r(e),a.push(o),o=e,i=null},onObjectProperty:function(e){i=e},onObjectEnd:function(){o=a.pop()},onArrayBegin:function(){var e=[];r(e),a.push(o),o=e,i=null},onArrayEnd:function(){o=a.pop()},onLiteralValue:r,onError:function(e){t.push({error:e})}},n),o[0]},t.parseTree=function(e,t,n){function r(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function i(e){return o.children.push(e),e}void 0===t&&(t=[]);var o={type:"array",offset:-1,length:-1,children:[]};s(e,{onObjectBegin:function(e){o=i({type:"object",offset:e,length:-1,parent:o,children:[]})},onObjectProperty:function(e,t,n){(o=i({type:"property",offset:t,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:t,length:n,parent:o})},onObjectEnd:function(e,t){o.length=e+t-o.offset,o=o.parent,r(e+t)},onArrayBegin:function(e,t){o=i({type:"array",offset:e,length:-1,parent:o,children:[]})},onArrayEnd:function(e,t){o.length=e+t-o.offset,o=o.parent,
r(e+t)},onLiteralValue:function(e,t,n){i({type:function(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}(e),offset:t,length:n,parent:o,value:e}),r(t+n)},onSeparator:function(e,t,n){"property"===o.type&&(":"===e?o.columnOffset=t:","===e&&r(t))},onError:function(e){t.push({error:e})}},n);var a=o.children[0];return a&&delete a.parent,a},t.findNodeAtLocation=function(e,t){if(e){for(var n=e,r=0,i=t;r<i.length;r++){var o=i[r];if("string"==typeof o){if("object"!==n.type)return;for(var a=!1,s=0,u=n.children;s<u.length;s++){var c=u[s];if(c.children[0].value===o){n=c.children[1],a=!0;break}}if(!a)return}else{var l=o;if("array"!==n.type||l<0||l>=n.children.length)return;n=n.children[l]}}return n}},t.getNodeValue=a,t.visit=s}),define(e[85],t([0,1,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLocalISOString=function(e){
return e.getFullYear()+"-"+n.pad(e.getMonth()+1,2)+"-"+n.pad(e.getDate(),2)+"T"+n.pad(e.getHours(),2)+":"+n.pad(e.getMinutes(),2)+":"+n.pad(e.getSeconds(),2)+"."+(e.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}),define(e[82],t([0,1,5,72]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return r.forEach(this._nodes,function(t){n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e},e.prototype.traverse=function(e,t,n){var r=this.lookup(e);r&&this._traverse(r,t,Object.create(null),n)},e.prototype._traverse=function(e,t,n,i){var o=this,a=this._hashFn(e.data);if(!n[a]){n[a]=!0,i(e.data);var s=t?e.outgoing:e.incoming;r.forEach(s,function(e){return o._traverse(e.value,t,n,i)})}},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=r,r.incoming[this._hashFn(e)]=n},
e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],r.forEach(this._nodes,function(e){delete e.value.outgoing[t],delete e.value.incoming[t]})},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t];return n||(n=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=n),n},e.prototype.lookup=function(e){return this._nodes[this._hashFn(e)]},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){var e=[];return r.forEach(this._nodes,function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")}),e.join("\n")},e}();t.Graph=i}),define(e[79],t([0,1,24,21,11,31,19,96]),function(e,t,n,r,i,o,a,s){"use strict";function u(e){return a.isWindows&&e&&":"===e[1]}function c(e){return u(e)?e.charAt(0).toUpperCase()+e.slice(1):e}
function l(e,t){if(a.isWindows||!e||!t)return e;var n=f.original===t?f.normalized:void 0;return n||(n=""+i.rtrim(t,r.sep)+r.sep,f={original:t,normalized:n}),(a.isLinux?i.startsWith(e,n):i.startsWithIgnoreCase(e,n))&&(e="~/"+e.substr(n.length)),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,f){if(!e)return null;"string"==typeof e&&(e=n.default.file(e));var p=f?f.getWorkspaceFolder(e):null;if(p){var d=f.getWorkspace().folders.length>1,g=void 0;if(g=s.isEqual(p.uri,e,!a.isLinux)?"":r.normalize(i.ltrim(e.path.substr(p.uri.path.length),r.sep),!0),d){var h=p&&p.name?p.name:r.basename(p.uri.fsPath);g=g?h+" • "+g:h}return g}if(e.scheme!==o.Schemas.file&&e.scheme!==o.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(u(e.fsPath))return r.normalize(c(e.fsPath),!0);var m=r.normalize(e.fsPath,!0);return!a.isWindows&&t&&(m=l(m,t.userHome)),m},t.getBaseLabel=function(e){if(!e)return null;"string"==typeof e&&(e=n.default.file(e))
;var t=r.basename(e.path)||(e.scheme===o.Schemas.file?e.fsPath:e.path);return u(t)?c(t):t},t.normalizeDriveLetter=c;var f=Object.create(null);t.tildify=l,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,t+"$1")};var p="…",d="\\\\",g="~";t.shorten=function(e){for(var t=new Array(e.length),n=!1,o=0;o<e.length;o++){var a=e[o];if(""!==a)if(a){n=!0;var s="";0===a.indexOf(d)?(s=a.substr(0,a.indexOf(d)+d.length),a=a.substr(a.indexOf(d)+d.length)):0===a.indexOf(r.nativeSep)?(s=a.substr(0,a.indexOf(r.nativeSep)+r.nativeSep.length),a=a.substr(a.indexOf(r.nativeSep)+r.nativeSep.length)):0===a.indexOf(g)&&(s=a.substr(0,a.indexOf(g)+g.length),a=a.substr(a.indexOf(g)+g.length));for(var u=a.split(r.nativeSep),c=1;n&&c<=u.length;c++)for(var l=u.length-c;n&&l>=0;l--){n=!1;for(var f=u.slice(l,l+c).join(r.nativeSep),h=0;!n&&h<e.length;h++)if(h!==o&&e[h]&&e[h].indexOf(f)>-1){var m=l+c===u.length,v=l>0&&e[h].indexOf(r.nativeSep)>-1?r.nativeSep+f:f,y=i.endsWith(e[h],v);n=!m||y}if(!n){var b=""
;(i.endsWith(u[0],":")||""!==s)&&(1===l&&(l=0,c++,f=u[0]+r.nativeSep+f),l>0&&(b=u[0]+r.nativeSep),b=s+b),l>0&&(b=b+p+r.nativeSep),b+=f,l+c<u.length&&(b=b+r.nativeSep+p),t[o]=b}}n&&(t[o]=a)}else t[o]=a;else t[o]="."+r.nativeSep}return t};var h;!function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(h||(h={})),t.template=function(e,t){void 0===t&&(t=Object.create(null));for(var n,r=[],i=!1,o="",a=0;a<e.length;a++)if("$"===(n=e[a])||i&&"{"===n)o&&r.push({value:o,type:h.TEXT}),o="",i=!0;else if("}"===n&&i){var s=t[o];if("string"==typeof s)s.length&&r.push({value:s,type:h.VARIABLE});else if(s){var u=r[r.length-1];u&&u.type===h.SEPARATOR||r.push({value:s.label,type:h.SEPARATOR})}o="",i=!1}else o+=n;return o&&!i&&r.push({value:o,type:h.TEXT}),r.filter(function(e,t){return e.type!==h.SEPARATOR||[r[t-1],r[t+1]].every(function(e){return e&&(e.type===h.VARIABLE||e.type===h.TEXT)&&e.value.length>0})}).map(function(e){return e.value}).join("")},t.mnemonicMenuLabel=function(e,t){
return a.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,""):e.replace(/&&/g,"&")},t.mnemonicButtonLabel=function(e){return a.isMacintosh?e.replace(/\(&&\w\)|&&/g,""):e.replace(/&&/g,a.isWindows?"&":"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")}}),define(e[77],t([0,1,22,11,21,43,2,16]),function(e,t,n,r,i,o,a,s){"use strict";function u(e){switch(e){case 0:return"";case 1:return x+"*?";default:return"(?:"+S+"|"+x+"+"+S+"|"+S+x+"+)*?"}}function c(e,t){if(!e)return[];for(var n,r=[],i=!1,o=!1,a="",s=0;s<e.length;s++){switch(n=e[s]){case t:if(!i&&!o){r.push(a),a="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":o=!0;break;case"]":o=!1}a+=n}return a&&r.push(a),r}function l(e){if(!e)return"";var t="",n=c(e,E);if(n.every(function(e){return e===b}))t=".*";else{var i=!1;n.forEach(function(e,o){if(e!==b){for(var a,s=!1,f="",p=!1,d="",g=0;g<e.length;g++)if("}"!==(a=e[g])&&s)f+=a;else if(!p||"]"===a&&d)switch(a){case"{":s=!0;continue;case"[":p=!0;continue;case"}":
var h="(?:"+c(f,",").map(function(e){return l(e)}).join("|")+")";t+=h,s=!1,f="";break;case"]":t+="["+d+"]",p=!1,d="";break;case"?":t+=x;continue;case"*":t+=u(1);continue;default:t+=r.escapeRegExpCharacters(a)}else{d+="-"===a?a:"^"!==a&&"!"!==a||d?a===E?"":r.escapeRegExpCharacters(a):"^"}o<n.length-1&&(n[o+1]!==b||o+2<n.length)&&(t+=S),i=!1}else i||(t+=u(2),i=!0)})}return t}function f(e,t){if(!e)return j;var i;i="string"!=typeof e?e.pattern:e;var o=(i=i.trim())+"_"+!!t.trimForExclusions,a=k.get(o);if(a)return p(a,e);var s;if(P.test(i)){var u=i.substr(4);a=function(e,t){return e&&r.endsWith(e,u)?i:null}}else a=(s=w.exec(d(i,t)))?function(e,t){var n="/"+e,i="\\"+e,o=function(o,a){return o?a?a===e?t:null:o===e||r.endsWith(o,n)||r.endsWith(o,i)?t:null:null},a=[e];return o.basenames=a,o.patterns=[t],o.allBasenames=a,o}(s[1],i):(t.trimForExclusions?T:_).test(i)?function(e,t){var r=y(e.slice(1,-1).split(",").map(function(e){return f(e,t)}).filter(function(e){return e!==j}),e),i=r.length;if(!i)return j
;if(1===i)return r[0];var o=function(t,n){for(var i=0,o=r.length;i<o;i++)if(r[i](t,n))return e;return null},a=n.first(r,function(e){return!!e.allBasenames});a&&(o.allBasenames=a.allBasenames);var s=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);s.length&&(o.allPaths=s);return o}(i,t):(s=O.exec(d(i,t)))?g(s[1].substr(1),i,!0):(s=I.exec(d(i,t)))?g(s[1],i,!1):function(e){try{var t=new RegExp("^"+l(e)+"$");return function(n,r){return t.lastIndex=0,n&&t.test(n)?e:null}}catch(e){return j}}(i);return k.set(o,a),p(a,e)}function p(e,t){return"string"==typeof t?e:function(n,r){return i.isEqualOrParent(n,t.base)?e(i.normalize(t.pathToRelative(t.base,n)),r):null}}function d(e,t){return t.trimForExclusions&&r.endsWith(e,"/**")?e.substr(0,e.length-2):e}function g(e,t,n){var o=i.nativeSep!==i.sep?e.replace(C,i.nativeSep):e,a=i.nativeSep+o,s=n?function(e,n){return e&&(e===o||r.endsWith(e,a))?t:null}:function(e,n){return e&&e===o?t:null};return s.allPaths=[(n?"*/":"./")+e],s}function h(e,t){
if(void 0===t&&(t={}),!e)return L;if("string"==typeof e||v(e)){var r=f(e,t);if(r===j)return L;var o=function(e,t){return!!r(e,t)};return r.allBasenames&&(o.allBasenames=r.allBasenames),r.allPaths&&(o.allPaths=r.allPaths),o}return function(e,t){var r=y(Object.getOwnPropertyNames(e).map(function(n){return function(e,t,n){if(!1===t)return j;var r=f(e,n);if(r===j)return j;if("boolean"==typeof t)return r;if(t){var i=t.when;if("string"==typeof i){var o=function(t,n,o,a){if(!a||!r(t,n))return null;var u=i.replace("$(basename)",o),c=a(u);return s.isThenable(c)?c.then(function(t){return t?e:null}):c?e:null};return o.requiresSiblings=!0,o}}return r}(n,e[n],t)}).filter(function(e){return e!==j})),o=r.length;if(!o)return j;if(!r.some(function(e){return e.requiresSiblings})){if(1===o)return r[0];var a=function(e,t){for(var n=0,i=r.length;n<i;n++){var o=r[n](e,t);if(o)return o}return null},u=n.first(r,function(e){return!!e.allBasenames});u&&(a.allBasenames=u.allBasenames);var c=r.reduce(function(e,t){
return t.allPaths?e.concat(t.allPaths):e},[]);return c.length&&(a.allPaths=c),a}var l=function(e,t,n){for(var o,a=0,s=r.length;a<s;a++){var u=r[a];u.requiresSiblings&&n&&(t||(t=i.basename(e)),o||(o=t.substr(0,t.length-i.extname(e).length)));var c=u(e,t,o,n);if(c)return c}return null},p=n.first(r,function(e){return!!e.allBasenames});p&&(l.allBasenames=p.allBasenames);var d=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);d.length&&(l.allPaths=d);return l}(e,t)}function m(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function v(e){var t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern&&"function"==typeof t.pathToRelative}function y(e,t){var n=e.filter(function(e){return!!e.basenames});if(n.length<2)return e;var r,i=n.reduce(function(e,t){return e.concat(t.basenames)},[]);if(t){r=[];for(var o=0,a=i.length;o<a;o++)r.push(t)}else r=n.reduce(function(e,t){return e.concat(t.patterns)},[]);var s=function(e,t){if(!e)return null;if(!t){var n=void 0
;for(n=e.length;n>0;n--){var o=e.charCodeAt(n-1);if(47===o||92===o)break}t=e.substr(n)}var a=i.indexOf(t);return-1!==a?r[a]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;var u=e.filter(function(e){return!e.basenames});return u.push(s),u}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)};var b="**",E="/",S="[/\\\\]",x="[^/\\\\]",C=/\//g;t.splitGlobAware=c;var P=/^\*\*\/\*\.[\w\.-]+$/,w=/^\*\*\/([\w\.-]+)\/?$/,_=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,T=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,O=/^\*\*((\/[\w\.-]+)+)\/?$/,I=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,k=new o.LRUCache(1e4),L=function(){return!1},j=function(){return null};t.match=function(e,t,n){return!(!e||!t)&&h(e)(t,void 0,n)},t.parse=h,t.hasSiblingPromiseFn=function(e){if(e){var t;return function(n){return t||(t=(e()||a.TPromise.as([])).then(function(e){return e?m(e):{}})),t.then(function(e){return!!e[n]})}}},t.hasSiblingFn=function(e){
if(e){var t;return function(n){if(!t){var r=e();t=r?m(r):{}}return!!t[n]}}},t.isRelativePattern=v,t.parseToAsync=function(e,t){var n=h(e,t);return function(e,t,r){var i=n(e,t,r);return i instanceof a.TPromise?i:a.TPromise.as(i)}},t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}}),define(e[75],t([0,1,21,11,77]),function(e,t,n,r,i){"use strict";function o(e,t){void 0===t&&(t=!1);var r=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(n.sep)>=0}}(e);c.push(r),r.userConfigured?f.push(r):l.push(r),t&&!r.userConfigured&&c.forEach(function(e){
e.mime===r.mime||e.userConfigured||(r.extension&&e.extension===r.extension&&console.warn("Overwriting extension <<"+r.extension+">> to now point to mime <<"+r.mime+">>"),r.filename&&e.filename===r.filename&&console.warn("Overwriting filename <<"+r.filename+">> to now point to mime <<"+r.mime+">>"),r.filepattern&&e.filepattern===r.filepattern&&console.warn("Overwriting filepattern <<"+r.filepattern+">> to now point to mime <<"+r.mime+">>"),r.firstline&&e.firstline===r.firstline&&console.warn("Overwriting firstline <<"+r.firstline+">> to now point to mime <<"+r.mime+">>"))})}function a(e,i){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),a=s(e,o,f);if(a)return[a,t.MIME_TEXT];var u=s(e,o,l);if(u)return[u,t.MIME_TEXT];if(i){var p=function(e){r.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=0;t<c.length;++t){var n=c[t];if(n.firstline){var i=e.match(n.firstline);if(i&&i.length>0)return n.mime}}return null}(i);if(p)return[p,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function s(e,t,n){
for(var o,a,s,u=n.length-1;u>=0;u--){var c=n[u];if(t===c.filenameLowercase){o=c;break}if(c.filepattern&&(!a||c.filepattern.length>a.filepattern.length)){var l=c.filepatternOnPath?e:t;i.match(c.filepatternLowercase,l)&&(a=c)}c.extension&&(!s||c.extension.length>s.extension.length)&&r.endsWith(t,c.extensionLowercase)&&(s=c)}return o?o.mime:a?a.mime:s?s.mime:null}function u(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&u(e[0]))}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var c=[],l=[],f=[];t.registerTextMime=o,t.clearTextMimes=function(e){e?(c=c.filter(function(e){return!e.userConfigured}),f=[]):(c=[],l=[],f=[])},t.guessMimeTypes=a,t.isUnspecific=u,t.suggestFilename=function(e,t){for(var n=0;n<c.length;n++){var r=c[n];if(!r.userConfigured&&r.id===e&&r.extension)return t+r.extension}return t};var p={".bmp":"image/bmp",".gif":"image/gif",
".jpg":"image/jpg",".jpeg":"image/jpg",".jpe":"image/jpg",".png":"image/png",".tiff":"image/tiff",".tif":"image/tiff",".ico":"image/x-icon",".tga":"image/x-tga",".psd":"image/vnd.adobe.photoshop",".webp":"image/webp",".mid":"audio/midi",".midi":"audio/midi",".mp4a":"audio/mp4",".mpga":"audio/mpeg",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".m2a":"audio/mpeg",".m3a":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".spx":"audio/ogg",".aac":"audio/x-aac",".wav":"audio/x-wav",".wma":"audio/x-ms-wma",".mp4":"video/mp4",".mp4v":"video/mp4",".mpg4":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpe":"video/mpeg",".m1v":"video/mpeg",".m2v":"video/mpeg",".ogv":"video/ogg",".qt":"video/quicktime",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".avi":"video/x-msvideo",".movie":"video/x-sgi-movie"};t.getMediaMime=function(e){var t=n.extname(e);return p[t.toLowerCase()]}
}),define(e[46],t([0,1,73]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n.getPathFromAmdModule(e,"paths"),i=e.__$__nodeRequire(r);t.getAppDataPath=i.getAppDataPath,t.getDefaultUserDataPath=i.getDefaultUserDataPath});var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(o=2&n[0]?i.return:n[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,n[1])).done)return o;switch(i=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,i=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:
if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){s.label=n[1];break}if(6===n[0]&&s.label<o[1]){s.label=o[1],o=n;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(n);break}o[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],i=0}finally{r=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,i,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(e[70],t([0,1,69,5]),function(e,t,i,o){"use strict";function a(t,a){return void 0===a&&(a={}),n(this,void 0,void 0,function(){var n,s,u,c,l,f;return r(this,function(r){switch(r.label){case 0:return n=i.parse(t),(s=a.proxyUrl||function(e){
return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null:null}(n))?(u=i.parse(s),/^https?:$/.test(u.protocol)?(c={host:u.hostname,port:Number(u.port),auth:u.auth,rejectUnauthorized:!o.isBoolean(a.strictSSL)||a.strictSSL},"http:"!==n.protocol?[3,2]:[4,new Promise(function(t,n){e(["http-proxy-agent"],t,n)})]):[2,null]):[2,null];case 1:return f=r.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["https-proxy-agent"],t,n)})];case 3:f=r.sent(),r.label=4;case 4:return l=f,[2,new l(c)]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=a}),define(e[65],t([0,1,27,8,7,12,9,44,32,19]),function(e,t,n,r,i,o,a,s,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){void 0===t&&(t={changeBufferDelay:0,defaultConfig:Object.create(null),onError:function(e){return console.error(e)}}),this._path=e,
this.options=t,this.disposables=[],this.configName=r.basename(this._path),this._onDidUpdateConfiguration=new a.Emitter,this.disposables.push(this._onDidUpdateConfiguration),this.registerWatcher(),this.initAsync()}return Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasParseErrors",{get:function(){return this.parseErrors&&this.parseErrors.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidUpdateConfiguration",{get:function(){return this._onDidUpdateConfiguration.event},enumerable:!0,configurable:!0}),e.prototype.initAsync=function(){var e=this;this.loadAsync(function(t){e.loaded||e.updateCache(t),e.options.initCallback&&e.options.initCallback(e.getConfig())})},e.prototype.updateCache=function(e){this.cache=e,this.loaded=!0},e.prototype.loadSync=function(){try{return this.parse(n.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}},
e.prototype.loadAsync=function(e){var t=this;n.readFile(this._path,function(n,r){return e(n?t.options.defaultConfig:t.parse(r.toString()))})},e.prototype.parse=function(e){var t;try{this.parseErrors=[],t=this.options.parse?this.options.parse(e,this.parseErrors):s.parse(e,this.parseErrors)}catch(e){}return t||this.options.defaultConfig},e.prototype.registerWatcher=function(){var e=this,t=r.dirname(this._path);this.watch(t,!0),n.lstat(this._path,function(t,r){t||r.isDirectory()||r.isSymbolicLink()&&n.readlink(e._path,function(t,n){t||e.watch(n,!1)})})},e.prototype.watch=function(e,t){var n=this;if(!this.disposed){var r=u.watch(e,function(e,r){return n.onConfigFileChange(e,r,t)},function(e){return n.options.onError(e)});r&&this.disposables.push(o.toDisposable(function(){r.removeAllListeners(),r.close()}))}},e.prototype.onConfigFileChange=function(e,t,n){var i=this;n&&(c.isWindows&&t&&t!==this.configName&&(t=r.basename(t)),t!==this.configName)||(this.timeoutHandle&&(global.clearTimeout(this.timeoutHandle),
this.timeoutHandle=null),this.timeoutHandle=global.setTimeout(function(){return i.reload()},this.options.changeBufferDelay))},e.prototype.reload=function(e){var t=this;this.loadAsync(function(n){if(i.equals(n,t.cache)||(t.updateCache(n),t._onDidUpdateConfiguration.fire({config:t.cache})),e)return e(n)})},e.prototype.getConfig=function(){return this.ensureLoaded(),this.cache},e.prototype.getValue=function(e,t){if(this.ensureLoaded(),!e)return t;var n=this.cache?this.cache[e]:void 0;return void 0!==n?n:t},e.prototype.ensureLoaded=function(){this.loaded||this.updateCache(this.loadSync())},e.prototype.dispose=function(){this.disposed=!0,this.disposables=o.dispose(this.disposables)},e}();t.ConfigWatcher=l}),define(e[62],t([6,4]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[36],t([0,1,62,5,22]),function(e,t,n,r,i){"use strict";function o(e,t){return e.message?t&&(e.stack||e.stacktrace)?n.localize(0,null,a(e),e.stack||e.stacktrace):a(e):n.localize(1,null)}function a(e){
return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?n.localize(2,null,e.message):e.message}function s(e,t){if(void 0===e&&(e=null),void 0===t&&(t=!1),!e)return n.localize(3,null);if(Array.isArray(e)){var a=i.coalesce(e),u=s(a[0],t);return a.length>1?n.localize(4,null,u,a.length):u}if(r.isString(e))return e;if(e.detail){var c=e.detail;if(c.error)return o(c.error,t);if(c.exception)return o(c.exception,t)}return e.stack?o(e,t):e.message?e.message:n.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=s}),define(e[61],t([6,4]),function(e,t){return e.create("vs/base/common/severity",t)}),define(e[25],t([0,1,61,11]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={})),function(e){var t="error",i="warning",o="warn",a="info",s=Object.create(null);s[e.Error]=n.localize(0,null),s[e.Warning]=n.localize(1,null),
s[e.Info]=n.localize(2,null),e.fromValue=function(n){return n?r.equalsIgnoreCase(t,n)?e.Error:r.equalsIgnoreCase(i,n)||r.equalsIgnoreCase(o,n)?e.Warning:r.equalsIgnoreCase(a,n)?e.Info:e.Ignore:e.Ignore}}(i||(i={})),t.default=i}),define(e[60],t([6,4]),function(e,t){return e.create("vs/base/node/zip",t)}),define(e[58],t([6,4]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[57],t([6,4]),function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)}),define(e[56],t([6,4]),function(e,t){return e.create("vs/platform/dialogs/node/dialogService",t)}),define(e[55],t([6,4]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[51],t([6,4]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)}),define(e[50],t([6,4]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[47],t([6,4]),function(e,t){
return e.create("vs/platform/request/node/request",t)}),define(e[74],t([6,4]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[48],t([0,1,100,2,25,56,17]),function(e,t,n,r,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){}return e.prototype.show=function(e,t,i){var o=this;return new r.TPromise(function(e,r){var s=n.createInterface({input:process.stdin,output:process.stdout,terminal:!0});s.prompt(),s.write(o.toQuestion(t,i)),s.prompt(),s.once("line",function(t){s.close(),e(o.toOption(t,i))}),s.once("SIGINT",function(){s.close(),r(a.canceled())})})},e.prototype.toQuestion=function(e,t){return t.reduce(function(e,n,r){return e+n+"("+r+")"+(r<t.length-1?" | ":"\n")},e+" ")},e.prototype.toOption=function(e,t){var n=parseInt(e);if(!isNaN(n))return n;e=e.toLocaleLowerCase();for(var r=0;r<t.length;r++)if(t[r].toLocaleLowerCase()===e)return r;return-1},e.prototype.confirm=function(e){
return this.show(i.default.Info,e.message,[e.primaryButton,e.secondaryButton||o.localize(0,null)]).then(function(e){return{confirmed:0===e}})},e}();t.CommandLineDialogService=s});var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};define(e[30],t([0,1,11]),function(e,t,n){"use strict";function r(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||0===n.compareIgnoreCase(e.id,t.id)}function o(e){return e.toLocaleLowerCase()}function a(e,t){return e.toLocaleLowerCase()+"."+t.toLocaleLowerCase()}function s(e){return e.manifest?a(e.manifest.publisher,e.manifest.name):e.identifier.id}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=r,t.adoptToGalleryExtensionId=o,t.getGalleryExtensionId=a,t.getGalleryExtensionIdFromLocal=s,t.LOCAL_EXTENSION_ID_REGEX=/^([^.]+\..+)-(\d+\.\d+\.\d+(-.*)?)$/,t.getIdFromLocalExtensionId=function(e){
var n=t.LOCAL_EXTENSION_ID_REGEX.exec(e);return o(n&&n[1]?n[1]:e)},t.getLocalExtensionId=function(e,t){return e+"-"+t},t.groupByExtension=function(e,t){for(var n=[],i=function(e){for(var i=0,o=n;i<o.length;i++){var a=o[i];if(a.some(function(n){return r(t(n),t(e))}))return a}return null},o=0,a=e;o<a.length;o++){var s=a[o],u=i(s);u?u.push(s):n.push([s])}return n},t.getLocalExtensionTelemetryData=function(e){return{id:s(e),name:e.manifest.name,galleryId:null,publisherId:e.metadata?e.metadata.publisherId:null,publisherName:e.manifest.publisher,publisherDisplayName:e.metadata?e.metadata.publisherDisplayName:null,dependencies:e.manifest.extensionDependencies&&e.manifest.extensionDependencies.length>0}},t.getGalleryExtensionTelemetryData=function(e){return i({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,publisherId:e.publisherId,publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:e.properties.dependencies.length>0},e.telemetryData)},
t.BetterMergeDisabledNowKey="extensions/bettermergedisablednow",t.BetterMergeId="pprice.better-merge",t.getMaliciousExtensionsSet=function(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var i=r[n];i.malicious&&t.add(i.id.id)}return t};var u=new Set;["vscode.extension-editing","vscode.configuration-editing","vscode.search-rg","vscode.css-language-features","vscode.git","vscode.grunt","vscode.gulp","vscode.html-language-features","vscode.json-language-features","vscode.markdown-language-features","vscode.npm","vscode.php-language-features","vscode.typescript-language-features","ms-vscode.node-debug","ms-vscode.node-debug2","ms-python.python","eg2.tslint","dbaeumer.vscode-eslint","eamodio.gitlens"].forEach(function(e){return u.add(e)}),t.isWorkspaceExtension=function(e,t){var n=a(e.publisher,e.name),r=t.getValue("_workbench.workspaceExtensions")||[];if(r.length){if(-1!==r.indexOf(n))return!0;if(-1!==r.indexOf("-"+n))return!1}return!!e.main&&(-1!==(e.categories||[]).indexOf("Workspace Extension")||u.has(n))}}),
define(e[52],t([0,1,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/^%([\w\d.-]+)%$/i;t.localizeManifest=function(e,t){return n.cloneAndChange(e,function(e){if("string"==typeof e){var n=r.exec(e);if(n)return t[n[1]]||e}})}}),define(e[53],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MANIFEST_CACHE_FOLDER="CachedExtensions",t.USER_MANIFEST_CACHE_FILE="user",t.BUILTIN_MANIFEST_CACHE_FILE="builtin"});var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(e[54],t([0,1,12,8,53,15]),function(e,t,n,r,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n){var o=e.call(this)||this;return o.environmentService=t,
o.extensionsManifestCache=r.join(o.environmentService.userDataPath,i.MANIFEST_CACHE_FOLDER,i.USER_MANIFEST_CACHE_FILE),o._register(n.onDidInstallExtension(function(e){return o.onDidInstallExtension(e)})),o._register(n.onDidUninstallExtension(function(e){return o.onDidUnInstallExtension(e)})),o}return o(t,e),t.prototype.onDidInstallExtension=function(e){e.error||this.invalidate()},t.prototype.onDidUnInstallExtension=function(e){e.error||this.invalidate()},t.prototype.invalidate=function(){a.del(this.extensionsManifestCache).done(function(){},function(){})},t}(n.Disposable);t.ExtensionsManifestCache=s}),define(e[42],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.ctor=e,this.staticArguments=t}}();t.SyncDescriptor=n,t.createSyncDescriptor=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new(n.bind.apply(n,[void 0,e].concat(t)))}}),
define(e[41],t([0,1,3,21,57]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDialogService=n.createDecorator("dialogService");var o=10;t.getConfirmMessage=function(e,t){var n=[e];return n.push(""),n.push.apply(n,t.slice(0,o).map(function(e){return r.basename(e.fsPath)})),t.length>o&&(t.length-o==1?n.push(i.localize(0,null)):n.push(i.localize(1,null,t.length-o))),n.push(""),n.join("\n")}}),define(e[59],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=n.createDecorator("downloadService")}),define(e[20],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[26],t([0,1,55,3]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",
t.EXTENSION_IDENTIFIER_REGEX=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN),t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)};!function(e){e[e.System=0]="System",e[e.User=1]="User"}(t.LocalExtensionType||(t.LocalExtensionType={})),t.IExtensionManagementService=r.createDecorator("extensionManagementService"),t.IExtensionGalleryService=r.createDecorator("extensionGalleryService");!function(e){e[e.NoneOrRelevance=0]="NoneOrRelevance",e[e.LastUpdatedDate=1]="LastUpdatedDate",e[e.Title=2]="Title",e[e.PublisherName=3]="PublisherName",e[e.InstallCount=4]="InstallCount",e[e.PublishedDate=5]="PublishedDate",e[e.AverageRating=6]="AverageRating",e[e.WeightedRating=12]="WeightedRating"}(t.SortBy||(t.SortBy={}));!function(e){e[e.Default=0]="Default",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(t.SortOrder||(t.SortOrder={}));!function(e){e.Uninstall="uninstall"}(t.StatisticType||(t.StatisticType={}));!function(e){e[e.None=0]="None",
e[e.Install=1]="Install",e[e.Update=2]="Update"}(t.InstallOperation||(t.InstallOperation={})),t.IExtensionManagementServerService=r.createDecorator("extensionManagementServerService");!function(e){e[e.Disabled=0]="Disabled",e[e.WorkspaceDisabled=1]="WorkspaceDisabled",e[e.Enabled=2]="Enabled",e[e.WorkspaceEnabled=3]="WorkspaceEnabled"}(t.EnablementState||(t.EnablementState={})),t.IExtensionEnablementService=r.createDecorator("extensionEnablementService"),t.IExtensionTipsService=r.createDecorator("extensionTipsService");!function(e){e[e.Workspace=0]="Workspace",e[e.File=1]="File",e[e.Executable=2]="Executable",e[e.DynamicWorkspace=3]="DynamicWorkspace",e[e.Experimental=4]="Experimental"}(t.ExtensionRecommendationReason||(t.ExtensionRecommendationReason={})),t.ExtensionsLabel=n.localize(0,null),t.ExtensionsChannelId="extensions",t.PreferencesLabel=n.localize(1,null)}),define(e[33],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){
for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],a=i[1];this.set(o,a)}}return e.prototype.set=function(e,t){var n=this._entries.get(e);return this._entries.set(e,t),n},e.prototype.forEach=function(e){this._entries.forEach(function(t,n){return e(n,t)})},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=n}),define(e[63],t([0,1,17,5,45,82,42,3,33]),function(e,t,n,r,i,o,a,s,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){void 0===e&&(e=new u.ServiceCollection),void 0===t&&(t=!1),this._services=e,this._strict=t,this._services.set(s.IInstantiationService,this)}return e.prototype.createChild=function(t){var n=this;return this._services.forEach(function(e,r){t.has(e)||(r instanceof a.SyncDescriptor&&(r=n._createAndCacheServiceInstance(e,r)),t.set(e,r))}),new e(t,this._strict)},
e.prototype.invokeFunction=function(e){for(var t=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o;try{return o={get:function(e,n){var r=t._getOrCreateServiceInstance(e);if(!r&&n!==s.optional)throw new Error("[invokeFunction] unknown service '"+e+"'");return r}},e.apply(void 0,[o].concat(r))}finally{o.get=function(){throw n.illegalState("service accessor is only valid during the invocation of its target method")}}},e.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e instanceof a.SyncDescriptor?this._createInstance(e,t):this._createInstance(new a.SyncDescriptor(e),t)},e.prototype._createInstance=function(e,t){for(var n=e.staticArguments.concat(t),i=s._util.getServiceDependencies(e.ctor).sort(function(e,t){return e.index-t.index}),o=[],a=0,u=i;a<u.length;a++){var c=u[a],l=this._getOrCreateServiceInstance(c.id);if(!l&&this._strict&&!c.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+c.id+".");o.push(l)}
var f=i.length>0?i[0].index:n.length;if(n.length!==f){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(f+1)+" conflicts with "+n.length+" static arguments");var p=f-n.length;n=p>0?n.concat(new Array(p)):n.slice(0,f)}var d=[e.ctor];return d.push.apply(d,n),d.push.apply(d,o),r.create.apply(null,d)},e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof a.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},e.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=r.toString(),e}i.ok(this._services.get(e)instanceof a.SyncDescriptor);for(var r=new o.Graph(function(e){return e.id.toString()}),u=0,c=[{id:e,desc:t}];c.length;){var l=c.pop();r.lookupOrInsertNode(l),u++>100&&n();for(var f=0,p=s._util.getServiceDependencies(l.desc.ctor);f<p.length;f++){var d=p[f],g=this._services.get(d.id)
;if(g||console.warn("[createInstance] "+e+" depends on "+d.id+" which is NOT registered."),g instanceof a.SyncDescriptor){var h={id:d.id,desc:g};r.insertEdge(l,h),c.push(h)}}}for(;;){var m=r.roots();if(0===m.length){0!==r.length&&n();break}for(var v=0,y=m;v<y.length;v++){var b=y[v],E=this._createInstance(b.data.desc,[]);this._services.set(b.data.id,E),r.removeNode(b.data)}}return this._services.get(e)},e}();t.InstantiationService=c}),define(e[64],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(t.KeybindingSource||(t.KeybindingSource={})),t.IKeybindingService=n.createDecorator("keybindingService")}),define(e[10],t([0,1,3,12,19,9]),function(e,t,n,r,i,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=n.createDecorator("logService");var s;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",
e[e.Off=6]="Off"}(s=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=s.Info;var u=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.level=t.DEFAULT_LOG_LEVEL,n._onDidChangeLogLevel=n._register(new a.Emitter),n.onDidChangeLogLevel=n._onDidChangeLogLevel.event,n}return o(n,e),n.prototype.setLevel=function(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))},n.prototype.getLevel=function(){return this.level},n}(r.Disposable);t.AbstractLogService=u;var c=function(e){function n(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var r=e.call(this)||this;return r.setLevel(n),r.useColors=!i.isWindows,r}return o(n,e),n.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Trace&&(this.useColors?console.log.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},n.prototype.debug=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Debug&&(this.useColors?console.log.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},n.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Info&&(this.useColors?console.log.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},n.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Warning&&(this.useColors?console.warn.apply(console,["[93m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.warn.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},n.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;this.getLevel()<=s.Error&&(this.useColors?console.error.apply(console,["[91m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},n.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Critical&&(this.useColors?console.error.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},n.prototype.dispose=function(){},n}(u);t.ConsoleLogMainService=c;var l=function(e){function n(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var r=e.call(this)||this;return r.setLevel(n),r}return o(n,e),n.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Trace&&console.log.apply(console,["%cTRACE","color: #888",e].concat(t))},n.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;this.getLevel()<=s.Debug&&console.log.apply(console,["%cDEBUG","background: #eee; color: #888",e].concat(t))},n.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Info&&console.log.apply(console,["%c INFO","color: #33f",e].concat(t))},n.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Warning&&console.log.apply(console,["%c WARN","color: #993",e].concat(t))},n.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Error&&console.log.apply(console,["%c  ERR","color: #f33",e].concat(t))},n.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=s.Critical&&console.log.apply(console,["%cCRITI","background: #f33; color: white",e].concat(t))},n.prototype.dispose=function(){},n}(u);t.ConsoleLogService=l;var f=function(e){function t(t){var n=e.call(this)||this;return n.logServices=t,
t.length&&n.setLevel(t[0].getLevel()),n}return o(t,e),t.prototype.setLevel=function(t){for(var n=0,r=this.logServices;n<r.length;n++){r[n].setLevel(t)}e.prototype.setLevel.call(this,t)},t.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.trace.apply(o,[e].concat(t))}},t.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.debug.apply(o,[e].concat(t))}},t.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.info.apply(o,[e].concat(t))}},t.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.warn.apply(o,[e].concat(t))}},t.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.error.apply(o,[e].concat(t))}},t.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.critical.apply(o,[e].concat(t))}},t.prototype.dispose=function(){for(var e=0,t=this.logServices;e<t.length;e++){t[e].dispose()}},t}(u);t.MultiplexLogService=f;var p=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n._register(t),n}return o(t,e),Object.defineProperty(t.prototype,"onDidChangeLogLevel",{get:function(){return this.logService.onDidChangeLogLevel},enumerable:!0,configurable:!0}),t.prototype.setLevel=function(e){this.logService.setLevel(e)},t.prototype.getLevel=function(){return this.logService.getLevel()},t.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).trace.apply(r,[e].concat(t))},t.prototype.debug=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).debug.apply(r,[e].concat(t))},t.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).info.apply(r,[e].concat(t))},t.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).warn.apply(r,[e].concat(t))},t.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).error.apply(r,[e].concat(t))},t.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).critical.apply(r,[e].concat(t))},t}(r.Disposable);t.DelegatedLogService=p;var d=function(){function e(){this.onDidChangeLogLevel=(new a.Emitter).event}return e.prototype.setLevel=function(e){},e.prototype.getLevel=function(){return s.Info},e.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},
e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.dispose=function(){},e}();t.NullLogService=d,t.getLogLevel=function(e){if(e.verbose)return s.Trace;if("string"==typeof e.args.log)switch(e.args.log.toLowerCase()){case"trace":return s.Trace;case"debug":return s.Debug;case"info":return s.Info;case"warn":return s.Warning;case"error":return s.Error;case"critical":return s.Critical;case"off":return s.Off}return t.DEFAULT_LOG_LEVEL}});var a=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r
;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};define(e[66],t([0,1,12,2,10,99,36,8,16,9,31]),function(e,t,n,r,i,u,c,l,f,p,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n.processesLimiter=new f.Limiter(5),n}return o(t,e),t.prototype.uninstall=function(e){var t=this,n=this.parseUninstallScript(e);return n?(this.logService.info(e.identifier.id,"Running Uninstall hook"),this.processesLimiter.queue(function(){return t.runUninstallHook(n.uninstallHook,n.args,e).then(function(){return t.logService.info(e.identifier.id,"Finished running uninstall hook")},function(n){return t.logService.error(e.identifier.id,"Failed to run uninstall hook: "+n)})})):r.TPromise.as(null)},
t.prototype.parseUninstallScript=function(e){if(e.location.scheme===d.Schemas.file&&e.manifest&&e.manifest.scripts&&"string"==typeof e.manifest.scripts["vscode:uninstall"]){var t=e.manifest.scripts["vscode:uninstall"].split(" ");return t.length<2||"node"!==t[0]||!t[1]?(this.logService.warn(e.identifier.id,"Uninstall script should be a node script"),null):{uninstallHook:l.posix.join(e.location.fsPath,t[1]),args:t.slice(2)||[]}}return null},t.prototype.runUninstallHook=function(e,t,n){var i=this;return new r.TPromise(function(r,o){var a,s=i.start(e,t,n),u=function(e){clearTimeout(a),a=null,e?o(e):r(null)};s.on("error",function(e){a&&u(c.toErrorMessage(e)||"Unknown")}),s.on("exit",function(e,t){a&&u(e?"Process exited with code "+e:void 0)}),a=setTimeout(function(){a=null,s.kill(),o("timed out")},5e3)})},t.prototype.start=function(e,t,n){var r={silent:!0,execArgv:void 0},i=u.fork(e,["--type=extensionUninstall"].concat(t),r);i.stdout.setEncoding("utf8"),i.stderr.setEncoding("utf8")
;var o=p.fromNodeEventEmitter(i.stdout,"data"),a=p.fromNodeEventEmitter(i.stderr,"data"),s=p.anyEvent(p.mapEvent(o,function(e){return{data:"%c"+e,format:[""]}}),p.mapEvent(a,function(e){return{data:"%c"+e,format:["color: red"]}}));return p.debounceEvent(s,function(e,t){return e?{data:e.data+t.data,format:e.format.concat(t.format)}:{data:t.data,format:t.format}},100)(function(e){console.group(n.identifier.id),console.log.apply(console,[e.data].concat(e.format)),console.groupEnd()}),i},t=a([s(0,i.ILogService)],t)}(n.Disposable);t.ExtensionsLifecycle=g}),define(e[68],t([0,1,8,10]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,o,a){try{var s=e.__$__nodeRequire("spdlog");s.setAsyncMode(8192,2e3);var u=n.join(a,t+".log"),c=new s.RotatingLogger(t,u,5242880,6);return c.setLevel(0),new i(c,o)}catch(e){console.error(e)}return new r.NullLogService};var i=function(e){function t(t,n){void 0===n&&(n=r.LogLevel.Error);var i=e.call(this)||this
;return i.logger=t,i.setLevel(n),i}return o(t,e),t.prototype.trace=function(){this.getLevel()<=r.LogLevel.Trace&&this.logger.trace(this.format(arguments))},t.prototype.debug=function(){this.getLevel()<=r.LogLevel.Debug&&this.logger.debug(this.format(arguments))},t.prototype.info=function(){this.getLevel()<=r.LogLevel.Info&&this.logger.info(this.format(arguments))},t.prototype.warn=function(){this.getLevel()<=r.LogLevel.Warning&&this.logger.warn(this.format(arguments))},t.prototype.error=function(){if(this.getLevel()<=r.LogLevel.Error){var e=arguments[0];if(e instanceof Error){var t=Array.prototype.slice.call(arguments);t[0]=e.stack,this.logger.error(this.format(t))}else this.logger.error(this.format(arguments))}},t.prototype.critical=function(){this.getLevel()<=r.LogLevel.Critical&&this.logger.critical(this.format(arguments))},t.prototype.dispose=function(){this.logger.drop()},t.prototype.format=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if("object"==typeof r)try{r=JSON.stringify(r)}catch(e){}
t+=(n>0?" ":"")+r}return t},t}(r.AbstractLogService)}),define(e[38],t([0,1,50,23]),function(e,t,n,r){"use strict";function i(e){return"*"===(e=e.trim())||c.test(e)}function o(e){if(!i(e))return null;if("*"===(e=e.trim()))return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};var t=e.match(c);return{hasCaret:"^"===t[1],hasGreaterEquals:">="===t[1],majorBase:"x"===t[2]?0:parseInt(t[2],10),majorMustEqual:"x"!==t[2],minorBase:"x"===t[4]?0:parseInt(t[4],10),minorMustEqual:"x"!==t[4],patchBase:"x"===t[6]?0:parseInt(t[6],10),patchMustEqual:"x"!==t[6],preRelease:t[8]||null}}function a(e){if(!e)return null;var t=e.majorBase,n=e.majorMustEqual,r=e.minorBase,i=e.minorMustEqual,o=e.patchBase,a=e.patchMustEqual;return e.hasCaret&&(0===t?a=!1:(i=!1,a=!1)),{majorBase:t,majorMustEqual:n,minorBase:r,minorMustEqual:i,patchBase:o,patchMustEqual:a,isMinimum:e.hasGreaterEquals}}function s(e,t){var n;n="string"==typeof e?a(o(e)):e;var r
;if(r="string"==typeof t?a(o(t)):t,!n||!r)return!1;var i=n.majorBase,s=n.minorBase,u=n.patchBase,c=r.majorBase,l=r.minorBase,f=r.patchBase,p=r.majorMustEqual,d=r.minorMustEqual,g=r.patchMustEqual;return r.isMinimum?i>c||!(i<c)&&(s>l||!(s<l)&&u>=f):(1!==i||0!==c||p&&d&&g||(c=1,l=0,f=0,p=!0,d=!1,g=!1),!(i<c)&&(i>c?!p:!(s<l)&&(s>l?!d:!(u<f)&&(!(u>f)||!g))))}function u(e,t,r){void 0===r&&(r=[]);var i=a(o(t));if(!i)return r.push(n.localize(0,null,t)),!1;if(0===i.majorBase){if(!i.majorMustEqual||!i.minorMustEqual)return r.push(n.localize(1,null,t)),!1}else if(!i.majorMustEqual)return r.push(n.localize(2,null,t)),!1;return!!s(e,i)||(r.push(n.localize(3,null,e,t)),!1)}Object.defineProperty(t,"__esModule",{value:!0});var c=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;t.isValidVersionStr=i,t.parseVersion=o,t.normalizeVersion=a,t.isValidVersion=s,t.isValidExtensionVersion=function(e,t,n){return!(!t.isBuiltin&&void 0!==t.main)||u(e,t.engines.vscode,n)},t.isEngineValid=function(e){
return"*"===e||u(r.default.version,e)},t.isVersionValid=u}),define(e[71],t([0,1,97,46,28,8,91,23,34,85,19,73,24]),function(e,t,n,r,i,o,s,u,c,l,f,p,d){"use strict";function g(e,t){return f.isWindows?function(e,t){return"\\\\.\\pipe\\"+n.createHash("md5").update(e).digest("hex")+"-"+u.default.version+"-"+t+"-sock"}(e,t):function(e,t){if(E){var r=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(E,"vscode-"+r+"-"+u.default.version+"-"+t+".sock")}return o.join(e,u.default.version+"-"+t+".sock")}(e,t)}function h(e,t){return v(e.debugPluginHost,e.debugBrkPluginHost,5870,t,e.debugId)}function m(e,t){return v(e.debugSearch,e.debugBrkSearch,5876,t)}function v(e,t,n,r,i){var o=t||e,a=Number(o)||(r?null:n);return{port:a,break:!!a&&Boolean(!!t),debugId:i}}function y(e,t){if(e){var n=o.resolve(e);return o.normalize(e)===n?n:o.resolve(t.env.VSCODE_CWD||t.cwd(),e)}}function b(e,t){return y(e["user-data-dir"],t)||o.resolve(r.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{
value:!0});var E=process.env.XDG_RUNTIME_DIR,S=function(){function t(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){var n=l.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"");process.env.VSCODE_LOGS=o.join(this.userDataPath,"logs",n)}this.logsPath=process.env.VSCODE_LOGS}return Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appRoot",{get:function(){return o.dirname(p.getPathFromAmdModule(e,""))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"execPath",{get:function(){return this._execPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cliPath",{get:function(){return function(e,t,n){return f.isWindows?n?o.join(o.dirname(e),"bin",c.default.applicationName+".cmd"):o.join(t,"scripts","code-cli.bat"):f.isLinux?n?o.join(o.dirname(e),"bin",""+c.default.applicationName):o.join(t,"scripts","code-cli.sh"):n?o.join(t,"bin","code"):o.join(t,"scripts","code-cli.sh")
}(this.execPath,this.appRoot,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userHome",{get:function(){return i.homedir()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userDataPath",{get:function(){return process.env.VSCODE_PORTABLE?o.join(process.env.VSCODE_PORTABLE,"user-data"):b(this._args,process)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appNameLong",{get:function(){return c.default.nameLong},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appQuality",{get:function(){return c.default.quality},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appSettingsHome",{get:function(){return o.join(this.userDataPath,"User")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appSettingsPath",{get:function(){return o.join(this.appSettingsHome,"settings.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchBuildId",{get:function(){
return c.default.settingsSearchBuildId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchUrl",{get:function(){return c.default.settingsSearchUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appKeybindingsPath",{get:function(){return o.join(this.appSettingsHome,"keybindings.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isExtensionDevelopment",{get:function(){return!!this._args.extensionDevelopmentPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backupHome",{get:function(){return o.join(this.userDataPath,"Backups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backupWorkspacesPath",{get:function(){return o.join(this.backupHome,"workspaces.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workspacesHome",{get:function(){return o.join(this.userDataPath,"Workspaces")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"installSourcePath",{
get:function(){return o.join(this.userDataPath,"installSource")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"builtinExtensionsPath",{get:function(){var t=y(this._args["builtin-extensions-dir"],process);return t||o.normalize(o.join(p.getPathFromAmdModule(e,""),"..","extensions"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionsPath",{get:function(){var e=y(this._args["extensions-dir"],process);return e||(process.env.VSCODE_EXTENSIONS?process.env.VSCODE_EXTENSIONS:process.env.VSCODE_PORTABLE?o.join(process.env.VSCODE_PORTABLE,"extensions"):o.join(this.userHome,c.default.dataFolderName,"extensions"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionDevelopmentLocationURI",{get:function(){var e=this._args.extensionDevelopmentPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?d.default.parse(e):d.default.file(o.normalize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionTestsPath",{get:function(){
return this._args.extensionTestsPath?o.normalize(this._args.extensionTestsPath):this._args.extensionTestsPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableExtensions",{get:function(){if(this._args["disable-extensions"])return!0;var e=this._args["disable-extension"];if(e){if("string"==typeof e)return[e];if(Array.isArray(e)&&e.length>0)return e}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipGettingStarted",{get:function(){return this._args["skip-getting-started"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipReleaseNotes",{get:function(){return this._args["skip-release-notes"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipAddToRecentlyOpened",{get:function(){return this._args["skip-add-to-recently-opened"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugExtensionHost",{get:function(){return h(this._args,this.isBuilt)},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"debugSearch",{get:function(){return m(this._args,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBuilt",{get:function(){return!process.env.VSCODE_DEV},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verbose",{get:function(){return this._args.verbose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"log",{get:function(){return this._args.log},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wait",{get:function(){return this._args.wait},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logExtensionHostCommunication",{get:function(){return this._args.logExtensionHostCommunication},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"performance",{get:function(){return this._args.performance},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._args.status},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"mainIPCHandle",{get:function(){return g(this.userDataPath,"main")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharedIPCHandle",{get:function(){return g(this.userDataPath,"shared")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCachedDataDir",{get:function(){return this.isBuilt?o.join(this.userDataPath,"CachedData",c.default.commit||new Array(41).join("0")):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableUpdates",{get:function(){return!!this._args["disable-updates"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableCrashReporter",{get:function(){return!!this._args["disable-crash-reporter"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"driverHandle",{get:function(){return this._args.driver},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"driverVerbose",{get:function(){return this._args["driver-verbose"]},enumerable:!0,
configurable:!0}),a([s.memoize],t.prototype,"appRoot",null),a([s.memoize],t.prototype,"cliPath",null),a([s.memoize],t.prototype,"userHome",null),a([s.memoize],t.prototype,"userDataPath",null),a([s.memoize],t.prototype,"appSettingsHome",null),a([s.memoize],t.prototype,"appSettingsPath",null),a([s.memoize],t.prototype,"settingsSearchBuildId",null),a([s.memoize],t.prototype,"settingsSearchUrl",null),a([s.memoize],t.prototype,"appKeybindingsPath",null),a([s.memoize],t.prototype,"isExtensionDevelopment",null),a([s.memoize],t.prototype,"backupHome",null),a([s.memoize],t.prototype,"backupWorkspacesPath",null),a([s.memoize],t.prototype,"workspacesHome",null),a([s.memoize],t.prototype,"installSourcePath",null),a([s.memoize],t.prototype,"builtinExtensionsPath",null),a([s.memoize],t.prototype,"extensionsPath",null),a([s.memoize],t.prototype,"extensionDevelopmentLocationURI",null),a([s.memoize],t.prototype,"extensionTestsPath",null),a([s.memoize],t.prototype,"debugExtensionHost",null),
a([s.memoize],t.prototype,"debugSearch",null),a([s.memoize],t.prototype,"mainIPCHandle",null),a([s.memoize],t.prototype,"sharedIPCHandle",null),a([s.memoize],t.prototype,"nodeCachedDataDir",null),t}();t.EnvironmentService=S,t.parseExtensionHostPort=h,t.parseSearchPort=m,t.parseDebugPort=v,t.parseUserDataDir=b}),define(e[13],t([0,1,5,45]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.data={}}return e.prototype.add=function(e,t){r.ok(n.isString(e)),r.ok(n.isObject(t)),r.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new i}),define(e[76],t([0,1,13,9]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};var i=new(function(){function e(){this._onDidChangeSchema=new r.Emitter,
this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}return e.prototype.registerSchema=function(e,t){this.schemasById[function(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}(e)]=t,this._onDidChangeSchema.fire(e)},e.prototype.notifySchemaChanged=function(e){this._onDidChangeSchema.fire(e)},e.prototype.getSchemaContributions=function(){return{schemas:this.schemasById}},e}());n.Registry.add(t.Extensions.JSONContribution,i)}),define(e[18],t([0,1,58,9,13,5,11,76]),function(e,t,n,r,i,o,a,s){"use strict";function u(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==h.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"};var c;!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(c=t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},
t.applicationSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.editorConfigurationSchemaId="vscode://schemas/settings/editor";var l=i.Registry.as(s.Extensions.JSONContribution),f=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new r.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidRegisterConfiguration=new r.Emitter,this.onDidRegisterConfiguration=this._onDidRegisterConfiguration.event,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),
this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=this.toConfiguration(t);i&&e.push(i);var o=[];e.forEach(function(e){o.push.apply(o,r.validateAndRegisterProperties(e,n)),r.configurationContributors.push(e),r.registerJSONConfiguration(e),r.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidRegisterConfiguration.fire(o)},e.prototype.notifyConfigurationSchemaUpdated=function(e){l.notifySchemaChanged(t.editorConfigurationSchemaId)},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.toConfiguration=function(e){for(var r={id:"defaultOverrides",title:n.localize(0,null),properties:{}},i=0,o=e;i<o.length;i++){var a=o[i];for(var s in a.defaults){var u=a.defaults[s];t.OVERRIDE_PROPERTY_PATTERN.test(s)&&"object"==typeof u&&(r.properties[s]={type:"object",default:u,description:n.localize(1,null,s),$ref:t.editorConfigurationSchemaId})
}}return Object.keys(r.properties).length?r:null},e.prototype.validateAndRegisterProperties=function(e,n,r,i){void 0===n&&(n=!0),void 0===r&&(r=c.WINDOW),void 0===i&&(i=!1),r=o.isUndefinedOrNull(e.scope)?r:e.scope,i=e.overridable||i;var a=[],s=e.properties;if(s)for(var l in s){var f=void 0;if(n&&(f=u(l)))console.warn(f),delete s[l];else{var p=s[l],d=p.default;o.isUndefined(d)&&(p.default=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(p.type)),i&&(p.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(l)?p.scope=void 0:p.scope=o.isUndefinedOrNull(p.scope)?r:p.scope,!s[l].hasOwnProperty("included")||s[l].included?(this.configurationProperties[l]=s[l],a.push(l)):(this.excludedConfigurationProperties[l]=s[l],delete s[l])}}var g=e.allOf;if(g)for(var h=0,m=g;h<m.length;h++){var v=m[h];a.push.apply(a,this.validateAndRegisterProperties(v,n,r,i))}return a},
e.prototype.getConfigurations=function(){return this.configurationContributors},e.prototype.getConfigurationProperties=function(){return this.configurationProperties},e.prototype.getExcludedConfigurationProperties=function(){return this.excludedConfigurationProperties},e.prototype.registerJSONConfiguration=function(e){function n(e){var r=e.properties;if(r)for(var i in r)switch(t.allSettings.properties[i]=r[i],r[i].scope){case c.APPLICATION:t.applicationSettings.properties[i]=r[i];break;case c.WINDOW:t.windowSettings.properties[i]=r[i];break;case c.RESOURCE:t.resourceSettings.properties[i]=r[i]}var o=e.allOf;o&&o.forEach(n)}n(e),this._onDidSchemaChange.fire()},e.prototype.updateSchemaForOverrideSettingsConfiguration=function(e){e.id!==p&&(this.update(e),l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema))},e.prototype.updateOverridePropertyPatternKey=function(){var e=t.allSettings.patternProperties[this.overridePropertyPattern];e||(e={type:"object",description:n.localize(2,null),
errorMessage:"Unknown Identifier. Use language identifiers",$ref:t.editorConfigurationSchemaId}),delete t.allSettings.patternProperties[this.overridePropertyPattern],delete t.applicationSettings.patternProperties[this.overridePropertyPattern],delete t.windowSettings.patternProperties[this.overridePropertyPattern],delete t.resourceSettings.patternProperties[this.overridePropertyPattern],this.computeOverridePropertyPattern(),t.allSettings.patternProperties[this.overridePropertyPattern]=e,t.applicationSettings.patternProperties[this.overridePropertyPattern]=e,t.windowSettings.patternProperties[this.overridePropertyPattern]=e,t.resourceSettings.patternProperties[this.overridePropertyPattern]=e,this._onDidSchemaChange.fire()},e.prototype.update=function(e){var t=this,n=e.properties;if(n)for(var r in n)n[r].overridable&&(this.editorConfigurationSchema.properties[r]=this.getConfigurationProperties()[r]);var i=e.allOf;i&&i.forEach(function(e){return t.update(e)})},
e.prototype.computeOverridePropertyPattern=function(){this.overridePropertyPattern=this.overrideIdentifiers.length?g.replace("${0}",this.overrideIdentifiers.map(function(e){return a.createRegExp(e,!1).source}).join("|")):d},e}(),p="override",d="\\[.*\\]$",g="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(d);var h=new f;i.Registry.add(t.Extensions.Configuration,h),t.validateProperty=u,t.getScopes=function(){for(var e={},t=h.getConfigurationProperties(),n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];e[i]=t[i].scope}return e.launch=c.RESOURCE,e.task=c.RESOURCE,e}}),define(e[14],t([0,1,7,5,24,13,3,18]),function(e,t,n,r,i,o,a,s){"use strict";function u(e,t){var n=Object.create(null);for(var r in e)c(n,r,e[r],t);return n}function c(e,t,n,r){for(var i=t.split("."),o=i.pop(),a=e,s=0;s<i.length;s++){var u=i[s],c=a[u];switch(typeof c){case"undefined":c=a[u]=Object.create(null);break;case"object":break;default:return void r("Ignoring "+t+" as "+i.slice(0,s+1).join(".")+" is "+JSON.stringify(c))}a=c}
"object"==typeof a?a[o]=n:r("Ignoring "+t+" as "+i.join(".")+" is "+JSON.stringify(a))}function l(e,t){var n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){var r=e[n];"object"!=typeof r||Array.isArray(r)||(l(r,t),0===Object.keys(r).length&&delete e[n])}}else delete e[n]}function f(e,t,n){var r=function(e,t){for(var n=e,r=0;r<t.length;r++){if("object"!=typeof n||null===n)return;n=n[t[r]]}return n}(e,t.split("."));return void 0===r?n:r}function p(e,t,n){Object.keys(t).forEach(function(i){i in e?r.isObject(e[i])&&r.isObject(t[i])?p(e[i],t[i],n):n&&(e[i]=t[i]):e[i]=t[i]})}function d(e){return e.substring(1,e.length-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationService=a.createDecorator("configurationService"),t.isConfigurationOverrides=function(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof i.default)};!function(e){e[e.USER=1]="USER",e[e.WORKSPACE=2]="WORKSPACE",
e[e.WORKSPACE_FOLDER=3]="WORKSPACE_FOLDER",e[e.DEFAULT=4]="DEFAULT",e[e.MEMORY=5]="MEMORY"}(t.ConfigurationTarget||(t.ConfigurationTarget={})),t.compare=function(e,t){for(var r=t.keys.filter(function(t){return-1===e.keys.indexOf(t)}),i=e.keys.filter(function(e){return-1===t.keys.indexOf(e)}),o=[],a=0,s=e.keys;a<s.length;a++){var u=s[a],c=f(e.contents,u),l=f(t.contents,u);n.equals(c,l)||o.push(u)}return{added:r,removed:i,updated:o}},t.toOverrides=function(e,t){for(var n=[],r=o.Registry.as(s.Extensions.Configuration).getConfigurationProperties(),i=0,a=Object.keys(e);i<a.length;i++){var c=a[i];if(s.OVERRIDE_PROPERTY_PATTERN.test(c)){var l={};for(var f in e[c])r[f]&&r[f].overridable&&(l[f]=e[c][f]);n.push({identifiers:[d(c).trim()],contents:u(l,t)})}}return n},t.toValuesTree=u,t.addToValueTree=c,t.removeFromValueTree=function(e,t){l(e,t.split("."))},t.getConfigurationValue=f,t.merge=p,t.getConfigurationKeys=function(){var e=o.Registry.as(s.Extensions.Configuration).getConfigurationProperties()
;return Object.keys(e)},t.getDefaultValues=function(){var e=Object.create(null),t=o.Registry.as(s.Extensions.Configuration).getConfigurationProperties();for(var n in t)c(e,n,t[n].default,function(e){return console.error("Conflict in default settings: "+e)});return e},t.overrideIdentifierFromKey=d,t.keyFromOverrideIdentifier=function(e){return"["+e+"]"}}),define(e[40],t([0,1,44,43,22,5,7,18,14]),function(e,t,n,r,i,a,s,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)
},enumerable:!0,configurable:!0}),e.prototype.getValue=function(e){return e?c.getConfigurationValue(this.contents,e):this.contents},e.prototype.override=function(t){var n=this.getContentsForOverrideIdentifer(t);if(!n||"object"!=typeof n||!Object.keys(n).length)return this;for(var r={},o=0,a=i.distinct(Object.keys(this.contents).concat(Object.keys(n)));o<a.length;o++){var u=a[o],c=this.contents[u],l=n[u];l&&("object"==typeof c&&"object"==typeof l?(c=s.deepClone(c),this.mergeContents(c,l)):c=l),r[u]=c}return new e(r)},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=s.deepClone(this.contents),o=s.deepClone(this.overrides),a=this.keys.slice(),u=0,c=t;u<c.length;u++){var l=c[u];this.mergeContents(r,l.contents);for(var f=function(e){var t=o.filter(function(t){return i.equals(t.identifiers,e.identifiers)})[0];t?p.mergeContents(t.contents,e.contents):o.push(s.deepClone(e))},p=this,d=0,g=l.overrides;d<g.length;d++){f(g[d])}for(var h=0,m=l.keys;h<m.length;h++){var v=m[h]
;-1===a.indexOf(v)&&a.push(v)}}return new e(r,a,o)},e.prototype.freeze=function(){return this.isFrozen=!0,this},e.prototype.mergeContents=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];i in e&&a.isObject(e[i])&&a.isObject(t[i])?this.mergeContents(e[i],t[i]):e[i]=s.deepClone(t[i])}},e.prototype.checkAndFreeze=function(e){return this.isFrozen&&!Object.isFrozen(e)?s.deepFreeze(e):e},e.prototype.getContentsForOverrideIdentifer=function(e){for(var t=0,n=this.overrides;t<n.length;t++){var r=n[t];if(-1!==r.identifiers.indexOf(e))return r.contents}return null},e.prototype.toJSON=function(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}},e.prototype.setValue=function(e,t){this.addKey(e),c.addToValueTree(this.contents,e,t,function(e){throw new Error(e)})},e.prototype.removeValue=function(e){this.removeKey(e)&&c.removeFromValueTree(this.contents,e)},e.prototype.addKey=function(e){for(var t=this.keys.length,n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n)
;this.keys.splice(t,1,e)},e.prototype.removeKey=function(e){var t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)},e}();t.ConfigurationModel=l;var f=function(e){function t(){for(var t=c.getDefaultValues(),n=c.getConfigurationKeys(),r=[],i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];u.OVERRIDE_PROPERTY_PATTERN.test(a)&&r.push({identifiers:[c.overrideIdentifierFromKey(a).trim()],contents:c.toValuesTree(t[a],function(e){return console.error("Conflict in default settings file: "+e)})})}return e.call(this,t,n,r)||this}return o(t,e),t}(l);t.DefaultConfigurationModel=f;var p=function(){function e(e){this._name=e,this._configurationModel=null,this._parseErrors=[]}return Object.defineProperty(e.prototype,"configurationModel",{get:function(){return this._configurationModel||new l},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._parseErrors},enumerable:!0,configurable:!0}),e.prototype.parse=function(e){var t=this.parseContent(e),n=this.parseRaw(t)
;this._configurationModel=new l(n.contents,n.keys,n.overrides)},e.prototype.parseContent=function(e){function t(e){Array.isArray(o)?o.push(e):i&&(o[i]=e)}var r={},i=null,o=[],a=[],s=[],u={onObjectBegin:function(){var e={};t(e),a.push(o),o=e,i=null},onObjectProperty:function(e){i=e},onObjectEnd:function(){o=a.pop()},onArrayBegin:function(){var e=[];t(e),a.push(o),o=e,i=null},onArrayEnd:function(){o=a.pop()},onLiteralValue:t,onError:function(e){s.push({error:e})}};if(e)try{n.visit(e,u),r=o[0]||{}}catch(e){console.error("Error while parsing settings file "+this._name+": "+e),this._parseErrors=[e]}return r},e.prototype.parseRaw=function(e){var t=this;return{contents:c.toValuesTree(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)}),keys:Object.keys(e),overrides:c.toOverrides(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)})}},e}();t.ConfigurationModelParser=p;var d=function(){function e(e,t,n,i,o,a,s){void 0===n&&(n=new l),
void 0===i&&(i=new r.ResourceMap),void 0===o&&(o=new l),void 0===a&&(a=new r.ResourceMap),void 0===s&&(s=!0),this._defaultConfiguration=e,this._userConfiguration=t,this._workspaceConfiguration=n,this._folderConfigurations=i,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new r.ResourceMap}return e.prototype.getValue=function(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)},e.prototype.updateValue=function(e,t,n){void 0===n&&(n={});var r;n.resource?(r=this._memoryConfigurationByResource.get(n.resource))||(r=new l,this._memoryConfigurationByResource.set(n.resource,r)):r=this._memoryConfiguration,void 0===t?r.removeValue(e):r.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)},e.prototype.inspect=function(e,t,n){
var r=this.getConsolidateConfigurationModel(t,n),i=this.getFolderConfigurationModelForResource(t.resource,n),o=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration;return{default:t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),user:t.overrideIdentifier?this._userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._userConfiguration.freeze().getValue(e),workspace:n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,workspaceFolder:i?t.overrideIdentifier?i.freeze().override(t.overrideIdentifier).getValue(e):i.freeze().getValue(e):void 0,memory:t.overrideIdentifier?o.freeze().override(t.overrideIdentifier).getValue(e):o.freeze().getValue(e),value:r.getValue(e)}},e.prototype.keys=function(e){
var t=this.getFolderConfigurationModelForResource(null,e);return{default:this._defaultConfiguration.freeze().keys,user:this._userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:t?t.freeze().keys:[]}},e.prototype.updateDefaultConfiguration=function(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateUserConfiguration=function(e){this._userConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateWorkspaceConfiguration=function(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateFolderConfiguration=function(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)},e.prototype.deleteFolderConfiguration=function(e){this.folders.delete(e),
this._foldersConsolidatedConfigurations.delete(e)},Object.defineProperty(e.prototype,"defaults",{get:function(){return this._defaultConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._userConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"workspace",{get:function(){return this._workspaceConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"folders",{get:function(){return this._folderConfigurations},enumerable:!0,configurable:!0}),e.prototype.getConsolidateConfigurationModel=function(e,t){var n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n},e.prototype.getConsolidatedConfigurationModelForResource=function(e,t){var n=e.resource,r=this.getWorkspaceConsolidatedConfiguration();if(t&&n){var i=t.getFolder(n);i&&(r=this.getFolderConsolidatedConfiguration(i.uri)||r);var o=this._memoryConfigurationByResource.get(n)
;o&&(r=r.merge(o))}return r},e.prototype.getWorkspaceConsolidatedConfiguration=function(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this._userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration},e.prototype.getFolderConsolidatedConfiguration=function(e){var t=this._foldersConsolidatedConfigurations.get(e);if(!t){var n=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(e);r?(t=n.merge(r),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t},e.prototype.getFolderConfigurationModelForResource=function(e,t){if(t&&e){var n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}return null},e.prototype.toData=function(){var e=this;return{defaults:{contents:this._defaultConfiguration.contents,
overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.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(function(t,n){var r=e._folderConfigurations.get(n),i=r.contents,o=r.overrides,a=r.keys;return t[n.toString()]={contents:i,overrides:o,keys:a},t},Object.create({})),isComplete:!0}},e.prototype.allKeys=function(e){var t=this.keys(e),n=t.default.slice(),r=function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t];-1===n.indexOf(i)&&n.push(i)}};r(t.user),r(t.workspace);for(var i=0,o=this.folders.keys();i<o.length;i++){var a=o[i];r(this.folders.get(a).keys)}return n},e}();t.Configuration=d;var g=function(){function e(){}return e.prototype.doesConfigurationContains=function(e,t){
for(var n,r,i=e.contents,o=c.toValuesTree((n={},n[t]=!0,n),function(){});"object"==typeof o&&(r=Object.keys(o)[0]);){if(!(i=i[r]))return!1;o=o[r]}return!0},e.prototype.updateKeys=function(e,t,n){for(var r=0,i=t;r<i.length;r++){var o=i[r];e.setValue(o,{})}},e}();t.AbstractConfigurationChangeEvent=g;var h=function(e){function t(t,n){void 0===t&&(t=new l),void 0===n&&(n=new r.ResourceMap);var i=e.call(this)||this;return i._changedConfiguration=t,i._changedConfigurationByResource=n,i}return o(t,e),Object.defineProperty(t.prototype,"changedConfiguration",{get:function(){return this._changedConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changedConfigurationByResource",{get:function(){return this._changedConfigurationByResource},enumerable:!0,configurable:!0}),t.prototype.change=function(e,n){if(e instanceof t){this._changedConfiguration=this._changedConfiguration.merge(e._changedConfiguration);for(var r=0,i=e._changedConfigurationByResource.keys();r<i.length;r++){
var o=i[r],a=this.getOrSetChangedConfigurationForResource(o);a=a.merge(e._changedConfigurationByResource.get(o)),this._changedConfigurationByResource.set(o,a)}}else this.changeWithKeys(e,n);return this},t.prototype.telemetryData=function(e,t){return this._source=e,this._sourceConfig=t,this},Object.defineProperty(t.prototype,"affectedKeys",{get:function(){var e=this._changedConfiguration.keys.slice();return this._changedConfigurationByResource.forEach(function(t){return e.push.apply(e,t.keys)}),i.distinct(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourceConfig",{get:function(){return this._sourceConfig},enumerable:!0,configurable:!0}),t.prototype.affectsConfiguration=function(e,t){var n=[this._changedConfiguration];if(t){var r=this._changedConfigurationByResource.get(t);r&&n.push(r)}else n.push.apply(n,this._changedConfigurationByResource.values())
;for(var i=0,o=n;i<o.length;i++){var a=o[i];if(this.doesConfigurationContains(a,e))return!0}return!1},t.prototype.changeWithKeys=function(e,t){var n=t?this.getOrSetChangedConfigurationForResource(t):this._changedConfiguration;this.updateKeys(n,e)},t.prototype.getOrSetChangedConfigurationForResource=function(e){var t=this._changedConfigurationByResource.get(e);return t||(t=new l,this._changedConfigurationByResource.set(e,t)),t},t}(g);t.ConfigurationChangeEvent=h}),define(e[80],t([0,1,12,17,40,65,9,2]),function(e,t,n,r,i,a,s,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t){var n=e.call(this)||this;return n._onDidChangeConfiguration=n._register(new s.Emitter),n.onDidChangeConfiguration=n._onDidChangeConfiguration.event,n.userConfigModelWatcher=new a.ConfigWatcher(t,{changeBufferDelay:300,onError:function(e){return r.onUnexpectedError(e)},defaultConfig:new i.ConfigurationModelParser(t),parse:function(e,n){var r=new i.ConfigurationModelParser(t);return r.parse(e),
r.errors.slice(),r}}),n._register(n.userConfigModelWatcher),n._register(n.userConfigModelWatcher.onDidUpdateConfiguration(function(){return n._onDidChangeConfiguration.fire(n.configurationModel)})),n}return o(t,e),Object.defineProperty(t.prototype,"configurationModel",{get:function(){return this.userConfigModelWatcher.getConfig().configurationModel},enumerable:!0,configurable:!0}),t.prototype.reload=function(){var e=this;return new u.TPromise(function(t){return e.userConfigModelWatcher.reload(function(){return t(null)})})},t}(n.Disposable);t.UserConfiguration=c}),define(e[81],t([0,1,13,18,12,14,40,9,20,2,7,80]),function(e,t,n,r,i,u,c,l,f,p,d,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t){var i=e.call(this)||this;return i._onDidChangeConfiguration=i._register(new l.Emitter),i.onDidChangeConfiguration=i._onDidChangeConfiguration.event,i.userConfiguration=i._register(new g.UserConfiguration(t.appSettingsPath)),i.reset(),
i._register(i.userConfiguration.onDidChangeConfiguration(function(){return i.onDidChangeUserConfiguration()})),i._register(n.Registry.as(r.Extensions.Configuration).onDidRegisterConfiguration(function(e){return i.onDidRegisterConfiguration(e)})),i}return o(t,e),Object.defineProperty(t.prototype,"configuration",{get:function(){return this._configuration},enumerable:!0,configurable:!0}),t.prototype.getConfigurationData=function(){return this.configuration.toData()},t.prototype.getValue=function(e,t){var n="string"==typeof e?e:void 0,r=u.isConfigurationOverrides(e)?e:u.isConfigurationOverrides(t)?t:{};return this.configuration.getValue(n,r,null)},t.prototype.updateValue=function(e,t,n,r){return p.TPromise.wrapError(new Error("not supported"))},t.prototype.inspect=function(e){return this.configuration.inspect(e,{},null)},t.prototype.keys=function(){return this.configuration.keys(null)},t.prototype.reloadConfiguration=function(e){var t=this
;return e?p.TPromise.as(null):this.userConfiguration.reload().then(function(){return t.onDidChangeUserConfiguration()})},t.prototype.onDidChangeUserConfiguration=function(){var e=this,t=[],n=u.compare(this._configuration.user,this.userConfiguration.configurationModel),r=n.added,i=n.updated,o=n.removed;if((t=r.concat(i,o)).length){var a=this._configuration;this.reset(),(t=t.filter(function(t){return!d.equals(a.getValue(t,{},null),e._configuration.getValue(t,{},null))})).length&&this.trigger(t,u.ConfigurationTarget.USER)}},t.prototype.onDidRegisterConfiguration=function(e){this.reset(),this.trigger(e,u.ConfigurationTarget.DEFAULT)},t.prototype.reset=function(){var e=new c.DefaultConfigurationModel,t=this.userConfiguration.configurationModel;this._configuration=new c.Configuration(e,t)},t.prototype.trigger=function(e,t){this._onDidChangeConfiguration.fire((new c.ConfigurationChangeEvent).change(e).telemetryData(t,this.getTargetConfiguration(t)))},t.prototype.getTargetConfiguration=function(e){switch(e){
case u.ConfigurationTarget.DEFAULT:return this._configuration.defaults.contents;case u.ConfigurationTarget.USER:return this._configuration.user.contents}return{}},t=a([s(0,f.IEnvironmentService)],t)}(i.Disposable);t.ConfigurationService=h}),define(e[37],t([0,1,47,3,18,13]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IRequestService=r.createDecorator("requestService2"),o.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:n.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$",description:n.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:n.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,description:n.localize(3,null)}}})}),define(e[83],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IStateService=n.createDecorator("stateService")}),
define(e[84],t([0,1,8,27,20,32,5,10]),function(e,t,n,r,i,o,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){this.dbPath=e,this.onError=t,this.database=null}return e.prototype.ensureLoaded=function(){this.database||(this.database=this.loadSync())},e.prototype.getItem=function(e,t){this.ensureLoaded();var n=this.database[e];return u.isUndefinedOrNull(n)?t:n},e.prototype.setItem=function(e,t){if(this.ensureLoaded(),u.isUndefinedOrNull(t))return this.removeItem(e);("string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t||this.database[e]!==t)&&(this.database[e]=t,this.saveSync())},e.prototype.removeItem=function(e){this.ensureLoaded(),u.isUndefined(this.database[e])||(this.database[e]=void 0,this.saveSync())},e.prototype.loadSync=function(){try{return JSON.parse(r.readFileSync(this.dbPath).toString())}catch(e){return e&&"ENOENT"!==e.code&&this.onError(e),{}}},e.prototype.saveSync=function(){try{
o.writeFileAndFlushSync(this.dbPath,JSON.stringify(this.database,null,4))}catch(e){this.onError(e)}},e}();t.FileStorage=l;var f=function(){function e(e,t){this.fileStorage=new l(n.join(e.userDataPath,"storage.json"),function(e){return t.error(e)})}return e.prototype.getItem=function(e,t){return this.fileStorage.getItem(e,t)},e.prototype.setItem=function(e,t){this.fileStorage.setItem(e,t)},e.prototype.removeItem=function(e){this.fileStorage.removeItem(e)},e=a([s(0,i.IEnvironmentService),s(1,c.ILogService)],e)}();t.StateService=f}),define(e[29],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(e[86],t([0,1,74,11,3,14,18,2,12,7,13]),function(e,t,n,r,i,o,u,c,l,f,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,
this._commonProperties=e.commonProperties||c.TPromise.as({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(var n=0,i=this._piiPaths;n<i.length;n++){var o=i[n];this._cleanupPatterns.push(new RegExp(r.escapeRegExpCharacters(o),"gi"))}this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog("optInStatus",{optIn:this._userOptIn}))}return e.prototype._updateUserOptIn=function(){var e=this._configurationService.getValue(g);this._userOptIn=e?e.enableTelemetry:this._userOptIn},Object.defineProperty(e.prototype,"isOptedIn",{get:function(){return this._userOptIn},enumerable:!0,configurable:!0}),e.prototype.getTelemetryInfo=function(){return this._commonProperties.then(function(e){return{sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"]}})},e.prototype.dispose=function(){
this._disposables=l.dispose(this._disposables)},e.prototype.publicLog=function(e,t,n){var r=this;return this._userOptIn?this._commonProperties.then(function(i){t=f.mixin(t,i),t=f.cloneAndChange(t,function(e){if("string"==typeof e)return r._cleanupInfo(e,n)}),r._appender.log(e,t)},function(e){console.error(e)}):c.TPromise.as(void 0)},e.prototype._cleanupInfo=function(e,t){var n=e;if(t){for(var r=[],i=0,o=this._cleanupPatterns;i<o.length;i++)for(p=o[i];;){var a=p.exec(e);if(!a)break;r.push([a.index,p.lastIndex])}for(var s=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,u=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,c=function(){var t=u.exec(e);if(!t)return"break";!s.test(t[0])&&r.every(function(e){var n=e[0],r=e[1];return t.index<n||t.index>=r})&&(n=n.slice(0,t.index)+t[0].replace(/./g,"a")+n.slice(u.lastIndex))};;){if("break"===c())break}}for(var l=0,f=this._cleanupPatterns;l<f.length;l++){var p=f[l];n=n.replace(p,"")}return n},e.IDLE_START_EVENT_NAME="UserIdleStart",
e.IDLE_STOP_EVENT_NAME="UserIdleStop",e=a([s(1,i.optional(o.IConfigurationService))],e)}();t.TelemetryService=d;var g="telemetry";p.Registry.as(u.Extensions.Configuration).registerConfiguration({id:g,order:110,type:"object",title:n.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:n.localize(1,null),default:!0,tags:["usesOnlineServices"]}}})}),define(e[87],t([0,1,2,75,21,14,64,10]),function(e,t,n,r,i,o,u,c){"use strict";function l(e,t){return t.onDidChangeConfiguration(function(t){t.source!==o.ConfigurationTarget.DEFAULT&&(e.publicLog("updateConfiguration",{configurationSource:o.ConfigurationTarget[t.source],configurationKeys:function(e){if(!e)return[];var t=[];return f(t,"",e),t}(t.sourceConfig)}),e.publicLog("updateConfigurationValues",{configurationSource:o.ConfigurationTarget[t.source],configurationValues:function(e,t){if(!e)return[];return t.reduce(function(t,n){var r,i=n.split(".").reduce(function(e,t){return e&&"object"==typeof e?e[t]:void 0},e)
;return void 0!==i&&t.push((r={},r[n]=i,r)),t},[])}(t.sourceConfig,d)}))})}function f(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(function(r){return f(e,t?t+"."+r:r,n[r])}):e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new(function(){function e(){}return e.prototype.publicLog=function(e,t){return n.TPromise.wrap(null)},e.prototype.getTelemetryInfo=function(){return n.TPromise.wrap({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}()),t.combinedAppender=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{log:function(t,n){return e.forEach(function(e){return e.log(t,n)})},dispose:function(){return n.TPromise.join(e.map(function(e){return e.dispose()}))}}},t.NullAppender={log:function(){return null},dispose:function(){return n.TPromise.as(null)}};var p=function(){function e(e){this._logService=e,
this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}return e.prototype.dispose=function(){return n.TPromise.as(void 0)},e.prototype.log=function(e,t){var n=this,r={};Object.keys(t).forEach(function(e){n.commonPropertiesRegex.test(e)||(r[e]=t[e])}),this._logService.trace("telemetry/"+e,r)},e=a([s(0,c.ILogService)],e)}();t.LogAppender=p,t.telemetryURIDescriptor=function(e,t){var n=e&&e.fsPath;return n?{mimeType:r.guessMimeTypes(n).join(", "),ext:i.extname(n),path:t(n)}:{}}
;var d=["editor.tabCompletion","editor.fontFamily","editor.fontWeight","editor.fontSize","editor.lineHeight","editor.letterSpacing","editor.lineNumbers","editor.rulers","editor.wordSeparators","editor.tabSize","editor.insertSpaces","editor.detectIndentation","editor.roundedSelection","editor.scrollBeyondLastLine","editor.minimap.enabled","editor.minimap.side","editor.minimap.renderCharacters","editor.minimap.maxColumn","editor.find.seedSearchStringFromSelection","editor.find.autoFindInSelection","editor.wordWrap","editor.wordWrapColumn","editor.wrappingIndent","editor.mouseWheelScrollSensitivity","editor.multiCursorModifier","editor.quickSuggestions","editor.quickSuggestionsDelay","editor.parameterHints.enabled","editor.parameterHints.cycle","editor.autoClosingBrackets","editor.autoClosingQuotes","editor.autoSurround","editor.autoIndent","editor.formatOnType","editor.formatOnPaste","editor.suggestOnTriggerCharacters","editor.acceptSuggestionOnEnter","editor.acceptSuggestionOnCommitCharacter","editor.snippetSuggestions","editor.emptySelectionClipboard","editor.wordBasedSuggestions","editor.suggestSelection","editor.suggestFontSize","editor.suggestLineHeight","editor.selectionHighlight","editor.occurrencesHighlight","editor.overviewRulerLanes","editor.overviewRulerBorder","editor.cursorBlinking","editor.cursorStyle","editor.mouseWheelZoom","editor.fontLigatures","editor.hideCursorInOverviewRuler","editor.renderWhitespace","editor.renderControlCharacters","editor.renderIndentGuides","editor.renderLineHighlight","editor.codeLens","editor.folding","editor.showFoldingControls","editor.matchBrackets","editor.glyphMargin","editor.useTabStops","editor.trimAutoWhitespace","editor.stablePeek","editor.dragAndDrop","editor.formatOnSave","editor.colorDecorators","breadcrumbs.enabled","breadcrumbs.filePath","breadcrumbs.symbolPath","breadcrumbs.useQuickPick","explorer.openEditors.visible","extensions.autoUpdate","files.associations","files.autoGuessEncoding","files.autoSave","files.autoSaveDelay","files.encoding","files.eol","files.hotExit","files.trimTrailingWhitespace","git.confirmSync","git.enabled","http.proxyStrictSSL","javascript.validate.enable","php.builtInCompletions.enable","php.validate.enable","php.validate.run","terminal.integrated.fontFamily","window.openFilesInNewWindow","window.restoreWindows","window.zoomLevel","workbench.editor.enablePreview","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.showTabs","workbench.editor.swipeToNavigate","workbench.sideBar.location","workbench.startupEditor","workbench.statusBar.visible","workbench.welcome.enabled"]
;t.configurationTelemetry=l,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(function(t){t.source===u.KeybindingSource.User&&t.keybindings&&e.publicLog("updateKeybindings",{bindings:t.keybindings.map(function(e){return{key:e.key,command:e.command,when:e.when,args:!!e.args||void 0}})})})}}),define(e[88],t([0,1,95,5,7,2,10]),function(e,t,n,r,i,o,u){"use strict";function c(e){!1===l&&(n.setup("2588e01f-f6c9-4cd6-a348-143741f8d702").setAutoCollectConsole(!1).setAutoCollectExceptions(!1).setAutoCollectPerformance(!1).setAutoCollectRequests(!1),l=!0);var t=n.getClient(e);return t.channel.setOfflineMode(!0),t.context.tags[t.context.keys.deviceMachineName]="",0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}Object.defineProperty(t,"__esModule",{value:!0});var l=!1,f=function(){function e(e,t,n,r){this._eventPrefix=e,this._defaultData=t,this._logService=r,this._defaultData||(this._defaultData=Object.create(null)),
"string"==typeof n?this._aiClient=c(n):"function"==typeof n&&(this._aiClient=n())}return e._getData=function(t){var n=Object.create(null),r=Object.create(null),i=Object.create(null);e._flaten(t,i);for(var o in i){var a=i[o=o.length>150?o.substr(o.length-149):o];"number"==typeof a?r[o]=a:"boolean"==typeof a?r[o]=a?1:0:"string"==typeof a?n[o]=a.substring(0,1023):void 0!==a&&null!==a&&(n[o]=a)}return{properties:n,measurements:r}},e._flaten=function(t,n,o,a){if(void 0===o&&(o=0),t)for(var s=0,u=Object.getOwnPropertyNames(t);s<u.length;s++){var c=u[s],l=t[c],f=a?a+c:c;Array.isArray(l)?n[f]=i.safeStringify(l):l instanceof Date?n[f]=l.toISOString():r.isObject(l)?o<2?e._flaten(l,n,o+1,f+"."):n[f]=i.safeStringify(l):n[f]=l}},e.prototype.log=function(t,n){this._aiClient&&(n=i.mixin(n,this._defaultData),n=e._getData(n),this._logService&&this._logService.trace("telemetry/"+t,n),this._aiClient.trackEvent(this._eventPrefix+"/"+t,n.properties,n.measurements))},e.prototype.dispose=function(){var e=this
;if(this._aiClient)return new o.TPromise(function(t){e._aiClient.sendPendingData(function(){e._aiClient=void 0,t(void 0)})})},e=a([s(3,u.ILogService)],e)}();t.AppInsightsAppender=f}),define(e[90],t([0,1,19,28,39,15]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,a,s){var u=Object.create(null);u["common.machineId"]=a,u.sessionID=i.generateUuid()+Date.now(),u.commitHash=e,u.version=t,u["common.platformVersion"]=(r.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),u["common.platform"]=n.Platform[n.platform],u["common.nodePlatform"]=process.platform,u["common.nodeArch"]=process.arch;var c=0,l=Date.now();return Object.defineProperties(u,{timestamp:{get:function(){return new Date},enumerable:!0},"common.timesincesessionstart":{get:function(){return Date.now()-l},enumerable:!0},"common.sequence":{get:function(){return c++},enumerable:!0}}),o.readFile(s,"utf8").then(function(e){return u["common.source"]=e.slice(0,30),u
},function(e){return u})}}),define(e[92],t([0,1,60,8,27,16,15,2,93,94,9]),function(e,t,n,r,i,a,s,u,c,l,f){"use strict";function p(e,t,o,c){var l=a.createCancelablePromise(function(){return Promise.resolve(null)}),p=0;return a.createCancelablePromise(function(d){return f.once(d.onCancellationRequested)(function(){c.debug(t,"Cancelled."),l.cancel(),e.close()}),new u.TPromise(function(c,g){var m=new a.SimpleThrottler,v=function(t){t.isCancellationRequested||(p++,e.readEntry())};e.once("error",g),e.once("close",function(){return l.then(function(){d.isCancellationRequested||e.entryCount===p?c(null):g(new h("Incomplete",new Error(n.localize(1,null,p,e.entryCount))))},g)}),e.readEntry(),e.on("entry",function(c){if(!d.isCancellationRequested)if(o.sourcePathRegex.test(c.fileName)){var p=c.fileName.replace(o.sourcePathRegex,"");if(/\/$/.test(p)){var g=r.join(t,p);l=a.createCancelablePromise(function(e){return s.mkdirp(g,void 0,e).then(function(){return v(e)})})}else{var h=a.ninvoke(e,e.openReadStream,c),y=function(e){
var t=e.externalFileAttributes>>16||33188;return[448,56,7].map(function(e){return t&e}).reduce(function(e,t){return e+t},61440&t)}(c);l=a.createCancelablePromise(function(e){return m.queue(function(){return h.then(function(o){return function(e,t,o,a,c,l){var p=r.dirname(t),d=r.join(a,p);if(0!==d.indexOf(a))return u.TPromise.wrapError(new Error(n.localize(0,null,t)));var g,h=r.join(a,t);return f.once(l.onCancellationRequested)(function(){g&&g.close()}),s.mkdirp(d,void 0,l).then(function(){return new u.TPromise(function(t,n){l.isCancellationRequested||((g=i.createWriteStream(h,{mode:o})).once("close",function(){return t(null)}),g.once("error",n),e.once("error",n),e.pipe(g))})})}(o,p,y,t,0,e).then(function(){return v(e)})})})})}}else v(d)})})})}function d(e,t){return void 0===t&&(t=!1),a.nfcall(c.open,e,t?{lazyEntries:!0}:void 0).then(null,function(e){return u.TPromise.wrapError(function(e){if(e instanceof h)return e;var t=void 0
;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new h(t,e)}(e))})}function g(e,t){return function(e,t){return d(e).then(function(e){return new u.TPromise(function(r,i){e.on("entry",function(n){n.fileName===t&&a.ninvoke(e,e.openReadStream,n).done(function(e){return r(e)},function(e){return i(e)})}),e.once("close",function(){return i(new Error(n.localize(2,null,t)))})})})}(e,t).then(function(e){return new u.TPromise(function(t,n){var r=[];e.once("error",n),e.on("data",function(e){return r.push(e)}),e.on("end",function(){return t(Buffer.concat(r))})})})}Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n){var r=this,i=n.message;switch(t){case"CorruptZip":i="Corrupt ZIP: "+i}return r=e.call(this,i)||this,r.type=t,r.cause=n,r}return o(t,e),t}(Error);t.ExtractError=h,t.zip=function(e,t){return new u.TPromise(function(n,r){var o=new l.ZipFile;t.forEach(function(e){
return e.contents?o.addBuffer("string"==typeof e.contents?Buffer.from(e.contents,"utf8"):e.contents,e.path):o.addFile(e.localPath,e.path)}),o.end();var a=i.createWriteStream(e);o.outputStream.pipe(a),o.outputStream.once("error",r),a.once("error",r),a.once("finish",function(){return n(e)})})},t.extract=function(e,t,n,r){void 0===n&&(n={});var i=new RegExp(n.sourcePath?"^"+n.sourcePath:""),o=d(e,!0);return n.overwrite&&(o=o.then(function(e){return s.rimraf(t).then(function(){return e})})),o.then(function(e){return p(e,t,{sourcePathRegex:i},r)})},t.buffer=g}),define(e[89],t([0,1,51,8,15,17,7,12,22,92,2,26,30,52,20,16,9,78,24,23,19,10,54,41,25,66,36,29,38,28,39,59,3,31]),function(e,t,i,u,c,l,f,p,d,g,h,m,v,y,b,E,S,x,C,P,w,_,T,O,I,k,L,j,D,M,R,U,A,F){"use strict";function N(e){return new h.TPromise(function(t,n){try{var r=JSON.parse(e),o=r.__metadata||null;delete r.__metadata,t({manifest:r,metadata:o})}catch(e){n(new Error(i.localize(0,null)))}})}function B(e){
return g.buffer(e,"extension/package.json").then(function(e){return N(e.toString("utf8"))}).then(function(e){var t=e.manifest;return h.TPromise.as(t)})}function z(e,t){return v.getLocalExtensionId(e.identifier.id,t)}function V(e){return v.getLocalExtensionId(v.getGalleryExtensionId(e.publisher,e.name),e.version)}Object.defineProperty(t,"__esModule",{value:!0});var q=function(e){function t(t,n){var r=e.call(this,t)||this;return r.code=n,r}return o(t,e),t}(Error);t.ExtensionManagementError=q,t.validateLocalExtension=B;var W=function(e){function t(t,n,r,i,o,a){var s=e.call(this)||this;return s.dialogService=n,s.galleryService=r,s.logService=i,s.downloadService=o,s.telemetryService=a,s.lastReportTimestamp=0,s.installingExtensions=new Map,s.uninstallingExtensions=new Map,s._onInstallExtension=new S.Emitter,s.onInstallExtension=s._onInstallExtension.event,s._onDidInstallExtension=new S.Emitter,s.onDidInstallExtension=s._onDidInstallExtension.event,s._onUninstallExtension=new S.Emitter,
s.onUninstallExtension=s._onUninstallExtension.event,s._onDidUninstallExtension=new S.Emitter,s.onDidUninstallExtension=s._onDidUninstallExtension.event,s.systemExtensionsPath=t.builtinExtensionsPath,s.extensionsPath=t.extensionsPath,s.uninstalledPath=u.join(s.extensionsPath,".obsolete"),s.uninstalledFileLimiter=new E.Limiter(1),s.manifestCache=s._register(new T.ExtensionsManifestCache(t,s)),s.extensionLifecycle=s._register(new k.ExtensionsLifecycle(s.logService)),s._register(p.toDisposable(function(){s.installingExtensions.forEach(function(e){return e.cancel()}),s.uninstallingExtensions.forEach(function(e){return e.cancel()}),s.installingExtensions.clear(),s.uninstallingExtensions.clear()})),s}return o(t,e),t.prototype.zip=function(e){return h.TPromise.wrap(this.collectFiles(e)).then(function(e){return g.zip(u.join(M.tmpdir(),R.generateUuid()),e)}).then(function(e){return C.default.file(e)})},t.prototype.unzip=function(e,t){return this.install(e,t)},t.prototype.collectFiles=function(e){
var t=this,i=function(e){return n(t,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return[4,c.readdir(e)];case 1:return t=r.sent(),t=t.map(function(t){return u.join(e,t)}),[4,Promise.all(t.map(function(e){return c.stat(e)}))];case 2:return n=r.sent(),o=Promise.resolve([]),n.forEach(function(e,n){var r=t[n];e.isFile()&&(o=o.then(function(e){return e.concat([r])})),e.isDirectory()&&(o=o.then(function(e){return i(r).then(function(t){return e.concat(t)})}))}),[2,o]}})})};return i(e.location.fsPath).then(function(t){return t.map(function(t){return{path:"extension/"+u.relative(e.location.fsPath,t),localPath:t}})})},t.prototype.install=function(e,t){var n=this;return void 0===t&&(t=m.LocalExtensionType.User),this.downloadVsix(e).then(function(e){var r=u.resolve(e.fsPath);return B(r).then(function(e){var o={id:V(e)}
;return e.engines&&e.engines.vscode&&!D.isEngineValid(e.engines.vscode)?h.TPromise.wrapError(new Error(i.localize(1,null,o.id,P.default.version))):n.removeIfExists(o.id).then(function(){return n.checkOutdated(e).then(function(i){return i?(n.logService.info("Installing the extension:",o.id),n._onInstallExtension.fire({identifier:o,zipPath:r}),n.getMetadata(v.getGalleryExtensionId(e.publisher,e.name)).then(function(e){return n.installFromZipPath(o,r,e,t)},function(e){return n.installFromZipPath(o,r,null,t)}).then(function(){return n.logService.info("Successfully installed the extension:",o.id),o},function(e){return n.logService.error("Failed to install the extension:",o.id,e.message),h.TPromise.wrapError(e)})):null})},function(t){return h.TPromise.wrapError(new Error(i.localize(2,null,e.displayName||e.name)))})})})},t.prototype.downloadVsix=function(e){if(e.scheme===F.Schemas.file)return h.TPromise.as(e);if(!this.downloadService)throw new Error("Download service is not available")
;var t=u.join(M.tmpdir(),R.generateUuid());return this.downloadService.download(e,t).then(function(){return C.default.file(t)})},t.prototype.removeIfExists=function(e){var t=this;return this.getInstalled(m.LocalExtensionType.User).then(function(t){return t.filter(function(t){return t.identifier.id===e})[0]}).then(function(e){return e?t.removeExtension(e,"existing"):null})},t.prototype.checkOutdated=function(e){var t=this,n={id:v.getGalleryExtensionId(e.publisher,e.name)};return this.getInstalled(m.LocalExtensionType.User).then(function(r){var o=r.filter(function(t){return v.areSameExtensions(n,{id:v.getGalleryExtensionIdFromLocal(t)})&&x.gt(t.manifest.version,e.version)})[0];if(o){var a=i.localize(3,null),s=[i.localize(4,null),i.localize(5,null)];return t.dialogService.show(I.default.Info,a,s,{cancelId:1}).then(function(e){return 0===e?t.uninstall(o,!0).then(function(){return!0}):h.TPromise.wrapError(l.canceled())})}return!0})},t.prototype.installFromZipPath=function(e,t,n,r){var i=this
;return this.toNonCancellablePromise(this.getInstalled().then(function(o){var a=i.getOperation({id:v.getIdFromLocalExtensionId(e.id),uuid:e.uuid},o);return i.installExtension({zipPath:t,id:e.id,metadata:n},r).then(function(e){return i.installDependenciesAndPackExtensions(e,null).then(function(){return e},function(t){return i.uninstall(e,!0).then(function(){return h.TPromise.wrapError(t)},function(){return h.TPromise.wrapError(t)})})}).then(function(n){return i._onDidInstallExtension.fire({identifier:e,zipPath:t,local:n,operation:a}),n},function(n){return i._onDidInstallExtension.fire({identifier:e,zipPath:t,operation:a,error:n}),h.TPromise.wrapError(n)})}))},t.prototype.installFromGallery=function(e){var t=this,n=this.installingExtensions.get(e.identifier.id);if(!n){var r,i;n=new h.TPromise(function(e,t){r=e,i=t}),this.installingExtensions.set(e.identifier.id,n);try{var o=(new Date).getTime(),a={id:z(e,e.version),uuid:e.identifier.uuid},s=v.getGalleryExtensionTelemetryData(e),u=m.InstallOperation.Install
;this.logService.info("Installing extension:",e.name),this._onInstallExtension.fire({identifier:a,gallery:e}),this.checkMalicious(e).then(function(){return t.getInstalled(m.LocalExtensionType.User)}).then(function(n){var r=n.filter(function(t){return v.areSameExtensions(t.galleryIdentifier,e.identifier)})[0];return u=r?m.InstallOperation.Update:m.InstallOperation.Install,t.downloadInstallableExtension(e,u).then(function(e){return t.installExtension(e,m.LocalExtensionType.User).then(function(t){return E.always(c.rimraf(e.zipPath),function(){return null}).then(function(){return t})})}).then(function(e){return t.installDependenciesAndPackExtensions(e,r).then(function(){return e},function(n){return t.uninstall(e,!0).then(function(){return h.TPromise.wrapError(n)},function(){return h.TPromise.wrapError(n)})})})}).then(function(n){t.installingExtensions.delete(e.identifier.id),t.logService.info("Extensions installed successfully:",e.identifier.id),t._onDidInstallExtension.fire({identifier:a,gallery:e,local:n,
operation:u}),t.reportTelemetry(t.getTelemetryEvent(u),s,(new Date).getTime()-o,void 0),r(null)},function(n){t.installingExtensions.delete(e.identifier.id);var r=n&&n.code?n.code:"unknown";t.logService.error("Failed to install extension:",e.identifier.id,n?n.message:r),t._onDidInstallExtension.fire({identifier:a,gallery:e,operation:u,error:r}),t.reportTelemetry(t.getTelemetryEvent(u),s,(new Date).getTime()-o,n),i(n)})}catch(t){this.installingExtensions.delete(e.identifier.id),i(t)}}return n},t.prototype.reinstallFromGallery=function(e){var t=this;return this.galleryService.isEnabled()?this.findGalleryExtension(e).then(function(n){return n?t.setUninstalled(e).then(function(){return t.removeUninstalledExtension(e).then(function(){return t.installFromGallery(n)},function(e){return h.TPromise.wrapError(new Error(i.localize(7,null,L.toErrorMessage(e))))})}):h.TPromise.wrapError(new Error(i.localize(8,null)))}):h.TPromise.wrapError(new Error(i.localize(6,null)))},t.prototype.getOperation=function(e,t){
return t.some(function(t){return v.areSameExtensions({id:v.getGalleryExtensionIdFromLocal(t),uuid:t.identifier.uuid},e)})?m.InstallOperation.Update:m.InstallOperation.Install},t.prototype.getTelemetryEvent=function(e){return e===m.InstallOperation.Update?"extensionGallery:update":"extensionGallery:install"},t.prototype.checkMalicious=function(e){return this.getExtensionsReport().then(function(t){if(v.getMaliciousExtensionsSet(t).has(e.identifier.id))throw new q("malicious",i.localize(9,null));return null})},t.prototype.downloadInstallableExtension=function(e,t){var n=this,r={id:e.identifier.uuid,publisherId:e.publisherId,publisherDisplayName:e.publisherDisplayName};return this.galleryService.loadCompatibleVersion(e).then(function(o){return o?(n.logService.trace("Started downloading extension:",e.name),n.galleryService.download(o,t).then(function(t){return n.logService.info("Downloaded extension:",e.name,t),B(t).then(function(e){return{zipPath:t,id:V(e),metadata:r}},function(e){
return h.TPromise.wrapError(new q(n.joinErrors(e).message,"validating"))})},function(e){return h.TPromise.wrapError(new q(n.joinErrors(e).message,"downloading"))})):h.TPromise.wrapError(new q(i.localize(10,null,e.identifier.id,P.default.version),"incompatible"))},function(e){return h.TPromise.wrapError(new q(n.joinErrors(e).message,"gallery"))})},t.prototype.installExtension=function(e,t){var n=this;return this.unsetUninstalledAndGetLocal(e.id).then(function(r){return r||n.extractAndInstall(e,t)},function(e){return w.isMacintosh?h.TPromise.wrapError(new q(i.localize(11,null),"unsetUninstalled")):h.TPromise.wrapError(new q(i.localize(12,null),"unsetUninstalled"))})},t.prototype.unsetUninstalledAndGetLocal=function(e){var t=this;return this.isUninstalled(e).then(function(n){return n?(t.logService.trace("Removing the extension from uninstalled list:",e),t.unsetUninstalled(e).then(function(){return t.logService.info("Removed the extension from uninstalled list:",e),t.getInstalled(m.LocalExtensionType.User)
}).then(function(t){return t.filter(function(t){return t.identifier.id===e})[0]})):null})},t.prototype.extractAndInstall=function(e,t){var n=this,r=e.zipPath,o=e.id,a=e.metadata,s=t===m.LocalExtensionType.User?this.extensionsPath:this.systemExtensionsPath,l=u.join(s,"."+o),f=u.join(s,o);return c.rimraf(f).then(function(){return n.extractAndRename(o,r,l,f)},function(e){return h.TPromise.wrapError(new q(i.localize(13,null,f,o),"deleting"))}).then(function(){return n.logService.info("Installation completed.",o),n.scanExtension(o,s,t)}).then(function(e){return a?(e.metadata=a,n.saveMetadataForLocalExtension(e)):e})},t.prototype.extractAndRename=function(e,t,n,r){var i=this;return this.extract(e,t,n).then(function(){return i.rename(e,n,r,Date.now()+12e4).then(function(){return i.logService.info("Renamed to",r)},function(e){return i.logService.info("Rename failed. Deleting from extracted location",n),E.always(c.rimraf(n),function(){return null}).then(function(){return h.TPromise.wrapError(e)})})})},
t.prototype.extract=function(e,t,n){var r=this;return this.logService.trace("Started extracting the extension from "+t+" to "+n),c.rimraf(n).then(function(){return g.extract(t,n,{sourcePath:"extension",overwrite:!0},r.logService).then(function(){return r.logService.info("Extracted extension to "+n+":",e)},function(e){return E.always(c.rimraf(n),function(){return null}).then(function(){return h.TPromise.wrapError(new q(e.message,e instanceof g.ExtractError?e.type:"extracting"))})})},function(e){return h.TPromise.wrapError(new q(r.joinErrors(e).message,"deleting"))})},t.prototype.rename=function(e,t,n,r){var o=this;return c.rename(t,n).then(null,function(a){return w.isWindows&&a&&"EPERM"===a.code&&Date.now()<r?(o.logService.info("Failed renaming "+t+" to "+n+" with 'EPERM' error. Trying again..."),o.rename(e,t,n,r)):h.TPromise.wrapError(new q(a.message||i.localize(14,null,t,n),a.code||"renaming"))})},t.prototype.installDependenciesAndPackExtensions=function(e,t){var n=this;if(this.galleryService.isEnabled()){
var r=e.manifest.extensionDependencies||[];if(e.manifest.extensionPack)for(var i=function(e){t&&t.manifest.extensionPack&&t.manifest.extensionPack.some(function(t){return v.areSameExtensions({id:t},{id:e})})||r.every(function(t){return!v.areSameExtensions({id:t},{id:e})})&&r.push(e)},o=0,a=e.manifest.extensionPack;o<a.length;o++){i(a[o])}if(r.length)return this.getInstalled().then(function(e){var t=r.filter(function(t){return!n.installingExtensions.has(v.adoptToGalleryExtensionId(t))&&e.every(function(e){var n=e.galleryIdentifier;return!v.areSameExtensions(n,{id:t})})});return t.length?n.galleryService.query({names:t,pageSize:r.length}).then(function(e){var t=e.firstPage;return h.TPromise.join(t.map(function(e){return n.installFromGallery(e)})).then(function(){return null},function(e){return n.rollback(t).then(function(){return h.TPromise.wrapError(e)},function(){return h.TPromise.wrapError(e)})})}):null})}return h.TPromise.as(null)},t.prototype.rollback=function(e){var t=this
;return this.getInstalled(m.LocalExtensionType.User).then(function(n){return h.TPromise.join(n.filter(function(t){return e.some(function(e){return t.identifier.id===z(e,e.version)})}).map(function(e){return t.uninstall(e,!0)}))}).then(function(){return null},function(){return null})},t.prototype.uninstall=function(e,t){var n=this;return void 0===t&&(t=!1),this.toNonCancellablePromise(this.getInstalled(m.LocalExtensionType.User).then(function(t){var r=t.filter(function(t){return t.manifest.publisher===e.manifest.publisher&&t.manifest.name===e.manifest.name}).map(function(e){return n.checkForDependenciesAndUninstall(e,t)});return h.TPromise.join(r).then(function(){return null},function(e){return h.TPromise.wrapError(n.joinErrors(e))})}))},t.prototype.updateMetadata=function(e,t){var n=this;return e.metadata=t,this.saveMetadataForLocalExtension(e).then(function(e){return n.manifestCache.invalidate(),e})},t.prototype.saveMetadataForLocalExtension=function(e){if(!e.metadata)return h.TPromise.as(e)
;var t=u.join(this.extensionsPath,e.identifier.id,"package.json");return c.readFile(t,"utf8").then(function(e){return N(e)}).then(function(t){var n=t.manifest;return f.assign(n,{__metadata:e.metadata})}).then(function(e){return c.writeFile(t,JSON.stringify(e,null,"\t"))}).then(function(){return e})},t.prototype.getMetadata=function(e){return this.findGalleryExtensionByName(e).then(function(e){return e?{id:e.identifier.uuid,publisherDisplayName:e.publisherDisplayName,publisherId:e.publisherId}:null})},t.prototype.findGalleryExtension=function(e){var t=this;return e.identifier.uuid?this.findGalleryExtensionById(e.identifier.uuid).then(function(n){return n||t.findGalleryExtensionByName(v.getGalleryExtensionIdFromLocal(e))}):this.findGalleryExtensionByName(v.getGalleryExtensionIdFromLocal(e))},t.prototype.findGalleryExtensionById=function(e){return this.galleryService.query({ids:[e],pageSize:1}).then(function(e){return e.firstPage[0]})},t.prototype.findGalleryExtensionByName=function(e){
return this.galleryService.query({names:[e],pageSize:1}).then(function(e){return e.firstPage[0]})},t.prototype.joinErrors=function(e){var t=Array.isArray(e)?e:[e];return 1===t.length?t[0]instanceof Error?t[0]:new Error(t[0]):t.reduce(function(e,t){return new Error(e.message+(e.message?",":"")+(t instanceof Error?t.message:t))},new Error(""))},t.prototype.checkForDependenciesAndUninstall=function(e,t){var n=this;return this.preUninstallExtension(e).then(function(){var r=n.getAllPackExtensionsToUninstall(e,t);return r.length?n.uninstallExtensions(e,r,t):n.uninstallExtensions(e,[],t)}).then(function(){return n.postUninstallExtension(e)},function(t){return n.postUninstallExtension(e,new q(t instanceof Error?t.message:t,"local")),h.TPromise.wrapError(t)})},t.prototype.uninstallExtensions=function(e,t,n){var r=this,i=this.getDependents(e,n);if(i.length){var o=i.filter(function(n){return e!==n&&-1===t.indexOf(n)});if(o.length)return h.TPromise.wrapError(new Error(this.getDependentsErrorMessage(e,o)))}
return h.TPromise.join([this.uninstallExtension(e)].concat(t.map(function(e){return r.doUninstall(e)}))).then(function(){return null})},t.prototype.getDependentsErrorMessage=function(e,t){return 1===t.length?i.localize(15,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?i.localize(16,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name):i.localize(17,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name)},t.prototype.getAllPackExtensionsToUninstall=function(e,t,n){if(void 0===n&&(n=[]),-1!==n.indexOf(e))return[];if(n.push(e),!e.manifest.extensionPack||0===e.manifest.extensionPack.length)return[];for(var r=t.filter(function(t){return e.manifest.extensionPack.some(function(e){return v.areSameExtensions({id:e},t.galleryIdentifier)})}),i=[],o=0,a=r;o<a.length;o++){var s=a[o]
;i.push.apply(i,this.getAllPackExtensionsToUninstall(s,t,n))}return r.concat(i)},t.prototype.getDependents=function(e,t){return t.filter(function(t){return t.manifest.extensionDependencies&&t.manifest.extensionDependencies.some(function(t){return v.areSameExtensions({id:t},e.galleryIdentifier)})})},t.prototype.doUninstall=function(e){var t=this;return this.preUninstallExtension(e).then(function(){return t.uninstallExtension(e)}).then(function(){return t.postUninstallExtension(e)},function(n){return t.postUninstallExtension(e,new q(n instanceof Error?n.message:n,"local")),h.TPromise.wrapError(n)})},t.prototype.preUninstallExtension=function(e){var t=this;return c.exists(e.location.fsPath).then(function(e){return e?null:h.TPromise.wrapError(new Error(i.localize(18,null)))}).then(function(){t.logService.info("Uninstalling extension:",e.identifier.id),t._onUninstallExtension.fire(e.identifier)})},t.prototype.uninstallExtension=function(e){
var t=this,n=v.getGalleryExtensionIdFromLocal(e),r=this.uninstallingExtensions.get(n);return r||(r=this.scanUserExtensions(!1).then(function(r){return t.setUninstalled.apply(t,r.filter(function(t){return v.areSameExtensions({id:v.getGalleryExtensionIdFromLocal(t),uuid:t.identifier.uuid},{id:n,uuid:e.identifier.uuid})}))}).then(function(){t.uninstallingExtensions.delete(n)}),this.uninstallingExtensions.set(n,r)),r},t.prototype.postUninstallExtension=function(e,t){return n(this,void 0,void 0,function(){var n;return r(this,function(r){switch(r.label){case 0:return t?(this.logService.error("Failed to uninstall extension:",e.identifier.id,t.message),[3,3]):[3,1];case 1:return this.logService.info("Successfully uninstalled extension:",e.identifier.id),e.identifier.uuid?[4,this.galleryService.reportStatistic(e.manifest.publisher,e.manifest.name,e.manifest.version,m.StatisticType.Uninstall)]:[3,3];case 2:r.sent(),r.label=3;case 3:
return this.reportTelemetry("extensionGallery:uninstall",v.getLocalExtensionTelemetryData(e),void 0,t),n=t?t instanceof q?t.code:"unknown":void 0,this._onDidUninstallExtension.fire({identifier:e.identifier,error:n}),[2]}})})},t.prototype.getInstalled=function(e){var t=this;void 0===e&&(e=null);var n=[];return null!==e&&e!==m.LocalExtensionType.System||n.push(this.scanSystemExtensions().then(null,function(e){return new q(t.joinErrors(e).message,"scanningSystem")})),null!==e&&e!==m.LocalExtensionType.User||n.push(this.scanUserExtensions(!0).then(null,function(e){return new q(t.joinErrors(e).message,"scanningUser")})),h.TPromise.join(n).then(d.flatten,function(e){return h.TPromise.wrapError(t.joinErrors(e))})},t.prototype.scanSystemExtensions=function(){var e=this;return this.logService.trace("Started scanning system extensions"),this.scanExtensions(this.systemExtensionsPath,m.LocalExtensionType.System).then(function(t){return e.logService.info("Scanned system extensions:",t.length),t})},
t.prototype.scanUserExtensions=function(e){var t=this;return this.logService.trace("Started scanning user extensions"),h.TPromise.join([this.getUninstalledExtensions(),this.scanExtensions(this.extensionsPath,m.LocalExtensionType.User)]).then(function(n){var r=n[0],i=n[1];if(i=i.filter(function(e){return!r[e.identifier.id]}),e){i=v.groupByExtension(i,function(e){return{id:v.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid}}).map(function(e){return e.sort(function(e,t){return x.rcompare(e.manifest.version,t.manifest.version)})[0]})}return t.logService.info("Scanned user extensions:",i.length),i})},t.prototype.scanExtensions=function(e,t){var n=this,r=new E.Limiter(10);return c.readdir(e).then(function(i){return h.TPromise.join(i.map(function(i){return r.queue(function(){return n.scanExtension(i,e,t)})}))}).then(function(e){return e.filter(function(e){return e&&e.identifier})})},t.prototype.scanExtension=function(e,t,n){if(n===m.LocalExtensionType.User&&0===e.indexOf("."))return h.TPromise.as(null)
;var r=u.join(t,e);return c.readdir(r).then(function(t){return function(e){var t=[c.readFile(u.join(e,"package.json"),"utf8").then(function(e){return N(e)}),c.readFile(u.join(e,"package.nls.json"),"utf8").then(null,function(e){return"ENOENT"!==e.code?h.TPromise.wrapError(e):"{}"}).then(function(e){return JSON.parse(e)})];return h.TPromise.join(t).then(function(e){var t=e[0],n=t.manifest,r=t.metadata,i=e[1];return{manifest:y.localizeManifest(n,i),metadata:r}})}(r).then(function(i){var o=i.manifest,a=i.metadata,s=t.filter(function(e){return/^readme(\.txt|\.md|)$/i.test(e)})[0],c=s?C.default.file(u.join(r,s)).toString():null,l=t.filter(function(e){return/^changelog(\.txt|\.md|)$/i.test(e)})[0],f=l?C.default.file(u.join(r,l)).toString():null;o.extensionDependencies&&(o.extensionDependencies=o.extensionDependencies.map(function(e){return v.adoptToGalleryExtensionId(e)})),o.extensionPack&&(o.extensionPack=o.extensionPack.map(function(e){return v.adoptToGalleryExtensionId(e)}));var p={
id:n===m.LocalExtensionType.System?e:V(o),uuid:a?a.id:null},d={id:v.getGalleryExtensionId(o.publisher,o.name),uuid:p.uuid};return{type:n,identifier:p,galleryIdentifier:d,manifest:o,metadata:a,location:C.default.file(r),readmeUrl:c,changelogUrl:f}})}).then(null,function(){return null})},t.prototype.removeDeprecatedExtensions=function(){var e=this;return this.removeUninstalledExtensions().then(function(){return e.removeOutdatedExtensions()})},t.prototype.removeUninstalledExtensions=function(){var e=this;return this.getUninstalledExtensions().then(function(t){return e.scanExtensions(e.extensionsPath,m.LocalExtensionType.User).then(function(n){var r=n.filter(function(e){return t[e.identifier.id]});return h.TPromise.join(r.map(function(t){return e.extensionLifecycle.uninstall(t).then(function(){return e.removeUninstalledExtension(t)})}))})}).then(function(){return null})},t.prototype.removeOutdatedExtensions=function(){var e=this
;return this.scanExtensions(this.extensionsPath,m.LocalExtensionType.User).then(function(t){var n=[],r=v.groupByExtension(t,function(e){return{id:v.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid}});return n.push.apply(n,d.flatten(r.map(function(e){return e.sort(function(e,t){return x.rcompare(e.manifest.version,t.manifest.version)}).slice(1)}))),h.TPromise.join(n.map(function(t){return e.removeExtension(t,"outdated")}))}).then(function(){return null})},t.prototype.removeUninstalledExtension=function(e){var t=this;return this.removeExtension(e,"uninstalled").then(function(){return t.withUninstalledExtensions(function(t){return delete t[e.identifier.id]})}).then(function(){return null})},t.prototype.removeExtension=function(e,t){var n=this;return this.logService.trace("Deleting "+t+" extension from disk",e.identifier.id),c.rimraf(e.location.fsPath).then(function(){return n.logService.info("Deleted from disk",e.identifier.id)})},t.prototype.isUninstalled=function(e){
return this.filterUninstalled(e).then(function(e){return 1===e.length})},t.prototype.filterUninstalled=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.withUninstalledExtensions(function(t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];t[o]&&n.push(o)}return n})},t.prototype.setUninstalled=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map(function(e){return e.identifier.id});return this.withUninstalledExtensions(function(e){return f.assign(e,n.reduce(function(e,t){return e[t]=!0,e},{}))})},t.prototype.unsetUninstalled=function(e){return this.withUninstalledExtensions(function(t){return delete t[e]})},t.prototype.getUninstalledExtensions=function(){return this.withUninstalledExtensions(function(e){return e})},t.prototype.withUninstalledExtensions=function(e){var t=this;return this.uninstalledFileLimiter.queue(function(){var n=null;return c.readFile(t.uninstalledPath,"utf8").then(null,function(e){
return"ENOENT"===e.code?h.TPromise.as("{}"):h.TPromise.wrapError(e)}).then(function(e){try{return JSON.parse(e)}catch(e){return{}}}).then(function(t){return n=e(t),t}).then(function(e){if(0===Object.keys(e).length)return c.rimraf(t.uninstalledPath);var n=JSON.stringify(e);return c.writeFile(t.uninstalledPath,n)}).then(function(){return n})})},t.prototype.getExtensionsReport=function(){var e=(new Date).getTime();return(!this.reportedExtensions||e-this.lastReportTimestamp>3e5)&&(this.reportedExtensions=this.updateReportCache(),this.lastReportTimestamp=e),this.reportedExtensions},t.prototype.updateReportCache=function(){var e=this;return this.logService.trace("ExtensionManagementService.refreshReportedCache"),this.galleryService.getExtensionsReport().then(function(t){return e.logService.trace("ExtensionManagementService.refreshReportedCache - got "+t.length+" reported extensions from service"),t},function(t){
return e.logService.trace("ExtensionManagementService.refreshReportedCache - failed to get extension report"),[]})},t.prototype.toNonCancellablePromise=function(e){var t=this;return new h.TPromise(function(t,n){return e.then(function(e){return t(e)},function(e){return n(e)})},function(){return t.logService.debug("Request Cancelled")})},t.prototype.reportTelemetry=function(e,t,n,r){var i=r?r instanceof q?r.code:"unknown":void 0;this.telemetryService.publicLog(e,f.assign(t,{success:!r,duration:n,errorcode:i}))},t=a([s(0,b.IEnvironmentService),s(1,O.IDialogService),s(2,m.IExtensionGalleryService),s(3,_.ILogService),s(4,A.optional(U.IDownloadService)),s(5,j.ITelemetryService)],t)}(p.Disposable);t.ExtensionManagementService=W,t.getLocalExtensionIdFromGallery=z,t.getLocalExtensionIdFromManifest=V}),define(e[35],t([0,1,2,5,69,27,7,98]),function(e,t,i,o,a,s,u,c){"use strict";function l(t){var s;return(t.getRawRequest?i.TPromise.as(t.getRawRequest(t)):i.TPromise.wrap(function(t){return n(this,void 0,void 0,function(){
var n,i,o;return r(this,function(r){switch(r.label){case 0:return"https:"!==(n=a.parse(t.url)).protocol?[3,2]:[4,new Promise(function(t,n){e(["https"],t,n)})];case 1:return o=r.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["http"],t,n)})];case 3:o=r.sent(),r.label=4;case 4:return i=o,[2,i.request]}})})}(t))).then(function(e){return new i.TPromise(function(n,r){var i=a.parse(t.url),f={hostname:i.hostname,port:i.port?parseInt(i.port):"https:"===i.protocol?443:80,protocol:i.protocol,path:i.path,method:t.type||"GET",headers:t.headers,agent:t.agent,rejectUnauthorized:!o.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(f.auth=t.user+":"+t.password),(s=e(f,function(e){var i=o.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode>=300&&e.statusCode<400&&i>0&&e.headers.location)l(u.assign({},t,{url:e.headers.location,followRedirects:i-1})).done(n,r);else{var a=e;"gzip"===e.headers["content-encoding"]&&(a=a.pipe(c.createGunzip())),n({res:e,stream:a})}})).on("error",r),
t.timeout&&s.setTimeout(t.timeout),t.data){if("string"!=typeof t.data)return void t.data.pipe(s);s.write(t.data)}s.end()},function(){return s&&s.abort()})})}function f(e){return e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function p(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.request=l,t.download=function(e,t){return new i.TPromise(function(n,r){var i=s.createWriteStream(e);i.once("finish",function(){return n(null)}),t.stream.once("error",r),t.stream.pipe(i)})},t.asText=function(e){return new i.TPromise(function(t,n){if(!f(e))return n("Server returned "+e.res.statusCode);if(p(e))return t(null);var r=[];e.stream.on("data",function(e){return r.push(e)}),e.stream.on("end",function(){return t(r.join(""))}),e.stream.on("error",n)})},t.asJson=function(e){return new i.TPromise(function(t,n){if(!f(e))return n("Server returned "+e.res.statusCode);if(p(e))return t(null);var r=[];e.stream.on("data",function(e){return r.push(e)}),
e.stream.on("end",function(){try{t(JSON.parse(r.join("")))}catch(e){n(e)}}),e.stream.on("error",n)})}}),define(e[67],t([0,1,28,8,2,22,17,26,30,7,37,29,35,23,34,38,20,15,32,39,43,16]),function(e,t,n,r,o,u,c,l,f,p,d,g,h,m,v,y,b,E,S,x,C,P){"use strict";function w(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return String(e.reduce(function(e,t){return e|t},0))}function _(e,t){var n=(e||[]).filter(function(e){return e.statisticName===t})[0];return n?n.value:0}function T(t,n){var r=t.files.filter(function(e){return e.assetType===n})[0];if(n===M.Repository&&t.properties){var i=t.properties.filter(function(e){return e.key===n}),o=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?");return(a=i.filter(function(e){return o.test(e.value)})[0])?{uri:a.value,fallbackUri:a.value}:{uri:null,fallbackUri:null}}if(!r){if(n===M.Icon){var a=e.toUrl("./media/defaultIcon.png");return{uri:a,fallbackUri:a}}return n===M.Repository?{uri:null,fallbackUri:null}:null}return n===M.VSIX?{
uri:t.fallbackAssetUri+"/"+n+"?redirect=true",fallbackUri:t.fallbackAssetUri+"/"+n}:{uri:t.assetUri+"/"+n,fallbackUri:t.fallbackAssetUri+"/"+n}}function O(e,t){var n=e.properties?e.properties.filter(function(e){return e.key===t}):[],r=n.length>0&&n[0].value;return r?r.split(",").map(function(e){return f.adoptToGalleryExtensionId(e)}):[]}function I(e){var t=e.properties?e.properties.filter(function(e){return e.key===R.Engine}):[];return t.length>0&&t[0].value||""}function k(e,t,n,r,i){var o={manifest:T(t,M.Manifest),readme:T(t,M.Details),changelog:T(t,M.Changelog),download:T(t,M.VSIX),icon:T(t,M.Icon),license:T(t,M.License),repository:T(t,M.Repository),coreTranslations:function(e){return e.files.filter(function(e){return 0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")}).reduce(function(t,n){return t[n.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length)]=T(e,n.assetType),t},{})}(t)};return{identifier:{id:f.getGalleryExtensionId(e.publisher.publisherName,e.extensionName),
uuid:e.extensionId},name:e.extensionName,version:t.version,date:t.lastUpdated,displayName:e.displayName,publisherId:e.publisher.publisherId,publisher:e.publisher.publisherName,publisherDisplayName:e.publisher.displayName,description:e.shortDescription||"",installCount:_(e.statistics,"install")+_(e.statistics,"updateCount"),rating:_(e.statistics,"averagerating"),ratingCount:_(e.statistics,"ratingcount"),assets:o,properties:{dependencies:O(t,R.Dependency),extensionPack:O(t,R.ExtensionPack),engine:I(t)},telemetryData:{index:(r.pageNumber-1)*r.pageSize+n,searchText:r.searchText,querySource:i},preview:function(e){return-1!==e.indexOf("preview")}(e.flags)}}function L(e){var t=r.join(e.userDataPath,"machineid");return E.readFile(t,"utf8").then(function(e){return x.isUUID(e)?e:o.TPromise.wrap(null)},function(e){return o.TPromise.wrap(null)}).then(function(e){if(!e){e=x.generateUuid();try{S.writeFileAndFlushSync(t,e)}catch(e){}}return{"X-Market-Client-Id":"VSCode "+m.default.version,
"User-Agent":"VSCode "+m.default.version,"X-Market-User-Id":e}})}Object.defineProperty(t,"__esModule",{value:!0});var j;!function(e){e[e.None=0]="None",e[e.IncludeVersions=1]="IncludeVersions",e[e.IncludeFiles=2]="IncludeFiles",e[e.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",e[e.IncludeSharedAccounts=8]="IncludeSharedAccounts",e[e.IncludeVersionProperties=16]="IncludeVersionProperties",e[e.ExcludeNonValidated=32]="ExcludeNonValidated",e[e.IncludeInstallationTargets=64]="IncludeInstallationTargets",e[e.IncludeAssetUri=128]="IncludeAssetUri",e[e.IncludeStatistics=256]="IncludeStatistics",e[e.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",e[e.Unpublished=4096]="Unpublished"}(j||(j={}));var D;!function(e){e[e.Tag=1]="Tag",e[e.ExtensionId=4]="ExtensionId",e[e.Category=5]="Category",e[e.ExtensionName=7]="ExtensionName",e[e.Target=8]="Target",e[e.Featured=9]="Featured",e[e.SearchText=10]="SearchText",e[e.ExcludeWithFlags=12]="ExcludeWithFlags"}(D||(D={}));var M={
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"},R={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine"},U={pageNumber:1,pageSize:10,sortBy:l.SortBy.NoneOrRelevance,sortOrder:l.SortOrder.Default,flags:j.None,criteria:[],assetTypes:[]},A=function(){function e(e){void 0===e&&(e=U),this.state=e}return Object.defineProperty(e.prototype,"pageNumber",{get:function(){return this.state.pageNumber},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return this.state.pageSize},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"sortBy",{get:function(){return this.state.sortBy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this.state.sortOrder},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.state.flags},enumerable:!0,configurable:!0}),e.prototype.withPage=function(t,n){return void 0===n&&(n=this.state.pageSize),new e(p.assign({},this.state,{pageNumber:t,pageSize:n}))},e.prototype.withFilter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.state.criteria.concat(n.map(function(e){return{filterType:t,value:e}}));return new e(p.assign({},this.state,{criteria:i}))},e.prototype.withSortBy=function(t){return new e(p.assign({},this.state,{sortBy:t}))},e.prototype.withSortOrder=function(t){return new e(p.assign({},this.state,{sortOrder:t}))},e.prototype.withFlags=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n]
;return new e(p.assign({},this.state,{flags:t.reduce(function(e,t){return e|t},0)}))},e.prototype.withAssetTypes=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(p.assign({},this.state,{assetTypes:t}))},Object.defineProperty(e.prototype,"raw",{get:function(){var e=this.state,t=e.criteria,n=e.pageNumber,r=e.pageSize,i=e.sortBy,o=e.sortOrder,a=e.flags;return{filters:[{criteria:t,pageNumber:n,pageSize:r,sortBy:i,sortOrder:o}],assetTypes:e.assetTypes,flags:a}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchText",{get:function(){var e=this.state.criteria.filter(function(e){return e.filterType===D.SearchText})[0];return e?e.value:""},enumerable:!0,configurable:!0}),e}(),F=function(){function e(e,t,n){this.requestService=e,this.environmentService=t,this.telemetryService=n;var r=v.default.extensionsGallery;this.extensionsGalleryUrl=r&&r.serviceUrl,this.extensionsControlUrl=r&&r.controlUrl,this.commonHeadersPromise=L(this.environmentService)}
return e.prototype.api=function(e){return void 0===e&&(e=""),""+this.extensionsGalleryUrl+e},e.prototype.isEnabled=function(){return!!this.extensionsGalleryUrl},e.prototype.getExtension=function(e,t){var n=e.id,r=e.uuid,i=(new A).withFlags(j.IncludeAssetUri,j.IncludeStatistics,j.IncludeFiles,j.IncludeVersionProperties).withPage(1,1).withFilter(D.Target,"Microsoft.VisualStudio.Code").withFilter(D.ExcludeWithFlags,w(j.Unpublished));return i=r?i.withFilter(D.ExtensionId,r):i.withFilter(D.ExtensionName,n),this.queryGallery(i).then(function(e){var n=e.galleryExtensions;if(n.length){var r=n[0],o=t?r.versions.filter(function(e){return e.version===t})[0]:r.versions[0];if(o)return k(r,o,0,i)}return null})},e.prototype.query=function(e){var t=this;if(void 0===e&&(e={}),!this.isEnabled())return o.TPromise.wrapError(new Error("No extension gallery service configured."));var n=e.names?"ids":e.text?"text":"all",r=e.text||"",i=p.getOrDefault(e,function(e){return e.pageSize},50)
;this.telemetryService.publicLog("galleryService:query",{type:n,text:r});var a=(new A).withFlags(j.IncludeLatestVersionOnly,j.IncludeAssetUri,j.IncludeStatistics,j.IncludeFiles,j.IncludeVersionProperties).withPage(1,i).withFilter(D.Target,"Microsoft.VisualStudio.Code").withFilter(D.ExcludeWithFlags,w(j.Unpublished));return r?((r=(r=(r=r.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return a=a.withFilter(D.Category,n||t),""})).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return a=a.withFilter(D.Tag,n||t),""})).trim())&&(r=r.length<200?r:r.substring(0,200),a=a.withFilter(D.SearchText,r)),a=a.withSortBy(l.SortBy.NoneOrRelevance)):a=e.ids?a.withFilter.apply(a,[D.ExtensionId].concat(e.ids)):e.names?a.withFilter.apply(a,[D.ExtensionName].concat(e.names)):a.withSortBy(l.SortBy.InstallCount),"number"==typeof e.sortBy&&(a=a.withSortBy(e.sortBy)),"number"==typeof e.sortOrder&&(a=a.withSortOrder(e.sortOrder)),this.queryGallery(a).then(function(n){
var r=n.galleryExtensions,i=n.total;return{firstPage:r.map(function(t,n){return k(t,t.versions[0],n,a,e.source)}),total:i,pageSize:a.pageSize,getPage:function(n,r){if(r.isCancellationRequested)return o.TPromise.wrapError(c.canceled());var i=a.withPage(n+1),s=t.queryGallery(i).then(function(t){return t.galleryExtensions.map(function(t,n){return k(t,t.versions[0],n,i,e.source)})});return P.wireCancellationToken(r,s)}}})},e.prototype.queryGallery=function(e){var t=this;return this.commonHeadersPromise.then(function(n){var r=JSON.stringify(e.raw),i=p.assign({},n,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":r.length});return t.requestService.request({type:"POST",url:t.api("/extensionquery"),data:r,headers:i}).then(function(e){return e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:h.asJson(e).then(function(e){var t=e.results[0],n=t.extensions,r=t.resultMetadata&&t.resultMetadata.filter(function(e){
return"ResultCount"===e.metadataType})[0];return{galleryExtensions:n,total:r&&r.metadataItems.filter(function(e){return"TotalCount"===e.name})[0].count||0}})})})},e.prototype.reportStatistic=function(e,t,n,r){var a=this;return this.isEnabled()?this.commonHeadersPromise.then(function(o){var s=i({},o,{Accept:"*/*;api-version=4.0-preview.1"});return a.requestService.request({type:"POST",url:a.api("/publishers/"+e+"/extensions/"+t+"/"+n+"/stats?statType="+r),headers:s}).then(null,function(){return null})}):o.TPromise.as(null)},e.prototype.download=function(e,t){var i=this,o=r.join(n.tmpdir(),x.generateUuid()),a=f.getGalleryExtensionTelemetryData(e),s=(new Date).getTime(),u=t===l.InstallOperation.Install?"install":t===l.InstallOperation.Update?"update":"",c=u?{uri:e.assets.download.uri+"&"+u+"=true",fallbackUri:e.assets.download.fallbackUri+"?"+u+"=true"}:e.assets.download;return this.getAsset(c).then(function(e){return h.download(o,e)}).then(function(){return function(e){
return i.telemetryService.publicLog("galleryService:downloadVSIX",p.assign(a,{duration:e}))}((new Date).getTime()-s)}).then(function(){return o})},e.prototype.getReadme=function(e){return this.getAsset(e.assets.readme).then(h.asText)},e.prototype.getManifest=function(e){return this.getAsset(e.assets.manifest).then(h.asText).then(JSON.parse)},e.prototype.getCoreTranslation=function(e,t){var n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(h.asText).then(JSON.parse):o.TPromise.as(null)},e.prototype.getChangelog=function(e){return this.getAsset(e.assets.changelog).then(h.asText)},e.prototype.loadAllDependencies=function(e){return this.getDependenciesReccursively(e.map(function(e){return e.id}),[])},e.prototype.loadCompatibleVersion=function(e){var t=this;if(e.properties.engine&&y.isEngineValid(e.properties.engine))return o.TPromise.wrap(e)
;var n=(new A).withFlags(j.IncludeVersions,j.IncludeFiles,j.IncludeVersionProperties).withPage(1,1).withFilter(D.Target,"Microsoft.VisualStudio.Code").withFilter(D.ExcludeWithFlags,w(j.Unpublished)).withAssetTypes(M.Manifest,M.VSIX).withFilter(D.ExtensionId,e.identifier.uuid);return this.queryGallery(n).then(function(n){var r=n.galleryExtensions[0];return r?t.getLastValidExtensionVersion(r,r.versions).then(function(t){return t?(e.properties.dependencies=O(t,R.Dependency),e.properties.engine=I(t),e.assets.download=T(t,M.VSIX),e.version=t.version,e):null}):null})},e.prototype.loadDependencies=function(e){var t;if(!e||0===e.length)return o.TPromise.as([])
;var n=(t=(new A).withFlags(j.IncludeLatestVersionOnly,j.IncludeAssetUri,j.IncludeStatistics,j.IncludeFiles,j.IncludeVersionProperties).withPage(1,e.length).withFilter(D.Target,"Microsoft.VisualStudio.Code").withFilter(D.ExcludeWithFlags,w(j.Unpublished)).withAssetTypes(M.Icon,M.License,M.Details,M.Manifest,M.VSIX)).withFilter.apply(t,[D.ExtensionName].concat(e));return this.queryGallery(n).then(function(e){for(var t=[],r=[],i=0;i<e.galleryExtensions.length;i++){var o=e.galleryExtensions[i];-1===r.indexOf(o.extensionId)&&(t.push(k(o,o.versions[0],i,n,"dependencies")),r.push(o.extensionId))}return t})},e.prototype.getDependenciesReccursively=function(t,n){var r=this;return t&&t.length&&(t=n.length?t.filter(function(t){return!e.hasExtensionByName(n,t)}):t).length?this.loadDependencies(t).then(function(t){for(var i=new Set,o=0,a=t;o<a.length;o++){var s=a[o];s.properties.dependencies&&s.properties.dependencies.forEach(function(e){return i.add(e)})}n=u.distinct(n.concat(t),function(e){return e.identifier.uuid})
;var c=[];return i.forEach(function(t){return!e.hasExtensionByName(n,t)&&c.push(t)}),r.getDependenciesReccursively(c,n)}):o.TPromise.wrap(n)},e.prototype.getAsset=function(e,t){var n=this;return void 0===t&&(t={}),this.commonHeadersPromise.then(function(r){var i=p.assign({},r,t.headers||{});t=p.assign({},t,{type:"GET"},{headers:i});var a=e.uri,s=e.fallbackUri,u=p.assign({},t,{url:a});return n.requestService.request(u).then(function(e){return 200===e.res.statusCode?o.TPromise.as(e):h.asText(e).then(function(t){return o.TPromise.wrapError(new Error("Expected 200, got back "+e.res.statusCode+" instead.\n\n"+t))})}).then(null,function(e){if(c.isPromiseCanceledError(e))return o.TPromise.wrapError(e);var r=c.getErrorMessage(e);n.telemetryService.publicLog("galleryService:requestError",{url:a,cdn:!0,message:r}),n.telemetryService.publicLog("galleryService:cdnFallback",{url:a,message:r});var i=p.assign({},t,{url:s});return n.requestService.request(i).then(null,function(e){
if(c.isPromiseCanceledError(e))return o.TPromise.wrapError(e);var t=c.getErrorMessage(e);return n.telemetryService.publicLog("galleryService:requestError",{url:s,cdn:!1,message:t}),o.TPromise.wrapError(e)})})})},e.prototype.getLastValidExtensionVersion=function(e,t){var n=this.getLastValidExtensionVersionFromProperties(e,t);return n||this.getLastValidExtensionVersionReccursively(e,t)},e.prototype.getLastValidExtensionVersionFromProperties=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],a=I(i);if(!a)return null;if(y.isEngineValid(a))return o.TPromise.wrap(i)}return null},e.prototype.getLastValidExtensionVersionReccursively=function(e,t){var n=this;if(!t.length)return null;var r=t[0],i=T(r,M.Manifest);return this.getAsset(i,{headers:{"Accept-Encoding":"gzip"}}).then(function(e){return h.asJson(e)}).then(function(i){var o=i.engines.vscode;return y.isEngineValid(o)?(r.properties=r.properties||[],r.properties.push({key:R.Engine,value:i.engines.vscode}),
r):n.getLastValidExtensionVersionReccursively(e,t.slice(1))})},e.hasExtensionByName=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i.publisher+"."+i.name===t)return!0}return!1},e.prototype.getExtensionsReport=function(){return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl}).then(function(e){return 200!==e.res.statusCode?o.TPromise.wrapError(new Error("Could not get extensions report.")):h.asJson(e).then(function(e){for(var t=new Map,n=0,r=e.malicious;n<r.length;n++){var i=r[n],a=t.get(i)||{id:{id:i},malicious:!0,slow:!1};a.malicious=!0,t.set(i,a)}return o.TPromise.as(C.values(t))})}):o.TPromise.as([]):o.TPromise.wrapError(new Error("No extension gallery service configured."))},e=a([s(0,d.IRequestService),s(1,b.IEnvironmentService),s(2,g.ITelemetryService)],e)}();t.ExtensionGalleryService=F,t.resolveMarketplaceHeaders=L}),define(e[49],t([0,1,2,7,35,70,14,10]),function(e,t,n,r,i,o,u,c){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=this;this.logService=t,this.disposables=[],this.configure(e.getValue()),e.onDidChangeConfiguration(function(){return n.configure(e.getValue())},this,this.disposables)}return e.prototype.configure=function(e){this.proxyUrl=e.http&&e.http.proxy,this.strictSSL=e.http&&e.http.proxyStrictSSL,this.authorization=e.http&&e.http.proxyAuthorization},e.prototype.request=function(e,t){var a=this;void 0===t&&(t=i.request),this.logService.trace("RequestService#request",e.url);var s=this.proxyUrl,u=this.strictSSL;return(e.agent?n.TPromise.wrap(e.agent):n.TPromise.wrap(o.getProxyAgent(e.url,{proxyUrl:s,strictSSL:u}))).then(function(n){return e.agent=n,e.strictSSL=u,a.authorization&&(e.headers=r.assign(e.headers||{},{"Proxy-Authorization":a.authorization})),t(e)})},e=a([s(0,u.IConfigurationService),s(1,c.ILogService)],e)}();t.RequestService=l}),
define(e[101],t([0,1,4,34,23,8,78,2,16,33,42,63,20,71,26,89,67,29,87,86,90,37,49,14,81,88,15,79,83,84,68,10,17,41,48,30,25,24]),function(e,t,i,o,u,c,l,f,p,d,g,h,m,v,y,b,E,S,x,C,P,w,_,T,O,I,k,L,j,D,M,R,U,A,F,N,B,z){"use strict";function V(e,t){return t?e.publisher+"."+e.name+"@"+e.version:e.publisher+"."+e.name}Object.defineProperty(t,"__esModule",{value:!0});var q=i.localize(2,null,"ms-vscode.csharp"),W=function(){function e(e,t,n,r){this.environmentService=e,this.extensionManagementService=t,this.extensionGalleryService=n,this.dialogService=r}return e.prototype.run=function(e){var t;if(e["install-source"])t=this.setInstallSource(e["install-source"]);else if(e["list-extensions"])t=this.listExtensions(e["show-versions"]);else if(e["install-extension"]){var n="string"==typeof(r=e["install-extension"])?[r]:r;t=this.installExtension(n)}else if(e["uninstall-extension"]){var r=e["uninstall-extension"],i="string"==typeof r?[r]:r;t=this.uninstallExtension(i)}return t||f.TPromise.as(null)},
e.prototype.setInstallSource=function(e){return k.writeFile(this.environmentService.installSourcePath,e.slice(0,30))},e.prototype.listExtensions=function(e){return this.extensionManagementService.getInstalled(y.LocalExtensionType.User).then(function(t){t.forEach(function(t){return console.log(V(t.manifest,e))})})},e.prototype.installExtension=function(e){var t=this,n=e.filter(function(e){return/\.vsix$/i.test(e)}).map(function(e){return function(){var n=c.isAbsolute(e)?e:c.join(process.cwd(),e);return t.extensionManagementService.install(z.default.file(n)).then(function(){console.log(i.localize(3,null,L.getBaseLabel(n)))},function(e){return U.isPromiseCanceledError(e)?(console.log(i.localize(4,null,L.getBaseLabel(n))),null):f.TPromise.wrapError(e)})}}),r=e.filter(function(e){return!/\.vsix$/i.test(e)}).map(function(e){return function(){return t.extensionManagementService.getInstalled(y.LocalExtensionType.User).then(function(n){return t.extensionGalleryService.query({names:[e],source:"cli"
}).then(null,function(e){if(e.responseText)try{var t=JSON.parse(e.responseText);return f.TPromise.wrapError(t.message)}catch(e){}return f.TPromise.wrapError(e)}).then(function(r){var o=r.firstPage[0];if(!o)return f.TPromise.wrapError(new Error(function(e){return i.localize(0,null,e)}(e)+"\n"+q));var a=n.filter(function(t){return N.areSameExtensions({id:N.getGalleryExtensionIdFromLocal(t)},{id:e})})[0];if(a){if(l.gt(o.version,a.manifest.version)){var s=i.localize(5,null,e,a.manifest.version,o.version);return t.dialogService.show(B.default.Info,s,[i.localize(6,null),i.localize(7,null)]).then(function(n){return 0===n?t.installFromGallery(e,o):(console.log(i.localize(8,null,e)),f.TPromise.as(null))})}return console.log(i.localize(9,null,e)),f.TPromise.as(null)}return console.log(i.localize(10,null,e)),t.installFromGallery(e,o)})})}});return p.sequence(n.concat(r))},e.prototype.installFromGallery=function(e,t){return console.log(i.localize(11,null)),
this.extensionManagementService.installFromGallery(t).then(function(){return console.log(i.localize(12,null,e,t.version))},function(t){return U.isPromiseCanceledError(t)?(console.log(i.localize(13,null,e)),null):f.TPromise.wrapError(t)})},e.prototype.uninstallExtension=function(e){var t=this;return p.sequence(e.map(function(e){return function(){return function(e){return n(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return/\.vsix$/i.test(e)?(t=c.isAbsolute(e)?e:c.join(process.cwd(),e),[4,b.validateLocalExtension(t)]):[2,e];case 1:return n=r.sent(),[2,V(n)]}})})}(e).then(function(e){return t.extensionManagementService.getInstalled(y.LocalExtensionType.User).then(function(n){var r=n.filter(function(t){return N.areSameExtensions({id:N.getGalleryExtensionIdFromLocal(t)},{id:e})})[0];return r?(console.log(i.localize(14,null,e)),t.extensionManagementService.uninstall(r,!0).then(function(){return console.log(i.localize(15,null,e))
})):f.TPromise.wrapError(new Error(function(e){return i.localize(1,null,e)}(e)+"\n"+q))})})}}))},e=a([s(0,m.IEnvironmentService),s(1,y.IExtensionManagementService),s(2,y.IExtensionGalleryService),s(3,A.IDialogService)],e)}(),G="monacoworkbench";t.main=function(e){var t=new d.ServiceCollection,n=new v.EnvironmentService(e,process.execPath),r=M.createSpdLogService("cli",R.getLogLevel(n),n.logsPath);process.once("exit",function(){return r.dispose()}),r.info("main",e),t.set(m.IEnvironmentService,n),t.set(R.ILogService,r),t.set(j.IStateService,new g.SyncDescriptor(D.StateService));var i=new h.InstantiationService(t);return i.invokeFunction(function(t){var n=t.get(m.IEnvironmentService),a=t.get(j.IStateService);return f.TPromise.join([n.appSettingsHome,n.extensionsPath].map(function(e){return k.mkdirp(e)})).then(function(){var t=n.appRoot,s=n.extensionsPath,c=n.extensionDevelopmentLocationURI,l=n.isBuilt,f=n.installSourcePath,p=new d.ServiceCollection
;p.set(T.IConfigurationService,new g.SyncDescriptor(O.ConfigurationService)),p.set(w.IRequestService,new g.SyncDescriptor(_.RequestService)),p.set(y.IExtensionManagementService,new g.SyncDescriptor(b.ExtensionManagementService)),p.set(y.IExtensionGalleryService,new g.SyncDescriptor(E.ExtensionGalleryService)),p.set(A.IDialogService,new g.SyncDescriptor(F.CommandLineDialogService));var h=[];if(l&&!c&&!n.args["disable-telemetry"]&&o.default.enableTelemetry){o.default.aiConfig&&o.default.aiConfig.asimovKey&&h.push(new I.AppInsightsAppender(G,null,o.default.aiConfig.asimovKey,r));var m={appender:x.combinedAppender.apply(void 0,h),commonProperties:P.resolveCommonProperties(o.default.commit,u.default.version,a.getItem("telemetry.machineId"),f),piiPaths:[t,s]};p.set(S.ITelemetryService,new g.SyncDescriptor(C.TelemetryService,m))}else p.set(S.ITelemetryService,x.NullTelemetryService);return i.createChild(p).createInstance(W).run(e).then(function(){return x.combinedAppender.apply(void 0,h).dispose()})})})}})
}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/5944e81f3c46a3938a82c701f96d7a59b074cfdc/core/vs/code/node/cliProcessMain.js.map
