text: !function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){e.exports=require("path")},function(e,t){e.exports=require("vscode")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,s,i,a,c=n(0),u=n(13),l=Object.prototype.toString;function f(e){return void 0!==e}function p(e){return"[object String]"===l.call(e)}function h(e){return JSON.parse(u.readFileSync(e,"utf8"))}function d(e,t){return a&&(e="［"+e.replace(/[aouei]/g,"$&$&")+"］"),0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var r=n[0],o=t[r],s=e;return"string"==typeof o?s=o:"number"!=typeof o&&"boolean"!=typeof o&&void 0!==o&&null!==o||(s=String(o)),s})}function g(e){return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return function(e){return"[object Number]"===l.call(e)}(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):d(e[t],r):p(n)?(console.warn("Message "+n+" didn't get externalized correctly."),d(n,r)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function m(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return d(t,n)}function v(e,t){return s[e]=t,t}function b(e,t){var n,r=c.join(i.cacheRoot,e.id+"-"+e.hash+".json"),o=!1,s=!1;try{return n=JSON.parse(u.readFileSync(r,{encoding:"utf8",flag:"r"})),function(e){var t=new Date;u.utimes(e,t,t,function(){})}(r),n}catch(e){if("ENOENT"===e.code)s=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),u.unlink(r,function(e){e&&console.error("Deleting corrupted bundle "+r+" failed.")}),o=!0}}if(!(n=function(e,t){var n=i.translationsConfig[e.id];if(n){var r=h(n).contents,o=h(c.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in o){var u=o[a],l=r[e.outDir+"/"+a];if(l){for(var f=[],d=0;d<u.keys.length;d++){var g=u.keys[d],m=l[p(g)?g:g.key];void 0===m&&(m=u.messages[d]),f.push(m)}s[a]=f}else s[a]=u.messages}return s}}(e,t))||o)return n;if(s)try{u.writeFileSync(r,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}function y(e){try{return function(e){var t=h(c.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var o=t[r];n[r]=o.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function w(e,t){var n;if(!0===i.languagePackSupport&&void 0!==i.cacheRoot&&void 0!==i.languagePackId&&void 0!==i.translationsConfigFile&&void 0!==i.translationsConfig)try{n=b(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(i.languagePackSupport)return y(t);var r=function(e){for(var t=i.locale;t;){var n=c.join(e,"nls.bundle."+t+".json");if(u.existsSync(n))return n;var r=t.lastIndexOf("-");t=r>0?t.substring(0,r):void 0}if(void 0===t&&(n=c.join(e,"nls.bundle.json"),u.existsSync(n)))return n}(t);if(r)try{return h(r)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=y(t)}return n}function k(e){if(!e)return m;var t=c.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),i.messageFormat===r.both||i.messageFormat===r.bundle){var n=function(e){for(var t,n=c.dirname(e);t=c.join(n,"nls.metadata.header.json"),!u.existsSync(t);){var r=c.dirname(n);if(r===n){t=void 0;break}n=r}return t}(e);if(n){var o=c.dirname(n),l=s[o];if(void 0===l)try{var p=JSON.parse(u.readFileSync(n,"utf8"));try{var d=w(p,o);l=v(o,d?{header:p,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),l=v(o,null)}}catch(e){console.error("Failed to read header file",e),l=v(o,null)}if(l){var b=e.substr(o.length+1).replace(/\\/g,"/"),y=l.nlsBundle[b];return void 0===y?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):g(y)}}}if(i.messageFormat===r.both||i.messageFormat===r.file)try{var k=h(function(e){var t;if(i.cacheLanguageResolution&&t)t=t;else{if(a||!i.locale)t=".nls.json";else for(var n=i.locale;n;){var r=".nls."+n+".json";if(u.existsSync(e+r)){t=r;break}var o=n.lastIndexOf("-");o>0?n=n.substring(0,o):(t=".nls.json",n=null)}i.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(k)?g(k):f(k.messages)&&f(k.keys)?g(k.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"}(r=t.MessageFormat||(t.MessageFormat={})),function(e){e.is=function(e){var t=e;return t&&f(t.key)&&f(t.comment)}}(o||(o={})),function(){if(i={locale:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:r.bundle},p(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG);if(p(e.locale)&&(i.locale=e.locale.toLowerCase()),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(i.languagePackSupport=e._languagePackSupport),p(e._cacheRoot)&&(i.cacheRoot=e._cacheRoot),p(e._languagePackId)&&(i.languagePackId=e._languagePackId),p(e._translationsConfigFile)){i.translationsConfigFile=e._translationsConfigFile;try{i.translationsConfig=h(i.translationsConfigFile)}catch(t){e._corruptedFile&&u.writeFile(e._corruptedFile,"corrupted","utf8",function(e){console.error(e)})}}}catch(e){}a="pseudo"===i.locale,void 0,s=Object.create(null)}(),t.loadMessageBundle=k,t.config=function(e){return e&&(p(e.locale)&&(i.locale=e.locale.toLowerCase(),void 0,s=Object.create(null)),void 0!==e.messageFormat&&(i.messageFormat=e.messageFormat)),a="pseudo"===i.locale,k}},function(e,t){e.exports=require("url")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(0),s=n(13),i=n(37),a=n(2),c=n(6),u=a.loadMessageBundle(n(0).join(__dirname,"tasks.ts"));let l=void 0;t.NpmTaskProvider=class{constructor(){}provideTasks(){return g()}resolveTask(e){}},t.invalidateTasksCache=function(){l=void 0};const f=["build","compile","watch"];const p=["test"];function h(e){return e&&"number"!=typeof e}function d(e){return r.workspace.getConfiguration("npm",e.uri).get("packageManager","npm")}async function g(){return l||(l=await async function(){let e=[],t=[],n=new Set,o=r.workspace.workspaceFolders;if(!o)return e;try{for(const e of o)if(m(e)){let o=new r.RelativePattern(e,"**/package.json"),s=await r.workspace.findFiles(o,"**/node_modules/**");for(const r of s)if(!v(e,r)&&!n.has(r.fsPath)){let e=await b(r);n.add(r.fsPath),t.push(...e)}}return t}catch(e){return Promise.reject(e)}}()),l}function m(e){return"on"===r.workspace.getConfiguration("npm",e.uri).get("autoDetect")}function v(e,t){function n(e,t){return i(e,t,{dot:!0})}let s=r.workspace.getConfiguration("npm",e.uri).get("exclude"),a=o.dirname(t.fsPath);if(s)if(Array.isArray(s)){for(let e of s)if(n(a,e))return!0}else if(n(a,s))return!0;return!1}async function b(e){let t=[],n=r.workspace.getWorkspaceFolder(e);if(!n)return t;let o=await k(e);if(!o)return t;const s=[],i=function(e){const t=new Set(["preuninstall","postuninstall","prepack","postpack","preinstall","postinstall","prepack","postpack","prepublish","postpublish","preversion","postversion","prestop","poststop","prerestart","postrestart","preshrinkwrap","postshrinkwrap","pretest","postest","prepublishOnly"]);let n=Object.keys(e);for(const r of n)["pre"+r,"post"+r].forEach(n=>{void 0!==e[n]&&t.add(n)});return t}(o);return Object.keys(o).forEach(t=>{const a=w(t,`run ${t}`,n,e),c=t.toLowerCase();!function(e){for(let t of f)if(-1!==e.indexOf(t))return!0;return!1}(c)?function(e){for(let t of p)if(e===t)return!0;return!1}(c)&&(a.group=r.TaskGroup.Test):a.group=r.TaskGroup.Build,i.has(t)&&(a.group=r.TaskGroup.Clean),function(e){return null!==e.match(/--(inspect|debug)(-brk)?(=((\[[0-9a-fA-F:]*\]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9\.]*):)?(\d+))?/)}(o[t])&&(a.group=r.TaskGroup.Rebuild),s.push(a)}),s.push(w("install","install",n,e,[])),s}function y(e,t){return t&&t.length?`${e} - ${t.substring(0,t.length-1)}`:e}function w(e,t,n,s,i){function a(e,t){let n=e.uri;return t.path.substring(0,t.path.length-"package.json".length).substring(n.path.length+1)}let c={type:"npm",script:e},u=a(n,s);u.length&&(c.path=a(n,s));let l=y(e,u),f=o.dirname(s.fsPath);return new r.Task(c,n,l,"npm",new r.ShellExecution(function(e,t){let n=d(e);return r.workspace.getConfiguration("npm",e.uri).get("runSilent")?`${n} --silent ${t}`:`${n} ${t}`}(n,t),{cwd:f}),i)}async function k(e){if("file"!==e.scheme)return;let t=e.fsPath;if(await async function(e){return new Promise((t,n)=>{s.exists(e,e=>{t(e)})})}(t))try{return async function(e){let t={},n=void 0,r=!1,o={onError(e,t,n){console.log(e)},onObjectEnd(){r&&(r=!1)},onLiteralValue(e,r,o){n&&("string"==typeof e&&(t[n]=e),n=void 0)},onObjectProperty(e,t,o){"scripts"===e?r=!0:n=r&&!n?e:void 0}};return c.visit(e,o),t}(await async function(e){return new Promise((t,n)=>{s.readFile(e,(e,r)=>{e&&n(e),t(r.toString())})})}(t))}catch(t){let n=u(0,null,e.fsPath);throw new Error(n)}}t.isWorkspaceFolder=h,t.getPackageManager=d,t.hasNpmScripts=async function(){let e=r.workspace.workspaceFolders;if(!e)return!1;try{for(const t of e)if(m(t)){let e=new r.RelativePattern(t,"**/package.json");if((await r.workspace.findFiles(e,"**/node_modules/**")).length>0)return!0}return!1}catch(e){return Promise.reject(e)}},t.provideNpmScripts=g,t.getTaskName=y,t.createTask=w,t.getPackageJsonUriFromTask=function(e){return h(e.scope)?e.definition.path?r.Uri.file(o.join(e.scope.uri.fsPath,e.definition.path,"package.json")):r.Uri.file(o.join(e.scope.uri.fsPath,"package.json")):null},t.runScript=function(e,t){let n=t.uri,o=r.workspace.getWorkspaceFolder(n);if(o){let t=w(e,`run ${e}`,o,n);r.tasks.executeTask(t)}},t.extractDebugArgFromScript=function(e){let t=e.match(/--(inspect|debug)(-brk)?(=((\[[0-9a-fA-F:]*\]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9\.]*):)?(\d+))?/);if(t){if(t[6])return[t[1],parseInt(t[6])];if("inspect"===t[1])return[t[1],9229];if("debug"===t[1])return[t[1],5858]}},t.startDebugging=function(e,t,n,o){let s="inspector";"debug"===t&&(s="legacy");const i={type:"node",request:"launch",name:`Debug ${e}`,runtimeExecutable:d(o),runtimeArgs:["run",e],port:n,protocol:s};o&&r.debug.startDebugging(o,i)},t.findAllScriptRanges=function(e){let t,n,r=new Map,o=void 0,s=!1,i={onError(e,t,n){},onObjectEnd(){s&&(s=!1)},onLiteralValue(e,s,i){o&&(r.set(o,[t,n,e]),o=void 0)},onObjectProperty(e,r,i){"scripts"===e?s=!0:s&&(o=e,t=r,n=i)}};return c.visit(e,i),r},t.findScriptAtPosition=function(e,t){let n,r=void 0,o=void 0,s=!1,i={onError(e,t,n){},onObjectEnd(){s&&(s=!1,n=void 0)},onLiteralValue(e,i,a){s&&n&&("string"==typeof e&&t>=n&&t<i+a?(s=!1,o=r):r=void 0)},onObjectProperty(e,t){"scripts"===e?s=!0:s?(n=t,r=e):r=void 0}};return c.visit(e,i),o},t.getScripts=k},function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=0,r=e.length,a="",c=0,u=16,l=0;function f(t,r){for(var o=0,s=0;o<t||!r;){var i=e.charCodeAt(n);if(i>=48&&i<=57)s=16*s+i-48;else if(i>=65&&i<=70)s=16*s+i-65+10;else{if(!(i>=97&&i<=102))break;s=16*s+i-97+10}n++,o++}return o<t&&(s=-1),s}function p(){if(a="",l=0,c=n,n>=r)return c=r,u=17;var t=e.charCodeAt(n);if(o(t)){do{n++,a+=String.fromCharCode(t),t=e.charCodeAt(n)}while(o(t));return u=15}if(s(t))return n++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,a+="\n"),u=14;switch(t){case 123:return n++,u=1;case 125:return n++,u=2;case 91:return n++,u=3;case 93:return n++,u=4;case 58:return n++,u=6;case 44:return n++,u=5;case 34:return n++,a=function(){for(var t="",o=n;;){if(n>=r){t+=e.substring(o,n),l=2;break}var i=e.charCodeAt(n);if(34===i){t+=e.substring(o,n),n++;break}if(92!==i){if(i>=0&&i<=31){if(s(i)){t+=e.substring(o,n),l=2;break}l=6}n++}else{if(t+=e.substring(o,n),++n>=r){l=2;break}switch(i=e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=f(4,!0);a>=0?t+=String.fromCharCode(a):l=4;break;default:l=5}o=n}}return t}(),u=10;case 47:var p=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!s(e.charCodeAt(n));)n++;return a=e.substring(p,n),u=12}if(42===e.charCodeAt(n+1)){n+=2;for(var d=!1;n<r;){if(42===e.charCodeAt(n)&&n+1<r&&47===e.charCodeAt(n+1)){n+=2,d=!0;break}n++}return d||(n++,l=1),a=e.substring(p,n),u=13}return a+=String.fromCharCode(t),n++,u=16;case 45:if(a+=String.fromCharCode(t),++n===r||!i(e.charCodeAt(n)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){var t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&i(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(!(++n<e.length&&i(e.charCodeAt(n))))return l=3,e.substring(t,n);for(n++;n<e.length&&i(e.charCodeAt(n));)n++}var r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if((++n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&i(e.charCodeAt(n))){for(n++;n<e.length&&i(e.charCodeAt(n));)n++;r=n}else l=3;return e.substring(t,r)}(),u=11;default:for(;n<r&&h(t);)n++,t=e.charCodeAt(n);if(c!==n){switch(a=e.substring(c,n)){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),n++,u=16}}function h(e){if(o(e)||s(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){n=e,a="",c=0,u=16,l=0},getPosition:function(){return n},scan:t?function(){var e;do{e=p()}while(e>=12&&e<=15);return e}:p,getToken:function(){return u},getTokenValue:function(){return a},getTokenOffset:function(){return c},getTokenLength:function(){return n-c},getTokenError:function(){return l}}}function o(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function s(e){return 10===e||13===e||8232===e||8233===e}function i(e){return e>=48&&e<=57}function a(e,t,n){var o,s,i,a,l;if(t){for(a=t.offset,l=a+t.length,i=a;i>0&&!u(e,i-1);)i--;for(var f=l;f<e.length&&!u(e,f);)f++;s=e.substring(i,f),o=function(e,t){var n=0,r=0,o=t.tabSize||4;for(;n<e.length;){var s=e.charAt(n);if(" "===s)r++;else{if("\t"!==s)break;r+=o}n++}return Math.floor(r/o)}(s,n)}else s=e,o=0,i=0,a=0,l=e.length;var p,h=function(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}(n,e),d=!1,g=0;p=n.insertSpaces?c(" ",n.tabSize||4):"\t";var m=r(s,!1),v=!1;function b(){return h+c(p,o+g)}function y(){var e=m.scan();for(d=!1;15===e||14===e;)d=d||14===e,e=m.scan();return v=16===e||0!==m.getTokenError(),e}var w=[];function k(t,n,r){!v&&n<l&&r>a&&e.substring(n,r)!==t&&w.push({offset:n,length:r-n,content:t})}var C=y();if(17!==C){var S=m.getTokenOffset()+i;k(c(p,o),i,S)}for(;17!==C;){for(var T=m.getTokenOffset()+m.getTokenLength()+i,x=y(),O="";!d&&(12===x||13===x);){k(" ",T,m.getTokenOffset()+i),T=m.getTokenOffset()+m.getTokenLength()+i,O=12===x?b():"",x=y()}if(2===x)1!==C&&(g--,O=b());else if(4===x)3!==C&&(g--,O=b());else{switch(C){case 3:case 1:g++,O=b();break;case 5:case 12:O=b();break;case 13:O=d?b():" ";break;case 6:O=" ";break;case 10:if(6===x){O="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===x||13===x?O=" ":5!==x&&17!==x&&(v=!0);break;case 16:v=!0}!d||12!==x&&13!==x||(O=b())}k(O,T,m.getTokenOffset()+i),C=x}return w}function c(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function u(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function l(e,t,n){void 0===t&&(t=[]);var r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(e){"property"===r.type&&(r.length=e-r.offset,r=r.parent)}function s(e){return r.children.push(e),e}p(e,{onObjectBegin:function(e){r=s({type:"object",offset:e,length:-1,parent:r,children:[]})},onObjectProperty:function(e,t,n){(r=s({type:"property",offset:t,length:-1,parent:r,children:[]})).children.push({type:"string",value:e,offset:t,length:n,parent:r})},onObjectEnd:function(e,t){r.length=e+t-r.offset,r=r.parent,o(e+t)},onArrayBegin:function(e,t){r=s({type:"array",offset:e,length:-1,parent:r,children:[]})},onArrayEnd:function(e,t){r.length=e+t-r.offset,r=r.parent,o(e+t)},onLiteralValue:function(e,t,n){s({type:h(e),offset:t,length:n,parent:r,value:e}),o(t+n)},onSeparator:function(e,t,n){"property"===r.type&&(":"===e?r.colonOffset=t:","===e&&o(t))},onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n);var i=r.children[0];return i&&delete i.parent,i}function f(e,t){if(e){for(var n=e,r=0,o=t;r<o.length;r++){var s=o[r];if("string"==typeof s){if("object"!==n.type||!Array.isArray(n.children))return;for(var i=!1,a=0,c=n.children;a<c.length;a++){var u=c[a];if(Array.isArray(u.children)&&u.children[0].value===s){n=u.children[1],i=!0;break}}if(!i)return}else{var l=s;if("array"!==n.type||l<0||!Array.isArray(n.children)||l>=n.children.length)return;n=n.children[l]}}return n}}function p(e,t,n){var o=r(e,!1);function s(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength())}:function(){return!0}}function i(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength())}:function(){return!0}}var a=s(t.onObjectBegin),c=i(t.onObjectProperty),u=s(t.onObjectEnd),l=s(t.onArrayBegin),f=s(t.onArrayEnd),p=i(t.onLiteralValue),h=i(t.onSeparator),d=s(t.onComment),g=i(t.onError),m=n&&n.disallowComments,v=n&&n.allowTrailingComma;function b(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:m||y(11);break;case 2:y(12);break;case 6:y(16)}switch(e){case 12:case 13:m?y(10):d();break;case 16:y(1);break;case 15:case 14:break;default:return e}}}function y(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),g(e),t.length+n.length>0)for(var r=o.getToken();17!==r;){if(-1!==t.indexOf(r)){b();break}if(-1!==n.indexOf(r))break;r=b()}}function w(e){var t=o.getTokenValue();return e?p(t):c(t),b(),!0}function k(){switch(o.getToken()){case 3:return function(){l(),b();for(var e=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||y(4,[],[]),h(","),b(),4===o.getToken()&&v)break}else e&&y(6,[],[]);k()||y(4,[],[4,5]),e=!0}return f(),4!==o.getToken()?y(8,[4],[]):b(),!0}();case 1:return function(){a(),b();for(var e=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||y(4,[],[]),h(","),b(),2===o.getToken()&&v)break}else e&&y(6,[],[]);(10!==o.getToken()?(y(3,[],[2,5]),0):(w(!1),6===o.getToken()?(h(":"),b(),k()||y(4,[],[2,5])):y(5,[],[2,5]),1))||y(4,[],[2,5]),e=!0}return u(),2!==o.getToken()?y(7,[2],[]):b(),!0}();case 10:return w(!0);default:return function(){switch(o.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(o.getTokenValue()))&&(y(2),e=0)}catch(e){y(2)}p(e);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return b(),!0}()}}return b(),17===o.getToken()||(k()?(17!==o.getToken()&&y(9,[],[]),!0):(y(4,[],[]),!1))}function h(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}function d(e,t,n,r,o){for(var s,i=t.slice(),a=l(e,[]),c=void 0,u=void 0;i.length>0&&(u=i.pop(),void 0===(c=f(a,i))&&void 0!==n);)"string"==typeof u?((s={})[u]=n,n=s):n=[n];if(c){if("object"===c.type&&"string"==typeof u&&Array.isArray(c.children)){var p=f(c,[u]);if(void 0!==p){if(void 0===n){if(!p.parent)throw new Error("Malformed AST");var h=c.children.indexOf(p.parent),d=void 0,m=p.parent.offset+p.parent.length;if(h>0)d=(C=c.children[h-1]).offset+C.length;else if(d=c.offset+1,c.children.length>1)m=c.children[1].offset;return g(e,{offset:d,length:m-d,content:""},r)}return g(e,{offset:p.offset,length:p.length,content:JSON.stringify(n)},r)}if(void 0===n)return[];var v=JSON.stringify(u)+": "+JSON.stringify(n),b=o?o(c.children.map(function(e){return e.children[0].value})):c.children.length,y=void 0;return g(e,y=b>0?{offset:(C=c.children[b-1]).offset+C.length,length:0,content:","+v}:0===c.children.length?{offset:c.offset+1,length:0,content:v}:{offset:c.offset+1,length:0,content:v+","},r)}if("array"===c.type&&"number"==typeof u&&Array.isArray(c.children)){if(-1===u){v=""+JSON.stringify(n),y=void 0;if(0===c.children.length)y={offset:c.offset+1,length:0,content:v};else y={offset:(C=c.children[c.children.length-1]).offset+C.length,length:0,content:","+v};return g(e,y,r)}if(void 0===n&&c.children.length>=0){var w=u,k=c.children[w];y=void 0;if(1===c.children.length)y={offset:c.offset+1,length:c.length-2,content:""};else if(c.children.length-1===w){var C,S=(C=c.children[w-1]).offset+C.length;y={offset:S,length:c.offset+c.length-2-S,content:""}}else y={offset:k.offset,length:c.children[w+1].offset-k.offset,content:""};return g(e,y,r)}throw new Error("Array modification not supported yet")}throw new Error("Can not add "+("number"!=typeof u?"index":"property")+" to parent of type "+c.type)}if(void 0===n)throw new Error("Can not delete in empty document");return g(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}function g(e,t,n){var r=m(e,t),o=t.offset,s=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;o>0&&!u(r,o-1);)o--;for(;s<r.length&&!u(r,s);)s++}for(var i=a(r,{offset:o,length:s-o},n),c=i.length-1;c>=0;c--){var l=i[c];r=m(r,l),o=Math.min(o,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}return[{offset:o,length:e.length-(r.length-s)-o,content:r.substring(o,s)}]}function m(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}n.r(t),n.d(t,"createScanner",function(){return v}),n.d(t,"getLocation",function(){return b}),n.d(t,"parse",function(){return y}),n.d(t,"parseTree",function(){return w}),n.d(t,"findNodeAtLocation",function(){return k}),n.d(t,"findNodeAtOffset",function(){return C}),n.d(t,"getNodePath",function(){return S}),n.d(t,"getNodeValue",function(){return T}),n.d(t,"visit",function(){return x}),n.d(t,"stripComments",function(){return O}),n.d(t,"format",function(){return j}),n.d(t,"modify",function(){return A}),n.d(t,"applyEdits",function(){return P});var v=r,b=function(e,t){var n=[],r=new Object,o=void 0,s={value:{},offset:0,length:0,type:"object",parent:void 0},i=!1;function a(e,t,n,r){s.value=e,s.offset=t,s.length=n,s.type=r,s.colonOffset=void 0,o=s}try{p(e,{onObjectBegin:function(e,s){if(t<=e)throw r;o=void 0,i=t>e,n.push("")},onObjectProperty:function(e,o,s){if(t<o)throw r;if(a(e,o,s,"property"),n[n.length-1]=e,t<=o+s)throw r},onObjectEnd:function(e,s){if(t<=e)throw r;o=void 0,n.pop()},onArrayBegin:function(e,s){if(t<=e)throw r;o=void 0,n.push(0)},onArrayEnd:function(e,s){if(t<=e)throw r;o=void 0,n.pop()},onLiteralValue:function(e,n,o){if(t<n)throw r;if(a(e,n,o,h(e)),t<=n+o)throw r},onSeparator:function(e,s,a){if(t<=s)throw r;if(":"===e&&o&&"property"===o.type)o.colonOffset=s,i=!1,o=void 0;else if(","===e){var c=n[n.length-1];"number"==typeof c?n[n.length-1]=c+1:(i=!0,n[n.length-1]=""),o=void 0}}})}catch(e){if(e!==r)throw e}return{path:n,previousNode:o,isAtPropertyKey:i,matches:function(e){for(var t=0,r=0;t<e.length&&r<n.length;r++)if(e[t]===n[r]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},y=function(e,t,n){void 0===t&&(t=[]);var r=null,o=[],s=[];function i(e){Array.isArray(o)?o.push(e):r&&(o[r]=e)}return p(e,{onObjectBegin:function(){var e={};i(e),s.push(o),o=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];i(e),s.push(o),o=e,r=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:i,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),o[0]},w=l,k=f,C=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){var o=t.children;if(Array.isArray(o))for(var s=0;s<o.length&&o[s].offset<=n;s++){var i=e(o[s],n,r);if(i)return i}return t}},S=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&n.push(o)}return n},T=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,o=t.children;r<o.length;r++){var s=o[r],i=s.children[1];i&&(n[s.children[0].value]=e(i))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}},x=p,O=function(e,t){var n,o,s=r(e),i=[],a=0;do{switch(o=s.getPosition(),n=s.scan()){case 12:case 13:case 17:a!==o&&i.push(e.substring(a,o)),void 0!==t&&i.push(s.getTokenValue().replace(/[^\r\n]/g,t)),a=s.getPosition()}}while(17!==n);return i.join("")};function j(e,t,n){return a(e,t,n)}function A(e,t,n,r){return d(e,t,n,r.formattingOptions,r.getInsertionIndex)}function P(e,t){for(var n=t.length-1;n>=0;n--)e=m(e,t[n]);return e}},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("net")},function(e,t){e.exports=require("tls")},function(e,t,n){"use strict";n(19);const r=n(4).inherits,o=n(20),s=n(23).EventEmitter;function i(e,t){if(!(this instanceof i))return new i(e,t);s.call(this),this._promisifiedCallback=!1;let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=n&&n.timeout||null,this.options=n}e.exports=i,r(i,s),i.prototype.callback=function(e,t){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')},i.prototype.addRequest=function(e,t){const n=Object.assign({},t);null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80);const r=Object.assign({},this.options,n);let s;r.host&&r.path&&delete r.path,delete r.agent,delete r.hostname,delete r._defaultAgent,delete r.defaultPort,delete r.createConnection,e._last=!0,e.shouldKeepAlive=!1;let i=!1;const a=this.timeout;function c(t){e._hadError||(e.emit("error",t),e._hadError=!0)}function u(e){i||(null!=s&&(clearTimeout(s),s=null),c(e))}!this._promisifiedCallback&&this.callback.length>=3&&(this.callback=o(this.callback,this),this._promisifiedCallback=!0),a>0&&(s=setTimeout(function(){s=null,i=!0;const e=new Error('A "socket" was not created for HTTP request before '+a+"ms");e.code="ETIMEOUT",c(e)},a));try{Promise.resolve(this.callback(e,r)).then(function(t){i||(null!=s&&(clearTimeout(s),s=null),function(e){return e&&"function"==typeof e.addRequest}(t)?t.addRequest(e,r):t?e.onSocket(t):c(new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``)))},u)}catch(e){Promise.reject(e).catch(u)}}},function(e,t,n){"undefined"==typeof process||"renderer"===process.type?e.exports=n(24):e.exports=n(26)},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,s=o-(n||o);e.diff=s,e.prev=n,e.curr=o,n=o;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=t.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var c=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var s=i[c];n=o.call(e,s),i.splice(c,1),c--}return n}),t.formatArgs.call(e,i),(r.log||t.log||console.log.bind(console)).apply(e,i)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var s=t.instances[n];s.enabled=t.enabled(s.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(25),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.textToMarkedString=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(16),o=n(1),s=n(33),i=n(36),a=n(5),c=n(41),u=n(42);let l;function f(){const e=o.workspace.getConfiguration("http");r.configure(e.get("proxy",""),e.get("proxyStrictSSL",!0))}t.activate=async function(e){!function(e){function t(){c.invalidateHoverScriptsCache(),a.invalidateTasksCache(),l&&l.refresh()}if(o.workspace.workspaceFolders){let n=o.workspace.createFileSystemWatcher("**/package.json");n.onDidChange(e=>t()),n.onDidDelete(e=>t()),n.onDidCreate(e=>t()),e.subscriptions.push(n);let r=o.workspace.onDidChangeWorkspaceFolders(e=>t());e.subscriptions.push(r);let s=new a.NpmTaskProvider,i=o.workspace.registerTaskProvider("npm",s);e.subscriptions.push(i)}}(e),l=function(e){if(o.workspace.workspaceFolders){let t=new i.NpmScriptsTreeDataProvider(e);const n=o.window.createTreeView("npm",{treeDataProvider:t,showCollapseAll:!0});return e.subscriptions.push(n),t}}(e),function(e){if(o.workspace.workspaceFolders){let t={language:"json",scheme:"file",pattern:"**/package.json"},n=new c.NpmScriptHoverProvider(e);e.subscriptions.push(o.languages.registerHoverProvider(t,n))}}(e),f();let t=o.workspace.onDidChangeConfiguration(e=>{f(),e.affectsConfiguration("npm.exclude")&&(a.invalidateTasksCache(),l&&l.refresh()),e.affectsConfiguration("npm.scriptExplorerAction")&&l&&l.refresh()});e.subscriptions.push(t),t=o.workspace.onDidChangeTextDocument(e=>{c.invalidateHoverScriptsCache(e.document)}),e.subscriptions.push(t),e.subscriptions.push(o.commands.registerCommand("npm.runSelectedScript",u.runSelectedScript)),e.subscriptions.push(s.addJSONProviders(r.xhr))},t.deactivate=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(7),s=n(17),i=n(18),a=n(31),c=n(32),u=n(2);u.config(process.env.VSCODE_NLS_CONFIG);var l=u.loadMessageBundle(),f=null,p=!0;function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}t.configure=function(e,t){f=e,p=t},t.xhr=function e(t){var n=function(e,t){void 0===t&&(t={});var n=r.parse(e),o=t.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(n);if(!o)return null;var s=r.parse(o);if(!/^https?:$/.test(s.protocol))return null;var c={host:s.hostname,port:Number(s.port),auth:s.auth,rejectUnauthorized:"boolean"!=typeof t.strictSSL||t.strictSSL};return"http:"===n.protocol?new i(c):new a(c)}(t.url,{proxyUrl:f,strictSSL:p});return"number"!=typeof(t=h(t=h({},t),{agent:n,strictSSL:p})).followRedirects&&(t.followRedirects=5),function e(t){var n;return new Promise(function(i,a){var c=r.parse(t.url),u={hostname:c.hostname,port:c.port?parseInt(c.port):"https:"===c.protocol?443:80,path:c.path,method:t.type||"GET",headers:t.headers,agent:t.agent,rejectUnauthorized:"boolean"!=typeof t.strictSSL||t.strictSSL};t.user&&t.password&&(u.auth=t.user+":"+t.password);var l=function(r){r.statusCode>=300&&r.statusCode<400&&t.followRedirects&&t.followRedirects>0&&r.headers.location?i(e(h({},t,{url:r.headers.location,followRedirects:t.followRedirects-1}))):i({req:n,res:r})};(n="https:"===c.protocol?o.request(u,l):s.request(u,l)).on("error",a),t.timeout&&n.setTimeout(t.timeout),t.data&&n.write(t.data),n.end()})}(t).then(function(n){return new Promise(function(r,o){var s=n.res,i=s,a=s.headers&&s.headers["content-encoding"],u=!1;if("gzip"===a){var f=c.createGunzip();s.pipe(f),i=f}else if("deflate"===a){var p=c.createInflate();s.pipe(p),i=p}var h=[];i.on("data",function(e){return h.push(e)}),i.on("end",function(){if(!u){if(u=!0,t.followRedirects>0&&(s.statusCode>=300&&s.statusCode<=303||307===s.statusCode)){var n=s.headers.location;if(n)return void e({type:t.type,url:n,user:t.user,password:t.password,responseType:t.responseType,headers:t.headers,timeout:t.timeout,followRedirects:t.followRedirects-1,data:t.data}).then(r,o)}var i={responseText:h.join(""),status:s.statusCode};s.statusCode>=200&&s.statusCode<300||1223===s.statusCode?r(i):o(i)}}),i.on("error",function(e){var n={responseText:l("error","Unable to access {0}. Error: {1}",t.url,e.message),status:500};u=!0,o(n)})})},function(e){var r;return r=n?l("error.cannot.connect.proxy","Unable to connect to {0} through a proxy . Error: {1}",t.url,e.message):l("error.cannot.connect","Unable to connect to {0}. Error: {1}",t.url,e.message),Promise.reject({responseText:r,status:404})})},t.getErrorStatusDescription=function(e){if(!(e<400))switch(e){case 400:return l("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return l("status.401","Unauthorized. The server is refusing to respond.");case 403:return l("status.403","Forbidden. The server is refusing to respond.");case 404:return l("status.404","Not Found. The requested location could not be found.");case 405:return l("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return l("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return l("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return l("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return l("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return l("status.410","Gone. The requested page is no longer available.");case 411:return l("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return l("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return l("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return l("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return l("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return l("status.500","Internal Server Error.");case 501:return l("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return l("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return l("status.416","HTTP status code {0}",e)}}},function(e,t){e.exports=require("http")},function(e,t,n){var r=n(8),o=n(9),s=n(3),i=n(10),a=n(4).inherits,c=n(11)("http-proxy-agent");function u(e){if(!(this instanceof u))return new u(e);if("string"==typeof e&&(e=s.parse(e)),!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");c("creating new HttpProxyAgent instance: %o",e),i.call(this,e);var t=Object.assign({},e);this.secureProxy=!!t.protocol&&/^https:?$/i.test(t.protocol),t.host=t.hostname||t.host,t.port=+t.port||(this.secureProxy?443:80),t.host&&t.path&&(delete t.path,delete t.pathname),this.proxy=t}e.exports=u,a(u,i),u.prototype.callback=function(e,t,n){var i=this.proxy,a=s.parse(e.path);null==a.protocol&&(a.protocol="http:"),null==a.hostname&&(a.hostname=t.hostname||t.host),null==a.port&&(a.port=t.port),80==a.port&&delete a.port;var u,l=s.format(a);if(e.path=l,i.auth&&e.setHeader("Proxy-Authorization","Basic "+Buffer.from(i.auth).toString("base64")),u=this.secureProxy?o.connect(i):r.connect(i),e._header&&(c("regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0)){c("patching connection write() output buffer with updated header");var f=e.output[0],p=f.indexOf("\r\n\r\n")+4;e.output[0]=e._header+f.substring(p),c("output buffer: %o",e.output)}n(null,u)}},function(e,t,n){"use strict";const r=n(3),o=n(7);o.request=function(e){return function(t,n){let s;return null==(s="string"==typeof t?r.parse(t):Object.assign({},t)).port&&(s.port=443),s.secureEndpoint=!0,e.call(o,s,n)}}(o.request),o.get=function(e,t){const n=o.request(e,t);return n.end(),n}},function(e,t,n){"use strict";e.exports=function(){var e=n(21);return function(t,n){return function(){for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];var i=n&&n.multiArgs,a=void 0;return n&&n.thisArg?a=n.thisArg:n&&(a=n),new e(function(e,n){o.push(function(t){if(t)return n(t);for(var r=arguments.length,o=Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(!1==!!i)return e(o[0]);e(o)});var r=t.apply(a,o);(function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch})(r)&&e(r)})}}}()},function(e,t,n){"use strict";e.exports=function(){var e=void 0;return e=void 0!==global?global:void 0!==window&&window.document?window:self,function(){if(!e.hasOwnProperty("Promise"))return!1;var t=e.Promise;return!(!t.hasOwnProperty("resolve")||!t.hasOwnProperty("reject"))&&(!(!t.hasOwnProperty("all")||!t.hasOwnProperty("race"))&&function(){var t=void 0;return!!new e.Promise(function(e){t=e})&&function(e){return"function"==typeof e}(t)}())}()?e.Promise:n(22).Promise}()},function(e,t,n){
  /*!
   * @overview es6-promise - a tiny implementation of Promises/A+.
   * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
   * @license   Licensed under MIT license
   *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
   * @version   v4.2.4+314e4831
   */
  !function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,r=void 0,o=void 0,s=function(e,t){p[n]=e,p[n+1]=t,2===(n+=2)&&(o?o(h):d())};var i="undefined"!=typeof window?window:void 0,a=i||{},c=a.MutationObserver||a.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(h,1)}}var p=new Array(1e3);function h(){for(var e=0;e<n;e+=2){(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0}n=0}var d=void 0;function g(e,t){var n=this,r=new this.constructor(b);void 0===r[v]&&I(r);var o=n._state;if(o){var i=arguments[o-1];s(function(){return E(o,r,i,n._result)})}else P(n,r,e,t);return r}function m(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(b);return x(t,e),t}d=u?function(){return process.nextTick(h)}:c?function(){var e=0,t=new c(h),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():l?function(){var e=new MessageChannel;return e.port1.onmessage=h,function(){return e.port2.postMessage(0)}}():void 0===i?function(){try{var e=Function("return this")().require("vertx");return void 0!==(r=e.runOnLoop||e.runOnContext)?function(){r(h)}:f()}catch(e){return f()}}():f();var v=Math.random().toString(36).substring(2);function b(){}var y=void 0,w=1,k=2,C={error:null};function S(e){try{return e.then}catch(e){return C.error=e,C}}function T(t,n,r){n.constructor===t.constructor&&r===g&&n.constructor.resolve===m?function(e,t){t._state===w?j(e,t._result):t._state===k?A(e,t._result):P(t,void 0,function(t){return x(e,t)},function(t){return A(e,t)})}(t,n):r===C?(A(t,C.error),C.error=null):void 0===r?j(t,n):e(r)?function(e,t,n){s(function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,function(n){r||(r=!0,t!==n?x(e,n):j(e,n))},function(t){r||(r=!0,A(e,t))},e._label);!r&&o&&(r=!0,A(e,o))},e)}(t,n,r):j(t,n)}function x(e,t){e===t?A(e,new TypeError("You cannot resolve a promise with itself")):!function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}(t)?j(e,t):T(e,t,S(t))}function O(e){e._onerror&&e._onerror(e._result),_(e)}function j(e,t){e._state===y&&(e._result=t,e._state=w,0!==e._subscribers.length&&s(_,e))}function A(e,t){e._state===y&&(e._state=k,e._result=t,s(O,e))}function P(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+w]=n,o[i+k]=r,0===i&&e._state&&s(_,e)}function _(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,s=e._result,i=0;i<t.length;i+=3)r=t[i],o=t[i+n],r?E(n,r,o,s):o(s);e._subscribers.length=0}}function E(t,n,r,o){var s=e(r),i=void 0,a=void 0,c=void 0,u=void 0;if(s){if((i=function(e,t){try{return e(t)}catch(e){return C.error=e,C}}(r,o))===C?(u=!0,a=i.error,i.error=null):c=!0,n===i)return void A(n,new TypeError("A promises callback cannot return that same promise."))}else i=o,c=!0;n._state!==y||(s&&c?x(n,i):u?A(n,a):t===w?j(n,i):t===k&&A(n,i))}var F=0;function I(e){e[v]=F++,e._state=void 0,e._result=void 0,e._subscribers=[]}var N=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(b),this.promise[v]||I(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&j(this.promise,this._result))):A(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===y&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===m){var o=S(e);if(o===g&&e._state!==y)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===M){var s=new n(b);T(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===y&&(this._remaining--,e===k?A(r,n):this._result[t]=n),0===this._remaining&&j(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;P(e,void 0,function(e){return n._settledAt(w,t,e)},function(e){return n._settledAt(k,t,e)})},e}();var M=function(){function e(t){this[v]=F++,this._result=this._state=void 0,this._subscribers=[],b!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t(function(t){x(e,t)},function(t){A(e,t)})}catch(t){A(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},e}();return M.prototype.then=g,M.all=function(e){return new N(this,e).promise},M.race=function(e){var n=this;return t(e)?new n(function(t,r){for(var o=e.length,s=0;s<o;s++)n.resolve(e[s]).then(t,r)}):new n(function(e,t){return t(new TypeError("You must pass an array to race."))})},M.resolve=m,M.reject=function(e){var t=new this(b);return A(t,e),t},M._setScheduler=function(e){o=e},M._setAsap=function(e){s=e},M._asap=s,M.polyfill=function(){var e=void 0;if("undefined"!=typeof global)e=global;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=M},M.Promise=M,M})},function(e,t){e.exports=require("events")},function(e,t,n){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(12)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(s=++o)}),e.splice(s,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},function(e,t){var n=1e3,r=60*n,o=60*r,s=24*o,i=365.25*s;function a(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*s;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?function(e){return a(e,s,"day")||a(e,o,"hour")||a(e,r,"minute")||a(e,n,"second")||e+" ms"}(e):function(e){if(e>=s)return Math.round(e/s)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(27),o=n(4);(t=e.exports=n(12)).init=function(e){e.inspectOpts={};for(var n=Object.keys(t.inspectOpts),r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(){return process.stderr.write(o.format.apply(o,arguments)+"\n")},t.formatArgs=function(e){var n=this.namespace;if(this.useColors){var r=this.color,o="[3"+(r<8?r:"8;5;"+r),s="  "+o+";1m"+n+" [0m";e[0]=s+e[0].split("\n").join("\n"+s),e.push(o+"m+"+t.humanize(this.diff)+"[0m")}else e[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=i,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.colors=[6,2,3,4,5,1];try{var s=n(28);s&&s.level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function i(){return process.env.DEBUG}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var n=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e},{}),t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)},t.enable(i())},function(e,t){e.exports=require("tty")},function(e,t,n){"use strict";const r=n(29),o=n(30),s=process.env;let i;function a(e){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(function(e){if(!1===i)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!e.isTTY&&!0!==i)return 0;const t=i?1:0;if("win32"===process.platform){const e=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in s)||"codeship"===s.CI_NAME?1:t;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)?1:"COLORTERM"in s?1:(s.TERM,t)}(e))}o("no-color")||o("no-colors")||o("color=false")?i=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(i=!0),"FORCE_COLOR"in s&&(i=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},function(e,t){e.exports=require("os")},function(e,t,n){"use strict";e.exports=((e,t)=>{t=t||process.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)})},function(e,t,n){var r=n(8),o=n(9),s=n(3),i=n(10),a=n(4).inherits,c=n(11)("https-proxy-agent");function u(e){if(!(this instanceof u))return new u(e);if("string"==typeof e&&(e=s.parse(e)),!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");c("creating new HttpsProxyAgent instance: %o",e),i.call(this,e);var t=Object.assign({},e);this.secureProxy=!!t.protocol&&/^https:?$/i.test(t.protocol),t.host=t.hostname||t.host,t.port=+t.port||(this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in t||(t.ALPNProtocols=["http 1.1"]),t.host&&t.path&&(delete t.path,delete t.pathname),this.proxy=t,this.defaultPort=443}e.exports=u,a(u,i),u.prototype.callback=function(e,t,n){var s,i=this.proxy,a=[],u=0;function l(){var e=s.read();e?g(e):s.once("readable",l)}function f(){s.removeListener("data",g),s.removeListener("end",h),s.removeListener("error",d),s.removeListener("close",p),s.removeListener("readable",l)}function p(e){c("onclose had error %o",e)}function h(){c("onend")}function d(e){f(),n(e)}function g(r){a.push(r),u+=r.length;var i=Buffer.concat(a,u),p=i.toString("ascii");if(!~p.indexOf("\r\n\r\n"))return c("have not received end of HTTP headers yet..."),void(s.read?l():s.once("data",g));var h=p.substring(0,p.indexOf("\r\n")),d=+h.split(" ")[1];if(c("got proxy server response: %o",h),200==d){var v=s;a=i=null,t.secureEndpoint&&(c("upgrading proxy-connected socket to TLS connection: %o",t.host),t.socket=s,t.servername=t.servername||t.host,t.host=null,t.hostname=null,t.port=null,v=o.connect(t)),f(),n(null,v)}else f(),a=i,e.once("socket",m),n(null,s)}function m(e){if("function"==typeof e.ondata)e.ondata(a,0,a.length);else{if(!(e.listeners("data").length>0))throw new Error("should not happen...");e.emit("data",a)}a=null}(s=this.secureProxy?o.connect(i):r.connect(i)).on("error",d),s.on("close",p),s.on("end",h),s.read?l():s.once("data",g);var v="CONNECT "+(t.host+":"+t.port)+" HTTP/1.1\r\n",b=Object.assign({},i.headers);i.auth&&(b["Proxy-Authorization"]="Basic "+Buffer.from(i.auth).toString("base64"));var y=t.host;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(t.port,t.secureEndpoint)||(y+=":"+t.port),b.Host=y,b.Connection="close",Object.keys(b).forEach(function(e){v+=e+": "+b[e]+"\r\n"}),s.write(v+"\r\n")}},function(e,t){e.exports=require("zlib")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6),o=n(0),s=n(34),i=n(35),a=n(1);t.addJSONProviders=function(e){const t=[];return[new i.PackageJSONContribution(e),new s.BowerJSONContribution(e)].forEach(e=>{const n=e.getDocumentSelector();t.push(a.languages.registerCompletionItemProvider(n,new u(e),'"',":")),t.push(a.languages.registerHoverProvider(n,new c(e)))}),a.Disposable.from(...t)};class c{constructor(e){this.jsonContribution=e}provideHover(e,t,n){const s=o.basename(e.fileName),i=e.offsetAt(t),c=r.getLocation(e.getText(),i);if(!c.previousNode)return null;const u=c.previousNode;if(u&&u.offset<=i&&i<=u.offset+u.length){const t=this.jsonContribution.getInfoContribution(s,c);if(t)return t.then(t=>{const n=new a.Range(e.positionAt(u.offset),e.positionAt(u.offset+u.length));return{contents:t||[],range:n}})}return null}}t.JSONHoverProvider=c;class u{constructor(e){this.jsonContribution=e}resolveCompletionItem(e,t){if(this.jsonContribution.resolveSuggestion){const t=this.jsonContribution.resolveSuggestion(e);if(t)return t}return Promise.resolve(e)}provideCompletionItems(e,t,n){const s=o.basename(e.fileName),i=this.getCurrentWord(e,t);let c;const u=[];let l=!1;const f=e.offsetAt(t),p=r.getLocation(e.getText(),f),h=p.previousNode;c=h&&h.offset<=f&&f<=h.offset+h.length&&("property"===h.type||"string"===h.type||"number"===h.type||"boolean"===h.type||"null"===h.type)?new a.Range(e.positionAt(h.offset),e.positionAt(h.offset+h.length)):new a.Range(e.positionAt(f-i.length),t);const d={},g={add:e=>{d[e.label]||(d[e.label]=!0,e.range=c,u.push(e))},setAsIncomplete:()=>l=!0,error:e=>console.error(e),log:e=>console.log(e)};let m=null;if(p.isAtPropertyKey){const n=!p.previousNode||!p.previousNode.colonOffset,r=this.isLast(e,t);m=this.jsonContribution.collectPropertySuggestions(s,p,i,n,r,g)}else m=0===p.path.length?this.jsonContribution.collectDefaultSuggestions(s,g):this.jsonContribution.collectValueSuggestions(s,p,g);return m?m.then(()=>u.length>0?new a.CompletionList(u,l):null):null}getCurrentWord(e,t){let n=t.character-1;const r=e.lineAt(t.line).text;for(;n>=0&&-1===' \t\n\r\v":{[,'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t.character)}isLast(e,t){const n=r.createScanner(e.getText(),!0);n.setPosition(e.offsetAt(t));let o=n.scan();return 10===o&&2===n.getTokenError()&&(o=n.scan()),2===o||17===o}}t.JSONCompletionItemProvider=u,t.xhrDisabled=(()=>Promise.reject({responseText:"Use of online resources is disabled."}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(14),s=n(2).loadMessageBundle(n(0).join(__dirname,"features\\bowerJSONContribution.ts")),i="Visual Studio Code";t.BowerJSONContribution=class{constructor(e){this.topRanked=["twitter","bootstrap","angular-1.1.6","angular-latest","angulerjs","d3","myjquery","jq","abcdef1234567890","jQuery","jquery-1.11.1","jquery","sushi-vanilla-x-data","font-awsome","Font-Awesome","font-awesome","fontawesome","html5-boilerplate","impress.js","homebrew","backbone","moment1","momentjs","moment","linux","animate.css","animate-css","reveal.js","jquery-file-upload","blueimp-file-upload","threejs","express","chosen","normalize-css","normalize.css","semantic","semantic-ui","Semantic-UI","modernizr","underscore","underscore1","material-design-icons","ionic","chartjs","Chart.js","nnnick-chartjs","select2-ng","select2-dist","phantom","skrollr","scrollr","less.js","leancss","parser-lib","hui","bootstrap-languages","async","gulp","jquery-pjax","coffeescript","hammer.js","ace","leaflet","jquery-mobile","sweetalert","typeahead.js","soup","typehead.js","sails","codeigniter2"],this.xhr=e}getDocumentSelector(){return[{language:"json",scheme:"*",pattern:"**/bower.json"},{language:"json",scheme:"*",pattern:"**/.bower.json"}]}onlineEnabled(){return!!r.workspace.getConfiguration("npm").get("fetchOnlinePackageInfo")}collectDefaultSuggestions(e,t){const n=new r.CompletionItem(s(0,null));return n.kind=r.CompletionItemKind.Class,n.insertText=new r.SnippetString(JSON.stringify({name:"${1:name}",description:"${2:description}",authors:["${3:author}"],version:"${4:1.0.0}",main:"${5:pathToMain}",dependencies:{}},null,"\t")),t.add(n),Promise.resolve(null)}collectPropertySuggestions(e,t,n,o,a,c){if(t.matches(["dependencies"])||t.matches(["devDependencies"])){if(n.length>0&&this.onlineEnabled()){const e="https://registry.bower.io/packages/search/"+encodeURIComponent(n);return this.xhr({url:e,agent:i}).then(e=>{if(200!==e.status)return c.error(s(1,null,e.responseText)),0;try{const t=JSON.parse(e.responseText);if(Array.isArray(t)){const e=t;for(const t of e){const e=t.name,n=t.description||"",s=(new r.SnippetString).appendText(JSON.stringify(e));o&&(s.appendText(": ").appendPlaceholder("latest"),a||s.appendText(","));const i=new r.CompletionItem(e);i.kind=r.CompletionItemKind.Property,i.insertText=s,i.filterText=JSON.stringify(e),i.documentation=n,c.add(i)}c.setAsIncomplete()}}catch(e){}},e=>(c.error(s(2,null,e.responseText)),0))}return this.topRanked.forEach(e=>{const t=(new r.SnippetString).appendText(JSON.stringify(e));o&&(t.appendText(": ").appendPlaceholder("latest"),a||t.appendText(","));const n=new r.CompletionItem(e);n.kind=r.CompletionItemKind.Property,n.insertText=t,n.filterText=JSON.stringify(e),n.documentation="",c.add(n)}),c.setAsIncomplete(),Promise.resolve(null)}return null}collectValueSuggestions(e,t,n){if(t.matches(["dependencies","*"])||t.matches(["devDependencies","*"])){const e=new r.CompletionItem(s(3,null));e.insertText=new r.SnippetString('"${1:latest}"'),e.filterText='""',e.kind=r.CompletionItemKind.Value,e.documentation="The latest version of the package",n.add(e)}return Promise.resolve(null)}resolveSuggestion(e){return e.kind===r.CompletionItemKind.Property&&""===e.documentation?this.getInfo(e.label).then(t=>t?(e.documentation=t,e):null):null}getInfo(e){if(!this.onlineEnabled())return Promise.resolve(void 0);const t="https://registry.bower.io/packages/"+encodeURIComponent(e);return this.xhr({url:t,agent:i}).then(e=>{try{const t=JSON.parse(e.responseText);if(t&&t.url){let e=t.url;return 0===e.indexOf("git://")&&(e=e.substring(6)),e.length>=4&&".git"===e.substr(e.length-4)&&(e=e.substring(0,e.length-4)),e}}catch(e){}},()=>{})}getInfoContribution(e,t){if(t.matches(["dependencies","*"])||t.matches(["devDependencies","*"])){const e=t.path[t.path.length-1];if("string"==typeof e)return this.getInfo(e).then(e=>e?[o.textToMarkedString(e)]:null)}return null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(14),s=n(2).loadMessageBundle(n(0).join(__dirname,"features\\packageJSONContribution.ts")),i=40,a=250,c="Visual Studio Code";t.PackageJSONContribution=class{constructor(e){this.mostDependedOn=["lodash","async","underscore","request","commander","express","debug","chalk","colors","q","coffee-script","mkdirp","optimist","through2","yeoman-generator","moment","bluebird","glob","gulp-util","minimist","cheerio","pug","redis","node-uuid","socket","io","uglify-js","winston","through","fs-extra","handlebars","body-parser","rimraf","mime","semver","mongodb","jquery","grunt","connect","yosay","underscore","string","xml2js","ejs","mongoose","marked","extend","mocha","superagent","js-yaml","xtend","shelljs","gulp","yargs","browserify","minimatch","react","less","prompt","inquirer","ws","event-stream","inherits","mysql","esprima","jsdom","stylus","when","readable-stream","aws-sdk","concat-stream","chai","Thenable","wrench"],this.knownScopes=["@types","@angular","@babel","@nuxtjs","@vue","@bazel"],this.xhr=e}getDocumentSelector(){return[{language:"json",scheme:"*",pattern:"**/package.json"}]}collectDefaultSuggestions(e,t){const n=new r.CompletionItem(s(0,null));return n.kind=r.CompletionItemKind.Module,n.insertText=new r.SnippetString(JSON.stringify({name:"${1:name}",description:"${2:description}",authors:"${3:author}",version:"${4:1.0.0}",main:"${5:pathToMain}",dependencies:{}},null,"\t")),t.add(n),Promise.resolve(null)}onlineEnabled(){return!!r.workspace.getConfiguration("npm").get("fetchOnlinePackageInfo")}collectPropertySuggestions(e,t,n,o,a,u){if(!this.onlineEnabled())return null;if(t.matches(["dependencies"])||t.matches(["devDependencies"])||t.matches(["optionalDependencies"])||t.matches(["peerDependencies"])){let e;return n.length>0?"@"===n[0]?this.collectScopedPackages(n,o,a,u):(e="https://skimdb.npmjs.com/registry/_design/app/_view/browseAll?group_level=2&limit="+i+"&start_key=%5B%22"+encodeURIComponent(n)+"%22%5D&end_key=%5B%22"+encodeURIComponent(n+"z")+"%22,%7B%7D%5D",this.xhr({url:e,agent:c}).then(e=>{if(200!==e.status)return u.error(s(1,null,e.responseText)),0;try{const t=JSON.parse(e.responseText);if(t&&Array.isArray(t.rows)){const e=t.rows;for(const t of e){const e=t.key;if(Array.isArray(e)&&e.length>0){const t=e[0],n=(new r.SnippetString).appendText(JSON.stringify(t));o&&(n.appendText(': "').appendTabstop().appendText('"'),a||n.appendText(","));const s=new r.CompletionItem(t);s.kind=r.CompletionItemKind.Property,s.insertText=n,s.filterText=JSON.stringify(t),s.documentation=e[1],u.add(s)}}e.length===i&&u.setAsIncomplete()}}catch(e){}},e=>(u.error(s(2,null,e.responseText)),0))):(this.mostDependedOn.forEach(e=>{const t=(new r.SnippetString).appendText(JSON.stringify(e));o&&(t.appendText(': "').appendTabstop().appendText('"'),a||t.appendText(","));const n=new r.CompletionItem(e);n.kind=r.CompletionItemKind.Property,n.insertText=t,n.filterText=JSON.stringify(e),n.documentation="",u.add(n)}),this.collectScopedPackages(n,o,a,u),u.setAsIncomplete(),Promise.resolve(null))}return null}collectScopedPackages(e,t,n,o){let i=e.split("/");if(1===i.length)for(let e of this.knownScopes){const t=new r.CompletionItem(e);t.kind=r.CompletionItemKind.Property,t.insertText=(new r.SnippetString).appendText(`"${e}/`).appendTabstop().appendText('"'),t.filterText=JSON.stringify(e),t.documentation="",t.command={title:"",command:"editor.action.triggerSuggest"},o.add(t)}else if(2===i.length&&i[0].length>1){let e=i[0].substr(1),u=i[1];u.length<4&&(u="");let l=`https://api.npms.io/v2/search?q=scope:${e}%20${u}&size=250`;return this.xhr({url:l,agent:c}).then(e=>{if(200===e.status)try{const s=JSON.parse(e.responseText);if(s&&Array.isArray(s.results)){const e=s.results;for(let s of e)if(s.package&&s.package.name){const e=s.package.name,i=(new r.SnippetString).appendText(JSON.stringify(e));t&&(i.appendText(': "'),s.package.version?i.appendVariable("version",s.package.version):i.appendTabstop(),i.appendText('"'),n||i.appendText(","));const a=new r.CompletionItem(e);a.kind=r.CompletionItemKind.Property,a.insertText=i,a.filterText=JSON.stringify(e),a.documentation=s.package.description||"",o.add(a)}e.length===a&&o.setAsIncomplete()}}catch(e){}else o.error(s(3,null,e.responseText));return null})}return Promise.resolve(null)}collectValueSuggestions(e,t,n){if(!this.onlineEnabled())return null;if(t.matches(["dependencies","*"])||t.matches(["devDependencies","*"])||t.matches(["optionalDependencies","*"])||t.matches(["peerDependencies","*"])){const e=t.path[t.path.length-1];if("string"==typeof e){const t="https://registry.npmjs.org/"+encodeURIComponent(e).replace(/%40/g,"@");return this.xhr({url:t,agent:c}).then(e=>{try{const t=JSON.parse(e.responseText),o=t&&t["dist-tags"]&&t["dist-tags"].latest;if(o){let e=JSON.stringify(o),t=new r.CompletionItem(e);t.kind=r.CompletionItemKind.Property,t.insertText=e,t.documentation=s(4,null),n.add(t),e=JSON.stringify("^"+o),(t=new r.CompletionItem(e)).kind=r.CompletionItemKind.Property,t.insertText=e,t.documentation=s(5,null),n.add(t),e=JSON.stringify("~"+o),(t=new r.CompletionItem(e)).kind=r.CompletionItemKind.Property,t.insertText=e,t.documentation=s(6,null),n.add(t)}}catch(e){}return 0},()=>0)}}return null}resolveSuggestion(e){return e.kind===r.CompletionItemKind.Property&&""===e.documentation?this.getInfo(e.label).then(t=>t.length>0?(e.documentation=t[0],t.length>1&&(e.detail=t[1]),e):null):null}getInfo(e){const t="https://registry.npmjs.org/"+encodeURIComponent(e).replace(/%40/g,"@");return this.xhr({url:t,agent:c}).then(e=>{try{const t=JSON.parse(e.responseText);if(t){const e=[];t.description&&e.push(t.description);const n=t&&t["dist-tags"]&&t["dist-tags"].latest;return n&&e.push(s(7,null,n)),t.homepage&&e.push(t.homepage),e}}catch(e){}return[]},()=>[])}getInfoContribution(e,t){if(t.matches(["dependencies","*"])||t.matches(["devDependencies","*"])||t.matches(["optionalDependencies","*"])||t.matches(["peerDependencies","*"])){const e=t.path[t.path.length-1];if("string"==typeof e)return this.getInfo(e).then(e=>e.length?[e.map(o.textToMarkedString).join("\n\n")]:null)}return null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),o=n(1),s=n(6),i=n(5),a=n(2).loadMessageBundle(n(0).join(__dirname,"npmView.ts"));class c extends o.TreeItem{constructor(e){super(e.name,o.TreeItemCollapsibleState.Expanded),this.packages=[],this.contextValue="folder",this.resourceUri=e.uri,this.workspaceFolder=e,this.iconPath=o.ThemeIcon.Folder}addPackage(e){this.packages.push(e)}}const u="package.json";class l extends o.TreeItem{constructor(e,t){super(l.getLabel(e.label,t),o.TreeItemCollapsibleState.Expanded),this.scripts=[],this.folder=e,this.path=t,this.contextValue="packageJSON",this.resourceUri=t?o.Uri.file(r.join(e.resourceUri.fsPath,t,u)):o.Uri.file(r.join(e.resourceUri.fsPath,u)),this.iconPath=o.ThemeIcon.File}static getLabel(e,t){return t.length>0?r.join(t,u):u}addScript(e){this.scripts.push(e)}}class f extends o.TreeItem{constructor(e,t,n){super(n.name,o.TreeItemCollapsibleState.None);const s=o.workspace.getConfiguration("npm").get("scriptExplorerAction")||"open",a={open:{title:"Edit Script",command:"npm.openScript",arguments:[this]},run:{title:"Run Script",command:"npm.runScript",arguments:[this]}};this.contextValue="script",n.group&&n.group===o.TaskGroup.Rebuild&&(this.contextValue="debugScript"),this.package=t,this.task=n,this.command=a[s],n.group&&n.group===o.TaskGroup.Clean?this.iconPath={light:e.asAbsolutePath(r.join("resources","light","prepostscript.svg")),dark:e.asAbsolutePath(r.join("resources","dark","prepostscript.svg"))}:this.iconPath={light:e.asAbsolutePath(r.join("resources","light","script.svg")),dark:e.asAbsolutePath(r.join("resources","dark","script.svg"))};let c=i.getPackageJsonUriFromTask(n);i.getScripts(c).then(e=>{e&&e[n.definition.script]&&(this.tooltip=e[n.definition.script])})}getFolder(){return this.package.folder.workspaceFolder}}class p extends o.TreeItem{constructor(){super(a(0,null),o.TreeItemCollapsibleState.None),this.contextValue="noscripts"}}t.NpmScriptsTreeDataProvider=class{constructor(e){this.taskTree=null,this._onDidChangeTreeData=new o.EventEmitter,this.onDidChangeTreeData=this._onDidChangeTreeData.event;const t=e.subscriptions;this.extensionContext=e,t.push(o.commands.registerCommand("npm.runScript",this.runScript,this)),t.push(o.commands.registerCommand("npm.debugScript",this.debugScript,this)),t.push(o.commands.registerCommand("npm.openScript",this.openScript,this)),t.push(o.commands.registerCommand("npm.refresh",this.refresh,this)),t.push(o.commands.registerCommand("npm.runInstall",this.runInstall,this))}scriptIsValid(e,t){for(const n in e){let e=i.getTaskName(n,t.definition.path);if(t.name===e)return!0}return!1}async runScript(e){let t=e.task,n=i.getPackageJsonUriFromTask(t),r=await i.getScripts(n);this.scriptIsValid(r,t)?o.tasks.executeTask(e.task):this.scriptNotValid(t)}extractDebugArg(e,t){return i.extractDebugArgFromScript(e[t.name])}async debugScript(e){let t=e.task,n=i.getPackageJsonUriFromTask(t),r=await i.getScripts(n);if(!this.scriptIsValid(r,t))return void this.scriptNotValid(t);let s=this.extractDebugArg(r,t);if(s)i.startDebugging(t.name,s[0],s[1],e.getFolder());else{let e=a(1,null,t.name),n=a(2,null),r=a(3,null);await o.window.showErrorMessage(e,{modal:!0},r,n)===n&&o.commands.executeCommand("vscode.open",o.Uri.parse("https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools"))}}scriptNotValid(e){let t=a(4,null,e.name);o.window.showErrorMessage(t)}findScript(e,t){let n=0,r=!1,o={onError:()=>n,onObjectEnd(){r&&(r=!1)},onObjectProperty(e,o,s){if("scripts"===e)r=!0,t||(n=o);else if(r&&t){let r=i.getTaskName(e,t.task.definition.path);t.task.name===r&&(n=o)}}};return s.visit(e.getText(),o),n}async runInstall(e){let t=void 0;if(e instanceof l&&(t=e.resourceUri),!t)return;let n=i.createTask("install","install",e.folder.workspaceFolder,t,[]);o.tasks.executeTask(n)}async openScript(e){let t=void 0;if(e instanceof l?t=e.resourceUri:e instanceof f&&(t=e.package.resourceUri),!t)return;let n=await o.workspace.openTextDocument(t),r=this.findScript(n,e instanceof f?e:void 0),s=n.positionAt(r);await o.window.showTextDocument(n,{selection:new o.Selection(s,s)})}refresh(){this.taskTree=null,this._onDidChangeTreeData.fire()}getTreeItem(e){return e}getParent(e){return e instanceof c?null:e instanceof l?e.folder:e instanceof f?e.package:null}async getChildren(e){if(!this.taskTree){let e=await o.tasks.fetchTasks({type:"npm"});e&&(this.taskTree=this.buildTaskTree(e),0===this.taskTree.length&&(this.taskTree=[new p]))}return e instanceof c?e.packages:e instanceof l?e.scripts:e instanceof f?[]:e instanceof p?[]:!e&&this.taskTree?this.taskTree:[]}isInstallTask(e){return i.getTaskName("install",e.definition.path)===e.name}buildTaskTree(e){let t=new Map,n=new Map,o=null,s=null;return e.forEach(e=>{if(i.isWorkspaceFolder(e.scope)&&!this.isInstallTask(e)){(o=t.get(e.scope.name))||(o=new c(e.scope),t.set(e.scope.name,o));let i=e.definition,a=i.path?i.path:"",u=r.join(e.scope.name,a);(s=n.get(u))||(s=new l(o,a),o.addPackage(s),n.set(u,s));let p=new f(this.extensionContext,s,e);s.addScript(p)}}),1===t.size?[...n.values()]:[...t.values()]}}},function(e,t,n){e.exports=d,d.Minimatch=g;var r={sep:"/"};try{r=n(0)}catch(e){}var o=d.GLOBSTAR=g.GLOBSTAR={},s=n(38),i={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c=a+"*?",u="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",l="(?:(?!(?:\\/|^)\\.).)*?",f=function(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}("().*{}+?[]^$\\!");var p=/\/+/;function h(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach(function(e){n[e]=t[e]}),Object.keys(e).forEach(function(t){n[t]=e[t]}),n}function d(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new g(t,n).match(e))}function g(e,t){if(!(this instanceof g))return new g(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==r.sep&&(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function m(e,t){if(t||(t=this instanceof g?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:s(e)}d.filter=function(e,t){return t=t||{},function(n,r,o){return d(n,e,t)}},d.defaults=function(e){if(!e||!Object.keys(e).length)return d;var t=d,n=function(n,r,o){return t.minimatch(n,r,h(e,o))};return n.Minimatch=function(n,r){return new t.Minimatch(n,h(e,r))},n},g.defaults=function(e){return e&&Object.keys(e).length?d.defaults(e).Minimatch:g},g.prototype.debug=function(){},g.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(p)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,n),this.set=n},g.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(this.options.nonegate)return;for(var r=0,o=e.length;r<o&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.substr(n));this.negate=t},d.braceExpand=function(e,t){return m(e,t)},g.prototype.braceExpand=m,g.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return o;if(""===e)return"";var r,s="",u=!!n.nocase,l=!1,p=[],h=[],d=!1,g=-1,m=-1,b="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=this;function w(){if(r){switch(r){case"*":s+=c,u=!0;break;case"?":s+=a,u=!0;break;default:s+="\\"+r}y.debug("clearStateChar %j %j",r,s),r=!1}}for(var k,C=0,S=e.length;C<S&&(k=e.charAt(C));C++)if(this.debug("%s\t%s %s %j",e,C,s,k),l&&f[k])s+="\\"+k,l=!1;else switch(k){case"/":return!1;case"\\":w(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,C,s,k),d){this.debug("  in class"),"!"===k&&C===m+1&&(k="^"),s+=k;continue}y.debug("call clearStateChar %j",r),w(),r=k,n.noext&&w();continue;case"(":if(d){s+="(";continue}if(!r){s+="\\(";continue}p.push({type:r,start:C-1,reStart:s.length,open:i[r].open,close:i[r].close}),s+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,s),r=!1;continue;case")":if(d||!p.length){s+="\\)";continue}w(),u=!0;var T=p.pop();s+=T.close,"!"===T.type&&h.push(T),T.reEnd=s.length;continue;case"|":if(d||!p.length||l){s+="\\|",l=!1;continue}w(),s+="|";continue;case"[":if(w(),d){s+="\\"+k;continue}d=!0,m=C,g=s.length,s+=k;continue;case"]":if(C===m+1||!d){s+="\\"+k,l=!1;continue}if(d){var x=e.substring(m+1,C);try{RegExp("["+x+"]")}catch(e){var O=this.parse(x,v);s=s.substr(0,g)+"\\["+O[0]+"\\]",u=u||O[1],d=!1;continue}}u=!0,d=!1,s+=k;continue;default:w(),l?l=!1:!f[k]||"^"===k&&d||(s+="\\"),s+=k}d&&(x=e.substr(m+1),O=this.parse(x,v),s=s.substr(0,g)+"\\["+O[0],u=u||O[1]);for(T=p.pop();T;T=p.pop()){var j=s.slice(T.reStart+T.open.length);this.debug("setting tail",s,T),j=j.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,n){return n||(n="\\"),t+t+n+"|"}),this.debug("tail=%j\n   %s",j,j,T,s);var A="*"===T.type?c:"?"===T.type?a:"\\"+T.type;u=!0,s=s.slice(0,T.reStart)+A+"\\("+j}w(),l&&(s+="\\\\");var P=!1;switch(s.charAt(0)){case".":case"[":case"(":P=!0}for(var _=h.length-1;_>-1;_--){var E=h[_],F=s.slice(0,E.reStart),I=s.slice(E.reStart,E.reEnd-8),N=s.slice(E.reEnd-8,E.reEnd),M=s.slice(E.reEnd);N+=M;var R=F.split("(").length-1,D=M;for(C=0;C<R;C++)D=D.replace(/\)[+*?]?/,"");var L="";""===(M=D)&&t!==v&&(L="$");var q=F+I+M+L+N;s=q}""!==s&&u&&(s="(?=.)"+s);P&&(s=b+s);if(t===v)return[s,u];if(!u)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var $=n.nocase?"i":"";try{var J=new RegExp("^"+s+"$",$)}catch(e){return new RegExp("$.")}return J._glob=e,J._src=s,J};var v={};d.makeRe=function(e,t){return new g(e,t||{}).makeRe()},g.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?c:t.dot?u:l,r=t.nocase?"i":"",s=e.map(function(e){return e.map(function(e){return e===o?n:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,r)}catch(e){this.regexp=!1}return this.regexp},d.match=function(e,t,n){var r=new g(t,n=n||{});return e=e.filter(function(e){return r.match(e)}),r.options.nonull&&!e.length&&e.push(t),e},g.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/"));e=e.split(p),this.debug(this.pattern,"split",e);var o,s,i=this.set;for(this.debug(this.pattern,"set",i),s=e.length-1;s>=0&&!(o=e[s]);s--);for(s=0;s<i.length;s++){var a=i[s],c=e;n.matchBase&&1===a.length&&(c=[o]);var u=this.matchOne(c,a,t);if(u)return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},g.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,i=0,a=e.length,c=t.length;s<a&&i<c;s++,i++){this.debug("matchOne loop");var u,l=t[i],f=e[s];if(this.debug(t,l,f),!1===l)return!1;if(l===o){this.debug("GLOBSTAR",[t,l,f]);var p=s,h=i+1;if(h===c){for(this.debug("** at the end");s<a;s++)if("."===e[s]||".."===e[s]||!r.dot&&"."===e[s].charAt(0))return!1;return!0}for(;p<a;){var d=e[p];if(this.debug("\nglobstar while",e,p,t,h,d),this.matchOne(e.slice(p),t.slice(h),n))return this.debug("globstar found match!",p,a,d),!0;if("."===d||".."===d||!r.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==a))}if("string"==typeof l?(u=r.nocase?f.toLowerCase()===l.toLowerCase():f===l,this.debug("string match",l,f,u)):(u=f.match(l),this.debug("pattern match",l,f,u)),!u)return!1}if(s===a&&i===c)return!0;if(s===a)return n;if(i===c)return s===a-1&&""===e[s];throw new Error("wtf?")}},function(e,t,n){var r=n(39),o=n(40);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,n){var s=[];var i=o("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body);var u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body);var f=c||u;var m=i.body.indexOf(",")>=0;if(!f&&!m)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+a+i.post,e(t)):[t];var v;if(f)v=i.body.split(/\.\./);else if(1===(v=function e(t){if(!t)return[""];var n=[];var r=o("{","}",t);if(!r)return t.split(",");var s=r.pre;var i=r.body;var a=r.post;var c=s.split(",");c[c.length-1]+="{"+i+"}";var u=e(a);a.length&&(c[c.length-1]+=u.shift(),c.push.apply(c,u));n.push.apply(n,c);return n}(i.body)).length&&1===(v=e(v[0],!1).map(p)).length){var b=i.post.length?e(i.post,!1):[""];return b.map(function(e){return i.pre+v[0]+e})}var y=i.pre;var b=i.post.length?e(i.post,!1):[""];var w;if(f){var k=l(v[0]),C=l(v[1]),S=Math.max(v[0].length,v[1].length),T=3==v.length?Math.abs(l(v[2])):1,x=d,O=C<k;O&&(T*=-1,x=g);var j=v.some(h);w=[];for(var A=k;x(A,C);A+=T){var P;if(u)"\\"===(P=String.fromCharCode(A))&&(P="");else if(P=String(A),j){var _=S-P.length;if(_>0){var E=new Array(_+1).join("0");P=A<0?"-"+E+P.slice(1):E+P}}w.push(P)}}else w=r(v,function(t){return e(t,!1)});for(var F=0;F<w.length;F++)for(var I=0;I<b.length;I++){var N=y+w[F]+b[I];(!n||f||N)&&s.push(N)}return s}(function(e){return e.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}(e),!0).map(f)};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",u="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function f(e){return e.split(s).join("\\").split(i).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function p(e){return"{"+e+"}"}function h(e){return/^-?0\d/.test(e)}function d(e,t){return e<=t}function g(e,t){return e>=t}},function(e,t){e.exports=function(e,t){for(var r=[],o=0;o<e.length;o++){var s=t(e[o],o);n(s)?r.push.apply(r,s):r.push(s)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t,n){e instanceof RegExp&&(e=o(e,n)),t instanceof RegExp&&(t=o(t,n));var r=s(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function o(e,t){var n=t.match(e);return n?n[0]:null}function s(e,t,n){var r,o,s,i,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(r=[],s=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),u]:((o=r.pop())<s&&(s=o,i=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;r.length&&(a=[s,i])}return a}e.exports=r,r.range=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(5),s=n(2).loadMessageBundle(n(0).join(__dirname,"scriptHover.ts"));let i=void 0,a=void 0;t.invalidateHoverScriptsCache=function(e){e?e.uri===i&&(i=void 0):i=void 0};t.NpmScriptHoverProvider=class{constructor(e){e.subscriptions.push(r.commands.registerCommand("npm.runScriptFromHover",this.runScriptFromHover,this)),e.subscriptions.push(r.commands.registerCommand("npm.debugScriptFromHover",this.debugScriptFromHover,this))}provideHover(e,t,n){let s=void 0;return i&&i.fsPath===e.uri.fsPath||(a=o.findAllScriptRanges(e.getText()),i=e.uri),a.forEach((n,i)=>{let a=e.positionAt(n[0]),c=e.positionAt(n[0]+n[1]);if(new r.Range(a,c).contains(t)){let t=new r.MarkdownString;t.isTrusted=!0,t.appendMarkdown(this.createRunScriptMarkdown(i,e.uri));let a=o.extractDebugArgFromScript(n[2]);a&&t.appendMarkdown(this.createDebugScriptMarkdown(i,e.uri,a[0],a[1])),s=new r.Hover(t)}}),s}createRunScriptMarkdown(e,t){let n={documentUri:t,script:e};return this.createMarkdownLink(s(0,null),"npm.runScriptFromHover",n,s(1,null))}createDebugScriptMarkdown(e,t,n,r){let o={documentUri:t,script:e,protocol:n,port:r};return this.createMarkdownLink(s(2,null),"npm.debugScriptFromHover",o,s(3,null),"|")}createMarkdownLink(e,t,n,r,o){let s=encodeURIComponent(JSON.stringify(n)),i="";return o&&(i=` ${o} `),`${i}[${e}](command:${t}?${s} "${r}")`}runScriptFromHover(e){let t=e.script,n=e.documentUri,s=r.workspace.getWorkspaceFolder(n);if(s){let e=o.createTask(t,`run ${t}`,s,n);r.tasks.executeTask(e)}}debugScriptFromHover(e){let t=e.script,n=e.documentUri,s=e.protocol,i=e.port,a=r.workspace.getWorkspaceFolder(n);a&&o.startDebugging(t,s,i,a)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(5),s=n(2).loadMessageBundle(n(0).join(__dirname,"commands.ts"));t.runSelectedScript=function(){let e=r.window.activeTextEditor;if(!e)return;let t=e.document,n=t.getText(),i=e.selection,a=t.offsetAt(i.anchor),c=o.findScriptAtPosition(n,a);if(c)o.runScript(c,t);else{let e=s(0,null);r.window.showErrorMessage(e)}}}]));
  //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/c7d83e57cd18f18026a8162d042843bda1bcf21f/extensions/npm/dist/main.js.map