%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : www.kowitt.ac.th / Your IP : 216.73.216.118 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/Microsoft VS Code/resources/app/out/vs/code/electron-main/ |
Upload File : |
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ (function(){ var e=["require","exports","vs/base/common/winjs.base","vs/base/common/platform","vs/platform/instantiation/common/instantiation","vs/base/common/event","vs/platform/log/common/log","vs/nls!vs/code/electron-main/main","vs/nls","path","electron","vs/platform/environment/common/environment","vs/base/common/uri","vs/base/common/lifecycle","vs/platform/configuration/common/configuration","vs/base/common/objects","vs/platform/node/product","vs/base/common/strings","vs/base/common/paths","vs/platform/workspaces/common/workspaces","vs/base/common/types","vs/base/common/arrays","vs/platform/windows/electron-main/windows","vs/platform/windows/common/windows","vs/base/common/async","vs/base/common/errors","os","fs","vs/platform/update/common/update","vs/base/common/labels","vs/platform/telemetry/common/telemetry","vs/platform/lifecycle/electron-main/lifecycleMain","vs/platform/state/common/state","vs/platform/registry/common/platform","vs/base/node/extfs","vs/base/node/pfs","vs/base/common/network","vs/platform/request/node/request","vs/platform/history/common/history","vs/base/common/map","vs/base/common/json","vs/platform/configuration/common/configurationRegistry","vs/base/common/uuid","vs/base/parts/ipc/common/ipc","vs/base/node/request","vs/platform/node/package","vs/platform/url/common/url","vs/platform/files/common/files","vs/base/common/decorators","child_process","vs/base/parts/ipc/node/ipc.net","vs/platform/instantiation/common/descriptors","vs/code/electron-main/launch","vs/platform/update/electron-main/abstractUpdateService","vs/platform/instantiation/common/serviceCollection","vs/base/common/functional","original-fs","vs/base/common/resources","vs/base/common/keyCodes","vs/platform/environment/node/argv","vs/platform/backup/common/backup","vs/code/electron-main/keyboard","crypto","vs/base/node/config","vs/base/common/normalization","vs/code/electron-main/window","vs/platform/configuration/common/configurationModels","vs/code/electron-main/diagnostics","vs/base/common/assert","vs/platform/extensionManagement/common/extensionManagement","vs/base/common/jsonFormatter","vs/workbench/services/keybinding/common/scanCode","vs/base/node/id","vs/code/node/paths","vs/platform/configuration/node/configurationService","vs/nls!vs/code/electron-main/window","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/dialogs/node/dialogService","vs/nls!vs/platform/environment/node/argv","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/node/extensionGalleryService","vs/nls!vs/platform/extensions/node/extensionValidator","vs/nls!vs/platform/history/electron-main/historyMainService","vs/nls!vs/platform/issue/electron-main/issueService","vs/nls!vs/platform/request/node/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/update/node/update.config.contribution","vs/nls!vs/platform/windows/electron-main/windowsService","vs/nls!vs/platform/workspaces/common/workspaces","vs/platform/dialogs/node/dialogService","vs/code/electron-main/app","vs/nls!vs/code/electron-main/menus","vs/nls!vs/code/electron-main/menubar","vs/nls!vs/code/electron-main/logUploader","vs/platform/contextkey/common/contextkey","vs/platform/dialogs/common/dialogs","vs/platform/driver/common/driver","vs/nls!vs/code/electron-main/auth","vs/base/common/severity","vs/platform/extensionManagement/common/extensionManagementUtil","vs/nls!vs/base/common/severity","vs/base/common/keybindingLabels","vs/nls!vs/base/common/keybindingLabels","vs/platform/instantiation/common/instantiationService","vs/platform/issue/common/issue","vs/platform/issue/common/issueIpc","vs/platform/keybinding/common/keybinding","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/lifecycle/common/lifecycle","vs/code/node/shellEnv","vs/platform/log/common/bufferLog","vs/platform/log/common/logIpc","vs/platform/log/node/spdlogService","vs/platform/menubar/common/menubar","vs/platform/menubar/common/menubarIpc","vs/code/electron-main/sharedProcess","vs/platform/extensions/node/extensionValidator","vs/platform/update/electron-main/updateService.win32","vs/base/parts/ipc/electron-main/ipc.electron-main","vs/code/electron-main/logUploader","vs/base/parts/ipc/common/ipc.electron","vs/platform/update/electron-main/updateService.linux","vs/platform/environment/node/environmentService","vs/platform/request/electron-main/requestService","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/request/node/requestService","vs/base/node/encoding","vs/base/node/stream","vs/platform/configuration/node/configuration","vs/nls!vs/code/electron-main/windows","vs/base/node/stats","vs/base/node/ps","vs/platform/state/node/stateService","url","vs/base/node/proxy","vs/platform/telemetry/common/telemetryIpc","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryUtils","vs/platform/telemetry/node/commonProperties","vs/base/node/paths","vs/platform/update/common/updateIpc","vs/platform/update/node/update.config.contribution","vs/code/electron-main/contributions","assert","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/base/node/flow","vs/base/node/crypto","vs/base/common/mime","vs/platform/update/electron-main/updateService.darwin","vs/platform/windows/common/windowsIpc","vs/base/common/glob","vs/code/electron-main/auth","vs/base/common/cancellation","vs/code/electron-main/windows","vs/platform/url/electron-main/electronUrlListener","vs/platform/windows/electron-main/windowsService","vs/base/common/graph","vs/base/common/date","vs/code/electron-main/menubar","vs/code/electron-main/menus","vs/code/node/windowsFinder","vs/platform/backup/electron-main/backupMainService","vs/platform/history/electron-main/historyMainService","vs/platform/issue/electron-main/issueService","vs/platform/menubar/electron-main/menubarService","vs/platform/workspace/common/workspace","vs/platform/workspaces/common/workspacesIpc","vs/platform/workspaces/node/workspaces","vs/platform/workspaces/electron-main/workspacesMainService","vs/base/common/linkedList","vs/workbench/services/keybinding/common/keybindingIO","vs/platform/driver/electron-main/driver","vs/base/common/jsonEdit","vs/base/common/collections","vs/platform/extensionManagement/node/extensionGalleryService","zlib","vs/base/common/performance","native-keymap","iconv-lite","stream","minimist","net","readline","vs/code/electron-main/main"],t=function(t){ for(var n=[],r=0,i=t.length;r<i;r++)n[r]=e[t[r]];return n};define(e[68],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[175],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[48],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=r?r():void 0;return function(){for(var i=this,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];clearTimeout(this[o]), t&&(a=t.apply(void 0,[a].concat(s)),s=[a]),this[o]=setTimeout(function(){n.apply(i,s),a=r?r():void 0},e)}})}}),define(e[55],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}}),define(e[40],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(d="",h=c.None,p=s,s>=l)return p=l,f=u.EOF;var t=e.charCodeAt(s);if(r(t)){do{s++,d+=String.fromCharCode(t),t=e.charCodeAt(s)}while(r(t));return f=u.Trivia}if(i(t))return s++,d+=String.fromCharCode(t),13===t&&10===e.charCodeAt(s)&&(s++,d+="\n"),f=u.LineBreakTrivia;switch(t){case 123:return s++,f=u.OpenBraceToken;case 125:return s++,f=u.CloseBraceToken;case 91:return s++,f=u.OpenBracketToken;case 93:return s++, f=u.CloseBracketToken;case 58:return s++,f=u.ColonToken;case 44:return s++,f=u.CommaToken;case 34:return s++,d=function(){for(var t="",r=s;;){if(s>=l){t+=e.substring(r,s),h=c.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),h=c.UnexpectedEndOfString;break}h=c.InvalidCharacter}s++}else{if(t+=e.substring(r,s),++s>=l){h=c.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):h=c.InvalidUnicode;break;default:h=c.InvalidEscapeCharacter}r=s}}return t}(),f=u.StringLiteral;case 47:var a=s-1;if(47===e.charCodeAt(s+1)){for(s+=2;s<l&&!i(e.charCodeAt(s));)s++;return d=e.substring(a,s),f=u.LineCommentTrivia}if(42===e.charCodeAt(s+1)){s+=2;for(var v=l-1,g=!1;s<v;){ if(42===e.charCodeAt(s)&&47===e.charCodeAt(s+1)){s+=2,g=!0;break}s++}return g||(s++,h=c.UnexpectedEndOfComment),d=e.substring(a,s),f=u.BlockCommentTrivia}return d+=String.fromCharCode(t),s++,f=u.Unknown;case 45:if(d+=String.fromCharCode(t),++s===l||!o(e.charCodeAt(s)))return f=u.Unknown;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return d+=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 h=c.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 h=c.UnexpectedEndOfNumber;return e.substring(t,n)}(),f=u.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(d=e.substring(p,s)){case"true":return f=u.TrueKeyword;case"false":return f=u.FalseKeyword;case"null":return f=u.NullKeyword}return f=u.Unknown}return d+=String.fromCharCode(t),s++,f=u.Unknown}}void 0===t&&(t=!1);var s=0,l=e.length,d="",p=0,f=u.Unknown,h=c.None;return{setPosition:function(e){s=e,d="",p=0,f=u.Unknown,h=c.None},getPosition:function(){return s},scan:t?function(){var e;do{e=a()}while(e>=u.LineCommentTrivia&&e<=u.Trivia);return e}:a,getToken:function(){return f},getTokenValue:function(){return d},getTokenOffset:function(){return p},getTokenLength:function(){return s-p},getTokenError:function(){return h}}}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(f.getTokenOffset(),f.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,f.getTokenOffset(),f.getTokenLength())}:function(){return!0}}function a(){for(;;){var e=f.scan();switch(e){case u.LineCommentTrivia:case u.BlockCommentTrivia:_&&s(d.InvalidSymbol);break;case u.Unknown:s(d.InvalidSymbol);break;case u.Trivia:case u.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=f.getToken();r!==u.EOF;){if(-1!==t.indexOf(r)){a();break}if(-1!==n.indexOf(r))break;r=a()}}function c(e){var t=f.getTokenValue();return e?w(t):v(t),a(),!0}function l(){return f.getToken()!==u.StringLiteral?(s(d.PropertyNameExpected,[],[u.CloseBraceToken,u.CommaToken]),!1):(c(!1),f.getToken()===u.ColonToken?(b(":"),a(), p()||s(d.ValueExpected,[],[u.CloseBraceToken,u.CommaToken])):s(d.ColonExpected,[],[u.CloseBraceToken,u.CommaToken]),!0)}function p(){switch(f.getToken()){case u.OpenBracketToken:return function(){m(),a();for(var e=!1;f.getToken()!==u.CloseBracketToken&&f.getToken()!==u.EOF;){if(f.getToken()===u.CommaToken){if(e||s(d.ValueExpected,[],[]),b(","),a(),f.getToken()===u.CloseBracketToken&&!C)break}else e&&s(d.CommaExpected,[],[]);p()||s(d.ValueExpected,[],[u.CloseBracketToken,u.CommaToken]),e=!0}return y(),f.getToken()!==u.CloseBracketToken?s(d.CloseBracketExpected,[u.CloseBracketToken],[]):a(),!0}();case u.OpenBraceToken:return function(){h(),a();for(var e=!1;f.getToken()!==u.CloseBraceToken&&f.getToken()!==u.EOF;){if(f.getToken()===u.CommaToken){if(e||s(d.ValueExpected,[],[]),b(","),a(),f.getToken()===u.CloseBraceToken&&!C)break}else e&&s(d.CommaExpected,[],[]);l()||s(d.ValueExpected,[],[u.CloseBraceToken,u.CommaToken]),e=!0}return g(), f.getToken()!==u.CloseBraceToken?s(d.CloseBraceExpected,[u.CloseBraceToken],[]):a(),!0}();case u.StringLiteral:return c(!0);default:return function(){switch(f.getToken()){case u.NumericLiteral:var e=0;try{"number"!=typeof(e=JSON.parse(f.getTokenValue()))&&(s(d.InvalidNumberFormat),e=0)}catch(e){s(d.InvalidNumberFormat)}w(e);break;case u.NullKeyword:w(null);break;case u.TrueKeyword:w(!0);break;case u.FalseKeyword:w(!1);break;default:return!1}return a(),!0}()}}var f=n(e,!1),h=i(t.onObjectBegin),v=o(t.onObjectProperty),g=i(t.onObjectEnd),m=i(t.onArrayBegin),y=i(t.onArrayEnd),w=o(t.onLiteralValue),b=o(t.onSeparator),S=o(t.onError),_=r&&r.disallowComments,C=r&&r.disallowTrailingComma;return a(),f.getToken()===u.EOF||(p()?(f.getToken()!==u.EOF&&s(d.EndOfFileExpected,[],[]),!0):(s(d.ValueExpected,[],[]),!1))}Object.defineProperty(t,"__esModule",{value:!0});var c;!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"}(c=t.ScanError||(t.ScanError={}));var u;!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"}(u=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 d;!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"}(d=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,c=n.children;s<c.length;s++){var u=c[s];if(u.children[0].value===o){n=u.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[70],t([0,1,40]),function(e,t,n){"use strict";function r(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function i(e,t,r){function i(){return h+o(f,c+g)}function a(){var e=m.scan();for(v=!1;e===n.SyntaxKind.Trivia||e===n.SyntaxKind.LineBreakTrivia;)v=v||e===n.SyntaxKind.LineBreakTrivia,e=m.scan();return e}function s(t,n,r){e.substring(n,r)!==t&&y.push({offset:n,length:r-n,content:t})}var c,u,l,d;if(t){for(d=(l=t.offset)+t.length;l>0&&!function(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}(e,l-1);)l--;var p=n.createScanner(e,!0);p.setPosition(d),p.scan(),d=p.getPosition(),u=e.substring(l,d),c=function(e,t,n){var r=0,i=0,o=n.tabSize||4;for(;r<e.length;){var a=e.charAt(r);if(" "===a)i++;else{if("\t"!==a)break;i+=o}r++}return Math.floor(i/o)}(u,0,r)}else u=e,l=0,d=e.length,c=0;var f,h=function(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}(r,e),v=!1,g=0 ;f=r.insertSpaces?o(" ",r.tabSize):"\t";var m=n.createScanner(u,!1),y=[],w=a();if(w!==n.SyntaxKind.EOF){var b=m.getTokenOffset()+l;s(o(f,c),l,b)}for(;w!==n.SyntaxKind.EOF;){for(var S=m.getTokenOffset()+m.getTokenLength()+l,_=a(),C="";!v&&(_===n.SyntaxKind.LineCommentTrivia||_===n.SyntaxKind.BlockCommentTrivia);){s(" ",S,m.getTokenOffset()+l),S=m.getTokenOffset()+m.getTokenLength()+l,C=_===n.SyntaxKind.LineCommentTrivia?i():"",_=a()}if(_===n.SyntaxKind.CloseBraceToken)w!==n.SyntaxKind.OpenBraceToken&&(g--,C=i());else if(_===n.SyntaxKind.CloseBracketToken)w!==n.SyntaxKind.OpenBracketToken&&(g--,C=i());else if(_!==n.SyntaxKind.EOF){switch(w){case n.SyntaxKind.OpenBracketToken:case n.SyntaxKind.OpenBraceToken:g++,C=i();break;case n.SyntaxKind.CommaToken:case n.SyntaxKind.LineCommentTrivia:C=i();break;case n.SyntaxKind.BlockCommentTrivia:C=v?i():" ";break;case n.SyntaxKind.ColonToken:C=" ";break;case n.SyntaxKind.NullKeyword:case n.SyntaxKind.TrueKeyword:case n.SyntaxKind.FalseKeyword: case n.SyntaxKind.NumericLiteral:_!==n.SyntaxKind.NullKeyword&&_!==n.SyntaxKind.FalseKeyword&&_!==n.SyntaxKind.NumericLiteral||(C=" ")}!v||_!==n.SyntaxKind.LineCommentTrivia&&_!==n.SyntaxKind.BlockCommentTrivia||(C=i())}s(C,S,m.getTokenOffset()+l),w=_}return y}function o(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}Object.defineProperty(t,"__esModule",{value:!0}),t.applyEdit=r,t.applyEdits=function(e,t){for(var n=t.length-1;n>=0;n--)e=r(e,t[n]);return e},t.format=i}),define(e[174],t([0,1,40,70]),function(e,t,n,r){"use strict";function i(e,t,r,i,a){for(var s,c=n.parseTree(e,[]),u=void 0,l=void 0;t.length>0&&(l=t.pop(),void 0===(u=n.findNodeAtLocation(c,t))&&void 0!==r);)"string"==typeof l?((s={})[l]=r,r=s):r=[r];if(u){if("object"===u.type&&"string"==typeof l){var d=n.findNodeAtLocation(u,[l]);if(void 0!==d){if(void 0===r){var p=u.children.indexOf(d.parent),f=void 0,h=d.parent.offset+d.parent.length;if(p>0){f=(b=u.children[p-1]).offset+b.length}else if(f=u.offset+1,u.children.length>1){h=u.children[1].offset} return o(e,{offset:f,length:h-f,content:""},i)}return o(e,{offset:d.offset,length:d.length,content:JSON.stringify(r)},i)}if(void 0===r)return[];var v=JSON.stringify(l)+": "+JSON.stringify(r),g=a?a(u.children.map(function(e){return e.children[0].value})):u.children.length,m=void 0;if(g>0){m={offset:(b=u.children[g-1]).offset+b.length,length:0,content:","+v}}else m=0===u.children.length?{offset:u.offset+1,length:0,content:v}:{offset:u.offset+1,length:0,content:v+","};return o(e,m,i)}if("array"===u.type&&"number"==typeof l){if(-1===l){var v=""+JSON.stringify(r),m=void 0;if(0===u.children.length)m={offset:u.offset+1,length:0,content:v};else{m={offset:(b=u.children[u.children.length-1]).offset+b.length,length:0,content:","+v}}return o(e,m,i)}if(void 0===r&&u.children.length>=0){var y=l,w=u.children[y],m=void 0;if(1===u.children.length)m={offset:u.offset+1,length:u.length-2,content:""};else if(u.children.length-1===y){var b=u.children[y-1],S=b.offset+b.length;m={offset:S,length:u.offset+u.length-2-S,content:""} }else m={offset:w.offset,length:u.children[y+1].offset-w.offset,content:""};return o(e,m,i)}throw new Error("Array modification not supported yet")}throw new Error("Can not add "+("number"!=typeof l?"index":"property")+" to parent of type "+u.type)}if(void 0===r)throw new Error("Can not delete in empty document");return o(e,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(r)},i)}function o(e,t,n){for(var i=r.applyEdit(e,t),o=t.offset,a=t.offset+t.content.length,s=r.format(i,{offset:o,length:a-o},n),c=s.length-1;c>=0;c--){var u=s[c];i=r.applyEdit(i,u),o=Math.min(o,u.offset),a=Math.max(a,u.offset+u.length),a+=u.content.length-u.length}return[{offset:o,length:e.length-(i.length-a)-o,content:i.substring(o,a)}]}Object.defineProperty(t,"__esModule",{value:!0}),t.removeProperty=function(e,t,n){return i(e,t,void 0,n)},t.setProperty=i}),define(e[58],t([0,1]),function(e,t){"use strict";function n(e,t){var n=!!(2048&e),r=!!(256&e);return new c(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)} Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J", e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK", e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(t.KeyCode||(t.KeyCode={}));var r=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)} return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),i=new r,o=new r,a=new r;!function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),i.define(e,t),o.define(e,n),a.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"), e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}();!function(e){ e.toString=function(e){return i.keyCodeToStr(e)},e.fromString=function(e){return i.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return o.strToKeyCode(e)||a.strToKeyCode(e)}}(t.KeyCodeUtils||(t.KeyCodeUtils={}));var s;!function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl",e[e.KeyCode=255]="KeyCode"}(s||(s={}));!function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl"}(t.KeyMod||(t.KeyMod={})),t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;var r=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new u(n(r,t),n(i,t)):n(r,t)},t.createSimpleKeybinding=n;!function(e){e[e.Simple=1]="Simple",e[e.Chord=2]="Chord"}(t.KeybindingType||(t.KeybindingType={}));var c=function(){function e(e,t,n,r,i){this.type=1,this.ctrlKey=e, this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.getHashCode=function(){return""+(this.ctrlKey?"1":"0")+(this.shiftKey?"1":"0")+(this.altKey?"1":"0")+(this.metaKey?"1":"0")+this.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}();t.SimpleKeybinding=c;var u=function(){function e(e,t){this.type=2,this.firstPart=e,this.chordPart=t}return e.prototype.getHashCode=function(){return this.firstPart.getHashCode()+";"+this.chordPart.getHashCode()},e}();t.ChordKeybinding=u;var l=function(){return function(e,t,n,r,i,o){this.ctrlKey=e, this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=i,this.keyAriaLabel=o}}();t.ResolvedKeybindingPart=l;var d=function(){return function(){}}();t.ResolvedKeybinding=d}),define(e[13],t([0,1,55]),function(e,t,n){"use strict";function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Array.isArray(e)?(e.forEach(function(e){return e&&e.dispose()}),[]):0!==t.length?(r(e),r(t),[]):e?(e.dispose(),e):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.empty=Object.freeze({dispose:function(){}}),t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=r,t.combinedDisposable=function(e){return{dispose:function(){return r(e)}}},t.toDisposable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{dispose:function(){for(var t=0,n=e;t<n.length;t++)(0,n[t])()}}};var i=function(){function e(){this._toDispose=[]}return e.prototype.dispose=function(){this._toDispose=r(this._toDispose)},e.prototype._register=function(e){ return this._toDispose.push(e),e},e}();t.Disposable=i;var o=function(){function e(){this.references=Object.create(null)}return e.prototype.acquire=function(e){var t=this,r=this.references[e];r||(r=this.references[e]={counter:0,object:this.createReferencedObject(e)});var i=r.object,o=n.once(function(){0==--r.counter&&(t.destroyReferencedObject(r.object),delete t.references[e])});return r.counter++,{object:i,dispose:o}},e}();t.ReferenceCollection=o;var a=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=a}),define(e[171],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){this.element=e}}(),r=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.clear=function(){this._first=void 0,this._last=void 0},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){ var r=this,i=new n(e);if(this._first)if(t){var o=this._last;this._last=i,i.prev=o,o.next=i}else{var a=this._first;this._first=i,i.next=a,a.prev=i}else this._first=i,this._last=i;return function(){for(var e=r._first;e instanceof n;e=e.next)if(e===i){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(r._first=r._first.next,r._first.prev=void 0):(r._last=r._last.prev,r._last.next=void 0):(r._first=void 0,r._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e.prototype.toArray=function(){for(var e=[],t=this._first;t instanceof n;t=t.next)e.push(t.element);return e},e}();t.LinkedList=r}),define(e[36],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough", e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data"}(t.Schemas||(t.Schemas={}))}),"function"!=typeof define&&"object"==typeof module&&"object"==typeof module.exports&&(global.define=function(e,t){module.exports=t(),global.define=void 0}),define("vs/base/common/performance",[],function(){function e(e){const t=global._performanceEntries;for(let n=t.length-1;n>=0;n-=4)if(t[n-2]===e)return t[n-1];throw new Error(e+" not found")}var t=this;"undefined"!=typeof global&&(t=global),t._performanceEntries=t._performanceEntries||[];const n=Date.now;return{mark:function(e){global._performanceEntries.push("mark",e,n(),0),"function"==typeof console.timeStamp&&console.timeStamp(e)},measure:function(t,r,i){let o,a,s=n();o=r?e(r):s,a=i?e(i)-o:s-o,global._performanceEntries.push("measure",t,o,a)},getEntries:function(e,t){const n=[],r=global._performanceEntries;for(let i=0;i<r.length;i+=4)r[i]!==e||void 0!==t&&r[i+1]!==t||n.push({type:r[i], name:r[i+1],startTime:r[i+2],duration:r[i+3]});return n.sort((e,t)=>e.startTime-t.startTime)},getEntry:function(e,t){const n=global._performanceEntries;for(let r=0;r<n.length;r+=4)if(n[r]===e&&n[r+1]===t)return{type:n[r],name:n[r+1],startTime:n[r+2],duration:n[r+3]}},getDuration:function(e,t){const n=global._performanceEntries;let r=e,i=0;for(let o=0;o<n.length;o+=4)if(n[o+1]===r){if(r!==e)return n[o+2]-i;r=t,i=n[o+2]}return 0},importEntries:function(e){global._performanceEntries.splice(0,0,...e)},exportEntries:function(){return global._performanceEntries.slice(0)}}}),define(e[3],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,r=!1,i=!1,o=!1,a=!1,s=void 0,c=void 0,u=void 0;if(t.LANGUAGE_DEFAULT="en","object"==typeof process&&"function"==typeof process.nextTick&&"string"==typeof process.platform){n="win32"===process.platform,r="darwin"===process.platform,i="linux"===process.platform,s=t.LANGUAGE_DEFAULT,c=t.LANGUAGE_DEFAULT;var l=process.env.VSCODE_NLS_CONFIG ;if(l)try{var d=JSON.parse(l),p=d.availableLanguages["*"];s=d.locale,c=p||t.LANGUAGE_DEFAULT,u=d._translationsConfigFile}catch(e){}o=!0}else if("object"==typeof navigator){var f=navigator.userAgent;n=f.indexOf("Windows")>=0,r=f.indexOf("Macintosh")>=0,i=f.indexOf("Linux")>=0,a=!0,c=s=navigator.language}var h;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(h=t.Platform||(t.Platform={}));var v=h.Web;o&&(r?v=h.Mac:n?v=h.Windows:i&&(v=h.Linux)),t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isNative=o,t.isWeb=a,t.platform=v,t.isRootUser=function(){return o&&!n&&0===process.getuid()},t.language=c,t.locale=s,t.translationsConfigFile=u;var g="object"==typeof self?self:"object"==typeof global?global:{};t.globals=g;var m=null;t.setImmediate=function(e){return null===m&&(m=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),m(e)} ;!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=r?2:n?1:3;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={}))}),define(e[17],t([0,1]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function r(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function i(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;;){if(-1===(o=e.lastIndexOf(t,i-1))||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function o(e,t){return e<t?-1:e>t?1:0}function a(e){return e>=97&&e<=122}function s(e){return e>=65&&e<=90}function c(e){return a(e)||s(e)}function u(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;r<n;r++){ var i=e.charCodeAt(r),o=t.charCodeAt(r);if(i!==o)if(c(i)&&c(o)){var a=Math.abs(i-o);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function l(e,t,n,r,i,o){for(;t<n&&i<o;){if(e[t]!==r[i])return!1;t+=1,i+=1}return!0}function d(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function p(e){return e&&e.length>0&&65279===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;o<t;o++)i.push(n);return i.reverse().join("")};var f=/{(\d+)}/g;t.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(f,function(e,n){var r=parseInt(n,10);return isNaN(r)||r<0||r>=t.length?e:t[r]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">": return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),i(r(e,t),t)},t.ltrim=r,t.rtrim=i,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=function(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0},t.endsWith=function(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),r.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return r.global&&(i+="g"),r.matchCase||(i+="i"),r.multiline&&(i+="m"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){ return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex},t.regExpContainsBackreference=function(e){return!!e.match(/([^\\]|^)(\\\\)*\\\d+/)},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t<n;t++){var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1},t.getLeadingWhitespace=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(32!==i&&9!==i)return e.substring(t,r)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1},t.compare=o,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.charCodeAt(r),c=t.charCodeAt(r);if(i!==c){s(i)&&(i+=32),s(c)&&(c+=32);var u=i-c;if(0!==u)return a(i)&&a(c)?u:o(e.toLowerCase(),t.toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=a,t.isUpperAsciiLetter=s, t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&u(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&u(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return r},t.commonSuffixLength=function(e,t){var n,r=Math.min(e.length,t.length),i=e.length-1,o=t.length-1;for(n=0;n<r;n++)if(e.charCodeAt(i-n)!==t.charCodeAt(o-n))return n;return r},t.overlap=function(e,t){var n=e.length,r=t.length,i=n-r;if(0===i)return e===t?n:0;for(i<0&&(r+=i,i=0);i<n&&r>0;){if(l(e,i,n,t,0,r))return r;r-=1,i+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343} ;var h=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return h.test(e)};var v=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return v.test(e)};var g=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return g.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t<n;t++)if(d(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=d,t.lcut=function(e,n){if(e.length<n)return e ;for(var r=/\b/g,i=0;r.test(e)&&!(e.length-r.lastIndex<n);)i=r.lastIndex,r.lastIndex+=1;return e.substring(i).replace(/^\s/,t.empty)};var m=/\x1B\x5B[12]?K/g,y=/\x1b\[\d+m/g,w=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(m,"")).replace(y,"")).replace(w,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=p,t.stripUTF8BOM=function(e){return p(e)?e.substr(1):e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length<t.length)return!1;for(var n=t.length,r=e.toLowerCase(),i=0,o=-1;i<n;){var a=r.indexOf(t[i],o+1);if(a<0)return!1;o=a,i++}return!0},t.containsUppercaseCharacter=function(e,t){return void 0===t&&(t=!1),!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}}),define(e[159],t([0,1,17]),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[18],t([0,1,3,17]),function(e,t,n,r){"use strict";function i(e){var r=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===r)return".";if(0==~r)return e[0];if(~r==e.length-1)return i(e.substring(0,e.length-1));var o=e.substring(0,~r);return n.isWindows&&":"===o[o.length-1]&&(o+=t.nativeSep),o}function o(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?o(e.substring(0,e.length-1)):e.substr(1+~t)}function a(e,t){if(null===e||void 0===e)return e;var r=e.length;if(0===r)return".";var i=n.isWindows&&t;if(function(e,t){return t?!p.test(e):!d.test(e)}(e,i))return e;for(var o=i?"\\":"/",a=c(e,o),u=a.length,l=!1,f="",h=a.length;h<=r;h++)if(h===r||47===e.charCodeAt(h)||92===e.charCodeAt(h)){if(s(e,u,h,"..")){var v=f.lastIndexOf(o),g=f.slice(v+1) ;(a||g.length>0)&&".."!==g&&(f=-1===v?"":f.slice(0,v),l=!0)}else s(e,u,h,".")&&(a||f||h<r-1)&&(l=!0);if(!l){var m=e.slice(u,h);""!==f&&f[f.length-1]!==o&&(f+=o),f+=m}u=h+1,l=!1}return a+f}function s(e,t,n,r){return t+r.length===n&&e.indexOf(r,t)===t}function c(e,t){if(void 0===t&&(t="/"),!e)return"";var n=e.length,r=e.charCodeAt(0);if(47===r||92===r){if((47===(r=e.charCodeAt(1))||92===r)&&47!==(r=e.charCodeAt(2))&&92!==r){for(var i=3,o=i;i<n&&(47!==(r=e.charCodeAt(i))&&92!==r);i++);if(r=e.charCodeAt(i+1),o!==i&&47!==r&&92!==r)for(i+=1;i<n;i++)if(47===(r=e.charCodeAt(i))||92===r)return e.slice(0,i+1).replace(/[\\/]/g,t)}return t}if((r>=65&&r<=90||r>=97&&r<=122)&&58===e.charCodeAt(1))return 47===(r=e.charCodeAt(2))||92===r?e.slice(0,2)+t:e.slice(0,2);var a=e.indexOf("://");if(-1!==a)for(a+=3;a<n;a++)if(47===(r=e.charCodeAt(a))||92===r)return e.slice(0,a+1);return""}function u(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){ var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}function l(e){return e&&47===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.dirname=i,t.basename=o,t.extname=function(e){var t=~(e=o(e)).lastIndexOf(".");return t?e.substring(~t):""};var d=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,p=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;t.normalize=a,t.getRoot=c,t.join=function(){for(var e="",n=0;n<arguments.length;n++){var r=arguments[n];if(n>0){var i=e.charCodeAt(e.length-1);if(47!==i&&92!==i){var o=r.charCodeAt(0);47!==o&&92!==o&&(e+=t.sep)}}e+=r}return a(e)},t.isUNC=function(e){if(!n.isWindows)return!1;if(!e||e.length<5)return!1;var t=e.charCodeAt(0);if(92!==t)return!1;if(92!==(t=e.charCodeAt(1)))return!1;for(var r=2,i=r;r<e.length&&92!==(t=e.charCodeAt(r));r++);return i!==r&&(t=e.charCodeAt(r+1),!isNaN(t)&&92!==t)};var f=n.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,h=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i ;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(f.lastIndex=0,f.test(e)||n.isWindows&&h.test(e)||"."===e||".."===e||n.isWindows&&"."===e[e.length-1]||n.isWindows&&e.length!==e.trim().length))},t.isEqual=function(e,t,n){var i=e===t;return!n||i?i:!(!e||!t)&&r.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,n,i){if(e===n)return!0;if(!e||!n)return!1;if(n.length>e.length)return!1;if(i){if(!r.startsWithIgnoreCase(e,n))return!1;if(n.length===e.length)return!0;var o=n.length;return n.charAt(n.length-1)===t.nativeSep&&o--,e.charAt(o)===t.nativeSep}return n.charAt(n.length-1)!==t.nativeSep&&(n+=t.nativeSep),0===e.indexOf(n)},t.isAbsolute=function(e){return n.isWindows?u(e):l(e)},t.isAbsolute_win32=u,t.isAbsolute_posix=l}),define(e[57],t([0,1,18,17]),function(e,t,n,r){"use strict";function i(e,t,r){return e.scheme===t.scheme&&e.authority===t.authority&&("file"===e.scheme?n.isEqualOrParent(e.fsPath,t.fsPath,r):n.isEqualOrParent(e.path,t.path,r))}Object.defineProperty(t,"__esModule",{ value:!0}),t.basenameOrAuthority=function(e){return n.basename(e.path)||e.authority},t.isEqualOrParent=i,t.isEqual=function(e,t,n){return!(e!==t)||!(!e||!t)&&(n?r.equalsIgnoreCase(e.toString(),t.toString()):e.toString()===t.toString())},t.dirname=function(e){var t=n.dirname(e.path);return e.authority&&t&&!n.isAbsolute(t)?null:e.with({path:t})},t.joinPath=function(e,t){var r=n.join(e.path||"/",t);return e.with({path:r})},t.distinctParents=function(e,t){for(var n=[],r=function(r){var o=t(e[r]);if(e.some(function(e,n){return n!==r&&i(o,t(e))}))return"continue";n.push(e[r])},o=0;o<e.length;o++)r(o);return n}}),define(e[20],t([0,1]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==u.number||e.constructor!==Array)}function r(e){return typeof e===u.string||e instanceof String}function i(e){return!(typeof e!==u.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===u.undefined}function a(e){return o(e)||null===e }function s(e){return typeof e===u.function}function c(e,t){if(r(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(s(t)){if(e instanceof t)return;if(!a(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var u={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=r,t.isStringArray=function(e){return n(e)&&e.every(function(e){return r(e)})},t.isObject=i,t.isNumber=function(e){return(typeof e===u.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=a;var l=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!i(e))return!1;for(var t in e)if(l.call(e,t))return!1;return!0},t.isFunction=s, t.areFunctions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&e.length>0&&e.every(s)},t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)c(e[r],t[r])},t.validateConstraint=c,t.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Object.create(e.prototype);return e.apply(r,t),r}}),define(e[158],t([0,1,20,175]),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[15],t([0,1,20]),function(e,t,n){ "use strict";function r(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=r(e[n]):t[n]=e[n]}),t}function i(e,t,r){if(n.isUndefinedOrNull(e))return e;var o=t(e);if(void 0!==o)return o;if(n.isArray(e)){for(var a=[],s=0;s<e.length;s++)a.push(i(e[s],t,r));return a}if(n.isObject(e)){if(r.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");r.push(e);var u={};for(var l in e)c.call(e,l)&&(u[l]=i(e[l],t,r));return r.pop(),u}return e}function o(e,t,r){return void 0===r&&(r=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(i){i in e?r&&(n.isObject(e[i])&&n.isObject(t[i])?o(e[i],t[i],r):e[i]=t[i]):e[i]=t[i]}),e):t}function a(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){ if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!a(e[n],t[n]))return!1}else{var i=[];for(r in e)i.push(r);i.sort();var o=[];for(r in t)o.push(r);if(o.sort(),!a(i,o))return!1;for(n=0;n<i.length;n++)if(!a(e[i[n]],t[i[n]]))return!1}return!0}function s(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=r,t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var n=t.shift();Object.freeze(n);for(var r in n)if(c.call(n,r)){var i=n[r];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e};var c=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return i(e,t,[])},t.mixin=o,t.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e},t.equals=a,t.arrayToHash=s,t.createKeywordMatcher=function(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=s(e) ;return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}},t.safeStringify=function(e){var t=[];return JSON.stringify(e,function(e,r){if(n.isObject(r)||Array.isArray(r)){if(-1!==t.indexOf(r))return"[Circular]";t.push(r)}return r})},t.getOrDefault=function(e,t,n){void 0===n&&(n=null);var r=t(e);return void 0===r?n:r},t.distinct=function(e,t){var n=Object.create(null);return e&&t?(Object.keys(t).forEach(function(r){var i=e[r],o=t[r];a(i,o)||(n[r]=o)}),n):n}});var n=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[12],t([0,1,3]),function(e,t,r){"use strict";function i(e,t){for(var n=void 0,r=-1,i=0;i<e.length;i++){var o=e.charCodeAt(i) ;if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var a=g[o];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=a):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function o(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,r.isWindows&&(t=t.replace(/\//g,"\\")),t}function a(e,t){var n=t?function(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}:i,r="",o=e.scheme,a=e.authority,s=e.path,c=e.query,u=e.fragment;if(o&&(r+=o,r+=":"), (a||"file"===o)&&(r+=p,r+=p),a){var l=a.indexOf("@");if(-1!==l){var d=a.substr(0,l);a=a.substr(l+1),-1===(l=d.indexOf(":"))?r+=n(d,!1):(r+=n(d.substr(0,l),!1),r+=":",r+=n(d.substr(l+1),!1)),r+="@"}-1===(l=(a=a.toLowerCase()).indexOf(":"))?r+=n(a,!1):(r+=n(a.substr(0,l),!1),r+=a.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){(f=s.charCodeAt(1))>=65&&f<=90&&(s="/"+String.fromCharCode(f+32)+":"+s.substr(3))}else if(s.length>=2&&58===s.charCodeAt(1)){var f=s.charCodeAt(0);f>=65&&f<=90&&(s=String.fromCharCode(f+32)+":"+s.substr(2))}r+=n(s,!0)}return c&&(r+="?",r+=n(c,!1)),u&&(r+="#",r+=t?u:i(u,!1)),r}Object.defineProperty(t,"__esModule",{value:!0});var s,c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//,d="",p="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,h=function(){function e(e,t,n,r,i){"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=e||d,this.authority=t||d, this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,n||d),this.query=r||d,this.fragment=i||d,function(e){if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return o(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this ;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===r?r=this.path:null===r&&(r=d),void 0===i?i=this.query:null===i&&(i=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new v(t,n,r,i,o)},e.parse=function(e){var t=f.exec(e);return t?new v(t[2]||d,decodeURIComponent(t[4]||d),decodeURIComponent(t[5]||d),decodeURIComponent(t[7]||d),decodeURIComponent(t[9]||d)):new v(d,d,d,d,d)},e.file=function(e){var t=d;if(r.isWindows&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){var n=e.indexOf(p,2);-1===n?(t=e.substring(2),e=p):(t=e.substring(2,n),e=e.substring(n)||p)}return new v("file",t,e,d,d)},e.from=function(e){return new v(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),a(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){ if(t instanceof e)return t;var n=new v(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t.default=h;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return n(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=o(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?a(this,!0):(this._formatted||(this._formatted=a(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(h),g=(s={},s[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28", s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s)}),define(e[29],t([0,1,12,18,17,36,3,57]),function(e,t,n,r,i,o,a,s){"use strict";function c(e){return a.isWindows&&e&&":"===e[1]}function u(e){return c(e)?e.charAt(0).toUpperCase()+e.slice(1):e}function l(e,t){if(a.isWindows||!e||!t)return e;var n=d.original===t?d.normalized:void 0;return n||(n=""+i.rtrim(t,r.sep)+r.sep,d={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,d){if(!e)return null;"string"==typeof e&&(e=n.default.file(e));var p=d?d.getWorkspaceFolder(e):null;if(p){var f=d.getWorkspace().folders.length>1,h=void 0;if(h=s.isEqual(p.uri,e,!a.isLinux)?"":r.normalize(i.ltrim(e.path.substr(p.uri.path.length),r.sep),!0),f){var v=p&&p.name?p.name:r.basename(p.uri.fsPath);h=h?v+" • "+h:v}return h}if(e.scheme!==o.Schemas.file&&e.scheme!==o.Schemas.untitled)return e.with({query:null, fragment:null}).toString(!0);if(c(e.fsPath))return r.normalize(u(e.fsPath),!0);var g=r.normalize(e.fsPath,!0);return!a.isWindows&&t&&(g=l(g,t.userHome)),g},t.getBaseLabel=function(e){if(!e)return null;"string"==typeof e&&(e=n.default.file(e));var t=r.basename(e.fsPath)||e.fsPath;return c(t)?u(t):t},t.normalizeDriveLetter=u;var d=Object.create(null);t.tildify=l,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,t+"$1")};var p="…",f="\\\\",h="~";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(f)?(s=a.substr(0,a.indexOf(f)+f.length),a=a.substr(a.indexOf(f)+f.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(h)&&(s=a.substr(0,a.indexOf(h)+h.length),a=a.substr(a.indexOf(h)+h.length));for(var c=a.split(r.nativeSep),u=1;n&&u<=c.length;u++)for(var l=c.length-u;n&&l>=0;l--){n=!1 ;for(var d=c.slice(l,l+u).join(r.nativeSep),v=0;!n&&v<e.length;v++)if(v!==o&&e[v]&&e[v].indexOf(d)>-1){var g=l+u===c.length,m=l>0&&e[v].indexOf(r.nativeSep)>-1?r.nativeSep+d:d,y=i.endsWith(e[v],m);n=!g||y}if(!n){var w="";(i.endsWith(c[0],":")||""!==s)&&(1===l&&(l=0,u++,d=c[0]+r.nativeSep+d),l>0&&(w=c[0]+r.nativeSep),w=s+w),l>0&&(w=w+p+r.nativeSep),w+=d,l+u<c.length&&(w=w+r.nativeSep+p),t[o]=w}}n&&(t[o]=a)}else t[o]=a;else t[o]="."+r.nativeSep}return t};var v;!function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(v||(v={})),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:v.TEXT}),o="",i=!0;else if("}"===n&&i){var s=t[o];if("string"==typeof s)s.length&&r.push({value:s,type:v.VARIABLE});else if(s){var c=r[r.length-1];c&&c.type===v.SEPARATOR||r.push({value:s.label,type:v.SEPARATOR})}o="",i=!1}else o+=n;return o&&!i&&r.push({value:o,type:v.TEXT}),r.filter(function(e,t){ return e.type!==v.SEPARATOR||[r[t-1],r[t+1]].every(function(e){return e&&(e.type===v.VARIABLE||e.type===v.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[39],t([0,1,12]),function(e,t,r){"use strict";function i(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}function o(e){var t=[];return e.forEach(function(e,n){return t.push(n)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=i,t.keys=o,t.getOrSet=function(e,t,n){var r=e.get(t);return void 0===r&&(r=n,e.set(t,r)),r};var a=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this}, e.prototype.hasNext=function(){return this._pos<this._value.length-1},e.prototype.cmp=function(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)},e.prototype.value=function(){return this._value[this._pos]},e}();t.StringIterator=a;var s=function(){function e(){}return e.prototype.reset=function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},e.prototype.hasNext=function(){return this._to<this._value.length},e.prototype.next=function(){this._from=this._to;for(var e=!0;this._to<this._value.length;this._to++){var t=this._value.charCodeAt(this._to);if(47===t||92===t){if(!e)break;this._from++}else e=!1}return this},e.prototype.cmp=function(e){for(var t=0,n=e.length,r=this._from;t<n&&r<this._to;){var i=e.charCodeAt(t)-this._value.charCodeAt(r);if(0!==i)return i;t+=1,r+=1}return n===this._to-this._from?0:t<n?-1:1},e.prototype.value=function(){return this._value.substring(this._from,this._to)},e}();t.PathIterator=s;var c=function(){function e(){} return e.prototype.isEmpty=function(){return!(this.left||this.mid||this.right||this.value)},e}(),u=function(){function e(e){this._iter=e}return e.forPaths=function(){return new e(new s)},e.forStrings=function(){return new e(new a)},e.prototype.clear=function(){this._root=void 0},e.prototype.set=function(e,t){var n,r=this._iter.reset(e);for(this._root||(this._root=new c,this._root.segment=r.value()),n=this._root;;){var i=r.cmp(n.segment);if(i>0)n.left||(n.left=new c,n.left.segment=r.value()),n=n.left;else if(i<0)n.right||(n.right=new c,n.right.segment=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new c,n.mid.segment=r.value()),n=n.mid}}var o=n.value;return n.value=t,n.key=e,o},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.delete=function(e){for(var t=this._iter.reset(e),n=[],r=this._root;r;){var i=t.cmp(r.segment) ;if(i>0)n.push([1,r]),r=r.left;else if(i<0)n.push([-1,r]),r=r.right;else{if(!t.hasNext()){for(r.value=void 0;n.length>0&&r.isEmpty();){var o=n.pop(),a=o[0],s=o[1];switch(a){case 1:s.left=void 0;break;case 0:s.mid=void 0;break;case-1:s.right=void 0}r=s}break}t.next(),n.push([0,r]),r=r.mid}}},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),r=this._root;r;){var i=n.cmp(r.segment);if(i>0)r=r.left;else if(i<0)r=r.right;else{if(!n.hasNext())break;n.next(),t=r.value||t,r=r.mid}}return r&&r.value||t},e.prototype.findSuperstr=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())return n.mid?this._nodeIterator(n.mid):void 0;t.next(),n=n.mid}}},e.prototype._nodeIterator=function(e){var t,n,r=this,i={done:!1,value:void 0};return{next:function(){return n||(n=[],t=0,r._forEach(e,function(e){return n.push(e)})),t>=n.length?(i.done=!0,i.value=void 0):(i.done=!1,i.value=n[t++]),i}}},e.prototype.forEach=function(e){ this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}();t.TernarySearchTree=u;var l=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.has=function(e){return this.map.has(this.toKey(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.delete=function(e){return this.map.delete(this.toKey(e))},e.prototype.forEach=function(e){this.map.forEach(e)},e.prototype.values=function(){return i(this.map)},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e.prototype.keys=function(){return o(this.map).map(r.default.parse)},e.prototype.clone=function(){var t=new e ;return this.map.forEach(function(e,n){return t.map.set(n,e)}),t},e}();t.ResourceMap=l;var d;!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(d=t.Touch||(t.Touch={}));var p=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e,t){void 0===t&&(t=d.None);var n=this._map.get(e);if(n)return t!==d.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=d.None);var r=this._map.get(e);if(r)r.value=t,n!==d.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case d.None:this.addItemLast(r);break;case d.AsOld:this.addItemFirst(r);break;case d.AsNew:default: this.addItemLast(r)}this._map.set(e,r),this._size++}},e.prototype.delete=function(e){return!!this.remove(e)},e.prototype.remove=function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){ if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===d.AsOld||t===d.AsNew)if(t===d.AsOld){if(e===this._head)return;var n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===d.AsNew){if(e===this._tail)return;var n=e.next,r=e.previous;e===this._head?(n.previous=void 0, this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),e},e.prototype.fromJSON=function(e){this.clear();for(var t=0,n=e;t<n.length;t++){var r=n[t],i=r[0],o=r[1];this.set(i,o)}},e}();t.LinkedMap=p;var f=function(e){function t(t,n){void 0===n&&(n=1);var r=e.call(this)||this;return r._limit=t,r._ratio=Math.min(Math.max(0,n),1),r}return n(t,e),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(e){this._limit=e,this.checkTrim()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ratio",{get:function(){return this._ratio},set:function(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return e.prototype.get.call(this,t,d.AsNew)},t.prototype.peek=function(t){return e.prototype.get.call(this,t,d.None)},t.prototype.set=function(t,n){ e.prototype.set.call(this,t,n,d.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(p);t.LRUCache=f}),define(e[64],t([0,1,39]),function(e,t,n){"use strict";function r(e,n,r){if(!t.canNormalize||!e)return e;var i=r.get(e);if(i)return i;var o;return o=a.test(e)?e.normalize(n):e,r.set(e,o),o}Object.defineProperty(t,"__esModule",{value:!0}),t.canNormalize="function"==typeof"".normalize;var i=new n.LRUCache(1e4);t.normalizeNFC=function(e){return r(e,"NFC",i)};var o=new n.LRUCache(1e4);t.normalizeNFD=function(e){return r(e,"NFD",o)};var a=/[^\u0000-\u0080]/}),define(e[42],t([0,1]),function(e,t){"use strict";function r(){return new a}function i(e){return s.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e}(),a=function(e){function t(){ return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return n(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(o);t.v4=r;var s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;t.isUUID=i,t.parse=function(e){if(!i(e))throw new Error("invalid uuid");return new o(e)},t.generateUuid=function(){return r().asHex()}});var r;!function(){ var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,r){var i={},o=!1,a=n.map(function(t){return"exports"===t?(o=!0,i):e[t]}),s=r.apply({},a);e[t]=o?i:s};t("WinJS/Core/_Global",[],function(){"use strict";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";var t=null;return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(n){null===t&&(t=e.setImmediate?e.setImmediate.bind(e):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):e.setTimeout.bind(e)),t(n)}}}),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,r){"use strict" ;function i(e,t,n){var r,i,o,a=Object.keys(t),s=Array.isArray(e);for(i=0,o=a.length;i<o;i++){var c=a[i],u=95!==c.charCodeAt(0),l=t[c];!l||"object"!=typeof l||void 0===l.value&&"function"!=typeof l.get&&"function"!=typeof l.set?u?s?e.forEach(function(e){e[c]=l}):e[c]=l:(r=r||{})[c]={value:l,enumerable:u,configurable:!0,writable:!0}:(void 0===l.enumerable&&(l.enumerable=u),n&&l.setName&&"function"==typeof l.setName&&l.setName(n+"."+c),(r=r||{})[c]=l)}r&&(s?e.forEach(function(e){Object.defineProperties(e,r)}):Object.defineProperties(e,r))}return function(){function n(n,r){var i=n||{};if(r){var o=r.split(".");i===t&&"WinJS"===o[0]&&(i=e,o.splice(0,1));for(var a=0,s=o.length;a<s;a++){var c=o[a];i[c]||Object.defineProperty(i,c,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[c]}}return i}function o(e,t,r){var o=n(e,t);return r&&i(o,r,t||"<ANONYMOUS>"),o}var a=e;a.Namespace||(a.Namespace=Object.create(Object.prototype));var s={uninitialized:1,working:2,initialized:3};Object.defineProperties(a.Namespace,{ defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return o(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=s.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case s.initialized:return n;case s.uninitialized:i=s.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=s.uninitialized}return e=null,i=s.initialized,n;case s.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case s.working:throw"Illegal: reentrancy on initialization";default:i=s.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,r,o){var a=[e],s=null;return r&&(s=n(t,r),a.push(s)),i(a,o,r||"<ANONYMOUS>"),s},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&i(e.prototype,t), r&&i(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,o,a){if(e){r=r||function(){};var s=e.prototype;return r.prototype=Object.create(s),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),a&&i(r,a),r}return t(r,o,a)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)i(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var r=this[t];n?(r||(r={wrapper:function(e){return r.userHandler(e)},userHandler:n}, Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,r.wrapper,!1)),r.userHandler=n):r&&(this.removeEventListener(e,r.wrapper,!1),this[t]=null)},enumerable:!0}}var r=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),i={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.useCapture===n&&a.listener===t)return} r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){for(var i=new r(e,t,this),o=0,a=(n=n.slice(0,n.length)).length;o<a&&!i._stopImmediatePropagationCalled;o++)n[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var i=0,o=r.length;i<o;i++){var a=r[i];if(a.listener===t&&a.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:function(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];e["on"+i]=n(i)}return e},eventMixin:i})}),t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t, _traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),t("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,r,i,o){"use strict";function a(){}function s(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?W:A,e._value=t,e._setState(n)}function c(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function u(e,t,n,r){var i=n._isException,o=n._errorId;return c(i?t:null,i?null:t,e,o,n,r)}function l(e,t,n){var r=n._isException,i=n._errorId;return b(e,i,r),c(r?t:null,r?null:t,e,i,n)}function d(e,t){var n=++N ;return b(e,n),c(null,t,e,n)}function p(e,t){var n=++N;return b(e,n,!0),c(t,null,e,n)}function f(e,t,n,r){w(e,{c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function h(e,t,n,r){e._value=t,m(e,t,n,r),e._setState(R)}function v(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var a,s;for(a=0,s=Array.isArray(i)?i.length:1;a<s;a++){var c=1===s?i:i[a],u=c.c,l=c.promise;if(o._traceAsyncOperationCompleted(c.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),l){o._traceAsyncCallbackStarting(c.asyncOpID);try{l._setCompleteValue(u?u(r):r)}catch(e){l._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}l._state!==W&&l._listeners&&n.push(l)}else q.prototype.done.call(t,u)}}}function g(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var a,s;for(a=0,s=Array.isArray(i)?i.length:1;a<s;a++){var c=1===s?i:i[a],l=c.e,d=c.promise,p=e.Debug&&(r&&r.name===P?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR) ;if(o._traceAsyncOperationCompleted(c.asyncOpID,p),d){var f=!1;try{l?(o._traceAsyncCallbackStarting(c.asyncOpID),f=!0,l.handlesOnError||m(d,r,u,t,l),d._setCompleteValue(l(r))):d._setChainedErrorValue(r,t)}catch(e){d._setExceptionValue(e)}finally{f&&o._traceAsyncCallbackCompleted()}d._state!==W&&d._listeners&&n.push(d)}else K.prototype.done.call(t,null,l)}}}function m(e,t,n,r,i){if(k._listeners[E]){if(t instanceof Error&&t.message===P)return;k.dispatchEvent(E,n(e,t,r,i))}}function y(e,t){var n=e._listeners;if(n){var r,i;for(r=0,i=Array.isArray(n)?n.length:1;r<i;r++){var o=1===i?n:n[r],a=o.p;if(a)try{a(t)}catch(e){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function w(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n]).push(t):n=t,e._listeners=n}function b(e,t,n){e._isException=n||!1,e._errorId=t}function S(e,t,n,r){e._value=t,m(e,t,n,r),e._setState(U)}function _(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?W:F,e._value=t,e._setState(n)}function C(e,t,n,r){var i=new j(e);return w(e,{ promise:i,c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),i}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var k=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),i.eventMixin));k._listeners={};var E="error",P="Canceled",I=!1,M={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};M.all=M.promise|M.thenPromise|M.errorPromise|M.exceptionPromise|M.completePromise;var O,T,W,x,L,D,A,F,R,U,N=1;O={name:"created",enter:function(e){e._setState(T)},cancel:a,done:a,then:a,_completed:a,_error:a,_notify:a,_progress:a,_setCompleteValue:a,_setErrorValue:a},T={name:"working",enter:a,cancel:function(e){e._setState(L)},done:f,then:C,_completed:s,_error:h,_notify:a,_progress:y,_setCompleteValue:_,_setErrorValue:S},W={name:"waiting",enter:function(e){var t=e._value;if(t instanceof j&&t._state!==U&&t._state!==F)w(t,{promise:e});else{var n=function(r){t._errorId?e._chainedError(r,t):(m(e,r,u,t,n),e._error(r))};n.handlesOnError=!0, t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(x)},done:f,then:C,_completed:s,_error:h,_notify:a,_progress:y,_setCompleteValue:_,_setErrorValue:S},x={name:"waiting_canceled",enter:function(e){e._setState(D);var t=e._value;t.cancel&&t.cancel()},cancel:a,done:f,then:C,_completed:s,_error:h,_notify:a,_progress:y,_setCompleteValue:_,_setErrorValue:S},L={name:"canceled",enter:function(e){e._setState(D),e._cancelAction()},cancel:a,done:f,then:C,_completed:s,_error:h,_notify:a,_progress:y,_setCompleteValue:_,_setErrorValue:S},D={name:"canceling",enter:function(e){var t=new Error(P);t.name=t.message,e._value=t,e._setState(R)},cancel:a,done:a,then:a,_completed:a,_error:a,_notify:a,_progress:a,_setCompleteValue:a,_setErrorValue:a},A={name:"complete_notify",enter:function(e){if(e.done=q.prototype.done,e.then=q.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(F)},cancel:a,done:null,then:null,_completed:a,_error:a,_notify:v, _progress:a,_setCompleteValue:a,_setErrorValue:a},F={name:"success",enter:function(e){e.done=q.prototype.done,e.then=q.prototype.then,e._cleanupAction()},cancel:a,done:null,then:null,_completed:a,_error:a,_notify:v,_progress:a,_setCompleteValue:a,_setErrorValue:a},R={name:"error_notify",enter:function(e){if(e.done=K.prototype.done,e.then=K.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(U)},cancel:a,done:null,then:null,_completed:a,_error:a,_notify:g,_progress:a,_setCompleteValue:a,_setErrorValue:a},U={name:"error",enter:function(e){e.done=K.prototype.done,e.then=K.prototype.then,e._cleanupAction()},cancel:a,done:null,then:null,_completed:a,_error:a,_notify:g,_progress:a,_setCompleteValue:a,_setErrorValue:a};var B,z=n.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function(e,t,n){return this._state.then(this,e,t,n)}, _chainedError:function(e,t){var n=this._state._error(this,e,l,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,d);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,l,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,p);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),j=n.Class.derive(z,function(e){I&&(!0===I||I&M.thenPromise)&&(this._stack=H._getStack()),this._creator=e,this._setState(O),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{ supportedForProcessing:!1}),K=n.Class.define(function(e){I&&(!0===I||I&M.errorPromise)&&(this._stack=H._getStack()),this._value=e,m(this,e,d)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||m(null,n,u,this,t);var r=t(n);return void(r&&"object"==typeof r&&"function"==typeof r.done&&r.done())}catch(e){n=e}n instanceof Error&&n.message===P||H._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||m(null,r,u,this,t),n=new q(t(r))}catch(e){n=e===r?this:new V(e)}return n}},{supportedForProcessing:!1}),V=n.Class.derive(K,function(e){I&&(!0===I||I&M.exceptionPromise)&&(this._stack=H._getStack()),this._value=e,m(this,e,p)},{},{supportedForProcessing:!1}),q=n.Class.define(function(e){if(I&&(!0===I||I&M.completePromise)&&(this._stack=H._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new j(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value) ;t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){H._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new q(t)}catch(e){return new V(e)}}},{supportedForProcessing:!1}),H=n.Class.derive(z,function(e,t){I&&(!0===I||I&M.promise)&&(this._stack=H._getStack()),this._oncancel=t,this._setState(O),this._run();try{e(this._completed.bind(this),this._error.bind(this),this._progress.bind(this))}catch(e){this._setExceptionValue(e)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;k.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){k.addEventListener(e,t,n)},any:function(e){return new H(function(t,n){var r=Object.keys(e);0===r.length&&t();var i=0;r.forEach(function(o){H.as(e[o]).then(function(){t({key:o,value:e[o]})},function(a){ a instanceof Error&&a.name===P?++i===r.length&&t(H.cancel):n({key:o,value:e[o]})})})},function(){Object.keys(e).forEach(function(t){var n=H.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new q(e)},cancel:{get:function(){return B=B||new K(new r(P))}},dispatchEvent:function(e,t){return k.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new H(function(t,n,r){var i=Object.keys(e),o=Array.isArray(e)?[]:{},a=Array.isArray(e)?[]:{},s=0,c=i.length,u=function(e){if(0==--c){var s=Object.keys(o).length;if(0===s)t(a);else{var u=0;i.forEach(function(e){var t=o[e];t instanceof Error&&t.name===P&&u++}),u===s?t(H.cancel):n(o)}}else r({Key:e,Done:!0})};i.forEach(function(t){var n=e[t];void 0===n?s++:H.then(n,function(e){a[t]=e,u(t)},function(e){o[t]=e,u(t)})}),0!==(c-=s)||t(a)},function(){Object.keys(e).forEach(function(t){var n=H.as(e[t]);"function"==typeof n.cancel&&n.cancel()}) })},removeEventListener:function(e,t,n){k.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,r){return H.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=H.as(e[o]).then(t,n,r)}),H.join(i)},timeout:function(n,r){var i=function(n){var r;return new H(function(i){n?r=e.setTimeout(i,n):t._setImmediate(i)},function(){r&&e.clearTimeout(r)})}(n);return r?function(e,t){var n=function(){e.cancel()};return e.then(function(){t.cancel()}),t.then(n,n),t}(i,r):i},wrap:function(e){return new q(e)},wrapError:function(e){return new K(e)},_veryExpensiveTagWithStack:{get:function(){return I},set:function(e){I=e}},_veryExpensiveTagWithStack_tag:M,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBlocker:function(e,t){if(!H.is(e))return H.wrap(e);var n,r,i=new H(function(e,t){n=e,r=t},function(){n=null,r=null,t&&t()});return e.then(function(e){n&&n(e)},function(e){r&&r(e)}),i} });return Object.defineProperties(H,i.createEventProperties(E)),H._doneHandler=function(e){t._setImmediate(function(){throw e})},{PromiseStateMachine:z,Promise:H,state_created:O}}),t("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],function(e,t){"use strict";return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise}),(r=e["WinJS/Core/_WinJS"]).TPromise=r.Promise,r.PPromise=r.Promise,"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/common/winjs.base",[],r):module.exports=r}();var i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=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=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(o=o.call(i,n[1])).done)return o;switch(i=0,o&&(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[21],t([0,1,2]),function(e,t,n){"use strict";function r(e,t){var n=0,r=e.length;if(0===r)return 0;for(;n<r;){ var i=Math.floor((n+r)/2);t(e[i])?r=i:n=i+1}return n}function a(e,t){return s(e,t),e}function s(e,t){if(!(e.length<=1)){var n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);s(r,t),s(i,t);for(var o=0,a=0,c=0;o<r.length&&a<i.length;){var u=t(r[o],i[a]);e[c++]=u<=0?r[o++]:i[a++]}for(;o<r.length;)e[c++]=r[o++];for(;a<i.length;)e[c++]=i[a++]}}function c(e,t,n){function r(e,t,n){var r;if(0!==t||0!==n.length){var o=i[i.length-1];o&&o.start+o.deleteCount===e?(o.deleteCount+=t,(r=o.toInsert).push.apply(r,n)):i.push({start:e,deleteCount:t,toInsert:n})}}for(var i=[],o=0,a=0;;){if(o===e.length){r(o,0,t.slice(a));break}if(a===t.length){r(o,e.length-o,[]);break}var s=e[o],c=t[a],u=n(s,c);0===u?(o+=1,a+=1):u<0?(r(o,1,[]),o+=1):u>0&&(r(o,0,[c]),a+=1)}return i}function u(e,t,n,i,o){for(var a=function(o){var a=e[i];if(t(a,n[o-1])<0){n.pop();var s=r(n,function(e){return t(a,e)<0});n.splice(s,0,a)}},s=n.length;i<o;i++)a(s)}function l(e,t){for(var n=0;n<e.length;n++){if(t(e[n]))return n}return-1}Object.defineProperty(t,"__esModule",{ value:!0}),t.tail=function(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]},t.tail2=function(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]},t.equals=function(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0},t.binarySearch=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=(r+i)/2|0,a=n(e[o],t);if(a<0)r=o+1;else{if(!(a>0))return o;i=o-1}}return-(r+1)},t.findFirstInSorted=r,t.mergeSort=a,t.groupBy=function(e,t){for(var n,r=[],i=0,o=a(e.slice(0),t);i<o.length;i++){var s=o[i];n&&0===t(n[0],s)?n.push(s):(n=[s],r.push(n))}return r},t.sortedDiff=c,t.delta=function(e,t,n){for(var r=[],i=[],o=0,a=c(e,t,n);o<a.length;o++){var s=a[o];r.push.apply(r,e.slice(s.start,s.start+s.deleteCount)),i.push.apply(i,s.toInsert)}return{removed:r,added:i}},t.top=function(e,t,n){if(0===n)return[];var r=e.slice(0,n).sort(t);return u(e,t,r,n,e.length),r},t.topAsync=function(e,t,r,a){ var s=this;if(0===r)return n.TPromise.as([]);var c=!1;return new n.TPromise(function(n,l){i(s,void 0,void 0,function(){var n,i,s,l;return o(this,function(o){switch(o.label){case 0:n=e.length,i=e.slice(0,r).sort(t),s=r,l=Math.min(r+a,n),o.label=1;case 1:return s<n?s>r?[4,new Promise(function(e){return setTimeout(e)})]:[3,3]:[3,5];case 2:o.sent(),o.label=3;case 3:if(c)throw new Error("canceled");u(e,t,i,s,l),o.label=4;case 4:return s=l,l=Math.min(l+a,n),[3,1];case 5:return[2,i]}})}).then(n,l)},function(){c=!0})},t.coalesce=function(e,t){if(!e&&!t)return e;if(!t)return e.filter(function(e){return!!e});for(var n=0,r=0;r<e.length;r++)e[r]&&(e[n]=e[r],n+=1);e.length=n},t.move=function(e,t,n){e.splice(n,0,e.splice(t,1)[0])},t.isFalsyOrEmpty=function(e){return!Array.isArray(e)||0===e.length},t.distinct=function(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var r=t(e);return!n[r]&&(n[r]=!0,!0)})},t.uniqueFilter=function(e){ var t=Object.create(null);return function(n){var r=e(n);return!t[r]&&(t[r]=!0,!0)}},t.firstIndex=l,t.first=function(e,t,n){void 0===n&&(n=null);var r=l(e,t);return r<0?n:e[r]},t.commonPrefixLength=function(e,t,n){void 0===n&&(n=function(e,t){return e===t});for(var r=0,i=0,o=Math.min(e.length,t.length);i<o&&n(e[i],t[i]);i++)r++;return r},t.flatten=function(e){return[].concat.apply([],e)},t.range=function(e,t){var n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);var r=[];if(n<=t)for(i=n;i<t;i++)r.push(i);else for(var i=n;i>t;i--)r.push(i);return r},t.fill=function(e,t,n){void 0===n&&(n=[]);for(var r=0;r<e;r++)n[r]=t();return n},t.index=function(e,t,n){return void 0===n&&(n=function(e){return e}),e.reduce(function(e,r){var i=t(r);return e[i]=n(r,e[i]),e},Object.create(null))},t.insert=function(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)},t.shuffle=function(e){var t=0,n=0,r=null ;for(t=e.length-1;t>0;t-=1)n=Math.floor(Math.random()*(t+1)),r=e[t],e[t]=e[n],e[n]=r},t.pushToStart=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},t.pushToEnd=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}}),define(e[25],t([0,1,2]),function(e,t,n){"use strict";function r(e){i(e)||t.errorHandler.onUnexpectedError(e)}function i(e){return e instanceof Error&&e.name===s&&e.message===s}Object.defineProperty(t,"__esModule",{value:!0});var o={};n.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout(function(){var e=o;o={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?r(n.exception):n.error&&r(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var a=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){ if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}();t.ErrorHandler=a,t.errorHandler=new a,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=r,t.onUnexpectedExternalError=function(e){i(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error)return{$isError:!0,name:e.name, message:e.message,stack:e.stacktrace||e.stack};return e};var s="Canceled";t.isPromiseCanceledError=i,t.canceled=function(){var e=new Error(s);return e.name=e.message,e},t.illegalArgument=function(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")},t.illegalState=function(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")},t.readonly=function(e){return e?new Error("readonly property '"+e+" cannot be changed'"):new Error("readonly property cannot be changed")},t.disposed=function(e){var t=new Error(e+" has been disposed");return t.name="DISPOSED",t},t.isErrorWithActions=function(e){return e instanceof Error&&Array.isArray(e.actions)},t.create=function(e,t){void 0===t&&(t=Object.create(null));var n=new Error(e);return t.actions&&(n.actions=t.actions),n},t.getErrorMessage=function(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"}}),define(e[5],t([0,1,25,55,13,171,2]),function(e,t,r,a,s,c,u){"use strict";function l(e){ return function(t,n,r){void 0===n&&(n=null);var i=e(function(e){return i.dispose(),t.call(n,e)},null,r);return i}}function d(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return n.call(r,t(e))},null,i)}}function p(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){t(e),n.call(r,e)},null,i)}}function f(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return t(e)&&n.call(r,e)},null,i)}}function h(e){var t,n=!0;return f(e,function(e){var r=n||e!==t;return n=!1,t=e,r})}Object.defineProperty(t,"__esModule",{value:!0});!function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var v=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new c.LinkedList);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t) ;var a=t._listeners.push(r?[n,r]:n);o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r);var s;return s={dispose:function(){s.dispose=e._noop,t._disposed||(a(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(i)&&i.push(s),s}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),o=i[0],a=i[1];try{"function"==typeof o?o.call(void 0,a):o[0].call(o[1],a)}catch(n){r.onUnexpectedError(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();t.Emitter=v ;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.fireAsync=function(e){return i(this,void 0,u.TPromise,function(){var t,n,i,a,s,c;return o(this,function(o){switch(o.label){case 0:if(!this._listeners)return[2];for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]),t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())c=[],this._asyncDeliveryQueue.push([n.value,e(c,"function"==typeof n.value?n.value:n.value[0]),c]);o.label=1;case 1:if(!(this._asyncDeliveryQueue.length>0))return[3,3];i=this._asyncDeliveryQueue.shift(),a=i[0],s=i[1],c=i[2];try{"function"==typeof a?a.call(void 0,s):a[0].call(a[1],s)}catch(e){return r.onUnexpectedError(e),[3,1]}return Object.freeze(c),[4,u.TPromise.join(c)];case 2:return o.sent(),[3,1];case 3:return[2]}})})},t}(v);t.AsyncEmitter=g;var m=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new v({onFirstListenerAdd:function(){return e.onFirstListenerAdd()}, onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return s.toDisposable(a.once(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)}))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();t.EventMultiplexer=m,t.fromCallback=function(e){var t,n=new v({onFirstListenerAdd:function(){ return t=e(function(e){return n.fire(e)})},onLastListenerRemove:function(){return t.dispose()}});return n.event},t.fromPromise=function(e){var t=new v,n=!1;return e.then(null,function(){return null}).then(function(){n?t.fire():setTimeout(function(){return t.fire()},0)}),n=!0,t.event},t.toPromise=function(e){return new u.TPromise(function(t){var n=e(function(e){n.dispose(),t(e)})})},t.once=l,t.anyEvent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){return void 0===n&&(n=null),s.combinedDisposable(e.map(function(e){return e(function(e){return t.call(n,e)},null,r)}))}},t.debounceEvent=function(e,t,n,r){void 0===n&&(n=100),void 0===r&&(r=!1);var i,o=void 0,a=void 0,s=0,c=new v({onFirstListenerAdd:function(){i=e(function(e){s++,o=t(o,e),r&&!a&&c.fire(o),clearTimeout(a),a=setTimeout(function(){var e=o;o=void 0,a=void 0,(!r||s>1)&&c.fire(e),s=0},n)})},onLastListenerRemove:function(){i.dispose()}});return c.event};var y=function(){function e(){this.buffers=[]} return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=y,t.mapEvent=d,t.forEach=p,t.filterEvent=f;var w=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(d(this._event,t))},e.prototype.forEach=function(t){return new e(p(this._event,t))},e.prototype.filter=function(t){return new e(f(this._event,t))},e.prototype.latch=function(){return new e(h(this._event))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=function(e){return new w(e)},t.stopwatch=function(e){var t=(new Date).getTime();return d(l(e),function(e){return(new Date).getTime()-t})}, t.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice();var r=e(function(e){n?n.push(e):o.fire(e)}),i=function(){n.forEach(function(e){return o.fire(e)}),n=null},o=new v({onFirstListenerAdd:function(){r||(r=e(function(e){return o.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(i):i())},onLastListenerRemove:function(){r.dispose(),r=null}});return o.event},t.echo=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice(),e(function(e){n.push(e),i.fire(e)});var r=function(e,t){return n.forEach(function(n){return e.call(t,n)})},i=new v({onListenerDidAdd:function(e,n,i){t?setTimeout(function(){return r(n,i)}):r(n,i)}});return i.event};var b=function(){function e(){this.emitter=new v,this.event=this.emitter.event,this.disposable=s.empty}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(), this.emitter.dispose()},e}();t.Relay=b,t.fromNodeEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.fire(n.apply(void 0,e))},i=new v({onFirstListenerAdd:function(){return e.on(t,r)},onLastListenerRemove:function(){return e.removeListener(t,r)}});return i.event},t.latch=h}),define(e[154],t([0,1,5]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}, Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),a=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof o&&this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof o&&this._token.dispose():this._token=r.None},e}();t.CancellationTokenSource=a}),define(e[24],t([0,1,25,2,154,13,5]),function(e,t,r,i,o,a,s){"use strict";function c(e){return e&&"function"==typeof e.then}function u(e){ return e instanceof i.TPromise?e:new i.TPromise(function(t,n){return e.then(t,n)})}function l(e){return i.TPromise.is(e)&&"function"==typeof e.done}function d(e,t){return l(e)?new i.TPromise(function(n,i,o){e.done(function(e){try{t(e)}catch(e){r.onUnexpectedError(e)}n(e)},function(e){try{t(e)}catch(e){r.onUnexpectedError(e)}i(e)},function(e){o(e)})},function(){e.cancel()}):(e.then(function(e){return t()},function(e){return t()}),e)}function p(e){function t(a){void 0!==a&&null!==a&&n.push(a);var s=r<o?e[r++]():null;return s?s.then(t):i.TPromise.as(n)}var n=[],r=0,o=e.length;return i.TPromise.as(null).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=c,t.toThenable=function(e){return c(e)?e:i.TPromise.as(e)},t.toWinJsPromise=u,t.asWinJsPromise=function(e){var t=new o.CancellationTokenSource;return new i.TPromise(function(n,r,o){var a=e(t.token);a instanceof i.TPromise?a.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),r(e)},o):c(a)?a.then(function(e){t.dispose(),n(e)},function(e){ t.dispose(),r(e)}):(t.dispose(),n(a))},function(){t.cancel()})},t.asWinJSImport=function(e){return u(e)},t.wireCancellationToken=function(e,t,n){var o=e.onCancellationRequested(function(){return t.cancel()});return n&&(t=t.then(void 0,function(e){if(!r.isPromiseCanceledError(e))return i.TPromise.wrapError(e)})),d(t,function(){return o.dispose()})},t.asDisposablePromise=function(e,t,n){var o,a={promise:new i.TPromise(function(n,i){o=function(){n(t),l(e)&&e.cancel()},e.then(n,function(e){r.isPromiseCanceledError(e)?n(t):i(e)})}),dispose:o};return Array.isArray(n)&&n.push(a),a};var f=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new i.TPromise(function(e,r,i){t.activePromise.then(n,n,i).done(e) },function(){t.activePromise.cancel()})}return new i.TPromise(function(e,n,r){t.queuedPromise.then(e,n,r)},function(){})}return this.activePromise=e(),new i.TPromise(function(e,n,r){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},r)},function(){t.activePromise.cancel()})},e}();t.Throttler=f;var h=function(){function e(){this.current=i.TPromise.wrap(null)}return e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})},e}();t.SimpleThrottler=h;var v=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new i.TPromise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})), this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=v;var g=function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new f,n}return n(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.throttler.queue(t)},n)},t}(v);t.ThrottledDelayer=g;var m=function(){function e(){var e=this;this._isOpen=!1,this._promise=new i.TPromise(function(t,n,r){e._completePromise=t},function(){console.warn("You should really not try to cancel this ready promise!")})}return e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen=!0,this._completePromise(!0)}, e.prototype.wait=function(){return this._promise},e}();t.Barrier=m;var y=function(e){function t(t){var n,i,o,a=this;return a=e.call(this,function(e,t,r){n=e,i=t,o=r},function(){i(r.canceled())})||this,t.then(n,i,o),a}return n(t,e),t}(i.TPromise);t.ShallowCancelThenPromise=y,t.timeout=function(e){return new i.TPromise(function(t){return setTimeout(t,e)})},t.always=d,t.sequence=p,t.first=function(e,t){void 0===t&&(t=function(e){return!!e});var n=0,r=e.length,o=function(){return n>=r?i.TPromise.as(null):(0,e[n++])().then(function(e){return t(e)?i.TPromise.as(e):o()})};return o()};var w=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new s.Emitter}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.runningPromises+this.outstandingPromises.length},enumerable:!0,configurable:!0}), e.prototype.queue=function(e){var t=this;return new i.TPromise(function(n,r,i){t.outstandingPromises.push({factory:e,c:n,e:r,p:i}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e,t.p),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=w;var b=function(e){function t(){return e.call(this,1)||this}return n(t,e),t}(w);t.Queue=b;var S=function(){function e(){this.queues=Object.create(null)}return e.prototype.queueFor=function(e){var t=this,n=e.toString();if(!this.queues[n]){var r=new b;r.onFinished(function(){r.dispose(),delete t.queues[n]}),this.queues[n]=r}return this.queues[n]},e}();t.ResourceQueue=S, t.setDisposableTimeout=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=setTimeout.apply(void 0,[e,t].concat(n));return{dispose:function(){clearTimeout(i)}}};var _=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return n(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout(function(){n._token=-1,e()},t))},t}(a.Disposable);t.TimeoutTimer=_;var C=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return n(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}, t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval(function(){e()},t)},t}(a.Disposable);t.IntervalTimer=C;var k=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner()},e}();t.RunOnceScheduler=k;var E=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.units=[],r}return n(t,e),t.prototype.work=function(e){this.units.push(e),this.isScheduled()||this.schedule()},t.prototype.doRun=function(){var e=this.units;this.units=[], this.runner(e)},t.prototype.dispose=function(){this.units=[],e.prototype.dispose.call(this)},t}(k);t.RunOnceWorker=E,t.nfcall=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new i.TPromise(function(n,r){return e.apply(void 0,t.concat([function(e,t){return e?r(e):n(t)}]))},function(){return null})},t.ninvoke=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return new i.TPromise(function(r,i){return t.call.apply(t,[e].concat(n,[function(e,t){return e?i(e):r(t)}]))},function(){return null})}}),define(e[152],t([0,1,21,17,18,39,2]),function(e,t,n,r,i,o,a){"use strict";function s(e){switch(e){case 0:return"";case 1:return b+"*?";default:return"(?:"+w+"|"+b+"+"+w+"|"+w+b+"+)*?"}}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 u(e){if(!e)return"";var t="",n=c(e,y) ;if(n.every(function(e){return e===m}))t=".*";else{var i=!1;n.forEach(function(e,o){if(e!==m){for(var a,l=!1,d="",p=!1,f="",h=0;h<e.length;h++)if("}"!==(a=e[h])&&l)d+=a;else if(!p||"]"===a&&f)switch(a){case"{":l=!0;continue;case"[":p=!0;continue;case"}":var v="(?:"+c(d,",").map(function(e){return u(e)}).join("|")+")";t+=v,l=!1,d="";break;case"]":t+="["+f+"]",p=!1,f="";break;case"?":t+=b;continue;case"*":t+=s(1);continue;default:t+=r.escapeRegExpCharacters(a)}else{f+="-"===a?a:"^"!==a&&"!"!==a||f?a===y?"":r.escapeRegExpCharacters(a):"^"}o<n.length-1&&(n[o+1]!==m||o+2<n.length)&&(t+=w),i=!1}else i||(t+=s(2),i=!0)})}return t}function l(e,t){if(!e)return T;var i;i="string"!=typeof e?e.pattern:e;var o=(i=i.trim())+"_"+!!t.trimForExclusions,a=M.get(o);if(a)return d(a,e);var s;if(_.test(i)){var c=i.substr(4);a=function(e,t){return e&&r.endsWith(e,c)?i:null}}else a=(s=C.exec(p(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?E:k).test(i)?function(e,t){var r=g(e.slice(1,-1).split(",").map(function(e){return l(e,t)}).filter(function(e){return e!==T}),e),i=r.length;if(!i)return T;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=P.exec(p(i,t)))?f(s[1].substr(1),i,!0):(s=I.exec(p(i,t)))?f(s[1],i,!1):function(e){try{var t=new RegExp("^"+u(e)+"$");return function(n,r){return t.lastIndex=0,n&&t.test(n)?e:null}}catch(e){return T}}(i);return M.set(o,a),d(a,e)}function d(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 p(e,t){return t.trimForExclusions&&r.endsWith(e,"/**")?e.substr(0,e.length-2):e} function f(e,t,n){var o=i.nativeSep!==i.sep?e.replace(S,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 O;if("string"==typeof e||v(e)){var r=l(e,t);if(r===T)return O;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=g(Object.getOwnPropertyNames(e).map(function(n){return function(e,t,n){if(!1===t)return T;var r=l(e,n);if(r===T)return T;if("boolean"==typeof t)return r;if(t){var i=t.when;if("string"==typeof i){var o=function(t){var n=i.replace("$(basename)",t.name);return-1!==t.siblings.indexOf(n)?e:null},s=function(e,t,n){if(!r(e,t))return null;var i=n();return i?a.TPromise.is(i)?i.then(o):o(i):null};return s.requiresSiblings=!0,s}}return r}(n,e[n],t)}).filter(function(e){return e!==T})),o=r.length;if(!o)return T;if(!r.some(function(e){ return e.requiresSiblings})){if(1===o)return r[0];var s=function(e,t,n){for(var i=0,o=r.length;i<o;i++){var a=r[i](e,t);if(a)return a}return null},c=n.first(r,function(e){return!!e.allBasenames});c&&(s.allBasenames=c.allBasenames);var u=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return u.length&&(s.allPaths=u),s}var d=function(e,t,n){function o(n){if(n&&n.length){t||(t=i.basename(e));var r=t.substr(0,t.length-i.extname(e).length);return{siblings:n,name:r}}}function s(){if(!u){u=!0;var e=n();c=a.TPromise.is(e)?e.then(o):o(e)}return c}for(var c,u=!n,l=0,d=r.length;l<d;l++){var p=r[l](e,t,s);if(p)return p}return null},p=n.first(r,function(e){return!!e.allBasenames});p&&(d.allBasenames=p.allBasenames);var f=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);f.length&&(d.allPaths=f);return d}(e,t)}function v(e){var t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern&&"function"==typeof t.pathToRelative}function g(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 c=e.filter(function(e){return!e.basenames});return c.push(s),c}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)};var m="**",y="/",w="[/\\\\]",b="[^/\\\\]",S=/\//g;t.splitGlobAware=c;var _=/^\*\*\/\*\.[\w\.-]+$/,C=/^\*\*\/([\w\.-]+)\/?$/,k=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,E=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,P=/^\*\*((\/[\w\.-]+)+)\/?$/,I=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,M=new o.LRUCache(1e4),O=function(){return!1},T=function(){ return null};t.match=function(e,t,n){return!(!e||!t)&&h(e)(t,void 0,n)},t.parse=h,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[149],t([0,1,18,17,152]),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);u.push(r),r.userConfigured?d.push(r):l.push(r),t&&!r.userConfigured&&u.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,d);if(a)return[a,t.MIME_TEXT];var c=s(e,o,l);if(c)return[c,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<u.length;++t){var n=u[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,c=n.length-1;c>=0;c--){var u=n[c];if(t===u.filenameLowercase){o=u;break}if(u.filepattern&&(!a||u.filepattern.length>a.filepattern.length)){var l=u.filepatternOnPath?e:t;i.match(u.filepatternLowercase,l)&&(a=u)}u.extension&&(!s||u.extension.length>s.extension.length)&&r.endsWith(t,u.extensionLowercase)&&(s=u)}return o?o.mime:a?a.mime:s?s.mime:null}function c(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&c(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 u=[],l=[],d=[];t.registerTextMime=o,t.clearTextMimes=function(e){e?(u=u.filter(function(e){return!e.userConfigured}),d=[]):(u=[],l=[],d=[])},t.guessMimeTypes=a,t.isUnspecific=c,t.suggestFilename=function(e,t){for(var n=0;n<u.length;n++){var r=u[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[148],t([0,1,27,62,2,55]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checksum=function(e,t){return new i.TPromise(function(t,i){var a=n.createReadStream(e),s=r.createHash("sha1");a.pipe(s);var c=o.once(function(e,n){a.removeAllListeners(),s.removeAllListeners(),e?i(e):t(n)});a.once("error",c),a.once("end",c),s.once("error",c),s.once("data",function(e){return c(null,e.toString("hex"))})}).then(function(e){return e!==t?i.TPromise.wrapError(new Error("Hash mismatch")):i.TPromise.as(null)})}}),define(e[147],t([0,1,144]),function(e,t,n){"use strict";function r(e,t,i){if(n.ok(e,"Missing first parameter"),n.ok("function"==typeof t,"Second parameter must be a function that is called for each element"),n.ok("function"==typeof i,"Third parameter must be a function that is called on error and success"),"function"==typeof e)try{e(function(e,n){e?i(e,null):r(n,t,i)})}catch(e){i(e,null)}else{var o=[],a=function(n){if(n<e.length)try{t(e[n],function(e,t){ !0!==e&&!1!==e||(t=e,e=null),e?i(e,null):(t&&o.push(t),process.nextTick(function(){a(n+1)}))},n,e.length)}catch(e){i(e,null)}else i(null,o)};a(0)}}function i(e){!function(e){n.ok(e.length>1,"Need at least one error handler and one function to process sequence"),e.forEach(function(e){n.ok("function"==typeof e)});var t=e.splice(0,1)[0],i=null;r(e,function(e,t){var n=function(e,n){!0!==e&&!1!==e||(n=e,e=null),e?t(e,null):(i=n,t(null,null))};try{e.call(n,i)}catch(e){t(e,null)}},function(e,n){e&&t(e)})}(Array.isArray(e)?e:Array.prototype.slice.call(arguments))}Object.defineProperty(t,"__esModule",{value:!0}),t.parallel=function(e,t,n){var r=new Array(e.length),i=new Array(e.length),o=!1,a=0;if(0===e.length)return n(null,[]);e.forEach(function(s,c){t(s,function(t,s){if(t?(o=!0,r[c]=null,i[c]=t):(r[c]=s,i[c]=null),++a===e.length)return n(o?i:null,r)})})},t.loop=r,t.sequence=i}),define(e[72],t([0,1,2,25,42,26,39]),function(e,t,n,r,i,o,a){"use strict";function s(){return c||(c=new n.TPromise(function(t){ n.TPromise.join([new Promise(function(t,n){e(["crypto"],t,n)}),new Promise(function(t,n){e(["getmac"],t,n)})]).then(function(e){var n=e[0],i=e[1];try{i.getMac(function(e,r){t(e?void 0:n.createHash("sha256").update(r,"utf8").digest("hex"))})}catch(e){r.onUnexpectedError(e),t(void 0)}},function(e){r.onUnexpectedError(e),t(void 0)})}).then(function(e){return e||i.generateUuid()}))}Object.defineProperty(t,"__esModule",{value:!0}),t.virtualMachineHint=new(function(){function e(){}return e.prototype._isVirtualMachineMacAdress=function(e){return this._virtualMachineOUIs||(this._virtualMachineOUIs=a.TernarySearchTree.forStrings(),this._virtualMachineOUIs.set("00-50-56",!0),this._virtualMachineOUIs.set("00-0C-29",!0),this._virtualMachineOUIs.set("00-05-69",!0),this._virtualMachineOUIs.set("00-03-FF",!0),this._virtualMachineOUIs.set("00-1C-42",!0),this._virtualMachineOUIs.set("00-16-3E",!0),this._virtualMachineOUIs.set("08-00-27",!0),this._virtualMachineOUIs.set("00:50:56",!0), this._virtualMachineOUIs.set("00:0C:29",!0),this._virtualMachineOUIs.set("00:05:69",!0),this._virtualMachineOUIs.set("00:03:FF",!0),this._virtualMachineOUIs.set("00:1C:42",!0),this._virtualMachineOUIs.set("00:16:3E",!0),this._virtualMachineOUIs.set("08:00:27",!0)),this._virtualMachineOUIs.findSubstr(e)},e.prototype.value=function(){if(void 0===this._value){var e=0,t=0,n=o.networkInterfaces();for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))for(var i=0,a=n[r];i<a.length;i++){var s=a[i],c=s.mac;s.internal||(t+=1,this._isVirtualMachineMacAdress(c.toUpperCase())&&(e+=1))}this._value=t>0?e/t:0}return this._value},e}());var c;t.getMachineId=s}),define(e[140],t([0,1,12]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n.default.parse(e.toUrl("paths")).fsPath,i=e.__$__nodeRequire(r);t.getAppDataPath=i.getAppDataPath,t.getDefaultUserDataPath=i.getDefaultUserDataPath}),define(e[135],t([0,1,134,20,2]),function(e,t,n,r,a){"use strict";function s(t,s){ return void 0===s&&(s={}),i(this,void 0,a.TPromise,function(){var i,a,c,u,l,d;return o(this,function(o){switch(o.label){case 0:return i=n.parse(t),(a=s.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}(i))?(c=n.parse(a),/^https?:$/.test(c.protocol)?(u={host:c.hostname,port:Number(c.port),auth:c.auth,rejectUnauthorized:!r.isBoolean(s.strictSSL)||s.strictSSL},"http:"!==i.protocol?[3,2]:[4,new Promise(function(t,n){e(["http-proxy-agent"],t,n)})]):[2,null]):[2,null];case 1:return d=o.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["https-proxy-agent"],t,n)})];case 3:d=o.sent(),o.label=4;case 4:return l=d,[2,new l(u)]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=s}),define(e[132],t([0,1,49,12]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.listProcesses=function(t){return new Promise(function(i,o){function a(e,n,r,i,o){var a=u.get(n);if(e===t||a){var l={name:s(r),cmd:r,pid:e,ppid:n,load:i,mem:o};u.set(e,l),e===t&&(c=l),a&&(a.children||(a.children=[]),a.children.push(l),a.children.length>1&&(a.children=a.children.sort(function(e,t){return e.pid-t.pid})))}}function s(e){var t=/--disable-blink-features=Auxclick/;if(/\\watcher\\win32\\CodeHelper\.exe/.exec(e))return"watcherService ";if(/--crashes-directory/.exec(e))return"electron-crash-reporter";if(/\\pipe\\winpty-control/.exec(e))return"winpty-process";if(/conhost\.exe/.exec(e))return"console-window-host (Windows internal process)";var n=/--type=([a-zA-Z-]+)/.exec(e);if(n&&2===n.length)return"renderer"===n[1]?t.exec(e)?"window":"shared-process":n[1];var r=/[a-zA-Z-]+\.js/g,i="";do{(n=r.exec(e))&&(i+=n+" ")}while(n);return i&&0!==e.indexOf("node ")?"electron_node "+i:e}var c,u=new Map;if("win32"===process.platform)new Promise(function(t,n){e(["windows-process-tree"],t,n)}).then(function(e){ e.getProcessList(t,function(n){e.getProcessCpuUsage(n,function(e){var n=new Map;e.forEach(function(e){var t=function(e){return 0===e.indexOf("\\\\?\\")?e.substr(4):0===e.indexOf("\\??\\")?e.substr(4):0===e.indexOf('"\\\\?\\')?'"'+e.substr(5):0===e.indexOf('"\\??\\')?'"'+e.substr(5):e}(e.commandLine);n.set(e.pid,{name:s(t),cmd:t,pid:e.pid,ppid:e.ppid,load:e.cpu,mem:e.memory})}),(c=n.get(t))?(n.forEach(function(e){var t=n.get(e.ppid);t&&(t.children||(t.children=[]),t.children.push(e))}),n.forEach(function(e){e.children&&(e.children=e.children.sort(function(e,t){return e.pid-t.pid}))}),i(c)):o(new Error("Root process "+t+" not found"))})},e.ProcessDataFlag.CommandLine|e.ProcessDataFlag.Memory)});else{var l=/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/;n.exec("/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=",{maxBuffer:1024e3},function(t,s,d){if(t||d)o(t||d.toString());else{for(var p=0,f=s.toString().split("\n");p<f.length;p++){var h=f[p],v=l.exec(h.trim()) ;v&&6===v.length&&a(parseInt(v[1]),parseInt(v[2]),v[5],parseFloat(v[3]),parseFloat(v[4]))}if("linux"===process.platform){for(var g=[c],m=[];g.length;){var y=g.shift();m.push(y.pid),y.children&&(g=g.concat(y.children))}var w=r.default.parse(e.toUrl("vs/base/node/cpuUsage.sh")).fsPath;w+=" "+m.join(" "),n.exec(w,{},function(e,t,n){if(e||n)o(e||n.toString());else{for(var r=t.toString().split("\n"),a=0;a<m.length;a++)u.get(m[a]).load=parseFloat(r[a]);i(c)}})}else i(c)}})}})}}),define(e[131],t([0,1,27,9,40]),function(e,t,n,r,a){"use strict";function s(e){var t=[];return e.forEach(function(e,n){return t.push({name:n,count:e})}),t.sort(function(e,t){return t.count-e.count})}function c(e,t){function a(e,t,s,c){var u=this,l=[];n.readdir(e,function(p,f){return i(u,void 0,void 0,function(){var i,u,h,v,g,m;return o(this,function(o){if(p)return[2,c(l)];if(0===(i=f.length))return[2,c(l)];for(u=function(o){if(s.maxReached)return{value:c(l)};n.stat(r.join(e,o),function(n,u){if(n){if(0==--i)return c(l) }else u.isDirectory()?-1===t.indexOf(o)?a(r.join(e,o),t,s,function(e){if(l=l.concat(e),0==--i)return c(l)}):0==--i&&c(l):(s.count>=d&&(s.maxReached=!0),s.count++,l.push(o),0==--i&&c(l))})},h=0,v=f;h<v.length;h++)if(g=v[h],"object"==typeof(m=u(g)))return[2,m.value];return[2]})})})}var c=[{tag:"grunt.js",pattern:/^gruntfile\.js$/i},{tag:"gulp.js",pattern:/^gulpfile\.js$/i},{tag:"tsconfig.json",pattern:/^tsconfig\.json$/i},{tag:"package.json",pattern:/^package\.json$/i},{tag:"jsconfig.json",pattern:/^jsconfig\.json$/i},{tag:"tslint.json",pattern:/^tslint\.json$/i},{tag:"eslint.json",pattern:/^eslint\.json$/i},{tag:"tasks.json",pattern:/^tasks\.json$/i},{tag:"launch.json",pattern:/^launch\.json$/i},{tag:"settings.json",pattern:/^settings\.json$/i},{tag:"webpack.config.js",pattern:/^webpack\.config\.js$/i},{tag:"project.json",pattern:/^project\.json$/i},{tag:"makefile",pattern:/^makefile$/i},{tag:"sln",pattern:/^.+\.sln$/i},{tag:"csproj",pattern:/^.+\.csproj$/i},{tag:"cmake",pattern:/^.+\.cmake$/i }],u=new Map,l=new Map,d=2e4,p=function(e){if(e.lastIndexOf(".")>=0){var t=e.split(".").pop();t&&function(e){u.has(e)?u.set(e,u.get(e)+1):u.set(e,1)}(t)}!function(e){for(var t=0,n=c;t<n.length;t++){var r=n[t];r.pattern.test(e)&&(l.has(r.tag)?l.set(r.tag,l.get(r.tag)+1):l.set(r.tag,1))}}(e)},f={count:0,maxReached:!1};return new Promise(function(n,r){a(e,t,f,function(e){e.forEach(p),n({configFiles:s(l),fileTypes:s(u),fileCount:f.count,maxFilesReached:f.maxReached})})})}Object.defineProperty(t,"__esModule",{value:!0}),t.collectLaunchConfigs=function(e){var t=new Map,i=r.join(e,".vscode","launch.json");return new Promise(function(e,r){n.exists(i,function(r){if(!r)return e([]);n.readFile(i,function(n,r){if(n)return e([]);var o=[],c=a.parse(r.toString(),o);if(o.length)return console.log("Unable to parse "+i),e([]);if(c.configurations)for(var u=0,l=c.configurations;u<l.length;u++){var d=l[u].type;d&&(t.has(d)?t.set(d,t.get(d)+1):t.set(d,1))}return e(s(t))})})})},t.collectWorkspaceStats=c}), define(e[128],t([0,1,27,2]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readExactlyByFile=function(e,t){return new r.TPromise(function(r,i){n.open(e,"r",null,function(e,o){function a(e,t,a){n.close(o,function(n){return n?i(n):e&&"EISDIR"===e.code?i(e):r({buffer:t,bytesRead:a})})}function s(){n.read(o,c,u,t-u,null,function(e,n){return e?a(e,null,0):0===n?a(null,c,u):(u+=n)===t?a(null,c,u):s()})}if(e)return i(e);var c=Buffer.allocUnsafe(t),u=0;s()})})},t.readToMatchingString=function(e,t,i,o){return new r.TPromise(function(r,a){return n.open(e,"r",null,function(s,c){function u(e,t){n.close(c,function(n){return n?a(n):e&&"EISDIR"===e.code?a(e):r(t)})}function l(){n.read(c,d,p,i,null,function(n,r){if(n)return u(n,null);if(0===r)return u(null,null);p+=r;var i=d.indexOf(t);return i>=0?u(null,d.toString("utf8").substr(0,i)):p>=o?u(new Error("Could not find "+t+" in first "+o+" bytes of "+e),null):l()})}if(s)return a(s);var d=Buffer.allocUnsafe(o),p=0;l()})})}}), define(e[127],t([0,1,128,180,2,3,49,181,24]),function(e,t,r,i,o,a,s,c,u){"use strict";function l(e){return i.decodeStream(d(e))}function d(e){return e===t.UTF8_with_bom?t.UTF8:e}function p(e,n){if(!e||n<2)return null;var r=e.readUInt8(0),i=e.readUInt8(1);if(254===r&&255===i)return t.UTF16be;if(255===r&&254===i)return t.UTF16le;if(n<3)return null;var o=e.readUInt8(2);return 239===r&&187===i&&191===o?t.UTF8:null}function f(t){return u.asWinJSImport(new Promise(function(t,n){e(["jschardet"],t,n)})).then(function(e){e.Constants.MINIMUM_THRESHOLD=g;var n=e.detect(t);if(!n||!n.encoding)return null;var r=n.encoding.toLowerCase();return 0<=m.indexOf(r)?null:h(n.encoding)})}function h(e){var t=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return y[t]||t}function v(e,n){var r=e.buffer,i=e.bytesRead,o=p(r,i),a=!1;if(o!==t.UTF16be&&o!==t.UTF16le){for(var s=!0,c=!0,u=!1,l=0;l<i&&l<w;l++){var d=l%2==1,h=0===r.readInt8(l);if(h&&(u=!0),s&&(d&&!h||!d&&h)&&(s=!1),c&&(d&&h||!d&&!h)&&(c=!1),h&&!s&&!c)break} u&&(s?o=t.UTF16le:c?o=t.UTF16be:a=!0)}return!n||a||o?{seemsBinary:a,encoding:o}:f(r.slice(0,i)).then(function(e){return{seemsBinary:!1,encoding:e}})}Object.defineProperty(t,"__esModule",{value:!0}),t.UTF8="utf8",t.UTF8_with_bom="utf8bom",t.UTF16be="utf16be",t.UTF16le="utf16le",t.toDecodeStream=function(e,r){return r.minBytesRequiredForDetection||(r.minBytesRequiredForDetection=r.guessEncoding?S:b),r.overwriteEncoding||(r.overwriteEncoding=function(e){return e||t.UTF8}),new o.TPromise(function(t,i){e.pipe(new(function(e){function i(t){var n=e.call(this,t)||this;return n._buffer=[],n._bytesBuffered=0,n.once("finish",function(){return n._finish()}),n}return n(i,e),i.prototype._write=function(e,t,n){Buffer.isBuffer(e)||n(new Error("data must be a buffer")),this._decodeStream?this._decodeStream.write(e,n):(this._buffer.push(e),this._bytesBuffered+=e.length,this._decodeStreamConstruction?this._decodeStreamConstruction.then(function(e){return n()},function(e){return n(e) }):this._bytesBuffered>=r.minBytesRequiredForDetection?this._startDecodeStream(n):n())},i.prototype._startDecodeStream=function(e){var n=this;this._decodeStreamConstruction=o.TPromise.as(v({buffer:Buffer.concat(this._buffer),bytesRead:this._bytesBuffered},r.guessEncoding)).then(function(i){i.encoding=r.overwriteEncoding(i.encoding),n._decodeStream=l(i.encoding);for(var o=0,a=n._buffer;o<a.length;o++){var s=a[o];n._decodeStream.write(s)}e(),t({detected:i,stream:n._decodeStream})},function(t){n.emit("error",t),e(t)})},i.prototype._finish=function(){var e=this;this._decodeStream?this._decodeStream.end():this._startDecodeStream(function(){return e._decodeStream.end()})},i}(c.Writable)))})},t.bomLength=function(e){switch(e){case t.UTF8:return 3;case t.UTF16be:case t.UTF16le:return 2}return 0},t.decode=function(e,t){return i.decode(e,d(t))},t.encode=function(e,t,n){return i.encode(e,d(t),n)},t.encodingExists=function(e){return i.encodingExists(d(e))},t.decodeStream=l,t.encodeStream=function(e,t){ return i.encodeStream(d(e),t)},t.detectEncodingByBOMFromBuffer=p,t.detectEncodingByBOM=function(e){return r.readExactlyByFile(e,3).then(function(e){return p(e.buffer,e.bytesRead)})};var g=.2,m=["ascii","utf-8","utf-16","utf-32"];t.guessEncodingByBuffer=f;var y={ibm866:"cp866",big5:"cp950"};t.toCanonicalName=function(e){switch(e){case"shiftjis":return"shift-jis";case"utf16le":return"utf-16le";case"utf16be":return"utf-16be";case"big5hkscs":return"big5-hkscs";case"eucjp":return"euc-jp";case"euckr":return"euc-kr";case"koi8r":return"koi8-r";case"koi8u":return"koi8-u";case"macroman":return"x-mac-roman";case"utf8bom":return"utf8";default:var t=e.match(/windows(\d+)/);return t?"windows-"+t[1]:e}};var w=512,b=512,S=4096;t.detectEncodingFromBuffer=v;var _={437:"cp437",850:"cp850",852:"cp852",855:"cp855",857:"cp857",860:"cp860",861:"cp861",863:"cp863",865:"cp865",866:"cp866",869:"cp869",936:"cp936",1252:"cp1252"};t.resolveTerminalEncoding=function(e){var n,r=process.env.VSCODE_CLI_ENCODING ;return r?(e&&console.log("Found VSCODE_CLI_ENCODING variable: "+r),n=o.TPromise.as(r)):n=a.isLinux||a.isMacintosh?new o.TPromise(function(t){e&&console.log('Running "locale charmap" to detect terminal encoding...'),s.exec("locale charmap",function(e,n,r){return t(n)})}):new o.TPromise(function(t){e&&console.log('Running "chcp" to detect terminal encoding...'),s.exec("chcp",function(e,n,r){if(n)for(var i=Object.keys(_),o=0;o<i.length;o++){var a=i[o];if(n.indexOf(a)>=0)return t(_[a])}return t(void 0)})}),n.then(function(n){if(e&&console.log("Detected raw terminal encoding: "+n),!n||"utf-8"===n.toLowerCase()||n.toLowerCase()===t.UTF8)return t.UTF8;var r=h(n);return i.encodingExists(r)?r:(e&&console.log("Unsupported terminal encoding, falling back to UTF-8."),t.UTF8)})}}),define(e[34],t([0,1,27,9,24,64,3,17,42,2,127,147]),function(e,t,n,r,i,o,a,s,c,u,l,d){"use strict";function p(e){return a.isMacintosh?n.readdirSync(e).map(function(e){return o.normalizeNFC(e)}):n.readdirSync(e)}function f(e,t){ return a.isMacintosh?n.readdir(e,function(e,n){return e?t(e,null):t(null,n.map(function(e){return o.normalizeNFC(e)}))}):n.readdir(e,t)}function h(e,t,i,o){o||(o=Object.create(null)),n.stat(e,function(a,s){if(a)return i(a);if(!s.isDirectory())return function(e,t,r,i){var o=n.createReadStream(e),a=n.createWriteStream(t,{mode:r}),s=!1,c=function(e){s||(s=!0,e?i(e):n.chmod(t,r,i))};o.once("error",function(e){return c(e)}),a.once("error",function(e){return c(e)}),a.once("close",function(){return c()}),o.pipe(a)}(e,t,511&s.mode,i);if(o[e])return i(null);o[e]=!0;var c=function(){f(e,function(n,a){_(a,function(n,i){h(r.join(e,n),r.join(t,n),function(e){return i(e,void 0)},o)},i)})};v(t,511&s.mode).done(c,c)})}function v(e,t){var o=function(){return i.nfcall(n.mkdir,e,t).then(null,function(t){return"ENOENT"===t.code?u.TPromise.wrapError(t):i.nfcall(n.stat,e).then(function(t){return t.isDirectory()?null:u.TPromise.wrapError(new Error("'"+e+"' exists and is not a directory."))},function(e){ return u.TPromise.wrapError(t)})})};return e===r.dirname(e)?u.TPromise.as(!0):o().then(null,function(n){return"ENOENT"===n.code?v(r.dirname(e),t).then(o):u.TPromise.wrapError(n)})}function g(e,t){if("\\"===e||"/"===e)return t(new Error("Will not delete root!"));n.exists(e,function(i){i?n.lstat(e,function(i,o){if(i||!o)t(i);else if(!o.isDirectory()||o.isSymbolicLink()){var a=o.mode;128&a?n.unlink(e,t):n.chmod(e,128|a,function(r){r?t(r):n.unlink(e,t)})}else f(e,function(i,o){if(i||!o)t(i);else if(0===o.length)n.rmdir(e,t);else{var a=null,s=o.length;o.forEach(function(i){g(r.join(e,i),function(r){s--,r&&(a=a||r),0===s&&(a?t(a):n.rmdir(e,t))})})}})}):t(null)})}function m(e){try{var t=n.lstatSync(e);t.isDirectory()&&!t.isSymbolicLink()?(p(e).forEach(function(t){return m(r.join(e,t))}),n.rmdirSync(e)):n.unlinkSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}}function y(e,t,r,i){r=w(r),"string"==typeof t||Buffer.isBuffer(t)?function(e,t,r,i){r.encoding&&(t=l.encode(t,r.encoding.charset,{addBOM:r.encoding.addBOM }));if(!C)return n.writeFile(e,t,{mode:r.mode,flag:r.flag},i);n.open(e,r.flag,r.mode,function(e,r){if(e)return i(e);n.writeFile(r,t,function(e){if(e)return n.close(r,function(){return i(e)});n.fdatasync(r,function(e){return e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),C=!1),n.close(r,function(e){return i(e)})})})})}(e,t,r,i):function(e,t,r,i){var o,a,s=!1,c=function(e){s||(s=!0,e?a?(u.once("close",function(){return i(e)}),u.close()):i(e):i())},u=n.createWriteStream(e,{mode:r.mode,flags:r.flag,autoClose:!1});u.once("open",function(e){o=e,a=!0,r.encoding&&(t=t.pipe(l.encodeStream(r.encoding.charset,{addBOM:r.encoding.addBOM}))),t.pipe(u)}),t.once("error",function(e){return c(e)}),u.once("error",function(e){return c(e)}),u.once("finish",function(){C&&a?n.fdatasync(o,function(e){e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),C=!1),u.close()}):u.close()}),u.once("close",function(){return c()})}(e,t,r,i)} function w(e){if(!e)return{mode:438,flag:"w"};var t={mode:e.mode,flag:e.flag,encoding:e.encoding};return"number"!=typeof t.mode&&(t.mode=438),"string"!=typeof t.flag&&(t.flag="w"),t}function b(e){var t=r.dirname(e);if(e===t)return e;var n=(r.basename(e)||e).toLowerCase();try{var i=p(t).filter(function(e){return e.toLowerCase()===n});if(1===i.length){if(a=b(t))return r.join(a,i[0])}else if(i.length>1){var o=i.indexOf(n);if(o>=0){var a=b(t);if(a)return r.join(a,i[o])}}}catch(e){}return null}function S(e){return s.rtrim(r.normalize(e),r.sep)}Object.defineProperty(t,"__esModule",{value:!0});var _=d.loop;t.readdirSync=p,t.readdir=f,t.statLink=function(e,t){n.lstat(e,function(r,i){r||i.isSymbolicLink()?n.stat(e,function(e,n){if(e)return t(e,null);t(null,{stat:n,isSymbolicLink:i&&i.isSymbolicLink()})}):t(null,{stat:i,isSymbolicLink:!1})})},t.copy=h,t.mkdirp=v,t.del=function(e,t,i,o){n.exists(e,function(a){if(!a)return i(null);n.stat(e,function(a,u){if(a||!u)return i(a) ;if("."===e[e.length-1]||s.endsWith(e,"./")||s.endsWith(e,".\\"))return g(e,i);var l=r.join(t,c.generateUuid());n.rename(e,l,function(t){if(t)return g(e,i);i(null),g(l,function(e){e&&console.error(e),o&&o(e)})})})})},t.delSync=m,t.mv=function(e,t,r){function i(e){if(e)return r(e);n.stat(t,function(e,i){return e?r(e):i.isDirectory()?r(null):void n.open(t,"a",null,function(e,t){if(e)return r(e);n.futimes(t,i.atime,new Date,function(e){if(e)return r(e);n.close(t,r)})})})}if(e===t)return r(null);n.rename(e,t,function(n){return n?n&&e.toLowerCase()!==t.toLowerCase()&&"EXDEV"===n.code||s.endsWith(e,".")?h(e,t,function(t){if(t)return r(t);g(e,i)}):r(n):i(null)})};var C=!0;t.writeFileAndFlush=y,t.writeFileAndFlushSync=function(e,t,r){if((r=w(r)).encoding&&(t=l.encode(t,r.encoding.charset,{addBOM:r.encoding.addBOM})),!C)return n.writeFileSync(e,t,{mode:r.mode,flag:r.flag});var i=n.openSync(e,r.flag,r.mode);try{n.writeFileSync(i,t);try{n.fdatasyncSync(i)}catch(e){ console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",e),C=!1}}finally{n.closeSync(i)}},t.realcaseSync=b,t.realpathSync=function(e){try{return n.realpathSync(e)}catch(r){var t=S(e);return n.accessSync(t,n.constants.R_OK),t}},t.realpath=function(e,t){return n.realpath(e,function(r,i){if(!r)return t(null,i);var o=S(e);return n.access(o,n.constants.R_OK,function(e){return t(e,o)})})},t.watch=function(e,t,r){try{var i=n.watch(e);return i.on("change",function(e,n){var r=null;n&&(r=n.toString(),a.isMacintosh&&(r=o.normalizeNFC(r))),t(e,r)}),i.on("error",function(t,n){return r("Failed to watch "+e+" for changes ("+t+", "+n+")")}),i}catch(t){n.exists(e,function(n){n&&r("Failed to watch "+e+" for changes ("+t.toString()+")")})}}}),define(e[63],t([0,1,27,9,15,13,5,40,34,3]),function(e,t,n,r,i,o,a,s,c,u){"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=c.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&&(u.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[35],t([0,1,2,34,9,24,27,26,3,5]),function(e,t,n,r,i,o,a,s,c,u){"use strict";function l(e){return o.nfcall(r.readdir,e)}function d(e){return f(e).then(function(t){ return t.isDirectory()&&!t.isSymbolicLink()?l(e).then(function(t){return n.TPromise.join(t.map(function(t){return d(i.join(e,t))}))}).then(function(){return h(e)}):v(e)},function(e){if("ENOENT"!==e.code)return n.TPromise.wrapError(e)})}function p(e){return o.nfcall(a.stat,e)}function f(e){return o.nfcall(a.lstat,e)}function h(e){return o.nfcall(a.rmdir,e)}function v(e){return o.nfcall(a.unlink,e)}function g(e,t,n){return function(e){var t=w[e];if(!t){t=new o.Queue,w[e]=t;u.once(t.onFinished)(function(){delete w[e],t.dispose()})}return t}(function(e){var t=e;(c.isWindows||c.isMacintosh)&&(t=t.toLowerCase());return t}(e)).queue(function(){return o.nfcall(r.writeFileAndFlush,e,t,n)})}function m(e){return p(e).then(function(e){return e.isDirectory()},function(){return!1})}function y(e,t){return void 0===t&&(b||(b=s.tmpdir()),t=b),o.nfcall(r.del,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=l,t.exists=function(e){return new n.TPromise(function(t){return a.exists(e,t)},function(){})}, t.chmod=function(e,t){return o.nfcall(a.chmod,e,t)},t.mkdirp=r.mkdirp,t.rimraf=d,t.realpath=function(e){return o.nfcall(r.realpath,e)},t.stat=p,t.statLink=function(e){return o.nfcall(r.statLink,e)},t.lstat=f,t.rename=function(e,t){return o.nfcall(a.rename,e,t)},t.rmdir=h,t.unlink=v,t.symlink=function(e,t,n){return o.nfcall(a.symlink,e,t,n)},t.readlink=function(e){return o.nfcall(a.readlink,e)},t.truncate=function(e,t){return o.nfcall(a.truncate,e,t)},t.readFile=function(e,t){return o.nfcall(a.readFile,e,t)};var w=Object.create(null);t.writeFile=g,t.readDirsInDir=function(e){return l(e).then(function(t){return n.TPromise.join(t.map(function(t){return m(i.join(e,t))})).then(function(e){return t.filter(function(t,n){return e[n]})})})},t.dirExists=m,t.fileExists=function(e){return p(e).then(function(e){return e.isFile()},function(){return!1})};var b=null;t.del=y,t.whenDeleted=function(e){return new n.TPromise(function(t){var n=!1,r=setInterval(function(){n||(n=!0,a.exists(e,function(e){n=!1,e||(clearInterval(r), t(null))}))},1e3)})},t.copy=function(e,t){return o.nfcall(r.copy,e,t)}}),define(e[43],t([0,1,2,13,5]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){e[e.RequestCommon=0]="RequestCommon",e[e.RequestCancel=1]="RequestCancel",e[e.ResponseInitialize=2]="ResponseInitialize",e[e.ResponseSuccess=3]="ResponseSuccess",e[e.ResponseProgress=4]="ResponseProgress",e[e.ResponseError=5]="ResponseError",e[e.ResponseErrorObj=6]="ResponseErrorObj"}(o||(o={}));var a;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(a||(a={}));var s=function(){function e(e){var t=this;this.protocol=e,this.channels=Object.create(null),this.activeRequests=Object.create(null),this.protocolListener=this.protocol.onMessage(function(e){return t.onMessage(e)}),this.protocol.send({type:o.ResponseInitialize})}return e.prototype.registerChannel=function(e,t){this.channels[e]=t},e.prototype.onMessage=function(e){switch(e.type){case o.RequestCommon:this.onCommonRequest(e);break ;case o.RequestCancel:this.onCancelRequest(e)}},e.prototype.onCommonRequest=function(e){var t,i=this,a=this.channels[e.channelName];try{t=a.call(e.name,e.arg)}catch(e){t=n.TPromise.wrapError(e)}var s=e.id,c=t.then(function(t){i.protocol.send({id:s,data:t,type:o.ResponseSuccess}),delete i.activeRequests[e.id]},function(t){t instanceof Error?i.protocol.send({id:s,data:{message:t.message,name:t.name,stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:o.ResponseError}):i.protocol.send({id:s,data:t,type:o.ResponseErrorObj}),delete i.activeRequests[e.id]},function(e){i.protocol.send({id:s,data:e,type:o.ResponseProgress})});this.activeRequests[e.id]=r.toDisposable(function(){return c.cancel()})},e.prototype.onCancelRequest=function(e){var t=this.activeRequests[e.id];t&&(t.dispose(),delete this.activeRequests[e.id])},e.prototype.dispose=function(){var e=this;this.protocolListener.dispose(),this.protocolListener=null,Object.keys(this.activeRequests).forEach(function(t){e.activeRequests[t].dispose()}), this.activeRequests=null},e}();t.ChannelServer=s;var c=function(){function e(e){var t=this;this.protocol=e,this.state=a.Uninitialized,this.activeRequests=[],this.bufferedRequests=[],this.handlers=Object.create(null),this.lastRequestId=0,this.protocolListener=this.protocol.onMessage(function(e){return t.onMessage(e)})}return e.prototype.getChannel=function(e){var t=this;return{call:function(n,r){return t.request(e,n,r)}}},e.prototype.request=function(e,t,n){var r=this,i={raw:{id:this.lastRequestId++,type:o.RequestCommon,channelName:e,name:t,arg:n}},s=this.state===a.Uninitialized?this.bufferRequest(i):this.doRequest(i);return this.activeRequests.push(s),s.then(null,function(e){return null}).done(function(){return r.activeRequests=r.activeRequests.filter(function(e){return e!==s})}),s},e.prototype.doRequest=function(e){var t=this,r=e.raw.id;return new n.TPromise(function(n,i,a){t.handlers[r]=function(e){switch(e.type){case o.ResponseSuccess:delete t.handlers[r],n(e.data);break;case o.ResponseError: delete t.handlers[r];var s=new Error(e.data.message);s.stack=e.data.stack,s.name=e.data.name,i(s);break;case o.ResponseErrorObj:delete t.handlers[r],i(e.data);break;case o.ResponseProgress:a(e.data)}},t.send(e.raw)},function(){return t.send({id:r,type:o.RequestCancel})})},e.prototype.bufferRequest=function(e){var t=this,r=null;return new n.TPromise(function(n,i,o){t.bufferedRequests.push(e),e.flush=function(){e.flush=null,r=t.doRequest(e).then(n,i,o)}},function(){if(e.flush=null,t.state===a.Uninitialized){var n=t.bufferedRequests.indexOf(e);-1!==n&&t.bufferedRequests.splice(n,1)}else r&&(r.cancel(),r=null)})},e.prototype.onMessage=function(e){if(function(e){return e>=o.ResponseInitialize}(e.type)){if(this.state===a.Uninitialized&&e.type===o.ResponseInitialize)return this.state=a.Idle,this.bufferedRequests.forEach(function(e){return e.flush&&e.flush()}),void(this.bufferedRequests=null);var t=this.handlers[e.id];t&&t(e)}},e.prototype.send=function(e){try{this.protocol.send(e)}catch(e){}}, e.prototype.dispose=function(){this.protocolListener.dispose(),this.protocolListener=null,this.activeRequests.forEach(function(e){return e.cancel()}),this.activeRequests=[]},e}();t.ChannelClient=c;var u=function(){function e(e){var t=this;this.channels=Object.create(null),this.channelClients=Object.create(null),this.onClientAdded=new i.Emitter,e(function(e){var n=e.protocol,r=e.onDidClientDisconnect;i.once(n.onMessage)(function(e){var i=new s(n),o=new c(n);Object.keys(t.channels).forEach(function(e){return i.registerChannel(e,t.channels[e])}),t.channelClients[e]=o,t.onClientAdded.fire(e),r(function(){i.dispose(),o.dispose(),delete t.channelClients[e]})})})}return e.prototype.getChannel=function(e,t){var r=this;return{call:function(i,o){var a=t.route(i,o);return a?r.getClient(a).then(function(t){return t.getChannel(e).call(i,o)}):n.TPromise.wrapError(new Error("Client id should be provided"))}}},e.prototype.registerChannel=function(e,t){this.channels[e]=t},e.prototype.getClient=function(e){ var t=this,r=this.channelClients[e];return r?n.TPromise.as(r):new n.TPromise(function(n){i.once(i.filterEvent(t.onClientAdded.event,function(t){return t===e}))(function(){return n(t.channelClients[e])})})},e.prototype.dispose=function(){this.channels=Object.create(null),this.channelClients=Object.create(null),this.onClientAdded.dispose()},e}();t.IPCServer=u;var l=function(){function e(e,t){e.send(t),this.channelClient=new c(e),this.channelServer=new s(e)}return e.prototype.getChannel=function(e){return this.channelClient.getChannel(e)},e.prototype.registerChannel=function(e,t){this.channelServer.registerChannel(e,t)},e.prototype.dispose=function(){this.channelClient.dispose(),this.channelClient=null,this.channelServer.dispose(),this.channelServer=null},e}();t.IPCClient=l,t.getDelayedChannel=function(e){return{call:function(t,n){return e.then(function(e){return e.call(t,n)})}}},t.getNextTickChannel=function(e){var t=!1;return{call:function(r,i){return t?e.call(r,i):n.TPromise.timeout(0).then(function(){ return t=!0}).then(function(){return e.call(r,i)})}}},t.eventToCall=function(e,t){void 0===t&&(t=function(e){return e});var r;return new n.TPromise(function(n,i,o){return r=e(function(e){return o(t(e))})},function(){return r.dispose()})},t.eventFromCall=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=function(e){return e});var o,a=new i.Emitter({onFirstListenerAdd:function(){o=e.call(t,n).then(null,function(e){return null},function(e){return a.fire(r(e))})},onLastListenerRemove:function(){o.cancel(),o=null}});return a.event}}),define(e[121],t([0,1,13,5]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.sender=e;var n=new r.Emitter;t(function(e){return n.fire(e)}),this._onMessage=n.event}return Object.defineProperty(e.prototype,"onMessage",{get:function(){return this._onMessage},enumerable:!0,configurable:!0}),e.prototype.send=function(e){try{this.sender.send("ipc:message",e)}catch(e){}},e.prototype.dispose=function(){ this.listener=n.dispose(this.listener)},e}();t.Protocol=i}),define(e[119],t([0,1,5,43,121,10]),function(e,t,r,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return e.call(this,t.getOnDidClientConnect())||this}return n(t,e),t.getOnDidClientConnect=function(){var e=r.fromNodeEventEmitter(a.ipcMain,"ipc:hello",function(e){return e.sender});return r.mapEvent(e,function(e){var t=function(e){var t=r.fromNodeEventEmitter(a.ipcMain,"ipc:message",function(e,t){return{event:e,message:t}}),n=r.filterEvent(t,function(t){return t.event.sender.getId()===e});return r.mapEvent(n,function(e){return e.message})}(e.getId());return{protocol:new o.Protocol(e,t),onDidClientDisconnect:r.fromNodeEventEmitter(e,"destroyed")}})},t}(i.IPCServer);t.Server=s}),define(e[50],t([0,1,183,2,5,43,9,26,42]),function(e,t,r,i,o,a,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomPipeName=function(){var e=u.generateUuid() ;return"win32"===process.platform?"\\\\.\\pipe\\vscode-ipc-"+e+"-sock":s.join(c.tmpdir(),"vscode-ipc-"+e+".sock")};var l=function(){function e(t,n){var r=this;this._socket=t,this._onMessage=new o.Emitter,this.onMessage=this._onMessage.event,this._writeBuffer=new(function(){function e(){this._data=[],this._totalLength=0}return e.prototype.add=function(e,t){var n=0===this._totalLength;return this._data.push(e,t),this._totalLength+=e.length+t.length,n},e.prototype.take=function(){var e=Buffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,e},e}());var i=[],a=0,s={readHead:!0,bodyIsJson:!1,bodyLen:-1},c=function(t){for(i.push(t),a+=t.length;a>0;){if(s.readHead){if(!(a>=e._headerLen))break;n=Buffer.concat(i);s.bodyIsJson=1===n.readInt8(0),s.bodyLen=n.readInt32BE(1),s.readHead=!1;c=n.slice(e._headerLen);a=c.length,i=[c]}if(!s.readHead){if(!(a>=s.bodyLen))break;var n,o=(n=Buffer.concat(i)).toString("utf8",0,s.bodyLen);s.bodyIsJson&&(o=JSON.parse(o)),r._onMessage.fire(o) ;var c=n.slice(s.bodyLen);a=c.length,i=[c],s.bodyIsJson=!1,s.bodyLen=-1,s.readHead=!0}}},u=function(){if(n&&n.length>0){var e=n;n=null,c(e)}};t.on("data",function(e){u(),c(e)}),t.on("end",function(){u()})}return e.prototype.send=function(t){var n=Buffer.alloc(e._headerLen);"string"!=typeof t&&(t=JSON.stringify(t),n.writeInt8(1,0));var r=Buffer.from(t);n.writeInt32BE(r.length,1),this._writeSoon(n,r)},e.prototype._writeSoon=function(e,t){var n=this;this._writeBuffer.add(e,t)&&setImmediate(function(){n._socket.destroyed||n._socket.write(n._writeBuffer.take())})},e._headerLen=17,e}();t.Protocol=l;var d=function(e){function t(n){var r=e.call(this,t.toClientConnectionEvent(n))||this;return r.server=n,r}return n(t,e),t.toClientConnectionEvent=function(e){var t=o.fromNodeEventEmitter(e,"connection");return o.mapEvent(t,function(e){return{protocol:new l(e),onDidClientDisconnect:o.once(o.fromNodeEventEmitter(e,"close"))}})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.server.close(), this.server=null},t}(a.IPCServer);t.Server=d;var p=function(e){function t(t,n){var r=e.call(this,new l(t),n)||this;return r.socket=t,r._onClose=new o.Emitter,t.once("close",function(){return r._onClose.fire()}),r}return n(t,e),Object.defineProperty(t.prototype,"onClose",{get:function(){return this._onClose.event},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.socket.end(),this.socket=null},t}(a.IPCClient);t.Client=p,t.serve=function(e){return new i.TPromise(function(t,n){var i=r.createServer();i.on("error",n),i.listen(e,function(){i.removeListener("error",n),t(new d(i))})})},t.connect=function(e,t){return new i.TPromise(function(n,i){var o=r.createConnection(e,function(){o.removeListener("error",i),n(new p(o,t))});o.once("error",i)})}});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};define(e[116],t([0,1,15,48,2,10,24]),function(e,t,n,r,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function t(e,t,n,r,i){this.environmentService=e,this.lifecycleService=t,this.logService=n,this.machineId=r,this.userEnv=i,this.barrier=new s.Barrier}return Object.defineProperty(t.prototype,"_whenReady",{get:function(){var t=this;this.window=new o.BrowserWindow({show:!1,webPreferences:{images:!1,webaudio:!1,webgl:!1}});var r=n.assign({appRoot:this.environmentService.appRoot,machineId:this.machineId,nodeCachedDataDir:this.environmentService.nodeCachedDataDir,userEnv:this.userEnv}),a=e.toUrl("vs/code/electron-browser/sharedProcess/sharedProcess.html")+"?config="+encodeURIComponent(JSON.stringify(r));this.window.loadURL(a);var s=function(e){ t.logService.trace("SharedProcess#close prevented"),e.preventDefault(),t.window.isVisible()&&t.window.hide()};return this.window.on("close",s),this.lifecycleService.onShutdown(function(){t.window.removeListener("close",s),setTimeout(function(){try{t.window.close()}catch(e){}t.window=null},0)}),new i.TPromise(function(e,n){o.ipcMain.once("handshake:hello",function(n){n.sender.send("handshake:hey there",{sharedIPCHandle:t.environmentService.sharedIPCHandle,args:t.environmentService.args,logLevel:t.logService.getLevel()}),o.ipcMain.once("handshake:im ready",function(){return e(null)})})})},enumerable:!0,configurable:!0}),t.prototype.spawn=function(){this.barrier.open()},t.prototype.whenReady=function(){var e=this;return this.barrier.wait().then(function(){return e._whenReady})},t.prototype.toggle=function(){this.window.isVisible()?this.hide():this.show()},t.prototype.show=function(){this.window.show(),this.window.webContents.openDevTools()},t.prototype.hide=function(){this.window.webContents.closeDevTools(), this.window.hide()},a([r.memoize],t.prototype,"_whenReady",null),t}();t.SharedProcess=c}),define(e[73],t([0,1,9,21,17,18,3,20,34]),function(e,t,n,r,i,o,a,s,c){"use strict";function u(e,t){var u=process.env.VSCODE_CWD||process.cwd(),d=e.map(function(e){var r,d=String(e);t&&(d=(r=l(d)).path),d&&(d=function(e,t){a.isWindows&&(t=i.rtrim(t,'"'));t=i.trim(i.trim(t," "),"\t"),a.isWindows&&(t=n.resolve(e,t),t=i.rtrim(t,"."));return t}(u,d));var p;try{p=c.realpathSync(d)}catch(e){p=n.normalize(n.isAbsolute(d)?d:n.join(u,d))}var f=n.basename(p);return f&&!o.isValidBasename(f)?null:t?(r.path=p,function(e){var t=[e.path];s.isNumber(e.line)&&t.push(String(e.line));s.isNumber(e.column)&&t.push(String(e.column));return t.join(":")}(r)):p}),p=a.isWindows||a.isMacintosh,f=r.distinct(d,function(e){return e&&p?e.toLowerCase():e});return r.coalesce(f)}function l(e){var t,n=null,r=null;if(e.split(":").forEach(function(e){var i=Number(e);s.isNumber(i)?null===n?n=i:null===r&&(r=i):t=t?[t,e].join(":"):e}), !t)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:t,line:null!==n?n:void 0,column:null!==r?r:null!==n?1:void 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaths=function(e){e["open-url"]&&(e._urls=e._,e._=[]);var t=u(e._,e.goto);return e._=t,e.diff=e.diff&&2===t.length,e},t.parseLineAndColumnAware=l}),define(e[110],t([0,1,49,15,42,2,3]),function(e,t,n,r,i,o,a){"use strict";function s(){return void 0===c&&(c=a.isWindows?o.TPromise.as({}):"1"===process.env.VSCODE_CLI?o.TPromise.as({}):new o.TPromise(function(e,t){var o=process.env.ELECTRON_RUN_AS_NODE,a=process.env.ELECTRON_NO_ATTACH_CONSOLE,s=i.generateUuid().replace(/-/g,"").substr(0,12),c=new RegExp(s+"(.*)"+s),u=r.assign({},process.env,{ELECTRON_RUN_AS_NODE:"1",ELECTRON_NO_ATTACH_CONSOLE:"1"}),l="'"+process.execPath+"' -p '\""+s+'" + JSON.stringify(process.env) + "'+s+"\"'",d=n.spawn(process.env.SHELL,["-ilc",l],{detached:!0,stdio:["ignore","pipe",process.stderr],env:u}),p=[];d.on("error",function(){ return e({})}),d.stdout.on("data",function(e){return p.push(e)}),d.on("close",function(n,r){if(0!==n)return t(new Error("Failed to get environment"));var i=Buffer.concat(p).toString("utf8"),s=c.exec(i),u=s?s[1]:"{}";try{var l=JSON.parse(u);o?l.ELECTRON_RUN_AS_NODE=o:delete l.ELECTRON_RUN_AS_NODE,a?l.ELECTRON_NO_ATTACH_CONSOLE=a:delete l.ELECTRON_NO_ATTACH_CONSOLE,delete l.XDG_RUNTIME_DIR,e(l)}catch(e){t(e)}})}).then(null,function(){return{}})),c}Object.defineProperty(t,"__esModule",{value:!0});var c;t.getShellEnvironment=s}),define(e[103],t([8,7]),function(e,t){return e.create("vs/base/common/keybindingLabels",t)}),define(e[102],t([0,1,103]),function(e,t,n){"use strict";function r(e,t,n){if(null===t)return"";var r=[];return e.ctrlKey&&r.push(n.ctrlKey),e.shiftKey&&r.push(n.shiftKey),e.altKey&&r.push(n.altKey),e.metaKey&&r.push(n.metaKey),r.push(t),r.join(n.separator)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){void 0===n&&(n=t),this.modifierLabels=[null], this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}return e.prototype.toLabel=function(e,t,n,i,o){return null===t&&null===i?null:function(e,t,n,i,o){var a=r(e,t,o);return null!==i&&(a+=" ",a+=r(n,i,o)),a}(e,t,n,i,this.modifierLabels[o])},e}();t.ModifierLabelProvider=i,t.UILabelProvider=new i({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.localize(0,null),shiftKey:n.localize(1,null),altKey:n.localize(2,null),metaKey:n.localize(3,null),separator:"+"}),t.AriaLabelProvider=new i({ctrlKey:n.localize(4,null),shiftKey:n.localize(5,null),altKey:n.localize(6,null),metaKey:n.localize(7,null),separator:"+"},{ctrlKey:n.localize(8,null),shiftKey:n.localize(9,null),altKey:n.localize(10,null),metaKey:n.localize(11,null),separator:"+"}),t.ElectronAcceleratorLabelProvider=new i({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),t.UserSettingsLabelProvider=new i({ ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"})}),define(e[101],t([8,7]),function(e,t){return e.create("vs/base/common/severity",t)}),define(e[99],t([0,1,101,17]),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[98],t([8,7]),function(e,t){return e.create("vs/code/electron-main/auth",t)}), define(e[94],t([8,7]),function(e,t){return e.create("vs/code/electron-main/logUploader",t)}),define(e[93],t([8,7]),function(e,t){return e.create("vs/code/electron-main/menubar",t)}),define(e[92],t([8,7]),function(e,t){return e.create("vs/code/electron-main/menus",t)}),define(e[75],t([8,7]),function(e,t){return e.create("vs/code/electron-main/window",t)}),define(e[130],t([8,7]),function(e,t){return e.create("vs/code/electron-main/windows",t)}),define(e[76],t([8,7]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[77],t([8,7]),function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)}),define(e[78],t([8,7]),function(e,t){return e.create("vs/platform/dialogs/node/dialogService",t)}),define(e[79],t([8,7]),function(e,t){return e.create("vs/platform/environment/node/argv",t)}),define(e[80],t([8,7]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[81],t([8,7]),function(e,t){ return e.create("vs/platform/extensionManagement/node/extensionGalleryService",t)}),define(e[82],t([8,7]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[83],t([8,7]),function(e,t){return e.create("vs/platform/history/electron-main/historyMainService",t)}),define(e[84],t([8,7]),function(e,t){return e.create("vs/platform/issue/electron-main/issueService",t)}),define(e[85],t([8,7]),function(e,t){return e.create("vs/platform/request/node/request",t)}),define(e[86],t([8,7]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[87],t([8,7]),function(e,t){return e.create("vs/platform/update/node/update.config.contribution",t)}),define(e[88],t([8,7]),function(e,t){return e.create("vs/platform/windows/electron-main/windowsService",t)}),define(e[89],t([8,7]),function(e,t){return e.create("vs/platform/workspaces/common/workspaces",t)}),define(e[90],t([0,1,184,2,99,78]),function(e,t,n,r,i,o){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){}return e.prototype.show=function(e,t,i){var o=this,a=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(),a.cancel()})});return a},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=a}),define(e[51],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[4],t([0,1]),function(e,t){"use strict";function n(e,t,n,r){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:r}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:r}],t[i.DI_TARGET]=t)}function r(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);var t=function(e,r,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,i,!1)};return t.toString=function(){return e},i.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]} }(i=t._util||(t._util={})),t.IInstantiationService=r("instantiationService"),t.createDecorator=r,t.optional=function(e){return function(t,r,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,i,!0)}}}),define(e[60],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBackupMainService=n.createDecorator("backupMainService")}),define(e[95],t([0,1,4,17]),function(e,t,r,i){"use strict";function o(e,t){var n=e.getType(),r=t.getType();if(n!==r)return n-r;switch(n){case a.Defined:case a.Not:case a.Equals:case a.NotEquals:case a.Regex:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And",e[e.Regex=6]="Regex"}(a=t.ContextKeyExprType||(t.ContextKeyExprType={}));var s=function(){function e(){}return e.has=function(e){return new c(e) },e.equals=function(e,t){return new u(e,t)},e.notEquals=function(e,t){return new l(e,t)},e.regex=function(e,t){return new p(e,t)},e.not=function(e){return new d(e)},e.and=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new f(e)},e.deserialize=function(e){var t=this;if(!e)return null;var n=e.split("&&");return new f(n.map(function(e){return t._deserializeOne(e)})).normalize()},e._deserializeOne=function(e){if((e=e.trim()).indexOf("!=")>=0){t=e.split("!=");return new l(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){t=e.split("==");return new u(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){var t=e.split("=~");return new p(t[0].trim(),this._deserializeRegexValue(t[1]))}return/^\!\s*/.test(e)?new d(e.substr(1).trim()):new c(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e._deserializeRegexValue=function(e){ if(i.isFalsyOrWhitespace(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var r=e.slice(t+1,n),o="i"===e[n+1]?"i":"";try{return new RegExp(r,o)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();t.ContextKeyExpr=s;var c=function(){function e(e){this.key=e}return e.prototype.getType=function(){return a.Defined},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyDefinedExpr=c;var u=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return a.Equals},e.prototype.cmp=function(e){ return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new c(this.key):new d(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" == '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyEqualsExpr=u;var l=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return a.NotEquals},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.normalize=function(){ return"boolean"==typeof this.value?this.value?new d(this.key):new c(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" != '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotEqualsExpr=l;var d=function(){function e(e){this.key=e}return e.prototype.getType=function(){return a.Not},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return"!"+this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotExpr=d;var p=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return a.Regex},e.prototype.cmp=function(e){if(this.key<e.key)return-1;if(this.key>e.key)return 1;var t=this.regexp?this.regexp.source:void 0 ;return t<e.regexp.source?-1:t>e.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:void 0;return this.key===t.key&&n===t.regexp.source}return!1},e.prototype.evaluate=function(e){return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){var e=this.regexp?"/"+this.regexp.source+"/"+(this.regexp.ignoreCase?"i":""):"/invalid/";return this.key+" =~ "+e},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyRegexExpr=p;var f=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return a.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,r=this.expr.length;n<r;n++)if(!this.expr[n].equals(t.expr[n]))return!1;return!0}return!1},e.prototype.evaluate=function(e){for(var t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0},e._normalizeArr=function(t){ var n=[];if(t){for(var r=0,i=t.length;r<i;r++){var a=t[r];a&&((a=a.normalize())&&(a instanceof e?n=n.concat(a.expr):n.push(a)))}n.sort(o)}return n},e.prototype.normalize=function(){return 0===this.expr.length?null:1===this.expr.length?this.expr[0]:this},e.prototype.serialize=function(){return 0===this.expr.length?"":1===this.expr.length?this.normalize().serialize():this.expr.map(function(e){return e.serialize()}).join(" && ")},e.prototype.keys=function(){for(var e=[],t=0,n=this.expr;t<n.length;t++){var r=n[t];e.push.apply(e,r.keys())}return e},e}();t.ContextKeyAndExpr=f;var h=function(e){function t(t,n){var r=e.call(this,t)||this;return r._defaultValue=n,r}return n(t,e),t.prototype.bindTo=function(e){return e.createKey(this.key,this._defaultValue)},t.prototype.getValue=function(e){return e.getContextKeyValue(this.key)},t.prototype.toNegated=function(){return s.not(this.key)},t.prototype.isEqualTo=function(e){return s.equals(this.key,e)},t.prototype.notEqualsTo=function(e){return s.notEquals(this.key,e)},t}(c) ;t.RawContextKey=h,t.IContextKeyService=r.createDecorator("contextKeyService"),t.SET_CONTEXT_COMMAND_ID="setContext"}),define(e[96],t([0,1,4,18,77]),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[97],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="driverService",t.IDriver=n.createDecorator(t.ID);var r=function(){function e(e){this.driver=e}return e.prototype.call=function(e,t){switch(e){case"getWindowIds":return this.driver.getWindowIds();case"capturePage":return this.driver.capturePage(t);case"reloadWindow":return this.driver.reloadWindow(t);case"dispatchKeybinding": return this.driver.dispatchKeybinding(t[0],t[1]);case"click":return this.driver.click(t[0],t[1],t[2],t[3]);case"doubleClick":return this.driver.doubleClick(t[0],t[1]);case"setValue":return this.driver.setValue(t[0],t[1],t[2]);case"getTitle":return this.driver.getTitle(t[0]);case"isActiveElement":return this.driver.isActiveElement(t[0],t[1]);case"getElements":return this.driver.getElements(t[0],t[1],t[2]);case"typeInEditor":return this.driver.typeInEditor(t[0],t[1],t[2]);case"getTerminalBuffer":return this.driver.getTerminalBuffer(t[0],t[1]);case"writeInTerminal":return this.driver.writeInTerminal(t[0],t[1],t[2])}},e}();t.DriverChannel=r;var i=function(){function e(e){this.channel=e}return e.prototype.getWindowIds=function(){return this.channel.call("getWindowIds")},e.prototype.capturePage=function(e){return this.channel.call("capturePage",e)},e.prototype.reloadWindow=function(e){return this.channel.call("reloadWindow",e)},e.prototype.dispatchKeybinding=function(e,t){ return this.channel.call("dispatchKeybinding",[e,t])},e.prototype.click=function(e,t,n,r){return this.channel.call("click",[e,t,n,r])},e.prototype.doubleClick=function(e,t){return this.channel.call("doubleClick",[e,t])},e.prototype.setValue=function(e,t,n){return this.channel.call("setValue",[e,t,n])},e.prototype.getTitle=function(e){return this.channel.call("getTitle",[e])},e.prototype.isActiveElement=function(e,t){return this.channel.call("isActiveElement",[e,t])},e.prototype.getElements=function(e,t,n){return this.channel.call("getElements",[e,t,n])},e.prototype.typeInEditor=function(e,t,n){return this.channel.call("typeInEditor",[e,t,n])},e.prototype.getTerminalBuffer=function(e,t){return this.channel.call("getTerminalBuffer",[e,t])},e.prototype.writeInTerminal=function(e,t,n){return this.channel.call("writeInTerminal",[e,t,n])},e}();t.DriverChannelClient=i;var o=function(){function e(e){this.registry=e}return e.prototype.call=function(e,t){switch(e){case"registerWindowDriver": return this.registry.registerWindowDriver(t);case"reloadWindowDriver":return this.registry.reloadWindowDriver(t)}},e}();t.WindowDriverRegistryChannel=o;var a=function(){function e(e){this.channel=e}return e.prototype.registerWindowDriver=function(e){return this.channel.call("registerWindowDriver",e)},e.prototype.reloadWindowDriver=function(e){return this.channel.call("reloadWindowDriver",e)},e}();t.WindowDriverRegistryChannelClient=a;var s=function(){function e(e){this.driver=e}return e.prototype.call=function(e,t){switch(e){case"click":return this.driver.click(t[0],t[1],t[2]);case"doubleClick":return this.driver.doubleClick(t);case"setValue":return this.driver.setValue(t[0],t[1]);case"getTitle":return this.driver.getTitle();case"isActiveElement":return this.driver.isActiveElement(t);case"getElements":return this.driver.getElements(t[0],t[1]);case"typeInEditor":return this.driver.typeInEditor(t[0],t[1]);case"getTerminalBuffer":return this.driver.getTerminalBuffer(t);case"writeInTerminal": return this.driver.writeInTerminal(t[0],t[1])}},e}();t.WindowDriverChannel=s;var c=function(){function e(e){this.channel=e}return e.prototype.click=function(e,t,n){return this.channel.call("click",[e,t,n])},e.prototype.doubleClick=function(e){return this.channel.call("doubleClick",e)},e.prototype.setValue=function(e,t){return this.channel.call("setValue",[e,t])},e.prototype.getTitle=function(){return this.channel.call("getTitle")},e.prototype.isActiveElement=function(e){return this.channel.call("isActiveElement",e)},e.prototype.getElements=function(e,t){return this.channel.call("getElements",[e,t])},e.prototype.typeInEditor=function(e,t){return this.channel.call("typeInEditor",[e,t])},e.prototype.getTerminalBuffer=function(e){return this.channel.call("getTerminalBuffer",e)},e.prototype.writeInTerminal=function(e,t){return this.channel.call("writeInTerminal",[e,t])},e}();t.WindowDriverChannelClient=c}),define(e[11],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[69],t([0,1,80,4]),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.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)});var s=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[100],t([0,1,69]),function(e,t,n){"use strict";function r(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||a(e.id)===a(t.id)}function i(e,t){return e.toLocaleLowerCase()+"."+t.toLocaleLowerCase()}function o(e){return e.manifest?i(e.manifest.publisher,e.manifest.name):e.identifier.id}function a(e){return e.replace(n.EXTENSION_IDENTIFIER_REGEX,function(e,t,n){return i(t,n)})}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=r,t.getGalleryExtensionId=i,t.getGalleryExtensionIdFromLocal=o,t.LOCAL_EXTENSION_ID_REGEX=/^([^.]+\..+)-(\d+\.\d+\.\d+(-.*)?)$/,t.getIdFromLocalExtensionId=function(e){var n=t.LOCAL_EXTENSION_ID_REGEX.exec(e);return a(n&&n[1]?n[1]:e)}, t.adoptToGalleryExtensionId=a,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],c=i(s);c?c.push(s):n.push([s])}return n},t.getLocalExtensionTelemetryData=function(e){return{id:o(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 s({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}}),define(e[47],t([0,1,18,3,4,17,57,20]),function(e,t,r,i,o,a,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileService=o.createDecorator("fileService");!function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={}));!function(e){e[e.FileReadWrite=2]="FileReadWrite",e[e.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",e[e.FileFolderCopy=8]="FileFolderCopy",e[e.PathCaseSensitive=1024]="PathCaseSensitive",e[e.Readonly=2048]="Readonly"}(t.FileSystemProviderCapabilities||(t.FileSystemProviderCapabilities={}));!function(e){e[e.CREATE=0]="CREATE",e[e.DELETE=1]="DELETE",e[e.MOVE=2]="MOVE",e[e.COPY=3]="COPY"}(t.FileOperation||(t.FileOperation={}));var u=function(){function e(e,t,n){this._resource=e,this._operation=t,this._target=n} return Object.defineProperty(e.prototype,"resource",{get:function(){return this._resource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operation",{get:function(){return this._operation},enumerable:!0,configurable:!0}),e}();t.FileOperationEvent=u;var l;!function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(l=t.FileChangeType||(t.FileChangeType={}));var d=function(){function e(e){this._changes=e}return Object.defineProperty(e.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),e.prototype.contains=function(e,t){return!!e&&this._changes.some(function(n){return n.type===t&&(t===l.DELETED?s.isEqualOrParent(e,n.resource,!i.isLinux):s.isEqual(e,n.resource,!i.isLinux))})},e.prototype.getAdded=function(){return this.getOfType(l.ADDED)},e.prototype.gotAdded=function(){return this.hasType(l.ADDED)}, e.prototype.getDeleted=function(){return this.getOfType(l.DELETED)},e.prototype.gotDeleted=function(){return this.hasType(l.DELETED)},e.prototype.getUpdated=function(){return this.getOfType(l.UPDATED)},e.prototype.gotUpdated=function(){return this.hasType(l.UPDATED)},e.prototype.getOfType=function(e){return this._changes.filter(function(t){return t.type===e})},e.prototype.hasType=function(e){return this._changes.some(function(t){return t.type===e})},e}();t.FileChangesEvent=d,t.isParent=function(e,t,n){return!(!e||!t||e===t)&&!(t.length>e.length)&&(t.charAt(t.length-1)!==r.nativeSep&&(t+=r.nativeSep),n?a.startsWithIgnoreCase(e,t):0===e.indexOf(t))};var p=function(){function e(e){this._value=e}return e.prototype.read=function(){var e=this._value;return this._value=null,e},e}();t.StringSnapshot=p,t.snapshotToString=function(e){for(var t,n=[];"string"==typeof(t=e.read());)n.push(t);return n.join("")};var f=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.fileOperationResult=n,i.options=r,i} return n(t,e),t.isFileOperationError=function(e){return e instanceof Error&&!c.isUndefinedOrNull(e.fileOperationResult)},t}(Error);t.FileOperationError=f;!function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_IS_DIRECTORY=1]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=2]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=3]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=4]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=5]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=6]="FILE_READ_ONLY",e[e.FILE_PERMISSION_DENIED=7]="FILE_PERMISSION_DENIED",e[e.FILE_TOO_LARGE=8]="FILE_TOO_LARGE",e[e.FILE_INVALID_PATH=9]="FILE_INVALID_PATH",e[e.FILE_EXCEED_MEMORY_LIMIT=10]="FILE_EXCEED_MEMORY_LIMIT"}(t.FileOperationResult||(t.FileOperationResult={})),t.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},t.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},t.CONTENT_CHANGE_EVENT_BUFFER_DELAY=1e3, t.FILES_ASSOCIATIONS_CONFIG="files.associations",t.FILES_EXCLUDE_CONFIG="files.exclude",t.SUPPORTED_ENCODINGS={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12}, windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:21},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:22},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:23},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:24},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:25}, iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:26},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:27},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:28},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:29},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:30},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:31},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:32},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:33},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:34},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:35},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:36},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:37},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS", order:38},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:39},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:40},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:41},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:42},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:43},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:44},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:45},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:46},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:47}};!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(t.FileKind||(t.FileKind={})),t.MIN_MAX_MEMORY_SIZE_MB=2048,t.FALLBACK_MAX_MEMORY_SIZE_MB=4096}),define(e[38],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHistoryMainService=n.createDecorator("historyMainService")}), define(e[54],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[104],t([0,1,25,20,68,158,51,4,54]),function(e,t,n,r,i,o,a,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){void 0===e&&(e=new c.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,c=i;a<c.length;a++){var u=c[a],l=this._getOrCreateServiceInstance(u.id) ;if(!l&&this._strict&&!u.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+u.id+".");o.push(l)}var d=i.length>0?i[0].index:n.length;if(n.length!==d){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(d+1)+" conflicts with "+n.length+" static arguments");var p=d-n.length;n=p>0?n.concat(new Array(p)):n.slice(0,d)}var f=[e.ctor];return f.push.apply(f,n),f.push.apply(f,o),r.create.apply(null,f)},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()}),c=0,u=[{id:e,desc:t}];u.length;){var l=u.pop();r.lookupOrInsertNode(l),c++>100&&n() ;for(var d=0,p=s._util.getServiceDependencies(l.desc.ctor);d<p.length;d++){var f=p[d],h=this._services.get(f.id);if(h||console.warn("[createInstance] "+e+" depends on "+f.id+" which is NOT registered."),h instanceof a.SyncDescriptor){var v={id:f.id,desc:h};r.insertEdge(l,v),u.push(v)}}}for(;;){var g=r.roots();if(0===g.length){0!==r.length&&n();break}for(var m=0,y=g;m<y.length;m++){var w=y[m],b=this._createInstance(w.data.desc,[]);this._services.set(w.data.id,b),r.removeNode(w.data)}}return this._services.get(e)},e}();t.InstantiationService=u}),define(e[105],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IIssueService=n.createDecorator("issueService");!function(e){e[e.Bug=0]="Bug",e[e.PerformanceIssue=1]="PerformanceIssue",e[e.FeatureRequest=2]="FeatureRequest",e[e.SettingsSearchIssue=3]="SettingsSearchIssue"}(t.IssueType||(t.IssueType={}))}),define(e[106],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){ function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"openIssueReporter":return this.service.openReporter(t);case"openProcessExplorer":return this.service.openProcessExplorer(t)}},e}();t.IssueChannel=n;var r=function(){function e(e){this.channel=e}return e.prototype.openReporter=function(e){return this.channel.call("openIssueReporter",e)},e.prototype.openProcessExplorer=function(e){return this.channel.call("openProcessExplorer",e)},e}();t.IssueChannelClient=r}),define(e[107],t([0,1,4]),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[108],t([0,1,58,102]),function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var r=e.call(this)||this;if(r._os=n,null===t)throw new Error("Invalid USLayoutResolvedKeybinding") ;return 2===t.type?(r._firstPart=t.firstPart,r._chordPart=t.chordPart):(r._firstPart=t,r._chordPart=null),r}return n(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return r.KeyCodeUtils.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return i.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":r.KeyCodeUtils.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return i.AriaLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)}, t.prototype._keyCodeToElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return r.KeyCodeUtils.toString(e)},t.prototype._getElectronAcceleratorLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode):null},t.prototype.getElectronAccelerator=function(){if(null!==this._chordPart)return null;var e=this._getElectronAcceleratorLabelForKeybinding(this._firstPart);return i.ElectronAcceleratorLabelProvider.toLabel(this._firstPart,e,null,null,this._os)},t.prototype._getUserSettingsLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":r.KeyCodeUtils.toUserSettingsUS(e.keyCode):null},t.prototype.getUserSettingsLabel=function(){var e=this._getUserSettingsLabelForKeybinding(this._firstPart),t=this._getUserSettingsLabelForKeybinding(this._chordPart),n=i.UserSettingsLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os) ;return n?n.toLowerCase():n},t.prototype.isWYSIWYG=function(){return!0},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new r.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=r.KeyCodeUtils.toString(e.keyCode)},t}(r.ResolvedKeybinding);t.USLayoutResolvedKeybinding=o}),define(e[109],t([0,1,2,5,4]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.ILifecycleService=i.createDecorator("lifecycleService");!function(e){e[e.CLOSE=1]="CLOSE",e[e.QUIT=2]="QUIT",e[e.RELOAD=3]="RELOAD",e[e.LOAD=4]="LOAD"}(t.ShutdownReason||(t.ShutdownReason={}));var o;!function(e){e[e.NewWindow=1]="NewWindow",e[e.ReloadedWindow=3]="ReloadedWindow",e[e.ReopenedWindow=4]="ReopenedWindow"}(o=t.StartupKind||(t.StartupKind={}));var a;!function(e){e[e.Starting=1]="Starting",e[e.Restoring=2]="Restoring",e[e.Running=3]="Running",e[e.Eventually=4]="Eventually"}(a=t.LifecyclePhase||(t.LifecyclePhase={})),t.NullLifecycleService={_serviceBrand:null,phase:a.Running,when:function(){return Promise.resolve()},startupKind:o.NewWindow,onWillShutdown:r.Event.None,onShutdown:r.Event.None},t.handleVetos=function(e,t){if(0===e.length)return n.TPromise.as(!1);for(var r=[],i=!1,o=0,a=e;o<a.length;o++){var s=a[o];if(!0===s)return n.TPromise.as(!0);n.TPromise.is(s)&&r.push(s.then(function(e){e&&(i=!0)},function(e){t(e),i=!0}))}return n.TPromise.join(r).then(function(){return i})}}), define(e[6],t([0,1,4,13,3,5]),function(e,t,r,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=r.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 c=function(e){function r(){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 n(r,e),r.prototype.setLevel=function(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))},r.prototype.getLevel=function(){return this.level},r}(i.Disposable);t.AbstractLogService=c;var u=function(e){function r(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var r=e.call(this)||this;return r.setLevel(n),r.useColors=!o.isWindows,r}return n(r,e),r.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)))},r.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)))},r.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)))},r.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)))},r.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)))},r.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)))},r.prototype.dispose=function(){},r}(c);t.ConsoleLogMainService=u;var l=function(e){function r(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL) ;var r=e.call(this)||this;return r.setLevel(n),r}return n(r,e),r.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))},r.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))},r.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))},r.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))},r.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))},r.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))},r.prototype.dispose=function(){},r}(c);t.ConsoleLogService=l;var d=function(e){function t(t){var n=e.call(this)||this;return n.logServices=t,t.length&&n.setLevel(t[0].getLevel()),n}return n(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}(c);t.MultiplexLogService=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n._register(t),n}return n(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=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.logService).trace.apply(t,[e].concat(n))},t.prototype.debug=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.logService).debug.apply(t,[e].concat(n))},t.prototype.info=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.logService).info.apply(t,[e].concat(n))},t.prototype.warn=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.logService).warn.apply(t,[e].concat(n))},t.prototype.error=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.logService).error.apply(t,[e].concat(n))},t.prototype.critical=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.logService).critical.apply(t,[e].concat(n))},t}(i.Disposable);t.DelegatedLogService=p;var f=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=f,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}}),define(e[111],t([0,1,6]),function(e,t,r){"use strict";function i(e,t){switch(t){case r.LogLevel.Trace:return e.trace;case r.LogLevel.Debug:return e.debug;case r.LogLevel.Info:return e.info;case r.LogLevel.Warning:return e.warn;case r.LogLevel.Error:return e.error;case r.LogLevel.Critical:return e.critical;default:throw new Error("Invalid log level")}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buffer=[],t._logger=void 0,t}return n(t,e),Object.defineProperty(t.prototype,"logger",{set:function(e){this._logger=e;for(var t=0,n=this.buffer;t<n.length;t++){var r=n[t],o=r.level,a=r.args;i(e,o).apply(e,a)}this.buffer=[]},enumerable:!0,configurable:!0}),t.prototype._log=function(e,t){if(this._logger){i(this._logger,e).apply(this._logger,t)}else this.getLevel()<=e&&this.buffer.push({level:e,args:t})},t.prototype.trace=function(){this._log(r.LogLevel.Trace,arguments)}, t.prototype.debug=function(){this._log(r.LogLevel.Debug,arguments)},t.prototype.info=function(){this._log(r.LogLevel.Info,arguments)},t.prototype.warn=function(){this._log(r.LogLevel.Warning,arguments)},t.prototype.error=function(){this._log(r.LogLevel.Error,arguments)},t.prototype.critical=function(){this._log(r.LogLevel.Critical,arguments)},t.prototype.dispose=function(){this._logger&&this._logger.dispose()},t}(r.AbstractLogService);t.BufferLogService=o}),define(e[112],t([0,1,43,2,6,5]),function(e,t,r,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.service=e,this.onDidChangeLogLevel=a.buffer(e.onDidChangeLogLevel,!0)}return e.prototype.call=function(e,t){switch(e){case"event:onDidChangeLogLevel":return r.eventToCall(this.onDidChangeLogLevel);case"setLevel":return this.service.setLevel(t),i.TPromise.as(null)}},e}();t.LogLevelSetterChannel=s;var c=function(){function e(e){this.channel=e, this._onDidChangeLogLevel=r.eventFromCall(this.channel,"event:onDidChangeLogLevel")}return Object.defineProperty(e.prototype,"onDidChangeLogLevel",{get:function(){return this._onDidChangeLogLevel},enumerable:!0,configurable:!0}),e.prototype.setLevel=function(e){return this.channel.call("setLevel",e)},e}();t.LogLevelSetterChannelClient=c;var u=function(e){function t(t,n){var r=e.call(this,n)||this;return r.master=t,r._register(t.onDidChangeLogLevel(function(e){return n.setLevel(e)})),r}return n(t,e),t.prototype.setLevel=function(e){this.master.setLevel(e)},t}(o.DelegatedLogService);t.FollowerLogService=u}),define(e[113],t([0,1,9,6]),function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,n,a){try{var s=e.__$__nodeRequire("spdlog");s.setAsyncMode(8192,2e3);var c=r.join(a,t+".log"),u=new s.RotatingLogger(t,c,5242880,6);return u.setLevel(0),new o(u,n)}catch(e){console.error(e)}return new i.NullLogService};var o=function(e){function t(t,n){ void 0===n&&(n=i.LogLevel.Error);var r=e.call(this)||this;return r.logger=t,r.setLevel(n),r}return n(t,e),t.prototype.trace=function(){this.getLevel()<=i.LogLevel.Trace&&this.logger.trace(this.format(arguments))},t.prototype.debug=function(){this.getLevel()<=i.LogLevel.Debug&&this.logger.debug(this.format(arguments))},t.prototype.info=function(){this.getLevel()<=i.LogLevel.Info&&this.logger.info(this.format(arguments))},t.prototype.warn=function(){this.getLevel()<=i.LogLevel.Warning&&this.logger.warn(this.format(arguments))},t.prototype.error=function(){if(this.getLevel()<=i.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()<=i.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}(i.AbstractLogService)}),define(e[114],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMenubarService=n.createDecorator("menubarService")}),define(e[115],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"updateMenubar":return this.service.updateMenubar(t[0],t[1])}},e}();t.MenubarChannel=n;var r=function(){function e(e){this.channel=e}return e.prototype.updateMenubar=function(e,t){return this.channel.call("updateMenubar",[e,t])},e}();t.MenubarChannelClient=r}),define(e[45],t([0,1,9,12]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.dirname(r.default.parse(e.toUrl("")).fsPath),o=n.join(i,"package.json");t.default=e.__$__nodeRequire(o)}),define(e[117],t([0,1,82,45]),function(e,t,n,r){"use strict";function i(e){ return"*"===(e=e.trim())||u.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(u);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,c=n.patchBase,u=r.majorBase,l=r.minorBase,d=r.patchBase,p=r.majorMustEqual,f=r.minorMustEqual,h=r.patchMustEqual;return r.isMinimum?i>u||!(i<u)&&(s>l||!(s<l)&&c>=d):(1!==i||0!==u||p&&f&&h||(u=1,l=0,d=0,p=!0,f=!1,h=!1),!(i<u)&&(i>u?!p:!(s<l)&&(s>l?!f:!(c<d)&&(!(c>d)||!h))))}function c(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 u=/^(\^|>=)?((\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)||c(e,t.engines.vscode,n)},t.isEngineValid=function(e){return"*"===e||c(r.default.version,e)},t.isVersionValid=c}), define(e[16],t([0,1,9,12]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.dirname(r.default.parse(e.toUrl("")).fsPath),o=n.join(i,"product.json"),a=e.__$__nodeRequire(o);process.env.VSCODE_DEV&&(a.nameShort+=" Dev",a.nameLong+=" Dev",a.dataFolderName+="-dev"),t.default=a}),define(e[67],t([0,1,131,132,16,45,26,72,17,3,10,9]),function(e,t,n,r,a,s,c,u,l,d,p,f){"use strict";function h(e){for(var t=[],n=0,r=function(e,r){var o=" "+e+"("+r+")";n+o.length>60?(t.push(i),n=(i="| ").length):n+=o.length,i+=o},i="| File types:",o=e.fileTypes.length>10?10:e.fileTypes.length,a=0;a<o;a++){var s=e.fileTypes[a];r(s.name,s.count)}return t.push(i),e.configFiles.length>=0&&(i="| Conf files:",n=0,e.configFiles.forEach(function(e){r(e.name,e.count)}),t.push(i)),t.join("\n")}function v(e){var t=[],n="| Launch Configs:";return e.forEach(function(e){var t=e.count>1?" "+e.name+"("+e.count+")":" "+e.name;n+=t}),t.push(n),t.join("\n")}function g(e){ var t=1073741824,n=[];n.push("Version: "+s.default.name+" "+s.default.version+" ("+(a.default.commit||"Commit unknown")+", "+(a.default.date||"Date unknown")+")"),n.push("OS Version: "+c.type()+" "+c.arch()+" "+c.release());var r=c.cpus();return r&&r.length>0&&n.push("CPUs: "+r[0].model+" ("+r.length+" x "+r[0].speed+")"),n.push("Memory (System): "+(c.totalmem()/t).toFixed(2)+"GB ("+(c.freemem()/t).toFixed(2)+"GB free)"),d.isWindows||n.push("Load (avg): "+c.loadavg().map(function(e){return Math.round(e)}).join(", ")),n.push("VM: "+Math.round(100*u.virtualMachineHint.value())+"%"),n.push("Screen Reader: "+(p.app.isAccessibilitySupportEnabled()?"yes":"no")),n.push("Process Argv: "+e.mainArguments.join(" ")),n.push("GPU Status: "+function(){var e=p.app.getGPUFeatureStatus(),t=Math.max.apply(Math,Object.keys(e).map(function(e){return e.length}));return Object.keys(e).map(function(n){return n+": "+l.repeat(" ",t-n.length)+" "+e[n] }).join("\n ")}()),n.join("\n")}function m(e,t){var n=new Map;e.windows.forEach(function(e){return n.set(e.pid,e.title)});var r=[];return r.push("CPU %\tMem MB\t PID\tProcess"),t&&y(n,r,t,0),r.join("\n")}function y(e,t,n,r){var i;0===r?i=a.default.applicationName+" main":(i=l.repeat(" ",r)+" "+n.name,"window"===n.name&&(i=i+" ("+e.get(n.pid)+")"));var o="win32"===process.platform?n.mem:c.totalmem()*(n.mem/100);t.push(l.pad(Number(n.load.toFixed(0)),5," ")+"\t"+l.pad(Number((o/1048576).toFixed(0)),6," ")+"\t"+l.pad(Number(n.pid.toFixed(0)),6," ")+"\t"+i),Array.isArray(n.children)&&n.children.forEach(function(n){return y(e,t,n,r+1)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getPerformanceInfo=function(e){var t=this;return r.listProcesses(e.mainPID).then(function(r){var a=[],s=[];return e.windows.some(function(e){return e.folders&&e.folders.length>0})&&e.windows.forEach(function(e){0!==e.folders.length&&(a.push("| Window ("+e.title+")"),e.folders.forEach(function(e){ s.push(n.collectWorkspaceStats(e,["node_modules",".git"]).then(function(r){return i(t,void 0,void 0,function(){var t,i;return o(this,function(o){switch(o.label){case 0:return t=r.fileCount+" files",r.maxFilesReached&&(t="more than "+t),a.push("| Folder ("+f.basename(e)+"): "+t),a.push(h(r)),[4,n.collectLaunchConfigs(e)];case 1:return(i=o.sent()).length>0&&a.push(v(i)),[2]}})})}))}))}),Promise.all(s).then(function(){return{processInfo:m(e,r),workspaceInfo:a.join("\n")}}).catch(function(t){return{processInfo:m(e,r),workspaceInfo:"Unable to calculate workspace stats: "+t}})})},t.getSystemInfo=function(e){var t=1073741824,n={"Memory (System)":(c.totalmem()/t).toFixed(2)+"GB ("+(c.freemem()/t).toFixed(2)+"GB free)",VM:Math.round(100*u.virtualMachineHint.value())+"%","Screen Reader":p.app.isAccessibilitySupportEnabled()?"yes":"no","Process Argv":""+e.mainArguments.join(" "),"GPU Status":p.app.getGPUFeatureStatus()},r=c.cpus();return r&&r.length>0&&(n.CPUs=r[0].model+" ("+r.length+" x "+r[0].speed+")"), d.isWindows||(n["Load (avg)"]=""+c.loadavg().map(function(e){return Math.round(e)}).join(", ")),n},t.printDiagnostics=function(e){var t=this;return r.listProcesses(e.mainPID).then(function(r){console.log(""),console.log(g(e)),console.log(""),console.log(m(e,r));var a=[];return e.windows.some(function(e){return e.folders&&e.folders.length>0})&&(console.log(""),console.log("Workspace Stats: "),e.windows.forEach(function(e){0!==e.folders.length&&(console.log("| Window ("+e.title+")"),e.folders.forEach(function(e){a.push(n.collectWorkspaceStats(e,["node_modules",".git"]).then(function(r){return i(t,void 0,void 0,function(){var t;return o(this,function(i){switch(i.label){case 0:return t=r.fileCount+" files",r.maxFilesReached&&(t="more than "+t),console.log("| Folder ("+f.basename(e)+"): "+t),console.log(h(r)),[4,n.collectLaunchConfigs(e).then(function(e){e.length>0&&console.log(v(e))})];case 1:return i.sent(),[2]}})})}).catch(function(t){ console.log("| Error: Unable to collect workpsace stats for folder "+e+" ("+t.toString()+")")}))}))})),Promise.all(a).then(function(){console.log(""),console.log("")})})},t.formatEnvironment=g}),define(e[120],t([0,1,26,49,27,9,94,2,16]),function(e,t,n,r,a,s,c,u,l){"use strict";function d(e,t,l){return i(this,void 0,u.TPromise,function(){var d,f,h,v;return o(this,function(g){switch(g.label){case 0:return(d=p.getFromProduct())?[4,e.call("get-logs-path",null)]:(console.error(c.localize(0,null)),[2]);case 1:return f=g.sent(),[4,function(e,t){if((t.args["upload-logs"]||"").toLowerCase()==="iConfirmLogsUpload".toLowerCase())return!0;var n=c.localize(3,null)+"\n\n"+c.localize(4,null,e)+"\n\n"+c.localize(5,null)+"\n\n"+c.localize(6,null,"iConfirmLogsUpload");return console.log(n),!1}(f,l)];case 2:return g.sent()?(console.log(c.localize(1,null)),[4,function(e){var t=a.mkdtempSync(s.join(n.tmpdir(),"vscode-log-upload")),i=s.join(t,"logs.zip");return new u.TPromise(function(o,a){!function(e,t,i,o){ switch(n.platform()){case"win32":var a=s.join(i,"sub");return r.execFile("powershell",["-Command",'[System.IO.Directory]::CreateDirectory("'+a+'"); Copy-Item -recurse "'+e+'" "'+a+'"; Compress-Archive -Path "'+a+'" -DestinationPath "'+t+'"'],{cwd:e},o);default:r.execFile("zip",["-r",t,"."],{cwd:e},o)}}(e,i,t,function(e,t,n){e?(console.error(c.localize(10,null,e)),a(e)):o(i)})})}(f)]):[3,5];case 3:return h=g.sent(),[4,function(e,t,n){return i(this,void 0,u.TPromise,function(){var r,i,s;return o(this,function(o){switch(o.label){case 0:r=setInterval(function(){return console.log(".")},5e3),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request({url:e.url,type:"POST",data:Buffer.from(a.readFileSync(t)).toString("base64"),headers:{"Content-Type":"application/zip"}})];case 2:return i=o.sent(),[3,4];case 3:throw s=o.sent(),clearInterval(r),console.log(c.localize(7,null,s)),s;case 4:return[2,new u.TPromise(function(e,t){var n=[];i.stream.on("data",function(e){n.push(e)}),i.stream.on("end",function(){ clearInterval(r);try{var o=Buffer.concat(n).toString("utf-8");if(200===i.res.statusCode)e(JSON.parse(o));else{var a=c.localize(8,null,i.res.statusCode,o);console.log(a),t(new Error(a))}}catch(e){console.log(c.localize(9,null)),t(e)}})})]}})})}(d,h,t)];case 4:v=g.sent(),console.log(c.localize(2,null,v.blob_id)),g.label=5;case 5:return[2]}})})}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e){this.url=e}return e.getFromProduct=function(){var t=l.default.logUploaderUrl;return t?new e(t):void 0},e}();t.uploadLogs=d}),define(e[59],t([0,1,26,182,144,21,79,3,16,47]),function(e,t,n,r,i,o,a,s,c,u){"use strict";function l(e){return e.goto&&e._.forEach(function(e){return i(/^(\w:)?[^:]+(:\d*){0,2}$/.test(e),a.localize(0,null))}),e["max-memory"]&&i(e["max-memory"]>=u.MIN_MAX_MEMORY_SIZE_MB,"The max-memory argument cannot be specified lower than "+u.MIN_MAX_MEMORY_SIZE_MB+" MB."),e}function d(e){var t=o.firstIndex(e,function(e){return!/^-/.test(e)}) ;if(t>-1)return e.slice(0,t).concat(e.slice(t+1))}function p(e){return r(e,h)}function f(e,t){var n=Object.keys(e),r=Math.max.apply(null,n.map(function(e){return e.length}))+2+1;if(t-r<25)return n.reduce(function(t,n){return t.concat([" "+n," "+e[n]])},[]).join("\n");var i=t-r-1,o="";return n.forEach(function(t){var n=function(e,t){var n=[];for(;e.length;){var r=e.length<t?e.length:e.lastIndexOf(" ",t),i=e.slice(0,r).trim();e=e.slice(r),n.push(i)}return n}(e[t],i),a=" ".repeat(r-t.length-2);o.length>0&&(o+="\n"),o+=" "+t+a+n[0];for(var s=1;s<n.length;s++)o+="\n"+" ".repeat(r)+n[s]}),o}Object.defineProperty(t,"__esModule",{value:!0});var h={string:["locale","user-data-dir","extensions-dir","extensionDevelopmentPath","extensionTestsPath","install-extension","uninstall-extension","debugId","debugPluginHost","debugBrkPluginHost","debugSearch","debugBrkSearch","enable-proposed-api","export-default-configuration","install-source","upload-logs","driver"], boolean:["help","version","wait","diff","add","goto","new-window","unity-launch","reuse-window","open-url","performance","prof-startup","verbose","logExtensionHostCommunication","disable-extensions","list-extensions","show-versions","nolazy","issue","skip-getting-started","skip-release-notes","sticky-quickopen","disable-restore-windows","disable-telemetry","disable-updates","disable-crash-reporter","skip-add-to-recently-opened","status","file-write","file-chmod","driver-verbose"],alias:{add:"a",help:"h",version:"v",wait:"w",diff:"d",goto:"g",status:"s","new-window":"n","reuse-window":"r",performance:"p","disable-extensions":"disableExtensions","extensions-dir":"extensionHomePath",debugPluginHost:"inspect-extensions",debugBrkPluginHost:"inspect-brk-extensions",debugSearch:"inspect-search",debugBrkSearch:"inspect-brk-search"}};t.parseMainProcessArgv=function(e){var t=e.slice(1);return process.env.VSCODE_DEV&&(t=d(t)),l(p(t))},t.parseCLIProcessArgv=function(e){var t=e.slice(2) ;return process.env.VSCODE_DEV&&(t=d(t)),l(p(t))},t.parseArgs=p;var v={"-d, --diff <file> <file>":a.localize(1,null),"-a, --add <dir>":a.localize(2,null),"-g, --goto <file:line[:character]>":a.localize(3,null),"-n, --new-window":a.localize(4,null),"-r, --reuse-window":a.localize(5,null),"-w, --wait":a.localize(6,null),"--locale <locale>":a.localize(7,null),"--user-data-dir <dir>":a.localize(8,null),"-v, --version":a.localize(9,null),"-h, --help":a.localize(10,null)},g={"--extensions-dir <dir>":a.localize(11,null),"--list-extensions":a.localize(12,null),"--show-versions":a.localize(13,null),"--install-extension (<extension-id> | <extension-vsix-path>)":a.localize(14,null),"--uninstall-extension (<extension-id> | <extension-vsix-path>)":a.localize(15,null),"--enable-proposed-api <extension-id>":a.localize(16,null)},m={"--verbose":a.localize(17,null),"--log <level>":a.localize(18,null),"-s, --status":a.localize(19,null),"-p, --performance":a.localize(20,null),"--prof-startup":a.localize(21,null), "--disable-extensions":a.localize(22,null),"--inspect-extensions":a.localize(23,null),"--inspect-brk-extensions":a.localize(24,null),"--disable-gpu":a.localize(25,null),"--upload-logs":a.localize(26,null),"--max-memory":a.localize(27,null)};t.formatOptions=f,t.buildHelpMessage=function(e,t,r){var i=process.stdout.isTTY?process.stdout.columns:80,o=t+("win32"===n.platform()?".exe":"");return e+" "+r+"\n\n"+a.localize(28,null)+": "+o+" ["+a.localize(29,null)+"] ["+a.localize(30,null)+"...]\n\n"+(s.isWindows?a.localize(31,null,c.default.applicationName):a.localize(32,null,c.default.applicationName))+"\n\n"+a.localize(33,null)+":\n"+f(v,i)+"\n\n"+a.localize(34,null)+":\n"+f(g,i)+"\n\n"+a.localize(35,null)+":\n"+f(m,i)}}),define(e[123],t([0,1,62,140,26,9,12,48,45,16,159,3]),function(e,t,n,r,i,o,s,c,u,l,d,p){"use strict";function f(e,t){return p.isWindows?function(e,t){return"\\\\.\\pipe\\"+n.createHash("md5").update(e).digest("hex")+"-"+u.default.version+"-"+t+"-sock"}(e,t):function(e,t){if(w){ var r=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(w,"vscode-"+r+"-"+u.default.version+"-"+t+".sock")}return o.join(e,u.default.version+"-"+t+".sock")}(e,t)}function h(e,t){return g(e.debugPluginHost,e.debugBrkPluginHost,5870,t,e.debugId)}function v(e,t){return g(e.debugSearch,e.debugBrkSearch,5876,t)}function g(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 m(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 y(e,t){return m(e["user-data-dir"],t)||o.resolve(r.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{value:!0});var w=process.env.XDG_RUNTIME_DIR,b=function(){function t(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){var n=d.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(s.default.parse(e.toUrl("")).fsPath)},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 p.isWindows?n?o.join(o.dirname(e),"bin",l.default.applicationName+".cmd"):o.join(t,"scripts","code-cli.bat"):p.isLinux?n?o.join(o.dirname(e),"bin",""+l.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"):y(this._args,process)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appNameLong",{get:function(){return l.default.nameLong},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appQuality",{get:function(){return l.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 l.default.settingsSearchBuildId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchUrl",{get:function(){return l.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,"extensionsPath",{get:function(){var e=m(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,l.default.dataFolderName,"extensions"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionDevelopmentPath",{get:function(){return this._args.extensionDevelopmentPath?o.normalize(this._args.extensionDevelopmentPath):this._args.extensionDevelopmentPath},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(){return this._args["disable-extensions"]},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 v(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,"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 f(this.userDataPath,"main")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharedIPCHandle",{get:function(){return f(this.userDataPath,"shared")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCachedDataDir",{get:function(){return this.isBuilt?o.join(this.userDataPath,"CachedData",l.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([c.memoize],t.prototype,"appRoot",null),a([c.memoize],t.prototype,"cliPath",null),a([c.memoize],t.prototype,"userHome",null),a([c.memoize],t.prototype,"userDataPath",null),a([c.memoize],t.prototype,"appSettingsHome",null),a([c.memoize],t.prototype,"appSettingsPath",null),a([c.memoize],t.prototype,"settingsSearchBuildId",null),a([c.memoize],t.prototype,"settingsSearchUrl",null),a([c.memoize],t.prototype,"appKeybindingsPath",null),a([c.memoize],t.prototype,"isExtensionDevelopment",null),a([c.memoize],t.prototype,"backupHome",null),a([c.memoize],t.prototype,"backupWorkspacesPath",null),a([c.memoize],t.prototype,"workspacesHome",null), a([c.memoize],t.prototype,"installSourcePath",null),a([c.memoize],t.prototype,"extensionsPath",null),a([c.memoize],t.prototype,"extensionDevelopmentPath",null),a([c.memoize],t.prototype,"extensionTestsPath",null),a([c.memoize],t.prototype,"debugExtensionHost",null),a([c.memoize],t.prototype,"debugSearch",null),a([c.memoize],t.prototype,"mainIPCHandle",null),a([c.memoize],t.prototype,"sharedIPCHandle",null),a([c.memoize],t.prototype,"nodeCachedDataDir",null),t}();t.EnvironmentService=b,t.parseExtensionHostPort=h,t.parseSearchPort=v,t.parseDebugPort=g,t.parseUserDataDir=y}),define(e[33],t([0,1,20,68]),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[125],t([0,1,33,5]),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[41],t([0,1,76,5,33,20,17,125]),function(e,t,n,r,i,o,a,s){"use strict";function c(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==v.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}), t.Extensions={Configuration:"base.contributions.configuration"};var u;!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(u=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),d=function(){function e(){this.overrideIdentifiers=[],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 c=a.defaults[s] ;t.OVERRIDE_PROPERTY_PATTERN.test(s)&&"object"==typeof c&&(r.properties[s]={type:"object",default:c,description:n.localize(1,null,s),$ref:t.editorConfigurationSchemaId})}}return Object.keys(r.properties).length?r:null},e.prototype.validateAndRegisterProperties=function(e,t,n,r){void 0===t&&(t=!0),void 0===n&&(n=u.WINDOW),void 0===r&&(r=!1),n=void 0!==e.scope&&null!==e.scope?e.scope:n,r=e.overridable||r;var i=[],a=e.properties;if(a)for(var s in a){var l=void 0;if(t&&(l=c(s)))console.warn(l),delete a[s];else{var d=a[s],p=d.default;o.isUndefined(p)&&(d.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}}(d.type)),r&&(d.overridable=!0),void 0===d.scope&&(d.scope=n),!a[s].hasOwnProperty("included")||a[s].included?(this.configurationProperties[s]=a[s],i.push(s)):(this.excludedConfigurationProperties[s]=a[s],delete a[s])}}var f=e.allOf;if(f)for(var h=0,v=f;h<v.length;h++){ var g=v[h];i.push.apply(i,this.validateAndRegisterProperties(g,t,n,r))}return i},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 u.APPLICATION:t.applicationSettings.properties[i]=r[i];break;case u.WINDOW:t.windowSettings.properties[i]=r[i];break;case u.RESOURCE:t.resourceSettings.properties[i]=r[i]}var o=e.allOf;o&&o.forEach(n)}n(e)},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},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?h.replace("${0}",this.overrideIdentifiers.map(function(e){return a.createRegExp(e,!1).source}).join("|")):f},e}(),p="override",f="\\[.*\\]$",h="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(f);var v=new d;i.Registry.add(t.Extensions.Configuration,v),t.validateProperty=c,t.getScopes=function(){for(var e={},t=v.getConfigurationProperties(),n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];e[i]=t[i].scope}return e.launch=u.RESOURCE,e.task=u.RESOURCE,e}}),define(e[14],t([0,1,15,20,12,33,4,41]),function(e,t,n,r,i,o,a,s){"use strict";function c(e,t){var n=Object.create(null);for(var r in e)u(n,r,e[r],t);return n}function u(e,t,n,r){for(var i=t.split("."),o=i.pop(),a=e,s=0;s<i.length;s++){var c=i[s],u=a[c];switch(typeof u){case"undefined":u=a[c]=Object.create(null);break;case"object":break;default:return void r("Ignoring "+t+" as "+i.slice(0,s+1).join(".")+" is "+JSON.stringify(u))}a=u} "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 d(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 f(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 c=s[a],u=d(e.contents,c),l=d(t.contents,c);n.equals(u,l)||o.push(c)}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 u=a[i];if(s.OVERRIDE_PROPERTY_PATTERN.test(u)){var l={};for(var d in e[u])r[d]&&r[d].overridable&&(l[d]=e[u][d]);n.push({identifiers:[f(u).trim()],contents:c(l,t)})}}return n},t.toValuesTree=c,t.addToValueTree=u,t.removeFromValueTree=function(e,t){l(e,t.split("."))},t.getConfigurationValue=d,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)u(e,n,t[n].default,function(e){return console.error("Conflict in default settings: "+e)});return e},t.overrideIdentifierFromKey=f,t.keyFromOverrideIdentifier=function(e){return"["+e+"]"}}),define(e[66],t([0,1,40,39,21,20,15,41,14]),function(e,t,r,i,o,a,s,c,u){"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?u.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={},i=0,a=o.distinct(Object.keys(this.contents).concat(Object.keys(n)));i<a.length;i++){var c=a[i],u=this.contents[c],l=n[c];l&&("object"==typeof u&&"object"==typeof l?(u=s.deepClone(u),this.mergeContents(u,l)):u=l),r[c]=u}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),i=s.deepClone(this.overrides),a=this.keys.slice(),c=0,u=t;c<u.length;c++){var l=u[c];this.mergeContents(r,l.contents);for(var d=function(e){var t=i.filter(function(t){return o.equals(t.identifiers,e.identifiers)})[0];t?p.mergeContents(t.contents,e.contents):i.push(s.deepClone(e))},p=this,f=0,h=l.overrides;f<h.length;f++){d(h[f])} for(var v=0,g=l.keys;v<g.length;v++){var m=g[v];-1===a.indexOf(m)&&a.push(m)}}return new e(r,a,i)},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),u.addToValueTree(this.contents,e,t,function(e){throw new Error(e)})},e.prototype.removeValue=function(e){this.removeKey(e)&&u.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 d=function(e){function t(){for(var t=u.getDefaultValues(),n=u.getConfigurationKeys(),r=[],i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];c.OVERRIDE_PROPERTY_PATTERN.test(a)&&r.push({identifiers:[u.overrideIdentifierFromKey(a).trim()],contents:u.toValuesTree(t[a],function(e){return console.error("Conflict in default settings file: "+e)})})}return e.call(this,t,n,r)||this}return n(t,e),t}(l);t.DefaultConfigurationModel=d;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 n={},i=null,o=[],a=[],s=[],c={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{r.visit(e,c),n=o[0]||{}}catch(e){console.error("Error while parsing settings file "+this._name+": "+e),this._parseErrors=[e]}return n},e.prototype.parseRaw=function(e){var t=this;return{contents:u.toValuesTree(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)}),keys:Object.keys(e),overrides:u.toOverrides(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)})}},e}();t.ConfigurationModelParser=p;var f=function(){ function e(e,t,n,r,o,a,s){void 0===n&&(n=new l),void 0===r&&(r=new i.ResourceMap),void 0===o&&(o=new l),void 0===a&&(a=new i.ResourceMap),void 0===s&&(s=!0),this._defaultConfiguration=e,this._userConfiguration=t,this._workspaceConfiguration=n,this._folderConfigurations=r,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new i.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=f;var h=function(){function e(){}return e.prototype.doesConfigurationContains=function(e,t){ for(var n,r,i=e.contents,o=u.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=h;var v=function(e){function t(t,n){void 0===t&&(t=new l),void 0===n&&(n=new i.ResourceMap);var r=e.call(this)||this;return r._changedConfiguration=t,r._changedConfigurationByResource=n,r}return n(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)}),o.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}(h);t.ConfigurationChangeEvent=v}),define(e[129],t([0,1,13,25,66,63,5,2]),function(e,t,r,i,o,a,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=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 i.onUnexpectedError(e)},defaultConfig:new o.ConfigurationModelParser(t),parse:function(e,n){var r=new o.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 n(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 c.TPromise(function(t){return e.userConfigModelWatcher.reload(function(){return t(null)})})},t}(r.Disposable);t.UserConfiguration=u});var c=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};define(e[74],t([0,1,33,41,13,14,66,5,11,2,15,129]),function(e,t,r,i,o,s,u,l,d,p,f,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t){var n=e.call(this)||this;return n._onDidChangeConfiguration=n._register(new l.Emitter),n.onDidChangeConfiguration=n._onDidChangeConfiguration.event, n.userConfiguration=n._register(new h.UserConfiguration(t.appSettingsPath)),n.reset(),n._register(n.userConfiguration.onDidChangeConfiguration(function(){return n.onDidChangeUserConfiguration()})),n._register(r.Registry.as(i.Extensions.Configuration).onDidRegisterConfiguration(function(e){return n.onDidRegisterConfiguration(e)})),n}return n(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=s.isConfigurationOverrides(e)?e:s.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=s.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!f.equals(a.getValue(t,{},null),e._configuration.getValue(t,{},null))})).length&&this.trigger(t,s.ConfigurationTarget.USER)}},t.prototype.onDidRegisterConfiguration=function(e){this.reset(),this.trigger(e,s.ConfigurationTarget.DEFAULT)},t.prototype.reset=function(){var e=new u.DefaultConfigurationModel,t=this.userConfiguration.configurationModel;this._configuration=new u.Configuration(e,t)},t.prototype.trigger=function(e,t){this._onDidChangeConfiguration.fire((new u.ConfigurationChangeEvent).change(e).telemetryData(t,this.getTargetConfiguration(t)))}, t.prototype.getTargetConfiguration=function(e){switch(e){case s.ConfigurationTarget.DEFAULT:return this._configuration.defaults.contents;case s.ConfigurationTarget.USER:return this._configuration.user.contents}return{}},t=a([c(0,d.IEnvironmentService)],t)}(o.Disposable);t.ConfigurationService=v}),define(e[37],t([0,1,85,4,41,33]),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[32],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.IStateService=n.createDecorator("stateService")}),define(e[133],t([0,1,9,56,11,34,20,6]),function(e,t,n,r,i,o,s,u){"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 s.isUndefinedOrNull(n)?t:n},e.prototype.setItem=function(e,t){if(this.ensureLoaded(),s.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(),s.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 d=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([c(0,i.IEnvironmentService),c(1,u.ILogService)],e)}();t.StateService=d}),define(e[30],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(e[136],t([0,1,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.appender=e}return e.prototype.call=function(e,t){var r=t.eventName,i=t.data;return this.appender.log(r,i),n.TPromise.as(null)},e}();t.TelemetryAppenderChannel=r;var i=function(){ function e(e){this.channel=e}return e.prototype.log=function(e,t){return this.channel.call("log",{eventName:e,data:t}).done(null,function(e){return"Failed to log telemetry: "+console.warn(e)}),n.TPromise.as(null)},e.prototype.dispose=function(){},e}();t.TelemetryAppenderClient=i}),define(e[137],t([0,1,86,17,4,14,41,2,13,15,33]),function(e,t,n,r,i,o,s,u,l,d,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t){this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,this._commonProperties=e.commonProperties||u.TPromise.as({}),this._piiPaths=e.piiPaths||[],this._userOptIn=void 0===e.userOptIn||e.userOptIn,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(h);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=d.mixin(t,i),t=d.cloneAndChange(t,function(e){if("string"==typeof e)return r._cleanupInfo(e,n)}),r._appender.log(e,t)},function(e){console.error(e)}):u.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)[\\\/]/,c=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,u=function(){var t=c.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(c.lastIndex))};;){if("break"===u())break}}for(var l=0,d=this._cleanupPatterns;l<d.length;l++){var p=d[l];n=n.replace(p,"")}return n},e.IDLE_START_EVENT_NAME="UserIdleStart",e.IDLE_STOP_EVENT_NAME="UserIdleStop",e=a([c(1,i.optional(o.IConfigurationService))],e)}();t.TelemetryService=f;var h="telemetry";p.Registry.as(s.Extensions.Configuration).registerConfiguration({id:h,order:110,type:"object",title:n.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:n.localize(1,null),default:!0}}})}), define(e[138],t([0,1,2,149,18,14,107]),function(e,t,n,r,i,o,a){"use strict";function s(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 c(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,u)}))})}function c(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(function(r){return c(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)}},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 u=["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","editor.autoClosingBrackets","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","window.zoomLevel","files.autoSave","files.hotExit","files.associations","workbench.statusBar.visible","files.trimTrailingWhitespace","git.confirmSync","workbench.sideBar.location","window.openFilesInNewWindow","javascript.validate.enable","window.restoreWindows","extensions.autoUpdate","files.eol","explorer.openEditors.visible","workbench.editor.enablePreview","files.autoSaveDelay","workbench.editor.showTabs","files.encoding","files.autoGuessEncoding","git.enabled","http.proxyStrictSSL","terminal.integrated.fontFamily","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.swipeToNavigate","php.builtInCompletions.enable","php.validate.enable","php.validate.run","workbench.welcome.enabled","workbench.startupEditor"] ;t.configurationTelemetry=s,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(function(t){t.source===a.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[139],t([0,1,3,26,42,35]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,a,s){var c=Object.create(null);c["common.machineId"]=a,c.sessionID=i.generateUuid()+Date.now(),c.commitHash=e,c.version=t,c["common.platformVersion"]=(r.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),c["common.platform"]=n.Platform[n.platform],c["common.nodePlatform"]=process.platform,c["common.nodeArch"]=process.arch;var u=0,l=Date.now();return Object.defineProperties(c,{timestamp:{get:function(){return new Date},enumerable:!0},"common.timesincesessionstart":{get:function(){return Date.now()-l},enumerable:!0},"common.sequence":{ get:function(){return u++},enumerable:!0}}),o.readFile(s,"utf8").then(function(e){return c["common.source"]=e.slice(0,30),c},function(e){return c})}}),define(e[28],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e.Uninitialized="uninitialized",e.Idle="idle",e.CheckingForUpdates="checking for updates",e.AvailableForDownload="available for download",e.Downloading="downloading",e.Downloaded="downloaded",e.Updating="updating",e.Ready="ready"}(r=t.StateType||(t.StateType={})),t.State={Uninitialized:{type:r.Uninitialized},Idle:{type:r.Idle},CheckingForUpdates:function(e){return{type:r.CheckingForUpdates,context:e}},AvailableForDownload:function(e){return{type:r.AvailableForDownload,update:e}},Downloading:function(e){return{type:r.Downloading,update:e}},Downloaded:function(e){return{type:r.Downloaded,update:e}},Updating:function(e){return{type:r.Updating,update:e}},Ready:function(e){return{type:r.Ready,update:e}}}, t.IUpdateService=n.createDecorator("updateService")}),define(e[141],t([0,1,2,43,5,25,28]),function(e,t,n,r,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"event:onStateChange":return r.eventToCall(this.service.onStateChange);case"checkForUpdates":return this.service.checkForUpdates(t);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return n.TPromise.as(this.service.state);case"isLatestVersion":return this.service.isLatestVersion()}},e}();t.UpdateChannel=s;var c=function(){function e(e){var t=this;this.channel=e,this._onRemoteStateChange=r.eventFromCall(this.channel,"event:onStateChange"),this._onStateChange=new i.Emitter,this._state=a.State.Uninitialized,this.onStateChange(function(e){return t._state=e}),e.call("_getInitialState").done(function(e){ t._onStateChange.fire(e),t._onRemoteStateChange(function(e){return t._onStateChange.fire(e)})},o.onUnexpectedError)}return Object.defineProperty(e.prototype,"onStateChange",{get:function(){return this._onStateChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.checkForUpdates=function(e){return this.channel.call("checkForUpdates",e)},e.prototype.downloadUpdate=function(){return this.channel.call("downloadUpdate")},e.prototype.applyUpdate=function(){return this.channel.call("applyUpdate")},e.prototype.quitAndInstall=function(){return this.channel.call("quitAndInstall")},e.prototype.isLatestVersion=function(){return this.channel.call("isLatestVersion")},e}();t.UpdateChannelClient=c}),define(e[142],t([0,1,87,33,41]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"update",order:15, title:n.localize(0,null),type:"object",properties:{"update.channel":{type:"string",enum:["none","default"],default:"default",scope:i.ConfigurationScope.APPLICATION,description:n.localize(1,null)},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:i.ConfigurationScope.APPLICATION,description:n.localize(2,null)},"update.showReleaseNotes":{type:"boolean",default:!0,description:n.localize(3,null)}}})}),define(e[143],t([0,1,142]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(e[46],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="urlService",t.IURLService=n.createDecorator(t.ID)}),define(e[145],t([0,1,12]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"open":return this.service.open(n.default.revive(t))}},e}();t.URLServiceChannel=r;var i=function(){function e(e){this.channel=e} return e.prototype.open=function(e){return this.channel.call("open",e.toJSON())},e.prototype.registerHandler=function(e){throw new Error("Not implemented.")},e}();t.URLServiceChannelClient=i;var o=function(){function e(e){this.handler=e}return e.prototype.call=function(e,t){switch(e){case"handleURL":return this.handler.handleURL(n.default.revive(t))}},e}();t.URLHandlerChannel=o;var a=function(){function e(e){this.channel=e}return e.prototype.handleURL=function(e){return this.channel.call("handleURL",e.toJSON())},e}();t.URLHandlerChannelClient=a}),define(e[146],t([0,1,13,2]),function(e,t,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){this.handlers=new Set}return e.prototype.open=function(e){return i(this,void 0,a.TPromise,function(){var t,n,r,i;return o(this,function(o){switch(o.label){case 0:t=Array.from(this.handlers),n=0,r=t,o.label=1;case 1:return n<r.length?(i=r[n],[4,i.handleURL(e)]):[3,4];case 2:if(o.sent())return[2,!0];o.label=3;case 3:return n++,[3,1] ;case 4:return[2,!1]}})})},e.prototype.registerHandler=function(e){var t=this;return this.handlers.add(e),r.toDisposable(function(){return t.handlers.delete(e)})},e}();t.URLService=s;var c=function(e){function t(t){var n=e.call(this)||this;return n.urlService=t,n}return n(t,e),t.prototype.open=function(e){return i(this,void 0,a.TPromise,function(){return o(this,function(t){return[2,this.urlService.open(e)]})})},t.prototype.handleURL=function(t){return e.prototype.open.call(this,t)},t}(s);t.RelayURLService=c}),define(e[23],t([0,1,4,5,13]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWindowsService=n.createDecorator("windowsService"),t.IWindowService=n.createDecorator("windowService");!function(e){e[e.CLI=0]="CLI",e[e.DOCK=1]="DOCK",e[e.MENU=2]="MENU",e[e.DIALOG=3]="DIALOG",e[e.DESKTOP=4]="DESKTOP",e[e.API=5]="API"}(t.OpenContext||(t.OpenContext={}));!function(e){e[e.NONE=0]="NONE",e[e.LOADING=1]="LOADING",e[e.NAVIGATING=2]="NAVIGATING",e[e.READY=3]="READY" }(t.ReadyState||(t.ReadyState={}));var o=function(){function e(e){this.disposables=[];r.latch(r.anyEvent(e.onWindowOpen,e.onWindowFocus))(this.setActiveWindow,this,this.disposables)}return e.prototype.setActiveWindow=function(e){this._activeWindowId=e},Object.defineProperty(e.prototype,"activeClientId",{get:function(){return"window:"+this._activeWindowId},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},e=a([c(0,t.IWindowsService)],e)}();t.ActiveWindowManager=o}),define(e[31],t([0,1,10,2,6,32,5,4,23,109,3]),function(e,t,n,r,i,o,s,u,l,d,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILifecycleService=u.createDecorator("lifecycleService");var f;!function(e){e[e.CLOSE=1]="CLOSE",e[e.QUIT=2]="QUIT",e[e.RELOAD=3]="RELOAD",e[e.LOAD=4]="LOAD"}(f=t.UnloadReason||(t.UnloadReason={}));var h=function(){function e(e,t){this.logService=e,this.stateService=t,this._onBeforeShutdown=new s.Emitter, this.onBeforeShutdown=this._onBeforeShutdown.event,this._onShutdown=new s.Emitter,this.onShutdown=this._onShutdown.event,this._onBeforeWindowClose=new s.Emitter,this.onBeforeWindowClose=this._onBeforeWindowClose.event,this._onBeforeWindowUnload=new s.Emitter,this.onBeforeWindowUnload=this._onBeforeWindowUnload.event,this.windowToCloseRequest=Object.create(null),this.quitRequested=!1,this.oneTimeListenerTokenGenerator=0,this._wasRestarted=!1,this.windowCounter=0,this.handleRestarted()}return e.prototype.handleRestarted=function(){this._wasRestarted=!!this.stateService.getItem(e.QUIT_FROM_RESTART_MARKER),this._wasRestarted&&this.stateService.removeItem(e.QUIT_FROM_RESTART_MARKER)},Object.defineProperty(e.prototype,"wasRestarted",{get:function(){return this._wasRestarted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isQuitRequested",{get:function(){return!!this.quitRequested},enumerable:!0,configurable:!0}),e.prototype.ready=function(){this.registerListeners()}, e.prototype.registerListeners=function(){var e=this;n.app.on("before-quit",function(t){e.logService.trace("Lifecycle#before-quit"),e.quitRequested?e.logService.trace("Lifecycle#before-quit - returning because quit was already requested"):(e.quitRequested=!0,e.logService.trace("Lifecycle#onBeforeShutdown.fire()"),e._onBeforeShutdown.fire(),p.isMacintosh&&0===e.windowCounter&&(e.logService.trace("Lifecycle#onShutdown.fire()"),e._onShutdown.fire()))}),n.app.on("window-all-closed",function(){e.logService.trace("Lifecycle#window-all-closed"),(e.quitRequested||"darwin"!==process.platform)&&n.app.quit()})},e.prototype.registerWindow=function(e){var t=this;this.windowCounter++,e.win.on("close",function(n){var r=e.id;if(t.logService.trace("Lifecycle#window-before-close",r),t.windowToCloseRequest[r])return t.logService.trace("Lifecycle#window-close",r),void delete t.windowToCloseRequest[r];n.preventDefault(),t.unload(e,f.CLOSE).done(function(n){n?(t.quitRequested=!1, delete t.windowToCloseRequest[r]):(t.windowToCloseRequest[r]=!0,t.logService.trace("Lifecycle#onBeforeWindowClose.fire()"),t._onBeforeWindowClose.fire(e),e.close())})}),e.win.on("closed",function(n){var r=e.id;t.logService.trace("Lifecycle#window-closed",r),t.windowCounter--,0!==t.windowCounter||p.isMacintosh&&!t.isQuitRequested||(t.logService.trace("Lifecycle#onShutdown.fire()"),t._onShutdown.fire())})},e.prototype.unload=function(e,t){var n=this;if(e.readyState!==l.ReadyState.READY)return r.TPromise.as(!1);this.logService.trace("Lifecycle#unload()",e.id);var i=this.quitRequested?f.QUIT:t;return this.onBeforeUnloadWindowInRenderer(e,i).then(function(t){return t?(n.logService.trace("Lifecycle#unload(): veto in renderer",e.id),n.handleVeto(t)):n.onBeforeUnloadWindowInMain(e,i).then(function(t){return t?(n.logService.trace("Lifecycle#unload(): veto in main",e.id),n.handleVeto(t)):(n.logService.trace("Lifecycle#unload(): unload continues without veto",e.id),n.onWillUnloadWindowInRenderer(e,i).then(function(){ return!1}))})})},e.prototype.handleVeto=function(e){return e&&this.pendingQuitPromiseComplete&&(this.pendingQuitPromiseComplete(!0),this.pendingQuitPromiseComplete=null,this.pendingQuitPromise=null),e},e.prototype.onBeforeUnloadWindowInRenderer=function(e,t){var i=this;return new r.TPromise(function(r){var o=i.oneTimeListenerTokenGenerator++,a="vscode:ok"+o,s="vscode:cancel"+o;n.ipcMain.once(a,function(){r(!1)}),n.ipcMain.once(s,function(){r(!0)}),e.send("vscode:onBeforeUnload",{okChannel:a,cancelChannel:s,reason:t})})},e.prototype.onBeforeUnloadWindowInMain=function(e,t){var n=this,r=[];return this._onBeforeWindowUnload.fire({reason:t,window:e,veto:function(e){r.push(e)}}),d.handleVetos(r,function(e){return n.logService.error(e)})},e.prototype.onWillUnloadWindowInRenderer=function(e,t){var i=this;return new r.TPromise(function(r){var o="vscode:reply"+i.oneTimeListenerTokenGenerator++;n.ipcMain.once(o,function(){return r(void 0)}),e.send("vscode:onWillUnload",{replyChannel:o,reason:t})})}, e.prototype.quit=function(t){var i=this;return this.logService.trace("Lifecycle#quit()"),this.pendingQuitPromise?this.logService.trace("Lifecycle#quit() - a pending quit was found"):this.pendingQuitPromise=new r.TPromise(function(r){i.pendingQuitPromiseComplete=r,n.app.once("will-quit",function(){i.logService.trace("Lifecycle#will-quit"),i.pendingQuitPromiseComplete&&(t&&i.stateService.setItem(e.QUIT_FROM_RESTART_MARKER,!0),i.pendingQuitPromiseComplete(!1),i.pendingQuitPromiseComplete=null,i.pendingQuitPromise=null)}),i.logService.trace("Lifecycle#quit() - calling app.quit()"),n.app.quit()}),this.pendingQuitPromise},e.prototype.kill=function(e){this.logService.trace("Lifecycle#kill()"),n.app.exit(e)},e.prototype.relaunch=function(t){var r=this;this.logService.trace("Lifecycle#relaunch()");var i=process.argv.slice(1);if(t&&t.addArgs&&i.push.apply(i,t.addArgs),t&&t.removeArgs)for(var o=0,a=t.removeArgs;o<a.length;o++){var s=a[o],c=i.indexOf(s);c>=0&&i.splice(c,1)}var u=!1;n.app.once("quit",function(){if(!u){ r.stateService.setItem(e.QUIT_FROM_RESTART_MARKER,!0);try{p.isWindows&&process.chdir(process.env.VSCODE_CWD)}catch(e){r.logService.error(e)}n.app.relaunch({args:i})}}),this.quit().then(function(e){u=e})},e.QUIT_FROM_RESTART_MARKER="quit.from.restart",e=a([c(0,i.ILogService),c(1,o.IStateService)],e)}();t.LifecycleService=h}),define(e[53],t([0,1,5,24,14,31,16,2,28,11,6,37]),function(e,t,n,r,i,o,s,u,l,d,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createUpdateURL=function(e,t){return s.default.updateUrl+"/api/update/"+e+"/"+t+"/"+s.default.commit};var h=function(){function e(e,t,i,o,a){var c=this;if(this.lifecycleService=e,this.configurationService=t,this.environmentService=i,this.requestService=o,this.logService=a,this._state=l.State.Uninitialized,this.throttler=new r.Throttler,this._onStateChange=new n.Emitter,this.environmentService.disableUpdates)this.logService.info("update#ctor - updates are disabled");else if(s.default.updateUrl&&s.default.commit){var u=this.getProductQuality() ;u?(this.url=this.buildUpdateFeedUrl(u),this.url?(this.setState({type:l.StateType.Idle}),this.scheduleCheckForUpdates(3e4).done(null,function(e){return c.logService.error(e)})):this.logService.info("update#ctor - updates are disabled")):this.logService.info("update#ctor - updates are disabled")}else this.logService.info("update#ctor - updates are disabled")}return Object.defineProperty(e.prototype,"onStateChange",{get:function(){return this._onStateChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.setState=function(e){this.logService.info("update#setState",e.type),this._state=e,this._onStateChange.fire(e)},e.prototype.getProductQuality=function(){return"none"===this.configurationService.getValue("update.channel")?null:s.default.quality},e.prototype.scheduleCheckForUpdates=function(e){var t=this;return void 0===e&&(e=36e5),u.TPromise.timeout(e).then(function(){return t.checkForUpdates(null) }).then(function(e){return e?u.TPromise.as(null):t.scheduleCheckForUpdates(36e5)})},e.prototype.checkForUpdates=function(e){var t=this;return this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type!==l.StateType.Idle?u.TPromise.as(null):this.throttler.queue(function(){return u.TPromise.as(t.doCheckForUpdates(e))})},e.prototype.downloadUpdate=function(){return this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type!==l.StateType.AvailableForDownload?u.TPromise.as(null):this.doDownloadUpdate(this.state)},e.prototype.doDownloadUpdate=function(e){return u.TPromise.as(null)},e.prototype.applyUpdate=function(){return this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type!==l.StateType.Downloaded?u.TPromise.as(null):this.doApplyUpdate()},e.prototype.doApplyUpdate=function(){return u.TPromise.as(null)},e.prototype.quitAndInstall=function(){var e=this ;return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!==l.StateType.Ready?u.TPromise.as(null):(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleService.quit(!0).done(function(t){e.logService.trace("update#quitAndInstall(): after lifecycle quit() with veto: "+t),t||(e.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),e.doQuitAndInstall())}),u.TPromise.as(null))},e.prototype.isLatestVersion=function(){return this.url?this.requestService.request({url:this.url}).then(function(e){return 204===e.res.statusCode}):u.TPromise.as(void 0)},e.prototype.doQuitAndInstall=function(){},e=a([c(0,o.ILifecycleService),c(1,i.IConfigurationService),c(2,d.IEnvironmentService),c(3,f.IRequestService),c(4,p.ILogService)],e)}();t.AbstractUpdateService=h}),define(e[150],t([0,1,10,13,5,48,14,31,28,30,11,6,53,37]),function(e,t,r,i,o,s,u,l,d,p,f,h,v,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){ function t(t,n,r,i,o,a){var s=e.call(this,t,n,i,o,a)||this;return s.telemetryService=r,s.disposables=[],s.onRawError(s.onError,s,s.disposables),s.onRawUpdateAvailable(s.onUpdateAvailable,s,s.disposables),s.onRawUpdateDownloaded(s.onUpdateDownloaded,s,s.disposables),s.onRawUpdateNotAvailable(s.onUpdateNotAvailable,s,s.disposables),s}return n(t,e),Object.defineProperty(t.prototype,"onRawError",{get:function(){return o.fromNodeEventEmitter(r.autoUpdater,"error",function(e,t){return t})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRawUpdateNotAvailable",{get:function(){return o.fromNodeEventEmitter(r.autoUpdater,"update-not-available")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRawUpdateAvailable",{get:function(){return o.fromNodeEventEmitter(r.autoUpdater,"update-available",function(e,t,n){return{url:t,version:n,productVersion:n}})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRawUpdateDownloaded",{get:function(){ return o.fromNodeEventEmitter(r.autoUpdater,"update-downloaded",function(e,t,n,r){return{releaseNotes:t,version:n,productVersion:n,date:r}})},enumerable:!0,configurable:!0}),t.prototype.onError=function(e){this.logService.error("UpdateService error: ",e),this.setState(d.State.Idle)},t.prototype.buildUpdateFeedUrl=function(e){var t=v.createUpdateURL("darwin",e);try{r.autoUpdater.setFeedURL(t)}catch(e){return void this.logService.error("Failed to set update feed URL",e)}return t},t.prototype.doCheckForUpdates=function(e){this.setState(d.State.CheckingForUpdates(e)),r.autoUpdater.checkForUpdates()},t.prototype.onUpdateAvailable=function(e){this.state.type===d.StateType.CheckingForUpdates&&this.setState(d.State.Downloading(e))},t.prototype.onUpdateDownloaded=function(e){this.state.type===d.StateType.Downloading&&(this.telemetryService.publicLog("update:downloaded",{version:e.version}),this.setState(d.State.Ready(e)))},t.prototype.onUpdateNotAvailable=function(){ this.state.type===d.StateType.CheckingForUpdates&&(this.telemetryService.publicLog("update:notAvailable",{explicit:!!this.state.context}),this.setState(d.State.Idle))},t.prototype.doQuitAndInstall=function(){this.logService.trace("update#quitAndInstall(): calling flushStorageData()"),r.session.defaultSession.flushStorageData(),this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),r.autoUpdater.quitAndInstall()},t.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},a([s.memoize],t.prototype,"onRawError",null),a([s.memoize],t.prototype,"onRawUpdateNotAvailable",null),a([s.memoize],t.prototype,"onRawUpdateAvailable",null),a([s.memoize],t.prototype,"onRawUpdateDownloaded",null),t=a([c(0,l.ILifecycleService),c(1,u.IConfigurationService),c(2,p.ITelemetryService),c(3,f.IEnvironmentService),c(4,g.IRequestService),c(5,h.ILogService)],t)}(v.AbstractUpdateService);t.DarwinUpdateService=m}),define(e[151],t([0,1,5,43,12]),function(e,t,n,r,i){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.service=e,this.onWindowOpen=n.buffer(e.onWindowOpen,!0),this.onWindowFocus=n.buffer(e.onWindowFocus,!0),this.onWindowBlur=n.buffer(e.onWindowBlur,!0),this.onWindowMaximize=n.buffer(e.onWindowMaximize,!0),this.onWindowUnmaximize=n.buffer(e.onWindowUnmaximize,!0),this.onRecentlyOpenedChange=n.buffer(e.onRecentlyOpenedChange,!0)}return e.prototype.call=function(e,t){switch(e){case"event:onWindowOpen":return r.eventToCall(this.onWindowOpen);case"event:onWindowFocus":return r.eventToCall(this.onWindowFocus);case"event:onWindowBlur":return r.eventToCall(this.onWindowBlur);case"event:onWindowMaximize":return r.eventToCall(this.onWindowMaximize);case"event:onWindowUnmaximize":return r.eventToCall(this.onWindowUnmaximize);case"event:onRecentlyOpenedChange":return r.eventToCall(this.onRecentlyOpenedChange);case"pickFileFolderAndOpen":return this.service.pickFileFolderAndOpen(t);case"pickFileAndOpen": return this.service.pickFileAndOpen(t);case"pickFolderAndOpen":return this.service.pickFolderAndOpen(t);case"pickWorkspaceAndOpen":return this.service.pickWorkspaceAndOpen(t);case"showMessageBox":return this.service.showMessageBox(t[0],t[1]);case"showSaveDialog":return this.service.showSaveDialog(t[0],t[1]);case"showOpenDialog":return this.service.showOpenDialog(t[0],t[1]);case"reloadWindow":return this.service.reloadWindow(t[0],t[1]);case"openDevTools":return this.service.openDevTools(t[0],t[1]);case"toggleDevTools":return this.service.toggleDevTools(t);case"closeWorkspace":return this.service.closeWorkspace(t);case"createAndEnterWorkspace":var n=t[1],o=void 0;return Array.isArray(n)&&(o=n.map(function(e){return{uri:i.default.revive(e.uri),name:e.name}})),this.service.createAndEnterWorkspace(t[0],o,t[2]);case"saveAndEnterWorkspace":return this.service.saveAndEnterWorkspace(t[0],t[1]);case"toggleFullScreen":return this.service.toggleFullScreen(t);case"setRepresentedFilename": return this.service.setRepresentedFilename(t[0],t[1]);case"addRecentlyOpened":return this.service.addRecentlyOpened(t);case"removeFromRecentlyOpened":return this.service.removeFromRecentlyOpened(t);case"clearRecentlyOpened":return this.service.clearRecentlyOpened();case"showPreviousWindowTab":return this.service.showPreviousWindowTab();case"showNextWindowTab":return this.service.showNextWindowTab();case"moveWindowTabToNewWindow":return this.service.moveWindowTabToNewWindow();case"mergeAllWindowTabs":return this.service.mergeAllWindowTabs();case"toggleWindowTabsBar":return this.service.toggleWindowTabsBar();case"updateTouchBar":return this.service.updateTouchBar(t[0],t[1]);case"getRecentlyOpened":return this.service.getRecentlyOpened(t);case"focusWindow":return this.service.focusWindow(t);case"closeWindow":return this.service.closeWindow(t);case"isFocused":return this.service.isFocused(t);case"isMaximized":return this.service.isMaximized(t);case"maximizeWindow":return this.service.maximizeWindow(t) ;case"unmaximizeWindow":return this.service.unmaximizeWindow(t);case"minimizeWindow":return this.service.minimizeWindow(t);case"onWindowTitleDoubleClick":return this.service.onWindowTitleDoubleClick(t);case"setDocumentEdited":return this.service.setDocumentEdited(t[0],t[1]);case"openWindow":return this.service.openWindow(t[0],t[1],t[2]);case"openNewWindow":return this.service.openNewWindow();case"showWindow":return this.service.showWindow(t);case"getWindows":return this.service.getWindows();case"getWindowCount":return this.service.getWindowCount();case"relaunch":return this.service.relaunch(t[0]);case"whenSharedProcessReady":return this.service.whenSharedProcessReady();case"toggleSharedProcess":return this.service.toggleSharedProcess();case"quit":return this.service.quit();case"log":return this.service.log(t[0],t[1]);case"showItemInFolder":return this.service.showItemInFolder(t);case"openExternal":return this.service.openExternal(t);case"startCrashReporter":return this.service.startCrashReporter(t) ;case"openAccessibilityOptions":return this.service.openAccessibilityOptions();case"openAboutDialog":return this.service.openAboutDialog()}},e}();t.WindowsChannel=o;var a=function(){function e(e){this.channel=e,this._onWindowOpen=r.eventFromCall(this.channel,"event:onWindowOpen"),this._onWindowFocus=r.eventFromCall(this.channel,"event:onWindowFocus"),this._onWindowBlur=r.eventFromCall(this.channel,"event:onWindowBlur"),this._onWindowMaximize=r.eventFromCall(this.channel,"event:onWindowMaximize"),this._onWindowUnmaximize=r.eventFromCall(this.channel,"event:onWindowUnmaximize"),this._onRecentlyOpenedChange=r.eventFromCall(this.channel,"event:onRecentlyOpenedChange")}return Object.defineProperty(e.prototype,"onWindowOpen",{get:function(){return this._onWindowOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowFocus",{get:function(){return this._onWindowFocus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowBlur",{get:function(){return this._onWindowBlur}, enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowMaximize",{get:function(){return this._onWindowMaximize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowUnmaximize",{get:function(){return this._onWindowUnmaximize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onRecentlyOpenedChange",{get:function(){return this._onRecentlyOpenedChange},enumerable:!0,configurable:!0}),e.prototype.pickFileFolderAndOpen=function(e){return this.channel.call("pickFileFolderAndOpen",e)},e.prototype.pickFileAndOpen=function(e){return this.channel.call("pickFileAndOpen",e)},e.prototype.pickFolderAndOpen=function(e){return this.channel.call("pickFolderAndOpen",e)},e.prototype.pickWorkspaceAndOpen=function(e){return this.channel.call("pickWorkspaceAndOpen",e)},e.prototype.showMessageBox=function(e,t){return this.channel.call("showMessageBox",[e,t])},e.prototype.showSaveDialog=function(e,t){return this.channel.call("showSaveDialog",[e,t])}, e.prototype.showOpenDialog=function(e,t){return this.channel.call("showOpenDialog",[e,t])},e.prototype.reloadWindow=function(e,t){return this.channel.call("reloadWindow",[e,t])},e.prototype.openDevTools=function(e,t){return this.channel.call("openDevTools",[e,t])},e.prototype.toggleDevTools=function(e){return this.channel.call("toggleDevTools",e)},e.prototype.closeWorkspace=function(e){return this.channel.call("closeWorkspace",e)},e.prototype.createAndEnterWorkspace=function(e,t,n){return this.channel.call("createAndEnterWorkspace",[e,t,n])},e.prototype.saveAndEnterWorkspace=function(e,t){return this.channel.call("saveAndEnterWorkspace",[e,t])},e.prototype.toggleFullScreen=function(e){return this.channel.call("toggleFullScreen",e)},e.prototype.setRepresentedFilename=function(e,t){return this.channel.call("setRepresentedFilename",[e,t])},e.prototype.addRecentlyOpened=function(e){return this.channel.call("addRecentlyOpened",e)},e.prototype.removeFromRecentlyOpened=function(e){ return this.channel.call("removeFromRecentlyOpened",e)},e.prototype.clearRecentlyOpened=function(){return this.channel.call("clearRecentlyOpened")},e.prototype.getRecentlyOpened=function(e){return this.channel.call("getRecentlyOpened",e)},e.prototype.showPreviousWindowTab=function(){return this.channel.call("showPreviousWindowTab")},e.prototype.showNextWindowTab=function(){return this.channel.call("showNextWindowTab")},e.prototype.moveWindowTabToNewWindow=function(){return this.channel.call("moveWindowTabToNewWindow")},e.prototype.mergeAllWindowTabs=function(){return this.channel.call("mergeAllWindowTabs")},e.prototype.toggleWindowTabsBar=function(){return this.channel.call("toggleWindowTabsBar")},e.prototype.focusWindow=function(e){return this.channel.call("focusWindow",e)},e.prototype.closeWindow=function(e){return this.channel.call("closeWindow",e)},e.prototype.isFocused=function(e){return this.channel.call("isFocused",e)},e.prototype.isMaximized=function(e){return this.channel.call("isMaximized",e)}, e.prototype.maximizeWindow=function(e){return this.channel.call("maximizeWindow",e)},e.prototype.unmaximizeWindow=function(e){return this.channel.call("unmaximizeWindow",e)},e.prototype.minimizeWindow=function(e){return this.channel.call("minimizeWindow",e)},e.prototype.onWindowTitleDoubleClick=function(e){return this.channel.call("onWindowTitleDoubleClick",e)},e.prototype.setDocumentEdited=function(e,t){return this.channel.call("setDocumentEdited",[e,t])},e.prototype.quit=function(){return this.channel.call("quit")},e.prototype.relaunch=function(e){return this.channel.call("relaunch",[e])},e.prototype.whenSharedProcessReady=function(){return this.channel.call("whenSharedProcessReady")},e.prototype.toggleSharedProcess=function(){return this.channel.call("toggleSharedProcess")},e.prototype.openWindow=function(e,t,n){return this.channel.call("openWindow",[e,t,n])},e.prototype.openNewWindow=function(){return this.channel.call("openNewWindow")},e.prototype.showWindow=function(e){ return this.channel.call("showWindow",e)},e.prototype.getWindows=function(){return this.channel.call("getWindows")},e.prototype.getWindowCount=function(){return this.channel.call("getWindowCount")},e.prototype.log=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.channel.call("log",[e,t])},e.prototype.showItemInFolder=function(e){return this.channel.call("showItemInFolder",e)},e.prototype.openExternal=function(e){return this.channel.call("openExternal",e)},e.prototype.startCrashReporter=function(e){return this.channel.call("startCrashReporter",e)},e.prototype.updateTouchBar=function(e,t){return this.channel.call("updateTouchBar",[e,t])},e.prototype.openAccessibilityOptions=function(){return this.channel.call("openAccessibilityOptions")},e.prototype.openAboutDialog=function(){return this.channel.call("openAboutDialog")},e}();t.WindowsChannelClient=a}),define(e[22],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){ e[e.Maximized=0]="Maximized",e[e.Normal=1]="Normal",e[e.Minimized=2]="Minimized",e[e.Fullscreen=3]="Fullscreen"}(t.WindowMode||(t.WindowMode={})),t.IWindowsMainService=n.createDecorator("windowsMainService")}),define(e[153],t([0,1,98,13,22,5,10]),function(e,t,n,r,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function t(e){this.windowsMainService=e,this.retryCount=0,this.disposables=[];o.fromNodeEventEmitter(s.app,"login",function(e,t,n,r,i){return{event:e,webContents:t,req:n,authInfo:r,cb:i}})(this.onLogin,this,this.disposables)}return t.prototype.onLogin=function(t){var r=t.event,i=t.authInfo,o=t.cb;if(i.isProxy&&!(this.retryCount++>1)){r.preventDefault();var a={alwaysOnTop:!0,skipTaskbar:!0,resizable:!1,width:450,height:220,show:!0,title:"VS Code",webPreferences:{disableBlinkFeatures:"Auxclick"}},c=this.windowsMainService.getFocusedWindow();c&&(a.parent=c.win,a.modal=!0) ;var u=new s.BrowserWindow(a),l=e.toUrl("vs/code/electron-browser/proxy/auth.html")+"?config="+encodeURIComponent(JSON.stringify({})),d=i.host+":"+i.port,p={title:n.localize(0,null),message:n.localize(1,null,d)},f="promptForCredentials("+JSON.stringify(p)+")",h=function(){return o("","")};u.on("close",h),u.setMenu(null),u.loadURL(l),u.webContents.executeJavaScript(f,!0).then(function(e){var t=e.username,n=e.password;o(t,n),u.removeListener("close",h),u.close()})}},t.prototype.dispose=function(){this.disposables=r.dispose(this.disposables)},t=a([c(0,i.IWindowsMainService)],t)}();t.ProxyAuthHandler=u}),define(e[61],t([0,1,179,32,5,63,11,10,22,6]),function(e,t,n,r,i,o,s,u,l,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(){this._emitter=new i.Emitter,this._registered=!1}return e.prototype.onDidChangeKeyboardLayout=function(e){var t=this;return this._registered||(this._registered=!0,n.onDidChangeKeyboardLayout(function(){t._emitter.fire()})),this._emitter.event(e)}, e.INSTANCE=new e,e}();t.KeyboardLayoutMonitor=p;var f=function(){function e(t,n,r,a){var s=this;this.stateService=t,this.windowsMainService=r,this.logService=a,this._onKeybindingsChanged=new i.Emitter,this.onKeybindingsChanged=this._onKeybindingsChanged.event,this.commandIds=new Set,this.keybindings=this.stateService.getItem(e.lastKnownKeybindingsMapStorageKey)||Object.create(null),this.keybindingsWatcher=new o.ConfigWatcher(n.appKeybindingsPath,{changeBufferDelay:100,onError:function(e){return s.logService.error(e)}}),this.registerListeners()}return e.prototype.registerListeners=function(){var t=this;u.ipcMain.on("vscode:keybindingsResolved",function(n,r){var i=[];try{i=JSON.parse(r)}catch(e){}var o=!1,a=0,s=Object.create(null);i.forEach(function(e){a++,s[e.id]=e,t.keybindings[e.id]&&e.label===t.keybindings[e.id].label||(o=!0)}),Object.keys(t.keybindings).length!==a&&(o=!0),o&&(t.keybindings=s,t.stateService.setItem(e.lastKnownKeybindingsMapStorageKey,t.keybindings),t._onKeybindingsChanged.fire())}) ;i.once(this.windowsMainService.onWindowReady)(function(e){return t.resolveKeybindings(e)}),this.keybindingsWatcher.onDidUpdateConfiguration(function(){return t.resolveKeybindings()}),this.windowsMainService.onWindowReload(function(){return t.resolveKeybindings()})},e.prototype.resolveKeybindings=function(e){if(void 0===e&&(e=this.windowsMainService.getLastActiveWindow()),this.commandIds.size&&e){var t=[];this.commandIds.forEach(function(e){return t.push(e)}),e.sendWhenReady("vscode:resolveKeybindings",JSON.stringify(t))}},e.prototype.getKeybinding=function(e){if(e)return this.commandIds.has(e)||this.commandIds.add(e),this.keybindings[e]},e.prototype.dispose=function(){this._onKeybindingsChanged.dispose(),this.keybindingsWatcher.dispose()},e.lastKnownKeybindingsMapStorageKey="lastKnownKeybindings",e=a([c(0,r.IStateService),c(1,s.IEnvironmentService),c(2,l.IWindowsMainService),c(3,d.ILogService)],e)}();t.KeybindingsResolver=f}),define(e[156],t([0,1,5,46,16,10,12,13,22,23]),function(e,t,n,r,i,o,s,u,l,d){ "use strict";function p(e){try{return s.default.parse(e)}catch(e){return null}}Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,r){this.urlService=t,this.disposables=[];var a=global.getOpenUrls()||[],s=("string"==typeof e?[e]:e).concat(a).map(p).filter(function(e){return!!e}),c=function(){return s.forEach(function(e){return t.open(e)})};o.app.setAsDefaultProtocolClient(i.default.urlProtocol,process.execPath,["--open-url","--"]);var u=n.mapEvent(n.fromNodeEventEmitter(o.app,"open-url",function(e,t){return{event:e,url:t}}),function(e){var t=e.event,n=e.url;return t.preventDefault(),n});n.filterEvent(n.mapEvent(u,p),function(e){return!!e})(this.urlService.open,this.urlService,this.disposables);r.getWindows().filter(function(e){return e.readyState===d.ReadyState.READY}).length>0?c():n.once(r.onWindowReady)(c)}return e.prototype.dispose=function(){this.disposables=u.dispose(this.disposables)},e=a([c(1,r.IURLService),c(2,l.IWindowsMainService)],e)}();t.ElectronURLListener=f}), define(e[157],t([0,1,88,2,13,15,12,16,23,11,10,5,46,31,22,38,36,29,3,6]),function(e,t,n,r,s,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k=function(){function e(e,t,n,r,i,o,a){var s=this;this.sharedProcess=e,this.windowsMainService=t,this.environmentService=n,this.lifecycleService=i,this.historyService=o,this.logService=a,this.disposables=[],this.onWindowOpen=v.filterEvent(v.fromNodeEventEmitter(h.app,"browser-window-created",function(e,t){return t.id}),function(e){return!!s.windowsMainService.getWindowById(e)}),this.onWindowFocus=v.anyEvent(v.mapEvent(v.filterEvent(v.mapEvent(this.windowsMainService.onWindowsCountChanged,function(){return s.windowsMainService.getLastActiveWindow()}),function(e){return!!e}),function(e){return e.id}),v.filterEvent(v.fromNodeEventEmitter(h.app,"browser-window-focus",function(e,t){return t.id}),function(e){return!!s.windowsMainService.getWindowById(e)})), this.onWindowBlur=v.filterEvent(v.fromNodeEventEmitter(h.app,"browser-window-blur",function(e,t){return t.id}),function(e){return!!s.windowsMainService.getWindowById(e)}),this.onWindowMaximize=v.filterEvent(v.fromNodeEventEmitter(h.app,"browser-window-maximize",function(e,t){return t.id}),function(e){return!!s.windowsMainService.getWindowById(e)}),this.onWindowUnmaximize=v.filterEvent(v.fromNodeEventEmitter(h.app,"browser-window-unmaximize",function(e,t){return t.id}),function(e){return!!s.windowsMainService.getWindowById(e)}),this.onRecentlyOpenedChange=this.historyService.onRecentlyOpenedChange,r.registerHandler(this)}return e.prototype.pickFileFolderAndOpen=function(e){return this.logService.trace("windowsService#pickFileFolderAndOpen"),this.windowsMainService.pickFileFolderAndOpen(e),r.TPromise.as(null)},e.prototype.pickFileAndOpen=function(e){return this.logService.trace("windowsService#pickFileAndOpen"),this.windowsMainService.pickFileAndOpen(e),r.TPromise.as(null)}, e.prototype.pickFolderAndOpen=function(e){return this.logService.trace("windowsService#pickFolderAndOpen"),this.windowsMainService.pickFolderAndOpen(e),r.TPromise.as(null)},e.prototype.pickWorkspaceAndOpen=function(e){return this.logService.trace("windowsService#pickWorkspaceAndOpen"),this.windowsMainService.pickWorkspaceAndOpen(e),r.TPromise.as(null)},e.prototype.showMessageBox=function(e,t){this.logService.trace("windowsService#showMessageBox",e);var n=this.windowsMainService.getWindowById(e);return this.windowsMainService.showMessageBox(t,n)},e.prototype.showSaveDialog=function(e,t){this.logService.trace("windowsService#showSaveDialog",e);var n=this.windowsMainService.getWindowById(e);return this.windowsMainService.showSaveDialog(t,n)},e.prototype.showOpenDialog=function(e,t){this.logService.trace("windowsService#showOpenDialog",e);var n=this.windowsMainService.getWindowById(e);return this.windowsMainService.showOpenDialog(t,n)},e.prototype.reloadWindow=function(e,t){ this.logService.trace("windowsService#reloadWindow",e);var n=this.windowsMainService.getWindowById(e);return n&&this.windowsMainService.reload(n,t),r.TPromise.as(null)},e.prototype.openDevTools=function(e,t){this.logService.trace("windowsService#openDevTools",e);var n=this.windowsMainService.getWindowById(e);return n&&n.win.webContents.openDevTools(t),r.TPromise.as(null)},e.prototype.toggleDevTools=function(e){this.logService.trace("windowsService#toggleDevTools",e);var t=this.windowsMainService.getWindowById(e);if(t){var n=t.win.webContents;!t.hasHiddenTitleBarStyle()||t.win.isFullScreen()||n.isDevToolsOpened()?n.toggleDevTools():n.openDevTools({mode:"undocked"})}return r.TPromise.as(null)},e.prototype.updateTouchBar=function(e,t){this.logService.trace("windowsService#updateTouchBar",e);var n=this.windowsMainService.getWindowById(e);return n&&n.updateTouchBar(t),r.TPromise.as(null)},e.prototype.closeWorkspace=function(e){this.logService.trace("windowsService#closeWorkspace",e) ;var t=this.windowsMainService.getWindowById(e);return t&&this.windowsMainService.closeWorkspace(t),r.TPromise.as(null)},e.prototype.createAndEnterWorkspace=function(e,t,n){this.logService.trace("windowsService#createAndEnterWorkspace",e);var i=this.windowsMainService.getWindowById(e);return i?this.windowsMainService.createAndEnterWorkspace(i,t,n):r.TPromise.as(null)},e.prototype.saveAndEnterWorkspace=function(e,t){this.logService.trace("windowsService#saveAndEnterWorkspace",e);var n=this.windowsMainService.getWindowById(e);return n?this.windowsMainService.saveAndEnterWorkspace(n,t):r.TPromise.as(null)},e.prototype.toggleFullScreen=function(e){this.logService.trace("windowsService#toggleFullScreen",e);var t=this.windowsMainService.getWindowById(e);return t&&t.toggleFullScreen(),r.TPromise.as(null)},e.prototype.setRepresentedFilename=function(e,t){this.logService.trace("windowsService#setRepresentedFilename",e);var n=this.windowsMainService.getWindowById(e);return n&&n.setRepresentedFilename(t), r.TPromise.as(null)},e.prototype.addRecentlyOpened=function(e){return this.logService.trace("windowsService#addRecentlyOpened"),this.historyService.addRecentlyOpened(void 0,e),r.TPromise.as(null)},e.prototype.removeFromRecentlyOpened=function(e){return this.logService.trace("windowsService#removeFromRecentlyOpened"),this.historyService.removeFromRecentlyOpened(e),r.TPromise.as(null)},e.prototype.clearRecentlyOpened=function(){return this.logService.trace("windowsService#clearRecentlyOpened"),this.historyService.clearRecentlyOpened(),r.TPromise.as(null)},e.prototype.getRecentlyOpened=function(e){this.logService.trace("windowsService#getRecentlyOpened",e);var t=this.windowsMainService.getWindowById(e);return t?r.TPromise.as(this.historyService.getRecentlyOpened(t.config.workspace||t.config.folderPath,t.config.filesToOpen)):r.TPromise.as(this.historyService.getRecentlyOpened())},e.prototype.showPreviousWindowTab=function(){return this.logService.trace("windowsService#showPreviousWindowTab"), h.Menu.sendActionToFirstResponder("selectPreviousTab:"),r.TPromise.as(void 0)},e.prototype.showNextWindowTab=function(){return this.logService.trace("windowsService#showNextWindowTab"),h.Menu.sendActionToFirstResponder("selectNextTab:"),r.TPromise.as(void 0)},e.prototype.moveWindowTabToNewWindow=function(){return this.logService.trace("windowsService#moveWindowTabToNewWindow"),h.Menu.sendActionToFirstResponder("moveTabToNewWindow:"),r.TPromise.as(void 0)},e.prototype.mergeAllWindowTabs=function(){return this.logService.trace("windowsService#mergeAllWindowTabs"),h.Menu.sendActionToFirstResponder("mergeAllWindows:"),r.TPromise.as(void 0)},e.prototype.toggleWindowTabsBar=function(){return this.logService.trace("windowsService#toggleWindowTabsBar"),h.Menu.sendActionToFirstResponder("toggleTabBar:"),r.TPromise.as(void 0)},e.prototype.focusWindow=function(e){this.logService.trace("windowsService#focusWindow",e);var t=this.windowsMainService.getWindowById(e);return t&&t.win.focus(),r.TPromise.as(null)}, e.prototype.closeWindow=function(e){this.logService.trace("windowsService#closeWindow",e);var t=this.windowsMainService.getWindowById(e);return t&&t.win.close(),r.TPromise.as(null)},e.prototype.isFocused=function(e){this.logService.trace("windowsService#isFocused",e);var t=this.windowsMainService.getWindowById(e);return t?r.TPromise.as(t.win.isFocused()):r.TPromise.as(null)},e.prototype.isMaximized=function(e){this.logService.trace("windowsService#isMaximized",e);var t=this.windowsMainService.getWindowById(e);return t?r.TPromise.as(t.win.isMaximized()):r.TPromise.as(null)},e.prototype.maximizeWindow=function(e){this.logService.trace("windowsService#maximizeWindow",e);var t=this.windowsMainService.getWindowById(e);return t&&t.win.maximize(),r.TPromise.as(null)},e.prototype.unmaximizeWindow=function(e){this.logService.trace("windowsService#unmaximizeWindow",e);var t=this.windowsMainService.getWindowById(e);return t&&t.win.unmaximize(),r.TPromise.as(null)},e.prototype.minimizeWindow=function(e){ this.logService.trace("windowsService#minimizeWindow",e);var t=this.windowsMainService.getWindowById(e);return t&&t.win.minimize(),r.TPromise.as(null)},e.prototype.onWindowTitleDoubleClick=function(e){this.logService.trace("windowsService#onWindowTitleDoubleClick",e);var t=this.windowsMainService.getWindowById(e);return t&&t.onWindowTitleDoubleClick(),r.TPromise.as(null)},e.prototype.setDocumentEdited=function(e,t){this.logService.trace("windowsService#setDocumentEdited",e);var n=this.windowsMainService.getWindowById(e);return n&&n.win.isDocumentEdited()!==t&&n.win.setDocumentEdited(t),r.TPromise.as(null)},e.prototype.openWindow=function(e,t,n){return this.logService.trace("windowsService#openWindow"),t&&t.length?(this.windowsMainService.open({context:p.OpenContext.API,contextWindowId:e,cli:this.environmentService.args,pathsToOpen:t,forceNewWindow:n&&n.forceNewWindow,forceReuseWindow:n&&n.forceReuseWindow,forceOpenWorkspaceAsFile:n&&n.forceOpenWorkspaceAsFile}),r.TPromise.as(null)):r.TPromise.as(null)}, e.prototype.openNewWindow=function(){return this.logService.trace("windowsService#openNewWindow"),this.windowsMainService.openNewWindow(p.OpenContext.API),r.TPromise.as(null)},e.prototype.showWindow=function(e){this.logService.trace("windowsService#showWindow",e);var t=this.windowsMainService.getWindowById(e);return t&&t.win.show(),r.TPromise.as(null)},e.prototype.getWindows=function(){this.logService.trace("windowsService#getWindows");var e=this.windowsMainService.getWindows().map(function(e){return{id:e.id,workspace:e.openedWorkspace,openedFolderPath:e.openedFolderPath,title:e.win.getTitle(),filename:e.getRepresentedFilename()}});return r.TPromise.as(e)},e.prototype.getWindowCount=function(){return this.logService.trace("windowsService#getWindowCount"),r.TPromise.as(this.windowsMainService.getWindows().length)},e.prototype.log=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return(t=console[e]).apply.apply(t,[console].concat(n)),r.TPromise.as(null)}, e.prototype.showItemInFolder=function(e){return this.logService.trace("windowsService#showItemInFolder"),h.shell.showItemInFolder(e),r.TPromise.as(null)},e.prototype.openExternal=function(e){return this.logService.trace("windowsService#openExternal"),r.TPromise.as(h.shell.openExternal(e))},e.prototype.startCrashReporter=function(e){return this.logService.trace("windowsService#startCrashReporter"),h.crashReporter.start(e),r.TPromise.as(null)},e.prototype.quit=function(){return this.logService.trace("windowsService#quit"),this.windowsMainService.quit(),r.TPromise.as(null)},e.prototype.relaunch=function(e){return this.logService.trace("windowsService#relaunch"),this.lifecycleService.relaunch(e),r.TPromise.as(null)},e.prototype.whenSharedProcessReady=function(){return this.logService.trace("windowsService#whenSharedProcessReady"),this.sharedProcess.whenReady()},e.prototype.toggleSharedProcess=function(){return this.logService.trace("windowsService#toggleSharedProcess"),this.sharedProcess.toggle(), r.TPromise.as(null)},e.prototype.openAccessibilityOptions=function(){this.logService.trace("windowsService#openAccessibilityOptions");var e=new h.BrowserWindow({alwaysOnTop:!0,skipTaskbar:!0,resizable:!1,width:450,height:300,show:!0,title:n.localize(0,null),webPreferences:{disableBlinkFeatures:"Auxclick"}});return e.setMenuBarVisibility(!1),e.loadURL("chrome://accessibility"),r.TPromise.as(null)},e.prototype.openAboutDialog=function(){this.logService.trace("windowsService#openAboutDialog");var e=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow(),t=n.localize(1,null,h.app.getVersion(),d.default.commit||"Unknown",d.default.date||"Unknown",process.versions.electron,process.versions.chrome,process.versions.node,process.versions.v8,process.arch),i=[n.localize(2,null)];return _.isWindows&&i.push(S.mnemonicButtonLabel(n.localize(3,null))),this.windowsMainService.showMessageBox({title:d.default.nameLong,type:"info",message:d.default.nameLong,detail:"\n"+t,buttons:i,noLink:!0 },e).then(function(e){_.isWindows&&1===e.button&&h.clipboard.writeText(t)}),r.TPromise.as(null)},e.prototype.handleURL=function(e){return i(this,void 0,r.TPromise,function(){return o(this,function(t){return e.authority===b.Schemas.file&&e.path?[2,this.openFileForURI(l.default.file(e.fsPath))]:[2,!1]})})},e.prototype.openFileForURI=function(e){return i(this,void 0,r.TPromise,function(){var t,n;return o(this,function(r){return t=u.assign(Object.create(null),this.environmentService.args,{goto:!0}),n=[e.fsPath],this.windowsMainService.open({context:p.OpenContext.API,cli:t,pathsToOpen:n}),[2,!0]})})},e.prototype.dispose=function(){this.disposables=s.dispose(this.disposables)},e=a([c(1,y.IWindowsMainService),c(2,f.IEnvironmentService),c(3,g.IURLService),c(4,m.ILifecycleService),c(5,w.IHistoryMainService),c(6,C.ILogService)],e)}();t.WindowsService=k}),define(e[19],t([0,1,4,47,89,18,3,29]),function(e,t,n,r,i,o,a,s){"use strict";function c(e){ return e&&"object"==typeof e&&"string"==typeof e.path&&(!e.name||"string"==typeof e.name)}function u(e){return e&&"object"==typeof e&&"string"==typeof e.uri&&(!e.name||"string"==typeof e.name)}function l(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspacesMainService=n.createDecorator("workspacesMainService"),t.IWorkspacesService=n.createDecorator("workspacesService"),t.WORKSPACE_EXTENSION="code-workspace",t.WORKSPACE_FILTER=[{name:i.localize(0,null),extensions:[t.WORKSPACE_EXTENSION]}],t.UNTITLED_WORKSPACE_NAME="workspace.json",t.isStoredWorkspaceFolder=function(e){return c(e)||u(e)},t.isRawFileWorkspaceFolder=c,t.isRawUriWorkspaceFolder=u,t.getWorkspaceLabel=function(e,n,c){if(l(e))return s.tildify(e,n.userHome);if(r.isParent(e.configPath,n.workspacesHome,!a.isLinux))return i.localize(1,null);var u=o.basename(e.configPath),d=u.substr(0,u.length-t.WORKSPACE_EXTENSION.length-1) ;return c&&c.verbose?i.localize(2,null,s.getPathLabel(o.join(o.dirname(e.configPath),d),n)):i.localize(3,null,d)},t.isSingleFolderWorkspaceIdentifier=l,t.isWorkspaceIdentifier=function(e){var t=e;return t&&"string"==typeof t.id&&"string"==typeof t.configPath}}),define(e[52],t([0,1,2,6,46,3,11,4,23,22,35,19,36,14,12,10]),function(e,t,n,r,i,o,s,u,l,d,p,f,h,v,g,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="launchService",t.ILaunchService=u.createDecorator(t.ID);var y=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"start":var n=t,r=n.args,i=n.userEnv;return this.service.start(r,i);case"get-main-process-id":return this.service.getMainProcessId();case"get-main-process-info":return this.service.getMainProcessInfo();case"get-logs-path":return this.service.getLogsPath()}},e}();t.LaunchChannel=y;var w=function(){function e(e){this.channel=e}return e.prototype.start=function(e,t){return this.channel.call("start",{args:e,userEnv:t})}, e.prototype.getMainProcessId=function(){return this.channel.call("get-main-process-id",null)},e.prototype.getMainProcessInfo=function(){return this.channel.call("get-main-process-info",null)},e.prototype.getLogsPath=function(){return this.channel.call("get-logs-path",null)},e}();t.LaunchChannelClient=w;var b=function(){function e(e,t,n,r,i,o){this.logService=e,this.windowsMainService=t,this.urlService=n,this.workspacesMainService=r,this.environmentService=i,this.configurationService=o}return e.prototype.start=function(e,t){var r=this;this.logService.trace("Received data from other instance: ",e,t);var i=function(e){return e["open-url"]&&e._urls&&e._urls.length>0?e._urls.map(function(e){try{return g.default.parse(e)}catch(e){return null}}).filter(function(e){return!!e}):[]}(e);if(i.length){var o=n.TPromise.as(null);if(0===this.windowsMainService.getWindowCount()){o=this.windowsMainService.openNewWindow(l.OpenContext.DESKTOP)[0].ready()}return o.then(function(){for(var e=0,t=i;e<t.length;e++){var n=t[e] ;r.urlService.open(n)}}),n.TPromise.as(null)}return this.startOpenWindow(e,t)},e.prototype.startOpenWindow=function(e,t){var r,i=t.VSCODE_CLI?l.OpenContext.CLI:l.OpenContext.DESKTOP;if(e.extensionDevelopmentPath)this.windowsMainService.openExtensionDevelopmentHostWindow({context:i,cli:e,userEnv:t});else if(0===e._.length){var a=!1;if(e["new-window"]||e["unity-launch"])a=!0;else if(e["reuse-window"])a=!1;else{var s=this.configurationService.getValue("window");switch(s&&s.openWithoutArgumentsInNewWindow||"default"){case"on":a=!0;break;case"off":a=!1;break;default:a=!o.isMacintosh}}r=a?this.windowsMainService.open({context:i,cli:e,userEnv:t,forceNewWindow:!0,forceEmpty:!0}):[this.windowsMainService.focusLastActive(e,i)]}else r=this.windowsMainService.open({context:i,cli:e,userEnv:t,forceNewWindow:e["new-window"],preferNewWindow:!e["reuse-window"]&&!e.wait,forceReuseWindow:e["reuse-window"],diffMode:e.diff,addMode:e.add}) ;return e.wait&&1===r.length&&r[0]?n.TPromise.any([this.windowsMainService.waitForWindowCloseOrLoad(r[0].id),p.whenDeleted(e.waitMarkerFilePath)]).then(function(){},function(){}):n.TPromise.as(null)},e.prototype.getMainProcessId=function(){return this.logService.trace("Received request for process ID from other instance."),n.TPromise.as(process.pid)},e.prototype.getMainProcessInfo=function(){var e=this;this.logService.trace("Received request for main process info from other instance.");var t=[];return m.BrowserWindow.getAllWindows().forEach(function(n){var r=e.windowsMainService.getWindowById(n.id);r?t.push(e.codeWindowToInfo(r)):t.push(e.browserWindowToInfo(n))}),n.TPromise.wrap({mainPID:process.pid,mainArguments:process.argv,windows:t})},e.prototype.getLogsPath=function(){return this.logService.trace("Received request for logs path from other instance."),n.TPromise.as(this.environmentService.logsPath)},e.prototype.codeWindowToInfo=function(e){var t=[] ;if(e.openedFolderPath)t.push(e.openedFolderPath);else if(e.openedWorkspace){this.workspacesMainService.resolveWorkspaceSync(e.openedWorkspace.configPath).folders.forEach(function(e){e.uri.scheme===h.Schemas.file&&t.push(e.uri.fsPath)})}return this.browserWindowToInfo(e.win,t)},e.prototype.browserWindowToInfo=function(e,t){return void 0===t&&(t=[]),{pid:e.webContents.getOSProcessId(),title:e.getTitle(),folders:t}},e=a([c(0,r.ILogService),c(1,d.IWindowsMainService),c(2,i.IURLService),c(3,f.IWorkspacesMainService),c(4,s.IEnvironmentService),c(5,v.IConfigurationService)],e)}();t.LaunchService=b}),define(e[160],t([0,1,93,3,11,10,23,14,30,28,16,24,4,29,61,22,38,19]),function(e,t,n,r,i,o,s,u,l,d,p,f,h,v,g,m,y,w){"use strict";function b(){return new o.MenuItem({type:"separator"})}Object.defineProperty(t,"__esModule",{value:!0});var S=function(){function e(e,t,n,r,i,o,a){var s=this;this.updateService=e,this.configurationService=n,this.windowsMainService=r,this.environmentService=i,this.telemetryService=o, this.historyMainService=a,this.menubarMenus={},this.menuUpdater=new f.RunOnceScheduler(function(){return s.doUpdateMenu()},0),this.keybindingsResolver=t.createInstance(g.KeybindingsResolver),this.install(),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;o.app.on("will-quit",function(){e.isQuitting=!0}),this.windowsMainService.onWindowsCountChanged(function(t){return e.onWindowsCountChanged(t)}),this.keybindingsResolver.onKeybindingsChanged(function(){return e.scheduleUpdateMenu()})},Object.defineProperty(e.prototype,"currentEnableMenuBarMnemonics",{get:function(){var e=this.configurationService.getValue("window.enableMenuBarMnemonics");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentEnableNativeTabs",{get:function(){var e=this.configurationService.getValue("window.nativeTabs");return"boolean"!=typeof e&&(e=!1),e},enumerable:!0,configurable:!0}),e.prototype.updateMenu=function(e,t){this.menubarMenus=e, this.scheduleUpdateMenu()},e.prototype.scheduleUpdateMenu=function(){this.menuUpdater.schedule()},e.prototype.doUpdateMenu=function(){var e=this;this.isQuitting||setTimeout(function(){e.isQuitting||e.install()},10)},e.prototype.onWindowsCountChanged=function(e){r.isMacintosh&&(0===e.oldCount&&e.newCount>0||e.oldCount>0&&0===e.newCount?this.scheduleUpdateMenu():this.currentEnableNativeTabs&&this.nativeTabMenuItems.forEach(function(t){t&&(t.enabled=e.newCount>1)}))},e.prototype.install=function(){var e,t=this,i=new o.Menu;if(r.isMacintosh){var a=new o.Menu;e=new o.MenuItem({label:p.default.nameShort,submenu:a}),this.setMacApplicationMenu(a),i.append(e)}if(r.isMacintosh&&!this.appMenuInstalled){this.appMenuInstalled=!0;var c=new o.Menu;c.append(new o.MenuItem({label:this.mnemonicLabel(n.localize(0,null)),click:function(){return t.windowsMainService.openNewWindow(s.OpenContext.DOCK)}})),o.app.dock.setMenu(c)}var u=new o.Menu,l=new o.MenuItem({label:this.mnemonicLabel(n.localize(1,null)),submenu:u}) ;this.shouldDrawMenu("File")&&(this.shouldFallback("File")?this.setFallbackMenuById(u,"File"):this.setMenuById(u,"File"),i.append(l));var d=new o.Menu,f=new o.MenuItem({label:this.mnemonicLabel(n.localize(2,null)),submenu:d});this.shouldDrawMenu("Edit")&&(this.setMenuById(d,"Edit"),i.append(f));var h=new o.Menu,v=new o.MenuItem({label:this.mnemonicLabel(n.localize(3,null)),submenu:h,enabled:h.items.length>0});this.shouldDrawMenu("Recent")&&(this.shouldFallback("Recent")?this.setFallbackMenuById(h,"Recent"):this.setMenuById(h,"Recent"),i.append(v));var g=new o.Menu,m=new o.MenuItem({label:this.mnemonicLabel(n.localize(4,null)),submenu:g});this.shouldDrawMenu("Selection")&&(this.setMenuById(g,"Selection"),i.append(m));var y=new o.Menu,w=new o.MenuItem({label:this.mnemonicLabel(n.localize(5,null)),submenu:y});this.shouldDrawMenu("View")&&(this.setMenuById(y,"View"),i.append(w));var b=new o.Menu,S=new o.MenuItem({label:this.mnemonicLabel(n.localize(6,null)),submenu:b}) ;this.shouldDrawMenu("Layout")&&(this.setMenuById(b,"Layout"),i.append(S));var _=new o.Menu,C=new o.MenuItem({label:this.mnemonicLabel(n.localize(7,null)),submenu:_});this.shouldDrawMenu("Go")&&(this.setMenuById(_,"Go"),i.append(C));var k=new o.Menu,E=new o.MenuItem({label:this.mnemonicLabel(n.localize(8,null)),submenu:k});this.shouldDrawMenu("Debug")&&(this.setMenuById(k,"Debug"),i.append(E));var P=new o.Menu,I=new o.MenuItem({label:this.mnemonicLabel(n.localize(9,null)),submenu:P});this.shouldDrawMenu("Task")&&(this.setMenuById(P,"Task"),i.append(I));var M;if(r.isMacintosh){var O=new o.Menu;M=new o.MenuItem({label:this.mnemonicLabel(n.localize(10,null)),submenu:O,role:"window"}),this.setMacWindowMenu(O)}M&&i.append(M);var T=new o.Menu,W=new o.MenuItem({label:this.mnemonicLabel(n.localize(11,null)),submenu:T});this.shouldDrawMenu("Preferences")&&(this.shouldFallback("Preferences")?this.setFallbackMenuById(T,"Preferences"):this.setMenuById(T,"Preferences"),i.append(W));var x=new o.Menu,L=new o.MenuItem({ label:this.mnemonicLabel(n.localize(12,null)),submenu:x,role:"help"});this.shouldDrawMenu("Help")&&(this.shouldFallback("Help")?this.setFallbackMenuById(x,"Help"):this.setMenuById(x,"Help"),i.append(L)),o.Menu.setApplicationMenu(i)},e.prototype.setMacApplicationMenu=function(e){var t=this,r=new o.MenuItem({label:n.localize(13,null,p.default.nameLong),role:"about"}),i=this.getUpdateMenuItems(),a=new o.Menu,s=new o.MenuItem({label:n.localize(14,null),role:"services",submenu:a}),c=new o.MenuItem({label:n.localize(15,null,p.default.nameLong),role:"hide",accelerator:"Command+H"}),u=new o.MenuItem({label:n.localize(16,null),role:"hideothers",accelerator:"Command+Alt+H"}),l=new o.MenuItem({label:n.localize(17,null),role:"unhide"}),d=new o.MenuItem(this.likeAction("workbench.action.quit",{label:n.localize(18,null,p.default.nameLong),click:function(){(0===t.windowsMainService.getWindowCount()||o.BrowserWindow.getFocusedWindow())&&t.windowsMainService.quit()}})),f=[r];f.push.apply(f,i), f.push.apply(f,[b(),s,b(),c,u,l,b(),d]),f.forEach(function(t){return e.append(t)})},e.prototype.shouldDrawMenu=function(e){switch(e){case"File":case"Recent":case"Help":return!0;default:return this.windowsMainService.getWindowCount()>0&&!!this.menubarMenus[e]}},e.prototype.shouldFallback=function(e){return this.shouldDrawMenu(e)&&(0===this.windowsMainService.getWindowCount()||!this.menubarMenus[e])},e.prototype.setFallbackMenuById=function(t,i){var a=this;switch(i){case"File":var c=new o.MenuItem(this.likeAction("workbench.action.files.newUntitledFile",{label:this.mnemonicLabel(n.localize(19,null)),click:function(){return a.windowsMainService.openNewWindow(s.OpenContext.MENU)}})),u=new o.MenuItem(this.likeAction("workbench.action.newWindow",{label:this.mnemonicLabel(n.localize(20,null)),click:function(){return a.windowsMainService.openNewWindow(s.OpenContext.MENU)}})),l=new o.MenuItem(this.likeAction("workbench.action.files.openFileFolder",{label:this.mnemonicLabel(n.localize(21,null)),click:function(e,t,n){ return a.windowsMainService.pickFileFolderAndOpen({forceNewWindow:a.isOptionClick(n),telemetryExtraData:{from:"menu"}})}})),d=new o.MenuItem(this.likeAction("workbench.action.openWorkspace",{label:this.mnemonicLabel(n.localize(22,null)),click:function(e,t,n){return a.windowsMainService.pickWorkspaceAndOpen({forceNewWindow:a.isOptionClick(n),telemetryExtraData:{from:"menu"}})}}));t.append(c),t.append(u),t.append(b()),t.append(l),t.append(d);break;case"Recent":t.append(this.createMenuItem(n.localize(23,null),"workbench.action.reopenClosedEditor"));var f=this.historyMainService.getRecentlyOpened(),h=f.workspaces,v=f.files;if(h.length>0){t.append(b());for(g=0;g<e.MAX_MENU_RECENT_ENTRIES&&g<h.length;g++)t.append(this.createOpenRecentMenuItem(h[g],"openRecentWorkspace",!1))}if(v.length>0){t.append(b());for(var g=0;g<e.MAX_MENU_RECENT_ENTRIES&&g<v.length;g++)t.append(this.createOpenRecentMenuItem(v[g],"openRecentFile",!0))}(h.length||v.length)&&(t.append(b()), t.append(this.createMenuItem(n.localize(24,null),"workbench.action.openRecent")),t.append(b()),t.append(new o.MenuItem(this.likeAction("workbench.action.clearRecentFiles",{label:this.mnemonicLabel(n.localize(25,null)),click:function(){return a.historyMainService.clearRecentlyOpened()}}))));break;case"Help":var m=void 0;p.default.twitterUrl&&(m=new o.MenuItem({label:this.mnemonicLabel(n.localize(26,null)),click:function(){return a.openUrl(p.default.twitterUrl,"openTwitterUrl")}}));var y=void 0;p.default.requestFeatureUrl&&(y=new o.MenuItem({label:this.mnemonicLabel(n.localize(27,null)),click:function(){return a.openUrl(p.default.requestFeatureUrl,"openUserVoiceUrl")}}));var w=void 0;if(p.default.reportIssueUrl){var S=n.localize(28,null);w=new o.MenuItem({label:this.mnemonicLabel(S),click:function(){return a.openUrl(p.default.reportIssueUrl,"openReportIssues")}})}var _=void 0;p.default.privacyStatementUrl&&(_=new o.MenuItem({label:this.mnemonicLabel(n.localize(29,null)),click:function(){if(r.language){ var e=p.default.licenseUrl.indexOf("?")>0?"&":"?";a.openUrl(""+p.default.licenseUrl+e+"lang="+r.language,"openLicenseUrl")}else a.openUrl(p.default.licenseUrl,"openLicenseUrl")}}));var C=void 0;p.default.privacyStatementUrl&&(C=new o.MenuItem({label:this.mnemonicLabel(n.localize(30,null)),click:function(){if(r.language){var e=p.default.licenseUrl.indexOf("?")>0?"&":"?";a.openUrl(""+p.default.privacyStatementUrl+e+"lang="+r.language,"openPrivacyStatement")}else a.openUrl(p.default.privacyStatementUrl,"openPrivacyStatement")}}));var k=new o.MenuItem({label:this.mnemonicLabel(n.localize(31,null)),click:function(){return a.runActionInRenderer("workbench.action.openProcessExplorer")}});m&&t.append(m),y&&t.append(y),w&&t.append(w),(m||y||w)&&t.append(b()),_&&t.append(_),C&&t.append(C),(_||C)&&t.append(b()),t.append(k)}},e.prototype.setMenuById=function(e,t){var n=this;console.log("Attempting to set menu for "+t),this.menubarMenus[t].items.forEach(function(t){if("vscode.menubar.separator"===t.id)e.append(b());else{ var r=void 0,i=t;r=n.createMenuItem(i.label,i.id,i.enabled,i.checked),e.append(r)}})},e.prototype.createOpenRecentMenuItem=function(e,t,n){var r,i,a=this;return w.isSingleFolderWorkspaceIdentifier(e)||"string"==typeof e?(r=v.unmnemonicLabel(v.getPathLabel(e,this.environmentService,null)),i=e):(r=w.getWorkspaceLabel(e,this.environmentService,{verbose:!0}),i=e.configPath),new o.MenuItem(this.likeAction(t,{label:r,click:function(t,r,o){var c=a.isOptionClick(o);a.windowsMainService.open({context:s.OpenContext.MENU,cli:a.environmentService.args,pathsToOpen:[i],forceNewWindow:c,forceOpenWorkspaceAsFile:n}).length>0||a.historyMainService.removeFromRecentlyOpened([w.isSingleFolderWorkspaceIdentifier(e)?e:e.configPath])}},!1))},e.prototype.isOptionClick=function(e){return e&&(!r.isMacintosh&&(e.ctrlKey||e.shiftKey)||r.isMacintosh&&(e.metaKey||e.altKey))},e.prototype.setMacWindowMenu=function(e){var t=new o.MenuItem({label:n.localize(32,null),role:"minimize",accelerator:"Command+M", enabled:this.windowsMainService.getWindowCount()>0}),r=new o.MenuItem({label:n.localize(33,null),role:"zoom",enabled:this.windowsMainService.getWindowCount()>0}),i=new o.MenuItem({label:n.localize(34,null),role:"front",enabled:this.windowsMainService.getWindowCount()>0}),a=this.createMenuItem(n.localize(35,null),"workbench.action.switchWindow");this.nativeTabMenuItems=[];var s=[];if(this.currentEnableNativeTabs){var c=this.windowsMainService.getWindowCount()>1;this.nativeTabMenuItems.push(this.createMenuItem(n.localize(36,null),"workbench.action.showPreviousWindowTab",c)),this.nativeTabMenuItems.push(this.createMenuItem(n.localize(37,null),"workbench.action.showNextWindowTab",c)),this.nativeTabMenuItems.push(this.createMenuItem(n.localize(38,null),"workbench.action.moveWindowTabToNewWindow",c)),this.nativeTabMenuItems.push(this.createMenuItem(n.localize(39,null),"workbench.action.mergeAllWindowTabs",c)),s.push.apply(s,[b()].concat(this.nativeTabMenuItems))}else this.nativeTabMenuItems=[] ;[t,r,a].concat(s,[b(),i]).forEach(function(t){return e.append(t)})},e.prototype.getUpdateMenuItems=function(){var e=this;switch(this.updateService.state.type){case d.StateType.Uninitialized:return[];case d.StateType.Idle:return[new o.MenuItem({label:n.localize(40,null),click:function(){return setTimeout(function(){e.reportMenuActionTelemetry("CheckForUpdate");var t=e.windowsMainService.getFocusedWindow(),n=t?{windowId:t.id}:null;e.updateService.checkForUpdates(n)},0)}})];case d.StateType.CheckingForUpdates:return[new o.MenuItem({label:n.localize(41,null),enabled:!1})];case d.StateType.AvailableForDownload:return[new o.MenuItem({label:n.localize(42,null),click:function(){e.updateService.downloadUpdate()}})];case d.StateType.Downloading:return[new o.MenuItem({label:n.localize(43,null),enabled:!1})];case d.StateType.Downloaded:return[new o.MenuItem({label:n.localize(44,null),click:function(){e.reportMenuActionTelemetry("InstallUpdate"),e.updateService.applyUpdate()}})];case d.StateType.Updating: return[new o.MenuItem({label:n.localize(45,null),enabled:!1})];case d.StateType.Ready:return[new o.MenuItem({label:n.localize(46,null),click:function(){e.reportMenuActionTelemetry("RestartToUpdate"),e.updateService.quitAndInstall()}})]}},e.prototype.createMenuItem=function(e,t,n,r){var i=this,a=this.mnemonicLabel(e),s="function"==typeof t?t:function(e,n,r){var o=t;Array.isArray(t)&&(o=i.isOptionClick(r)?t[1]:t[0]),i.runActionInRenderer(o)},c="boolean"==typeof n?n:this.windowsMainService.getWindowCount()>0,u="boolean"==typeof r&&r,l={label:a,click:s,enabled:c};u&&(l.type="checkbox",l.checked=u);var d;return"string"==typeof t?d=t:Array.isArray(t)&&(d=t[0]),new o.MenuItem(this.withKeybinding(d,l))},e.prototype.runActionInRenderer=function(e){this.windowsMainService.getFocusedWindow()&&this.windowsMainService.sendToFocused("vscode:runAction",{id:e,from:"menu"})},e.prototype.withKeybinding=function(e,t){var n=this.keybindingsResolver.getKeybinding(e);if(n&&n.label)if(n.isNative)t.accelerator=n.label;else{ var r=t.label.indexOf("[");t.label=r>=0?t.label.substr(0,r)+" ["+n.label+"]":t.label+" ["+n.label+"]"}else t.accelerator=void 0;return t},e.prototype.likeAction=function(e,t,n){var r=this;void 0===n&&(n=!t.accelerator),n&&(t=this.withKeybinding(e,t));var i=t.click;return t.click=function(t,n,o){r.reportMenuActionTelemetry(e),i&&i(t,n,o)},t},e.prototype.openUrl=function(e,t){o.shell.openExternal(e),this.reportMenuActionTelemetry(t)},e.prototype.reportMenuActionTelemetry=function(e){this.telemetryService.publicLog("workbenchActionExecuted",{id:e,from:"menu"})},e.prototype.mnemonicLabel=function(e){return v.mnemonicMenuLabel(e,!this.currentEnableMenuBarMnemonics)},e.MAX_MENU_RECENT_ENTRIES=10,e=a([c(0,d.IUpdateService),c(1,h.IInstantiationService),c(2,u.IConfigurationService),c(3,m.IWindowsMainService),c(4,i.IEnvironmentService),c(5,l.ITelemetryService),c(6,y.IHistoryMainService)],e)}();t.Menubar=S}), define(e[161],t([0,1,92,3,21,11,10,23,14,47,30,28,16,24,4,29,61,22,38,19]),function(e,t,n,r,i,o,s,u,l,d,p,f,h,v,g,m,y,w,b,S){"use strict";function _(){return new s.MenuItem({type:"separator"})}Object.defineProperty(t,"__esModule",{value:!0});var C=function(){function e(e,t,n,r,i,o,a,s){var c=this;this.updateService=e,this.configurationService=n,this.windowsMainService=r,this.windowsService=i,this.environmentService=o,this.telemetryService=a,this.historyMainService=s,this.keys=["files.autoSave","editor.multiCursorModifier","workbench.sideBar.location","workbench.statusBar.visible","workbench.activityBar.visible","window.enableMenuBarMnemonics","window.nativeTabs"],this.nativeTabMenuItems=[],this.menuUpdater=new v.RunOnceScheduler(function(){return c.doUpdateMenu()},0),this.keybindingsResolver=t.createInstance(y.KeybindingsResolver),this.install(),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;s.app.on("will-quit",function(){e.isQuitting=!0}), this.historyMainService.onRecentlyOpenedChange(function(){return e.updateMenu()}),this.windowsMainService.onWindowsCountChanged(function(t){return e.onWindowsCountChanged(t)}),this.windowsMainService.onActiveWindowChanged(function(){return e.updateWorkspaceMenuItems()}),this.windowsMainService.onWindowReady(function(){return e.updateWorkspaceMenuItems()}),this.windowsMainService.onWindowClose(function(){return e.updateWorkspaceMenuItems()}),this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated(t)}),this.updateService.onStateChange(function(){return e.updateMenu()}),this.keybindingsResolver.onKeybindingsChanged(function(){return e.updateMenu()})},e.prototype.onConfigurationUpdated=function(e){this.keys.some(function(t){return e.affectsConfiguration(t)})&&this.updateMenu()},Object.defineProperty(e.prototype,"currentAutoSaveSetting",{get:function(){return this.configurationService.getValue("files.autoSave")},enumerable:!0,configurable:!0}), Object.defineProperty(e.prototype,"currentMultiCursorModifierSetting",{get:function(){return this.configurationService.getValue("editor.multiCursorModifier")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentSidebarLocation",{get:function(){return this.configurationService.getValue("workbench.sideBar.location")||"left"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentStatusbarVisible",{get:function(){var e=this.configurationService.getValue("workbench.statusBar.visible");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentActivityBarVisible",{get:function(){var e=this.configurationService.getValue("workbench.activityBar.visible");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentEnableMenuBarMnemonics",{get:function(){var e=this.configurationService.getValue("window.enableMenuBarMnemonics");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0, configurable:!0}),Object.defineProperty(e.prototype,"currentEnableNativeTabs",{get:function(){var e=this.configurationService.getValue("window.nativeTabs");return"boolean"!=typeof e&&(e=!1),e},enumerable:!0,configurable:!0}),e.prototype.updateMenu=function(){this.menuUpdater.schedule()},e.prototype.doUpdateMenu=function(){var e=this;this.isQuitting||setTimeout(function(){e.isQuitting||e.install()},10)},e.prototype.onWindowsCountChanged=function(e){r.isMacintosh&&(0===e.oldCount&&e.newCount>0||e.oldCount>0&&0===e.newCount?this.updateMenu():this.currentEnableNativeTabs&&this.nativeTabMenuItems.forEach(function(t){t&&(t.enabled=e.newCount>1)}))},e.prototype.updateWorkspaceMenuItems=function(){var e=this.windowsMainService.getLastActiveWindow(),t=e&&!!e.openedWorkspace,n=e&&!!e.openedFolderPath;this.closeWorkspace.visible=t,this.closeFolder.visible=!t,this.closeFolder.enabled=n||r.isLinux},e.prototype.install=function(){var e,t=this,i=new s.Menu;if(r.isMacintosh){var o=new s.Menu;e=new s.MenuItem({ label:h.default.nameShort,submenu:o}),this.setMacApplicationMenu(o)}var a=new s.Menu,c=new s.MenuItem({label:this.mnemonicLabel(n.localize(0,null)),submenu:a});this.setFileMenu(a);var l=new s.Menu,d=new s.MenuItem({label:this.mnemonicLabel(n.localize(1,null)),submenu:l});this.setEditMenu(l);var p=new s.Menu,f=new s.MenuItem({label:this.mnemonicLabel(n.localize(2,null)),submenu:p});this.setSelectionMenu(p);var v=new s.Menu,g=new s.MenuItem({label:this.mnemonicLabel(n.localize(3,null)),submenu:v});this.setViewMenu(v);var m=new s.Menu,y=new s.MenuItem({label:this.mnemonicLabel(n.localize(4,null)),submenu:m});this.setGotoMenu(m);var w=new s.Menu,b=new s.MenuItem({label:this.mnemonicLabel(n.localize(5,null)),submenu:w});this.setDebugMenu(w);var S;if(r.isMacintosh){var _=new s.Menu;S=new s.MenuItem({label:this.mnemonicLabel(n.localize(6,null)),submenu:_,role:"window"}),this.setMacWindowMenu(_)}var C=new s.Menu,k=new s.MenuItem({label:this.mnemonicLabel(n.localize(7,null)),submenu:C,role:"help"});this.setHelpMenu(C) ;var E=new s.Menu,P=new s.MenuItem({label:this.mnemonicLabel(n.localize(8,null)),submenu:E});if(this.setTaskMenu(E),e&&i.append(e),i.append(c),i.append(d),i.append(f),i.append(g),i.append(y),i.append(b),i.append(P),S&&i.append(S),i.append(k),s.Menu.setApplicationMenu(i),r.isMacintosh&&!this.appMenuInstalled){this.appMenuInstalled=!0;var I=new s.Menu;I.append(new s.MenuItem({label:this.mnemonicLabel(n.localize(9,null)),click:function(){return t.windowsMainService.openNewWindow(u.OpenContext.DOCK)}})),s.app.dock.setMenu(I)}},e.prototype.setMacApplicationMenu=function(e){var t=this,r=new s.MenuItem({label:n.localize(10,null,h.default.nameLong),role:"about"}),i=this.getUpdateMenuItems(),o=this.getPreferencesMenu(),a=new s.Menu,c=new s.MenuItem({label:n.localize(11,null),role:"services",submenu:a}),u=new s.MenuItem({label:n.localize(12,null,h.default.nameLong),role:"hide",accelerator:"Command+H"}),l=new s.MenuItem({label:n.localize(13,null),role:"hideothers",accelerator:"Command+Alt+H"}),d=new s.MenuItem({ label:n.localize(14,null),role:"unhide"}),p=new s.MenuItem(this.likeAction("workbench.action.quit",{label:n.localize(15,null,h.default.nameLong),click:function(){(0===t.windowsMainService.getWindowCount()||s.BrowserWindow.getFocusedWindow())&&t.windowsMainService.quit()}})),f=[r];f.push.apply(f,i),f.push.apply(f,[_(),o,_(),c,_(),u,l,d,_(),p]),f.forEach(function(t){return e.append(t)})},e.prototype.setFileMenu=function(e){var t,o=this,a=0===this.windowsMainService.getWindowCount();t=a?new s.MenuItem(this.likeAction("workbench.action.files.newUntitledFile",{label:this.mnemonicLabel(n.localize(16,null)),click:function(){return o.windowsMainService.openNewWindow(u.OpenContext.MENU)}})):this.createMenuItem(n.localize(17,null),"workbench.action.files.newUntitledFile");var c;c=a?new s.MenuItem(this.likeAction("workbench.action.files.openFileFolder",{label:this.mnemonicLabel(n.localize(18,null)),click:function(e,t,n){return o.windowsMainService.pickFileFolderAndOpen({forceNewWindow:o.isOptionClick(n), telemetryExtraData:{from:"menu"}})}})):this.createMenuItem(n.localize(19,null),["workbench.action.files.openFileFolder","workbench.action.files.openFileFolderInNewWindow"]);var l;l=a?new s.MenuItem(this.likeAction("workbench.action.openWorkspace",{label:this.mnemonicLabel(n.localize(20,null)),click:function(e,t,n){return o.windowsMainService.pickWorkspaceAndOpen({forceNewWindow:o.isOptionClick(n),telemetryExtraData:{from:"menu"}})}})):this.createMenuItem(n.localize(21,null),["workbench.action.openWorkspace","workbench.action.openWorkspaceInNewWindow"]);var p;p=a?new s.MenuItem(this.likeAction("workbench.action.files.openFolder",{label:this.mnemonicLabel(n.localize(22,null)),click:function(e,t,n){return o.windowsMainService.pickFolderAndOpen({forceNewWindow:o.isOptionClick(n),telemetryExtraData:{from:"menu"}})}})):this.createMenuItem(n.localize(23,null),["workbench.action.files.openFolder","workbench.action.files.openFolderInNewWindow"]);var f ;f=a?new s.MenuItem(this.likeAction("workbench.action.files.openFile",{label:this.mnemonicLabel(n.localize(24,null)),click:function(e,t,n){return o.windowsMainService.pickFileAndOpen({forceNewWindow:o.isOptionClick(n),telemetryExtraData:{from:"menu"}})}})):this.createMenuItem(n.localize(25,null),["workbench.action.files.openFile","workbench.action.files.openFileInNewWindow"]);var h=new s.Menu;this.setOpenRecentMenu(h);var v=new s.MenuItem({label:this.mnemonicLabel(n.localize(26,null)),submenu:h,enabled:h.items.length>0 }),g=this.createMenuItem(n.localize(27,null),"workbench.action.saveWorkspaceAs"),m=this.createMenuItem(n.localize(28,null),"workbench.action.addRootFolder"),y=this.createMenuItem(n.localize(29,null),"workbench.action.files.save"),w=this.createMenuItem(n.localize(30,null),"workbench.action.files.saveAs"),b=this.createMenuItem(n.localize(31,null),"workbench.action.files.saveAll"),S=[d.AutoSaveConfiguration.AFTER_DELAY,d.AutoSaveConfiguration.ON_FOCUS_CHANGE,d.AutoSaveConfiguration.ON_WINDOW_CHANGE].some(function(e){return o.currentAutoSaveSetting===e}),C=new s.MenuItem(this.likeAction("vscode.toggleAutoSave",{label:this.mnemonicLabel(n.localize(32,null)),type:"checkbox",checked:S,enabled:this.windowsMainService.getWindowCount()>0,click:function(){return o.windowsMainService.sendToFocused("vscode.toggleAutoSave")}},!1)),k=this.getPreferencesMenu(),E=new s.MenuItem(this.likeAction("workbench.action.newWindow",{label:this.mnemonicLabel(n.localize(33,null)),click:function(){ return o.windowsMainService.openNewWindow(u.OpenContext.MENU)}})),P=this.createMenuItem(n.localize(34,null),"workbench.action.files.revert"),I=new s.MenuItem(this.likeAction("workbench.action.closeWindow",{label:this.mnemonicLabel(n.localize(35,null)),click:function(){return o.windowsMainService.getLastActiveWindow().win.close()},enabled:this.windowsMainService.getWindowCount()>0}));this.closeWorkspace=this.createMenuItem(n.localize(36,null),"workbench.action.closeFolder"),this.closeFolder=this.createMenuItem(n.localize(37,null),"workbench.action.closeFolder");var M=this.createMenuItem(n.localize(38,null),"workbench.action.closeActiveEditor"),O=new s.MenuItem(this.likeAction("workbench.action.quit",{label:this.mnemonicLabel(n.localize(39,null)),click:function(){return o.windowsMainService.quit()}}));this.updateWorkspaceMenuItems(), i.coalesce([t,E,_(),r.isMacintosh?c:null,r.isMacintosh?null:f,r.isMacintosh?null:p,l,v,_(),m,g,_(),y,w,b,_(),C,_(),r.isMacintosh?null:k,r.isMacintosh?null:_(),P,M,this.closeWorkspace,this.closeFolder,I,r.isMacintosh?null:_(),r.isMacintosh?null:O]).forEach(function(t){return e.append(t)})},e.prototype.getPreferencesMenu=function(){var e=this.createMenuItem(n.localize(40,null),"workbench.action.openSettings"),t=this.createMenuItem(n.localize(41,null),"workbench.action.openGlobalKeybindings"),r=this.createMenuItem(n.localize(42,null),"workbench.extensions.action.showRecommendedKeymapExtensions"),i=this.createMenuItem(n.localize(43,null),"workbench.action.openSnippets"),o=this.createMenuItem(n.localize(44,null),"workbench.action.selectTheme"),a=this.createMenuItem(n.localize(45,null),"workbench.action.selectIconTheme"),c=new s.Menu;return c.append(e),c.append(_()),c.append(t),c.append(r),c.append(_()),c.append(i),c.append(_()),c.append(o),c.append(a),new s.MenuItem({label:this.mnemonicLabel(n.localize(46,null)), submenu:c})},e.prototype.setOpenRecentMenu=function(t){var r=this;t.append(this.createMenuItem(n.localize(47,null),"workbench.action.reopenClosedEditor"));var i=this.historyMainService.getRecentlyOpened(),o=i.workspaces,a=i.files;if(o.length>0){t.append(_());for(c=0;c<e.MAX_MENU_RECENT_ENTRIES&&c<o.length;c++)t.append(this.createOpenRecentMenuItem(o[c],"openRecentWorkspace",!1))}if(a.length>0){t.append(_());for(var c=0;c<e.MAX_MENU_RECENT_ENTRIES&&c<a.length;c++)t.append(this.createOpenRecentMenuItem(a[c],"openRecentFile",!0))}(o.length||a.length)&&(t.append(_()),t.append(this.createMenuItem(n.localize(48,null),"workbench.action.openRecent")),t.append(_()),t.append(new s.MenuItem(this.likeAction("workbench.action.clearRecentFiles",{label:this.mnemonicLabel(n.localize(49,null)),click:function(){return r.historyMainService.clearRecentlyOpened()}}))))},e.prototype.createOpenRecentMenuItem=function(e,t,n){var r,i,o=this ;return S.isSingleFolderWorkspaceIdentifier(e)||"string"==typeof e?(r=m.unmnemonicLabel(m.getPathLabel(e,this.environmentService)),i=e):(r=S.getWorkspaceLabel(e,this.environmentService,{verbose:!0}),i=e.configPath),new s.MenuItem(this.likeAction(t,{label:r,click:function(t,r,a){var s=o.isOptionClick(a);o.windowsMainService.open({context:u.OpenContext.MENU,cli:o.environmentService.args,pathsToOpen:[i],forceNewWindow:s,forceOpenWorkspaceAsFile:n}).length>0||o.historyMainService.removeFromRecentlyOpened([S.isSingleFolderWorkspaceIdentifier(e)?e:e.configPath])}},!1))},e.prototype.isOptionClick=function(e){return e&&(!r.isMacintosh&&(e.ctrlKey||e.shiftKey)||r.isMacintosh&&(e.metaKey||e.altKey))},e.prototype.createRoleMenuItem=function(e,t,n){var r={label:this.mnemonicLabel(e),role:n,enabled:!0};return new s.MenuItem(this.withKeybinding(t,r))},e.prototype.setEditMenu=function(e){var t,i,o,a,c;r.isMacintosh?(t=this.createContextAwareMenuItem(n.localize(50,null),"undo",{inDevTools:function(e){return e.undo()}, inNoWindow:function(){return s.Menu.sendActionToFirstResponder("undo:")}}),i=this.createContextAwareMenuItem(n.localize(51,null),"redo",{inDevTools:function(e){return e.redo()},inNoWindow:function(){return s.Menu.sendActionToFirstResponder("redo:")}}),o=this.createRoleMenuItem(n.localize(52,null),"editor.action.clipboardCutAction","cut"),a=this.createRoleMenuItem(n.localize(53,null),"editor.action.clipboardCopyAction","copy"),c=this.createRoleMenuItem(n.localize(54,null),"editor.action.clipboardPasteAction","paste")):(t=this.createMenuItem(n.localize(55,null),"undo"),i=this.createMenuItem(n.localize(56,null),"redo"),o=this.createMenuItem(n.localize(57,null),"editor.action.clipboardCutAction"),a=this.createMenuItem(n.localize(58,null),"editor.action.clipboardCopyAction"),c=this.createMenuItem(n.localize(59,null),"editor.action.clipboardPasteAction")) ;var u=this.createMenuItem(n.localize(60,null),"actions.find"),l=this.createMenuItem(n.localize(61,null),"editor.action.startFindReplaceAction"),d=this.createMenuItem(n.localize(62,null),"workbench.action.findInFiles"),p=this.createMenuItem(n.localize(63,null),"workbench.action.replaceInFiles"),f=this.createMenuItem(n.localize(64,null),"editor.emmet.action.expandAbbreviation"),h=this.createMenuItem(n.localize(65,null),"workbench.action.showEmmetCommands"),v=this.createMenuItem(n.localize(66,null),"editor.action.commentLine"),g=this.createMenuItem(n.localize(67,null),"editor.action.blockComment");[t,i,_(),o,a,c,_(),u,l,_(),d,p,_(),v,g,f,h].forEach(function(t){return e.append(t)})},e.prototype.setSelectionMenu=function(e){var t;t="ctrlCmd"===this.currentMultiCursorModifierSetting?n.localize(68,null):r.isMacintosh?n.localize(69,null):n.localize(70,null) ;var i=this.createMenuItem(t,"workbench.action.toggleMultiCursorModifier"),o=this.createMenuItem(n.localize(71,null),"editor.action.insertCursorAbove"),a=this.createMenuItem(n.localize(72,null),"editor.action.insertCursorBelow"),c=this.createMenuItem(n.localize(73,null),"editor.action.insertCursorAtEndOfEachLineSelected"),u=this.createMenuItem(n.localize(74,null),"editor.action.addSelectionToNextFindMatch"),l=this.createMenuItem(n.localize(75,null),"editor.action.addSelectionToPreviousFindMatch"),d=this.createMenuItem(n.localize(76,null),"editor.action.selectHighlights"),p=this.createMenuItem(n.localize(77,null),"editor.action.copyLinesUpAction"),f=this.createMenuItem(n.localize(78,null),"editor.action.copyLinesDownAction"),h=this.createMenuItem(n.localize(79,null),"editor.action.moveLinesUpAction"),v=this.createMenuItem(n.localize(80,null),"editor.action.moveLinesDownAction");[r.isMacintosh?this.createContextAwareMenuItem(n.localize(81,null),"editor.action.selectAll",{inDevTools:function(e){ return e.selectAll()},inNoWindow:function(){return s.Menu.sendActionToFirstResponder("selectAll:")}}):this.createMenuItem(n.localize(82,null),"editor.action.selectAll"),this.createMenuItem(n.localize(83,null),"editor.action.smartSelect.grow"),this.createMenuItem(n.localize(84,null),"editor.action.smartSelect.shrink"),_(),p,f,h,v,_(),i,o,a,c,u,l,d].forEach(function(t){return e.append(t)})},e.prototype.setViewMenu=function(e){ var t=this,o=this.createMenuItem(n.localize(85,null),"workbench.action.showCommands"),a=this.createMenuItem(n.localize(86,null),"workbench.action.openView"),c=this.createMenuItem(n.localize(87,null),"workbench.view.explorer"),u=this.createMenuItem(n.localize(88,null),"workbench.view.search"),l=this.createMenuItem(n.localize(89,null),"workbench.view.scm"),d=this.createMenuItem(n.localize(90,null),"workbench.view.debug"),p=this.createMenuItem(n.localize(91,null),"workbench.view.extensions"),f=this.createMenuItem(n.localize(92,null),"workbench.action.output.toggleOutput"),h=this.createMenuItem(n.localize(93,null),"workbench.debug.action.toggleRepl"),v=this.createMenuItem(n.localize(94,null),"workbench.action.terminal.toggleTerminal"),g=this.createMenuItem(n.localize(95,null),"workbench.actions.view.problems"),m=new s.MenuItem(this.withKeybinding("workbench.action.toggleFullScreen",{label:this.mnemonicLabel(n.localize(96,null)),click:function(){return t.windowsMainService.getLastActiveWindow().toggleFullScreen() },enabled:this.windowsMainService.getWindowCount()>0 })),y=this.createMenuItem(n.localize(97,null),"workbench.action.toggleZenMode"),w=this.createMenuItem(n.localize(98,null),"workbench.action.toggleCenteredLayout"),b=this.createMenuItem(n.localize(99,null),"workbench.action.toggleMenuBar"),S=new s.Menu,C=this.createMenuItem(n.localize(100,null),"workbench.action.splitEditorUp"),k=this.createMenuItem(n.localize(101,null),"workbench.action.splitEditorDown"),E=this.createMenuItem(n.localize(102,null),"workbench.action.splitEditorLeft"),P=this.createMenuItem(n.localize(103,null),"workbench.action.splitEditorRight"),I=this.createMenuItem(n.localize(104,null),"workbench.action.editorLayoutSingle"),M=this.createMenuItem(n.localize(105,null),"workbench.action.editorLayoutTwoColumns"),O=this.createMenuItem(n.localize(106,null),"workbench.action.editorLayoutThreeColumns"),T=this.createMenuItem(n.localize(107,null),"workbench.action.editorLayoutTwoRows"),W=this.createMenuItem(n.localize(108,null),"workbench.action.editorLayoutThreeRows"),x=this.createMenuItem(n.localize(109,null),"workbench.action.editorLayoutTwoByTwoGrid"),L=this.createMenuItem(n.localize(110,null),"workbench.action.editorLayoutTwoColumnsRight"),D=this.createMenuItem(n.localize(111,null),"workbench.action.editorLayoutTwoColumnsBottom"),A=this.createMenuItem(n.localize(112,null),"workbench.action.toggleEditorGroupLayout") ;[C,k,E,P,_(),I,M,O,T,W,x,L,D,_(),A].forEach(function(e){return S.append(e)});var F,R=new s.MenuItem({label:this.mnemonicLabel(n.localize(113,null)),submenu:S}),U=this.createMenuItem(n.localize(114,null),"workbench.action.toggleSidebarVisibility");F="right"!==this.currentSidebarLocation?n.localize(115,null):n.localize(116,null);var N,B=this.createMenuItem(F,"workbench.action.toggleSidebarPosition"),z=this.createMenuItem(n.localize(117,null),"workbench.action.togglePanel");N=this.currentStatusbarVisible?n.localize(118,null):n.localize(119,null);var j,K=this.createMenuItem(N,"workbench.action.toggleStatusbarVisibility");j=this.currentActivityBarVisible?n.localize(120,null):n.localize(121,null) ;var V=this.createMenuItem(j,"workbench.action.toggleActivityBarVisibility"),q=this.createMenuItem(n.localize(122,null),"editor.action.toggleWordWrap"),H=this.createMenuItem(n.localize(123,null),"editor.action.toggleMinimap"),G=this.createMenuItem(n.localize(124,null),"editor.action.toggleRenderWhitespace"),Y=this.createMenuItem(n.localize(125,null),"editor.action.toggleRenderControlCharacter"),J=this.createMenuItem(n.localize(126,null),"workbench.action.zoomIn"),Q=this.createMenuItem(n.localize(127,null),"workbench.action.zoomOut"),$=this.createMenuItem(n.localize(128,null),"workbench.action.zoomReset");i.coalesce([o,a,_(),c,u,l,d,p,_(),f,g,h,v,_(),m,y,w,r.isWindows||r.isLinux?b:void 0,_(),R,_(),B,U,z,K,V,_(),q,H,G,Y,_(),J,Q,$]).forEach(function(t){return e.append(t)})},e.prototype.setGotoMenu=function(e){ var t=this.createMenuItem(n.localize(129,null),"workbench.action.navigateBack"),r=this.createMenuItem(n.localize(130,null),"workbench.action.navigateForward"),i=new s.Menu,o=this.createMenuItem(n.localize(131,null),"workbench.action.nextEditor"),a=this.createMenuItem(n.localize(132,null),"workbench.action.previousEditor"),c=this.createMenuItem(n.localize(133,null),"workbench.action.openNextRecentlyUsedEditorInGroup"),u=this.createMenuItem(n.localize(134,null),"workbench.action.openPreviousRecentlyUsedEditorInGroup");[o,a,_(),c,u].forEach(function(e){return i.append(e)});var l=new s.MenuItem({label:this.mnemonicLabel(n.localize(135,null)),submenu:i,enabled:!0 }),d=new s.Menu,p=this.createMenuItem(n.localize(136,null),"workbench.action.focusFirstEditorGroup"),f=this.createMenuItem(n.localize(137,null),"workbench.action.focusSecondEditorGroup"),h=this.createMenuItem(n.localize(138,null),"workbench.action.focusThirdEditorGroup"),v=this.createMenuItem(n.localize(139,null),"workbench.action.focusFourthEditorGroup"),g=this.createMenuItem(n.localize(140,null),"workbench.action.focusFifthEditorGroup"),m=this.createMenuItem(n.localize(141,null),"workbench.action.focusNextGroup"),y=this.createMenuItem(n.localize(142,null),"workbench.action.focusPreviousGroup"),w=this.createMenuItem(n.localize(143,null),"workbench.action.focusLeftGroup"),b=this.createMenuItem(n.localize(144,null),"workbench.action.focusRightGroup"),S=this.createMenuItem(n.localize(145,null),"workbench.action.focusAboveGroup"),C=this.createMenuItem(n.localize(146,null),"workbench.action.focusBelowGroup");[p,f,h,v,g,_(),m,y,_(),S,C,w,b].forEach(function(e){return d.append(e)});var k=new s.MenuItem({ label:this.mnemonicLabel(n.localize(147,null)),submenu:d,enabled:!0}),E=this.createMenuItem(n.localize(148,null),"workbench.action.quickOpen"),P=this.createMenuItem(n.localize(149,null),"workbench.action.gotoSymbol"),I=this.createMenuItem(n.localize(150,null),"workbench.action.showAllSymbols"),M=this.createMenuItem(n.localize(151,null),"editor.action.goToDeclaration"),O=this.createMenuItem(n.localize(152,null),"editor.action.goToTypeDefinition"),T=this.createMenuItem(n.localize(153,null),"editor.action.goToImplementation"),W=this.createMenuItem(n.localize(154,null),"workbench.action.gotoLine");[t,r,_(),l,k,_(),E,P,I,M,O,T,W].forEach(function(t){return e.append(t)})},e.prototype.setDebugMenu=function(e){ var t=this.createMenuItem(n.localize(155,null),"workbench.action.debug.start"),r=this.createMenuItem(n.localize(156,null),"workbench.action.debug.run"),i=this.createMenuItem(n.localize(157,null),"workbench.action.debug.stop"),o=this.createMenuItem(n.localize(158,null),"workbench.action.debug.restart"),a=this.createMenuItem(n.localize(159,null),"workbench.action.debug.configure"),c=this.createMenuItem(n.localize(160,null),"debug.addConfiguration"),u=this.createMenuItem(n.localize(161,null),"workbench.action.debug.stepOver"),l=this.createMenuItem(n.localize(162,null),"workbench.action.debug.stepInto"),d=this.createMenuItem(n.localize(163,null),"workbench.action.debug.stepOut"),p=this.createMenuItem(n.localize(164,null),"workbench.action.debug.continue"),f=this.createMenuItem(n.localize(165,null),"editor.debug.action.toggleBreakpoint"),h=new s.Menu;h.append(this.createMenuItem(n.localize(166,null),"editor.debug.action.conditionalBreakpoint")), h.append(this.createMenuItem(n.localize(167,null),"editor.debug.action.toggleInlineBreakpoint")),h.append(this.createMenuItem(n.localize(168,null),"workbench.debug.viewlet.action.addFunctionBreakpointAction")),h.append(this.createMenuItem(n.localize(169,null),"editor.debug.action.toggleLogPoint"));var v=new s.MenuItem({label:this.mnemonicLabel(n.localize(170,null)),submenu:h}),g=this.createMenuItem(n.localize(171,null),"workbench.debug.viewlet.action.enableAllBreakpoints"),m=this.createMenuItem(n.localize(172,null),"workbench.debug.viewlet.action.disableAllBreakpoints"),y=this.createMenuItem(n.localize(173,null),"workbench.debug.viewlet.action.removeAllBreakpoints"),w=this.createMenuItem(n.localize(174,null),"debug.installAdditionalDebuggers");[t,r,i,o,_(),a,c,_(),u,l,d,p,_(),f,v,g,m,y,_(),w].forEach(function(t){return e.append(t)})},e.prototype.setMacWindowMenu=function(e){var t=new s.MenuItem({label:n.localize(175,null),role:"minimize",accelerator:"Command+M", enabled:this.windowsMainService.getWindowCount()>0}),r=new s.MenuItem({label:n.localize(176,null),role:"zoom",enabled:this.windowsMainService.getWindowCount()>0}),i=new s.MenuItem({label:n.localize(177,null),role:"front",enabled:this.windowsMainService.getWindowCount()>0}),o=this.createMenuItem(n.localize(178,null),"workbench.action.switchWindow");this.nativeTabMenuItems=[];var a=[];if(this.currentEnableNativeTabs){var c=this.windowsMainService.getWindowCount()>1;this.nativeTabMenuItems.push(this.createMenuItem(n.localize(179,null),"workbench.action.showPreviousWindowTab",c)),this.nativeTabMenuItems.push(this.createMenuItem(n.localize(180,null),"workbench.action.showNextWindowTab",c)),this.nativeTabMenuItems.push(this.createMenuItem(n.localize(181,null),"workbench.action.moveWindowTabToNewWindow",c)),this.nativeTabMenuItems.push(this.createMenuItem(n.localize(182,null),"workbench.action.mergeAllWindowTabs",c)),a.push.apply(a,[_()].concat(this.nativeTabMenuItems))}else this.nativeTabMenuItems=[] ;[t,r,o].concat(a,[_(),i]).forEach(function(t){return e.append(t)})},e.prototype.toggleDevTools=function(){var e=this.windowsMainService.getFocusedWindow();if(e&&e.win){var t=e.win.webContents;!e.hasHiddenTitleBarStyle()||e.win.isFullScreen()||t.isDevToolsOpened()?t.toggleDevTools():t.openDevTools({mode:"undocked"})}},e.prototype.setHelpMenu=function(e){var t=this,o=new s.MenuItem(this.likeAction("workbench.action.toggleDevTools",{label:this.mnemonicLabel(n.localize(183,null)),click:function(){return t.toggleDevTools()},enabled:this.windowsMainService.getWindowCount()>0})),a=new s.MenuItem(this.likeAction("accessibilityOptions",{label:this.mnemonicLabel(n.localize(184,null)),accelerator:null,click:function(){t.openAccessibilityOptions()}},!1)),c=new s.MenuItem({label:this.mnemonicLabel(n.localize(185,null)),click:function(){return t.runActionInRenderer("workbench.action.openProcessExplorer")}}),u=null;if(h.default.reportIssueUrl){var l=n.localize(186,null) ;u=this.windowsMainService.getWindowCount()>0?this.createMenuItem(l,"workbench.action.openIssueReporter"):new s.MenuItem({label:this.mnemonicLabel(l),click:function(){return t.openUrl(h.default.reportIssueUrl,"openReportIssues")}})}var d=r.isLinux?h.default.keyboardShortcutsUrlLinux:r.isMacintosh?h.default.keyboardShortcutsUrlMac:h.default.keyboardShortcutsUrlWin;if(i.coalesce([new s.MenuItem({label:this.mnemonicLabel(n.localize(187,null)),click:function(){return t.runActionInRenderer("workbench.action.showWelcomePage")},enabled:this.windowsMainService.getWindowCount()>0}),new s.MenuItem({label:this.mnemonicLabel(n.localize(188,null)),click:function(){return t.runActionInRenderer("workbench.action.showInteractivePlayground")},enabled:this.windowsMainService.getWindowCount()>0}),h.default.documentationUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(189,null)),click:function(){return t.runActionInRenderer("workbench.action.openDocumentationUrl")},enabled:this.windowsMainService.getWindowCount()>0 }):null,h.default.releaseNotesUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(190,null)),click:function(){return t.runActionInRenderer("update.showCurrentReleaseNotes")},enabled:this.windowsMainService.getWindowCount()>0}):null,_(),d?new s.MenuItem({label:this.mnemonicLabel(n.localize(191,null)),click:function(){return t.runActionInRenderer("workbench.action.keybindingsReference")},enabled:this.windowsMainService.getWindowCount()>0}):null,h.default.introductoryVideosUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(192,null)),click:function(){return t.runActionInRenderer("workbench.action.openIntroductoryVideosUrl")},enabled:this.windowsMainService.getWindowCount()>0}):null,h.default.tipsAndTricksUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(193,null)),click:function(){return t.runActionInRenderer("workbench.action.openTipsAndTricksUrl")},enabled:this.windowsMainService.getWindowCount()>0}):null,h.default.introductoryVideosUrl||d?_():null,h.default.twitterUrl?new s.MenuItem({ label:this.mnemonicLabel(n.localize(194,null)),click:function(){return t.openUrl(h.default.twitterUrl,"openTwitterUrl")}}):null,h.default.requestFeatureUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(195,null)),click:function(){return t.openUrl(h.default.requestFeatureUrl,"openUserVoiceUrl")}}):null,u,h.default.twitterUrl||h.default.requestFeatureUrl||h.default.reportIssueUrl?_():null,h.default.licenseUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(196,null)),click:function(){if(r.language){var e=h.default.licenseUrl.indexOf("?")>0?"&":"?";t.openUrl(""+h.default.licenseUrl+e+"lang="+r.language,"openLicenseUrl")}else t.openUrl(h.default.licenseUrl,"openLicenseUrl")}}):null,h.default.privacyStatementUrl?new s.MenuItem({label:this.mnemonicLabel(n.localize(197,null)),click:function(){if(r.language){var e=h.default.licenseUrl.indexOf("?")>0?"&":"?";t.openUrl(""+h.default.privacyStatementUrl+e+"lang="+r.language,"openPrivacyStatement") }else t.openUrl(h.default.privacyStatementUrl,"openPrivacyStatement")}}):null,h.default.licenseUrl||h.default.privacyStatementUrl?_():null,o,c,r.isWindows&&"stable"!==h.default.quality?a:null]).forEach(function(t){return e.append(t)}),!r.isMacintosh){var p=this.getUpdateMenuItems();p.length&&(e.append(_()),p.forEach(function(t){return e.append(t)})),e.append(_()),e.append(new s.MenuItem({label:this.mnemonicLabel(n.localize(198,null)),click:function(){return t.windowsService.openAboutDialog()}}))}},e.prototype.setTaskMenu=function(e){ var t=this.createMenuItem(n.localize(199,null),"workbench.action.tasks.runTask"),r=this.createMenuItem(n.localize(200,null),"workbench.action.tasks.build"),i=this.createMenuItem(n.localize(201,null),"workbench.action.tasks.showTasks"),o=this.createMenuItem(n.localize(202,null),"workbench.action.tasks.restartTask"),a=this.createMenuItem(n.localize(203,null),"workbench.action.tasks.terminate"),s=this.createMenuItem(n.localize(204,null),"workbench.action.tasks.configureTaskRunner"),c=this.createMenuItem(n.localize(205,null),"workbench.action.tasks.configureDefaultBuildTask");[t,r,_(),a,o,i,_(),s,c].forEach(function(t){return e.append(t)})},e.prototype.openAccessibilityOptions=function(){var e=new s.BrowserWindow({alwaysOnTop:!0,skipTaskbar:!0,resizable:!1,width:450,height:300,show:!0,title:n.localize(206,null),webPreferences:{disableBlinkFeatures:"Auxclick"}});e.setMenuBarVisibility(!1),e.loadURL("chrome://accessibility")},e.prototype.getUpdateMenuItems=function(){var e=this ;switch(this.updateService.state.type){case f.StateType.Uninitialized:return[];case f.StateType.Idle:return[new s.MenuItem({label:n.localize(207,null),click:function(){return setTimeout(function(){e.reportMenuActionTelemetry("CheckForUpdate");var t=e.windowsMainService.getFocusedWindow(),n=t?{windowId:t.id}:null;e.updateService.checkForUpdates(n)},0)}})];case f.StateType.CheckingForUpdates:return[new s.MenuItem({label:n.localize(208,null),enabled:!1})];case f.StateType.AvailableForDownload:return[new s.MenuItem({label:n.localize(209,null),click:function(){e.updateService.downloadUpdate()}})];case f.StateType.Downloading:return[new s.MenuItem({label:n.localize(210,null),enabled:!1})];case f.StateType.Downloaded:return[new s.MenuItem({label:n.localize(211,null),click:function(){e.reportMenuActionTelemetry("InstallUpdate"),e.updateService.applyUpdate()}})];case f.StateType.Updating:return[new s.MenuItem({label:n.localize(212,null),enabled:!1})];case f.StateType.Ready:return[new s.MenuItem({ label:n.localize(213,null),click:function(){e.reportMenuActionTelemetry("RestartToUpdate"),e.updateService.quitAndInstall()}})]}},e.prototype.createMenuItem=function(e,t,n,r){var i=this,o=this.mnemonicLabel(e),a="function"==typeof t?t:function(e,n,r){var o=t;Array.isArray(t)&&(o=i.isOptionClick(r)?t[1]:t[0]),i.runActionInRenderer(o)},c="boolean"==typeof n?n:this.windowsMainService.getWindowCount()>0,u="boolean"==typeof r&&r,l={label:o,click:a,enabled:c};u&&(l.type="checkbox",l.checked=u);var d;return"string"==typeof t?d=t:Array.isArray(t)&&(d=t[0]),new s.MenuItem(this.withKeybinding(d,l))},e.prototype.createContextAwareMenuItem=function(e,t,n){var r=this;return new s.MenuItem(this.withKeybinding(t,{label:this.mnemonicLabel(e),enabled:this.windowsMainService.getWindowCount()>0,click:function(){var e=r.windowsMainService.getFocusedWindow();return e?e.win.webContents.isDevToolsFocused()?n.inDevTools(e.win.webContents.devToolsWebContents):void r.runActionInRenderer(t):n.inNoWindow()}}))}, e.prototype.runActionInRenderer=function(e){this.windowsMainService.getFocusedWindow()&&this.windowsMainService.sendToFocused("vscode:runAction",{id:e,from:"menu"})},e.prototype.withKeybinding=function(e,t){var n=this.keybindingsResolver.getKeybinding(e);if(n&&n.label)if(n.isNative)t.accelerator=n.label;else{var r=t.label.indexOf("[");t.label=r>=0?t.label.substr(0,r)+" ["+n.label+"]":t.label+" ["+n.label+"]"}else t.accelerator=void 0;return t},e.prototype.likeAction=function(e,t,n){var r=this;void 0===n&&(n=!t.accelerator),n&&(t=this.withKeybinding(e,t));var i=t.click;return t.click=function(t,n,o){r.reportMenuActionTelemetry(e),i&&i(t,n,o)},t},e.prototype.openUrl=function(e,t){s.shell.openExternal(e),this.reportMenuActionTelemetry(t)},e.prototype.reportMenuActionTelemetry=function(e){this.telemetryService.publicLog("workbenchActionExecuted",{id:e,from:"menu"})},e.prototype.mnemonicLabel=function(e){return m.mnemonicMenuLabel(e,!this.currentEnableMenuBarMnemonics)},e.MAX_MENU_RECENT_ENTRIES=10, e=a([c(0,f.IUpdateService),c(1,g.IInstantiationService),c(2,l.IConfigurationService),c(3,w.IWindowsMainService),c(4,u.IWindowsService),c(5,o.IEnvironmentService),c(6,p.ITelemetryService),c(7,b.IHistoryMainService)],e)}();t.CodeMenu=C}),define(e[162],t([0,1,3,18,23,19,36]),function(e,t,n,r,i,o,a){"use strict";function s(e){var t=e.windows,o=e.newWindow,s=(e.reuseWindow,e.context),u=e.filePath,l=e.workspaceResolver;if(!o&&u&&(s===i.OpenContext.DESKTOP||s===i.OpenContext.CLI||s===i.OpenContext.DOCK)){var d=function(e,t,i){for(var o=e.filter(function(e){return!!e.openedWorkspace}),s=0;s<o.length;s++){var c=o[s],u=i(c.openedWorkspace);if(u&&u.folders.some(function(e){return e.uri.scheme===a.Schemas.file&&r.isEqualOrParent(t,e.uri.fsPath,!n.isLinux)}))return c}var l=e.filter(function(e){return"string"==typeof e.openedFolderPath&&r.isEqualOrParent(t,e.openedFolderPath,!n.isLinux)});if(l.length)return l.sort(function(e,t){return-(e.openedFolderPath.length-t.openedFolderPath.length)})[0];return null}(t,u,l) ;if(d)return d}return o?null:c(t)}function c(e){var t=Math.max.apply(Math,e.map(function(e){return e.lastFocusTime}));return e.filter(function(e){return e.lastFocusTime===t})[0]}Object.defineProperty(t,"__esModule",{value:!0}),t.findBestWindowOrFolderForFile=s,t.getLastActiveWindow=c,t.findWindowOnWorkspace=function(e,t){return e.filter(function(e){if(o.isSingleFolderWorkspaceIdentifier(t)){if("string"==typeof e.openedFolderPath&&r.isEqual(e.openedFolderPath,t,!n.isLinux))return!0}else if(e.openedWorkspace&&e.openedWorkspace.id===t.id)return!0;return!1})[0]},t.findWindowOnExtensionDevelopmentPath=function(e,t){return e.filter(function(e){return!!r.isEqual(e.extensionDevelopmentPath,t,!n.isLinux)})[0]},t.findWindowOnWorkspaceOrFolderPath=function(e,t){return e.filter(function(e){return!(!e.openedWorkspace||!r.isEqual(e.openedWorkspace.configPath,t,!n.isLinux))||!(!e.openedFolderPath||!r.isEqual(e.openedFolderPath,t,!n.isLinux))})[0]}}), define(e[163],t([0,1,21,27,9,62,3,34,11,14,47,6,19]),function(e,t,n,r,i,o,s,u,l,d,p,f,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(){function e(e,t,n){this.configurationService=t,this.logService=n,this.backupHome=e.backupHome,this.workspacesJsonPath=e.backupWorkspacesPath,this.loadSync()}return e.prototype.getWorkspaceBackups=function(){return this.isHotExitOnExitAndWindowClose()?[]:this.backups.rootWorkspaces.slice(0)},e.prototype.getFolderBackupPaths=function(){return this.isHotExitOnExitAndWindowClose()?[]:this.backups.folderWorkspaces.slice(0)},e.prototype.isHotExitEnabled=function(){return this.getHotExitConfig()!==p.HotExitConfiguration.OFF},e.prototype.isHotExitOnExitAndWindowClose=function(){return this.getHotExitConfig()===p.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE},e.prototype.getHotExitConfig=function(){var e=this.configurationService.getValue();return e&&e.files&&e.files.hotExit||p.HotExitConfiguration.ON_EXIT}, e.prototype.getEmptyWindowBackupPaths=function(){return this.backups.emptyWorkspaces.slice(0)},e.prototype.registerWorkspaceBackupSync=function(e,t){this.pushBackupPathsSync(e,this.backups.rootWorkspaces);var n=i.join(this.backupHome,e.id);return t&&this.moveBackupFolderSync(n,t),n},e.prototype.moveBackupFolderSync=function(e,t){if(r.existsSync(e)&&this.convertToEmptyWindowBackup(e),r.existsSync(t))try{r.renameSync(t,e)}catch(e){this.logService.error("Backup: Could not move backup folder to new location: "+e.toString())}},e.prototype.registerFolderBackupSync=function(e){return this.pushBackupPathsSync(e,this.backups.folderWorkspaces),i.join(this.backupHome,this.getFolderHash(e))},e.prototype.registerEmptyWindowBackupSync=function(e){return e||(e=this.getRandomEmptyWindowId()),this.pushBackupPathsSync(e,this.backups.emptyWorkspaces),i.join(this.backupHome,e)},e.prototype.pushBackupPathsSync=function(e,t){-1===this.indexOf(e,t)&&(t.push(e),this.saveSync())},e.prototype.removeBackupPathSync=function(e,t){if(t){ var n=this.indexOf(e,t);-1!==n&&(t.splice(n,1),this.saveSync())}},e.prototype.indexOf=function(e,t){var r=this;if(!t)return-1;var i=this.sanitizeId(e);return n.firstIndex(t,function(e){return r.sanitizeId(e)===i})},e.prototype.sanitizeId=function(e){return h.isSingleFolderWorkspaceIdentifier(e)?this.sanitizePath(e):e.id},e.prototype.loadSync=function(){var e;try{e=JSON.parse(r.readFileSync(this.workspacesJsonPath,"utf8").toString())}catch(t){e=Object.create(null)}if(e.rootWorkspaces){var t=e.rootWorkspaces;Array.isArray(t)&&!t.some(function(e){return"object"!=typeof e})||(e.rootWorkspaces=[])}else e.rootWorkspaces=[];if(e.folderWorkspaces){n=e.folderWorkspaces;Array.isArray(n)&&!n.some(function(e){return"string"!=typeof e})||(e.folderWorkspaces=[])}else e.folderWorkspaces=[];if(e.emptyWorkspaces){var n=e.emptyWorkspaces;Array.isArray(n)&&!n.some(function(e){return"string"!=typeof e})||(e.emptyWorkspaces=[])}else e.emptyWorkspaces=[];this.backups=this.dedupeBackups(e),this.validateBackupWorkspaces(e)}, e.prototype.dedupeBackups=function(e){var t=this;return e.folderWorkspaces=n.distinct(e.folderWorkspaces,function(e){return t.sanitizePath(e)}),e.rootWorkspaces=n.distinct(e.rootWorkspaces,function(e){return t.sanitizePath(e.id)}),e},e.prototype.validateBackupWorkspaces=function(e){var t=this,n=[],o=[];o.push.apply(o,e.rootWorkspaces.map(function(t){return{workspaceIdentifier:t,target:e.rootWorkspaces}})),o.push.apply(o,e.folderWorkspaces.map(function(t){return{workspaceIdentifier:t,target:e.folderWorkspaces}})),o.forEach(function(e){var o=e.workspaceIdentifier,a=h.isSingleFolderWorkspaceIdentifier(o)?o:o.configPath,s=i.join(t.backupHome,h.isSingleFolderWorkspaceIdentifier(o)?t.getFolderHash(o):o.id),c=t.hasBackupsSync(s),u=c&&!r.existsSync(a);c&&!u||(n.push({workspaceIdentifier:o,backupPath:s,target:e.target}),u&&t.convertToEmptyWindowBackup(s))}),e.emptyWorkspaces.forEach(function(r){var o=i.join(t.backupHome,r);t.hasBackupsSync(o)||n.push({workspaceIdentifier:r,backupPath:o,target:e.emptyWorkspaces})}), n.forEach(function(e){var n=e.backupPath,r=e.workspaceIdentifier,i=e.target;try{u.delSync(n)}catch(e){t.logService.error("Backup: Could not delete stale backup: "+e.toString())}t.removeBackupPathSync(r,i)})},e.prototype.convertToEmptyWindowBackup=function(e){var t=this.getRandomEmptyWindowId();this.pushBackupPathsSync(t,this.backups.emptyWorkspaces);var n=i.join(this.backupHome,t);try{r.renameSync(e,n)}catch(e){return this.logService.error("Backup: Could not rename backup folder: "+e.toString()),this.removeBackupPathSync(t,this.backups.emptyWorkspaces),!1}return!0},e.prototype.hasBackupsSync=function(e){try{var t=u.readdirSync(e);return 0!==t.length&&t.some(function(t){try{return u.readdirSync(i.join(e,t)).length>0}catch(e){return!1}})}catch(e){return!1}},e.prototype.saveSync=function(){try{r.existsSync(this.backupHome)||r.mkdirSync(this.backupHome),u.writeFileAndFlushSync(this.workspacesJsonPath,JSON.stringify(this.backups))}catch(e){ this.logService.error("Backup: Could not save workspaces.json: "+e.toString())}},e.prototype.getRandomEmptyWindowId=function(){return(Date.now()+Math.round(1e3*Math.random())).toString()},e.prototype.sanitizePath=function(e){return s.isLinux?e:e.toLowerCase()},e.prototype.getFolderHash=function(e){return o.createHash("md5").update(this.sanitizePath(e)).digest("hex")},e=a([c(0,l.IEnvironmentService),c(1,d.IConfigurationService),c(2,f.ILogService)],e)}();t.BackupMainService=v}),define(e[164],t([0,1,9,83,21,17,32,10,6,29,5,3,19,11,18,24]),function(e,t,n,r,i,o,s,u,l,d,p,f,h,v,g,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e,t,n,r){var i=this;this.stateService=e,this.logService=t,this.workspacesMainService=n,this.environmentService=r,this._onRecentlyOpenedChange=new p.Emitter,this.onRecentlyOpenedChange=this._onRecentlyOpenedChange.event,this.macOSRecentDocumentsUpdater=new m.RunOnceScheduler(function(){return i.updateMacOSRecentDocuments()},800), this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.workspacesMainService.onWorkspaceSaved(function(t){return e.onWorkspaceSaved(t)})},e.prototype.onWorkspaceSaved=function(e){this.addRecentlyOpened([e.workspace],[])},e.prototype.addRecentlyOpened=function(t,n){var r=this;if(t&&t.length>0||n&&n.length>0){var o=this.getRecentlyOpened();t.forEach(function(e){!h.isSingleFolderWorkspaceIdentifier(e)&&r.workspacesMainService.isUntitledWorkspace(e)||(o.workspaces.unshift(e),o.workspaces=i.distinct(o.workspaces,function(e){return r.distinctFn(e)}))}),n.forEach(function(e){o.files.unshift(e),o.files=i.distinct(o.files,function(e){return r.distinctFn(e)}),f.isWindows&&u.app.addRecentDocument(e)}),o.workspaces=o.workspaces.slice(0,e.MAX_TOTAL_RECENT_ENTRIES),o.files=o.files.slice(0,e.MAX_TOTAL_RECENT_ENTRIES),this.saveRecentlyOpened(o),this._onRecentlyOpenedChange.fire(),f.isMacintosh&&this.macOSRecentDocumentsUpdater.schedule()}},e.prototype.removeFromRecentlyOpened=function(e){ var t=this.getRecentlyOpened(),n=!1;e.forEach(function(e){var r=i.firstIndex(t.workspaces,function(t){return g.isEqual(h.isSingleFolderWorkspaceIdentifier(t)?t:t.configPath,e,!f.isLinux)});r>=0&&(t.workspaces.splice(r,1),n=!0),(r=i.firstIndex(t.files,function(t){return g.isEqual(t,e,!f.isLinux)}))>=0&&(t.files.splice(r,1),n=!0)}),n&&(this.saveRecentlyOpened(t),this._onRecentlyOpenedChange.fire(),f.isMacintosh&&this.macOSRecentDocumentsUpdater.schedule())},e.prototype.updateMacOSRecentDocuments=function(){if(f.isMacintosh){u.app.clearRecentDocuments();for(var t=this.getRecentlyOpened(),n=e.MAX_MACOS_DOCK_RECENT_ENTRIES,r=0;r<t.workspaces.length&&r<e.MAX_MACOS_DOCK_RECENT_ENTRIES/2;r++){var i=t.workspaces[r];u.app.addRecentDocument(h.isSingleFolderWorkspaceIdentifier(i)?i:i.configPath),n--}for(r=0;r<t.files.length&&r<n;r++){var o=t.files[r];u.app.addRecentDocument(o)}}},e.prototype.clearRecentlyOpened=function(){this.saveRecentlyOpened({workspaces:[],files:[]}),u.app.clearRecentDocuments(), this._onRecentlyOpenedChange.fire()},e.prototype.getRecentlyOpened=function(t,n){var r,o,a=this,s=this.stateService.getItem(e.recentlyOpenedStorageKey);return s?(r=s.workspaces||[],o=s.files||[]):(r=[],o=[]),t&&r.unshift(t),n&&o.unshift.apply(o,n.map(function(e){return e.filePath})),r=i.distinct(r,function(e){return a.distinctFn(e)}),o=i.distinct(o,function(e){return a.distinctFn(e)}),r=r.filter(function(e){return h.isSingleFolderWorkspaceIdentifier(e)||!a.workspacesMainService.isUntitledWorkspace(e)}),{workspaces:r,files:o}},e.prototype.distinctFn=function(e){return h.isSingleFolderWorkspaceIdentifier(e)?f.isLinux?e:e.toLowerCase():e.id},e.prototype.saveRecentlyOpened=function(t){this.stateService.setItem(e.recentlyOpenedStorageKey,t)},e.prototype.updateWindowsJumpList=function(){var e=this;if(f.isWindows){var t=[];t.push({type:"tasks",items:[{type:"task",title:r.localize(0,null),description:r.localize(1,null),program:process.execPath,args:"-n",iconPath:process.execPath,iconIndex:0}]}), this.getRecentlyOpened().workspaces.length>0&&(this.removeFromRecentlyOpened(u.app.getJumpListSettings().removedItems.filter(function(e){return!!e.args}).map(function(e){return o.trim(e.args,'"')})),t.push({type:"custom",name:r.localize(2,null),items:this.getRecentlyOpened().workspaces.slice(0,7).map(function(t){return{type:"task",title:h.isSingleFolderWorkspaceIdentifier(t)?d.getBaseLabel(t):h.getWorkspaceLabel(t,e.environmentService),description:h.isSingleFolderWorkspaceIdentifier(t)?r.localize(3,null,d.getBaseLabel(t),d.getPathLabel(n.dirname(t),e.environmentService)):r.localize(4,null),program:process.execPath,args:'"'+(h.isSingleFolderWorkspaceIdentifier(t)?t:t.configPath)+'"',iconPath:"explorer.exe",iconIndex:0}}).filter(function(e){return!!e})})),t.push({type:"recent"});try{u.app.setJumpList(t)}catch(e){this.logService.warn("#setJumpList",e)}}},e.MAX_TOTAL_RECENT_ENTRIES=100,e.MAX_MACOS_DOCK_RECENT_ENTRIES=10,e.recentlyOpenedStorageKey="openedPathsList", e=a([c(0,s.IStateService),c(1,l.ILogService),c(2,h.IWorkspacesMainService),c(3,v.IEnvironmentService)],e)}();t.HistoryMainService=y}),define(e[165],t([0,1,2,84,15,59,10,52,67,11,3,6]),function(e,t,n,r,i,o,s,u,l,d,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function t(e,t,n,r,i){this.machineId=e,this.userEnv=t,this.environmentService=n,this.launchService=r,this.logService=i}return t.prototype.openReporter=function(e){var t=this;s.ipcMain.on("issueSystemInfoRequest",function(e){t.getSystemInformation().then(function(t){e.sender.send("issueSystemInfoResponse",t)})}),s.ipcMain.on("issuePerformanceInfoRequest",function(e){t.getPerformanceInfo().then(function(t){e.sender.send("issuePerformanceInfoResponse",t)})}),s.ipcMain.on("workbenchCommand",function(e,n){t._issueParentWindow.webContents.send("vscode:runAction",{id:n,from:"issueReporter"})}),this._issueParentWindow=s.BrowserWindow.getFocusedWindow();var i=this.getWindowPosition(this._issueParentWindow,700,800) ;if(!this._issueWindow){this._issueWindow=new s.BrowserWindow({width:i.width,height:i.height,minWidth:300,minHeight:200,x:i.x,y:i.y,title:r.localize(0,null),backgroundColor:e.styles.backgroundColor||"#1E1E1E",webPreferences:{disableBlinkFeatures:"Auxclick"}}),this._issueWindow.setMenuBarVisibility(!1);var o={};this.logService.trace("issueService#openReporter: opening issue reporter"),this._issueWindow.loadURL(this.getIssueReporterPath(e,o)),this._issueWindow.on("close",function(){return t._issueWindow=null}),this._issueParentWindow.on("closed",function(){t._issueWindow.close(),t._issueWindow=null})}return this._issueWindow.focus(),n.TPromise.as(null)},t.prototype.openProcessExplorer=function(t){var a=this;if(s.ipcMain.on("windowsInfoRequest",function(e){a.launchService.getMainProcessInfo().then(function(t){e.sender.send("windowsInfoResponse",t.windows)})}),!this._processExplorerWindow){var c=s.BrowserWindow.getFocusedWindow(),u=this.getWindowPosition(c,800,300) ;this._processExplorerWindow=new s.BrowserWindow({skipTaskbar:!0,resizable:!0,width:u.width,height:u.height,minWidth:300,minHeight:200,x:u.x,y:u.y,backgroundColor:t.styles.backgroundColor,title:r.localize(1,null),webPreferences:{disableBlinkFeatures:"Auxclick"}}),this._processExplorerWindow.setMenuBarVisibility(!1);var l={appRoot:this.environmentService.appRoot,nodeCachedDataDir:this.environmentService.nodeCachedDataDir,windowId:this._processExplorerWindow.id,userEnv:this.userEnv,machineId:this.machineId,data:t},d=o.parseArgs(process.argv),p=i.assign(d,l);for(var f in p)void 0!==p[f]&&null!==p[f]&&""!==p[f]||delete p[f];this._processExplorerWindow.loadURL(e.toUrl("vs/code/electron-browser/processExplorer/processExplorer.html")+"?config="+encodeURIComponent(JSON.stringify(p))),this._processExplorerWindow.on("close",function(){return a._processExplorerWindow=void 0}),c.on("close",function(){a._processExplorerWindow.close(),a._processExplorerWindow=null})}return this._processExplorerWindow.focus(), n.TPromise.as(null)},t.prototype.getWindowPosition=function(e,t,n){var r,i=s.screen.getAllDisplays();if(1===i.length)r=i[0];else{if(p.isMacintosh){var o=s.screen.getCursorScreenPoint();r=s.screen.getDisplayNearestPoint(o)}!r&&e&&(r=s.screen.getDisplayMatching(e.getBounds())),r||(r=s.screen.getPrimaryDisplay()||i[0])}var a={width:t,height:n,x:void 0,y:void 0},c=r.bounds;return a.x=c.x+c.width/2-a.width/2,a.y=c.y+c.height/2-a.height/2,c.width>0&&c.height>0&&(a.x<c.x&&(a.x=c.x),a.y<c.y&&(a.y=c.y),a.x>c.x+c.width&&(a.x=c.x),a.y>c.y+c.height&&(a.y=c.y),a.width>c.width&&(a.width=c.width),a.height>c.height&&(a.height=c.height)),a},t.prototype.getSystemInformation=function(){var e=this;return new n.Promise(function(t,n){e.launchService.getMainProcessInfo().then(function(e){t(l.getSystemInfo(e))})})},t.prototype.getPerformanceInfo=function(){var e=this;return new n.Promise(function(t,n){e.launchService.getMainProcessInfo().then(function(r){l.getPerformanceInfo(r).then(function(e){t(e)}).catch(function(t){ e.logService.warn("issueService#getPerformanceInfo ",t.message),n(t)})})})},t.prototype.getIssueReporterPath=function(t,n){var r={appRoot:this.environmentService.appRoot,nodeCachedDataDir:this.environmentService.nodeCachedDataDir,windowId:this._issueWindow.id,machineId:this.machineId,userEnv:this.userEnv,data:t,features:n},a=o.parseArgs(process.argv),s=i.assign(a,r);for(var c in s)void 0!==s[c]&&null!==s[c]&&""!==s[c]||delete s[c];return e.toUrl("vs/code/electron-browser/issue/issueReporter.html")+"?config="+encodeURIComponent(JSON.stringify(s))},t=a([c(2,d.IEnvironmentService),c(3,u.ILaunchService),c(4,f.ILogService)],t)}();t.IssueService=h}),define(e[166],t([0,1,160,6,2,4,3]),function(e,t,n,r,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this.instantiationService=e,this.logService=t,s.isMacintosh&&s.isWindows&&(this._menubar=this.instantiationService.createInstance(n.Menubar))}return e.prototype.updateMenubar=function(e,t){ return this.logService.trace("menubarService#updateMenubar",e),this._menubar&&this._menubar.updateMenu(t,e),i.TPromise.as(null)},e=a([c(0,o.IInstantiationService),c(1,r.ILogService)],e)}();t.MenubarService=u}),define(e[167],t([0,1,12,18,57,4,39,19,21,3]),function(e,t,n,r,i,o,a,s,c,u){"use strict";function l(e,t){var o=function(e,t){return e.map(function(e,i){var o;if(s.isRawFileWorkspaceFolder(e))o=function(e,t){if(e){if(r.isAbsolute(e))return n.default.file(e);if(t)return t.with({path:r.join(t.path,e)})}return null}(e.path,t);else if(s.isRawUriWorkspaceFolder(e))try{"/"!==(o=n.default.parse(e.uri)).path[0]&&(o=o.with({path:"/"+o.path}))}catch(e){console.warn(e)}if(o)return new p({uri:o,name:e.name,index:i},e)})}(e,t);return function(e){return c.distinct(e,function(e){return u.isLinux?e.uri.toString():e.uri.toString().toLowerCase()})}(c.coalesce(o)).map(function(e,t){var n=e.uri,r=e.raw,o=e.name;return new p({uri:n,name:o||i.basenameOrAuthority(n),index:t},r)})}Object.defineProperty(t,"__esModule",{value:!0 }),t.IWorkspaceContextService=o.createDecorator("contextService");!function(e){e[e.EMPTY=1]="EMPTY",e[e.FOLDER=2]="FOLDER",e[e.WORKSPACE=3]="WORKSPACE"}(t.WorkbenchState||(t.WorkbenchState={}));var d=function(){function e(e,t,n,r,i){void 0===t&&(t=""),void 0===n&&(n=[]),void 0===r&&(r=null),this._id=e,this._name=t,this._configuration=r,this._ctime=i,this._foldersMap=a.TernarySearchTree.forPaths(),this.folders=n}return e.prototype.update=function(e){this._id=e.id,this._name=e.name,this._configuration=e.configuration,this._ctime=e.ctime,this.folders=e.folders},Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctime",{get:function(){return this._ctime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name },set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=a.TernarySearchTree.forPaths();for(var e=0,t=this.folders;e<t.length;e++){var n=t[e];this._foldersMap.set(n.uri.toString(),n)}},e.prototype.toJSON=function(){return{id:this.id,folders:this.folders,name:this.name,configuration:this.configuration}},e}();t.Workspace=d;var p=function(){function e(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}return e.prototype.toResource=function(e){return this.uri.with({path:r.join(this.uri.path,e)})},e.prototype.toJSON=function(){return{uri:this.uri,name:this.name,index:this.index}},e}();t.WorkspaceFolder=p,t.toWorkspaceFolders=l}),define(e[168],t([0,1,12]),function(e,t,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"createWorkspace":var r=t,i=void 0;return Array.isArray(r)&&(i=r.map(function(e){return{uri:n.default.revive(e.uri),name:e.name}})),this.service.createWorkspace(i)}},e}();t.WorkspacesChannel=r;var i=function(){function e(e){this.channel=e}return e.prototype.createWorkspace=function(e){return this.channel.call("createWorkspace",e)},e}();t.WorkspacesChannelClient=i}),define(e[169],t([0,1,19,3,9,18,29]),function(e,t,n,r,i,o,a){"use strict";function s(e,t,s){var u=function(e){var t=!r.isWindows;r.isWindows&&e.forEach(function(e){n.isRawFileWorkspaceFolder(e)&&!t&&e.path.indexOf(c)>=0&&(t=!0)});return t}(s);return o.isEqualOrParent(e,t,!r.isLinux)&&(e=i.relative(t,e)||"."),r.isWindows&&(i.isAbsolute(e)?(u&&(e=o.normalize(e,!1)),e=a.normalizeDriveLetter(e)):u&&(e=e.replace(/[\\]/g,c))),e}Object.defineProperty(t,"__esModule",{value:!0});var c="/" ;t.massageFolderPathForWorkspace=s}),define(e[170],t([0,1,19,2,47,11,9,35,27,3,34,5,6,18,21,62,40,174,70,169,167,12,36]),function(e,t,n,r,i,o,s,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e,t){this.environmentService=e,this.logService=t,this.workspacesHome=e.workspacesHome,this._onWorkspaceSaved=new f.Emitter,this._onUntitledWorkspaceDeleted=new f.Emitter}return Object.defineProperty(e.prototype,"onWorkspaceSaved",{get:function(){return this._onWorkspaceSaved.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onUntitledWorkspaceDeleted",{get:function(){return this._onUntitledWorkspaceDeleted.event},enumerable:!0,configurable:!0}),e.prototype.resolveWorkspaceSync=function(e){if(!this.isWorkspacePath(e))return null;var t;try{t=l.readFileSync(e,"utf8")}catch(e){return null}return this.doResolveWorkspace(e,t)},e.prototype.isWorkspacePath=function(e){ return this.isInsideWorkspacesHome(e)||s.extname(e)==="."+n.WORKSPACE_EXTENSION},e.prototype.doResolveWorkspace=function(e,t){try{var n=this.doParseStoredWorkspace(e,t);return{id:this.getWorkspaceId(e),configPath:e,folders:_.toWorkspaceFolders(n.folders,C.default.file(s.dirname(e)))}}catch(e){this.logService.warn(e.toString())}return null},e.prototype.doParseStoredWorkspace=function(e,t){var r=y.parse(t);if(Array.isArray(r.folders)&&(r.folders=r.folders.filter(function(e){return n.isStoredWorkspaceFolder(e)})),!Array.isArray(r.folders))throw new Error(e+" looks like an invalid workspace file.");return r},e.prototype.isInsideWorkspacesHome=function(e){return i.isParent(e,this.environmentService.workspacesHome,!d.isLinux)},e.prototype.createWorkspace=function(e){var t=this.createUntitledWorkspace(e),n=t.workspace,r=t.configParent,i=t.storedWorkspace;return u.mkdirp(r).then(function(){return u.writeFile(n.configPath,JSON.stringify(i,null,"\t")).then(function(){return n})})}, e.prototype.createWorkspaceSync=function(e){var t=this.createUntitledWorkspace(e),n=t.workspace,r=t.configParent,i=t.storedWorkspace;return l.existsSync(this.workspacesHome)||l.mkdirSync(this.workspacesHome),l.mkdirSync(r),p.writeFileAndFlushSync(n.configPath,JSON.stringify(i,null,"\t")),n},e.prototype.createUntitledWorkspace=function(e){void 0===e&&(e=[]);var t=(Date.now()+Math.round(1e3*Math.random())).toString(),r=s.join(this.workspacesHome,t),i=s.join(r,n.UNTITLED_WORKSPACE_NAME),o={folders:e.map(function(e){var t,n=e.uri;return t=n.scheme===k.Schemas.file?{path:S.massageFolderPathForWorkspace(n.fsPath,r,[])}:{uri:n.toString(!0)},e.name&&(t.name=e.name),t})};return{workspace:{id:this.getWorkspaceId(i),configPath:i},configParent:r,storedWorkspace:o}},e.prototype.getWorkspaceId=function(e){return d.isLinux||(e=e.toLowerCase()),m.createHash("md5").update(e).digest("hex")},e.prototype.isUntitledWorkspace=function(e){return this.isInsideWorkspacesHome(e.configPath)},e.prototype.saveWorkspace=function(e,t){ var i=this;return v.isEqual(e.configPath,t,!d.isLinux)?r.TPromise.as(e):u.readFile(e.configPath).then(function(o){var a,c=o.toString();try{a=i.doParseStoredWorkspace(e.configPath,c)}catch(e){return r.TPromise.wrapError(e)}var l=s.dirname(e.configPath),p=s.dirname(t);a.folders.forEach(function(e){n.isRawFileWorkspaceFolder(e)&&(s.isAbsolute(e.path)||(e.path=s.resolve(l,e.path)),e.path=S.massageFolderPathForWorkspace(e.path,p,a.folders))});var f=c;return w.setProperty(c,["folders"],a.folders,{insertSpaces:!1,tabSize:4,eol:d.isLinux||d.isMacintosh?"\n":"\r\n"}).forEach(function(e){f=b.applyEdit(c,e)}),u.writeFile(t,f).then(function(){var n={id:i.getWorkspaceId(t),configPath:t};return i._onWorkspaceSaved.fire({workspace:n,oldConfigPath:e.configPath}),i.deleteUntitledWorkspaceSync(e),n})})},e.prototype.deleteUntitledWorkspaceSync=function(e){this.isUntitledWorkspace(e)&&(this.doDeleteUntitledWorkspaceSync(e.configPath),this._onUntitledWorkspaceDeleted.fire(e))}, e.prototype.doDeleteUntitledWorkspaceSync=function(e){try{p.delSync(s.dirname(e))}catch(t){this.logService.warn("Unable to delete untitled workspace "+e+" ("+t+").")}},e.prototype.getUntitledWorkspacesSync=function(){var e=this,t=[];try{t=p.readdirSync(this.workspacesHome).map(function(t){return s.join(e.workspacesHome,t,n.UNTITLED_WORKSPACE_NAME)})}catch(e){e&&"ENOENT"!==e.code&&this.logService.warn("Unable to read folders in "+this.workspacesHome+" ("+e+").")}return g.coalesce(t.map(function(t){var n=e.resolveWorkspaceSync(t);return n?{id:n.id,configPath:t}:(e.doDeleteUntitledWorkspaceSync(t),null)}))},e=a([c(0,o.IEnvironmentService),c(1,h.ILogService)],e)}();t.WorkspacesMainService=E}),define(e[71],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Hyper=1]="Hyper",e[e.Super=2]="Super",e[e.Fn=3]="Fn",e[e.FnLock=4]="FnLock",e[e.Suspend=5]="Suspend",e[e.Resume=6]="Resume",e[e.Turbo=7]="Turbo",e[e.Sleep=8]="Sleep",e[e.WakeUp=9]="WakeUp", e[e.KeyA=10]="KeyA",e[e.KeyB=11]="KeyB",e[e.KeyC=12]="KeyC",e[e.KeyD=13]="KeyD",e[e.KeyE=14]="KeyE",e[e.KeyF=15]="KeyF",e[e.KeyG=16]="KeyG",e[e.KeyH=17]="KeyH",e[e.KeyI=18]="KeyI",e[e.KeyJ=19]="KeyJ",e[e.KeyK=20]="KeyK",e[e.KeyL=21]="KeyL",e[e.KeyM=22]="KeyM",e[e.KeyN=23]="KeyN",e[e.KeyO=24]="KeyO",e[e.KeyP=25]="KeyP",e[e.KeyQ=26]="KeyQ",e[e.KeyR=27]="KeyR",e[e.KeyS=28]="KeyS",e[e.KeyT=29]="KeyT",e[e.KeyU=30]="KeyU",e[e.KeyV=31]="KeyV",e[e.KeyW=32]="KeyW",e[e.KeyX=33]="KeyX",e[e.KeyY=34]="KeyY",e[e.KeyZ=35]="KeyZ",e[e.Digit1=36]="Digit1",e[e.Digit2=37]="Digit2",e[e.Digit3=38]="Digit3",e[e.Digit4=39]="Digit4",e[e.Digit5=40]="Digit5",e[e.Digit6=41]="Digit6",e[e.Digit7=42]="Digit7",e[e.Digit8=43]="Digit8",e[e.Digit9=44]="Digit9",e[e.Digit0=45]="Digit0",e[e.Enter=46]="Enter",e[e.Escape=47]="Escape",e[e.Backspace=48]="Backspace",e[e.Tab=49]="Tab",e[e.Space=50]="Space",e[e.Minus=51]="Minus",e[e.Equal=52]="Equal",e[e.BracketLeft=53]="BracketLeft",e[e.BracketRight=54]="BracketRight",e[e.Backslash=55]="Backslash", e[e.IntlHash=56]="IntlHash",e[e.Semicolon=57]="Semicolon",e[e.Quote=58]="Quote",e[e.Backquote=59]="Backquote",e[e.Comma=60]="Comma",e[e.Period=61]="Period",e[e.Slash=62]="Slash",e[e.CapsLock=63]="CapsLock",e[e.F1=64]="F1",e[e.F2=65]="F2",e[e.F3=66]="F3",e[e.F4=67]="F4",e[e.F5=68]="F5",e[e.F6=69]="F6",e[e.F7=70]="F7",e[e.F8=71]="F8",e[e.F9=72]="F9",e[e.F10=73]="F10",e[e.F11=74]="F11",e[e.F12=75]="F12",e[e.PrintScreen=76]="PrintScreen",e[e.ScrollLock=77]="ScrollLock",e[e.Pause=78]="Pause",e[e.Insert=79]="Insert",e[e.Home=80]="Home",e[e.PageUp=81]="PageUp",e[e.Delete=82]="Delete",e[e.End=83]="End",e[e.PageDown=84]="PageDown",e[e.ArrowRight=85]="ArrowRight",e[e.ArrowLeft=86]="ArrowLeft",e[e.ArrowDown=87]="ArrowDown",e[e.ArrowUp=88]="ArrowUp",e[e.NumLock=89]="NumLock",e[e.NumpadDivide=90]="NumpadDivide",e[e.NumpadMultiply=91]="NumpadMultiply",e[e.NumpadSubtract=92]="NumpadSubtract",e[e.NumpadAdd=93]="NumpadAdd",e[e.NumpadEnter=94]="NumpadEnter",e[e.Numpad1=95]="Numpad1",e[e.Numpad2=96]="Numpad2", e[e.Numpad3=97]="Numpad3",e[e.Numpad4=98]="Numpad4",e[e.Numpad5=99]="Numpad5",e[e.Numpad6=100]="Numpad6",e[e.Numpad7=101]="Numpad7",e[e.Numpad8=102]="Numpad8",e[e.Numpad9=103]="Numpad9",e[e.Numpad0=104]="Numpad0",e[e.NumpadDecimal=105]="NumpadDecimal",e[e.IntlBackslash=106]="IntlBackslash",e[e.ContextMenu=107]="ContextMenu",e[e.Power=108]="Power",e[e.NumpadEqual=109]="NumpadEqual",e[e.F13=110]="F13",e[e.F14=111]="F14",e[e.F15=112]="F15",e[e.F16=113]="F16",e[e.F17=114]="F17",e[e.F18=115]="F18",e[e.F19=116]="F19",e[e.F20=117]="F20",e[e.F21=118]="F21",e[e.F22=119]="F22",e[e.F23=120]="F23",e[e.F24=121]="F24",e[e.Open=122]="Open",e[e.Help=123]="Help",e[e.Select=124]="Select",e[e.Again=125]="Again",e[e.Undo=126]="Undo",e[e.Cut=127]="Cut",e[e.Copy=128]="Copy",e[e.Paste=129]="Paste",e[e.Find=130]="Find",e[e.AudioVolumeMute=131]="AudioVolumeMute",e[e.AudioVolumeUp=132]="AudioVolumeUp",e[e.AudioVolumeDown=133]="AudioVolumeDown",e[e.NumpadComma=134]="NumpadComma",e[e.IntlRo=135]="IntlRo",e[e.KanaMode=136]="KanaMode", e[e.IntlYen=137]="IntlYen",e[e.Convert=138]="Convert",e[e.NonConvert=139]="NonConvert",e[e.Lang1=140]="Lang1",e[e.Lang2=141]="Lang2",e[e.Lang3=142]="Lang3",e[e.Lang4=143]="Lang4",e[e.Lang5=144]="Lang5",e[e.Abort=145]="Abort",e[e.Props=146]="Props",e[e.NumpadParenLeft=147]="NumpadParenLeft",e[e.NumpadParenRight=148]="NumpadParenRight",e[e.NumpadBackspace=149]="NumpadBackspace",e[e.NumpadMemoryStore=150]="NumpadMemoryStore",e[e.NumpadMemoryRecall=151]="NumpadMemoryRecall",e[e.NumpadMemoryClear=152]="NumpadMemoryClear",e[e.NumpadMemoryAdd=153]="NumpadMemoryAdd",e[e.NumpadMemorySubtract=154]="NumpadMemorySubtract",e[e.NumpadClear=155]="NumpadClear",e[e.NumpadClearEntry=156]="NumpadClearEntry",e[e.ControlLeft=157]="ControlLeft",e[e.ShiftLeft=158]="ShiftLeft",e[e.AltLeft=159]="AltLeft",e[e.MetaLeft=160]="MetaLeft",e[e.ControlRight=161]="ControlRight",e[e.ShiftRight=162]="ShiftRight",e[e.AltRight=163]="AltRight",e[e.MetaRight=164]="MetaRight",e[e.BrightnessUp=165]="BrightnessUp", e[e.BrightnessDown=166]="BrightnessDown",e[e.MediaPlay=167]="MediaPlay",e[e.MediaRecord=168]="MediaRecord",e[e.MediaFastForward=169]="MediaFastForward",e[e.MediaRewind=170]="MediaRewind",e[e.MediaTrackNext=171]="MediaTrackNext",e[e.MediaTrackPrevious=172]="MediaTrackPrevious",e[e.MediaStop=173]="MediaStop",e[e.Eject=174]="Eject",e[e.MediaPlayPause=175]="MediaPlayPause",e[e.MediaSelect=176]="MediaSelect",e[e.LaunchMail=177]="LaunchMail",e[e.LaunchApp2=178]="LaunchApp2",e[e.LaunchApp1=179]="LaunchApp1",e[e.SelectTask=180]="SelectTask",e[e.LaunchScreenSaver=181]="LaunchScreenSaver",e[e.BrowserSearch=182]="BrowserSearch",e[e.BrowserHome=183]="BrowserHome",e[e.BrowserBack=184]="BrowserBack",e[e.BrowserForward=185]="BrowserForward",e[e.BrowserStop=186]="BrowserStop",e[e.BrowserRefresh=187]="BrowserRefresh",e[e.BrowserFavorites=188]="BrowserFavorites",e[e.ZoomToggle=189]="ZoomToggle",e[e.MailReply=190]="MailReply",e[e.MailForward=191]="MailForward",e[e.MailSend=192]="MailSend",e[e.MAX_VALUE=193]="MAX_VALUE" }(t.ScanCode||(t.ScanCode={}));var n=[],r=Object.create(null),i=Object.create(null);t.ScanCodeUtils={lowerCaseToEnum:function(e){return i[e]||0},toEnum:function(e){return r[e]||0},toString:function(e){return n[e]||"None"}},t.IMMUTABLE_CODE_TO_KEY_CODE=[],t.IMMUTABLE_KEY_CODE_TO_CODE=[];var o=function(){function e(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.scanCode=i}return e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.scanCode===e.scanCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&(157===this.scanCode||161===this.scanCode)||this.shiftKey&&(158===this.scanCode||162===this.scanCode)||this.altKey&&(159===this.scanCode||163===this.scanCode)||this.metaKey&&(160===this.scanCode||164===this.scanCode)},e}();t.ScanCodeBinding=o,function(){function e(e,t){n[e]=t,r[t]=e,i[t.toLowerCase()]=e}e(0,"None"),e(1,"Hyper"),e(2,"Super"),e(3,"Fn"),e(4,"FnLock"), e(5,"Suspend"),e(6,"Resume"),e(7,"Turbo"),e(8,"Sleep"),e(9,"WakeUp"),e(10,"KeyA"),e(11,"KeyB"),e(12,"KeyC"),e(13,"KeyD"),e(14,"KeyE"),e(15,"KeyF"),e(16,"KeyG"),e(17,"KeyH"),e(18,"KeyI"),e(19,"KeyJ"),e(20,"KeyK"),e(21,"KeyL"),e(22,"KeyM"),e(23,"KeyN"),e(24,"KeyO"),e(25,"KeyP"),e(26,"KeyQ"),e(27,"KeyR"),e(28,"KeyS"),e(29,"KeyT"),e(30,"KeyU"),e(31,"KeyV"),e(32,"KeyW"),e(33,"KeyX"),e(34,"KeyY"),e(35,"KeyZ"),e(36,"Digit1"),e(37,"Digit2"),e(38,"Digit3"),e(39,"Digit4"),e(40,"Digit5"),e(41,"Digit6"),e(42,"Digit7"),e(43,"Digit8"),e(44,"Digit9"),e(45,"Digit0"),e(46,"Enter"),e(47,"Escape"),e(48,"Backspace"),e(49,"Tab"),e(50,"Space"),e(51,"Minus"),e(52,"Equal"),e(53,"BracketLeft"),e(54,"BracketRight"),e(55,"Backslash"),e(56,"IntlHash"),e(57,"Semicolon"),e(58,"Quote"),e(59,"Backquote"),e(60,"Comma"),e(61,"Period"),e(62,"Slash"),e(63,"CapsLock"),e(64,"F1"),e(65,"F2"),e(66,"F3"),e(67,"F4"),e(68,"F5"),e(69,"F6"),e(70,"F7"),e(71,"F8"),e(72,"F9"),e(73,"F10"),e(74,"F11"),e(75,"F12"),e(76,"PrintScreen"),e(77,"ScrollLock"), e(78,"Pause"),e(79,"Insert"),e(80,"Home"),e(81,"PageUp"),e(82,"Delete"),e(83,"End"),e(84,"PageDown"),e(85,"ArrowRight"),e(86,"ArrowLeft"),e(87,"ArrowDown"),e(88,"ArrowUp"),e(89,"NumLock"),e(90,"NumpadDivide"),e(91,"NumpadMultiply"),e(92,"NumpadSubtract"),e(93,"NumpadAdd"),e(94,"NumpadEnter"),e(95,"Numpad1"),e(96,"Numpad2"),e(97,"Numpad3"),e(98,"Numpad4"),e(99,"Numpad5"),e(100,"Numpad6"),e(101,"Numpad7"),e(102,"Numpad8"),e(103,"Numpad9"),e(104,"Numpad0"),e(105,"NumpadDecimal"),e(106,"IntlBackslash"),e(107,"ContextMenu"),e(108,"Power"),e(109,"NumpadEqual"),e(110,"F13"),e(111,"F14"),e(112,"F15"),e(113,"F16"),e(114,"F17"),e(115,"F18"),e(116,"F19"),e(117,"F20"),e(118,"F21"),e(119,"F22"),e(120,"F23"),e(121,"F24"),e(122,"Open"),e(123,"Help"),e(124,"Select"),e(125,"Again"),e(126,"Undo"),e(127,"Cut"),e(128,"Copy"),e(129,"Paste"),e(130,"Find"),e(131,"AudioVolumeMute"),e(132,"AudioVolumeUp"),e(133,"AudioVolumeDown"),e(134,"NumpadComma"),e(135,"IntlRo"),e(136,"KanaMode"),e(137,"IntlYen"),e(138,"Convert"), e(139,"NonConvert"),e(140,"Lang1"),e(141,"Lang2"),e(142,"Lang3"),e(143,"Lang4"),e(144,"Lang5"),e(145,"Abort"),e(146,"Props"),e(147,"NumpadParenLeft"),e(148,"NumpadParenRight"),e(149,"NumpadBackspace"),e(150,"NumpadMemoryStore"),e(151,"NumpadMemoryRecall"),e(152,"NumpadMemoryClear"),e(153,"NumpadMemoryAdd"),e(154,"NumpadMemorySubtract"),e(155,"NumpadClear"),e(156,"NumpadClearEntry"),e(157,"ControlLeft"),e(158,"ShiftLeft"),e(159,"AltLeft"),e(160,"MetaLeft"),e(161,"ControlRight"),e(162,"ShiftRight"),e(163,"AltRight"),e(164,"MetaRight"),e(165,"BrightnessUp"),e(166,"BrightnessDown"),e(167,"MediaPlay"),e(168,"MediaRecord"),e(169,"MediaFastForward"),e(170,"MediaRewind"),e(171,"MediaTrackNext"),e(172,"MediaTrackPrevious"),e(173,"MediaStop"),e(174,"Eject"),e(175,"MediaPlayPause"),e(176,"MediaSelect"),e(177,"LaunchMail"),e(178,"LaunchApp2"),e(179,"LaunchApp1"),e(180,"SelectTask"),e(181,"LaunchScreenSaver"),e(182,"BrowserSearch"),e(183,"BrowserHome"),e(184,"BrowserBack"),e(185,"BrowserForward"),e(186,"BrowserStop"), e(187,"BrowserRefresh"),e(188,"BrowserFavorites"),e(189,"ZoomToggle"),e(190,"MailReply"),e(191,"MailForward"),e(192,"MailSend")}(),function(){function e(e,n){t.IMMUTABLE_CODE_TO_KEY_CODE[e]=n,0!==n&&3!==n&&5!==n&&4!==n&&6!==n&&57!==n&&(t.IMMUTABLE_KEY_CODE_TO_CODE[n]=e)}for(n=0;n<=193;n++)t.IMMUTABLE_CODE_TO_KEY_CODE[n]=-1;for(var n=0;n<=112;n++)t.IMMUTABLE_KEY_CODE_TO_CODE[n]=-1;t.IMMUTABLE_KEY_CODE_TO_CODE[3]=46,e(0,0),e(1,0),e(2,0),e(3,0),e(4,0),e(5,0),e(6,0),e(7,0),e(8,0),e(9,0),e(46,3),e(47,9),e(48,1),e(49,2),e(50,10),e(63,8),e(64,59),e(65,60),e(66,61),e(67,62),e(68,63),e(69,64),e(70,65),e(71,66),e(72,67),e(73,68),e(74,69),e(75,70),e(76,0),e(77,79),e(78,7),e(79,19),e(80,14),e(81,11),e(82,20),e(83,13),e(84,12),e(85,17),e(86,15),e(87,18),e(88,16),e(89,78),e(90,108),e(91,103),e(92,106),e(93,104),e(94,3),e(95,94),e(96,95),e(97,96),e(98,97),e(99,98),e(100,99),e(101,100),e(102,101),e(103,102),e(104,93),e(105,107),e(107,58),e(108,0),e(109,0),e(110,71),e(111,72),e(112,73),e(113,74),e(114,75),e(115,76),e(116,77), e(117,0),e(118,0),e(119,0),e(120,0),e(121,0),e(122,0),e(123,0),e(124,0),e(125,0),e(126,0),e(127,0),e(128,0),e(129,0),e(130,0),e(131,0),e(132,0),e(133,0),e(134,105),e(136,0),e(138,0),e(139,0),e(140,0),e(141,0),e(142,0),e(143,0),e(144,0),e(145,0),e(146,0),e(147,0),e(148,0),e(149,0),e(150,0),e(151,0),e(152,0),e(153,0),e(154,0),e(155,0),e(156,0),e(157,5),e(158,4),e(159,6),e(160,57),e(161,5),e(162,4),e(163,6),e(164,57),e(165,0),e(166,0),e(167,0),e(168,0),e(169,0),e(170,0),e(171,0),e(172,0),e(173,0),e(174,0),e(175,0),e(176,0),e(177,0),e(178,0),e(179,0),e(180,0),e(181,0),e(182,0),e(183,0),e(184,0),e(185,0),e(186,0),e(187,0),e(188,0),e(189,0),e(190,0),e(191,0),e(192,0)}()}),define(e[172],t([0,1,58,95,71]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.writeKeybindingItem=function(e,t,n){var r=JSON.stringify(t.resolvedKeybinding.getUserSettingsLabel());e.write('{ "key": '+function(e,t){return e.length<t?e+new Array(t-e.length).join(" "):e }(r+",",25)+' "command": ');var i=t.when?t.when.serialize():"",o=JSON.stringify(t.command);i.length>0?(e.write(o+","),e.writeLine(),e.write(' "when": "'+i+'" ')):e.write(o+" "),e.write("}")},e.readUserKeybindingItem=function(e,t){var n="string"==typeof e.key?this._readUserBinding(e.key):[null,null],i=n[0],o=n[1],a="string"==typeof e.when?r.ContextKeyExpr.deserialize(e.when):null;return{firstPart:i,chordPart:o,command:"string"==typeof e.command?e.command:null,commandArgs:void 0!==e.args?e.args:void 0,when:a}},e._readModifiers=function(e){e=e.toLowerCase().trim();var t,n=!1,r=!1,i=!1,o=!1;do{t=!1,/^ctrl(\+|\-)/.test(e)&&(n=!0,e=e.substr("ctrl-".length),t=!0),/^shift(\+|\-)/.test(e)&&(r=!0,e=e.substr("shift-".length),t=!0),/^alt(\+|\-)/.test(e)&&(i=!0,e=e.substr("alt-".length),t=!0),/^meta(\+|\-)/.test(e)&&(o=!0,e=e.substr("meta-".length),t=!0),/^win(\+|\-)/.test(e)&&(o=!0,e=e.substr("win-".length),t=!0),/^cmd(\+|\-)/.test(e)&&(o=!0,e=e.substr("cmd-".length),t=!0)}while(t) ;var a,s=e.indexOf(" ");return s>0?(a=e.substring(0,s),e=e.substring(s)):(a=e,e=""),{remains:e,ctrl:n,shift:r,alt:i,meta:o,key:a}},e._readSimpleKeybinding=function(e){var t=this._readModifiers(e),r=n.KeyCodeUtils.fromUserSettings(t.key);return[new n.SimpleKeybinding(t.ctrl,t.shift,t.alt,t.meta,r),t.remains]},e.readKeybinding=function(e,t){if(!e)return null;var r=this._readSimpleKeybinding(e),i=r[0],o=r[1],a=null;return o.length>0&&(a=this._readSimpleKeybinding(o)[0]),a?new n.ChordKeybinding(i,a):i},e._readSimpleUserBinding=function(e){var t=this._readModifiers(e),r=t.key.match(/^\[([^\]]+)\]$/);if(r){var o=r[1],a=i.ScanCodeUtils.lowerCaseToEnum(o);return[new i.ScanCodeBinding(t.ctrl,t.shift,t.alt,t.meta,a),t.remains]}var s=n.KeyCodeUtils.fromUserSettings(t.key);return[new n.SimpleKeybinding(t.ctrl,t.shift,t.alt,t.meta,s),t.remains]},e._readUserBinding=function(e){if(!e)return[null,null];var t=this._readSimpleUserBinding(e),n=t[0],r=t[1],i=null;return r.length>0&&(i=this._readSimpleUserBinding(r)[0]),[n,i]},e }();t.KeybindingIO=o;var a=function(){function e(){this._lines=[],this._currentLine=""}return e.prototype.write=function(e){this._currentLine+=e},e.prototype.writeLine=function(e){void 0===e&&(e=""),this._lines.push(this._currentLine+e),this._currentLine=""},e.prototype.toString=function(){return this.writeLine(),this._lines.join("\n")},e}();t.OutputBuilder=a}),define(e[173],t([0,1,2,97,22,50,13,58,108,3,5,172,71]),function(e,t,n,r,s,u,l,d,p,f,h,v,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){function e(e){this.windowId=e}return e.prototype.route=function(e,t){return"window:"+this.windowId},e}(),y=function(){function e(e,t,n){this.windowServer=e,this.options=t,this.windowsService=n,this.registeredWindowIds=new Set,this.reloadingWindowIds=new Set,this.onDidReloadingChange=new h.Emitter}return e.prototype.registerWindowDriver=function(e){return i(this,void 0,n.TPromise,function(){return o(this,function(t){return this.registeredWindowIds.add(e), this.reloadingWindowIds.delete(e),this.onDidReloadingChange.fire(),[2,this.options]})})},e.prototype.reloadWindowDriver=function(e){return i(this,void 0,n.TPromise,function(){return o(this,function(t){return this.reloadingWindowIds.add(e),[2]})})},e.prototype.getWindowIds=function(){return i(this,void 0,n.TPromise,function(){var e=this;return o(this,function(t){return[2,this.windowsService.getWindows().map(function(e){return e.id}).filter(function(t){return e.registeredWindowIds.has(t)&&!e.reloadingWindowIds.has(t)})]})})},e.prototype.capturePage=function(e){return i(this,void 0,n.TPromise,function(){var t,n,r,i;return o(this,function(o){switch(o.label){case 0:return[4,this.whenUnfrozen(e)];case 1:return o.sent(),t=this.windowsService.getWindowById(e),n=t.win.webContents,[4,new Promise(function(e){return n.capturePage(e)})];case 2:return r=o.sent(),i=r.toPNG(),[2,i.toString("base64")]}})})},e.prototype.reloadWindow=function(e){return i(this,void 0,n.TPromise,function(){var t;return o(this,function(n){ switch(n.label){case 0:return[4,this.whenUnfrozen(e)];case 1:return n.sent(),t=this.windowsService.getWindowById(e),this.reloadingWindowIds.add(e),this.windowsService.reload(t),[2]}})})},e.prototype.dispatchKeybinding=function(e,t){return i(this,void 0,n.TPromise,function(){var n,r,i;return o(this,function(o){switch(o.label){case 0:return[4,this.whenUnfrozen(e)];case 1:return o.sent(),n=v.KeybindingIO._readUserBinding(t),r=n[0],i=n[1],[4,this._dispatchKeybinding(e,r)];case 2:return o.sent(),i?[4,this._dispatchKeybinding(e,i)]:[3,4];case 3:o.sent(),o.label=4;case 4:return[2]}})})},e.prototype._dispatchKeybinding=function(e,t){return i(this,void 0,n.TPromise,function(){var r,i,a,s,c,u;return o(this,function(o){switch(o.label){case 0:if(t instanceof g.ScanCodeBinding)throw new Error("ScanCodeBindings not supported");return r=this.windowsService.getWindowById(e),i=r.win.webContents,a=new d.SimpleKeybinding(!1,!1,!1,!1,t.keyCode),s=new p.USLayoutResolvedKeybinding(a,f.OS),c=s.getElectronAccelerator(),u=[], t.ctrlKey&&u.push("ctrl"),t.metaKey&&u.push("meta"),t.shiftKey&&u.push("shift"),t.altKey&&u.push("alt"),i.sendInputEvent({type:"keyDown",keyCode:c,modifiers:u}),function(e){return e<21}(t.keyCode)||i.sendInputEvent({type:"char",keyCode:c,modifiers:u}),i.sendInputEvent({type:"keyUp",keyCode:c,modifiers:u}),[4,n.TPromise.timeout(100)];case 1:return o.sent(),[2]}})})},e.prototype.click=function(e,t,r,a){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(i){switch(i.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=i.sent(),[2,n.click(t,r,a)]}})})},e.prototype.doubleClick=function(e,t){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(r){switch(r.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=r.sent(),[2,n.doubleClick(t)]}})})},e.prototype.setValue=function(e,t,r){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(i){switch(i.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=i.sent(),[2,n.setValue(t,r)]}}) })},e.prototype.getTitle=function(e){return i(this,void 0,n.TPromise,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,this.getWindowDriver(e)];case 1:return t=n.sent(),[2,t.getTitle()]}})})},e.prototype.isActiveElement=function(e,t){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(r){switch(r.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=r.sent(),[2,n.isActiveElement(t)]}})})},e.prototype.getElements=function(e,t,r){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(i){switch(i.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=i.sent(),[2,n.getElements(t,r)]}})})},e.prototype.typeInEditor=function(e,t,r){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(i){switch(i.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=i.sent(),[2,n.typeInEditor(t,r)]}})})},e.prototype.getTerminalBuffer=function(e,t){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(r){ switch(r.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=r.sent(),[2,n.getTerminalBuffer(t)]}})})},e.prototype.writeInTerminal=function(e,t,r){return i(this,void 0,n.TPromise,function(){var n;return o(this,function(i){switch(i.label){case 0:return[4,this.getWindowDriver(e)];case 1:return n=i.sent(),[2,n.writeInTerminal(t,r)]}})})},e.prototype.getWindowDriver=function(e){return i(this,void 0,n.TPromise,function(){var t,n;return o(this,function(i){switch(i.label){case 0:return[4,this.whenUnfrozen(e)];case 1:return i.sent(),t=new m(e),n=this.windowServer.getChannel("windowDriver",t),[2,new r.WindowDriverChannelClient(n)]}})})},e.prototype.whenUnfrozen=function(e){return i(this,void 0,n.TPromise,function(){return o(this,function(t){switch(t.label){case 0:return this.reloadingWindowIds.has(e)?[4,h.toPromise(this.onDidReloadingChange.event)]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}})})},e=a([c(2,s.IWindowsMainService)],e)}();t.Driver=y,t.serve=function(e,t,a,s){ return i(this,void 0,n.TPromise,function(){var n,i,c,d,p;return o(this,function(o){switch(o.label){case 0:return n=a.driverVerbose,i=s.createInstance(y,e,{verbose:n}),c=new r.WindowDriverRegistryChannel(i),e.registerChannel("windowDriverRegistry",c),[4,u.serve(t)];case 1:return d=o.sent(),p=new r.DriverChannel(i),d.registerChannel("driver",p),[2,l.combinedDisposable([d,e])]}})})}}),define(e[44],t([0,1,2,20,134,27,15,177]),function(e,t,n,r,a,s,c,u){"use strict";function l(t){var s;return(t.getRawRequest?n.TPromise.as(t.getRawRequest(t)):function(t){return i(this,void 0,n.TPromise,function(){var n,r,i;return o(this,function(o){switch(o.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 i=o.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["http"],t,n)})];case 3:i=o.sent(),o.label=4;case 4:return r=i,[2,r.request]}})})}(t)).then(function(e){return new n.TPromise(function(n,i){var o=a.parse(t.url),d={hostname:o.hostname, port:o.port?parseInt(o.port):"https:"===o.protocol?443:80,protocol:o.protocol,path:o.path,method:t.type||"GET",headers:t.headers,agent:t.agent,rejectUnauthorized:!r.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(d.auth=t.user+":"+t.password),(s=e(d,function(e){var o=r.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode>=300&&e.statusCode<400&&o>0&&e.headers.location)l(c.assign({},t,{url:e.headers.location,followRedirects:o-1})).done(n,i);else{var a=e;"gzip"===e.headers["content-encoding"]&&(a=a.pipe(u.createGunzip())),n({res:e,stream:a})}})).on("error",i),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 d(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 n.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 n.TPromise(function(t,n){if(!d(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 n.TPromise(function(t,n){if(!d(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[176],t([0,1,81,26,9,2,21,25,69,100,15,37,30,44,45,16,117,11,35,34,42,39]),function(e,t,n,r,i,o,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C,k){"use strict";function E(){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 P(e,t){var n=(e||[]).filter(function(e){ return e.statisticName===t})[0];return n?n.value:0}function I(t,n){var r=t.files.filter(function(e){return e.assetType===n})[0];if(n===D.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===D.Icon){var a=e.toUrl("./media/defaultIcon.png");return{uri:a,fallbackUri:a}}return n===D.Repository?{uri:null,fallbackUri:null}:null}return n===D.VSIX?{uri:t.fallbackAssetUri+"/"+n+"?redirect=true",fallbackUri:t.fallbackAssetUri+"/"+n}:{uri:t.assetUri+"/"+n,fallbackUri:t.fallbackAssetUri+"/"+n}}function M(e){var t=e.properties?e.properties.filter(function(e){return e.key===A.Dependency}):[],n=t.length>0&&t[0].value;return n?n.split(",").map(function(e){return p.adoptToGalleryExtensionId(e)}):[]}function O(e){var t=e.properties?e.properties.filter(function(e){return e.key===A.Engine }):[];return t.length>0&&t[0].value||""}function T(e,t,n,r,i){var o=e.versions[0],a={manifest:I(o,D.Manifest),readme:I(o,D.Details),changelog:I(o,D.Changelog),download:I(o,D.VSIX),icon:I(o,D.Icon),license:I(o,D.License),repository:I(o,D.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)]=I(e,n.assetType),t},{})}(o)};return{identifier:{id:p.getGalleryExtensionId(e.publisher.publisherName,e.extensionName),uuid:e.extensionId},name:e.extensionName,version:o.version,date:o.lastUpdated,displayName:e.displayName,publisherId:e.publisher.publisherId,publisher:e.publisher.publisherName,publisherDisplayName:e.publisher.displayName,description:e.shortDescription||"",installCount:P(e.statistics,"install")+P(e.statistics,"updateCount"),rating:P(e.statistics,"averagerating"),ratingCount:P(e.statistics,"ratingcount"), assets:a,properties:{dependencies:M(o),engine:O(o)},telemetryData:{index:(r.pageNumber-1)*r.pageSize+n,searchText:r.searchText,querySource:i},preview:function(e){return-1!==e.indexOf("preview")}(e.flags)}}function W(e){var t=i.join(e.userDataPath,"machineid");return S.readFile(t,"utf8").then(function(e){return C.isUUID(e)?e:o.TPromise.wrap(null)},function(e){return o.TPromise.wrap(null)}).then(function(e){if(!e){e=C.generateUuid();try{_.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 x;!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"}(x||(x={}));var L;!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"}(L||(L={}));var D={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"},A={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies", Engine:"Microsoft.VisualStudio.Code.Engine"},F={pageNumber:1,pageSize:10,sortBy:d.SortBy.NoneOrRelevance,sortOrder:d.SortOrder.Default,flags:x.None,criteria:[],assetTypes:[]},R=function(){function e(e){void 0===e&&(e=F),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(f.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(f.assign({},this.state,{criteria:i}))},e.prototype.withSortBy=function(t){return new e(f.assign({},this.state,{sortBy:t}))},e.prototype.withSortOrder=function(t){return new e(f.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(f.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(f.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===L.SearchText})[0];return e?e.value:""},enumerable:!0,configurable:!0}),e}(),U=function(){function e(e,t,n){this.requestService=e,this.environmentService=t,this.telemetryService=n;var r=y.default.extensionsGallery;this.extensionsGalleryUrl=r&&r.serviceUrl,this.extensionsControlUrl=r&&r.controlUrl,this.commonHeadersPromise=W(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.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=f.getOrDefault(e,function(e){return e.pageSize},50);this.telemetryService.publicLog("galleryService:query",{type:n,text:r}) ;var a=(new R).withFlags(x.IncludeLatestVersionOnly,x.IncludeAssetUri,x.IncludeStatistics,x.IncludeFiles,x.IncludeVersionProperties).withPage(1,i).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,E(x.Unpublished));return r?((r=(r=(r=r.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return a=a.withFilter(L.Category,n||t),""})).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return a=a.withFilter(L.Tag,n||t),""})).trim())&&(r=r.length<200?r:r.substring(0,200),a=a.withFilter(L.SearchText,r)),a=a.withSortBy(d.SortBy.NoneOrRelevance)):a=e.ids?a.withFilter.apply(a,[L.ExtensionId].concat(e.ids)):e.names?a.withFilter.apply(a,[L.ExtensionName].concat(e.names)):a.withSortBy(d.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(n,r){ return T(n,t.extensionsGalleryUrl,r,a,e.source)}),total:i,pageSize:a.pageSize,getPage:function(n){var r=a.withPage(n+1);return t.queryGallery(r).then(function(n){return n.galleryExtensions.map(function(n,i){return T(n,t.extensionsGalleryUrl,i,r,e.source)})})}}})},e.prototype.queryGallery=function(e){var t=this;return this.commonHeadersPromise.then(function(n){var r=JSON.stringify(e.raw),i=f.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}:g.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 i=this;return this.isEnabled()?this.commonHeadersPromise.then(function(o){var a=s({},o,{Accept:"*/*;api-version=4.0-preview.1"});return i.requestService.request({type:"POST",url:i.api("/publishers/"+e+"/extensions/"+t+"/"+n+"/stats?statType="+r),headers:a}).then(null,function(){return null})}):o.TPromise.as(null)},e.prototype.download=function(e,t){var a=this;return this.loadCompatibleVersion(e).then(function(e){if(!e)return o.TPromise.wrapError(new Error(n.localize(0,null,m.default.version)));var s=i.join(r.tmpdir(),C.generateUuid()),c=p.getGalleryExtensionTelemetryData(e),u=(new Date).getTime(),l=t===d.InstallOperation.Install?"install":t===d.InstallOperation.Update?"update":"",h=l?{uri:e.assets.download.uri+"&"+l+"=true",fallbackUri:e.assets.download.fallbackUri+"?"+l+"=true"}:e.assets.download;return a.getAsset(h).then(function(e){return g.download(s,e)}).then(function(){return function(e){ return a.telemetryService.publicLog("galleryService:downloadVSIX",f.assign(c,{duration:e}))}((new Date).getTime()-u)}).then(function(){return s})})},e.prototype.getReadme=function(e){return this.getAsset(e.assets.readme).then(g.asText)},e.prototype.getManifest=function(e){return this.getAsset(e.assets.manifest).then(g.asText).then(JSON.parse)},e.prototype.getCoreTranslation=function(e,t){var n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(g.asText).then(JSON.parse):o.TPromise.as(null)},e.prototype.getChangelog=function(e){return this.getAsset(e.assets.changelog).then(g.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&&w.isEngineValid(e.properties.engine))return o.TPromise.wrap(e) ;var n=(new R).withFlags(x.IncludeVersions,x.IncludeFiles,x.IncludeVersionProperties).withPage(1,1).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,E(x.Unpublished)).withAssetTypes(D.Manifest,D.VSIX).withFilter(L.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=M(t),e.properties.engine=O(t),e.assets.download=I(t,D.VSIX),e.version=t.version,e):null}):null})},e.prototype.loadDependencies=function(e){var t,n=this;if(!e||0===e.length)return o.TPromise.as([]);var r=(t=(new R).withFlags(x.IncludeLatestVersionOnly,x.IncludeAssetUri,x.IncludeStatistics,x.IncludeFiles,x.IncludeVersionProperties).withPage(1,e.length).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,E(x.Unpublished)).withAssetTypes(D.Icon,D.License,D.Details,D.Manifest,D.VSIX)).withFilter.apply(t,[L.ExtensionName].concat(e)) ;return this.queryGallery(r).then(function(e){for(var t=[],i=[],o=0;o<e.galleryExtensions.length;o++){var a=e.galleryExtensions[o];-1===i.indexOf(a.extensionId)&&(t.push(T(a,n.extensionsGalleryUrl,o,r,"dependencies")),i.push(a.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=f.assign({},r,t.headers||{});t=f.assign({},t,{type:"GET"},{headers:i}) ;var a=e.uri,s=e.fallbackUri,c=f.assign({},t,{url:a});return n.requestService.request(c).then(function(e){return 200===e.res.statusCode?o.TPromise.as(e):g.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(l.isPromiseCanceledError(e))return o.TPromise.wrapError(e);var r=l.getErrorMessage(e);n.telemetryService.publicLog("galleryService:requestError",{url:a,cdn:!0,message:r}),n.telemetryService.publicLog("galleryService:cdnFallback",{url:a,message:r});var i=f.assign({},t,{url:s});return n.requestService.request(i).then(null,function(e){if(l.isPromiseCanceledError(e))return o.TPromise.wrapError(e);var t=l.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=O(i);if(!a)return null;if(w.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=I(r,D.Manifest);return this.getAsset(i,{headers:{"Accept-Encoding":"gzip"}}).then(function(e){return g.asJson(e)}).then(function(i){var o=i.engines.vscode;return w.isEngineValid(o)?(r.properties=r.properties||[],r.properties.push({key:A.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.")):g.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(k.values(t))})}):o.TPromise.as([]):o.TPromise.wrapError(new Error("No extension gallery service configured."))},e=a([c(0,h.IRequestService),c(1,b.IEnvironmentService),c(2,v.ITelemetryService)],e)}();t.ExtensionGalleryService=U,t.resolveMarketplaceHeaders=W}),define(e[65],t([0,1,9,15,75,12,32,10,2,11,6,14,59,16,23,13,3,22,19,60,178,176]),function(e,t,n,r,i,o,s,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultWindowState=function(e){return void 0===e&&(e=w.WindowMode.Normal),{width:1024,height:768,mode:e}};var k=function(){function k(e,t,n,r,i,o,a){this.logService=t,this.environmentService=n,this.configurationService=r,this.stateService=i,this.workspacesMainService=o, this.backupMainService=a,this.touchBarGroups=[],this._lastFocusTime=-1,this._readyState=g.ReadyState.NONE,this.whenReadyCallbacks=[],this.toDispose=[],this.createBrowserWindow(e),this.onConfigurationUpdated(),this.createTouchBar(),this.handleMarketplaceRequests(),this.registerListeners()}return k.prototype.createBrowserWindow=function(e){this.windowState=this.restoreWindowState(e.state);var t=this.windowState.mode===w.WindowMode.Maximized||this.windowState.mode===w.WindowMode.Fullscreen,r=this.getBackgroundColor();y.isMacintosh&&r.toUpperCase()===k.DEFAULT_BG_DARK&&(r="#171717");var i={width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y,backgroundColor:r,minWidth:k.MIN_WIDTH,minHeight:k.MIN_HEIGHT,show:!t,title:v.default.nameLong,webPreferences:{backgroundThrottling:!1,disableBlinkFeatures:"Auxclick"}};y.isLinux&&(i.icon=n.join(this.environmentService.appRoot,"resources/linux/code.png"));var o=this.configurationService.getValue("window") ;y.isMacintosh&&(i.acceptFirstMouse=!0,o&&!1===o.clickThroughInactive&&(i.acceptFirstMouse=!1));var a=!1;y.isMacintosh&&o&&!0===o.nativeTabs&&(i.tabbingIdentifier=v.default.nameShort,a=!0);var s=!1;if(y.isMacintosh){s=!o||!o.titleBarStyle||"custom"===o.titleBarStyle;(!this.environmentService.isBuilt||!!e.extensionDevelopmentPath)&&(s=!1)}else s=o&&"custom"===o.titleBarStyle;if(a&&(s=!1),s&&(i.titleBarStyle="hidden",this.hiddenTitleBarStyle=!0,y.isMacintosh||(i.frame=!1)),this._win=new u.BrowserWindow(i),this._id=this._win.id,y.isWindows&&!t)try{if(u.screen.getAllDisplays().length>1){var c=this._win.getPosition(),l=c[0],d=c[1];l===this.windowState.x&&d===this.windowState.y||this._win.setPosition(this.windowState.x,this.windowState.y,!1)}}catch(e){this.logService.warn("Unexpected error fixing window position on windows with multiple windows: "+e+"\n"+e.stack)}s&&this._win.setSheetOffset(22),t&&(this._win.maximize(),this.windowState.mode===w.WindowMode.Fullscreen&&this._win.setFullScreen(!0), this._win.isVisible()||this._win.show()),this._lastFocusTime=Date.now()},k.prototype.hasHiddenTitleBarStyle=function(){return this.hiddenTitleBarStyle},Object.defineProperty(k.prototype,"isExtensionDevelopmentHost",{get:function(){return!!this.config.extensionDevelopmentPath},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"isExtensionTestHost",{get:function(){return!!this.config.extensionTestsPath},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"extensionDevelopmentPath",{get:function(){return this.config.extensionDevelopmentPath},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"config",{get:function(){return this.currentConfig},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"win",{get:function(){return this._win},enumerable:!0,configurable:!0}),k.prototype.setRepresentedFilename=function(e){ y.isMacintosh?this.win.setRepresentedFilename(e):this.representedFilename=e},k.prototype.getRepresentedFilename=function(){return y.isMacintosh?this.win.getRepresentedFilename():this.representedFilename},k.prototype.focus=function(){this._win&&(this._win.isMinimized()&&this._win.restore(),this._win.focus())},Object.defineProperty(k.prototype,"lastFocusTime",{get:function(){return this._lastFocusTime},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"backupPath",{get:function(){return this.currentConfig?this.currentConfig.backupPath:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"openedWorkspace",{get:function(){return this.currentConfig?this.currentConfig.workspace:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"openedFolderPath",{get:function(){return this.currentConfig?this.currentConfig.folderPath:void 0},enumerable:!0,configurable:!0}),k.prototype.setReady=function(){ for(this._readyState=g.ReadyState.READY;this.whenReadyCallbacks.length;)this.whenReadyCallbacks.pop()(this)},k.prototype.ready=function(){var e=this;return new l.TPromise(function(t){if(e._readyState===g.ReadyState.READY)return t(e);e.whenReadyCallbacks.push(t)})},Object.defineProperty(k.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),k.prototype.handleMarketplaceRequests=function(){var e=this;this.marketplaceHeadersPromise=C.resolveMarketplaceHeaders(this.environmentService);this._win.webContents.session.webRequest.onBeforeSendHeaders({urls:["https://marketplace.visualstudio.com/*","https://*.vsassets.io/*"]},function(t,n){e.marketplaceHeadersPromise.done(function(e){n({cancel:!1,requestHeaders:r.assign(t.requestHeaders,e)})})})},k.prototype.registerListeners=function(){var e=this;if(this._win.webContents.session.webRequest.onBeforeRequest(null,function(e,t){if(e.url.indexOf(".svg")>0){var n=o.default.parse(e.url) ;if(n&&!n.scheme.match(/file/i)&&n.path.endsWith(".svg"))return t({cancel:!0})}return t({})}),this._win.webContents.session.webRequest.onHeadersReceived(null,function(e,t){var n=e.responseHeaders["content-type"]||e.responseHeaders["Content-Type"];return t(n&&Array.isArray(n)&&n.some(function(e){return e.toLowerCase().indexOf("image/svg")>=0})?{cancel:!0}:{cancel:!1,responseHeaders:e.responseHeaders})}),this._win.webContents.on("did-finish-load",function(){e._readyState=g.ReadyState.LOADING,e.pendingLoadConfig&&(e.currentConfig=e.pendingLoadConfig,e.pendingLoadConfig=null),e._win&&!e._win.isVisible()&&(e.windowState.mode===w.WindowMode.Maximized&&e._win.maximize(),e._win.isVisible()||e._win.show())}),this.registerNavigationListenerOn("app-command","browser-backward","browser-forward",!1),this._win.webContents.on("new-window",function(e,t){e.preventDefault(),u.shell.openExternal(t)}),this._win.on("focus",function(){e._lastFocusTime=Date.now()}),this._win.on("maximize",function(t){ e.currentConfig&&(e.currentConfig.maximized=!0),u.app.emit("browser-window-maximize",t,e._win)}),this._win.on("unmaximize",function(t){e.currentConfig&&(e.currentConfig.maximized=!1),u.app.emit("browser-window-unmaximize",t,e._win)}),this._win.on("enter-full-screen",function(){e.sendWhenReady("vscode:enterFullScreen")}),this._win.on("leave-full-screen",function(){e.sendWhenReady("vscode:leaveFullScreen")}),this._win.webContents.on("did-fail-load",function(t,n,r,i,o){e.logService.warn("[electron event]: fail to load, ",r)}),this.environmentService.isBuilt&&this._win.webContents.on("will-navigate",function(e){e&&e.preventDefault()}),this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated()})),this.toDispose.push(this.workspacesMainService.onUntitledWorkspaceDeleted(function(t){return e.onUntitledWorkspaceDeleted(t)})),y.isWindows){var t=this.configurationService.getValue("window");if(t&&!0===t.smoothScrollingWorkaround){var n=!1,r=function(){if(n){ var t=e.getMenuBarVisibility(),r="hidden"===t||"toggle"===t?"default":"hidden";setTimeout(function(){e.doSetMenuBarVisibility(r),e.doSetMenuBarVisibility(t)},0)}n=!1};this._win.on("minimize",function(){return n=!0}),this._win.on("restore",function(){return r()}),this._win.on("maximize",function(){return r()})}}},k.prototype.onUntitledWorkspaceDeleted=function(e){this.openedWorkspace&&this.openedWorkspace.id===e.id&&(this.currentConfig.workspace=void 0)},k.prototype.onConfigurationUpdated=function(){var e=this.getMenuBarVisibility();if(e!==this.currentMenuBarVisibility&&(this.currentMenuBarVisibility=e,this.setMenuBarVisibility(e)),y.isMacintosh){var t=this.configurationService.getValue();t&&t.workbench&&t.workbench.editor&&t.workbench.editor.swipeToNavigate?this.registerNavigationListenerOn("swipe","left","right",!0):this._win.removeAllListeners("swipe")}},k.prototype.registerNavigationListenerOn=function(e,t,n,r){var i=this;this._win.on(e,function(e,o){ i.readyState===g.ReadyState.READY&&(o===t?i.send("vscode:runAction",{id:r?"workbench.action.openPreviousRecentlyUsedEditor":"workbench.action.navigateBack",from:"mouse"}):o===n&&i.send("vscode:runAction",{id:r?"workbench.action.openNextRecentlyUsedEditor":"workbench.action.navigateForward",from:"mouse"}))})},k.prototype.load=function(e,t,n){var i=this;this.readyState===g.ReadyState.NONE?this.currentConfig=e:(this.pendingLoadConfig=e,this._readyState=g.ReadyState.NAVIGATING);var o=r.assign({},e);void 0!==n&&(o["disable-extensions"]=n),y.isMacintosh&&this._win.isDocumentEdited()&&(t&&this.backupMainService.isHotExitEnabled()||this._win.setDocumentEdited(!1)),t||(this.getRepresentedFilename()&&this.setRepresentedFilename(""),this._win.setTitle(v.default.nameLong)),_.mark("main:loadWindow"),this._win.loadURL(this.getUrl(o)),this.environmentService.isBuilt||this.environmentService.extensionTestsPath||(this.showTimeoutHandle=setTimeout(function(){!i._win||i._win.isVisible()||i._win.isMinimized()||(i._win.show(), i._win.focus(),i._win.webContents.openDevTools())},1e4))},k.prototype.reload=function(e,t){e||(e=r.mixin({},this.currentConfig)),delete e.filesToOpen,delete e.filesToCreate,delete e.filesToDiff,delete e.filesToWait,this.isExtensionDevelopmentHost&&t&&(e.verbose=t.verbose,e.debugPluginHost=t.debugPluginHost,e.debugBrkPluginHost=t.debugBrkPluginHost,e.debugId=t.debugId,e["extensions-dir"]=t["extensions-dir"]),e.isInitialStartup=!1;var n=t?t["disable-extensions"]:void 0;this.load(e,!0,n)},k.prototype.getUrl=function(t){t.windowId=this._win.id,t.logLevel=this.logService.getLevel();var n=this.configurationService.getValue("window"),i=n&&n.zoomLevel;"number"==typeof i&&(t.zoomLevel=i),t.fullscreen=this._win.isFullScreen();var o=!0;n&&!1===n.autoDetectHighContrast&&(o=!1),t.highContrast=y.isWindows&&o&&u.systemPreferences.isInvertedColorScheme(),t.accessibilitySupport=u.app.isAccessibilitySupportEnabled(),t.baseTheme=this.getBaseTheme(),t.backgroundColor=this.getBackgroundColor(),t.maximized=this._win.isMaximized(), t.frameless=this.hasHiddenTitleBarStyle()&&!y.isMacintosh,t.perfEntries=_.exportEntries(),t.perfStartTime=global.perfStartTime,t.perfWindowLoadTime=Date.now();var a=h.parseArgs(process.argv),s=r.assign(a,t);for(var c in s)void 0!==s[c]&&null!==s[c]&&""!==s[c]||delete s[c];return e.toUrl("vs/workbench/electron-browser/bootstrap/index.html")+"?config="+encodeURIComponent(JSON.stringify(s))},k.prototype.getBaseTheme=function(){if(y.isWindows&&u.systemPreferences.isInvertedColorScheme())return"hc-black";return this.stateService.getItem(k.themeStorageKey,"vs-dark").split(" ")[0]},k.prototype.getBackgroundColor=function(){if(y.isWindows&&u.systemPreferences.isInvertedColorScheme())return k.DEFAULT_BG_HC_BLACK;var e=this.stateService.getItem(k.themeBackgroundStorageKey,null);if(!e){var t=this.getBaseTheme();return"hc-black"===t?k.DEFAULT_BG_HC_BLACK:"vs"===t?k.DEFAULT_BG_LIGHT:k.DEFAULT_BG_DARK}return e},k.prototype.serializeWindowState=function(){if(!this._win)return t.defaultWindowState() ;if(this._win.isFullScreen()){var e=u.screen.getDisplayMatching(this.getBounds());return{mode:w.WindowMode.Fullscreen,display:e?e.id:void 0,width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y}}var n,r=Object.create(null);if((n=!y.isMacintosh&&this._win.isMaximized()?w.WindowMode.Maximized:w.WindowMode.Normal)===w.WindowMode.Maximized?r.mode=w.WindowMode.Maximized:r.mode=w.WindowMode.Normal,n===w.WindowMode.Normal||n===w.WindowMode.Maximized){var i=this.getBounds();r.x=i.x,r.y=i.y,r.width=i.width,r.height=i.height}return r},k.prototype.restoreWindowState=function(e){if(e)try{e=this.validateWindowState(e)}catch(e){this.logService.warn("Unexpected error validating window state: "+e+"\n"+e.stack)}return e||(e=t.defaultWindowState()),e},k.prototype.validateWindowState=function(e){if(!e)return null;if([e.x,e.y,e.width,e.height].some(function(e){return"number"!=typeof e}))return null;if(e.width<=0||e.height<=0)return null;var n=u.screen.getAllDisplays() ;if(1===n.length){var r=n[0].bounds;return e.mode!==w.WindowMode.Maximized&&r.width>0&&r.height>0&&(e.x<r.x&&(e.x=r.x),e.y<r.y&&(e.y=r.y),e.x>r.x+r.width&&(e.x=r.x),e.y>r.y+r.height&&(e.y=r.y),e.width>r.width&&(e.width=r.width),e.height>r.height&&(e.height=r.height)),e.mode===w.WindowMode.Maximized?t.defaultWindowState(w.WindowMode.Maximized):e}if(e.display&&e.mode===w.WindowMode.Fullscreen){var i=n.filter(function(t){return t.id===e.display})[0];if(i&&i.bounds&&"number"==typeof i.bounds.x&&"number"==typeof i.bounds.y){return(s=t.defaultWindowState(w.WindowMode.Fullscreen)).x=i.bounds.x,s.y=i.bounds.y,s}}var o={x:e.x,y:e.y,width:e.width,height:e.height},a=u.screen.getDisplayMatching(o);if(a&&o.x<a.bounds.x+a.bounds.width&&o.y<a.bounds.y+a.bounds.height&&o.x+o.width>a.bounds.x&&o.y+o.height>a.bounds.y){if(e.mode===w.WindowMode.Maximized){var s=t.defaultWindowState(w.WindowMode.Maximized);return s.x=e.x,s.y=e.y,s}return e}return null},k.prototype.getBounds=function(){ var e=this._win.getPosition(),t=this._win.getSize();return{x:e[0],y:e[1],width:t[0],height:t[1]}},k.prototype.toggleFullScreen=function(){var e=!this._win.isFullScreen();this._win.setFullScreen(e),this.setMenuBarVisibility(this.currentMenuBarVisibility,!1)},k.prototype.getMenuBarVisibility=function(){var e=this.configurationService.getValue("window");if(!e||!e.menuBarVisibility)return"default";var t=e.menuBarVisibility;return["visible","toggle","hidden"].indexOf(t)<0&&(t="default"),t},k.prototype.setMenuBarVisibility=function(e,t){var n=this;void 0===t&&(t=!0),y.isMacintosh||("toggle"===e&&t&&this.send("vscode:showInfoMessage",i.localize(0,null)),"hidden"===e?setTimeout(function(){n.doSetMenuBarVisibility(e)}):this.doSetMenuBarVisibility(e))},k.prototype.doSetMenuBarVisibility=function(e){var t=this._win.isFullScreen();switch(e){case"default":this._win.setMenuBarVisibility(!t),this._win.setAutoHideMenuBar(t);break;case"visible":this._win.setMenuBarVisibility(!0),this._win.setAutoHideMenuBar(!1);break ;case"toggle":this._win.setMenuBarVisibility(!1),this._win.setAutoHideMenuBar(!0);break;case"hidden":this._win.setMenuBarVisibility(!1),this._win.setAutoHideMenuBar(!1)}},k.prototype.onWindowTitleDoubleClick=function(){if(y.isMacintosh){switch(u.systemPreferences.getUserDefault("AppleActionOnDoubleClick","string")){case"Minimize":this.win.minimize();break;case"None":break;case"Maximize":default:this.win.maximize()}}else this.win.isMaximized()?this.win.unmaximize():this.win.maximize()},k.prototype.close=function(){this._win&&this._win.close()},k.prototype.sendWhenReady=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.ready().then(function(){t.send.apply(t,[e].concat(n))})},k.prototype.send=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._win&&(t=this._win.webContents).send.apply(t,[e].concat(n))},k.prototype.updateTouchBar=function(e){var t=this;y.isMacintosh&&this.touchBarGroups.forEach(function(n,r){var i=e[r] ;n.segments=t.createTouchBarGroupSegments(i)})},k.prototype.createTouchBar=function(){if(y.isMacintosh){for(var e=0;e<10;e++){var t=this.createTouchBarGroup();this.touchBarGroups.push(t)}this._win._setEscapeTouchBarItem=function(){},this._win.setTouchBar(new u.TouchBar({items:this.touchBarGroups}))}},k.prototype.createTouchBarGroup=function(e){var t=this;void 0===e&&(e=[]);var n=this.createTouchBarGroupSegments(e),r=new u.TouchBar.TouchBarSegmentedControl({segments:n,mode:"buttons",segmentStyle:"automatic",change:function(e){t.sendWhenReady("vscode:runAction",{id:r.segments[e].id,from:"touchbar"})}});return r},k.prototype.createTouchBarGroupSegments=function(e){void 0===e&&(e=[]);return e.map(function(e){var t;return e.iconLocation&&"file"===e.iconLocation.dark.scheme&&(t=u.nativeImage.createFromPath(o.default.revive(e.iconLocation.dark).fsPath)).isEmpty()&&(t=void 0),{id:e.id,label:t?void 0:e.title,icon:t}})},k.prototype.dispose=function(){this.showTimeoutHandle&&clearTimeout(this.showTimeoutHandle), this.toDispose=m.dispose(this.toDispose),this._win=null},k.themeStorageKey="theme",k.themeBackgroundStorageKey="themeBackground",k.DEFAULT_BG_LIGHT="#FFFFFF",k.DEFAULT_BG_DARK="#1E1E1E",k.DEFAULT_BG_HC_BLACK="#000000",k.MIN_WIDTH=200,k.MIN_HEIGHT=120,k=a([c(1,p.ILogService),c(2,d.IEnvironmentService),c(3,f.IConfigurationService),c(4,s.IStateService),c(5,b.IWorkspacesMainService),c(6,S.IBackupMainService)],k)}();t.CodeWindow=k}),define(e[155],t([0,1,9,56,130,21,15,60,11,32,65,10,73,31,14,6,23,162,5,16,30,18,22,38,3,2,19,4,29,36,64,12,24,35]),function(e,t,n,r,i,o,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C,k,E,P,I,M,O,T,W,x,L,D,A,F){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var R;!function(e){e[e.UNRESPONSIVE=0]="UNRESPONSIVE",e[e.CRASHED=1]="CRASHED"}(R||(R={}));var U=function(){function e(t,n,r,i,o,a,s,c,u,l,d){this.machineId=t,this.logService=n,this.stateService=r,this.environmentService=i,this.lifecycleService=o,this.backupMainService=a,this.configurationService=c,this.historyMainService=u, this.workspacesMainService=l,this.instantiationService=d,this._onWindowReady=new S.Emitter,this.onWindowReady=this._onWindowReady.event,this._onWindowClose=new S.Emitter,this.onWindowClose=this._onWindowClose.event,this._onWindowLoad=new S.Emitter,this.onWindowLoad=this._onWindowLoad.event,this._onActiveWindowChanged=new S.Emitter,this.onActiveWindowChanged=this._onActiveWindowChanged.event,this._onWindowReload=new S.Emitter,this.onWindowReload=this._onWindowReload.event,this._onWindowsCountChanged=new S.Emitter,this.onWindowsCountChanged=this._onWindowsCountChanged.event,this.windowsState=this.stateService.getItem(e.windowsStateStorageKey)||{openedWindows:[]},Array.isArray(this.windowsState.openedWindows)||(this.windowsState.openedWindows=[]),this.dialogs=new N(i,s,r,this),this.workspacesManager=new B(l,a,i,this)}return e.prototype.ready=function(e){this.initialUserEnv=e,this.registerListeners()},e.prototype.registerListeners=function(){var e=this;h.app.on("browser-window-focus",function(){ setTimeout(function(){e._onActiveWindowChanged.fire(e.getLastActiveWindow())})}),h.ipcMain.on("vscode:workbenchLoaded",function(t,n){e.logService.trace("IPC#vscode-workbenchLoaded");var r=e.getWindowById(n);r&&(r.setReady(),e._onWindowReady.fire(r))}),I.isWindows&&h.systemPreferences.on("inverted-color-scheme-changed",function(){h.systemPreferences.isInvertedColorScheme()?e.sendToAll("vscode:enterHighContrast"):e.sendToAll("vscode:leaveHighContrast")}),this.lifecycleService.onBeforeWindowUnload(function(t){return e.onBeforeWindowUnload(t)}),this.lifecycleService.onBeforeWindowClose(function(t){return e.onBeforeWindowClose(t)}),this.lifecycleService.onBeforeShutdown(function(){return e.onBeforeShutdown()}),this.onWindowsCountChanged(function(t){t.newCount-t.oldCount>0&&(e.lastClosedWindowState=void 0)})},e.prototype.onBeforeShutdown=function(){var t=this,n={openedWindows:[],lastPluginDevelopmentHostWindow:this.windowsState.lastPluginDevelopmentHostWindow,lastActiveWindow:this.lastClosedWindowState} ;if(!n.lastActiveWindow){var r=this.getLastActiveWindow();r&&!r.isExtensionDevelopmentHost||(r=e.WINDOWS.filter(function(e){return!e.isExtensionDevelopmentHost})[0]),r&&(n.lastActiveWindow=this.toWindowState(r))}var i=e.WINDOWS.filter(function(e){return e.isExtensionDevelopmentHost&&!e.isExtensionTestHost})[0];i&&(n.lastPluginDevelopmentHostWindow=this.toWindowState(i)),this.getWindowCount()>1&&(n.openedWindows=e.WINDOWS.filter(function(e){return!e.isExtensionDevelopmentHost}).map(function(e){return t.toWindowState(e)})),this.stateService.setItem(e.windowsStateStorageKey,n)},e.prototype.onBeforeWindowClose=function(e){if(!this.lifecycleService.isQuitRequested){var t=this.toWindowState(e);e.isExtensionDevelopmentHost&&!e.isExtensionTestHost?this.windowsState.lastPluginDevelopmentHostWindow=t:e.isExtensionDevelopmentHost||!e.openedWorkspace&&!e.openedFolderPath||this.windowsState.openedWindows.forEach(function(n){ var r=e.openedWorkspace&&n.workspace&&n.workspace.id===e.openedWorkspace.id,i=e.openedFolderPath&&k.isEqual(n.folderPath,e.openedFolderPath,!I.isLinux);(r||i)&&(n.uiState=t.uiState)}),1===this.getWindowCount()&&(this.lastClosedWindowState=t)}},e.prototype.toWindowState=function(e){return{workspace:e.openedWorkspace,folderPath:e.openedFolderPath,backupPath:e.backupPath,uiState:e.serializeWindowState()}},e.prototype.open=function(e){var t=this;e=this.validateOpenConfig(e);var i=this.getPathsToOpen(e),a=[];e.addMode&&(a=i.filter(function(e){return!!e.folderPath}).map(function(e){return{filePath:e.folderPath}}),i=i.filter(function(e){return!e.folderPath}));var s=i.filter(function(e){return!!e.filePath&&!e.createFilePath}),c=i.filter(function(e){return!!e.filePath&&e.createFilePath}),u=[];e.diffMode&&2===s.length&&(u=s,s=[],c=[]);var l;e.cli.wait&&e.cli.waitMarkerFilePath&&(l={paths:u.concat(s,c),waitMarkerFilePath:e.cli.waitMarkerFilePath});var d=o.distinct(i.filter(function(e){return!!e.workspace }).map(function(e){return e.workspace}),function(e){return e.id}),p=o.distinct(i.filter(function(e){return e.folderPath&&!e.filePath}).map(function(e){return e.folderPath}),function(e){return I.isLinux?e:e.toLowerCase()}),f=[],h=[],v=[];!e.initialStartup||e.cli.extensionDevelopmentPath||e.cli["disable-restore-windows"]||(f=this.backupMainService.getFolderBackupPaths(),(h=this.backupMainService.getWorkspaceBackups()).push.apply(h,this.workspacesMainService.getUntitledWorkspacesSync()),(v=this.backupMainService.getEmptyWindowBackupPaths()).push.apply(v,i.filter(function(e){return!e.workspace&&!e.folderPath&&e.backupPath}).map(function(e){return n.basename(e.backupPath)})),v=o.distinct(v));var g=i.filter(function(e){return!(e.workspace||e.folderPath||e.filePath||e.backupPath)}).length,m=this.doOpen(e,d,h,p,f,v,g,s,c,u,l,a);if(m.length>1){var y=!0,b=!0;if(this.windowsState.lastActiveWindow&&!e.forceEmpty&&!e.cli._.length&&(!e.pathsToOpen||!e.pathsToOpen.length)){var S=m.filter(function(e){ return e.backupPath===t.windowsState.lastActiveWindow.backupPath});S.length&&(S[0].focus(),y=!1,b=!1)}if(y)for(var _=function(e){var t=m[e];return t.openedWorkspace&&h.some(function(e){return e.id===t.openedWorkspace.id})||t.openedFolderPath&&f.some(function(e){return e===t.openedFolderPath})||t.backupPath&&v.some(function(e){return e===n.basename(t.backupPath)})?"continue":(t.focus(),b=!1,"break")},C=m.length-1;C>=0;C--){if("break"===_(C))break}b&&m[m.length-1].focus()}if(!m.some(function(e){return e.isExtensionDevelopmentHost})&&!e.cli.diff){var k=[],E=[];i.forEach(function(e){e.workspace||e.folderPath?k.push(e.workspace||e.folderPath):e.filePath&&E.push(e.filePath)}),this.environmentService.skipAddToRecentlyOpened||this.historyMainService.addRecentlyOpened(k,E)}return e.context===w.OpenContext.CLI&&e.cli.wait&&e.cli.waitMarkerFilePath&&1===m.length&&m[0]&&this.waitForWindowCloseOrLoad(m[0].id).done(function(){return r.unlink(e.cli.waitMarkerFilePath,function(e){})}),m}, e.prototype.validateOpenConfig=function(e){return!e.addMode||!e.initialStartup&&this.getLastActiveWindow()||(e.addMode=!1),e},e.prototype.doOpen=function(t,n,r,i,a,s,c,u,l,d,p,h){var v=this,g=[],m=this.shouldOpenNewWindow(t),y=m.openFolderInNewWindow,w=m.openFilesInNewWindow;if(!t.initialStartup&&h.length>0){var S=this.getLastActiveWindow();S&&g.push(this.doAddFoldersToExistingWidow(S,h)),h=[]}if(0===i.length+a.length+n.length+r.length+s.length&&(u.length>0||l.length>0||d.length>0)){var _=u[0]||l[0]||d[0],C=b.findBestWindowOrFolderForFile({windows:e.WINDOWS,newWindow:w,reuseWindow:t.forceReuseWindow,context:t.context,filePath:_&&_.filePath,workspaceResolver:function(e){return v.workspacesMainService.resolveWorkspaceSync(e.configPath)}});"string"==typeof C&&p&&(C=w?null:this.getLastActiveWindow()),C instanceof f.CodeWindow?C.openedWorkspace?n.push(C.openedWorkspace):C.openedFolderPath?i.push(C.openedFolderPath):(g.push(this.doOpenFilesInExistingWindow(t,C,u,l,d,p)),u=[],l=[],d=[], p=void 0):"string"==typeof C?i.push(C):(g.push(this.openInBrowserWindow({userEnv:t.userEnv,cli:t.cli,initialStartup:t.initialStartup,filesToOpen:u,filesToCreate:l,filesToDiff:d,filesToWait:p,forceNewWindow:!0})),u=[],l=[],d=[],p=void 0)}var E=o.distinct(r.concat(n),function(e){return e.id});if(E.length>0){var P=o.coalesce(E.map(function(t){return b.findWindowOnWorkspace(e.WINDOWS,t)}));if(P.length>0){var M=P[0];g.push(this.doOpenFilesInExistingWindow(t,M,u,l,d,p)),u=[],l=[],d=[],p=void 0,y=!0}E.forEach(function(e){P.some(function(t){return t.openedWorkspace.id===e.id})||(g.push(v.doOpenFolderOrWorkspace(t,{workspace:e},y,u,l,d,p)),u=[],l=[],d=[],p=void 0,y=!0)})}var O=o.distinct(a.concat(i),function(e){return I.isLinux?e:e.toLowerCase()});if(O.length>0){var T=o.coalesce(O.map(function(t){return b.findWindowOnWorkspace(e.WINDOWS,t)}));if(T.length>0){var W=T[0];g.push(this.doOpenFilesInExistingWindow(t,W,u,l,d,p)),u=[],l=[],d=[],p=void 0,y=!0}O.forEach(function(e){T.some(function(t){ return k.isEqual(t.openedFolderPath,e,!I.isLinux)})||(g.push(v.doOpenFolderOrWorkspace(t,{folderPath:e},y,u,l,d,p)),u=[],l=[],d=[],p=void 0,y=!0)})}if(s.length>0&&s.forEach(function(e){g.push(v.openInBrowserWindow({userEnv:t.userEnv,cli:t.cli,initialStartup:t.initialStartup,filesToOpen:u,filesToCreate:l,filesToDiff:d,filesToWait:p,forceNewWindow:!0,emptyWindowBackupFolder:e})),u=[],l=[],d=[],p=void 0,y=!0}),0===g.length)for(var x=0;x<c;x++)g.push(this.openInBrowserWindow({userEnv:t.userEnv,cli:t.cli,initialStartup:t.initialStartup,forceNewWindow:y})),y=!0;return o.distinct(g)},e.prototype.doOpenFilesInExistingWindow=function(e,t,n,r,i,o){return t.focus(),t.ready().then(function(t){var a=e.userEnv?e.userEnv.TERM_PROGRAM:void 0;t.send("vscode:openFiles",{filesToOpen:n,filesToCreate:r,filesToDiff:i,filesToWait:o,termProgram:a})}),t},e.prototype.doAddFoldersToExistingWidow=function(e,t){return e.focus(),e.ready().then(function(e){e.send("vscode:addFolders",{foldersToAdd:t})}),e}, e.prototype.doOpenFolderOrWorkspace=function(e,t,n,r,i,o,a,s){n||s||"number"!=typeof e.contextWindowId||(s=this.getWindowById(e.contextWindowId));return this.openInBrowserWindow({userEnv:e.userEnv,cli:e.cli,initialStartup:e.initialStartup,workspace:t.workspace,folderPath:t.folderPath,filesToOpen:r,filesToCreate:i,filesToDiff:o,filesToWait:a,forceNewWindow:n,windowToUse:s})},e.prototype.getPathsToOpen=function(e){var t,n=!1;if(e.pathsToOpen&&e.pathsToOpen.length>0?(t=this.doExtractPathsFromAPI(e),n=!0):e.forceEmpty?t=[Object.create(null)]:e.cli._.length>0?(t=this.doExtractPathsFromCLI(e.cli),n=!0):t=this.doGetWindowsFromLastSession(),!e.addMode&&n){var r=t.filter(function(e){return!!e.folderPath});if(r.length>1){var i=this.workspacesMainService.createWorkspaceSync(r.map(function(e){return{uri:D.default.file(e.folderPath)}}));t.push({workspace:i}),t=t.filter(function(e){return!e.folderPath})}}return t},e.prototype.doExtractPathsFromAPI=function(e){var t=this,n=e.pathsToOpen.map(function(n){var r=t.parsePath(n,{ gotoLineMode:e.cli&&e.cli.goto,forceOpenWorkspaceAsFile:e.forceOpenWorkspaceAsFile});if(!r){var o={title:_.default.nameLong,type:"info",buttons:[i.localize(0,null)],message:i.localize(1,null),detail:i.localize(2,null,n),noLink:!0};t.dialogs.showMessageBox(o,t.getFocusedWindow())}return r});return n=o.coalesce(n)},e.prototype.doExtractPathsFromCLI=function(e){var t=this,n=o.coalesce(e._.map(function(n){return t.parsePath(n,{ignoreFileNotFound:!0,gotoLineMode:e.goto})}));return n.length>0?n:[Object.create(null)]},e.prototype.doGetWindowsFromLastSession=function(){var e=this,t=this.getRestoreWindowsSetting(),n=this.windowsState.lastActiveWindow;switch(t){case"none":return[Object.create(null)];case"one":if(n){var r=n.workspace;if(r){var i=this.parsePath(r.configPath);if(i&&i.workspace)return[i]}else if(n.folderPath){var o=this.parsePath(n.folderPath);if(o&&o.folderPath)return[o]}else if(n.backupPath)return[{backupPath:n.backupPath}]}break;case"all":case"folders": var a=[],s=this.windowsState.openedWindows.filter(function(e){return!!e.workspace}).map(function(e){return e.workspace});n&&n.workspace&&s.push(n.workspace),a.push.apply(a,s.map(function(t){return e.parsePath(t.configPath)}).filter(function(e){return e&&e.workspace}));var c=this.windowsState.openedWindows.filter(function(e){return!!e.folderPath}).map(function(e){return e.folderPath});if(n&&n.folderPath&&c.push(n.folderPath),a.push.apply(a,c.map(function(t){return e.parsePath(t)}).filter(function(e){return e&&e.folderPath})),"all"===t){var u=this.windowsState.openedWindows.filter(function(e){return!e.workspace&&!e.folderPath&&e.backupPath}).map(function(e){return e.backupPath}),l=n&&!n.workspace&&!n.folderPath&&n.backupPath;l&&u.push(l),a.push.apply(a,u.map(function(e){return{backupPath:e}}))}if(a.length>0)return a}return[Object.create(null)]},e.prototype.getRestoreWindowsSetting=function(){var e;if(this.lifecycleService.wasRestarted)e="all";else{var t=this.configurationService.getValue("window") ;e=t&&t.restoreWindows||"one",-1===["all","folders","one","none"].indexOf(e)&&(e="one")}return e},e.prototype.parsePath=function(e,t){if(!e)return null;var i,o=t&&t.gotoLineMode;t&&t.gotoLineMode&&(e=(i=v.parseLineAndColumnAware(e)).path);var a=n.normalize(e);try{var s=r.statSync(a);if(s){if(s.isFile()){if(!t||!t.forceOpenWorkspaceAsFile){var c=this.workspacesMainService.resolveWorkspaceSync(a);if(c)return{workspace:{id:c.id,configPath:c.configPath}}}return{filePath:a,lineNumber:o?i.line:void 0,columnNumber:o?i.column:void 0}}if(s.isDirectory())return{folderPath:a}}}catch(e){if(this.historyMainService.removeFromRecentlyOpened([a]),t&&t.ignoreFileNotFound)return{filePath:a,createFilePath:!0}}return null},e.prototype.shouldOpenNewWindow=function(e){var t=this.configurationService.getValue("window"),n=t&&t.openFoldersInNewWindow||"default",r=t&&t.openFilesInNewWindow||"off",i=(e.preferNewWindow||e.forceNewWindow)&&!e.forceReuseWindow;e.forceNewWindow||e.forceReuseWindow||"on"!==n&&"off"!==n||(i="on"===n);var o ;return e.forceNewWindow||e.forceReuseWindow?o=e.forceNewWindow&&!e.forceReuseWindow:(I.isMacintosh?e.context===w.OpenContext.DOCK&&(o=!0):e.context!==w.OpenContext.DIALOG&&e.context!==w.OpenContext.MENU&&(o=!0),e.cli.extensionDevelopmentPath||"on"!==r&&"off"!==r||(o="on"===r)),{openFolderInNewWindow:i,openFilesInNewWindow:o}},e.prototype.openExtensionDevelopmentHostWindow=function(t){var n=b.findWindowOnExtensionDevelopmentPath(e.WINDOWS,t.cli.extensionDevelopmentPath);if(n)return this.reload(n,t.cli),void n.focus();if(0===t.cli._.length&&!t.cli.extensionTestsPath){var r=this.windowsState.lastPluginDevelopmentHostWindow,i=r&&(r.workspace||r.folderPath);i&&(t.cli._=[O.isSingleFolderWorkspaceIdentifier(i)?i:i.configPath])}t.cli._.some(function(t){return!!b.findWindowOnWorkspaceOrFolderPath(e.WINDOWS,t)})&&(t.cli._=[]),this.open({context:t.context,cli:t.cli,forceNewWindow:!0,forceEmpty:0===t.cli._.length,userEnv:t.userEnv})},e.prototype.openInBrowserWindow=function(t){var r=this,i=u.mixin({},t.cli) ;i.appRoot=this.environmentService.appRoot,i.machineId=this.machineId,i.execPath=process.execPath,i.userEnv=u.assign({},this.initialUserEnv,t.userEnv||{}),i.isInitialStartup=t.initialStartup,i.workspace=t.workspace,i.folderPath=t.folderPath,i.filesToOpen=t.filesToOpen,i.filesToCreate=t.filesToCreate,i.filesToDiff=t.filesToDiff,i.filesToWait=t.filesToWait,i.nodeCachedDataDir=this.environmentService.nodeCachedDataDir,t.emptyWindowBackupFolder&&(i.backupPath=n.join(this.environmentService.backupHome,t.emptyWindowBackupFolder));var o;if(t.forceNewWindow||(o=t.windowToUse||this.getLastActiveWindow())&&o.focus(),o){var a=o.config;!i.extensionDevelopmentPath&&a&&a.extensionDevelopmentPath&&(i.extensionDevelopmentPath=a.extensionDevelopmentPath,i.verbose=a.verbose,i.debugBrkPluginHost=a.debugBrkPluginHost,i.debugId=a.debugId,i.debugPluginHost=a.debugPluginHost,i["extensions-dir"]=a["extensions-dir"])}else{var s=this.configurationService.getValue("window"),c=this.getNewWindowState(i),l=void 0 ;l=c.hasDefaultState?s&&s.newWindowDimensions&&["fullscreen","inherit"].indexOf(s.newWindowDimensions)>=0:this.lifecycleService.wasRestarted||s&&s.restoreFullscreen,c.mode!==E.WindowMode.Fullscreen||l||(c.mode=E.WindowMode.Normal),o=this.instantiationService.createInstance(f.CodeWindow,{state:c,extensionDevelopmentPath:i.extensionDevelopmentPath,isExtensionTestHost:!!i.extensionTestsPath}),e.WINDOWS.push(o),this._onWindowsCountChanged.fire({oldCount:e.WINDOWS.length-1,newCount:e.WINDOWS.length}),o.win.webContents.removeAllListeners("devtools-reload-page"),o.win.webContents.on("devtools-reload-page",function(){return r.reload(o)}),o.win.webContents.on("crashed",function(){return r.onWindowError(o,R.CRASHED)}),o.win.on("unresponsive",function(){return r.onWindowError(o,R.UNRESPONSIVE)}),o.win.on("closed",function(){return r.onWindowClosed(o)}),this.lifecycleService.registerWindow(o)}return this.lifecycleService.unload(o,g.UnloadReason.LOAD).done(function(e){ e||(i.extensionDevelopmentPath||(i.workspace?i.backupPath=r.backupMainService.registerWorkspaceBackupSync(i.workspace):i.folderPath?i.backupPath=r.backupMainService.registerFolderBackupSync(i.folderPath):i.backupPath=r.backupMainService.registerEmptyWindowBackupSync(t.emptyWindowBackupFolder)),o.load(i),r._onWindowLoad.fire(o.id))}),o},e.prototype.getNewWindowState=function(e){var t=this.getLastActiveWindow();if(!e.extensionTestsPath){if(e.extensionDevelopmentPath&&this.windowsState.lastPluginDevelopmentHostWindow)return this.windowsState.lastPluginDevelopmentHostWindow.uiState;if(e.workspace){var n=this.windowsState.openedWindows.filter(function(t){return t.workspace&&t.workspace.id===e.workspace.id}).map(function(e){return e.uiState});if(n.length)return n[0]}if(e.folderPath){var r=this.windowsState.openedWindows.filter(function(t){return k.isEqual(t.folderPath,e.folderPath,!I.isLinux)}).map(function(e){return e.uiState});if(r.length)return r[0]}else if(e.backupPath){ var i=this.windowsState.openedWindows.filter(function(t){return t.backupPath===e.backupPath}).map(function(e){return e.uiState});if(i.length)return i[0]}d=this.lastClosedWindowState||this.windowsState.lastActiveWindow;if(!t&&d)return d.uiState}var o,a=h.screen.getAllDisplays();if(1===a.length)o=a[0];else{if(I.isMacintosh){var s=h.screen.getCursorScreenPoint();o=h.screen.getDisplayNearestPoint(s)}!o&&t&&(o=h.screen.getDisplayMatching(t.getBounds())),o||(o=h.screen.getPrimaryDisplay()||a[0])}var c=f.defaultWindowState();c.x=Math.round(o.bounds.x+o.bounds.width/2-c.width/2),c.y=Math.round(o.bounds.y+o.bounds.height/2-c.height/2);var u=this.configurationService.getValue("window"),l=!0;if(u&&u.newWindowDimensions)if("maximized"===u.newWindowDimensions)c.mode=E.WindowMode.Maximized,l=!1;else if("fullscreen"===u.newWindowDimensions)c.mode=E.WindowMode.Fullscreen,l=!1;else if("inherit"===u.newWindowDimensions&&t){var d;(d=t.serializeWindowState()).mode===E.WindowMode.Fullscreen?c.mode=E.WindowMode.Fullscreen:c=d,l=!1 }return l&&(c=this.ensureNoOverlap(c)),c.hasDefaultState=!0,c},e.prototype.ensureNoOverlap=function(t){if(0===e.WINDOWS.length)return t;for(var n=e.WINDOWS.map(function(e){return e.getBounds()});n.some(function(e){return e.x===t.x||e.y===t.y});)t.x+=30,t.y+=30;return t},e.prototype.reload=function(e,t){var n=this;this.lifecycleService.unload(e,g.UnloadReason.RELOAD).done(function(r){r||(e.reload(void 0,t),n._onWindowReload.fire(e.id))})},e.prototype.closeWorkspace=function(e){this.openInBrowserWindow({cli:this.environmentService.args,windowToUse:e})},e.prototype.saveAndEnterWorkspace=function(e,t){var n=this;return this.workspacesManager.saveAndEnterWorkspace(e,t).then(function(t){return n.doEnterWorkspace(e,t)})},e.prototype.createAndEnterWorkspace=function(e,t,n){var r=this;return this.workspacesManager.createAndEnterWorkspace(e,t,n).then(function(t){return r.doEnterWorkspace(e,t)})},e.prototype.doEnterWorkspace=function(e,t){return this.historyMainService.addRecentlyOpened([t.workspace],[]), this._onWindowReady.fire(e),t},e.prototype.pickWorkspaceAndOpen=function(e){this.workspacesManager.pickWorkspaceAndOpen(e)},e.prototype.onBeforeWindowUnload=function(e){var t=e.reason===g.UnloadReason.CLOSE,n=e.reason===g.UnloadReason.LOAD;if(t||n){var r=e.window.openedWorkspace;r&&this.workspacesMainService.isUntitledWorkspace(r)&&(e.window.config&&e.window.config.extensionDevelopmentPath?this.workspacesMainService.deleteUntitledWorkspaceSync(r):t&&!I.isMacintosh&&1===this.getWindowCount()||e.veto(this.workspacesManager.promptToSaveUntitledWorkspace(this.getWindowById(e.window.id),r).then(function(e){return e||M.TPromise.timeout(0).then(function(){return e})})))}},e.prototype.focusLastActive=function(e,t){var n=this.getLastActiveWindow();return n?(n.focus(),n):this.open({context:t,cli:e,forceEmpty:!0})[0]},e.prototype.getLastActiveWindow=function(){return b.getLastActiveWindow(e.WINDOWS)},e.prototype.openNewWindow=function(e){return this.open({context:e,cli:this.environmentService.args,forceNewWindow:!0, forceEmpty:!0})},e.prototype.waitForWindowCloseOrLoad=function(e){var t=this;return new M.TPromise(function(n){function r(t){t===e&&(i.dispose(),o.dispose(),n(null))}var i=t.onWindowClose(function(e){return r(e)}),o=t.onWindowLoad(function(e){return r(e)})})},e.prototype.sendToFocused=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getFocusedWindow()||this.getLastActiveWindow();r&&r.sendWhenReady.apply(r,[e].concat(t))},e.prototype.sendToAll=function(t,n,r){e.WINDOWS.forEach(function(e){r&&r.indexOf(e.id)>=0||e.sendWhenReady(t,n)})},e.prototype.getFocusedWindow=function(){var e=h.BrowserWindow.getFocusedWindow();return e?this.getWindowById(e.id):null},e.prototype.getWindowById=function(t){var n=e.WINDOWS.filter(function(e){return e.id===t});return n&&1===n.length?n[0]:null},e.prototype.getWindows=function(){return e.WINDOWS},e.prototype.getWindowCount=function(){return e.WINDOWS.length},e.prototype.onWindowError=function(e,t){var n=this ;this.logService.error(t===R.CRASHED?"[VS Code]: render process crashed!":"[VS Code]: detected unresponsive"),t===R.UNRESPONSIVE?this.dialogs.showMessageBox({title:_.default.nameLong,type:"warning",buttons:[W.mnemonicButtonLabel(i.localize(3,null)),W.mnemonicButtonLabel(i.localize(4,null)),W.mnemonicButtonLabel(i.localize(5,null))],message:i.localize(6,null),detail:i.localize(7,null),noLink:!0},e).then(function(t){e.win&&(0===t.button?e.reload():2===t.button&&(n.onBeforeWindowClose(e),e.win.destroy()))}):this.dialogs.showMessageBox({title:_.default.nameLong,type:"warning",buttons:[W.mnemonicButtonLabel(i.localize(8,null)),W.mnemonicButtonLabel(i.localize(9,null))],message:i.localize(10,null),detail:i.localize(11,null),noLink:!0},e).then(function(t){e.win&&(0===t.button?e.reload():1===t.button&&(n.onBeforeWindowClose(e),e.win.destroy()))})},e.prototype.onWindowClosed=function(t){t.dispose();var n=e.WINDOWS.indexOf(t);e.WINDOWS.splice(n,1),this._onWindowsCountChanged.fire({oldCount:e.WINDOWS.length+1, newCount:e.WINDOWS.length}),this._onWindowClose.fire(t.id)},e.prototype.pickFileFolderAndOpen=function(e){this.doPickAndOpen(e,!0,!0)},e.prototype.pickFolderAndOpen=function(e){this.doPickAndOpen(e,!0,!1)},e.prototype.pickFileAndOpen=function(e){this.doPickAndOpen(e,!1,!0)},e.prototype.doPickAndOpen=function(e,t,n){var r=e;r.pickFolders=t,r.pickFiles=n,r.dialogOptions||(r.dialogOptions=Object.create(null)),r.dialogOptions.title||(r.dialogOptions.title=t&&n?i.localize(12,null):t?i.localize(13,null):i.localize(14,null)),r.telemetryEventName||(r.telemetryEventName=t&&n?"openFileFolder":t?"openFolder":"openFile"),this.dialogs.pickAndOpen(r)},e.prototype.showMessageBox=function(e,t){return this.dialogs.showMessageBox(e,t)},e.prototype.showSaveDialog=function(e,t){return this.dialogs.showSaveDialog(e,t)},e.prototype.showOpenDialog=function(e,t){return this.dialogs.showOpenDialog(e,t)},e.prototype.quit=function(){var e=this,t=this.getFocusedWindow() ;t&&t.isExtensionDevelopmentHost&&this.getWindowCount()>1?t.win.close():setTimeout(function(){e.lifecycleService.quit()},10)},e.windowsStateStorageKey="windowsState",e.WINDOWS=[],e=a([c(1,y.ILogService),c(2,p.IStateService),c(3,d.IEnvironmentService),c(4,g.ILifecycleService),c(5,l.IBackupMainService),c(6,C.ITelemetryService),c(7,m.IConfigurationService),c(8,P.IHistoryMainService),c(9,O.IWorkspacesMainService),c(10,T.IInstantiationService)],e)}();t.WindowsManager=U;var N=function(){function e(e,t,n,r){this.environmentService=e,this.telemetryService=t,this.stateService=n,this.windowsMainService=r,this.mapWindowToDialogQueue=new Map,this.noWindowDialogQueue=new A.Queue}return e.prototype.pickAndOpen=function(e){var t=this;this.getFileOrFolderPaths(e).then(function(n){var r=n?n.length:0;e.telemetryEventName&&t.telemetryService.publicLog(e.telemetryEventName,s({},e.telemetryExtraData,{outcome:r?"success":"canceled",numberOfPaths:r})),r&&t.windowsMainService.open({context:w.OpenContext.DIALOG, cli:t.environmentService.args,pathsToOpen:n,forceNewWindow:e.forceNewWindow,forceOpenWorkspaceAsFile:e.dialogOptions&&!u.equals(e.dialogOptions.filters,O.WORKSPACE_FILTER)})})},e.prototype.getFileOrFolderPaths=function(t){var r=this;t.dialogOptions||(t.dialogOptions=Object.create(null)),t.dialogOptions.defaultPath||(t.dialogOptions.defaultPath=this.stateService.getItem(e.workingDirPickerStorageKey)),"boolean"!=typeof t.pickFiles&&"boolean"!=typeof t.pickFolders||(t.dialogOptions.properties=void 0,t.pickFiles&&t.pickFolders&&(t.dialogOptions.properties=["multiSelections","openDirectory","openFile","createDirectory"])),t.dialogOptions.properties||(t.dialogOptions.properties=["multiSelections",t.pickFolders?"openDirectory":"openFile","createDirectory"]),I.isMacintosh&&t.dialogOptions.properties.push("treatPackageAsDirectory");var i=this.windowsMainService.getWindowById(t.windowId)||this.windowsMainService.getFocusedWindow();return this.showOpenDialog(t.dialogOptions,i).then(function(t){ if(t&&t.length>0)return r.stateService.setItem(e.workingDirPickerStorageKey,n.dirname(t[0])),t})},e.prototype.getDialogQueue=function(e){if(!e)return this.noWindowDialogQueue;var t=this.mapWindowToDialogQueue.get(e.id);return t||(t=new A.Queue,this.mapWindowToDialogQueue.set(e.id,t)),t},e.prototype.showMessageBox=function(e,t){return this.getDialogQueue(t).queue(function(){return new M.TPromise(function(n,r){h.dialog.showMessageBox(t?t.win:void 0,e,function(e,t){n({button:e,checkboxChecked:t})})})})},e.prototype.showSaveDialog=function(e,t){return this.getDialogQueue(t).queue(function(){return new M.TPromise(function(n,r){h.dialog.showSaveDialog(t?t.win:void 0,e,function(e){n(function(e){return e&&I.isMacintosh&&(e=L.normalizeNFC(e)),e}(e))})})})},e.prototype.showOpenDialog=function(e,t){return this.getDialogQueue(t).queue(function(){return new M.TPromise(function(n,r){var i=M.TPromise.as(void 0);e.defaultPath&&(i=F.exists(e.defaultPath).then(function(t){t||(e.defaultPath=void 0)})),i.then(function(){ h.dialog.showOpenDialog(t?t.win:void 0,e,function(e){n(function(e){return e&&e.length>0&&I.isMacintosh&&(e=e.map(function(e){return L.normalizeNFC(e)})),e}(e))})})})})},e.workingDirPickerStorageKey="pickerWorkingDir",e}(),B=function(){function e(e,t,n,r){this.workspacesMainService=e,this.backupMainService=t,this.environmentService=n,this.windowsMainService=r}return e.prototype.saveAndEnterWorkspace=function(e,t){return e&&e.win&&e.readyState===w.ReadyState.READY&&e.openedWorkspace&&t&&this.isValidTargetWorkspacePath(e,t)?this.doSaveAndOpenWorkspace(e,e.openedWorkspace,t):M.TPromise.as(null)},e.prototype.createAndEnterWorkspace=function(e,t,n){var r=this;return e&&e.win&&e.readyState===w.ReadyState.READY?this.isValidTargetWorkspacePath(e,n).then(function(i){return i?r.workspacesMainService.createWorkspace(t).then(function(t){return r.doSaveAndOpenWorkspace(e,t,n)}):M.TPromise.as(null)}):M.TPromise.as(null)},e.prototype.isValidTargetWorkspacePath=function(e,t){if(!t)return M.TPromise.wrap(!0) ;if(e.openedWorkspace&&e.openedWorkspace.configPath===t)return M.TPromise.wrap(!1);if(b.findWindowOnWorkspace(this.windowsMainService.getWindows(),{id:this.workspacesMainService.getWorkspaceId(t),configPath:t})){var r={title:_.default.nameLong,type:"info",buttons:[i.localize(15,null)],message:i.localize(16,null,n.basename(t)),detail:i.localize(17,null),noLink:!0};return this.windowsMainService.showMessageBox(r,this.windowsMainService.getFocusedWindow()).then(function(){return!1})}return M.TPromise.wrap(!0)},e.prototype.doSaveAndOpenWorkspace=function(e,t,n){var r=this;return(n?this.workspacesMainService.saveWorkspace(t,n):M.TPromise.as(t)).then(function(t){e.focus();var n;return e.config.extensionDevelopmentPath||(n=r.backupMainService.registerWorkspaceBackupSync(t,e.config.backupPath)),e.config.folderPath=void 0,e.config.workspace=t,e.config.backupPath=n,{workspace:t,backupPath:n}})},e.prototype.pickWorkspaceAndOpen=function(e){ var t=this.windowsMainService.getWindowById(e.windowId)||this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();this.windowsMainService.pickFileAndOpen({windowId:t?t.id:void 0,dialogOptions:{buttonLabel:W.mnemonicButtonLabel(i.localize(18,null)),title:i.localize(19,null),filters:O.WORKSPACE_FILTER,properties:["openFile"],defaultPath:e.dialogOptions&&e.dialogOptions.defaultPath},forceNewWindow:e.forceNewWindow,telemetryEventName:e.telemetryEventName,telemetryExtraData:e.telemetryExtraData})},e.prototype.promptToSaveUntitledWorkspace=function(e,t){var n,r=this;!function(e){e[e.SAVE=0]="SAVE",e[e.DONT_SAVE=1]="DONT_SAVE",e[e.CANCEL=2]="CANCEL"}(n||(n={}));var o={label:W.mnemonicButtonLabel(i.localize(20,null)),result:n.SAVE},a={label:W.mnemonicButtonLabel(i.localize(21,null)),result:n.DONT_SAVE},s={label:i.localize(22,null),result:n.CANCEL},c=[];I.isWindows?c.push(o,a,s):I.isLinux?c.push(a,s,o):c.push(o,s,a);var u={title:this.environmentService.appNameLong, message:i.localize(23,null),detail:i.localize(24,null),noLink:!0,type:"warning",buttons:c.map(function(e){return e.label}),cancelId:c.indexOf(s)};return I.isLinux&&(u.defaultId=2),this.windowsMainService.showMessageBox(u,e).then(function(o){switch(c[o.button].result){case n.CANCEL:return!0;case n.DONT_SAVE:return r.workspacesMainService.deleteUntitledWorkspaceSync(t),!1;case n.SAVE:return r.windowsMainService.showSaveDialog({buttonLabel:W.mnemonicButtonLabel(i.localize(25,null)),title:i.localize(26,null),filters:O.WORKSPACE_FILTER,defaultPath:r.getUntitledWorkspaceSaveDialogDefaultPath(t)},e).then(function(e){return!e||r.workspacesMainService.saveWorkspace(t,e).then(function(){return!1},function(){return!1})})}})},e.prototype.getUntitledWorkspaceSaveDialogDefaultPath=function(e){if(e){if(O.isSingleFolderWorkspaceIdentifier(e))return n.dirname(e);var t=this.workspacesMainService.resolveWorkspaceSync(e.configPath);if(t&&t.folders.length>0)for(var r=0,i=t.folders;r<i.length;r++){var o=i[r] ;if(o.uri.scheme===x.Schemas.file)return n.dirname(o.uri.fsPath)}}},e}()}),define(e[126],t([0,1,2,15,44,135,14,6]),function(e,t,n,r,s,u,l,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=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){return void 0===t&&(t=s.request),i(this,void 0,n.TPromise,function(){var n,i,a,s,c;return o(this,function(o){switch(o.label){case 0:return this.logService.trace("RequestService#request",e.url),n=this,i=n.proxyUrl,a=n.strictSSL,s=e,(c=e.agent)?[3,2]:[4,u.getProxyAgent(e.url,{proxyUrl:i,strictSSL:a})];case 1:c=o.sent(),o.label=2;case 2:return s.agent=c,e.strictSSL=a, this.authorization&&(e.headers=r.assign(e.headers||{},{"Proxy-Authorization":this.authorization})),[2,t(e)]}})})},e=a([c(0,l.IConfigurationService),c(1,d.ILogService)],e)}();t.RequestService=p}),define(e[124],t([0,1,44,126,15,10]),function(e,t,r,i,o,a){"use strict";function s(e){return a.net.request}Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.request=function(t){return e.prototype.request.call(this,t,function(e){return r.request(o.assign({},e||{},{getRawRequest:s}))})},t}(i.RequestService);t.RequestService=c}),define(e[122],t([0,1,16,14,31,37,28,30,11,6,53,44,2,10]),function(e,t,r,i,o,s,u,l,d,p,f,h,v,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,i,o,a)||this;return s.telemetryService=r,s}return n(t,e),t.prototype.buildUpdateFeedUrl=function(e){return f.createUpdateURL("linux-"+process.arch,e)}, t.prototype.doCheckForUpdates=function(e){var t=this;this.url&&(this.setState(u.State.CheckingForUpdates(e)),this.requestService.request({url:this.url}).then(h.asJson).then(function(n){n&&n.url&&n.version&&n.productVersion?t.setState(u.State.AvailableForDownload(n)):(t.telemetryService.publicLog("update:notAvailable",{explicit:!!e}),t.setState(u.State.Idle))}).then(null,function(n){t.logService.error(n),t.telemetryService.publicLog("update:notAvailable",{explicit:!!e}),t.setState(u.State.Idle)}))},t.prototype.doDownloadUpdate=function(e){return r.default.downloadUrl&&r.default.downloadUrl.length>0?g.shell.openExternal(r.default.downloadUrl):g.shell.openExternal(e.update.url),this.setState(u.State.Idle),v.TPromise.as(null)},t=a([c(0,o.ILifecycleService),c(1,i.IConfigurationService),c(2,l.ITelemetryService),c(3,d.IEnvironmentService),c(4,s.IRequestService),c(5,p.ILogService)],t)}(f.AbstractUpdateService);t.LinuxUpdateService=m}), define(e[118],t([0,1,56,9,35,48,14,31,37,16,2,28,30,11,6,53,44,148,26,49,10]),function(e,t,r,i,o,s,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C){"use strict";function k(){return void 0===P&&(P=r.existsSync(i.join(i.dirname(process.execPath),"unins000.exe"))?E.Automatic:E.Manual),P}Object.defineProperty(t,"__esModule",{value:!0});var E;!function(e){e[e.Automatic=0]="Automatic",e[e.Manual=1]="Manual"}(E||(E={}));var P=void 0,I=function(t){function P(e,n,r,i,o,a){var s=t.call(this,e,n,i,o,a)||this;return s.telemetryService=r,s}return n(P,t),Object.defineProperty(P.prototype,"cachePath",{get:function(){var e=i.join(S.tmpdir(),"vscode-update-"+p.default.target+"-"+process.arch);return o.mkdirp(e,null).then(function(){return e})},enumerable:!0,configurable:!0}),P.prototype.buildUpdateFeedUrl=function(e){var t="win32";return"x64"===process.arch&&(t+="-x64"),k()===E.Manual?t+="-archive":"user"===p.default.target&&(t+="-user"),y.createUpdateURL(t,e)},P.prototype.doCheckForUpdates=function(e){var t=this ;this.url&&(this.setState(h.State.CheckingForUpdates(e)),this.requestService.request({url:this.url}).then(w.asJson).then(function(n){return n&&n.url&&n.version&&n.productVersion?k()===E.Manual?(t.setState(h.State.AvailableForDownload(n)),f.TPromise.as(null)):(t.setState(h.State.Downloading(n)),t.cleanup(n.version).then(function(){return t.getUpdatePackagePath(n.version).then(function(e){return o.exists(e).then(function(r){if(r)return f.TPromise.as(e);var i=n.url,a=n.hash,s=e+".tmp";return t.requestService.request({url:i}).then(function(e){return w.download(s,e)}).then(a?function(){return b.checksum(s,n.hash)}:function(){return null}).then(function(){return o.rename(s,e)}).then(function(){return e})})}).then(function(e){var r=t.configurationService.getValue("update.enableWindowsBackgroundUpdates");t.availableUpdate={packagePath:e},r&&n.supportsFastUpdate?"user"===p.default.target?t.doApplyUpdate():t.setState(h.State.Downloaded(n)):t.setState(h.State.Ready(n))}) })):(t.telemetryService.publicLog("update:notAvailable",{explicit:!!e}),t.setState(h.State.Idle),f.TPromise.as(null))}).then(null,function(n){t.logService.error(n),t.telemetryService.publicLog("update:notAvailable",{explicit:!!e}),t.setState(h.State.Idle)}))},P.prototype.doDownloadUpdate=function(e){return C.shell.openExternal(e.update.url),this.setState(h.State.Idle),f.TPromise.as(null)},P.prototype.getUpdatePackagePath=function(e){return this.cachePath.then(function(t){return i.join(t,"CodeSetup-"+p.default.quality+"-"+e+".exe")})},P.prototype.cleanup=function(e){void 0===e&&(e=null);var t=e?function(t){return!new RegExp(p.default.quality+"-"+e+"\\.exe$").test(t)}:function(){return!0};return this.cachePath.then(function(e){return o.readdir(e).then(function(n){return f.Promise.join(n.filter(t).map(function(t){return o.unlink(i.join(e,t)).then(null,function(){return null})}))})})},P.prototype.doApplyUpdate=function(){var t=this ;if(this.state.type!==h.StateType.Downloaded&&this.state.type!==h.StateType.Downloading)return f.TPromise.as(null);if(!this.availableUpdate)return f.TPromise.as(null);var n=this.state.update;return this.setState(h.State.Updating(n)),this.cachePath.then(function(r){return t.availableUpdate.updateFilePath=i.join(r,"CodeSetup-"+p.default.quality+"-"+n.version+".flag"),o.writeFile(t.availableUpdate.updateFilePath,"flag").then(function(){_.spawn(t.availableUpdate.packagePath,["/verysilent",'/update="'+t.availableUpdate.updateFilePath+'"',"/nocloseapplications","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"],windowsVerbatimArguments:!0}).once("exit",function(){t.availableUpdate=void 0,t.setState(h.State.Idle)});var r=p.default.win32MutexName+"-ready",i=e.__$__nodeRequire("windows-mutex").isActive;(function(e,t){return void 0===t&&(t=1e3),new f.TPromise(function(n){var r=function(){e()?n(null):setTimeout(r,t)};r()})})(function(){return i(r)}).then(function(){ return t.setState(h.State.Ready(n))})})})},P.prototype.doQuitAndInstall=function(){this.state.type===h.StateType.Ready&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.state.update.supportsFastUpdate&&this.availableUpdate.updateFilePath?r.unlinkSync(this.availableUpdate.updateFilePath):_.spawn(this.availableUpdate.packagePath,["/silent","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"]}))},a([s.memoize],P.prototype,"cachePath",null),P=a([c(0,l.ILifecycleService),c(1,u.IConfigurationService),c(2,v.ITelemetryService),c(3,g.IEnvironmentService),c(4,d.IRequestService),c(5,m.ILogService)],P)}(y.AbstractUpdateService);t.Win32UpdateService=I}), define(e[91],t([0,1,10,3,155,23,151,157,31,110,28,141,119,50,116,52,4,54,51,6,32,11,14,46,145,30,138,136,137,139,43,16,45,153,13,2,22,38,20,65,61,12,168,19,72,118,122,150,105,106,165,112,25,156,173,114,166,115,161]),function(e,t,n,r,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C,k,E,P,I,M,O,T,W,x,L,D,A,F,R,U,N,B,z,j,K,V,q,H,G,Y,J,Q,$,X,Z,ee,te,ne,re,ie,oe,ae,se,ce,ue){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var le=function(){function t(e,t,n,r,i,o,a,s,c){this.mainIpcServer=e,this.userEnv=t,this.instantiationService=n,this.logService=r,this.environmentService=i,this.lifecycleService=o,this.configurationService=a,this.stateService=s,this.historyMainService=c,this.toDispose=[e,a],this.registerListeners()}return t.prototype.registerListeners=function(){var e=this;re.setUnexpectedErrorHandler(function(t){return e.onUnexpectedError(t)}),process.on("uncaughtException",function(t){return e.onUnexpectedError(t)}),n.app.on("will-quit",function(){e.logService.trace("App#will-quit: disposing resources"),e.dispose() }),n.app.on("accessibility-support-changed",function(t,n){e.windowsMainService&&e.windowsMainService.sendToAll("vscode:accessibilitySupportChanged",n)}),n.app.on("activate",function(t,n){e.logService.trace("App#activate"),!n&&e.windowsMainService&&e.windowsMainService.openNewWindow(l.OpenContext.DOCK)});var t=function(t){if(!t)return!1;if("data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVirtual%20Document%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%20style%3D%22margin%3A%200%3B%20overflow%3A%20hidden%3B%20width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E"===t)return!0;return H.default.parse(t.toLowerCase()).toString().startsWith(H.default.file(e.environmentService.appRoot.toLowerCase()).toString())};n.app.on("web-contents-created",function(n,r){r.on("will-attach-webview",function(n,r,i){delete r.preload,r.nodeIntegration=!1, t(i.src)&&t(r.preloadURL)||(e.logService.error("webContents#web-contents-created: Prevented webview attach"),n.preventDefault())}),r.on("will-navigate",function(t){e.logService.error("webContents#will-navigate: Prevented webcontent navigation"),t.preventDefault()})});var r=[],i=null;n.app.on("open-file",function(t,n){e.logService.trace("App#open-file: ",n),t.preventDefault(),r.push(n),null!==i&&(clearTimeout(i),i=null),i=setTimeout(function(){e.windowsMainService&&(e.windowsMainService.open({context:l.OpenContext.DOCK,cli:e.environmentService.args,pathsToOpen:r,preferNewWindow:!0}),r=[],i=null)},100)}),n.app.on("new-window-for-tab",function(){e.windowsMainService.openNewWindow(l.OpenContext.DESKTOP)}),n.ipcMain.on("vscode:exit",function(t,n){e.logService.trace("IPC#vscode:exit",n),e.dispose(),e.lifecycleService.kill(n)}),n.ipcMain.on("vscode:fetchShellEnv",function(t){var n=t.sender.webContents;h.getShellEnvironment().then(function(e){n.isDestroyed()||n.send("vscode:acceptShellEnv",e)},function(t){ n.isDestroyed()||n.send("vscode:acceptShellEnv",{}),e.logService.error("Error fetching shell env",t)})}),n.ipcMain.on("vscode:broadcast",function(t,n,r){e.windowsMainService&&r.channel&&!K.isUndefinedOrNull(r.payload)&&(e.logService.trace("IPC#vscode:broadcast",r.channel,r.payload),e.onBroadcast(r.channel,r.payload),e.windowsMainService.sendToAll("vscode:broadcast",r,[n]))}),q.KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(function(){e.windowsMainService&&e.windowsMainService.sendToAll("vscode:keyboardLayoutChanged",!1)})},t.prototype.onUnexpectedError=function(e){if(e){var t={message:e.message,stack:e.stack};this.windowsMainService&&this.windowsMainService.sendToFocused("vscode:reportError",JSON.stringify(t))}this.logService.error("[uncaught exception in main]: "+e),e.stack&&this.logService.error(e.stack)},t.prototype.onBroadcast=function(e,t){if("vscode:changeColorTheme"===e&&"string"==typeof t){var n=JSON.parse(t);this.stateService.setItem(V.CodeWindow.themeStorageKey,n.id), this.stateService.setItem(V.CodeWindow.themeBackgroundStorageKey,n.background)}},t.prototype.startup=function(){var e=this;this.logService.debug("Starting VS Code"),this.logService.debug("from: "+this.environmentService.appRoot),this.logService.debug("args:",this.environmentService.args),r.isWindows&&F.default.win32AppUserModelId&&n.app.setAppUserModelId(F.default.win32AppUserModelId);try{r.isMacintosh&&!0===this.configurationService.getValue("window.nativeTabs")&&!n.systemPreferences.getUserDefault("NSUseImprovedLayoutPass","boolean")&&n.systemPreferences.setUserDefault("NSUseImprovedLayoutPass","boolean",!0)}catch(e){this.logService.error(e)}return this.electronIpcServer=new m.Server,this.logService.trace("Resolving machine identifier..."),this.resolveMachineId().then(function(t){e.logService.trace("Resolved machine identifier: "+t),e.sharedProcess=new w.SharedProcess(e.environmentService,e.lifecycleService,e.logService,t,e.userEnv),e.sharedProcessClient=e.sharedProcess.whenReady().then(function(){ return y.connect(e.environmentService.sharedIPCHandle,"main")});var n=e.initServices(t),r=B.TPromise.as(null);return e.environmentService.driverHandle&&oe.serve(e.electronIpcServer,e.environmentService.driverHandle,e.environmentService,n).then(function(t){e.logService.info("Driver started at:",e.environmentService.driverHandle),e.toDispose.push(t)}),r.then(function(){var t=n.createInstance(U.ProxyAuthHandler);e.toDispose.push(t),n.invokeFunction(function(t){return e.openFirstWindow(t)}),n.invokeFunction(function(t){return e.afterWindowOpen(t)})})})},t.prototype.resolveMachineId=function(){var e=this,n=this.stateService.getItem(t.MACHINE_ID_KEY);return n?B.TPromise.wrap(n):J.getMachineId().then(function(n){return e.stateService.setItem(t.MACHINE_ID_KEY,n),n})},t.prototype.initServices=function(e){var t=new _.ServiceCollection ;if("win32"===process.platform?t.set(v.IUpdateService,new C.SyncDescriptor(Q.Win32UpdateService)):"linux"===process.platform?t.set(v.IUpdateService,new C.SyncDescriptor($.LinuxUpdateService)):"darwin"===process.platform&&t.set(v.IUpdateService,new C.SyncDescriptor(X.DarwinUpdateService)),t.set(z.IWindowsMainService,new C.SyncDescriptor(u.WindowsManager,e)),t.set(l.IWindowsService,new C.SyncDescriptor(p.WindowsService,this.sharedProcess)),t.set(b.ILaunchService,new C.SyncDescriptor(b.LaunchService)),t.set(Z.IIssueService,new C.SyncDescriptor(te.IssueService,e,this.userEnv)),t.set(ae.IMenubarService,new C.SyncDescriptor(se.MenubarService)),this.environmentService.isBuilt&&!this.environmentService.isExtensionDevelopment&&!this.environmentService.args["disable-telemetry"]&&F.default.enableTelemetry){var n=A.getDelayedChannel(this.sharedProcessClient.then(function(e){return e.getChannel("telemetryAppender")})),r={appender:new x.TelemetryAppenderClient(n), commonProperties:D.resolveCommonProperties(F.default.commit,R.default.version,e,this.environmentService.installSourcePath),piiPaths:[this.environmentService.appRoot,this.environmentService.extensionsPath]};t.set(T.ITelemetryService,new C.SyncDescriptor(L.TelemetryService,r))}else t.set(T.ITelemetryService,W.NullTelemetryService);return this.instantiationService.createChild(t)},t.prototype.openFirstWindow=function(e){var t=e.get(S.IInstantiationService),n=e.get(b.ILaunchService),a=new b.LaunchChannel(n);this.mainIpcServer.registerChannel("launch",a);var c=e.get(v.IUpdateService),u=new g.UpdateChannel(c);this.electronIpcServer.registerChannel("update",u);var p=e.get(Z.IIssueService),f=new ee.IssueChannel(p);this.electronIpcServer.registerChannel("issue",f);var h=e.get(Y.IWorkspacesMainService),m=t.createInstance(G.WorkspacesChannel,h);this.electronIpcServer.registerChannel("workspaces",m);var y=e.get(l.IWindowsService),w=new d.WindowsChannel(y);this.electronIpcServer.registerChannel("windows",w), this.sharedProcessClient.done(function(e){return e.registerChannel("windows",w)});var _=e.get(ae.IMenubarService),C=new ce.MenubarChannel(_);this.electronIpcServer.registerChannel("menubar",C);var E=e.get(M.IURLService),I=new O.URLServiceChannel(E);this.electronIpcServer.registerChannel("url",I);var T=new ne.LogLevelSetterChannel(e.get(k.ILogService));this.electronIpcServer.registerChannel("loglevel",T),this.sharedProcessClient.done(function(e){return e.registerChannel("loglevel",T)}),this.lifecycleService.ready();var W=this.windowsMainService=e.get(z.IWindowsMainService),x=this.environmentService.args,L=new l.ActiveWindowManager(y),D=this.electronIpcServer.getChannel("urlHandler",{route:function(){return L.activeClientId}}),A=new O.URLHandlerChannelClient(D);if(r.isMacintosh){var F=e.get(P.IEnvironmentService);E.registerHandler({handleURL:function(e){return i(this,void 0,B.TPromise,function(){var t,n;return o(this,function(r){return 0===W.getWindowCount()?(t=s({},F.args,{goto:!0}),n=W.open({ context:l.OpenContext.API,cli:t,forceEmpty:!0})[0],[2,n.ready().then(function(){return E.open(e)})]):[2,!1]})})}})}E.registerHandler(A);var R=x["open-url"]?x._urls:[],U=new ie.ElectronURLListener(R,E,this.windowsMainService);this.toDispose.push(U),this.windowsMainService.ready(this.userEnv);var N=global.macOpenFiles,j=process.env.VSCODE_CLI?l.OpenContext.CLI:l.OpenContext.DESKTOP;x["new-window"]&&0===x._.length?this.windowsMainService.open({context:j,cli:x,forceNewWindow:!0,forceEmpty:!0,initialStartup:!0}):!N||!N.length||x._&&x._.length?this.windowsMainService.open({context:j,cli:x,forceNewWindow:x["new-window"]||!x._.length&&x["unity-launch"],diffMode:x.diff,initialStartup:!0}):this.windowsMainService.open({context:l.OpenContext.DOCK,cli:x,pathsToOpen:N,initialStartup:!0})},t.prototype.afterWindowOpen=function(t){var n=this,i=t.get(z.IWindowsMainService),o=null;if(r.isWindows){try{var a=e.__$__nodeRequire("windows-mutex").Mutex;o=new a(F.default.win32MutexName),this.toDispose.push({dispose:function(){ return o.release()}})}catch(e){this.environmentService.isBuilt||i.showMessageBox({title:F.default.nameLong,type:"warning",message:"Failed to load windows-mutex!",detail:e.toString(),noLink:!0})}try{e.__$__nodeRequire("windows-foreground-love")}catch(e){this.environmentService.isBuilt||i.showMessageBox({title:F.default.nameLong,type:"warning",message:"Failed to load windows-foreground-love!",detail:e.toString(),noLink:!0})}}var s=t.get(S.IInstantiationService),c=t.get(I.IConfigurationService);(r.isMacintosh||"custom"!==c.getValue("window.titleBarStyle"))&&s.createInstance(ue.CodeMenu),this.historyMainService.updateWindowsJumpList(),this.historyMainService.onRecentlyOpenedChange(function(){return n.historyMainService.updateWindowsJumpList()}),B.TPromise.timeout(3e3).then(function(){return n.sharedProcess.spawn()})},t.prototype.dispose=function(){this.toDispose=N.dispose(this.toDispose)},t.MACHINE_ID_KEY="telemetry.machineId", t=a([c(2,S.IInstantiationService),c(3,k.ILogService),c(4,P.IEnvironmentService),c(5,f.ILifecycleService),c(6,I.IConfigurationService),c(7,E.IStateService),c(8,j.IHistoryMainService)],t)}();t.CodeApplication=le}),define(e[185],t([0,1,10,15,3,16,9,59,35,73,31,50,2,52,104,54,51,6,133,32,60,163,11,123,14,74,37,124,46,146,56,91,164,38,170,19,7,29,113,67,111,120,25,96,90,143]),function(e,t,r,a,s,c,u,l,d,p,f,h,v,g,m,y,w,b,S,_,C,k,E,P,I,M,O,T,W,x,L,D,A,F,R,U,N,B,z,j,K,V,q,H,G){"use strict";function Y(e,t){var n=new y.ServiceCollection,r=new P.EnvironmentService(e,process.execPath),a=new b.ConsoleLogMainService(b.getLogLevel(r)),s=new b.MultiplexLogService([a,t]);return process.once("exit",function(){return s.dispose()}),setTimeout(function(){return function(e){return i(this,void 0,v.TPromise,function(){var t,n,r,i,a,s;return o(this,function(o){switch(o.label){case 0:return t=u.basename(e.logsPath),n=u.dirname(e.logsPath),[4,d.readdir(n)];case 1:return r=o.sent(),i=r.filter(function(e){return/^\d{8}T\d{6}$/.test(e)}), a=i.sort().filter(function(e,n){return e!==t}),s=a.slice(0,Math.max(0,a.length-9)),[4,v.TPromise.join(s.map(function(e){return d.rimraf(u.join(n,e))}))];case 2:return o.sent(),[2]}})})}(r).then(null,function(e){return console.error(e)})},1e4),n.set(E.IEnvironmentService,r),n.set(b.ILogService,s),n.set(U.IWorkspacesMainService,new w.SyncDescriptor(R.WorkspacesMainService)),n.set(F.IHistoryMainService,new w.SyncDescriptor(A.HistoryMainService)),n.set(f.ILifecycleService,new w.SyncDescriptor(f.LifecycleService)),n.set(_.IStateService,new w.SyncDescriptor(S.StateService)),n.set(I.IConfigurationService,new w.SyncDescriptor(M.ConfigurationService)),n.set(O.IRequestService,new w.SyncDescriptor(T.RequestService)),n.set(W.IURLService,new w.SyncDescriptor(x.URLService)),n.set(C.IBackupMainService,new w.SyncDescriptor(k.BackupMainService)),n.set(H.IDialogService,new w.SyncDescriptor(G.CommandLineDialogService)),new m.InstantiationService(n,!0)}function J(t){function n(t){return h.serve(o.mainIPCHandle).then(function(e){ if(o.args.status)throw i.warn("Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started."),new Z("Terminating...");if(void 0!==o.args["upload-logs"])throw i.warn("Warning: The --upload-logs argument can only be used if Code is already running. Please run it again after Code has started."),new Z("Terminating...");return s.isMacintosh&&r.app.dock.show(),process.env.VSCODE_PID=String(process.pid),e},function(u){return"EADDRINUSE"!==u.code?v.TPromise.wrapError(u):(s.isMacintosh&&r.app.dock.hide(),h.connect(o.mainIPCHandle,"main").then(function(t){if(o.extensionTestsPath&&!o.debugExtensionHost.break){var n="Running extension tests from the command line is currently only supported if no other instance of Code is running.";return i.error(n),t.dispose(),v.TPromise.wrapError(new Error(n))}var r;o.wait||o.status||o.args["upload-logs"]||(r=setTimeout(function(){Q(N.localize(0,null,c.default.nameShort),N.localize(1,null))},1e4)) ;var u=t.getChannel("launch"),l=new g.LaunchChannelClient(u);return o.args.status?l.getMainProcessInfo().then(function(e){return j.printDiagnostics(e).then(function(){return v.TPromise.wrapError(new Z)})}):void 0!==o.args["upload-logs"]?V.uploadLogs(u,a,o).then(function(){return v.TPromise.wrapError(new Z)}):(i.trace("Sending env to running instance..."),function(t){var n=v.TPromise.wrap(void 0);return s.isWindows&&(n=t.getMainProcessId().then(function(t){i.trace("Sending some foreground love to the running instance:",t);try{(0,e.__$__nodeRequire("windows-foreground-love").allowSetForegroundWindow)(t)}catch(e){}})),n}(l).then(function(){return l.start(o.args,process.env)}).then(function(){return t.dispose()}).then(function(){return r&&clearTimeout(r),v.TPromise.wrapError(new Z("Sent env to running instance. Terminating..."))}))},function(e){if(!t||s.isWindows||"ECONNREFUSED"!==e.code)return"EPERM"===e.code&&Q(N.localize(2,null,c.default.nameShort),N.localize(3,null)),v.TPromise.wrapError(e);try{ L.unlinkSync(o.mainIPCHandle)}catch(e){return i.warn("Could not delete obsolete instance handle",e),v.TPromise.wrapError(e)}return n(!1)}))})}var i=t.get(b.ILogService),o=t.get(E.IEnvironmentService),a=t.get(O.IRequestService);return n(!0)}function Q(e,t){r.dialog.showMessageBox({title:c.default.nameLong,type:"warning",buttons:[B.mnemonicButtonLabel(N.localize(4,null))],message:e,detail:t,noLink:!0})}function $(e,t){var n=e.get(b.ILogService),r=e.get(f.ILifecycleService),i=0;t&&(t.isExpected?t.message&&n.trace(t.message):(i=1,t.stack?n.error(t.stack):n.error("Startup error: "+t.toString()))),r.kill(i)}function X(){q.setUnexpectedErrorHandler(function(e){return console.error(e)});var e;try{e=l.parseMainProcessArgv(process.argv),e=p.validatePaths(e)}catch(e){return console.error(e.message),void r.app.exit(1)}var t=new K.BufferLogService,n=Y(e,t);return n.invokeFunction(function(e){var r=e.get(E.IEnvironmentService),i={VSCODE_IPC_HOOK:r.mainIPCHandle,VSCODE_NLS_CONFIG:process.env.VSCODE_NLS_CONFIG, VSCODE_LOGS:process.env.VSCODE_LOGS};return process.env.VSCODE_PORTABLE&&(i.VSCODE_PORTABLE=process.env.VSCODE_PORTABLE),a.assign(process.env,i),n.invokeFunction(function(e){return function(e){var t=[e.appSettingsHome,e.extensionsPath,e.nodeCachedDataDir,e.logsPath];return v.TPromise.join(t.map(function(e){return e&&d.mkdirp(e)}))}(e.get(E.IEnvironmentService))}).then(function(){return n.invokeFunction(J)}).then(function(e){return t.logger=z.createSpdLogService("main",t.getLevel(),r.logsPath),n.createInstance(D.CodeApplication,e,i).startup()})}).done(null,function(e){return n.invokeFunction($,e)})}Object.defineProperty(t,"__esModule",{value:!0});var Z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isExpected=!0,t}return n(t,e),t}(Error);X()})}).call(this); //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/0f080e5267e829de46638128001aeb7ca2d6d50e/core/vs\code\electron-main\main.js.map