代码拉取完成,页面将自动刷新
(self.webpackChunktypescriptlang_org=self.webpackChunktypescriptlang_org||[]).push([[530],{7058:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=7058,e.exports=t},7699:function(e,t,n){"use strict";var r=n(589),i=n(40);Object.defineProperty(t,"__esModule",{value:!0});var o=n(4544),a=function(){function e(t){r(this,e),this.source=t;try{this.scanner=new o.default([this.source])}catch(n){}}return i(e,[{key:"searchSync",value:function(e,t){var n;return null==t&&(t=0),n=this.scanner.findNextMatchSync(e,t),this.captureIndicesForMatch(e,n)}},{key:"search",value:function(e,t,n){null==t&&(t=0),"function"==typeof t&&(n=t,t=0);try{n(null,this.searchSync(e,t))}catch(r){n(r)}}},{key:"testSync",value:function(e){return"boolean"==typeof this.source||"boolean"==typeof e?this.source===e:null!=this.searchSync(e)}},{key:"test",value:function(e,t){"function"!=typeof t&&(t=function(){});try{t(null,this.testSync(e))}catch(n){t(n)}}},{key:"captureIndicesForMatch",value:function(e,t){if(null!=t){var n,r=t.captureIndices;e=this.scanner.convertToString(e);for(var i=0;i<r.length;i++)(n=r[i]).match=e.slice(n.start,n.end);return r}return null}}]),e}();t.default=a},4544:function(e,t,n){"use strict";var r=n(5388),i=n(589),o=n(40);Object.defineProperty(t,"__esModule",{value:!0});var a=n(906),s=n(5780),c=n(9655);function u(e){var t=s.onigasmH._malloc(e.utf8Bytes.length);return s.onigasmH.HEAPU8.set(e.utf8Bytes,t),t}function l(e){for(var t=[],n=0;0!==s.onigasmH.HEAPU8[e];)t[n++]=s.onigasmH.HEAPU8[e++];return t.join()}var h=new a({dispose:function(e,t){var n=s.onigasmH._malloc(t.regexTPtrs.length);if(s.onigasmH.HEAPU8.set(t.regexTPtrs,n),0!==s.onigasmH._disposeCompiledPatterns(n,e.patterns.length)){var r=l(s.onigasmH._getLastError());throw new Error(r)}s.onigasmH._free(n)},max:1e3}),f=function(){function e(t){if(i(this,e),null===s.onigasmH)throw new Error("Onigasm has not been initialized, call loadWASM from 'onigasm' exports before using any other API");for(var n=0;n<t.length;n++){if("string"!=typeof t[n])throw new TypeError("First parameter to OnigScanner constructor must be array of (pattern) strings")}this.sources=t.slice()}return o(e,[{key:"patterns",get:function(){return this.sources.slice()}},{key:"findNextMatch",value:function(e,t,n){null==t&&(t=0),"function"==typeof t&&(n=t,t=0);try{n(null,this.findNextMatchSync(e,t))}catch(r){n(r)}}},{key:"findNextMatchSync",value:function(e,t){null==t&&(t=0),t=this.convertToNumber(t);var n=h.get(this);if(!n){for(var i=s.onigasmH._malloc(4),o=[],a=0;a<this.sources.length;a++){var f=this.sources[a],p=u(new c.default(f));if(0!==s.onigasmH._compilePattern(p,i)){var d=l(s.onigasmH._getLastError());throw new Error(d)}var g=s.onigasmH.HEAP32[i/4];o.push(g),s.onigasmH._free(p)}n={regexTPtrs:new Uint8Array(Uint32Array.from(o).buffer)},s.onigasmH._free(i),h.set(this,n)}var m=e instanceof c.default?e:new c.default(this.convertToString(e)),v=u(m),y=s.onigasmH._malloc(8),b=s.onigasmH._malloc(n.regexTPtrs.length);if(s.onigasmH.HEAPU8.set(n.regexTPtrs,b),0!==s.onigasmH._findBestMatch(b,this.sources.length,v,m.utf8Bytes.length-1,m.convertUtf16OffsetToUtf8(t),y)){var _=l(s.onigasmH._getLastError());throw new Error(_)}var w=new Uint32Array(s.onigasmH.HEAPU32.buffer,y,3),x=r(w,3),S=x[0],k=x[1],C=x[2];if(s.onigasmH._free(v),s.onigasmH._free(y),s.onigasmH._free(b),C>0){for(var E=new Uint32Array(s.onigasmH.HEAPU32.buffer,k,C),A=[],R=0,T=0;R<C;){var P=T++,I=E[R++],M=E[R++];m.hasMultiByteCharacters&&(I=m.convertUtf8OffsetToUtf16(I),M=m.convertUtf8OffsetToUtf16(M)),A.push({end:M,index:P,length:M-I,start:I})}return s.onigasmH._free(k),{captureIndices:A,index:S,scanner:this}}return null}},{key:"convertToString",value:function(e){return void 0===e?"undefined":null===e?"null":e instanceof c.default?e.content:e.toString()}},{key:"convertToNumber",value:function(e){return e=parseInt(e,10),isFinite(e)||(e=0),e=Math.max(e,0)}}]),e}();t.OnigScanner=f,t.default=f},9655:function(e,t,n){"use strict";var r=n(589),i=n(40);Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t){var n=this;if(r(this,e),this.substring=function(e,t){return n.source.substring(e,t)},this.toString=function(e,t){return n.source},"string"!=typeof t)throw new TypeError("Argument must be a string");this.source=t,this._utf8Bytes=null,this._utf8Indexes=null}return i(e,[{key:"utf8Bytes",get:function(){return this._utf8Bytes||this.encode(),this._utf8Bytes}},{key:"utf8Indexes",get:function(){return this._utf8Bytes||this.encode(),this._utf8Indexes}},{key:"content",get:function(){return this.source}},{key:"length",get:function(){return this.source.length}},{key:"hasMultiByteCharacters",get:function(){return null!==this.utf8Indexes}},{key:"convertUtf8OffsetToUtf16",value:function(e){if(e<0)return 0;if(e>=this._utf8Bytes.length-1)return this.source.length;var t=this.utf8Indexes;return t&&e>=this._mappingTableStartOffset?function(e,t){var n=0,r=e.length;if(0===r)return 0;for(;n<r;){var i=Math.floor((n+r)/2);e[i]>=t?r=i:n=i+1}for(;n>0&&(n>=e.length||e[n]>t);)n--;n>0&&e[n]===e[n-1]&&n--;return n}(t,e-this._mappingTableStartOffset)+this._mappingTableStartOffset:e}},{key:"convertUtf16OffsetToUtf8",value:function(e){if(e<0)return 0;var t=this._utf8Bytes;if(e>=this.source.length)return t.length-1;var n=this.utf8Indexes;return n&&e>=this._mappingTableStartOffset?n[e-this._mappingTableStartOffset]+this._mappingTableStartOffset:e}},{key:"encode",value:function(){var e,t=this.source,n=t.length,r=0,i=0;function o(t){var o=3*(n-t);e=o<=255?new Uint8Array(n-t):o<=65535?new Uint16Array(n-t):new Uint32Array(n-t),i=t,e[r++]=0}for(var a=new Uint8Array(3*n+1),s=0,c=0;c<t.length;){var u=void 0,l=t.charCodeAt(c);if(e&&(e[r++]=s-i),l<55296||l>57343)u=l;else if(l>=56320)u=65533;else if(c===n-1)u=65533;else{var h=t.charCodeAt(c+1);if(56320<=h&&h<=57343)e||o(c),u=65536+((1023&l)<<10)+(1023&h),c+=1,e[r++]=s-i;else u=65533}var f=void 0,p=void 0;if(u<=127?(f=1,p=0):u<=2047?(f=2,p=192):u<=65535?(f=3,p=224):(f=4,p=240),1===f)a[s++]=u;else for(e||o(s),a[s++]=(u>>6*--f)+p;f>0;){var d=u>>6*(f-1);a[s++]=128|63&d,f-=1}c+=1}var g=a.slice(0,s+1);g[s]=0,this._utf8Bytes=g,e&&(this._utf8Indexes=e,this._mappingTableStartOffset=i)}}]),e}();t.default=o},363:function(e,t,n){"use strict";n(5780).loadWASM,n(7699).default,n(4544).default,n(9655).default},7120:function(e,t,n){var r=n(2332),i=function(){"undefined"!=typeof document&&document.currentScript&&document.currentScript.src;return function(e){var t,n=void 0!==(e=e||{})?e:{},i={};for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);var o,a=[],s=!1,c=!1,u=!0,l="";function h(e){return n.locateFile?n.locateFile(e,l):l+e}u&&("undefined"!=typeof read&&function(e){return read(e)},o=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(b("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&function(e){quit(e)},"undefined"!=typeof print&&(void 0===r&&(r={}),r.log=print,r.warn=r.error="undefined"!=typeof printErr?printErr:print));var f=n.print||r.log.bind(r),p=n.printErr||r.warn.bind(r);for(t in i)i.hasOwnProperty(t)&&(n[t]=i[t]);i=null,n.arguments&&(a=n.arguments),n.thisProgram&&n.thisProgram,n.quit&&n.quit;var d,g,m=function(e){e};n.wasmBinary&&(d=n.wasmBinary),n.noExitRuntime&&n.noExitRuntime,"object"!=typeof WebAssembly&&p("no native wasm support detected");var v=new WebAssembly.Table({initial:244,maximum:244,element:"anyfunc"}),y=!1;function b(e,t){e||ee("Assertion failed: "+t)}function _(e){var t=n["_"+e];return b(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function w(e,t,n,r,i){var o={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);E(e,t=Se(n),n)}return t},array:function(e){var t=Se(e.length);return A(e,t),t}};var a=_(e),s=[],c=0;if(r)for(var u=0;u<r.length;u++){var l=o[n[u]];l?(0===c&&(c=xe()),s[u]=l(r[u])):s[u]=r[u]}var h=a.apply(null,s);return h=function(e){return"string"===t?k(e):"boolean"===t?Boolean(e):e}(h),0!==c&&ke(c),h}var x="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&x)return x.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|c:(7&a)<<18|s<<12|c<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function k(e,t){return e?S(P,e,t):""}function C(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-i}function E(e,t,n){return C(e,P,t,n)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function A(e,t){T.set(e,t)}var R,T,P,I,M=65536;function D(e,t){return e%t>0&&(e+=t-e%t),e}function O(e){R=e,n.HEAP8=T=new Int8Array(e),n.HEAP16=new Int16Array(e),n.HEAP32=I=new Int32Array(e),n.HEAPU8=P=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=new Float32Array(e),n.HEAPF64=new Float64Array(e)}var N=5507664,L=264624,j=n.TOTAL_MEMORY||157286400;function F(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(g=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:j/M}))&&(R=g.buffer),j=R.byteLength,O(R),I[L>>2]=N;var G=[],B=[],U=[],W=[];function H(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)z(n.preRun.shift());F(G)}function $(){!0,F(B)}function J(){F(U)}function q(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)X(n.postRun.shift());F(W)}function z(e){G.unshift(e)}function X(e){W.unshift(e)}Math.abs,Math.ceil,Math.floor,Math.min;var K=0,Y=null,Z=null;function V(e){K++,n.monitorRunDependencies&&n.monitorRunDependencies(K)}function Q(e){if(K--,n.monitorRunDependencies&&n.monitorRunDependencies(K),0==K&&(null!==Y&&(clearInterval(Y),Y=null),Z)){var t=Z;Z=null,t()}}function ee(e){throw n.onAbort&&n.onAbort(e),f(e+=""),p(e),y=!0,1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}n.preloadedImages={},n.preloadedAudios={};var te="data:application/octet-stream;base64,";function ne(e){return String.prototype.startsWith?e.startsWith(te):0===e.indexOf(te)}var re="onigasm.wasm";function ie(){try{if(d)return new Uint8Array(d);if(o)return o(re);throw"both async and sync fetching of the wasm failed"}catch(p){ee(p)}}function oe(){return d||!s&&!c||"function"!=typeof fetch?new Promise((function(e,t){e(ie())})):fetch(re,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+re+"'";return e.arrayBuffer()})).catch((function(){return ie()}))}function ae(){var e={env:ye,wasi_unstable:ye};function t(e,t){var r=e.exports;n.asm=r,Q()}function r(e){t(e.instance)}function i(t){return oe().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),ee(e)}))}if(V(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(o){return p("Module.instantiateWasm callback failed with error: "+o),!1}return function(){if(d||"function"!=typeof WebAssembly.instantiateStreaming||ne(re)||"function"!=typeof fetch)return i(r);fetch(re,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),i(r)}))}))}(),{}}function se(){ee()}function ce(){return T.length}function ue(){return 264624}function le(e,t,n){P.set(P.subarray(t,t+n),e)}function he(e){try{return g.grow(e-R.byteLength+65535>>16),O(g.buffer),1}catch(t){}}function fe(e){var t=ce(),n=65536,r=2147418112;if(e>r)return!1;for(var i=Math.max(t,16777216);i<e;)i=i<=536870912?D(2*i,n):Math.min(D((3*i+2147483648)/4,n),r);return!!he(i)}ne(re)||(re=h(re)),B.push({func:function(){we()}});var pe={buffers:[null,[],[]],printChar:function(e,t){var n=pe.buffers[e];0===t||10===t?((1===e?f:p)(S(n,0)),n.length=0):n.push(t)},varargs:0,get:function(e){return pe.varargs+=4,I[pe.varargs-4>>2]},getStr:function(){return k(pe.get())},get64:function(){var e=pe.get();pe.get();return e},getZero:function(){pe.get()}};function de(e){try{return 0}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||ee(t),t.errno}}function ge(e,t,n,r,i){try{return 0}catch(o){return"undefined"!=typeof FS&&o instanceof FS.ErrnoError||ee(o),o.errno}}function me(e,t,n,r){try{for(var i=0,o=0;o<n;o++){for(var a=I[t+8*o>>2],s=I[t+(8*o+4)>>2],c=0;c<s;c++)pe.printChar(e,P[a+c]);i+=s}return I[r>>2]=i,0}catch(u){return"undefined"!=typeof FS&&u instanceof FS.ErrnoError||ee(u),u.errno}}function ve(e){m(0|e)}var ye={abort:se,emscripten_get_sbrk_ptr:ue,emscripten_memcpy_big:le,emscripten_resize_heap:fe,fd_close:de,fd_seek:ge,fd_write:me,memory:g,setTempRet0:ve,table:v},be=ae();n.asm=be;var _e,we=n.___wasm_call_ctors=function(){return n.asm.__wasm_call_ctors.apply(null,arguments)},xe=(n._malloc=function(){return n.asm.malloc.apply(null,arguments)},n._free=function(){return n.asm.free.apply(null,arguments)},n._getLastError=function(){return n.asm.getLastError.apply(null,arguments)},n._compilePattern=function(){return n.asm.compilePattern.apply(null,arguments)},n._disposeCompiledPatterns=function(){return n.asm.disposeCompiledPatterns.apply(null,arguments)},n._findBestMatch=function(){return n.asm.findBestMatch.apply(null,arguments)},n.___cxa_demangle=function(){return n.asm.__cxa_demangle.apply(null,arguments)},n._setThrew=function(){return n.asm.setThrew.apply(null,arguments)},n.stackSave=function(){return n.asm.stackSave.apply(null,arguments)}),Se=n.stackAlloc=function(){return n.asm.stackAlloc.apply(null,arguments)},ke=n.stackRestore=function(){return n.asm.stackRestore.apply(null,arguments)};n.__growWasmMemory=function(){return n.asm.__growWasmMemory.apply(null,arguments)},n.dynCall_vi=function(){return n.asm.dynCall_vi.apply(null,arguments)},n.dynCall_iiii=function(){return n.asm.dynCall_iiii.apply(null,arguments)},n.dynCall_iiiii=function(){return n.asm.dynCall_iiiii.apply(null,arguments)},n.dynCall_iii=function(){return n.asm.dynCall_iii.apply(null,arguments)},n.dynCall_iidiiii=function(){return n.asm.dynCall_iidiiii.apply(null,arguments)},n.dynCall_vii=function(){return n.asm.dynCall_vii.apply(null,arguments)},n.dynCall_ii=function(){return n.asm.dynCall_ii.apply(null,arguments)},n.dynCall_i=function(){return n.asm.dynCall_i.apply(null,arguments)},n.dynCall_v=function(){return n.asm.dynCall_v.apply(null,arguments)},n.dynCall_viiiiii=function(){return n.asm.dynCall_viiiiii.apply(null,arguments)},n.dynCall_viiiii=function(){return n.asm.dynCall_viiiii.apply(null,arguments)},n.dynCall_viiii=function(){return n.asm.dynCall_viiii.apply(null,arguments)},n.dynCall_jiji=function(){return n.asm.dynCall_jiji.apply(null,arguments)};function Ce(e){function t(){_e||(_e=!0,y||($(),J(),n.onRuntimeInitialized&&n.onRuntimeInitialized(),q()))}e=e||a,K>0||(H(),K>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}if(n.asm=be,n.ccall=w,n.then=function(e){if(_e)e(n);else{var t=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){t&&t(),e(n)}}return n},Z=function e(){_e||Ce(),_e||(Z=e)},n.run=Ce,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return!0,Ce(),e}}();e.exports=i},5780:function(e,t,n){"use strict";var r=n(2332),i=n(9447),o=n(4134);Object.defineProperty(t,"__esModule",{value:!0});var a=n(7120);function s(e){return c.apply(this,arguments)}function c(){return(c=o(i.mark((function e(n){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){var o=r,s=o.log,c=o.warn,u=o.error;a({instantiateWasm:function(e,t){return WebAssembly.instantiate(n,e).then((function(e){t(e.instance)})).catch((function(e){throw e})),{}}}).then((function(n){t.onigasmH=n,e()})),"undefined"!=typeof print&&(r.log=s,r.error=u,r.warn=c)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var u=!1;function l(){return(l=o(i.mark((function e(t){var n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u){e.next=2;break}throw new Error("Onigasm#init has been called and was succesful, subsequent calls are not allowed once initialized");case 2:if("string"!=typeof t){e.next=12;break}return e.next=5,fetch(t);case 5:return e.next=7,e.sent.arrayBuffer();case 7:return n=e.sent,e.next=10,s(n);case 10:e.next=18;break;case 12:if(!(t instanceof ArrayBuffer)){e.next=17;break}return e.next=15,s(t);case 15:e.next=18;break;case 17:throw new TypeError("Expected a string (URL of .wasm file) or ArrayBuffer (.wasm file itself) as first parameter");case 18:u=!0;case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.loadWASM=function(e){return l.apply(this,arguments)}},906:function(e,t,n){"use strict";var r=n(589),i=n(40),o=n(8146),a=Symbol("max"),s=Symbol("length"),c=Symbol("lengthCalculator"),u=Symbol("allowStale"),l=Symbol("maxAge"),h=Symbol("dispose"),f=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),g=Symbol("updateAgeOnGet"),m=function(){return 1},v=function(){function e(t){if(r(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[a]=t.max||1/0;var n=t.length||m;if(this[c]="function"!=typeof n?m:n,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[l]=t.maxAge||0,this[h]=t.dispose,this[f]=t.noDisposeOnSet||!1,this[g]=t.updateAgeOnGet||!1,this.reset()}return i(e,[{key:"max",get:function(){return this[a]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,_(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[l]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,_(this)}},{key:"lengthCalculator",get:function(){return this[c]},set:function(e){var t=this;"function"!=typeof e&&(e=m),e!==this[c]&&(this[c]=e,this[s]=0,this[p].forEach((function(e){e.length=t[c](e.value,e.key),t[s]+=e.length}))),_(this)}},{key:"length",get:function(){return this[s]}},{key:"itemCount",get:function(){return this[p].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var n=this[p].tail;null!==n;){var r=n.prev;S(this,e,n,t),n=r}}},{key:"forEach",value:function(e,t){t=t||this;for(var n=this[p].head;null!==n;){var r=n.next;S(this,e,n,t),n=r}}},{key:"keys",value:function(){return this[p].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[p].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[h]&&this[p]&&this[p].length&&this[p].forEach((function(t){return e[h](t.key,t.value)})),this[d]=new Map,this[p]=new o,this[s]=0}},{key:"dump",value:function(){var e=this;return this[p].map((function(t){return!b(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[p]}},{key:"set",value:function(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");var r=n?Date.now():0,i=this[c](t,e);if(this[d].has(e)){if(i>this[a])return w(this,this[d].get(e)),!1;var o=this[d].get(e).value;return this[h]&&(this[f]||this[h](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[s]+=i-o.length,o.length=i,this.get(e),_(this),!0}var u=new x(e,t,i,r,n);return u.length>this[a]?(this[h]&&this[h](e,t),!1):(this[s]+=u.length,this[p].unshift(u),this[d].set(e,this[p].head),_(this),!0)}},{key:"has",value:function(e){if(!this[d].has(e))return!1;var t=this[d].get(e).value;return!b(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[p].tail;return e?(w(this,e),e.value):null}},{key:"del",value:function(e){w(this,this[d].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-t;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var e=this;this[d].forEach((function(t,n){return y(e,n,!1)}))}}]),e}(),y=function(e,t,n){var r=e[d].get(t);if(r){var i=r.value;if(b(e,i)){if(w(e,r),!e[u])return}else n&&(e[g]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return i.value}},b=function(e,t){if(!t||!t.maxAge&&!e[l])return!1;var n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},_=function(e){if(e[s]>e[a])for(var t=e[p].tail;e[s]>e[a]&&null!==t;){var n=t.prev;w(e,t),t=n}},w=function(e,t){if(t){var n=t.value;e[h]&&e[h](n.key,n.value),e[s]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}},x=function e(t,n,i,o,a){r(this,e),this.key=t,this.value=n,this.length=i,this.now=o,this.maxAge=a||0},S=function(e,t,n,r){var i=n.value;b(e,i)&&(w(e,n),e[u]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=v},586:function(e,t,n){"use strict";var r=n(6108);function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function o(e,t){for(var n,r="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var e,t="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=r.cwd()),s=e),i(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=o(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];i(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,o=r-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var c=t.length-s,u=o<c?o:c,l=-1,h=0;h<=u;++h){if(h===u){if(c>u){if(47===t.charCodeAt(s+h))return t.slice(s+h+1);if(0===h)return t.slice(s+h)}else o>u&&(47===e.charCodeAt(n+h)?l=h:0===h&&(l=0));break}var f=e.charCodeAt(n+h);if(f!==t.charCodeAt(s+h))break;47===f&&(l=h)}var p="";for(h=n+l+1;h<=r;++h)h!==r&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){r=a;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');i(e);var n,r=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!a){r=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(u===t.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=c))}return r===o?o=c:-1===o&&(o=e.length),e.slice(r,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){r=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":e.slice(r,o)},extname:function(e){i(e);for(var t=-1,n=0,r=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===r&&(o=!1,r=s+1),46===c?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){n=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),o=47===r;o?(t.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,u=!0,l=e.length-1,h=0;l>=n;--l)if(47!==(r=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===r?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!u){s=l+1;break}return-1===a||-1===c||0===h||1===h&&a===c-1&&a===s+1?-1!==c&&(t.base=t.name=0===s&&o?e.slice(1,c):e.slice(s,c)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,c)):(t.name=e.slice(s,a),t.base=e.slice(s,c)),t.ext=e.slice(a,c)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},4861:function(e,t,n){var r=n(2332);e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=3)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(5),a=n(6),s=n(2),c="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()};t.createGrammar=function(e,t,n,r,i,o){return new _(e,t,n,r,i,o)};var u=function(e){this.scopeName=e};t.FullScopeDependency=u;var l=function(){function e(e,t){this.scopeName=e,this.include=t}return e.prototype.toKey=function(){return this.scopeName+"#"+this.include},e}();t.PartialScopeDependency=l;var h=function(){function e(){this.full=[],this.partial=[],this.visitedRule=new Set,this._seenFull=new Set,this._seenPartial=new Set}return e.prototype.add=function(e){e instanceof u?this._seenFull.has(e.scopeName)||(this._seenFull.add(e.scopeName),this.full.push(e)):this._seenPartial.has(e.toKey())||(this._seenPartial.add(e.toKey()),this.partial.push(e))},e}();function f(e,t,n,r,o){for(var a=0,s=r;a<s.length;a++){var c=s[a];if(!e.visitedRule.has(c)){e.visitedRule.add(c);var h=c.repository?i.mergeObjects({},o,c.repository):o;Array.isArray(c.patterns)&&f(e,t,n,c.patterns,h);var g=c.include;if(g)if("$base"===g||g===t.scopeName)d(e,t,t);else if("$self"===g||g===n.scopeName)d(e,t,n);else if("#"===g.charAt(0))p(e,t,n,g.substring(1),h);else{var m=g.indexOf("#");if(m>=0){var v=g.substring(0,m),y=g.substring(m+1);v===t.scopeName?p(e,t,t,y,h):v===n.scopeName?p(e,t,n,y,h):e.add(new l(v,g.substring(m+1)))}else e.add(new u(g))}}}}function p(e,t,n,r,i){void 0===i&&(i=n.repository),i&&i[r]&&f(e,t,n,[i[r]],i)}function d(e,t,n){if(n.patterns&&Array.isArray(n.patterns)&&f(e,t,n,n.patterns,n.repository),n.injections){var r=[];for(var i in n.injections)r.push(n.injections[i]);f(e,t,n,r,n.repository)}}function g(e,t){if(!e)return!1;if(e===t)return!0;var n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}function m(e,t){if(t.length<e.length)return!1;var n=0;return e.every((function(e){for(var r=n;r<t.length;r++)if(g(t[r],e))return n=r+1,!0;return!1}))}function v(e,t,n,r,i){for(var s=a.createMatchers(t,m),c=o.RuleFactory.getCompiledRuleId(n,r,i.repository),u=0,l=s;u<l.length;u++){var h=l[u];e.push({matcher:h.matcher,ruleId:c,grammar:i,priority:h.priority})}}t.ScopeDependencyCollector=h,t.collectSpecificDependencies=p,t.collectDependencies=d;var y=function(e,t,n,r){this.scopeName=e,this.languageId=t,this.tokenType=n,this.themeData=r};t.ScopeMetadata=y;var b=function(){function e(t,n,i){if(this._initialLanguage=t,this._themeProvider=n,this._cache=new Map,this._defaultMetaData=new y("",this._initialLanguage,0,[this._themeProvider.getDefaults()]),this._embeddedLanguages=Object.create(null),i)for(var o=Object.keys(i),a=0,s=o.length;a<s;a++){var c=o[a],u=i[c];"number"==typeof u&&0!==u?this._embeddedLanguages[c]=u:r.warn("Invalid embedded language found at scope "+c+": <<"+u+">>")}var l=Object.keys(this._embeddedLanguages).map((function(t){return e._escapeRegExpCharacters(t)}));0===l.length?this._embeddedLanguagesRegex=null:(l.sort(),l.reverse(),this._embeddedLanguagesRegex=new RegExp("^(("+l.join(")|(")+"))($|\\.)",""))}return e.prototype.onDidChangeTheme=function(){this._cache=new Map,this._defaultMetaData=new y("",this._initialLanguage,0,[this._themeProvider.getDefaults()])},e.prototype.getDefaultMetadata=function(){return this._defaultMetaData},e._escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},e.prototype.getMetadataForScope=function(t){if(null===t)return e._NULL_SCOPE_METADATA;var n=this._cache.get(t);return n||(n=this._doGetMetadataForScope(t),this._cache.set(t,n),n)},e.prototype._doGetMetadataForScope=function(e){var t=this._scopeToLanguage(e),n=this._toStandardTokenType(e),r=this._themeProvider.themeMatch(e);return new y(e,t,n,r)},e.prototype._scopeToLanguage=function(e){if(!e)return 0;if(!this._embeddedLanguagesRegex)return 0;var t=e.match(this._embeddedLanguagesRegex);return t&&(this._embeddedLanguages[t[1]]||0)||0},e.prototype._toStandardTokenType=function(t){var n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 0;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"meta.embedded":return 8}throw new Error("Unexpected match for standard token type!")},e._NULL_SCOPE_METADATA=new y("",0,0,null),e.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/,e}(),_=function(){function e(e,t,n,r,i,o){if(this._scopeMetadataProvider=new b(t,i,n),this._onigLib=o,this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=x(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(var s=0,c=Object.keys(r);s<c.length;s++)for(var u=c[s],l=0,h=a.createMatchers(u,m);l<h.length;l++){var f=h[l];this._tokenTypeMatchers.push({matcher:f.matcher,type:r[u]})}}return e.prototype.dispose=function(){for(var e=0,t=this._ruleId2desc;e<t.length;e++){var n=t[e];n&&n.dispose()}},e.prototype.createOnigScanner=function(e){return this._onigLib.createOnigScanner(e)},e.prototype.createOnigString=function(e){return this._onigLib.createOnigString(e)},e.prototype.onDidChangeTheme=function(){this._scopeMetadataProvider.onDidChangeTheme()},e.prototype.getMetadataForScope=function(e){return this._scopeMetadataProvider.getMetadataForScope(e)},e.prototype.getInjections=function(){var e=this;if(null===this._injections){this._injections=[];var t=this._grammar.injections;if(t)for(var n in t)v(this._injections,n,t[n],this,this._grammar);if(this._grammarRepository){var r=this._grammarRepository.injections(this._grammar.scopeName);r&&r.forEach((function(t){var n=e.getExternalGrammar(t);if(n){var r=n.injectionSelector;r&&v(e._injections,r,n,e,n)}}))}this._injections.sort((function(e,t){return e.priority-t.priority}))}return this._injections},e.prototype.registerRule=function(e){var t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n},e.prototype.getRule=function(e){return this._ruleId2desc[e]},e.prototype.getExternalGrammar=function(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){var n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=x(n,t&&t.$base),this._includedGrammars[e]}return null},e.prototype.tokenizeLine=function(e,t){var n=this._tokenize(e,t,!1);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack}},e.prototype.tokenizeLine2=function(e,t){var n=this._tokenize(e,t,!0);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack}},e.prototype._tokenize=function(e,t,n){var r;if(-1===this._rootId&&(this._rootId=o.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==T.NULL)r=!1,t.reset();else{r=!0;var i=this._scopeMetadataProvider.getDefaultMetadata(),a=i.themeData[0],s=A.set(0,i.languageId,i.tokenType,a.fontStyle,a.foreground,a.background),c=this.getRule(this._rootId).getName(null,null),u=this._scopeMetadataProvider.getMetadataForScope(c),l=R.mergeMetadata(s,null,u),h=new R(null,null===c?"unknown":c,l);t=new T(null,this._rootId,-1,-1,!1,null,h,h)}e+="\n";var f=this.createOnigString(e),p=f.content.length,d=new I(n,e,this._tokenTypeMatchers),g=E(this,f,r,0,t,d,!0);return w(f),{lineLength:p,lineTokens:d,ruleStack:g}},e}();function w(e){"function"==typeof e.dispose&&e.dispose()}function x(e,t){return(e=i.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}function S(e,t,n,r,i,o,a){if(0!==o.length){for(var s=t.content,c=Math.min(o.length,a.length),u=[],l=a[0].end,h=0;h<c;h++){var f=o[h];if(null!==f){var p=a[h];if(0!==p.length){if(p.start>l)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,p.start):i.produce(r,p.start),f.retokenizeCapturedWithRuleId){var d=f.getName(s,a),g=r.contentNameScopesList.push(e,d),m=f.getContentName(s,a),v=g.push(e,m),y=r.push(f.retokenizeCapturedWithRuleId,p.start,-1,!1,null,g,v),b=e.createOnigString(s.substring(0,p.end));E(e,b,n&&0===p.start,p.start,y,i,!1),w(b)}else{var _=f.getName(s,a);if(null!==_){var x=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).push(e,_);u.push(new P(x,p.end))}}}}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}}function k(e){for(var t=[],n=0,r=e.rules.length;n<r;n++)t.push(" - "+e.rules[n]+": "+e.debugRegExps[n]);return t.join("\n")}function C(e,t,n,i,o,a){var u=function(e,t,n,i,o,a){var u=o.getRule(e),l=u.compile(e,o.endRule,n,i===a),h=0;s.DebugFlags.InDebugMode&&(h=c());var f=l.scanner.findNextMatchSync(t,i);if(s.DebugFlags.InDebugMode){var p=c()-h;p>5&&r.warn("Rule "+u.debugName+" ("+u.id+") matching took "+p+" against '"+t+"'"),f&&r.log("matched rule id: "+l.rules[f.index]+" from "+f.captureIndices[0].start+" to "+f.captureIndices[0].end)}return f?{captureIndices:f.captureIndices,matchedRuleId:l.rules[f.index]}:null}(e,t,n,i,o,a),l=e.getInjections();if(0===l.length)return u;var h=function(e,t,n,i,o,a,c){for(var u,l=Number.MAX_VALUE,h=null,f=0,p=a.contentNameScopesList.generateScopes(),d=0,g=e.length;d<g;d++){var m=e[d];if(m.matcher(p)){var v=t.getRule(m.ruleId).compile(t,null,i,o===c),y=v.scanner.findNextMatchSync(n,o);if(s.DebugFlags.InDebugMode&&(r.log(" scanning for injections"),r.log(k(v))),y){var b=y.captureIndices[0].start;if(!(b>=l)&&(l=b,h=y.captureIndices,u=v.rules[y.index],f=m.priority,l===o))break}}}return h?{priorityMatch:-1===f,captureIndices:h,matchedRuleId:u}:null}(l,e,t,n,i,o,a);if(!h)return u;if(!u)return h;var f=u.captureIndices[0].start,p=h.captureIndices[0].start;return p<f||h.priorityMatch&&p===f?h:u}function E(e,t,n,i,a,c,u){var l=t.content.length,h=!1,f=-1;if(u){var p=function(e,t,n,i,a,c){for(var u=a.beginRuleCapturedEOL?0:-1,l=[],h=a;h;h=h.pop()){var f=h.getRule(e);f instanceof o.BeginWhileRule&&l.push({rule:f,stack:h})}for(var p=l.pop();p;p=l.pop()){var d=p.rule.compileWhile(e,p.stack.endRule,n,u===i),g=d.scanner.findNextMatchSync(t,i);if(s.DebugFlags.InDebugMode&&(r.log(" scanning for while rule"),r.log(k(d))),!g){s.DebugFlags.InDebugMode&&r.log(" popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),a=p.stack.pop();break}if(-2!==d.rules[g.index]){a=p.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(c.produce(p.stack,g.captureIndices[0].start),S(e,t,n,p.stack,c,p.rule.whileCaptures,g.captureIndices),c.produce(p.stack,g.captureIndices[0].end),u=g.captureIndices[0].end,g.captureIndices[0].end>i&&(i=g.captureIndices[0].end,n=!1))}return{stack:a,linePos:i,anchorPosition:u,isFirstLine:n}}(e,t,n,i,a,c);a=p.stack,i=p.linePos,n=p.isFirstLine,f=p.anchorPosition}for(;!h;)d();function d(){s.DebugFlags.InDebugMode&&(r.log(""),r.log("@@scanNext "+i+": |"+t.content.substr(i).replace(/\n$/,"\\n")+"|"));var u=C(e,t,n,i,a,f);if(!u)return s.DebugFlags.InDebugMode&&r.log(" no more matches."),c.produce(a,l),void(h=!0);var p=u.captureIndices,d=u.matchedRuleId,g=!!(p&&p.length>0)&&p[0].end>i;if(-1===d){var m=a.getRule(e);s.DebugFlags.InDebugMode&&r.log(" popping "+m.debugName+" - "+m.debugEndRegExp),c.produce(a,p[0].start),a=a.setContentNameScopesList(a.nameScopesList),S(e,t,n,a,c,m.endCaptures,p),c.produce(a,p[0].end);var v=a;if(a=a.pop(),f=v.getAnchorPos(),!g&&v.getEnterPos()===i)return s.DebugFlags.InDebugMode&&r.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),a=v,c.produce(a,l),void(h=!0)}else{var y=e.getRule(d);c.produce(a,p[0].start);var b=a,_=y.getName(t.content,p),w=a.contentNameScopesList.push(e,_);if(a=a.push(d,i,f,p[0].end===l,null,w,w),y instanceof o.BeginEndRule){var x=y;s.DebugFlags.InDebugMode&&r.log(" pushing "+x.debugName+" - "+x.debugBeginRegExp),S(e,t,n,a,c,x.beginCaptures,p),c.produce(a,p[0].end),f=p[0].end;var k=x.getContentName(t.content,p),E=w.push(e,k);if(a=a.setContentNameScopesList(E),x.endHasBackReferences&&(a=a.setEndRule(x.getEndWithResolvedBackReferences(t.content,p))),!g&&b.hasSameRuleAs(a))return s.DebugFlags.InDebugMode&&r.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),a=a.pop(),c.produce(a,l),void(h=!0)}else if(y instanceof o.BeginWhileRule){if(x=y,s.DebugFlags.InDebugMode&&r.log(" pushing "+x.debugName),S(e,t,n,a,c,x.beginCaptures,p),c.produce(a,p[0].end),f=p[0].end,k=x.getContentName(t.content,p),E=w.push(e,k),a=a.setContentNameScopesList(E),x.whileHasBackReferences&&(a=a.setEndRule(x.getWhileWithResolvedBackReferences(t.content,p))),!g&&b.hasSameRuleAs(a))return s.DebugFlags.InDebugMode&&r.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),a=a.pop(),c.produce(a,l),void(h=!0)}else{var A=y;if(s.DebugFlags.InDebugMode&&r.log(" matched "+A.debugName+" - "+A.debugMatchRegExp),S(e,t,n,a,c,A.captures,p),c.produce(a,p[0].end),a=a.pop(),!g)return s.DebugFlags.InDebugMode&&r.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),a=a.safePop(),c.produce(a,l),void(h=!0)}}p[0].end>i&&(i=p[0].end,n=!1)}return a}t.Grammar=_;var A=function(){function e(){}return e.toBinaryStr=function(e){for(var t=e.toString(2);t.length<32;)t="0"+t;return t},e.printMetadata=function(t){var n=e.getLanguageId(t),i=e.getTokenType(t),o=e.getFontStyle(t),a=e.getForeground(t),s=e.getBackground(t);r.log({languageId:n,tokenType:i,fontStyle:o,foreground:a,background:s})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.set=function(t,n,r,i,o,a){var s=e.getLanguageId(t),c=e.getTokenType(t),u=e.getFontStyle(t),l=e.getForeground(t),h=e.getBackground(t);return 0!==n&&(s=n),0!==r&&(c=8===r?0:r),-1!==i&&(u=i),0!==o&&(l=o),0!==a&&(h=a),(s<<0|c<<8|u<<11|l<<14|h<<23)>>>0},e}();t.StackElementMetadata=A;var R=function(){function e(e,t,n){this.parent=e,this.scope=t,this.metadata=n}return e._equals=function(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scope!==t.scope||e.metadata!==t.metadata)return!1;e=e.parent,t=t.parent}},e.prototype.equals=function(t){return e._equals(this,t)},e._matchesScope=function(e,t,n){return t===e||e.substring(0,n.length)===n},e._matches=function(e,t){if(null===t)return!0;for(var n=t.length,r=0,i=t[r],o=i+".";e;){if(this._matchesScope(e.scope,i,o)){if(++r===n)return!0;o=(i=t[r])+"."}e=e.parent}return!1},e.mergeMetadata=function(e,t,n){if(null===n)return e;var r=-1,i=0,o=0;if(null!==n.themeData)for(var a=0,s=n.themeData.length;a<s;a++){var c=n.themeData[a];if(this._matches(t,c.parentScopes)){r=c.fontStyle,i=c.foreground,o=c.background;break}}return A.set(e,n.languageId,n.tokenType,r,i,o)},e._push=function(t,n,r){for(var i=0,o=r.length;i<o;i++){var a=r[i],s=n.getMetadataForScope(a),c=e.mergeMetadata(t.metadata,t,s);t=new e(t,a,c)}return t},e.prototype.push=function(t,n){return null===n?this:n.indexOf(" ")>=0?e._push(this,t,n.split(/ /g)):e._push(this,t,[n])},e._generateScopes=function(e){for(var t=[],n=0;e;)t[n++]=e.scope,e=e.parent;return t.reverse(),t},e.prototype.generateScopes=function(){return e._generateScopes(this)},e}();t.ScopeListElement=R;var T=function(){function e(e,t,n,r,i,o,a,s){this.parent=e,this.depth=this.parent?this.parent.depth+1:1,this.ruleId=t,this._enterPos=n,this._anchorPos=r,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=s}return e._structuralEquals=function(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}},e._equals=function(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)},e.prototype.clone=function(){return this},e.prototype.equals=function(t){return null!==t&&e._equals(this,t)},e._reset=function(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent},e.prototype.reset=function(){e._reset(this)},e.prototype.pop=function(){return this.parent},e.prototype.safePop=function(){return this.parent?this.parent:this},e.prototype.push=function(t,n,r,i,o,a,s){return new e(this,t,n,r,i,o,a,s)},e.prototype.getEnterPos=function(){return this._enterPos},e.prototype.getAnchorPos=function(){return this._anchorPos},e.prototype.getRule=function(e){return e.getRule(this.ruleId)},e.prototype._writeString=function(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]="("+this.ruleId+", TODO-"+this.nameScopesList+", TODO-"+this.contentNameScopesList+")",t},e.prototype.toString=function(){var e=[];return this._writeString(e,0),"["+e.join(",")+"]"},e.prototype.setContentNameScopesList=function(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)},e.prototype.setEndRule=function(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)},e.prototype.hasSameRuleAs=function(e){return this.ruleId===e.ruleId},e.NULL=new e(null,0,0,0,!1,null,null,null),e}();t.StackElement=T;var P=function(e,t){this.scopes=e,this.endPos=t};t.LocalStackElement=P;var I=function(){function e(e,t,n){this._emitBinaryTokens=e,this._tokenTypeOverrides=n,s.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}return e.prototype.produce=function(e,t){this.produceFromScopes(e.contentNameScopesList,t)},e.prototype.produceFromScopes=function(e,t){if(!(this._lastTokenEndIndex>=t)){if(this._emitBinaryTokens){for(var n=e.metadata,i=0,o=this._tokenTypeOverrides;i<o.length;i++){var a=o[i];a.matcher(e.generateScopes())&&(n=A.set(n,0,M(a.type),-1,0,0))}return this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n||(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n)),void(this._lastTokenEndIndex=t)}var c=e.generateScopes();if(s.DebugFlags.InDebugMode){r.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(var u=0;u<c.length;u++)r.log(" * "+c[u])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:c}),this._lastTokenEndIndex=t}},e.prototype.getResult=function(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens},e.prototype.getBinaryResult=function(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);for(var n=new Uint32Array(this._binaryTokens.length),r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n},e}();function M(e){switch(e){case 4:return 4;case 2:return 2;case 1:return 1;case 0:default:return 8}}},function(e,t,n){"use strict";function r(e){return Array.isArray(e)?function(e){for(var t=[],n=0,i=e.length;n<i;n++)t[n]=r(e[n]);return t}(e):"object"==typeof e?function(e){var t={};for(var n in e)t[n]=r(e[n]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.clone=function(e){return r(e)},t.mergeObjects=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){for(var n in t)e[n]=t[n]})),e},t.basename=function e(t){var n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};var i=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/,o=function(){function e(){}return e.hasCaptures=function(e){return null!==e&&i.test(e)},e.replaceCaptures=function(e,t,n){return e.replace(i,(function(e,r,i,o){var a=n[parseInt(r||i,10)];if(!a)return e;for(var s=t.substring(a.start,a.end);"."===s[0];)s=s.substring(1);switch(o){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}))},e}();t.RegexSource=o},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.DebugFlags={InDebugMode:void 0!==e&&!!e.env.VSCODE_TEXTMATE_DEBUG}}).call(this,n(7))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(8),s=n(11),c=n(0),u=function(){function e(e){this._options=e,this._syncRegistry=new o.SyncRegistry(s.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}return e.prototype.dispose=function(){this._syncRegistry.dispose()},e.prototype.setTheme=function(e,t){this._syncRegistry.setTheme(s.Theme.createFromRawTheme(e,t))},e.prototype.getColorMap=function(){return this._syncRegistry.getColorMap()},e.prototype.loadGrammarWithEmbeddedLanguages=function(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})},e.prototype.loadGrammarWithConfiguration=function(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes)},e.prototype.loadGrammar=function(e){return this._loadGrammar(e,0,null,null)},e.prototype._doLoadSingleGrammar=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this._options.loadGrammar(e)];case 1:return(t=r.sent())&&(n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0,this._syncRegistry.addGrammar(t,n)),[2]}}))}))},e.prototype._loadSingleGrammar=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),[2,this._ensureGrammarCache.get(e)]}))}))},e.prototype._collectDependenciesForDep=function(e,t,n){var r=this._syncRegistry.lookup(n.scopeName);if(r){n instanceof c.FullScopeDependency?c.collectDependencies(t,this._syncRegistry.lookup(e),r):c.collectSpecificDependencies(t,this._syncRegistry.lookup(e),r,n.include);var i=this._syncRegistry.injections(n.scopeName);if(i)for(var o=0,a=i;o<a.length;o++){var s=a[o];t.add(new c.FullScopeDependency(s))}}else if(n.scopeName===e)throw new Error("No grammar provided for <"+e+">")},e.prototype._loadGrammar=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a,s,u,l,h,f,p,d,g,m,v,y=this;return i(this,(function(i){switch(i.label){case 0:r=new Set,a=new Set,r.add(e),s=[new c.FullScopeDependency(e)],i.label=1;case 1:return s.length>0?(u=s,s=[],[4,Promise.all(u.map((function(e){return y._loadSingleGrammar(e.scopeName)})))]):[3,3];case 2:for(i.sent(),l=new c.ScopeDependencyCollector,h=0,f=u;h<f.length;h++)v=f[h],this._collectDependenciesForDep(e,l,v);for(p=0,d=l.full;p<d.length;p++)v=d[p],r.has(v.scopeName)||(r.add(v.scopeName),s.push(v));for(g=0,m=l.partial;g<m.length;g++)v=m[g],r.has(v.scopeName)||a.has(v.toKey())||(a.add(v.toKey()),s.push(v));return[3,1];case 3:return[2,this.grammarForScopeName(e,t,n,o)]}}))}))},e.prototype.addGrammar=function(e,t,n,o){return void 0===t&&(t=[]),void 0===n&&(n=0),void 0===o&&(o=null),r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return this._syncRegistry.addGrammar(e,t),[4,this.grammarForScopeName(e.scopeName,n,o)];case 1:return[2,r.sent()]}}))}))},e.prototype.grammarForScopeName=function(e,t,n,r){return void 0===t&&(t=0),void 0===n&&(n=null),void 0===r&&(r=null),this._syncRegistry.grammarForScopeName(e,t,n,r)},e}();t.Registry=u,t.INITIAL=c.StackElement.NULL,t.parseRawGrammar=a.parseRawGrammar},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=function(){function e(e,t){this._theme=e,this._grammars={},this._rawGrammars={},this._injectionGrammars={},this._onigLibPromise=t}return e.prototype.dispose=function(){for(var e in this._grammars)this._grammars.hasOwnProperty(e)&&this._grammars[e].dispose()},e.prototype.setTheme=function(e){var t=this;this._theme=e,Object.keys(this._grammars).forEach((function(e){t._grammars[e].onDidChangeTheme()}))},e.prototype.getColorMap=function(){return this._theme.getColorMap()},e.prototype.addGrammar=function(e,t){this._rawGrammars[e.scopeName]=e,t&&(this._injectionGrammars[e.scopeName]=t)},e.prototype.lookup=function(e){return this._rawGrammars[e]},e.prototype.injections=function(e){return this._injectionGrammars[e]},e.prototype.getDefaults=function(){return this._theme.getDefaults()},e.prototype.themeMatch=function(e){return this._theme.match(e)},e.prototype.grammarForScopeName=function(e,t,n,a){return r(this,void 0,void 0,(function(){var r,s,c,u,l;return i(this,(function(i){switch(i.label){case 0:return this._grammars[e]?[3,2]:(r=this._rawGrammars[e])?(s=this._grammars,c=e,u=o.createGrammar,l=[r,t,n,a,this],[4,this._onigLibPromise]):[2,null];case 1:s[c]=u.apply(void 0,l.concat([i.sent()])),i.label=2;case 2:return[2,this._grammars[e]]}}))}))},e}();t.SyncRegistry=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=/\\(\d+)/,s=/\\(\d+)/g,c=function(){function e(e,t,n){this.debugRegExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}return e.prototype.dispose=function(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()},e}();t.CompiledRule=c;var u=function(){function e(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=o.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=o.RegexSource.hasCaptures(this._contentName)}return Object.defineProperty(e.prototype,"debugName",{get:function(){var e=this.$location?o.basename(this.$location.filename)+":"+this.$location.line:"unknown";return this.constructor.name+"#"+this.id+" @ "+e},enumerable:!0,configurable:!0}),e.prototype.getName=function(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?o.RegexSource.replaceCaptures(this._name,e,t):this._name},e.prototype.getContentName=function(e,t){return this._contentNameIsCapturing&&null!==this._contentName?o.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName},e}();t.Rule=u;var l=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.retokenizeCapturedWithRuleId=o,a}return i(t,e),t.prototype.dispose=function(){},t.prototype.collectPatternsRecursive=function(e,t,n){throw new Error("Not supported!")},t.prototype.compile=function(e,t,n,r){throw new Error("Not supported!")},t}(u);t.CaptureRule=l;var h=function(){function e(e,t,n){if(void 0===n&&(n=!0),n)if(e){for(var r=e.length,i=0,o=[],s=!1,c=0;c<r;c++)if("\\"===e.charAt(c)&&c+1<r){var u=e.charAt(c+1);"z"===u?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):"A"!==u&&"G"!==u||(s=!0),c++}this.hasAnchor=s,0===i?this.source=e:(o.push(e.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}return e.prototype.clone=function(){return new e(this.source,this.ruleId,!0)},e.prototype.setSource=function(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))},e.prototype.resolveBackReferences=function(e,t){var n=t.map((function(t){return e.substring(t.start,t.end)}));return s.lastIndex=0,this.source.replace(s,(function(e,t){return(n[parseInt(t,10)]||"").replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}))},e.prototype._buildAnchorCache=function(){var e,t,n,r,i=[],o=[],a=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,o[e]=n,a[e]=n,s[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="",o[e+1]="",a[e+1]="A",s[e+1]="A"):"G"===r?(i[e+1]="",o[e+1]="G",a[e+1]="",s[e+1]="G"):(i[e+1]=r,o[e+1]=r,a[e+1]=r,s[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:o.join(""),A1_G0:a.join(""),A1_G1:s.join("")}},e.prototype.resolveAnchors=function(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source},e}();t.RegExpSource=h;var f=function(){function e(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}return e.prototype.dispose=function(){this._disposeCaches()},e.prototype._disposeCaches=function(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)},e.prototype.push=function(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor},e.prototype.unshift=function(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor},e.prototype.length=function(){return this._items.length},e.prototype.setSource=function(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))},e.prototype.compile=function(e,t,n){if(this._hasAnchors)return t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0);if(!this._cached){var r=this._items.map((function(e){return e.source}));this._cached=new c(e,r,this._items.map((function(e){return e.ruleId})))}return this._cached},e.prototype._resolveAnchors=function(e,t,n){var r=this._items.map((function(e){return e.resolveAnchors(t,n)}));return new c(e,r,this._items.map((function(e){return e.ruleId})))},e}();t.RegExpSourceList=f;var p=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,null)||this;return a._match=new h(i,a.id),a.captures=o,a._cachedCompiledPatterns=null,a}return i(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},Object.defineProperty(t.prototype,"debugMatchRegExp",{get:function(){return""+this._match.source},enumerable:!0,configurable:!0}),t.prototype.collectPatternsRecursive=function(e,t,n){t.push(this._match)},t.prototype.compile=function(e,t,n,r){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new f,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns.compile(e,n,r)},t}(u);t.MatchRule=p;var d=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.patterns=o.patterns,a.hasMissingPatterns=o.hasMissingPatterns,a._cachedCompiledPatterns=null,a}return i(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},t.prototype.collectPatternsRecursive=function(e,t,n){var r,i;for(r=0,i=this.patterns.length;r<i;r++)e.getRule(this.patterns[r]).collectPatternsRecursive(e,t,!1)},t.prototype.compile=function(e,t,n,r){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new f,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns.compile(e,n,r)},t}(u);t.IncludeOnlyRule=d;var g=function(e){function t(t,n,r,i,o,a,s,c,u,l){var f=e.call(this,t,n,r,i)||this;return f._begin=new h(o,f.id),f.beginCaptures=a,f._end=new h(s||"",-1),f.endHasBackReferences=f._end.hasBackReferences,f.endCaptures=c,f.applyEndPatternLast=u||!1,f.patterns=l.patterns,f.hasMissingPatterns=l.hasMissingPatterns,f._cachedCompiledPatterns=null,f}return i(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},Object.defineProperty(t.prototype,"debugBeginRegExp",{get:function(){return""+this._begin.source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugEndRegExp",{get:function(){return""+this._end.source},enumerable:!0,configurable:!0}),t.prototype.getEndWithResolvedBackReferences=function(e,t){return this._end.resolveBackReferences(e,t)},t.prototype.collectPatternsRecursive=function(e,t,n){if(n){var r,i=void 0;for(i=0,r=this.patterns.length;i<r;i++)e.getRule(this.patterns[i]).collectPatternsRecursive(e,t,!1)}else t.push(this._begin)},t.prototype.compile=function(e,t,n,r){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new f,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0),this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)),this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns.compile(e,n,r)},t}(u);t.BeginEndRule=g;var m=function(e){function t(t,n,r,i,o,a,s,c,u){var l=e.call(this,t,n,r,i)||this;return l._begin=new h(o,l.id),l.beginCaptures=a,l.whileCaptures=c,l._while=new h(s,-2),l.whileHasBackReferences=l._while.hasBackReferences,l.patterns=u.patterns,l.hasMissingPatterns=u.hasMissingPatterns,l._cachedCompiledPatterns=null,l._cachedCompiledWhilePatterns=null,l}return i(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)},Object.defineProperty(t.prototype,"debugBeginRegExp",{get:function(){return""+this._begin.source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugWhileRegExp",{get:function(){return""+this._while.source},enumerable:!0,configurable:!0}),t.prototype.getWhileWithResolvedBackReferences=function(e,t){return this._while.resolveBackReferences(e,t)},t.prototype.collectPatternsRecursive=function(e,t,n){if(n){var r,i=void 0;for(i=0,r=this.patterns.length;i<r;i++)e.getRule(this.patterns[i]).collectPatternsRecursive(e,t,!1)}else t.push(this._begin)},t.prototype.compile=function(e,t,n,r){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new f,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns.compile(e,n,r)},t.prototype.compileWhile=function(e,t,n,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new f,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns.compile(e,n,r)},t}(u);t.BeginWhileRule=m;var v=function(){function e(){}return e.createCaptureRule=function(e,t,n,r,i){return e.registerRule((function(e){return new l(t,e,n,r,i)}))},e.getCompiledRuleId=function(t,n,r){return t.id||n.registerRule((function(i){if(t.id=i,t.match)return new p(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=o.mergeObjects({},r,t.repository));var a=t.patterns;return void 0===a&&t.include&&(a=[{include:t.include}]),new d(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(a,n,r))}return t.while?new m(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new g(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))})),t.id},e._compileCaptures=function(t,n,r){var i=[];if(t){var o=0;for(var a in t)"$vscodeTextmateLocation"!==a&&(c=parseInt(a,10))>o&&(o=c);for(var s=0;s<=o;s++)i[s]=null;for(var a in t)if("$vscodeTextmateLocation"!==a){var c=parseInt(a,10),u=0;t[a].patterns&&(u=e.getCompiledRuleId(t[a],n,r)),i[c]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,u)}}return i},e._compilePatterns=function(t,n,r){var i=[];if(t)for(var o=0,a=t.length;o<a;o++){var s=t[o],c=-1;if(s.include)if("#"===s.include.charAt(0)){var u=r[s.include.substr(1)];u&&(c=e.getCompiledRuleId(u,n,r))}else if("$base"===s.include||"$self"===s.include)c=e.getCompiledRuleId(r[s.include],n,r);else{var l=null,h=null,f=s.include.indexOf("#");f>=0?(l=s.include.substring(0,f),h=s.include.substring(f+1)):l=s.include;var p=n.getExternalGrammar(l,r);if(p)if(h){var v=p.repository[h];v&&(c=e.getCompiledRuleId(v,n,p.repository))}else c=e.getCompiledRuleId(p.repository.$self,n,p.repository)}else c=e.getCompiledRuleId(s,n,r);if(-1!==c){var y=n.getRule(c),b=!1;if((y instanceof d||y instanceof g||y instanceof m)&&y.hasMissingPatterns&&0===y.patterns.length&&(b=!0),b)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}},e}();t.RuleFactory=v},function(e,t,n){"use strict";function i(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=function(e,t){for(var n,o,a,s=[],c=(a=(o=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n=e),{next:function(){if(!a)return null;var e=a[0];return a=o.exec(n),e}}),u=c.next();null!==u;){var l=0;if(2===u.length&&":"===u.charAt(1)){switch(u.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:r.log("Unknown priority "+u+" in scope selector")}u=c.next()}var h=p();if(s.push({matcher:h,priority:l}),","!==u)break;u=c.next()}return s;function f(){if("-"===u){u=c.next();var e=f();return function(t){return!!e&&!e(t)}}if("("===u){u=c.next();var n=function(){for(var e=[],t=p();t&&(e.push(t),"|"===u||","===u);){do{u=c.next()}while("|"===u||","===u);t=p()}return function(t){return e.some((function(e){return e(t)}))}}();return")"===u&&(u=c.next()),n}if(i(u)){var r=[];do{r.push(u),u=c.next()}while(i(u));return function(e){return t(r,e)}}return null}function p(){for(var e=[],t=f();t;)e.push(t),t=f();return function(t){return e.every((function(e){return e(t)}))}}}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&p())}function p(){if(!l){var e=s(f);l=!0;for(var t=u.length;t;){for(c=u,u=[];++h<t;)c&&c[h].run();h=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(2),o=n(10);t.parseRawGrammar=function(e,t){return void 0===t&&(t=null),null!==t&&/\.json$/.test(t)?function(e,t){return i.DebugFlags.InDebugMode?o.parse(e,t,!0):JSON.parse(e)}(e,t):function(e,t){return i.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parse(e)}(e,t)}},function(e,t,n){"use strict";function r(e,t,n){var r=e.length,i=0,o=1,a=0;function s(t){if(null===n)i+=t;else for(;t>0;)10===e.charCodeAt(i)?(i++,o++,a=0):(i++,a++),t--}function c(e){null===n?i=e:s(e-i)}function u(){for(;i<r;){var t=e.charCodeAt(i);if(32!==t&&9!==t&&13!==t&&10!==t)break;s(1)}}function l(t){return e.substr(i,t.length)===t&&(s(t.length),!0)}function h(t){var n=e.indexOf(t,i);c(-1!==n?n+t.length:r)}function f(t){var n=e.indexOf(t,i);if(-1!==n){var o=e.substring(i,n);return c(n+t.length),o}return o=e.substr(i),c(r),o}r>0&&65279===e.charCodeAt(0)&&(i=1);var p=0,d=null,g=[],m=[],v=null;function y(e,t){g.push(p),m.push(d),p=e,d=t}function b(){if(0===g.length)return _("illegal state stack");p=g.pop(),d=m.pop()}function _(t){throw new Error("Near offset "+i+": "+t+" ~~~"+e.substr(i,50)+"~~~")}var w,x,S,k=function(){if(null===v)return _("missing <key>");var e={};null!==n&&(e[n]={filename:t,line:o,char:a}),d[v]=e,v=null,y(1,e)},C=function(){if(null===v)return _("missing <key>");var e=[];d[v]=e,v=null,y(2,e)},E=function(){var e={};null!==n&&(e[n]={filename:t,line:o,char:a}),d.push(e),y(1,e)},A=function(){var e=[];d.push(e),y(2,e)};function R(){if(1!==p)return _("unexpected </dict>");b()}function T(){return 1===p||2!==p?_("unexpected </array>"):void b()}function P(e){if(1===p){if(null===v)return _("missing <key>");d[v]=e,v=null}else 2===p?d.push(e):d=e}function I(e){if(isNaN(e))return _("cannot parse float");if(1===p){if(null===v)return _("missing <key>");d[v]=e,v=null}else 2===p?d.push(e):d=e}function M(e){if(isNaN(e))return _("cannot parse integer");if(1===p){if(null===v)return _("missing <key>");d[v]=e,v=null}else 2===p?d.push(e):d=e}function D(e){if(1===p){if(null===v)return _("missing <key>");d[v]=e,v=null}else 2===p?d.push(e):d=e}function O(e){if(1===p){if(null===v)return _("missing <key>");d[v]=e,v=null}else 2===p?d.push(e):d=e}function N(e){if(1===p){if(null===v)return _("missing <key>");d[v]=e,v=null}else 2===p?d.push(e):d=e}function L(e){if(e.isClosed)return"";var t=f("</");return h(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;i<r&&(u(),!(i>=r));){var j=e.charCodeAt(i);if(s(1),60!==j)return _("expected <");if(i>=r)return _("unexpected end of input");var F=e.charCodeAt(i);if(63!==F)if(33!==F){if(47===F){if(s(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),R();continue}if(l("array")){h(">"),T();continue}return _("unexpected closed tag")}var G=(x=void 0,S=void 0,S=!1,47===(x=f(">")).charCodeAt(x.length-1)&&(S=!0,x=x.substring(0,x.length-1)),{name:x.trim(),isClosed:S});switch(G.name){case"dict":1===p?k():2===p?E():(d={},null!==n&&(d[n]={filename:t,line:o,char:a}),y(1,d)),G.isClosed&&R();continue;case"array":1===p?C():2===p?A():y(2,d=[]),G.isClosed&&T();continue;case"key":w=L(G),1!==p?_("unexpected <key>"):null!==v?_("too many <key>"):v=w;continue;case"string":P(L(G));continue;case"real":I(parseFloat(L(G)));continue;case"integer":M(parseInt(L(G),10));continue;case"date":D(new Date(L(G)));continue;case"data":O(L(G));continue;case"true":L(G),N(!0);continue;case"false":L(G),N(!1);continue}if(!/^plist/.test(G.name))return _("unexpected opened tag "+G.name)}else{if(s(1),l("--")){h("--\x3e");continue}h(">")}else s(1),h("?>")}return d}Object.defineProperty(t,"__esModule",{value:!0}),t.parseWithLocation=function(e,t,n){return r(e,t,n)},t.parse=function(e){return r(e,null,null)}},function(e,t,n){"use strict";function r(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t,n){var s=new i(e),c=new o,u=0,l=null,h=[],f=[];function p(){h.push(u),f.push(l)}function d(){u=h.pop(),l=f.pop()}function g(e){r(s,e)}for(;a(s,c);){if(0===u){if(null!==l&&g("too many constructs in root"),3===c.type){l={},n&&(l.$vscodeTextmateLocation=c.toLocation(t)),p(),u=1;continue}if(2===c.type){l=[],p(),u=4;continue}g("unexpected token in root")}if(2===u){if(5===c.type){d();continue}if(7===c.type){u=3;continue}g("expected , or }")}if(1===u||3===u){if(1===u&&5===c.type){d();continue}if(1===c.type){var m=c.value;if(a(s,c)&&6===c.type||g("expected colon"),a(s,c)||g("expected value"),u=2,1===c.type){l[m]=c.value;continue}if(8===c.type){l[m]=null;continue}if(9===c.type){l[m]=!0;continue}if(10===c.type){l[m]=!1;continue}if(11===c.type){l[m]=parseFloat(c.value);continue}if(2===c.type){var v=[];l[m]=v,p(),u=4,l=v;continue}if(3===c.type){var y={};n&&(y.$vscodeTextmateLocation=c.toLocation(t)),l[m]=y,p(),u=1,l=y;continue}}g("unexpected token in dict")}if(5===u){if(4===c.type){d();continue}if(7===c.type){u=6;continue}g("expected , or ]")}if(4===u||6===u){if(4===u&&4===c.type){d();continue}if(u=5,1===c.type){l.push(c.value);continue}if(8===c.type){l.push(null);continue}if(9===c.type){l.push(!0);continue}if(10===c.type){l.push(!1);continue}if(11===c.type){l.push(parseFloat(c.value));continue}if(2===c.type){v=[],l.push(v),p(),u=4,l=v;continue}if(3===c.type){y={},n&&(y.$vscodeTextmateLocation=c.toLocation(t)),l.push(y),p(),u=1,l=y;continue}g("unexpected token in array")}g("unknown state")}return 0!==f.length&&g("unclosed constructs"),l};var i=function(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0},o=function(){function e(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}return e.prototype.toLocation=function(e){return{filename:e,line:this.line,char:this.char}},e}();function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;for(var n,i=e.source,o=e.pos,a=e.len,s=e.line,c=e.char;;){if(o>=a)return!1;if(32!==(n=i.charCodeAt(o))&&9!==n&&13!==n){if(10!==n)break;o++,s++,c=0}else o++,c++}if(t.offset=o,t.line=s,t.char=c,34===n){for(t.type=1,o++,c++;;){if(o>=a)return!1;if(n=i.charCodeAt(o),o++,c++,92!==n){if(34===n)break}else o++,c++}t.value=i.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/\\(.)/g,(function(t,n){switch(n){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:r(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===n)t.type=2,o++,c++;else if(123===n)t.type=3,o++,c++;else if(93===n)t.type=4,o++,c++;else if(125===n)t.type=5,o++,c++;else if(58===n)t.type=6,o++,c++;else if(44===n)t.type=7,o++,c++;else if(110===n){if(t.type=8,o++,c++,117!==(n=i.charCodeAt(o)))return!1;if(o++,c++,108!==(n=i.charCodeAt(o)))return!1;if(o++,c++,108!==(n=i.charCodeAt(o)))return!1;o++,c++}else if(116===n){if(t.type=9,o++,c++,114!==(n=i.charCodeAt(o)))return!1;if(o++,c++,117!==(n=i.charCodeAt(o)))return!1;if(o++,c++,101!==(n=i.charCodeAt(o)))return!1;o++,c++}else if(102===n){if(t.type=10,o++,c++,97!==(n=i.charCodeAt(o)))return!1;if(o++,c++,108!==(n=i.charCodeAt(o)))return!1;if(o++,c++,115!==(n=i.charCodeAt(o)))return!1;if(o++,c++,101!==(n=i.charCodeAt(o)))return!1;o++,c++}else for(t.type=11;;){if(o>=a)return!1;if(!(46===(n=i.charCodeAt(o))||n>=48&&n<=57||101===n||69===n||45===n||43===n))break;o++,c++}return t.len=o-t.offset,null===t.value&&(t.value=i.substr(t.offset,t.len)),e.pos=o,e.line=s,e.char=c,!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o};function o(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function a(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];for(var t=e.settings,n=[],r=0,a=0,s=t.length;a<s;a++){var c=t[a];if(c.settings){var u=void 0;u="string"==typeof c.scope?c.scope.replace(/^[,]+/,"").replace(/[,]+$/,"").split(","):Array.isArray(c.scope)?c.scope:[""];var l=-1;if("string"==typeof c.settings.fontStyle){l=0;for(var h=0,f=(g=c.settings.fontStyle.split(" ")).length;h<f;h++)switch(g[h]){case"italic":l|=1;break;case"bold":l|=2;break;case"underline":l|=4}}var p=null;"string"==typeof c.settings.foreground&&o(c.settings.foreground)&&(p=c.settings.foreground);var d=null;for("string"==typeof c.settings.background&&o(c.settings.background)&&(d=c.settings.background),h=0,f=u.length;h<f;h++){var g,m=(g=u[h].trim().split(" "))[g.length-1],v=null;g.length>1&&(v=g.slice(0,g.length-1)).reverse(),n[r++]=new i(m,v,a,l,p,d)}}}return n}function s(e,t){e.sort((function(e,t){var n=l(e.scope,t.scope);return 0!==n||0!==(n=h(e.parentScopes,t.parentScopes))?n:e.index-t.index}));for(var n=0,r="#000000",i="#ffffff";e.length>=1&&""===e[0].scope;){var o=e.shift();-1!==o.fontStyle&&(n=o.fontStyle),null!==o.foreground&&(r=o.foreground),null!==o.background&&(i=o.background)}for(var a=new c(t),s=new f(0,null,n,a.getId(r),a.getId(i)),d=new p(new f(0,null,-1,0,0),[]),g=0,m=e.length;g<m;g++){var v=e[g];d.insert(0,v.scope,v.parentScopes,v.fontStyle,a.getId(v.foreground),a.getId(v.background))}return new u(a,s,d)}t.ParsedThemeRule=i,t.parseTheme=a;var c=function(){function e(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(var t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}return e.prototype.getId=function(e){if(null===e)return 0;e=e.toUpperCase();var t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error("Missing color in color map - "+e);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=c;var u=function(){function e(e,t,n){this._colorMap=e,this._root=n,this._defaults=t,this._cache={}}return e.createFromRawTheme=function(e,t){return this.createFromParsedTheme(a(e),t)},e.createFromParsedTheme=function(e,t){return s(e,t)},e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype.getDefaults=function(){return this._defaults},e.prototype.match=function(e){return this._cache.hasOwnProperty(e)||(this._cache[e]=this._root.match(e)),this._cache[e]},e}();function l(e,t){return e<t?-1:e>t?1:0}function h(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;var n=e.length,r=t.length;if(n===r){for(var i=0;i<n;i++){var o=l(e[i],t[i]);if(0!==o)return o}return 0}return n-r}t.Theme=u,t.strcmp=l,t.strArrCmp=h;var f=function(){function e(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=r,this.background=i}return e.prototype.clone=function(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)},e.cloneArr=function(e){for(var t=[],n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t},e.prototype.acceptOverwrite=function(e,t,n,i){this.scopeDepth>e?r.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==i&&(this.background=i)},e}();t.ThemeTrieElementRule=f;var p=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={}),this._mainRule=e,this._rulesWithParentScopes=t,this._children=n}return e._sortBySpecificity=function(e){return 1===e.length||e.sort(this._cmpBySpecificity),e},e._cmpBySpecificity=function(e,t){if(e.scopeDepth===t.scopeDepth){var n=e.parentScopes,r=t.parentScopes,i=null===n?0:n.length,o=null===r?0:r.length;if(i===o)for(var a=0;a<i;a++){var s=n[a].length,c=r[a].length;if(s!==c)return c-s}return o-i}return t.scopeDepth-e.scopeDepth},e.prototype.match=function(t){if(""===t)return e._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));var n,r,i=t.indexOf(".");return-1===i?(n=t,r=""):(n=t.substring(0,i),r=t.substring(i+1)),this._children.hasOwnProperty(n)?this._children[n].match(r):e._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))},e.prototype.insert=function(t,n,r,i,o,a){if(""!==n){var s,c,u,l=n.indexOf(".");-1===l?(s=n,c=""):(s=n.substring(0,l),c=n.substring(l+1)),this._children.hasOwnProperty(s)?u=this._children[s]:(u=new e(this._mainRule.clone(),f.cloneArr(this._rulesWithParentScopes)),this._children[s]=u),u.insert(t+1,c,r,i,o,a)}else this._doInsertHere(t,r,i,o,a)},e.prototype._doInsertHere=function(e,t,n,r,i){if(null!==t){for(var o=0,a=this._rulesWithParentScopes.length;o<a;o++){var s=this._rulesWithParentScopes[o];if(0===h(s.parentScopes,t))return void s.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new f(e,t,n,r,i))}else this._mainRule.acceptOverwrite(e,n,r,i)},e}();t.ThemeTrieElement=p}])},8629:function(e,t,n){"use strict";var r=n(9447);e.exports=function(e){e.prototype[Symbol.iterator]=r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}},8146:function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,r){if(!(this instanceof s))return new s(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=s,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var o=[];for(n=0;r&&n<t;n++)o.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(n=2;n<arguments.length;n++)r=i(this,r,arguments[n]);return o},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(8629)(r)}catch(c){}},8380:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},7354:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},4134:function(e){function t(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=e.apply(n,r);function s(e){t(a,i,o,s,c,"next",e)}function c(e){t(a,i,o,s,c,"throw",e)}s(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},589:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},40:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},6822:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},8786:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},5388:function(e,t,n){var r=n(7354),i=n(6822),o=n(5220),a=n(8786);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},5220:function(e,t,n){var r=n(8380);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},9447:function(e,t,n){e.exports=n(5047)},7160:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(2784),i=n(5572),o=function(e){var t=e.children,n=e.hideOnTouch;return(0,r.useEffect)((function(){if((0,i.b)()){for(var e=document.getElementById("touch-suppressible");e.firstChild;)e.removeChild(e.firstChild);if(n)return;var t=document.createElement("h4");t.textContent="Section best on a computer";var r=document.createElement("p");r.textContent="This part of the site does not run well on a touch-oriented browser. We recommend switching to a computer to carry on.",e.appendChild(t),e.appendChild(r)}}),[]),r.createElement("div",{id:"touch-suppressible"},t)}},2125:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var r=n(2784),i=n(8447),o=function(e){var t=function(t){return e.active&&e.active.toLowerCase()===t?"active":""};return r.createElement("nav",{className:"navbar-sub dev-tools"},r.createElement("ul",{className:"nav"},r.createElement("li",{className:"name"},r.createElement("h3",null,"Developer Tools")),r.createElement("li",{style:{display:"none"}},r.createElement("a",{className:t("compiler api"),href:(0,i.withPrefix)("/dev/compiler")},"Compiler API")),r.createElement("li",null,r.createElement("a",{className:t("sandbox"),href:(0,i.withPrefix)("/dev/sandbox")},"Sandbox")),r.createElement("li",null,r.createElement("a",{className:t("twoslash"),href:(0,i.withPrefix)("/dev/twoslash")},"Twoslash")),r.createElement("li",null,r.createElement("a",{className:t("typescript vfs"),href:(0,i.withPrefix)("/dev/typescript-vfs")},"TypeScript VFS")),r.createElement("li",null,r.createElement("a",{className:t("playground plugins"),href:(0,i.withPrefix)("/dev/playground-plugins")},"Playground Plugins")),r.createElement("li",null,r.createElement("a",{className:t("bug workbench"),href:(0,i.withPrefix)("/dev/bug-workbench")},"Bug Workbench"))))}},5572:function(e,t,n){"use strict";function r(){var e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var t="undefined"!=typeof window&&window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var n=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(n)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(n)}}return e}n.d(t,{b:function(){return r}})},5773:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ce}});var r=n(7575),i=n(7183),o=n.n(i),a=n(2784),s=n(7480),c=n(8447),u=n(2057),l=n(3415),h=n(9169),f=n(3572),p=n(603),d=n(3840),g=n(4714);function m(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){m(o,r,i,a,s,"next",e)}function s(e){m(o,r,i,a,s,"throw",e)}a(void 0)}))}}var y=n(9447),b=n.n(y),_=(n(363),n(4861)),w=n(2332);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,p.Z)(e);if(t){var i=(0,p.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,f.Z)(this,n)}}function C(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function E(e){return e.startsWith("./")?e.slice(2):e}function A(e){var t=e.split(/[\/\\]/g);return t[t.length-2]}function R(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map(C).map(E).join("/")}var T="undefined"!=typeof window&&void 0!==window.document&&"undefined"!=typeof fetch,P="";function I(e){if(T)return P||w.warn("[Shiki] no CDN provider found, use `setCDN()` to specify the CDN for loading the resources before calling `getHighlighter()`"),"".concat(P).concat(e);var t=n(586);return t.isAbsolute(e)?e:t.resolve("/","..",e)}function M(e){return D.apply(this,arguments)}function D(){return(D=v(b().mark((function e(t){var r,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=I(t),!T){e.next=7;break}return e.next=4,fetch(r).then((function(e){return e.text()}));case 4:return e.abrupt("return",e.sent);case 7:return i=n(8372),e.next=10,i.promises.readFile(r,"utf-8");case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return N.apply(this,arguments)}function N(){return(N=v(b().mark((function e(t){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=JSON,e.next=3,M(t);case 3:return e.t1=e.sent,e.abrupt("return",e.t0.parse.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return j.apply(this,arguments)}function j(){return(j=v(b().mark((function e(t){var n,r,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(t);case 2:if(n=e.sent,!(r=F(n)).include){e.next=10;break}return e.next=7,L(R(A(t),r.include));case 7:(i=e.sent).settings&&(r.settings=r.settings.concat(i.settings)),i.bg&&!r.bg&&(r.bg=i.bg);case 10:return e.abrupt("return",r);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){var t,n=Object.assign(Object.assign({},e),function(e){var t,n,r,i,o,a,s,c,u=e.settings?e.settings:e.tokenColors,l=u?u.find((function(e){return!e.name&&!e.scope})):void 0;(null===(t=null==l?void 0:l.settings)||void 0===t?void 0:t.foreground)&&(s=l.settings.foreground);(null===(n=null==l?void 0:l.settings)||void 0===n?void 0:n.background)&&(c=l.settings.background);!s&&(null===(i=null===(r=e)||void 0===r?void 0:r.colors)||void 0===i?void 0:i["editor.foreground"])&&(s=e.colors["editor.foreground"]);!c&&(null===(a=null===(o=e)||void 0===o?void 0:o.colors)||void 0===a?void 0:a["editor.background"])&&(c=e.colors["editor.background"]);s||(s="light"===e.type?G:B);c||(c="light"===e.type?U:W);return{fg:s,bg:c}}(e));return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors),(t=n).settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}}),n}var G="#333333",B="#bbbbbb",U="#fffffe",W="#1e1e1e";_.Registry;var H=n(6108),$=n(2332);var J=!1;try{J="undefined"!=typeof localStorage}catch(Ae){}var q=void 0!==H;(J&&localStorage.getItem("DEBUG")||q&&{}.DEBUG)&&$.log;var z=n(6108),X=n(2332);function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function V(e,t,n){return(V=Z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Y(i,n.prototype),i}).apply(null,arguments)}function Q(e){var t="function"==typeof Map?new Map:void 0;return(Q=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return V(e,arguments,K(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Y(r,e)})(e)}var ee=!1;try{ee="undefined"!=typeof localStorage}catch(Ae){}var te=void 0!==z;(ee&&localStorage.getItem("DEBUG")||te&&{}.DEBUG)&&X.log,Error;var ne=function(e){return'<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="'+(e.flipped?"M27 39C26.5 32.7511 21.9 17.5173 7.5 6.57333M16.5 4.04L0.999999 0.999998C3.16667 4.88444 7.5 13.16 7.5 15.1867":"M1 39C1.5 32.7511 6.1 17.5173 20.5 6.57333M11.5 4.04L27 0.999998C24.8333 4.88444 20.5 13.16 20.5 15.1867")+'" stroke="black" transform="rotate('+e.rotation+' 20 20)"/>\n</svg>'};var re=function(e){return e.replace(/"/g,"⃟")},ie=function(e){return e.replace(/⃟/g,'"')},oe=function(e){return e.replace(/⇍/g,"<").replace(/⇏/g,">").replace(/⇯/g,"'").replace(/¿/g,"'")};function ae(e){return e.replace(/</g,"<").replace(/>/g,">")}var se=function(e){return!!Object.keys(e||{}).find((function(e){return!!e.includes("-")||!isNaN(parseInt(e))}))},ce=function(e){var t=[];return Object.keys(e||{}).find((function(e){if(isNaN(parseInt(e))||t.push(parseInt(e)),e.includes("-"))for(var n=e.split("-"),r=n[0],i=n[1],o=parseInt(i)+1,a=parseInt(r);a<o;a++)t.push(a)})),function(e){return t.includes(e)}},ue=function(e,t,n){var r=e.bg||"#fff",i=e.fg||"black",o=["shiki",e.themeName||"",t.class,t.title?"with-title":""].concat(n||[]).filter(Boolean).join(" ").trim(),a=Object.entries(t).filter((function(e){return["string","number","boolean"].includes(typeof e[1])&&!["class","twoslash"].includes(e[0])&&!1!==e[1]})).map((function(e){return e[0]+'="'+e[1]+'"'})).join(" ").trim();return'<pre class="'+o+'" style="background-color: '+r+"; color: "+i+'"'+(a?" "+a:"")+">"};function le(e,t,n){var r="";return r+=ue(t,n,[]),n.title&&(r+="<div class='code-title'>"+n.title+"</div>"),t.langId&&(r+='<div class="language-id">'+t.langId+"</div>"),r+="<div class='code-container'><code>",r=(r+=ae(e)).replace(/\n*$/,""),r+="</code></div></pre>"}function he(e,t,n,r){var i="",o=r.highlight&&se(r.highlight),a=ce(r.highlight);i+=ue(t,r,["twoslash","lsp"]),r.title&&(i+="<div class='code-title'>"+r.title+"</div>"),t.langId&&(i+='<div class="language-id">'+t.langId+"</div>"),i+="<div class='code-container'><code>";var s,c=fe(n.errors,(function(e){return e.line}))||new Map,u=fe(n.staticQuickInfos,(function(e){return e.line}))||new Map,l=fe(n.queries,(function(e){return e.line-1}))||new Map,h=0;if(e.forEach((function(e,n){var r=c.get(n)||[],s=u.get(n)||[],f=l.get(n)||[],p="<div class='line"+(o?a(n)?" highlight":" dim":"")+"'>";if(0===e.length&&0===n)h+=1;else if(0===e.length){i+=p+" </div>",h+=1}else{i+=p;var d=0;e.forEach((function(e){var n,o="",a=function(t){return function(n){return t<=n.character&&t+e.content.length>=n.character+n.length}},c=r.filter(a(d)),u=s.filter(a(d)),l=f.filter(a(d));n=n||u.find((function(e){return e.text===(f.length&&f[0].text)}));var p,g=[].concat(c,u,l).sort((function(e,t){return(e.start||0)-(t.start||0)}));g.length?o+=function(e,t,n){void 0===n&&(n="");var r=function(e){return"⇍"+e+"⇏"},i=function(e,t){switch(e.classes){case"lsp":var i=re(e.lsp||""),o=e.lsp===n?"style=⇯border-bottom: solid 2px lightgrey;⇯":"";return r(t?"/data-lsp":"data-lsp lsp=¿"+i+"¿ "+o);case"query":return r((t?"/":"")+"data-highlight");case"err":default:return r((t?"/":"")+"data-err")}};e.sort((function(e,t){var n=function(e){return["err","query","lsp"].indexOf(null!=e?e:"")},r=0;return!(r=e.begin-t.begin)&&!(r=t.end-e.end)&&(r=n(e.classes)-n(t.classes)),r}));var o=0,a=function e(n){var r="",a=n.shift();return r+=t.substring(o,a.begin),o=a.begin,r+=i(a),n.some((function(e){return e.begin<a.end}))?r+=e(n):(r+=t.substring(a.begin,a.end),o=a.end),r+=i(a,!0),0!==n.length&&(r+=e(n)),r}(JSON.parse(JSON.stringify(e)))+t.substring(o);return ie(oe(function(e){var t={"<":"lt",'"':"quot","'":"apos","&":"amp","\r":"#13","\n":"#10"};return e.toString().replace(/[<"'\r\n&]/g,(function(e){return"&"+t[e]+";"}))}(a)))}(g.map((function(e){var n={begin:e.start-h,end:e.start+e.length-h};if("renderedMessage"in e&&(n.classes="err"),"kind"in e&&(n.classes=e.kind),"targetString"in e){n.classes="lsp";var r=t.includeJSDocInHover&&e.docs?e.docs+"\n\n"+e.text:e.text;n.lsp=r}return n})),e.content,null==(p=n)?void 0:p.text):o+=e.content.replace(/</g,"⇍").replace(/>/g,"⇏").replace(/'/g,"⇯");i+='<span style="color: '+e.color+'">'+o+"</span>",d+=e.content.length,h+=e.content.length})),i+="</div>",h+=1}if(r.length){var g=r.map((function(e){return ae(e.renderedMessage)})).join("</br>"),m=r.map((function(e){return e.code})).join("<br/>");i+='<span class="error"><span>'+g+'</span><span class="code">'+m+"</span></span>",i+='<span class="error-behind">'+g+"</span>"}f.length&&f.forEach((function(e){switch(i+="<div class='meta-line'>",e.kind){case"query":var t=ae(e.text),r=(u.get(n)||[]).find((function(e){return e.text===(f.length&&f[0].text)})),o=(r&&r.character+(null==r?void 0:r.length)/2)-1||0;i+="<span class='popover-prefix'>"+" ".repeat(o)+"</span><span class='popover'><div class='arrow'></div>"+t+"</span>";break;case"completions":if(e.completions){var a=e.completions.filter((function(t){return t.name.startsWith(e.completionsPrefix||"____")})).sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(t){var n,r,i=t.name.substr((null==(n=e.completionsPrefix)?void 0:n.length)||0),o="<span><span class='result-found'>"+(e.completionsPrefix||"")+"</span>"+i+"<span>";return"<li class='"+((null==(r=t.kindModifiers)?void 0:r.split(",").includes("deprecated"))?"deprecated":"")+"'>"+o+"</li>"})).join("");i+=" ".repeat(e.offset)+"<span class='inline-completions'><ul class='dropdown'>"+a+"</ul></span>"}else i+="<span class='query'>//"+"".padStart(e.offset-2)+"^ - No completions found</span>"}i+="</div>"}))})),s=i.replace(/\n*$/,""),i=s.replace(/⇍/g,"<").replace(/⇏/g,">").replace(/⇯/g,"'"),t.addTryButton){var f="<a class='playground-link' href='"+n.playgroundURL+"'>Try</a>";i+="</code>"+f}else i+="</code>";return n.tags&&n.tags.length&&(i+=function(e){var t="";return e.forEach((function(e){if("annotate"===e.name&&e.annotation){var n=e.annotation.split(" - "),r=n.pop(),i=(n[0]||"").trim(),o=i.includes("right"),a=i.split(" ")[1]||o?"310":"56",s=i.split(" ")[2]||"0",c=ne({flipped:o,rotation:a});t+="\n<div class='twoslash-annotation' style=\"top: "+e.line+'em;">\n '+c+"\n <p class='twoslash-annotation-text "+(o?"right":"left")+"' style=\"transform: rotate("+s+'deg)">'+r+"</p>\n</div>"}})),t}(n.tags)),i+="</div></pre>"}function fe(e,t){var n=new Map;return e.forEach((function(e){var r=t(e),i=n.get(r);i?i.push(e):n.set(r,[e])})),n}function pe(e,t,n){var r="",i=n.highlight&&se(n.highlight),o=ce(n.highlight);return r+=ue(t,n,[]),n.title&&(r+="<div class='code-title'>"+n.title+"</div>"),t.langId&&(r+='<div class="language-id">'+t.langId+"</div>"),r+="<div class='code-container'><code>",e.forEach((function(e,t){if(0===e.length)r+="<div class='line'></div>";else{var n=i?o(t)?" highlight":" dim":"";r+="<div class='line"+n+"'>",e.forEach((function(e){r+='<span style="color: '+e.color+'">'+ae(e.content)+"</span>"})),r+="</div>"}})),r=r.replace(/\n*$/,""),r+="</code></div></pre>"}var de={compilerOptions:"The set of compiler options for your project",allowJs:"Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",allowSyntheticDefaultImports:"Allow 'import x from y' when a module doesn't have a default export.",allowUmdGlobalAccess:"Allow accessing UMD globals from modules.",allowUnreachableCode:"Disable error reporting for unreachable code.",allowUnusedLabels:"Disable error reporting for unused labels.",alwaysStrict:"Ensure 'use strict' is always emitted.",assumeChangesOnlyAffectDirectDependencies:"Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.",baseUrl:"Specify the base directory to resolve non-relative module names.",charset:"No longer supported. In early versions, manually set the text encoding for reading files.",checkJs:"Enable error reporting in type-checked JavaScript files.",clean:"Delete the outputs of all projects.",composite:"Enable constraints that allow a TypeScript project to be used with project references.",declaration:"Generate .d.ts files from TypeScript and JavaScript files in your project.",declarationDir:"Specify the output directory for generated declaration files.",declarationMap:"Create sourcemaps for d.ts files.",diagnostics:"Output compiler performance information after building.",disableFilenameBasedTypeAcquisition:"Disables inference for type acquisition by looking at filenames in a project.",disableReferencedProjectLoad:"Reduce the number of projects loaded automatically by TypeScript.",disableSizeLimit:"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.",disableSolutionSearching:"Opt a project out of multi-project reference checking when editing.",disableSourceOfProjectReferenceRedirect:"Disable preferring source files instead of declaration files when referencing composite projects",downlevelIteration:"Emit more compliant, but verbose and less performant JavaScript for iteration.",emitBOM:"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",emitDeclarationOnly:"Only output d.ts files and not JavaScript files.",emitDecoratorMetadata:"Emit design-type metadata for decorated declarations in source files.",enable:"Disable the type acquisition for JavaScript projects",esModuleInterop:"Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.",exactOptionalPropertyTypes:"Differentiate between undefined and not present when type checking",exclude:"Filters results from the `include` option.",excludeDirectories:"Remove a list of directories from the watch process.",excludeFiles:"Remove a list of files from the watch mode's processing.",experimentalDecorators:"Enable experimental support for TC39 stage 2 draft decorators.",explainFiles:"Print files read during the compilation including why it was included.",extendedDiagnostics:"Output more detailed compiler performance information after building.",extends:"Specify one or more path or node module references to base configuration files from which settings are inherited.",fallbackPolling:"Specify what approach the watcher should use if the system runs out of native file watchers.",files:"Include a list of files. This does not support glob patterns, as opposed to `include`.",force:"Build all projects, including those that appear to be up to date",forceConsistentCasingInFileNames:"Ensure that casing is correct in imports.",generateCpuProfile:"Emit a v8 CPU profile of the compiler run for debugging.",importHelpers:"Allow importing helper functions from tslib once per project, instead of including them per-file.",importsNotUsedAsValues:"Specify emit/checking behavior for imports that are only used for types.",include:"Specify a list of glob patterns that match files to be included in compilation.",incremental:"Save .tsbuildinfo files to allow for incremental compilation of projects.",inlineSourceMap:"Include sourcemap files inside the emitted JavaScript.",inlineSources:"Include source code in the sourcemaps inside the emitted JavaScript.",isolatedModules:"Ensure that each file can be safely transpiled without relying on other imports.",jsx:"Specify what JSX code is generated.",jsxFactory:"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'",jsxFragmentFactory:"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.",jsxImportSource:"Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.`",keyofStringsOnly:"Make keyof only return strings instead of string, numbers or symbols. Legacy option.",lib:"Specify a set of bundled library declaration files that describe the target runtime environment.",listEmittedFiles:"Print the names of emitted files after a compilation.",listFiles:"Print all of the files read during the compilation.",locale:"Set the language of the messaging from TypeScript. This does not affect emit.",mapRoot:"Specify the location where debugger should locate map files instead of generated locations.",maxNodeModuleJsDepth:"Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.",module:"Specify what module code is generated.",moduleResolution:"Specify how TypeScript looks up a file from a given module specifier.",newLine:"Set the newline character for emitting files.",noEmit:"Disable emitting file from a compilation.",noEmitHelpers:"Disable generating custom helper functions like `__extends` in compiled output.",noEmitOnError:"Disable emitting files if any type checking errors are reported.",noErrorTruncation:"Disable truncating types in error messages.",noFallthroughCasesInSwitch:"Enable error reporting for fallthrough cases in switch statements.",noImplicitAny:"Enable error reporting for expressions and declarations with an implied `any` type..",noImplicitOverride:"Ensure overriding members in derived classes are marked with an override modifier.",noImplicitReturns:"Enable error reporting for codepaths that do not explicitly return in a function.",noImplicitThis:"Enable error reporting when `this` is given the type `any`.",noImplicitUseStrict:"Disable adding 'use strict' directives in emitted JavaScript files.",noLib:"Disable including any library files, including the default lib.d.ts.",noPropertyAccessFromIndexSignature:"Enforces using indexed accessors for keys declared using an indexed type",noResolve:"Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.",noStrictGenericChecks:"Disable strict checking of generic signatures in function types.",noUncheckedIndexedAccess:"Add `undefined` to a type when accessed using an index.",noUnusedLocals:"Enable error reporting when a local variables aren't read.",noUnusedParameters:"Raise an error when a function parameter isn't read",out:"Deprecated setting. Use `outFile` instead.",outDir:"Specify an output folder for all emitted files.",outFile:"Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.",paths:"Specify a set of entries that re-map imports to additional lookup locations.",plugins:"Specify a list of language service plugins to include.",preserveConstEnums:"Disable erasing `const enum` declarations in generated code.",preserveSymlinks:"Disable resolving symlinks to their realpath. This correlates to the same flag in node.",preserveWatchOutput:"Disable wiping the console in watch mode",pretty:"Enable color and formatting in output to make compiler errors easier to read",reactNamespace:"Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.",references:"Specify an array of objects that specify paths for projects. Used in project references.",removeComments:"Disable emitting comments.",resolveJsonModule:"Enable importing .json files",rootDir:"Specify the root folder within your source files.",rootDirs:"Allow multiple folders to be treated as one when resolving modules.",skipDefaultLibCheck:"Skip type checking .d.ts files that are included with TypeScript.",skipLibCheck:"Skip type checking all .d.ts files.",sourceMap:"Create source map files for emitted JavaScript files.",sourceRoot:"Specify the root path for debuggers to find the reference source code.",strict:"Enable all strict type checking options.",strictBindCallApply:"Check that the arguments for `bind`, `call`, and `apply` methods match the original function.",strictFunctionTypes:"When assigning functions, check to ensure parameters and the return values are subtype-compatible.",strictNullChecks:"When type checking, take into account `null` and `undefined`.",strictPropertyInitialization:"Check for class properties that are declared but not set in the constructor.",stripInternal:"Disable emitting declarations that have `@internal` in their JSDoc comments.",suppressExcessPropertyErrors:"Disable reporting of excess property errors during the creation of object literals.",suppressImplicitAnyIndexErrors:"Suppress `noImplicitAny` errors when indexing objects that lack index signatures.",synchronousWatchDirectory:"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.",target:"Set the JavaScript language version for emitted JavaScript and include compatible library declarations.",traceResolution:"Log paths used during the `moduleResolution` process.",tsBuildInfoFile:"Specify the folder for .tsbuildinfo incremental compilation files.",typeAcquisition:"Specify options for automatic acquisition of declaration files.",typeRoots:"Specify multiple folders that act like `./node_modules/@types`.",types:"Specify type package names to be included without being referenced in a source file.",useDefineForClassFields:"Emit ECMAScript-standard-compliant class fields.",useUnknownInCatchVariables:"Default catch clause variables as `unknown` instead of `any`.",verbose:"Enable verbose logging",watchDirectory:"Specify how directories are watched on systems that lack recursive file-watching functionality.",watchFile:"Specify how the TypeScript watch mode works."};function ge(e,t,n){var r="";return r+=ue(t,n,["tsconfig","lsp"]),n.title&&(r+='<div class="code-title">'+n.title+"</div>"),t.langId&&(r+='<div class="language-id">'+t.langId+"</div>"),r+="<div class='code-container'><code>",e.forEach((function(e){0===e.length?r+="<div class='line'></div>":(r+="<div class='line'>",e.forEach((function(e){if(function(e){return!!e.explanation&&e.explanation.find((function(e){return e.scopes.find((function(e){return e.scopeName.includes("support.type.property-name")}))}))}(e)&&function(e){if('"'!==e.content)return e.content.slice(1,e.content.length-1)in de}(e)){var t=e.content.slice(1,e.content.length-1),n=de[t];r+='<span style="color: '+e.color+'">"<a aria-hidden=true tabindex="-1" href=\'https://www.typescriptlang.org/tsconfig#'+t+"'><data-lsp lsp=\""+n+'">'+ae(t)+'</data-lsp></a>"</span>'}else r+='<span style="color: '+e.color+'">'+ae(e.content)+"</span>"})),r+="</div>")})),r=r.replace(/\n*$/,""),r+="</code></div></pre>"}var me={plainTextRenderer:le,defaultShikiRenderer:pe,twoslashRenderer:he,tsconfigJSONRenderer:ge},ve=n(6705),ye=n(4345),be=n(2125),_e=n(5572),we=n(7160),xe=n(8639),Se=n(2332),ke=function(e){return(0,a.useEffect)((function(){if(!(0,_e.b)()){var e=document.createElement("script");e.src=(0,c.withPrefix)("/js/vs.loader.js"),e.async=!0,e.onload=function(){var e=(0,xe.o)().sandboxRoot,t=n.g.require;t.config({paths:{vs:"https://typescript.azureedge.net/cdn/4.0.5/monaco/min/vs",sandbox:e},ignoreDuplicateModules:["vs/editor/editor.main"]}),t(["vs/editor/editor.main","vs/language/typescript/tsWorker","sandbox/index"],function(){var e=(0,r.Z)(o().mark((function e(i,a,s){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t(["vs/language/typescript/lib/typescriptServices"],function(){var e=(0,r.Z)(o().mark((function e(t){var r,a,c,h,f,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.g.ts,i&&r&&s?null===(a=document.getElementById("loader").parentNode)||void 0===a||a.removeChild(document.getElementById("loader")):Se.error("Error: main",!!i,"ts",!!r,"sandbox",!!s),document.getElementById("monaco-editor-embed").style.display="block",e.next=6,s.createTypeScriptSandbox({text:Ee[0].code,compilerOptions:{},domID:"monaco-editor-embed",supportTwoslashCompilerOptions:!0},i,r);case 6:return(c=e.sent).editor.focus(),window.sandbox=c,e.next=11,(0,l.yp)({target:3},"3.7.3",!0,r,c.lzstring);case 11:h=e.sent,f=function(){var e=c.getText();h.set("index.ts",e);try{var t=(0,u.k)(e,"tsx",{tsModule:r,lzstringModule:c.lzstring,fsMap:h}),n=t.code.split("\n").map((function(e){return[{content:e}]})),i=me.twoslashRenderer(n,{},t,{}),o=document.getElementById("twoslash-results");for(document.getElementById("twoslash-failure").style.display="none",document.getElementById("twoslash-results").innerHTML=i;o.firstChild;)o.removeChild(o.firstChild);var a=document.createElement("p");a.innerText=t.extension,a.className="extension";var s=document.createElement("div");s.innerHTML=i;var l=document.createElement("a");l.innerText="Playground",l.href=t.playgroundURL,o.appendChild(a),o.appendChild(s),o.appendChild(l)}catch(Ae){var f=Ae,p=document.getElementById("twoslash-failure");if(!p)return;for(p.style.display="block";p.firstChild;)p.removeChild(p.firstChild);var d=document.createElement("div");d.className="err-content";var g=document.createElement("h3");g.textContent="Exception Raised";var m=document.createElement("p"),v=f.name.startsWith("Error")?f.name.split("Error")[1]:f.name;m.textContent=v+f.message.split("## Code")[0],d.appendChild(g),d.appendChild(m),p.appendChild(d),Se.log(Ae)}},p=(0,ve.D)(f,500),c.editor.onDidChangeModelContent(p),f(),setTimeout((function(){document.querySelectorAll("#example-buttons .disabled").forEach((function(e){e.classList.remove("disabled")})),document.querySelectorAll(".html-code").forEach((function(e){c.monaco.editor.colorize(e.textContent||"","html",{tabSize:2}).then((function(t){e.innerHTML=t}))})),document.querySelectorAll(".ts-code").forEach((function(e){c.monaco.editor.colorize(e.textContent||"","typescript",{tabSize:2}).then((function(t){e.innerHTML=t}))}))}),300);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}())},document.body.appendChild(e)}}),[]),a.createElement(a.Fragment,null,a.createElement(s.A,{title:"Developers - Twoslash Code Samples",description:"Learn about the TypeScript code sample library twoslash. Used for transpiling, providing hover to identifiers and compiler-driven error states.",lang:"en"},a.createElement("div",{id:"dev"},a.createElement(be.X,{active:"twoslash"}),a.createElement("div",{className:"raised content main-content-block"},a.createElement("div",{className:"split-fifty"},a.createElement("div",null,a.createElement("h1",{style:{marginTop:"20px"}},"TypeScript Twoslash"),a.createElement("p",null,"A markup format for TypeScript code, ideal for creating self-contained code samples which let the TypeScript compiler do the extra leg-work."),a.createElement("p",null,"If you know TypeScript, you basically know twoslash."),a.createElement("p",null,"Twoslash adds the ability to declare tsconfig options inline, split a sample into multiple files and a few other useful commands. You can see the full API"," ",a.createElement("a",{href:"https://github.com/microsoft/TypeScript-Website/tree/v2/packages/ts-twoslasher"},"inside the README"))),a.createElement("div",{style:{paddingTop:"4.5rem"}},a.createElement("p",null,"The Twoslash markup language helps with:"),a.createElement("ul",null,a.createElement("li",null,"Enforcing accurate errors from a TypeScript code sample, and leaving the messaging to the compiler"),a.createElement("li",null,"Splitting a code sample to hide distracting code"),a.createElement("li",null,"Declaratively highlighting symbols in your code sample"),a.createElement("li",null,"Replacing code with the results of transpilation to different files, or ancillary files like .d.ts or .map files"),a.createElement("li",null,"Handle multi-file imports in a single code sample"),a.createElement("li",null,"Creating a playground link for the code"))))),a.createElement("div",{className:"raised content main-content-block",style:{maxWidth:"90%"}},a.createElement("div",{className:"fivehundred",style:{flex:1}},a.createElement(we.W,null,a.createElement("h3",{style:{marginTop:"0"}},"Markup"),a.createElement("p",{id:"exampleBlurb"},Ee[0].blurb),a.createElement("div",{id:"loader"},a.createElement("div",{className:"lds-grid"},a.createElement("div",null),a.createElement("div",null),a.createElement("div",null),a.createElement("div",null),a.createElement("div",null),a.createElement("div",null),a.createElement("div",null),a.createElement("div",null),a.createElement("div",null)),a.createElement("p",{id:"loading-message",role:"status"},"Downloading Sandbox...")),a.createElement("div",{style:{height:"300px",display:"none"},id:"monaco-editor-embed"}),a.createElement("div",{id:"example-buttons"},Ee.map((function(e){return a.createElement("div",{className:"button disabled",onClick:function(t){t.target.classList.contains("disabled")||(document.getElementById("exampleBlurb").innerText=e.blurb,window.sandbox.setText(e.code))}},e.name)}))))),a.createElement("div",{style:{paddingLeft:"20px",borderLeft:"1px solid gray",position:"relative",flex:1,overflow:"auto"}},a.createElement(we.W,null,a.createElement("h3",{style:{marginTop:"0"}},"Results"),a.createElement("div",{id:"twoslash-results"}),a.createElement("div",{id:"twoslash-failure"})))),a.createElement("div",{className:"raised main-content-block"},a.createElement("h2",null,"Usage"),a.createElement("p",null,"Twoslash's usage guide is available on the npm README at"," ",a.createElement("a",{href:"https://www.npmjs.com/package/@typescript/twoslash"},a.createElement("code",null,"@typescript/twoslash")),".")))))},Ce=function(e){return a.createElement(ye.R,{locale:"en"},a.createElement(ke,e))},Ee=[{name:"Highlights runtime types",blurb:"See how TS Twoslash will grab the highlight information for identifiers in your code",code:"// @errors: 2532\ndeclare const quantumString: string | undefined;\n\n// Right now this string is in two states, hover below to see\nquantumString\n \nif (quantumString) {\n // However, in here we now have a different type\n // you can verify by hovering below\n quantumString.length;\n}\n "},{name:"Show Errors",blurb:"Twoslash will help highlight compiler error messages",code:"// @errors: 7006\nfunction fn(s) {\n console.log(s.subtr(3))\n}\n\nfn(42)"},{name:"Set Compiler Flags",blurb:"You can define compiler flags inline in a code sample which are removed from the output",code:"// @noImplicitAny: false\n// This will not throw because of the noImplicitAny\nfunction fn(s) {\n console.log(s.subtr(3))\n}\n\nfn(42);"},{name:"Trims code",blurb:"You can write code to help it compile in the sample which is hidden in the output",code:'interface IdLabel {id: number, /* some fields */ }\ninterface NameLabel {name: string, /* other fields */ }\ntype NameOrId<T extends number | string> = T extends number ? IdLabel : NameLabel;\n// This comment should not be included\n\n// ---cut---\nfunction createLabel<T extends number | string>(idOrName: T): NameOrId<T> {\n throw "unimplemented"\n}\n\nlet a = createLabel("typescript");'},{name:"Show the JS",blurb:"Use @showEmit to show the JS files",code:"// @showEmit\nexport function getStringLength(value: string) {\n return value\n}\n"},{name:"Show the DTS",blurb:"Use @showEmittedFile to set the d.ts file to be the result code",code:"// @declaration: true\n// @showEmit\n// @showEmittedFile: index.d.ts\n/**\n * Gets the length of a string\n * @param value a string\n */\nexport function getStringLength(value: string) {\n return value\n}\n"},{name:"Highlights",blurb:"Highlight some code in the editor",code:'function greet(person: string, date: Date) {\n console.log(`Hello ${person}, today is ${date.toDateString()}!`);\n}\n\ngreet("Maddison", new Date());\n// ^^^^^^^^^^\n'}]},1799:function(){},6727:function(){},2018:function(){}}]);
//# sourceMappingURL=component---src-pages-dev-twoslash-tsx-b2964161ac915b7fef9c.js.map
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。