UNPKG

@jsjoeio/code-server

Version:

Run VS Code on a remote server.

1 lines 1.05 MB
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=39)}([function(e,t){e.exports=require("path")},function(e,t){e.exports=require("vscode")},function(e,t){e.exports={detecting:0,foundIt:1,notMe:2,start:0,error:1,itsMe:2,SHORTCUT_THRESHOLD:.95}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(50),i=r(50);t.makePatchingRequire=i.makePatchingRequire;var o=function(e){return!0},s=function(){function e(){this.version=r(122).version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var r=this.subscribers[e];if(r){var n={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,r.forEach((function(e){var t=e.listener,r=e.filter;try{r&&r(!0)&&t(n)}catch(e){}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,r){void 0===r&&(r=o),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:r})},e.prototype.unsubscribe=function(e,t,r){void 0===r&&(r=o);var n=this.subscribers[e];if(n)for(var i=0;i<n.length;++i)if(n[i].listener===t&&n[i].filter===r)return n.splice(i,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach((function(t){return delete e.knownPatches[t]}))},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(r){return e(t(r))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new s,r(52).prototype.require=n.makePatchingRequire(global.diagnosticsSource.getPatchesObject()));t.channel=global.diagnosticsSource},function(e,t){e.exports=require("fs")},function(e,t,r){"use strict";var n=function(){function e(){}return e.info=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e.enableDebug&&console.info(e.TAG+t,r)},e.warn=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e.disableWarnings||console.warn(e.TAG+t,r)},e.enableDebug=!1,e.disableWarnings=!1,e.disableErrors=!1,e.TAG="ApplicationInsights:",e}();e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Versions=t.PromiseSource=t.Limiter=t.splitInChunks=t.pathEquals=t.isDescendant=t.detectUnicodeEncoding=t.readBytes=t.grep=t.find=t.uniqueFilter=t.mkdirp=t.groupBy=t.uniqBy=t.assign=t.once=t.eventToPromise=t.debounceEvent=t.onceEvent=t.done=t.anyEvent=t.filterEvent=t.mapEvent=t.fireEvent=t.EmptyDisposable=t.combinedDisposable=t.toDisposable=t.dispose=t.log=void 0;const n=r(1),i=r(0),o=r(4),s=r(42);function a(e){return e.forEach(e=>e.dispose()),[]}function c(e){return{dispose:e}}function u(e){return c(()=>a(e))}function l(e){return(t,r,n)=>{const i=e(e=>(i.dispose(),t.call(r,e)),null,n);return i}}function h(e){return new Promise(t=>l(e)(t))}function p(e){return/^[a-zA-Z]:\\/.test(e)}t.log=function(...e){console.log.apply(console,["git:",...e])},t.dispose=a,t.toDisposable=c,t.combinedDisposable=u,t.EmptyDisposable=c(()=>null),t.fireEvent=function(e){return(t,r,n)=>e(e=>t.call(r),null,n)},t.mapEvent=function(e,t){return(r,n,i)=>e(e=>r.call(n,t(e)),null,i)},t.filterEvent=function(e,t){return(r,n,i)=>e(e=>t(e)&&r.call(n,e),null,i)},t.anyEvent=function(...e){return(t,r,n)=>{const i=u(e.map(e=>e(e=>t.call(r,e))));return n&&n.push(i),i}},t.done=function(e){return e.then(()=>{})},t.onceEvent=l,t.debounceEvent=function(e,t){return(r,n,i)=>{let o;return e(e=>{clearTimeout(o),o=setTimeout(()=>r.call(n,e),t)},null,i)}},t.eventToPromise=h,t.once=function(e){return(...t)=>e(...t)},t.assign=function(e,...t){for(const r of t)Object.keys(r).forEach(t=>e[t]=r[t]);return e},t.uniqBy=function(e,t){const r=Object.create(null);return e.filter(e=>{const n=t(e);return!r[n]&&(r[n]=!0,!0)})},t.groupBy=function(e,t){return e.reduce((e,r)=>{const n=t(r);return e[n]=[...e[n]||[],r],e},Object.create(null))},t.mkdirp=async function e(t,r){const n=async()=>{try{await o.promises.mkdir(t,r)}catch(e){if("EEXIST"===e.code){if((await o.promises.stat(t)).isDirectory())return;throw new Error(`'${t}' exists and is not a directory.`)}throw e}};if(t===i.dirname(t))return!0;try{await n()}catch(o){if("ENOENT"!==o.code)throw o;await e(i.dirname(t),r),await n()}return!0},t.uniqueFilter=function(e){const t=Object.create(null);return r=>{const n=e(r);return!t[n]&&(t[n]=!0,!0)}},t.find=function(e,t){let r=void 0;return e.some(e=>!!t(e)&&(r=e,!0)),r},t.grep=async function(e,t){return new Promise((r,n)=>{const i=o.createReadStream(e,{encoding:"utf8"}),a=s(i);a.on("data",e=>{t.test(e)&&(i.close(),r(!0))}),a.on("error",n),a.on("end",()=>r(!1))})},t.readBytes=function(e,t){return new Promise((r,n)=>{let i=!1,o=Buffer.allocUnsafe(t),s=0;e.on("data",r=>{let n=Math.min(t-s,r.length);r.copy(o,s,0,n),s+=n,s===t&&e.destroy()}),e.on("error",e=>{i||(i=!0,n(e))}),e.on("close",()=>{i||(i=!0,r(o.slice(0,s)))})})},t.detectUnicodeEncoding=function(e){if(e.length<2)return null;const t=e.readUInt8(0),r=e.readUInt8(1);if(254===t&&255===r)return"utf16be";if(255===t&&254===r)return"utf16le";if(e.length<3)return null;const n=e.readUInt8(2);return 239===t&&187===r&&191===n?"utf8":null},t.isDescendant=function(e,t){return e===t||(e.charAt(e.length-1)!==i.sep&&(e+=i.sep),p(e)&&(e=e.toLowerCase(),t=t.toLowerCase()),t.startsWith(e))},t.pathEquals=function(e,t){return p(e)&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t},t.splitInChunks=function*(e,t){let r=[],n=0;for(const i of e){let e=n+i.length;e>t&&r.length>0&&(yield r,r=[],e=i.length),r.push(i),n=e}r.length>0&&(yield r)};t.Limiter=class{constructor(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0}queue(e){return new Promise((t,r)=>{this.outstandingPromises.push({factory:e,c:t,e:r}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const e=this.outstandingPromises.shift();this.runningPromises++;const t=e.factory();t.then(e.c,e.e),t.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this.runningPromises--,this.outstandingPromises.length>0&&this.consume()}};t.PromiseSource=class{constructor(){this._onDidComplete=new n.EventEmitter}get promise(){return this._promise?this._promise:h(this._onDidComplete.event).then(e=>{if(e.success)return e.value;throw e.err})}resolve(e){this._promise||(this._promise=Promise.resolve(e),this._onDidComplete.fire({success:!0,value:e}))}reject(e){this._promise||(this._promise=Promise.reject(e),this._onDidComplete.fire({success:!1,err:e}))}},function(e){function t(e,t,r,n){return{major:"string"==typeof e?parseInt(e,10):e,minor:"string"==typeof t?parseInt(t,10):t,patch:null==r?0:"string"==typeof r?parseInt(r,10):r,pre:n}}function r(e){const[r,n]=e.split("-"),[i,o,s]=r.split(".");return t(i,o,s,n)}e.compare=function(e,t){return"string"==typeof e&&(e=r(e)),"string"==typeof t&&(t=r(t)),e.major>t.major?1:e.major<t.major?-1:e.minor>t.minor?1:e.minor<t.minor?-1:e.patch>t.patch?1:e.patch<t.patch?-1:void 0===e.pre&&void 0!==t.pre?1:void 0!==e.pre&&void 0===t.pre?-1:void 0!==e.pre&&void 0!==t.pre?e.pre.localeCompare(t.pre):0},e.from=t,e.fromString=r}(t.Versions||(t.Versions={}))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(157)),n(r(57)),n(r(172))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i,o,s,a,c=r(0),u=r(4),l=Object.prototype.toString;function h(e){return void 0!==e}function p(e){return"[object Number]"===l.call(e)}function d(e){return"[object String]"===l.call(e)}function f(e){return JSON.parse(u.readFileSync(e,"utf8"))}function m(e,t){return a&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,r){var n=r[0],i=t[n],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(o=String(i)),o}))}function g(e){return function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return p(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):m(e[t],n):d(r)?(console.warn("Message "+r+" didn't get externalized correctly."),m(r,n)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function y(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return m(t,r)}function v(e,t){return o[e]=t,t}function w(e,t){var r,n,i,o=c.join(s.cacheRoot,e.id+"-"+e.hash+".json"),a=!1,l=!1;try{return r=JSON.parse(u.readFileSync(o,{encoding:"utf8",flag:"r"})),n=o,i=new Date,u.utimes(n,i,i,(function(){})),r}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),u.unlink(o,(function(e){e&&console.error("Deleting corrupted bundle "+o+" failed.")})),a=!0}}if(!(r=function(e,t){var r=s.translationsConfig[e.id];if(r){var n=f(r).contents,i=f(c.join(t,"nls.metadata.json")),o=Object.create(null);for(var a in i){var u=i[a],l=n[e.outDir+"/"+a];if(l){for(var h=[],p=0;p<u.keys.length;p++){var m=u.keys[p],g=l[d(m)?m:m.key];void 0===g&&(g=u.messages[p]),h.push(g)}o[a]=h}else o[a]=u.messages}return o}}(e,t))||a)return r;if(l)try{u.writeFileSync(o,JSON.stringify(r),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return r;throw e}return r}function b(e){try{return function(e){var t=f(c.join(e,"nls.metadata.json")),r=Object.create(null);for(var n in t){var i=t[n];r[n]=i.messages}return r}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function _(e,t){var r;if(!0===s.languagePackSupport&&void 0!==s.cacheRoot&&void 0!==s.languagePackId&&void 0!==s.translationsConfigFile&&void 0!==s.translationsConfig)try{r=w(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!r){if(s.languagePackSupport)return b(t);var n=function(e){for(var t=s.locale;t;){var r=c.join(e,"nls.bundle."+t+".json");if(u.existsSync(r))return r;var n=t.lastIndexOf("-");t=n>0?t.substring(0,n):void 0}if(void 0===t){r=c.join(e,"nls.bundle.json");if(u.existsSync(r))return r}}(t);if(n)try{return f(n)}catch(e){console.log("Loading in the box message bundle failed.",e)}r=b(t)}return r}function C(e){if(!e)return y;var t=c.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),s.messageFormat===n.both||s.messageFormat===n.bundle){var r=function(e){for(var t,r=c.dirname(e);t=c.join(r,"nls.metadata.header.json"),!u.existsSync(t);){var n=c.dirname(r);if(n===r){t=void 0;break}r=n}return t}(e);if(r){var i=c.dirname(r),l=o[i];if(void 0===l)try{var p=JSON.parse(u.readFileSync(r,"utf8"));try{var d=_(p,i);l=v(i,d?{header:p,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),l=v(i,null)}}catch(e){console.error("Failed to read header file",e),l=v(i,null)}if(l){var m=e.substr(i.length+1).replace(/\\/g,"/"),w=l.nlsBundle[m];return void 0===w?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):g(w)}}}if(s.messageFormat===n.both||s.messageFormat===n.file)try{var b=f(function(e){var t;if(s.cacheLanguageResolution&&t)t=t;else{if(a||!s.locale)t=".nls.json";else for(var r=s.locale;r;){var n=".nls."+r+".json";if(u.existsSync(e+n)){t=n;break}var i=r.lastIndexOf("-");i>0?r=r.substring(0,i):(t=".nls.json",r=null)}s.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(b)?g(b):h(b.messages)&&h(b.keys)?g(b.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}!function(e){e.file="file",e.bundle="bundle",e.both="both"}(n=t.MessageFormat||(t.MessageFormat={})),function(e){e.is=function(e){var t=e;return t&&h(t.key)&&h(t.comment)}}(i||(i={})),function(){if(s={locale:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:n.bundle},d(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG);if(d(e.locale)&&(s.locale=e.locale.toLowerCase()),(!0===(t=e._languagePackSupport)||!1===t)&&(s.languagePackSupport=e._languagePackSupport),d(e._cacheRoot)&&(s.cacheRoot=e._cacheRoot),d(e._languagePackId)&&(s.languagePackId=e._languagePackId),d(e._translationsConfigFile)){s.translationsConfigFile=e._translationsConfigFile;try{s.translationsConfig=f(s.translationsConfigFile)}catch(t){e._corruptedFile&&u.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}}}catch(e){}var t;a="pseudo"===s.locale,void 0,o=Object.create(null)}(),t.loadMessageBundle=C,t.config=function(e){return e&&(d(e.locale)&&(s.locale=e.locale.toLowerCase(),void 0,o=Object.create(null)),void 0!==e.messageFormat&&(s.messageFormat=e.messageFormat)),a="pseudo"===s.locale,C}},function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=r(15),o=r(28),s=r(25),a=r(177),c=r(5),u=r(26),l=function(){function e(){}return e.getCookie=function(t,r){var n="";if(t&&t.length&&"string"==typeof r)for(var i=t+"=",o=r.split(";"),s=0;s<o.length;s++){r=o[s];if((r=e.trim(r))&&0===r.indexOf(i)){n=r.substring(i.length,o[s].length);break}}return n},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},r=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),n=(Buffer.from?Buffer.from(r,"binary"):new Buffer(r,"binary")).toString("base64");return n.substr(0,n.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=r[15&(t=e.random32())]+r[t>>4&15]+r[t>>8&15]+r[t>>12&15]+r[t>>16&15]+r[t>>20&15]+r[t>>24&15]+r[t>>28&15];var o=r[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+o+n.substr(16,3)+n.substr(19,12)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),r=""+Math.floor(e/6e4)%60,n=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,r=r.length<2?"0"+r:r,(i>0?i+".":"")+(n=n.length<2?"0"+n:n)+":"+r+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var r={};for(var n in t){var i="",o=t[n],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+n+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+n+", could not be serialized")}}r[n]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return r}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var r=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!r||0==r.length||!t)return!0;for(var n=0;n<r.length;n++){if(new RegExp(r[n].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1}return!0},e.getCorrelationContextTarget=function(e,t){var r=e.headers&&e.headers[u.requestContextHeader];if(r)for(var n=r.split(","),i=0;i<n.length;++i){var o=n[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},e.makeRequest=function(t,r,a,u){r&&0===r.indexOf("//")&&(r="https:"+r);var l=s.parse(r),h=n({},a,{host:l.hostname,port:l.port,path:l.pathname}),p=void 0;if("https:"===l.protocol&&(p=t.proxyHttpsUrl||void 0),"http:"===l.protocol&&(p=t.proxyHttpUrl||void 0),p){0===p.indexOf("//")&&(p="http:"+p);var d=s.parse(p);"https:"===d.protocol?(c.info("Proxies that use HTTPS are not supported"),p=void 0):h=n({},h,{host:d.hostname,port:d.port||"80",path:r,headers:n({},h.headers,{Host:l.hostname})})}var f="https:"===l.protocol&&!p;return f&&void 0!==t.httpsAgent?h.agent=t.httpsAgent:f||void 0===t.httpAgent?f&&(h.agent=e.tlsRestrictedAgent):h.agent=t.httpAgent,f?o.request(h,u):i.request(h,u)},e.safeIncludeCorrelationHeader=function(t,r,n){var i;if("string"==typeof n)i=n;else if(n instanceof Array)i=n.join(",");else if(n&&"function"==typeof n.toString)try{i=n.toString()}catch(e){c.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",e,n)}i?e.addCorrelationIdHeaderFromString(t,r,i):r.setHeader(u.requestContextHeader,u.requestContextSourceKey+"="+t.config.correlationId)},e.addCorrelationIdHeaderFromString=function(e,t,r){var n=r.split(","),i=u.requestContextSourceKey+"=";n.some((function(e){return e.substring(0,i.length)===i}))||t.setHeader(u.requestContextHeader,r+","+u.requestContextSourceKey+"="+e.config.correlationId)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new o.Agent({secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();e.exports=l},function(e,t){e.exports=require("os")},function(e,t,r){var n=r(2);e.exports=function(e){var t=this;this.reset=function(){this._mCurrentState=n.start},this.nextState=function(e){var t=this._mModel.classTable[e.charCodeAt(0)];return this._mCurrentState==n.start&&(this._mCurrentBytePos=0,this._mCurrentCharLen=this._mModel.charLenTable[t]),this._mCurrentState=this._mModel.stateTable[this._mCurrentState*this._mModel.classFactor+t],this._mCurrentBytePos++,this._mCurrentState},this.getCurrentCharLen=function(){return this._mCurrentCharLen},this.getCodingStateMachine=function(){return this._mModel.name},function(e){t._mModel=e,t._mCurrentBytePos=0,t._mCurrentCharLen=0,t.reset()}(e)}},function(e,t,r){"use strict";var n=function(){};e.exports=n},function(e,t,r){var n=r(2);e.exports=function(){this.reset=function(){this._mState=n.detecting},this.getCharsetName=function(){return null},this.feed=function(e){},this.getState=function(){return this._mState},this.getConfidence=function(){return 0},this.filterHighBitOnly=function(e){return e=e.replace(/[\x00-\x7F]+/g," ")},this.filterWithoutEnglishLetters=function(e){return e=e.replace(/[A-Za-z]+/g," ")},this.filterWithEnglishLetters=function(e){for(var t="",r=!1,n=0,i=0;i<e.length;i++){var o=e[i];">"==o?r=!1:"<"==o&&(r=!0);var s=/[a-zA-Z]/.test(o);/^[\x00-\x7F]*$/.test(o)&&!s&&(i>n&&!r&&(t=t+e.substring(n,i)+" "),n=i+1)}return r||(t+=e.substring(n)),t}}},function(e,t){t.log=function(){},t.setLogger=function(e){t.enabled=!0,t.log=e}},function(e,t){e.exports=require("http")},function(e,t,r){var n=r(13),i=r(2),o=r(14);function s(){n.apply(this);this.reset=function(){s.prototype.reset.apply(this),this._mCodingSM&&this._mCodingSM.reset(),this._mDistributionAnalyzer&&this._mDistributionAnalyzer.reset(),this._mLastChar="\0\0"},this.getCharsetName=function(){},this.feed=function(e){for(var t=e.length,r=0;r<t;r++){var n=this._mCodingSM.nextState(e[r]);if(n==i.error){o.log(this.getCharsetName()+" prober hit error at byte "+r+"\n"),this._mState=i.notMe;break}if(n==i.itsMe){this._mState=i.foundIt;break}if(n==i.start){var s=this._mCodingSM.getCurrentCharLen();0==r?(this._mLastChar[1]=e[0],this._mDistributionAnalyzer.feed(this._mLastChar,s)):this._mDistributionAnalyzer.feed(e.slice(r-1,r+1),s)}}return this._mLastChar[0]=e[t-1],this.getState()==i.detecting&&this._mDistributionAnalyzer.gotEnoughData()&&this.getConfidence()>i.SHORTCUT_THRESHOLD&&(this._mState=i.foundIt),this.getState()},this.getConfidence=function(){return this._mDistributionAnalyzer.getConfidence()}}s.prototype=new n,e.exports=s},function(e,t,r){var n=r(77),i=r(78),o=r(79),s=r(80),a=r(81);function c(){var e=this;this.reset=function(){this._mDone=!1,this._mTotalChars=0,this._mFreqChars=0},this.feed=function(e,t){if(2==t)var r=this.getOrder(e);else r=-1;r>=0&&(this._mTotalChars++,r<this._mTableSize&&512>this._mCharToFreqOrder[r]&&this._mFreqChars++)},this.getConfidence=function(){if(this._mTotalChars<=0||this._mFreqChars<=3)return.01;if(this._mTotalChars!=this._mFreqChars){var e=this._mFreqChars/((this._mTotalChars-this._mFreqChars)*this._mTypicalDistributionRatio);if(e<.99)return e}return.99},this.gotEnoughData=function(){return this._mTotalChars>1024},this.getOrder=function(e){return-1},e._mCharToFreqOrder=null,e._mTableSize=null,e._mTypicalDistributionRatio=null,e.reset()}function u(){c.apply(this);var e=this;this.getOrder=function(e){return e.charCodeAt(0)>=196?94*(e.charCodeAt(0)-196)+e.charCodeAt(1)-161:-1},e._mCharToFreqOrder=i.EUCTWCharToFreqOrder,e._mTableSize=i.EUCTW_TABLE_SIZE,e._mTypicalDistributionRatio=i.EUCTW_TYPICAL_DISTRIBUTION_RATIO}function l(){c.apply(this);var e=this;this.getOrder=function(e){return e.charCodeAt(0)>=176?94*(e.charCodeAt(0)-176)+e.charCodeAt(1)-161:-1},e._mCharToFreqOrder=o.EUCKRCharToFreqOrder,e._mTableSize=o.EUCKR_TABLE_SIZE,e._mTypicalDistributionRatio=o.EUCKR_TYPICAL_DISTRIBUTION_RATIO}function h(){c.apply(this);var e=this;this.getOrder=function(e){return e.charCodeAt(0)>=176&&e.charCodeAt(1)>=161?94*(e.charCodeAt(0)-176)+e.charCodeAt(1)-161:-1},e._mCharToFreqOrder=s.GB2312CharToFreqOrder,e._mTableSize=s.GB2312_TABLE_SIZE,e._mTypicalDistributionRatio=s.GB2312_TYPICAL_DISTRIBUTION_RATIO}function p(){c.apply(this);var e=this;this.getOrder=function(e){return e.charCodeAt(0)>=164?e.charCodeAt(1)>=161?157*(e.charCodeAt(0)-164)+e.charCodeAt(1)-161+63:157*(e.charCodeAt(0)-164)+e.charCodeAt(1)-64:-1},e._mCharToFreqOrder=a.Big5CharToFreqOrder,e._mTableSize=a.BIG5_TABLE_SIZE,e._mTypicalDistributionRatio=a.BIG5_TYPICAL_DISTRIBUTION_RATIO}function d(){c.apply(this);var e=this;this.getOrder=function(e){if(e.charCodeAt(0)>=129&&e.charCodeAt(0)<=159)var t=188*(e.charCodeAt(0)-129);else{if(!(e.charCodeAt(0)>=224&&e.charCodeAt(0)<=239))return-1;t=188*(e.charCodeAt(0)-224+31)}return t+=e.charCodeAt(1)-64,(e.charCodeAt(1)<64||127===e.charCodeAt(1)||e.charCodeAt(1)>252)&&(t=-1),t},e._mCharToFreqOrder=n.JISCharToFreqOrder,e._mTableSize=n.JIS_TABLE_SIZE,e._mTypicalDistributionRatio=n.JIS_TYPICAL_DISTRIBUTION_RATIO}function f(){c.apply(this);var e=this;this.getOrder=function(e){return e[0]>=" "?94*(e.charCodeAt(0)-161)+e.charCodeAt(1)-161:-1},e._mCharToFreqOrder=n.JISCharToFreqOrder,e._mTableSize=n.JIS_TABLE_SIZE,e._mTypicalDistributionRatio=n.JIS_TYPICAL_DISTRIBUTION_RATIO}t.CharDistributionAnalysis=c,u.prototype=new c,t.EUCTWDistributionAnalysis=u,l.prototype=new c,t.EUCKRDistributionAnalysis=l,h.prototype=new c,t.GB2312DistributionAnalysis=h,p.prototype=new c,t.Big5DistributionAnalysis=p,d.prototype=new c,t.SJISDistributionAnalysis=d,f.prototype=new c,t.EUCJPDistributionAnalysis=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.sequentialize=t.throttle=t.memoize=void 0;const n=r(6);function i(e){return(t,r,n)=>{let i=null,o=null;if("function"==typeof n.value?(i="value",o=n.value):"function"==typeof n.get&&(i="get",o=n.get),!o||!i)throw new Error("not supported");n[i]=e(o,r)}}t.memoize=i((function(e,t){const r="$memoize$"+t;return function(...t){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:e.apply(this,t)}),this[r]}})),t.throttle=i((function(e,t){const r="$throttle$current$"+t,i="$throttle$next$"+t,o=function(...t){if(this[i])return this[i];if(this[r])return this[i]=n.done(this[r]).then(()=>(this[i]=void 0,o.apply(this,t))),this[i];this[r]=e.apply(this,t);const s=()=>this[r]=void 0;return n.done(this[r]).then(s,s),this[r]};return o})),t.sequentialize=i((function(e,t){const r="__$sequence$"+t;return function(...t){const n=this[r]||Promise.resolve(null),i=async()=>await e.apply(this,t);return this[r]=n.then(i,i),this[r]}})),t.debounce=function(e){return i((t,r)=>{const n="$debounce$"+r;return function(...r){clearTimeout(this[n]),this[n]=setTimeout(()=>t.apply(this,r),e)}})}},function(e,t,r){"use strict";var n=r(9),i=r(5),o=function(){function e(){}return e.queryCorrelationId=function(t,r){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))r(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(r);else{e.pendingLookups[o]=[r];var s=function(){if(e.pendingLookups[o]){var r={method:"GET",disableAppInsightsAutoCollection:!0};i.info(e.TAG,r);var a=n.makeRequest(t,o,r,(function(r){if(200===r.statusCode){var n="";r.setEncoding("utf-8"),r.on("data",(function(e){n+=e})),r.on("end",(function(){i.info(e.TAG,n);var t=e.correlationIdPrefix+n;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else r.statusCode>=400&&r.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)}));a&&(a.on("error",(function(t){i.warn(e.TAG,t)})),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,r){var n=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[n];i&&(e.pendingLookups[n]=i.filter((function(e){return e!=r})),0==e.pendingLookups[n].length&&delete e.pendingLookups[n])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var r=(e.currentRootId++).toString(16);return e.appendSuffix(t,r,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var r="|"===e[0]?1:0;return e.substring(r,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,r,i){if(t.length+r.length<e.requestIdMaxLength)return t+r+i;var o=e.requestIdMaxLength-9;if(t.length>o)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(r=n.randomu32().toString(16);r.length<8;)r="0"+r;return t.substring(0,o)+r+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!1,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();e.exports=o},function(e,t){e.exports=require("util")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toGitUri=t.fromGitUri=t.isGitUri=void 0,t.isGitUri=function(e){return/^git$/.test(e.scheme)},t.fromGitUri=function(e){return JSON.parse(e.query)},t.toGitUri=function(e,t,r={}){const n={path:e.fsPath,ref:t};r.submoduleOf&&(n.submoduleOf=r.submoduleOf);let i=e.path;return r.replaceFileExtension?i+=".git":r.submoduleOf&&(i+=".diff"),e.with({scheme:"git",path:i,query:JSON.stringify(n)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerAPICommands=t.ApiImpl=t.ApiGit=t.ApiRepository=t.ApiRepositoryUIState=t.ApiRepositoryState=t.ApiChange=void 0;const n=r(1),i=r(6),o=r(21),s=r(47);class a{constructor(e){this._inputBox=e}set value(e){this._inputBox.value=e}get value(){return this._inputBox.value}}class c{constructor(e){this.resource=e}get uri(){return this.resource.resourceUri}get originalUri(){return this.resource.original}get renameUri(){return this.resource.renameResourceUri}get status(){return this.resource.type}}t.ApiChange=c;class u{constructor(e){this._repository=e,this.onDidChange=this._repository.onDidRunGitStatus}get HEAD(){return this._repository.HEAD}get refs(){return[...this._repository.refs]}get remotes(){return[...this._repository.remotes]}get submodules(){return[...this._repository.submodules]}get rebaseCommit(){return this._repository.rebaseCommit}get mergeChanges(){return this._repository.mergeGroup.resourceStates.map(e=>new c(e))}get indexChanges(){return this._repository.indexGroup.resourceStates.map(e=>new c(e))}get workingTreeChanges(){return this._repository.workingTreeGroup.resourceStates.map(e=>new c(e))}}t.ApiRepositoryState=u;class l{constructor(e){this._sourceControl=e,this.onDidChange=i.mapEvent(this._sourceControl.onDidChangeSelection,()=>null)}get selected(){return this._sourceControl.selected}}t.ApiRepositoryUIState=l;class h{constructor(e){this._repository=e,this.rootUri=n.Uri.file(this._repository.root),this.inputBox=new a(this._repository.inputBox),this.state=new u(this._repository),this.ui=new l(this._repository.sourceControl)}apply(e,t){return this._repository.apply(e,t)}getConfigs(){return this._repository.getConfigs()}getConfig(e){return this._repository.getConfig(e)}setConfig(e,t){return this._repository.setConfig(e,t)}getGlobalConfig(e){return this._repository.getGlobalConfig(e)}getObjectDetails(e,t){return this._repository.getObjectDetails(e,t)}detectObjectType(e){return this._repository.detectObjectType(e)}buffer(e,t){return this._repository.buffer(e,t)}show(e,t){return this._repository.show(e,t)}getCommit(e){return this._repository.getCommit(e)}clean(e){return this._repository.clean(e.map(e=>n.Uri.file(e)))}diff(e){return this._repository.diff(e)}diffWithHEAD(e){return this._repository.diffWithHEAD(e)}diffWith(e,t){return this._repository.diffWith(e,t)}diffIndexWithHEAD(e){return this._repository.diffIndexWithHEAD(e)}diffIndexWith(e,t){return this._repository.diffIndexWith(e,t)}diffBlobs(e,t){return this._repository.diffBlobs(e,t)}diffBetween(e,t,r){return this._repository.diffBetween(e,t,r)}hashObject(e){return this._repository.hashObject(e)}createBranch(e,t,r){return this._repository.branch(e,t,r)}deleteBranch(e,t){return this._repository.deleteBranch(e,t)}getBranch(e){return this._repository.getBranch(e)}getBranches(e){return this._repository.getBranches(e)}setBranchUpstream(e,t){return this._repository.setBranchUpstream(e,t)}getMergeBase(e,t){return this._repository.getMergeBase(e,t)}status(){return this._repository.status()}checkout(e){return this._repository.checkout(e)}addRemote(e,t){return this._repository.addRemote(e,t)}removeRemote(e){return this._repository.removeRemote(e)}renameRemote(e,t){return this._repository.renameRemote(e,t)}fetch(e,t,r,n){return void 0!==e&&"string"!=typeof e?this._repository.fetch(e):this._repository.fetch({remote:e,ref:t,depth:r,prune:n})}pull(e){return this._repository.pull(void 0,e)}push(e,t,r=!1,n){return this._repository.pushTo(e,t,r,n)}blame(e){return this._repository.blame(e)}log(e){return this._repository.log(e)}commit(e,t){return this._repository.commit(e,t)}}t.ApiRepository=h;class p{constructor(e){this._model=e}get path(){return this._model.git.path}}t.ApiGit=p;function d(e){switch(e){case 0:return"Head";case 1:return"RemoteHead";case 2:return"Tag"}return"unknown"}function f(e){switch(e){case 0:return"INDEX_MODIFIED";case 1:return"INDEX_ADDED";case 2:return"INDEX_DELETED";case 3:return"INDEX_RENAMED";case 4:return"INDEX_COPIED";case 5:return"MODIFIED";case 6:return"DELETED";case 7:return"UNTRACKED";case 8:return"IGNORED";case 9:return"INTENT_TO_ADD";case 10:return"ADDED_BY_US";case 11:return"ADDED_BY_THEM";case 12:return"DELETED_BY_US";case 13:return"DELETED_BY_THEM";case 14:return"BOTH_ADDED";case 15:return"BOTH_DELETED";case 16:return"BOTH_MODIFIED"}return"UNKNOWN"}t.ApiImpl=class{constructor(e){this._model=e,this.git=new p(this._model)}get state(){return this._model.state}get onDidChangeState(){return this._model.onDidChangeState}get onDidPublish(){return this._model.onDidPublish}get onDidOpenRepository(){return i.mapEvent(this._model.onDidOpenRepository,e=>new h(e))}get onDidCloseRepository(){return i.mapEvent(this._model.onDidCloseRepository,e=>new h(e))}get repositories(){return this._model.repositories.map(e=>new h(e))}toGitUri(e,t){return o.toGitUri(e,t)}getRepository(e){const t=this._model.getRepository(e);return t?new h(t):null}async init(e){const t=e.fsPath;return await this._model.git.init(t),await this._model.openRepository(t),this.getRepository(e)||null}async openRepository(e){return await this._model.openRepository(e.fsPath),this.getRepository(e)||null}registerRemoteSourceProvider(e){return this._model.registerRemoteSourceProvider(e)}registerCredentialsProvider(e){return this._model.registerCredentialsProvider(e)}registerPushErrorHandler(e){return this._model.registerPushErrorHandler(e)}},t.registerAPICommands=function(e){const t=[];return t.push(n.commands.registerCommand("git.api.getRepositories",()=>e.getAPI(1).repositories.map(e=>e.rootUri.toString()))),t.push(n.commands.registerCommand("git.api.getRepositoryState",t=>{const r=e.getAPI(1).getRepository(n.Uri.parse(t));if(!r)return null;const i=r.state,o=e=>e&&{...e,type:d(e.type)},s=e=>{var t;return{uri:e.uri.toString(),originalUri:e.originalUri.toString(),renameUri:null===(t=e.renameUri)||void 0===t?void 0:t.toString(),status:f(e.status)}};return{HEAD:o(i.HEAD),refs:i.refs.map(o),remotes:i.remotes,submodules:i.submodules,rebaseCommit:i.rebaseCommit,mergeChanges:i.mergeChanges.map(s),indexChanges:i.indexChanges.map(s),workingTreeChanges:i.workingTreeChanges.map(s)}})),t.push(n.commands.registerCommand("git.api.getRemoteSources",t=>{if(e.model)return s.pickRemoteSource(e.model,t)})),n.Disposable.from(...t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5),i=r(32),o=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,r,n,i,o){return t=t||e,this.enabled?{operation:{name:r,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new s(n)}:null},e.runWithContext=function(t,r){return e.enabled?e.session.bind(r,((n={})[e.CONTEXT_NAME]=t,n))():r();var n},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t){return e.enabled?e.session.bind(t):t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=r(137):this.cls=r(149)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0):this.enabled=!1)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,r=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,n=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&r)&&n},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();t.CorrelationContextManager=o;var s=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var r=this.props[t];if(r.key===e)return r.value}},e.prototype.setProperty=function(t,r){if(e.bannedCharacters.test(t)||e.bannedCharacters.test(r))n.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+t+" and value: "+r);else{for(var i=0;i<this.props.length;++i){var o=this.props[i];if(o.key===t)return void(o.value=r)}this.props.push({key:t,value:r})}},e.bannedCharacters=/[,=]/,e}()},function(e,t,r){"use strict";var n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",function(e){e.COMMITTED_BYTES="\\Memory\\Committed Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",e.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",e.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",e.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",e.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",e.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",e.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"}(n=t.QuickPulseCounter||(t.QuickPulseCounter={})),function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=t.PerformanceCounter||(t.PerformanceCounter={})),t.PerformanceToQuickPulseCounter=((o={})[i.PROCESSOR_TIME]=n.PROCESSOR_TIME,o[i.REQUEST_RATE]=n.REQUEST_RATE,o[i.REQUEST_DURATION]=n.REQUEST_DURATION,o[n.COMMITTED_BYTES]=n.COMMITTED_BYTES,o[n.REQUEST_FAILURE_RATE]=n.REQUEST_FAILURE_RATE,o[n.DEPENDENCY_RATE]=n.DEPENDENCY_RATE,o[n.DEPENDENCY_FAILURE_RATE]=n.DEPENDENCY_FAILURE_RATE,o[n.DEPENDENCY_DURATION]=n.DEPENDENCY_DURATION,o[n.EXCEPTION_RATE]=n.EXCEPTION_RATE,o),t.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability"},t.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument"},t.TelemetryTypeStringToQuickPulseType={EventData:t.QuickPulseType.Event,ExceptionData:t.QuickPulseType.Exception,MessageData:t.QuickPulseType.Trace,MetricData:t.QuickPulseType.Metric,RequestData:t.QuickPulseType.Request,RemoteDependencyData:t.QuickPulseType.Dependency,AvailabilityData:t.QuickPulseType.Availability},t.TelemetryTypeStringToQuickPulseDocumentType={EventData:t.QuickPulseDocumentType.Event,ExceptionData:t.QuickPulseDocumentType.Exception,MessageData:t.QuickPulseDocumentType.Trace,MetricData:t.QuickPulseDocumentType.Metric,RequestData:t.QuickPulseDocumentType.Request,RemoteDependencyData:t.QuickPulseDocumentType.Dependency,AvailabilityData:t.QuickPulseDocumentType.Availability}},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";e.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}},function(e,t,r){"use strict";var n=r(15),i=r(28),o=r(5),s=r(9),a=r(26),c=r(178),u=r(23),l=r(19),h=r(62),p=r(32),d=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),p.IsInitialized&&(r(179).enable(e,this._client),r(180).enable(e,this._client),r(181).enable(e,this._client),r(182).enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;n.get;var r=n.request,o=i.request,s=function(r,n){var i=!n[e.disableCollectionRequestOption]&&!r[e.alreadyAutoCollectedFlag];r[e.alreadyAutoCollectedFlag]=!0,r&&n&&i&&(u.CorrelationContextManager.wrapEmitter(r),e.trackRequest(t._client,{options:n,request:r}))};n.request=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=r.call.apply(r,[n,e].concat(t));return s(o,e),o},i.request=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=o.call.apply(o,[i,e].concat(t));return s(n,e),n},n.get=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i,o=(i=n.request).call.apply(i,[n,e].concat(t));return o.end(),o},i.get=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,o=(n=i.request).call.apply(n,[i,e].concat(t));return o.end(),o}},e.trackRequest=function(t,r){if(r.options&&r.request&&t){var n,i,p=new c(r.options,r.request),d=u.CorrelationContextManager.getCurrentContext();if(d&&d.operation&&d.operation.traceparent&&h.isValidTraceId(d.operation.traceparent.traceId))d.operation.traceparent.updateSpanId(),n=d.operation.traceparent.getBackCompatRequestId();else if(l.w3cEnabled){i=(m=new h).toString(),n=m.getBackCompatRequestId()}else n=d&&d.operation&&d.operation.parentId+e.requestNumber+++".";if(s.canIncludeCorrelationHeader(t,p.getUrl())&&r.request.getHeader&&r.request.setHeader&&t.config&&t.config.correlationId){var f=r.request.getHeader(a.requestContextHeader);try{s.safeIncludeCorrelationHeader(t,r.request,f)}catch(e){o.warn("Request-Context header could not be set. Correlation of requests may be lost",e)}if(d&&d.operation)try{if(r.request.setHeader(a.requestIdHeader,n),r.request.setHeader(a.parentIdHeader,d.operation.id),r.request.setHeader(a.rootIdHeader,n),i||d.operation.traceparent)r.request.setHeader(a.traceparentHeader,i||d.operation.traceparent.toString());else if(l.w3cEnabled){var m=(new h).toString();r.request.setHeader(a.traceparentHeader,m)}if(d.operation.tracestate){var g=d.operation.tracestate.toString();g&&r.request.setHeader(a.traceStateHeader,g)}var y=d.customProperties.serializeToHeader();y&&r.request.setHeader(a.correlationContextHeader,y)}catch(e){o.warn("Correlation headers could not be set. Correlation of requests may be lost.",e)}}r.request.on&&(r.request.on("response",(function(e){p.onResponse(e);var i=p.getDependencyTelemetry(r,n);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=r.options,i.contextObjects["http.ClientRequest"]=r.request,i.contextObjects["http.ClientResponse"]=e,t.trackDependency(i)})),r.request.on("error",(function(e){p.onError(e);var i=p.getDependencyTelemetry(r,n);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=r.options,i.contextObjects["http.ClientRequest"]=r.request,i.contextObjects.Error=e,t.trackDependency(i)})))}else o.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!r.options,!r.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();e.exports=d},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("child_process")},function(e,t){e.exports=require("timers")},function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.Repository=t.Resource=void 0;const i=r(4),o=r(0),s=r(1),a=r(8),c=r(108),u=r(18),l=r(40),h=r(109),p=r(21),d=r(6),f=r(110),m=r(46),g=r(22),y=e=>new Promise(t=>setTimeout(t,e)),v=a.loadMessageBundle(r(0).join(__dirname,"repository.ts")),w=o.join(o.dirname(__dirname),"resources","icons");function b(e,t){return s.Uri.file(o.join(w,t,e+".svg"))}class _{constructor(e,t,r,n,i,o){this._commandResolver=e,this._resourceGroupType=t,this._resourceUri=r,this._type=n,this._useIcons=i,this._renameResourceUri=o}static getStatusText(e){switch(e){case 0:return v(0,null);case 5:return v(1,null);case 1:return v(2,null);case 2:return v(3,null);case 6:return v(4,null);case 3:return v(5,null);case 4:return v(6,null);case 7:return v(7,null);case 8:return v(8,null);case 9:return v(9,null);case 15:return v(10,null);case 10:return v(11,null);case 13:return v(12,null);case 11:return v(13,null);case 12:return v(14,null);case 14:return v(15,null);case 16:return v(16,null);default:return""}}get resourceUri(){return!this.renameResourceUri||5!==this._type&&6!==this._type&&3!==this._type&&4!==this._type?this._resourceUri:this.renameResourceUri}get leftUri(){return this.resources[0]}get rightUri(){return this.resources[1]}get command(){return this._commandResolver.resolveDefaultCommand(this)}get resources(){return this._commandResolver.getResources(this)}get resourceGroupType(){return this._resourceGroupType}get type(){return this._type}get original(){return this._resourceUri}get renameResourceUri(){return this._renameResourceUri}getIconPath(e){switch(this.type){case 0:case 5:return _.Icons[e].Modified;case 1:return _.Icons[e].Added;case 2:case 6:return _.Icons[e].Deleted;case 3:return _.Icons[e].Renamed;case 4:return _.Icons[e].Copied;case 7:return _.Icons[e].Untracked;case 8:return _.Icons[e].Ignored;case 9:return _.Icons[e].Added;case 15:case 10:case 13:case 11:case 12:case 14:case 16:return _.Icons[e].Conflict;default:throw new Error("Unknown git status: "+this.type)}}get tooltip(){return _.getStatusText(this.type)}get strikeThrough(){switch(this.type){case 6:case 15:case 13:case 12:case 2:return!0;default:return!1}}get faded(){return!1}get decorations(){const e=this._useIcons?{iconPath:this.getIconPath("light")}:void 0,t=this._useIcons?{iconPath:this.getIconPath("dark")}:void 0,r=this.tooltip;return{strikeThrough:this.strikeThrough,faded:this.faded,tooltip:r,light:e,dark:t}}get letter(){switch(this.type){case 0:case 5:return"M";case 1:case 9:return"A";case 2:case 6:return"D";case 3:return"R";case 7:return"U";case 8:return"I";case 13:case 12:return"D";case 4:return"C";case 15:case 10:case 11:case 14:case 16:return"!";default:throw new Error("Unknown git status: "+this.type)}}get color(){switch(this.type){case 0:return new s.ThemeColor("gitDecoration.stageModifiedResourceForeground");case 5:return new s.ThemeColor("gitDecoration.modifiedResourceForeground");case 2:return new s.ThemeColor("gitDecoration.stageDeletedResourceForeground");case 6:return new s.ThemeColor("gitDecoration.deletedResourceForeground");case 1:case 9:return new s.ThemeColor("gitDecoration.addedResourceForeground");case 4:case 3:return new s.ThemeColor("gitDecoration.renamedResourceForeground");case 7:return new s.ThemeColor("gitDecoration.untrackedResourceForeground");case 8:return new s.ThemeColor("gitDecoration.ignoredResourceForeground");case 15:case 10:case 13:case 11:case 12:case 14:case 16:return new s.ThemeColor("gitDecoration.conflictingResourceForeground");default:throw new Error("Unknown git status: "+this.type)}}get priority(){switch(this.type){case 0:case 5:case 4:return 2;case 8:return 3;case 15:case 10:case 13:case 11:case 12:case 14:case 16:return 4;default:return 1}}get resourceDecoration(){const e=new s.FileDecoration(this.letter,this.tooltip,this.color);return e.propagate=6!==this.type&&2!==this.type,e}async open(){const e=this.command;await s.commands.executeCommand(e.command,...e.arguments||[])}async openFile(){const e=this._commandResolver.resolveFileCommand(this);await s.commands.executeCommand(e.command,...e.arguments||[])}async openChange(){const e=this._commandResolver.resolveChangeCommand(this);await s.commands.executeCommand(e.command,...e.arguments||[])}}function C(e){switch(e){case"Blame":case"CheckIgnore":case"Diff":case"GetTracking":case"GetBranch":case"GetCommitTemplate":case"GetObjectDetails":case"Log":case"LogFile":case"MergeBase":case"Show":return!0;default:return!1}}function E(e){switch(e){case"Fetch":case"CheckIgnore":case"GetObjectDetails":case"Show":return!1;default:return!0}}_.Icons