/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){var e=["exports","require","vs/base/common/functional","vs/base/common/platform","vs/base/common/amd","vs/base/browser/browser","vs/base/common/strings","vs/base/common/uri","vs/base/common/lifecycle","vs/base/common/errors","vs/base/common/winjs.base","vs/base/common/event","vs/base/common/linkedList","vs/base/node/ps","vs/platform/node/product","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/contextmenu/electron-browser/contextmenu","electron","vs/css!vs/code/electron-browser/processExplorer/media/processExplorer","vs/css!vs/code/electron-browser/processExplorer/processExplorerMain","child_process","path","vs/code/electron-browser/processExplorer/processExplorerMain","os","vs/nls!vs/code/electron-browser/processExplorer/processExplorerMain"],t=function(t){for(var n=[],r=0,o=t.length;r<o;r++)n[r]=e[t[r]];return n};define(e[2],t([1,0]),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[8],t([1,0,2]),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.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(e){return{dispose:function(){e()}}};var o=function(){function e(){this._toDispose=[]}return Object.defineProperty(e.prototype,"toDispose",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._toDispose=r(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}();t.Disposable=o;var i=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 o=r.object,i=n.once(function(){0==--r.counter&&(t.destroyReferencedObject(r.object),delete t.references[e])});return r.counter++,{object:o,dispose:i}},e}();t.ReferenceCollection=i;var s=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=s}),define(e[12],t([1,0]),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,o=new n(e);if(this._first)if(t){var i=this._last;this._last=o,o.prev=i,i.next=o}else{var s=this._first;this._first=o,
o.next=s,s.prev=o}else this._first=o,this._last=o;return function(){for(var e=r._first;e instanceof n;e=e.next)if(e===o){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[3],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,r=!1,o=!1,i=!1,s=!1,a=void 0,u=void 0,c=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,
o="linux"===process.platform,a=t.LANGUAGE_DEFAULT,u=t.LANGUAGE_DEFAULT;var l=process.env.VSCODE_NLS_CONFIG;if(l)try{var f=JSON.parse(l),p=f.availableLanguages["*"];a=f.locale,u=p||t.LANGUAGE_DEFAULT,c=f._translationsConfigFile}catch(e){}i=!0}else if("object"==typeof navigator){var h=navigator.userAgent;n=h.indexOf("Windows")>=0,r=h.indexOf("Macintosh")>=0,o=h.indexOf("Linux")>=0,s=!0,u=a=navigator.language}var d;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(d=t.Platform||(t.Platform={}));var v=d.Web;i&&(r?v=d.Mac:n?v=d.Windows:o&&(v=d.Linux)),t.isWindows=n,t.isMacintosh=r,t.isLinux=o,t.isNative=i,t.isWeb=s,t.platform=v,t.isRootUser=function(){return i&&!n&&0===process.getuid()},t.language=u,t.locale=a,t.translationsConfigFile=c;var m="object"==typeof self?self:"object"==typeof global?global:{};t.globals=m;var _=null;t.setImmediate=function(e){
return null===_&&(_=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)),_(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[6],t([1,0]),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 o(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var o=r,i=-1;;){if(-1===(i=e.lastIndexOf(t,o-1))||i+n!==o)break;if(0===i)return"";o=i}return e.substring(0,o)}function i(e,t){return e<t?-1:e>t?1:0}
function s(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function u(e){return s(e)||a(e)}function c(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 o=e.charCodeAt(r),i=t.charCodeAt(r);if(o!==i)if(u(o)&&u(i)){var s=Math.abs(o-i);if(0!==s&&32!==s)return!1}else if(String.fromCharCode(o).toLowerCase()!==String.fromCharCode(i).toLowerCase())return!1}return!0}function l(e,t,n,r,o,i){for(;t<n&&o<i;){if(e[t]!==r[o])return!1;t+=1,o+=1}return!0}function f(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,o=[r],i=r.length;i<t;i++)o.push(n);return o.reverse().join("")};var h=/{(\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(h,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"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),o(r(e,t),t)},t.ltrim=r,t.rtrim=o,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 o=""
;return r.global&&(o+="g"),r.matchCase||(o+="i"),r.multiline&&(o+="m"),new RegExp(e,o)},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 o=e.charCodeAt(r);if(32!==o&&9!==o)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=i,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var o=e.charCodeAt(r),u=t.charCodeAt(r);if(o!==u){a(o)&&(o+=32),a(u)&&(u+=32);var c=o-u
;if(0!==c)return s(o)&&s(u)?c:i(e.toLowerCase(),t.toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=s,t.isUpperAsciiLetter=a,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&c(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&c(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),o=e.length-1,i=t.length-1;for(n=0;n<r;n++)if(e.charCodeAt(o-n)!==t.charCodeAt(i-n))return n;return r},t.overlap=function(e,t){var n=e.length,r=t.length,o=n-r;if(0===o)return e===t?n:0;for(o<0&&(r+=o,o=0);o<n&&r>0;){if(l(e,o,n,t,0,r))return r;r-=1,o+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343}
;var d=/(?:[\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 d.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 m=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return m.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t<n;t++)if(f(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=f,t.lcut=function(e,n){if(e.length<n)return e
;for(var r=/\b/g,o=0;r.test(e)&&!(e.length-r.lastIndex<n);)o=r.lastIndex,r.lastIndex+=1;return e.substring(o).replace(/^\s/,t.empty)};var _=/\x1B\x5B[12]?K/g,g=/\x1b\[\d+m/g,y=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(_,"")).replace(g,"")).replace(y,"")),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(),o=0,i=-1;o<n;){var s=r.indexOf(t[o],i+1);if(s<0)return!1;i=s,o++}return!0},t.containsUppercaseCharacter=function(e,t){return void 0===t&&(t=!1),!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)},t.uppercaseFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}});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[7],t([1,0,3]),function(e,t,r){"use strict";function o(e,t){for(var n=void 0,r=-1,o=0;o<e.length;o++){var i=e.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||t&&47===i)-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=m[i];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),n+=s):-1===r&&(r=o)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function i(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 s(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+=m[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}:o,r="",i=e.scheme,s=e.authority,a=e.path,u=e.query,c=e.fragment;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=p,r+=p),s){var l=s.indexOf("@");if(-1!==l){var f=s.substr(0,l);s=s.substr(l+1),-1===(l=f.indexOf(":"))?r+=n(f,!1):(r+=n(f.substr(0,l),!1),r+=":",r+=n(f.substr(l+1),!1)),r+="@"}-1===(l=(s=s.toLowerCase()).indexOf(":"))?r+=n(s,!1):(r+=n(s.substr(0,l),!1),r+=s.substr(l))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){
(h=a.charCodeAt(1))>=65&&h<=90&&(a="/"+String.fromCharCode(h+32)+":"+a.substr(3))}else if(a.length>=2&&58===a.charCodeAt(1)){var h=a.charCodeAt(0);h>=65&&h<=90&&(a=String.fromCharCode(h+32)+":"+a.substr(2))}r+=n(a,!0)}return u&&(r+="?",r+=n(u,!1)),c&&(r+="#",r+=t?c:o(c,!1)),r}Object.defineProperty(t,"__esModule",{value:!0});var a,u=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//,f="",p="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function e(e,t,n,r,o){"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=e||f,this.authority=t||f,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||f),this.query=r||f,this.fragment=o||f,function(e){if(e.scheme||console.warn('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}'),
e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.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 i(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,o=e.query,i=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),
void 0===o?o=this.query:null===o&&(o=f),void 0===i?i=this.fragment:null===i&&(i=f),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new v(t,n,r,o,i)},e.parse=function(e){var t=h.exec(e);return t?new v(t[2]||f,decodeURIComponent(t[4]||f),decodeURIComponent(t[5]||f),decodeURIComponent(t[7]||f),decodeURIComponent(t[9]||f)):new v(f,f,f,f,f)},e.file=function(e){var t=f;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,f,f)},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),s(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.URI=d,t.default=d;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=i(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?s(this,!0):(this._formatted||(this._formatted=s(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}(d),m=(a={},a[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a)}),define(e[4],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.getPathFromAmdModule=function(e,t){return n.default.parse(e.toUrl(t)).fsPath}});var r;!function(){var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,r){var o={},i=!1,s=n.map(function(t){return"exports"===t?(i=!0,o):e[t]}),a=r.apply({},s);e[t]=i?o:a};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 o(e,t,n){var r,o,i,s=Object.keys(t),a=Array.isArray(e);for(o=0,i=s.length;o<i;o++){var u=s[o],c=95!==u.charCodeAt(0),l=t[u];!l||"object"!=typeof l||void 0===l.value&&"function"!=typeof l.get&&"function"!=typeof l.set?c?a?e.forEach(function(e){e[u]=l}):e[u]=l:(r=r||{})[u]={value:l,enumerable:c,configurable:!0,writable:!0}:(void 0===l.enumerable&&(l.enumerable=c),n&&l.setName&&"function"==typeof l.setName&&l.setName(n+"."+u),(r=r||{})[u]=l)}r&&(a?e.forEach(function(e){Object.defineProperties(e,r)}):Object.defineProperties(e,r))}return function(){function n(n,r){var o=n||{};if(r){var i=r.split(".");o===t&&"WinJS"===i[0]&&(o=e,i.splice(0,1));for(var s=0,a=i.length;s<a;s++){var u=i[s];o[u]||Object.defineProperty(o,u,{value:{},writable:!1,enumerable:!0,configurable:!0}),o=o[u]}}return o}function i(e,t,r){var i=n(e,t);return r&&o(i,r,t||"<ANONYMOUS>"),i}
var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{defineWithParent:{value:i,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return i(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,o=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(o){case a.initialized:return n;case a.uninitialized:o=a.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),o=a.uninitialized}return e=null,o=a.initialized,n;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(o){case a.working:throw"Illegal: reentrancy on initialization";default:o=a.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,r,i){var s=[e],a=null;return r&&(a=n(t,r),s.push(a)),o(s,i,r||"<ANONYMOUS>"),a},
writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),r&&o(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,i,s){if(e){r=r||function(){};var a=e.prototype;return r.prototype=Object.create(a),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),i&&o(r.prototype,i),s&&o(r,s),r}return t(r,i,s)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)o(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}),o={_listeners:null,addEventListener:function(e,t,n){n=n||!1,
this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],o=0,i=r.length;o<i;o++){var s=r[o];if(s.useCapture===n&&s.listener===t)return}r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){for(var o=new r(e,t,this),i=0,s=(n=n.slice(0,n.length)).length;i<s&&!o._stopImmediatePropagationCalled;i++)n[i].listener(o);return o.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var o=0,i=r.length;o<i;o++){var s=r[o];if(s.listener===t&&s.useCapture===n){r.splice(o,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 o=arguments[t];e["on"+o]=n(o)}return e},eventMixin:o})}),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,o,i){"use strict";function s(){}function a(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?O:I,e._value=t,e._setState(n)}function u(e,t,n,r,o,i){return{exception:e,error:t,promise:n,handler:i,id:r,parent:o}}function c(e,t,n,r){var o=n._isException,i=n._errorId
;return u(o?t:null,o?null:t,e,i,n,r)}function l(e,t,n){var r=n._isException,o=n._errorId;return b(e,o,r),u(r?t:null,r?null:t,e,o,n)}function f(e,t){var n=++U;return b(e,n),u(null,t,e,n)}function p(e,t){var n=++U;return b(e,n,!0),u(t,null,e,n)}function h(e,t,n,r){y(e,{c:t,e:n,p:r,asyncOpID:i._traceAsyncOperationStarting("WinJS.Promise.done")})}function d(e,t,n,r){e._value=t,_(e,t,n,r),e._setState(j)}function v(t,n){var r=t._value,o=t._listeners;if(o){t._listeners=null;var s,a;for(s=0,a=Array.isArray(o)?o.length:1;s<a;s++){var u=1===a?o:o[s],c=u.c,l=u.promise;if(i._traceAsyncOperationCompleted(u.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),l){i._traceAsyncCallbackStarting(u.asyncOpID);try{l._setCompleteValue(c?c(r):r)}catch(e){l._setExceptionValue(e)}finally{i._traceAsyncCallbackCompleted()}l._state!==O&&l._listeners&&n.push(l)}else Z.prototype.done.call(t,c)}}}function m(t,n){var r=t._value,o=t._listeners;if(o){t._listeners=null;var s,a;for(s=0,a=Array.isArray(o)?o.length:1;s<a;s++){
var u=1===a?o:o[s],l=u.e,f=u.promise,p=e.Debug&&(r&&r.name===A?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(i._traceAsyncOperationCompleted(u.asyncOpID,p),f){var h=!1;try{l?(i._traceAsyncCallbackStarting(u.asyncOpID),h=!0,l.handlesOnError||_(f,r,c,t,l),f._setCompleteValue(l(r))):f._setChainedErrorValue(r,t)}catch(e){f._setExceptionValue(e)}finally{h&&i._traceAsyncCallbackCompleted()}f._state!==O&&f._listeners&&n.push(f)}else z.prototype.done.call(t,null,l)}}}function _(e,t,n,r,o){if(x._listeners[S]){if(t instanceof Error&&t.message===A)return;x.dispatchEvent(S,n(e,t,r,o))}}function g(e,t){var n=e._listeners;if(n){var r,o;for(r=0,o=Array.isArray(n)?n.length:1;r<o;r++){var i=1===o?n:n[r],s=i.p;if(s)try{s(t)}catch(e){}i.c||i.e||!i.promise||i.promise._progress(t)}}}function y(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 E(e,t,n,r){e._value=t,_(e,t,n,r),e._setState(M)}function C(e,t){var n
;n=t&&"object"==typeof t&&"function"==typeof t.then?O:W,e._value=t,e._setState(n)}function w(e,t,n,r){var o=new J(e);return y(e,{promise:o,c:t,e:n,p:r,asyncOpID:i._traceAsyncOperationStarting("WinJS.Promise.then")}),o}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var x=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),o.eventMixin));x._listeners={};var S="error",A="Canceled",D=!1,L={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};L.all=L.promise|L.thenPromise|L.errorPromise|L.exceptionPromise|L.completePromise;var P,F,O,k,N,T,I,W,j,M,U=1;P={name:"created",enter:function(e){e._setState(F)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},F={name:"working",enter:s,cancel:function(e){e._setState(N)},done:h,then:w,_completed:a,_error:d,_notify:s,_progress:g,_setCompleteValue:C,_setErrorValue:E},O={name:"waiting",enter:function(e){var t=e._value;if(t instanceof J&&t._state!==M&&t._state!==W)y(t,{promise:e
});else{var n=function(r){t._errorId?e._chainedError(r,t):(_(e,r,c,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(k)},done:h,then:w,_completed:a,_error:d,_notify:s,_progress:g,_setCompleteValue:C,_setErrorValue:E},k={name:"waiting_canceled",enter:function(e){e._setState(T);var t=e._value;t.cancel&&t.cancel()},cancel:s,done:h,then:w,_completed:a,_error:d,_notify:s,_progress:g,_setCompleteValue:C,_setErrorValue:E},N={name:"canceled",enter:function(e){e._setState(T),e._cancelAction()},cancel:s,done:h,then:w,_completed:a,_error:d,_notify:s,_progress:g,_setCompleteValue:C,_setErrorValue:E},T={name:"canceling",enter:function(e){var t=new Error(A);t.name=t.message,e._value=t,e._setState(j)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},I={name:"complete_notify",enter:function(e){if(e.done=Z.prototype.done,e.then=Z.prototype.then,
e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(W)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:v,_progress:s,_setCompleteValue:s,_setErrorValue:s},W={name:"success",enter:function(e){e.done=Z.prototype.done,e.then=Z.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:v,_progress:s,_setCompleteValue:s,_setErrorValue:s},j={name:"error_notify",enter:function(e){if(e.done=z.prototype.done,e.then=z.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(M)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:m,_progress:s,_setCompleteValue:s,_setErrorValue:s},M={name:"error",enter:function(e){e.done=z.prototype.done,e.then=z.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:m,_progress:s,_setCompleteValue:s,_setErrorValue:s};var R,B=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,r){if(this.then===e)return this._state.then(this,t,n,r);this.then(t,n,r)},_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,f);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(B,function(e){
D&&(!0===D||D&L.thenPromise)&&(this._stack=H._getStack()),this._creator=e,this._setState(P),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),z=n.Class.define(function(e){D&&(!0===D||D&L.errorPromise)&&(this._stack=H._getStack()),this._value=e,_(this,e,f)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||_(null,n,c,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===A||H._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||_(null,r,c,this,t),n=new Z(t(r))}catch(e){n=e===r?this:new V(e)}return n}},{supportedForProcessing:!1}),V=n.Class.derive(z,function(e){D&&(!0===D||D&L.exceptionPromise)&&(this._stack=H._getStack()),this._value=e,_(this,e,p)},{},{supportedForProcessing:!1}),Z=n.Class.define(function(e){
if(D&&(!0===D||D&L.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 Z(t)}catch(e){return new V(e)}}},{supportedForProcessing:!1}),H=n.Class.derive(B,function(e,t){D&&(!0===D||D&L.promise)&&(this._stack=H._getStack()),this._oncancel=t,this._setState(P),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;x.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){
x.addEventListener(e,t,n)},any:function(e){return new H(function(t,n){var r=Object.keys(e);0===r.length&&t();var o=0;r.forEach(function(i){H.as(e[i]).then(function(){t({key:i,value:e[i]})},function(s){s instanceof Error&&s.name===A?++o===r.length&&t(H.cancel):n({key:i,value:e[i]})})})},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 Z(e)},cancel:{get:function(){return R=R||new z(new r(A))}},dispatchEvent:function(e,t){return x.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 o=Object.keys(e),i=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},a=0,u=o.length,c=function(e){if(0==--u){var a=Object.keys(i).length;if(0===a)t(s);else{var c=0;o.forEach(function(e){var t=i[e];t instanceof Error&&t.name===A&&c++}),c===a?t(H.cancel):n(i)}}else r({Key:e,Done:!0})};o.forEach(function(t){var n=e[t]
;void 0===n?a++:H.then(n,function(e){s[t]=e,c(t)},function(e){i[t]=e,c(t)})}),0!==(u-=a)||t(s)},function(){Object.keys(e).forEach(function(t){var n=H.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){x.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 o=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(i){o[i]=H.as(e[i]).then(t,n,r)}),H.join(o)},timeout:function(n,r){var o=function(n){var r;return new H(function(o){n?r=e.setTimeout(o,n):t._setImmediate(o)},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}(o,r):o},wrap:function(e){return new Z(e)},wrapError:function(e){return new z(e)},_veryExpensiveTagWithStack:{get:function(){return D},set:function(e){D=e}},_veryExpensiveTagWithStack_tag:L,_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,o=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)}),o}});return Object.defineProperties(H,o.createEventProperties(S)),H._doneHandler=function(e){t._setImmediate(function(){throw e})},{PromiseStateMachine:B,Promise:H,state_created:P}}),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}(),define(e[9],t([1,0,10]),function(e,t,n){"use strict";function r(e){o(e)||t.errorHandler.onUnexpectedError(e)}function o(e){return e instanceof Error&&e.name===a&&e.message===a}Object.defineProperty(t,"__esModule",{value:!0});var i={}
;n.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&i&&delete i[n]:(i[n]=t,1===Object.keys(i).length&&setTimeout(function(){var e=i;i={},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 s=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=s,t.errorHandler=new s,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=r,t.onUnexpectedExternalError=function(e){o(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 a="Canceled";t.isPromiseCanceledError=o,t.canceled=function(){var e=new Error(a);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"}});var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:
case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var r,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(e[11],t([1,0,9,2,8,12,10]),function(e,t,r,s,a,u,c){"use strict";function l(e){return function(t,n,r){void 0===n&&(n=null);var o=e(function(e){return o.dispose(),t.call(n,e)},null,r);return o}}function f(e,t){return function(n,r,o){
return void 0===r&&(r=null),e(function(e){return n.call(r,t(e))},null,o)}}function p(e,t){return function(n,r,o){return void 0===r&&(r=null),e(function(e){t(e),n.call(r,e)},null,o)}}function h(e,t){return function(n,r,o){return void 0===r&&(r=null),e(function(e){return t(e)&&n.call(r,e)},null,o)}}function d(e){var t,n=!0;return h(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,o){t._listeners||(t._listeners=new u.LinkedList);var i=t._listeners.isEmpty();i&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s=t._listeners.push(r?[n,r]:n);i&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),
t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r);var a;return a={dispose:function(){a.dispose=e._noop,t._disposed||(s(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(o)&&o.push(a),a}),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 o=this._deliveryQueue.shift(),i=o[0],s=o[1];try{"function"==typeof i?i.call(void 0,s):i[0].call(i[1],s)}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 m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.fireAsync=function(e){
return o(this,void 0,void 0,function(){var t,n,o,s,a,u;return i(this,function(i){switch(i.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())u=[],this._asyncDeliveryQueue.push([n.value,e(u,"function"==typeof n.value?n.value:n.value[0]),u]);i.label=1;case 1:if(!(this._asyncDeliveryQueue.length>0))return[3,3];o=this._asyncDeliveryQueue.shift(),s=o[0],a=o[1],u=o[2];try{"function"==typeof s?s.call(void 0,a):s[0].call(s[1],a)}catch(e){return r.onUnexpectedError(e),[3,1]}return Object.freeze(u),[4,Promise.all(u)];case 2:return i.sent(),[3,1];case 3:return[2]}})})},t}(v);t.AsyncEmitter=m;var _=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 a.toDisposable(s.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=_,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 c.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),a.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 o,i=void 0,s=void 0,a=0,u=new v({onFirstListenerAdd:function(){o=e(function(e){a++,i=t(i,e),r&&!s&&u.fire(i),clearTimeout(s),s=setTimeout(function(){var e=i;i=void 0,s=void 0,(!r||a>1)&&u.fire(e),a=0},n)})},onLastListenerRemove:function(){o.dispose()}});return u.event};var g=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,o){return e(function(e){var o=t.buffers[t.buffers.length-1];o?o.push(function(){
return n.call(r,e)}):n.call(r,e)},void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=g,t.mapEvent=f,t.forEach=p,t.filterEvent=h;var y=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(f(this._event,t))},e.prototype.forEach=function(t){return new e(p(this._event,t))},e.prototype.filter=function(t){return new e(h(this._event,t))},e.prototype.latch=function(){return new e(d(this._event))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e.prototype.once=function(e,t,n){return l(this._event)(e,t,n)},e}();t.chain=function(e){return new y(e)},t.stopwatch=function(e){var t=(new Date).getTime();return f(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):i.fire(e)}),o=function(){n.forEach(function(e){return i.fire(e)}),n=null},i=new v({onFirstListenerAdd:function(){r||(r=e(function(e){return i.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(o):o())},onLastListenerRemove:function(){r.dispose(),r=null}});return i.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),o.fire(e)});var r=function(e,t){return n.forEach(function(n){return e.call(t,n)})},o=new v({onListenerDidAdd:function(e,n,o){t?setTimeout(function(){return r(n,o)}):r(n,o)}});return o.event};var b=function(){function e(){this.emitter=new v,this.event=this.emitter.event,this.disposable=a.Disposable.None}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 o.fire(n.apply(void 0,e))},o=new v({onFirstListenerAdd:function(){return e.on(t,r)},onLastListenerRemove:function(){return e.removeListener(t,r)}});return o.event},t.latch=d}),define(e[5],t([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=0,this._onDidChangeFullscreen=new n.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new n.Emitter,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){
return Date.now()-this._lastZoomLevelChangeTime},e.prototype.setZoomLevel=function(e,t){this._zoomLevel!==e&&(this._zoomLevel=e,this._lastZoomLevelChangeTime=t?0:Date.now(),this._onDidChangeZoomLevel.fire(this._zoomLevel))},e.prototype.getZoomFactor=function(){return this._zoomFactor},e.prototype.setZoomFactor=function(e){this._zoomFactor=e},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.setFullscreen=function(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())},e.prototype.isFullscreen=function(){return this._fullscreen},e.prototype.setAccessibilitySupport=function(e){this._accessibilitySupport!==e&&(this._accessibilitySupport=e,this._onDidChangeAccessibilitySupport.fire())},e.prototype.getAccessibilitySupport=function(){
return this._accessibilitySupport},e.INSTANCE=new e,e}();t.setZoomLevel=function(e,t){r.INSTANCE.setZoomLevel(e,t)},t.getZoomLevel=function(){return r.INSTANCE.getZoomLevel()},t.getTimeSinceLastZoomLevelChanged=function(){return r.INSTANCE.getTimeSinceLastZoomLevelChanged()},t.onDidChangeZoomLevel=function(e){return r.INSTANCE.onDidChangeZoomLevel(e)},t.getZoomFactor=function(){return r.INSTANCE.getZoomFactor()},t.setZoomFactor=function(e){r.INSTANCE.setZoomFactor(e)},t.getPixelRatio=function(){return r.INSTANCE.getPixelRatio()},t.setFullscreen=function(e){r.INSTANCE.setFullscreen(e)},t.isFullscreen=function(){return r.INSTANCE.isFullscreen()},t.onDidChangeFullscreen=function(e){return r.INSTANCE.onDidChangeFullscreen(e)},t.setAccessibilitySupport=function(e){r.INSTANCE.setAccessibilitySupport(e)},t.getAccessibilitySupport=function(){return r.INSTANCE.getAccessibilitySupport()},t.onDidChangeAccessibilitySupport=function(e){return r.INSTANCE.onDidChangeAccessibilitySupport(e)};var o=navigator.userAgent
;t.isIE=o.indexOf("Trident")>=0,t.isEdge=o.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isOpera=o.indexOf("Opera")>=0,t.isFirefox=o.indexOf("Firefox")>=0,t.isWebKit=o.indexOf("AppleWebKit")>=0,t.isChrome=o.indexOf("Chrome")>=0,t.isSafari=-1===o.indexOf("Chrome")&&o.indexOf("Safari")>=0,t.isIPad=o.indexOf("iPad")>=0,t.isEdgeWebView=t.isEdge&&o.indexOf("WebView/")>=0,t.hasClipboardSupport=function(){if(t.isIE)return!1;if(t.isEdge){var e=o.indexOf("Edge/"),n=parseInt(o.substring(e+5,o.indexOf(".",e)),10);if(!n||n>=12&&n<=16)return!1}return!0}}),define(e[13],t([1,0,20,4]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listProcesses=function(t){return new Promise(function(o,i){function s(e,n,r,o,i){var s=c.get(n);if(e===t||s){var l={name:a(r),cmd:r,pid:e,ppid:n,load:o,mem:i};c.set(e,l),e===t&&(u=l),s&&(s.children||(s.children=[]),s.children.push(l),s.children.length>1&&(s.children=s.children.sort(function(e,t){return e.pid-t.pid})))}}function a(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,o="";do{(n=r.exec(e))&&(o+=n+" ")}while(n);return o&&0!==e.indexOf("node ")?"electron_node "+o:e}var u,c=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:a(t),cmd:t,pid:e.pid,
ppid:e.ppid,load:e.cpu,mem:e.memory})}),(u=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}))}),o(u)):i(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,a,f){if(t||f)i(t||f.toString());else{for(var p=0,h=a.toString().split("\n");p<h.length;p++){var d=h[p],v=l.exec(d.trim());v&&6===v.length&&s(parseInt(v[1]),parseInt(v[2]),v[5],parseFloat(v[3]),parseFloat(v[4]))}if("linux"===process.platform){for(var m=[u],_=[];m.length;){var g=m.shift();_.push(g.pid),g.children&&(m=m.concat(g.children))}var y=JSON.stringify(r.getPathFromAmdModule(e,"vs/base/node/cpuUsage.sh"));y+=" "+_.join(" "),n.exec(y,{},function(e,t,n){if(e||n)i(e||n.toString());else{
for(var r=t.toString().split("\n"),s=0;s<_.length;s++)c.get(_[s]).load=parseFloat(r[s]);o(u)}})}else o(u)}})}})}}),define(e[15],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_MENU_CHANNEL="vscode:contextmenu",t.CONTEXT_MENU_CLOSE_CHANNEL="vscode:onCloseContextMenu"}),define(e[16],t([1,0,17,15]),function(e,t,n,r){"use strict";function o(e,t){var n={id:t.length,label:e.label,type:e.type,accelerator:e.accelerator,checked:e.checked,enabled:"boolean"!=typeof e.enabled||e.enabled,visible:"boolean"!=typeof e.visible||e.visible};return t.push(e),Array.isArray(e.submenu)&&(n.submenu=e.submenu.map(function(e){return o(e,t)})),n}Object.defineProperty(t,"__esModule",{value:!0});var i=0;t.popup=function(e,t){var s=[],a="vscode:onContextMenu"+i++,u=function(e,t,n){return s[t].click(n)};n.ipcRenderer.once(a,u),n.ipcRenderer.once(r.CONTEXT_MENU_CLOSE_CHANNEL,function(){n.ipcRenderer.removeListener(a,u),t&&t.onHide&&t.onHide()}),
n.ipcRenderer.send(r.CONTEXT_MENU_CHANNEL,e.map(function(e){return o(e,s)}),a,t)}}),define(e[18],t([19]),{}),define(e[14],t([1,0,21,4]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n.dirname(r.getPathFromAmdModule(e,"")),i=n.join(o,"product.json"),s=e.__$__nodeRequire(i);process.env.VSCODE_DEV&&(s.nameShort+=" Dev",s.nameLong+=" Dev",s.dataFolderName+="-dev"),t.default=s}),define(e[22],t([1,0,13,17,6,23,14,24,5,3,16,18]),function(e,t,n,r,o,i,s,a,u,c,l){"use strict";function f(e,t,n){var r=0===n,a=t.name;if(r&&(a=s.default.applicationName+" main"),"window"===a){a=void 0!==_.get(t.pid)?a+" ("+_.get(t.pid)+")":a}var u=r?a:o.repeat("    ",n)+" "+a,c="win32"===process.platform?t.mem:i.totalmem()*(t.mem/100);e.push({cpu:Number(t.load.toFixed(0)),memory:Number((c/1048576).toFixed(0)),pid:Number(t.pid.toFixed(0)),name:a,formattedName:u,cmd:t.cmd}),Array.isArray(t.children)&&t.children.forEach(function(t){return f(e,t,n+1)})}function p(e,t){var n,r=0
;return e.forEach(function(e){e[t]>r&&(r=e[t],n=e.pid)}),n}function h(e){r.webFrame.setZoomLevel(e),u.setZoomFactor(r.webFrame.getZoomFactor()),u.setZoomLevel(r.webFrame.getZoomLevel(),!1)}function d(e){e.preventDefault();var t=[],n=parseInt(e.currentTarget.id);n&&"number"==typeof n?(t.push({label:a.localize(4,null),click:function(){process.kill(n,"SIGTERM")}}),t.push({label:a.localize(5,null),click:function(){process.kill(n,"SIGKILL")}}),t.push({type:"separator"}),t.push({label:a.localize(6,null),click:function(){var e=document.getElementById(n.toString());e&&r.clipboard.writeText(e.innerText)}}),t.push({label:a.localize(7,null),click:function(){var e=document.getElementById("process-list");e&&r.clipboard.writeText(e.innerText)}})):t.push({label:a.localize(8,null),click:function(){var e=document.getElementById("process-list");e&&r.clipboard.writeText(e.innerText)}}),l.popup(t)}function v(e){!function(e){var t=document.createElement("style"),n=[]
;e.hoverBackground&&n.push("tbody > tr:hover  { background-color: "+e.hoverBackground+"; }"),e.hoverForeground&&n.push("tbody > tr:hover{ color: "+e.hoverForeground+"; }"),e.highlightForeground&&n.push(".highest { color: "+e.highlightForeground+"; }"),t.innerHTML=n.join("\n"),document.head.appendChild(t),document.body.style.color=e.color}(e.styles),h(e.zoomLevel),r.ipcRenderer.on("vscode:windowsInfoResponse",function(e,t){_=new Map,t.forEach(function(e){return _.set(e.pid,e.title)})}),setInterval(function(){r.ipcRenderer.send("windowsInfoRequest"),n.listProcesses(e.pid).then(function(e){!function(e){var t=document.getElementById("process-list"),n=p(e,"cpu"),r=p(e,"memory"),o='\n\t\t<tr>\n\t\t\t<th class="cpu">'+a.localize(0,null)+'</th>\n\t\t\t<th class="memory">'+a.localize(1,null)+'</th>\n\t\t\t<th class="pid">'+a.localize(2,null)+'</th>\n\t\t\t<th class="nameLabel">'+a.localize(3,null)+"</th>\n\t\t</tr>";e.forEach(function(e){var t=e.pid===n?"highest":"",i=e.pid===r?"highest":""
;o+="\n\t\t\t<tr id="+e.pid+'>\n\t\t\t\t<td class="centered '+t+'">'+e.cpu+'</td>\n\t\t\t\t<td class="centered '+i+'">'+e.memory+'</td>\n\t\t\t\t<td class="centered">'+e.pid+'</td>\n\t\t\t\t<td title="'+e.name+'" class="data">'+e.formattedName+"</td>\n\t\t\t</tr>"}),t.innerHTML="<table>"+o+"</table>"}(m=function(e){var t=[];return e&&f(t,e,0),t}(e));for(var t=document.getElementsByTagName("tr"),n=0;n<t.length;n++){t[n].addEventListener("contextmenu",function(e){d(e)})}})},1200),document.onkeydown=function(e){var t=c.isMacintosh?e.metaKey:e.ctrlKey;t&&187===e.keyCode&&h(r.webFrame.getZoomLevel()+1),t&&189===e.keyCode&&h(r.webFrame.getZoomLevel()-1)}}Object.defineProperty(t,"__esModule",{value:!0});var m,_=new Map;t.startup=v})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/5944e81f3c46a3938a82c701f96d7a59b074cfdc/core/vs/code/electron-browser/processExplorer/processExplorerMain.js.map
