Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-textmate

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-textmate - npm Package Compare versions

Comparing version 5.4.0 to 5.4.1

.github/workflows/rich-navigation.yml

16

package.json
{
"name": "vscode-textmate",
"version": "5.4.0",
"version": "5.4.1",
"description": "VSCode TextMate grammar helpers",

@@ -19,3 +19,3 @@ "author": {

"scripts": {
"watch": "tsc -watch",
"watch": "tsc --watch",
"compile": "tsc",

@@ -31,10 +31,10 @@ "test": "tape -r ./out/tests/all.test.js",

"devDependencies": {
"@types/node": "^14.14.33",
"@types/tape": "^4.13.0",
"tape": "^5.2.2",
"typescript": "^4.2.3",
"@types/node": "^16.6.1",
"@types/tape": "^4.13.2",
"tape": "^5.3.1",
"typescript": "^4.3.5",
"vscode-oniguruma": "^1.5.1",
"webpack": "^5.24.4",
"webpack-cli": "^4.5.0"
"webpack": "^5.50.0",
"webpack-cli": "^4.8.0"
}
}

@@ -87,3 +87,2 @@ import { IRawGrammar, IOnigLib } from './types';

private _loadSingleGrammar;
private _collectDependenciesForDep;
private _loadGrammar;

@@ -90,0 +89,0 @@ /**

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vscodetextmate=t():e.vscodetextmate=t()}(this,(function(){return(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},527:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t.StackElement=t.ScopeListElement=t.StackElementMetadata=t.Grammar=t.ScopeMetadata=t.collectDependencies=t.collectSpecificDependencies=t.ScopeDependencyCollector=t.PartialScopeDependency=t.FullScopeDependency=t.createGrammar=void 0;var r=n(878),i=n(792),o=n(736),s=n(350),a="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()};t.createGrammar=function(e,t,n,r,i,o){return new v(e,t,n,r,i,o)};var c=function(e){this.scopeName=e};t.FullScopeDependency=c;var u=function(){function e(e,t){this.scopeName=e,this.include=t}return e.prototype.toKey=function(){return this.scopeName+"#"+this.include},e}();t.PartialScopeDependency=u;var l=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 c?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 h(e,t,n,i,o){for(var s=0,a=i;s<a.length;s++){var l=a[s];if(!e.visitedRule.has(l)){e.visitedRule.add(l);var f=l.repository?r.mergeObjects({},o,l.repository):o;Array.isArray(l.patterns)&&h(e,t,n,l.patterns,f);var g=l.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),f);else{var m=g.indexOf("#");if(m>=0){var _=g.substring(0,m),y=g.substring(m+1);_===t.scopeName?p(e,t,t,y,f):_===n.scopeName?p(e,t,n,y,f):e.add(new u(_,g.substring(m+1)))}else e.add(new c(g))}}}}function p(e,t,n,r,i){void 0===i&&(i=n.repository),i&&i[r]&&h(e,t,n,[i[r]],i)}function d(e,t,n){if(n.patterns&&Array.isArray(n.patterns)&&h(e,t,n,n.patterns,n.repository),n.injections){var r=[];for(var i in n.injections)r.push(n.injections[i]);h(e,t,n,r,n.repository)}}function f(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 g(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(f(t[r],e))return n=r+1,!0;return!1}))}function m(e,t,n,r,s){for(var a=o.createMatchers(t,g),c=i.RuleFactory.getCompiledRuleId(n,r,s.repository),u=0,l=a;u<l.length;u++){var h=l[u];e.push({matcher:h.matcher,ruleId:c,grammar:s,priority:h.priority})}}t.ScopeDependencyCollector=l,t.collectSpecificDependencies=p,t.collectDependencies=d;var _=function(e,t,n,r){this.scopeName=e,this.languageId=t,this.tokenType=n,this.themeData=r};t.ScopeMetadata=_;var y=function(){function e(t,n,r){if(this._initialLanguage=t,this._themeProvider=n,this._cache=new Map,this._defaultMetaData=new _("",this._initialLanguage,0,[this._themeProvider.getDefaults()]),this._embeddedLanguages=Object.create(null),r)for(var i=Object.keys(r),o=0,s=i.length;o<s;o++){var a=i[o],c=r[a];"number"==typeof c&&0!==c?this._embeddedLanguages[a]=c:console.warn("Invalid embedded language found at scope "+a+": <<"+c+">>")}var u=Object.keys(this._embeddedLanguages).map((function(t){return e._escapeRegExpCharacters(t)}));0===u.length?this._embeddedLanguagesRegex=null:(u.sort(),u.reverse(),this._embeddedLanguagesRegex=new RegExp("^(("+u.join(")|(")+"))($|\\.)",""))}return e.prototype.onDidChangeTheme=function(){this._cache=new Map,this._defaultMetaData=new _("",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 _(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 _("",0,0,null),e.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/,e}(),v=function(){function e(e,t,n,r,i,s){if(this._scopeMetadataProvider=new y(t,i,n),this._onigLib=s,this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=C(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(var a=0,c=Object.keys(r);a<c.length;a++)for(var u=c[a],l=0,h=o.createMatchers(u,g);l<h.length;l++){var p=h[l];this._tokenTypeMatchers.push({matcher:p.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)m(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&&m(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]=C(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=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==T.NULL)r=!1,t.reset();else{r=!0;var o=this._scopeMetadataProvider.getDefaultMetadata(),s=o.themeData[0],a=I.set(0,o.languageId,o.tokenType,s.fontStyle,s.foreground,s.background),c=this.getRule(this._rootId).getName(null,null),u=this._scopeMetadataProvider.getMetadataForScope(c),l=x.mergeMetadata(a,null,u),h=new x(null,null===c?"unknown":c,l);t=new T(null,this._rootId,-1,-1,!1,null,h,h)}e+="\n";var p=this.createOnigString(e),d=p.content.length,f=new L(n,e,this._tokenTypeMatchers),g=A(this,p,r,0,t,f,!0);return b(p),{lineLength:d,lineTokens:f,ruleStack:g}},e}();function b(e){"function"==typeof e.dispose&&e.dispose()}function C(e,t){return(e=r.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 R(e,t,n,r,i,o,s){if(0!==o.length){for(var a=t.content,c=Math.min(o.length,s.length),u=[],l=s[0].end,h=0;h<c;h++){var p=o[h];if(null!==p){var d=s[h];if(0!==d.length){if(d.start>l)break;for(;u.length>0&&u[u.length-1].endPos<=d.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,d.start):i.produce(r,d.start),p.retokenizeCapturedWithRuleId){var f=p.getName(a,s),g=r.contentNameScopesList.push(e,f),m=p.getContentName(a,s),_=g.push(e,m),y=r.push(p.retokenizeCapturedWithRuleId,d.start,-1,!1,null,g,_),v=e.createOnigString(a.substring(0,d.end));A(e,v,n&&0===d.start,d.start,y,i,!1),b(v)}else{var C=p.getName(a,s);if(null!==C){var R=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).push(e,C);u.push(new G(R,d.end))}}}}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}}function S(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 P(e,t){var n=0;return e||(n|=1),t||(n|=4),n}function k(e,t,n,r,i){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:P(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function w(e,t,n,r,i){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:P(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function A(e,t,n,r,o,c,u){var l=t.content.length,h=!1,p=-1;if(u){var d=function(e,t,n,r,o,a){for(var c=o.beginRuleCapturedEOL?0:-1,u=[],l=o;l;l=l.pop()){var h=l.getRule(e);h instanceof i.BeginWhileRule&&u.push({rule:h,stack:l})}for(var p=u.pop();p;p=u.pop()){var d=w(p.rule,e,p.stack.endRule,n,r===c),f=d.ruleScanner,g=d.findOptions,m=f.scanner.findNextMatchSync(t,r,g);if(s.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(S(f))),!m){s.DebugFlags.InDebugMode&&console.log(" popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),o=p.stack.pop();break}if(-2!==f.rules[m.index]){o=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(a.produce(p.stack,m.captureIndices[0].start),R(e,t,n,p.stack,a,p.rule.whileCaptures,m.captureIndices),a.produce(p.stack,m.captureIndices[0].end),c=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:c,isFirstLine:n}}(e,t,n,r,o,c);o=d.stack,r=d.linePos,n=d.isFirstLine,p=d.anchorPosition}for(;!h;)f();function f(){s.DebugFlags.InDebugMode&&(console.log(""),console.log("@@scanNext "+r+": |"+t.content.substr(r).replace(/\n$/,"\\n")+"|"));var u=function(e,t,n,r,i,o){var c=function(e,t,n,r,i,o){var c=i.getRule(e),u=k(c,e,i.endRule,n,r===o),l=u.ruleScanner,h=u.findOptions,p=0;s.DebugFlags.InDebugMode&&(p=a());var d=l.scanner.findNextMatchSync(t,r,h);if(s.DebugFlags.InDebugMode){var f=a()-p;f>5&&console.warn("Rule "+c.debugName+" ("+c.id+") matching took "+f+" against '"+t+"'"),d&&console.log("matched rule id: "+l.rules[d.index]+" from "+d.captureIndices[0].start+" to "+d.captureIndices[0].end)}return d?{captureIndices:d.captureIndices,matchedRuleId:l.rules[d.index]}:null}(e,t,n,r,i,o),u=e.getInjections();if(0===u.length)return c;var l=function(e,t,n,r,i,o,a){for(var c,u=Number.MAX_VALUE,l=null,h=0,p=o.contentNameScopesList.generateScopes(),d=0,f=e.length;d<f;d++){var g=e[d];if(g.matcher(p)){var m=k(t.getRule(g.ruleId),t,null,r,i===a),_=m.ruleScanner,y=m.findOptions,v=_.scanner.findNextMatchSync(n,i,y);if(s.DebugFlags.InDebugMode&&(console.log(" scanning for injections"),console.log(S(_))),v){var b=v.captureIndices[0].start;if(!(b>=u)&&(u=b,l=v.captureIndices,c=_.rules[v.index],h=g.priority,u===i))break}}}return l?{priorityMatch:-1===h,captureIndices:l,matchedRuleId:c}:null}(u,e,t,n,r,i,o);if(!l)return c;if(!c)return l;var h=c.captureIndices[0].start,p=l.captureIndices[0].start;return p<h||l.priorityMatch&&p===h?l:c}(e,t,n,r,o,p);if(!u)return s.DebugFlags.InDebugMode&&console.log(" no more matches."),c.produce(o,l),void(h=!0);var d=u.captureIndices,f=u.matchedRuleId,g=!!(d&&d.length>0)&&d[0].end>r;if(-1===f){var m=o.getRule(e);s.DebugFlags.InDebugMode&&console.log(" popping "+m.debugName+" - "+m.debugEndRegExp),c.produce(o,d[0].start),o=o.setContentNameScopesList(o.nameScopesList),R(e,t,n,o,c,m.endCaptures,d),c.produce(o,d[0].end);var _=o;if(o=o.pop(),p=_.getAnchorPos(),!g&&_.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),o=_,c.produce(o,l),void(h=!0)}else{var y=e.getRule(f);c.produce(o,d[0].start);var v=o,b=y.getName(t.content,d),C=o.contentNameScopesList.push(e,b);if(o=o.push(f,r,p,d[0].end===l,null,C,C),y instanceof i.BeginEndRule){var P=y;s.DebugFlags.InDebugMode&&console.log(" pushing "+P.debugName+" - "+P.debugBeginRegExp),R(e,t,n,o,c,P.beginCaptures,d),c.produce(o,d[0].end),p=d[0].end;var w=P.getContentName(t.content,d),A=C.push(e,w);if(o=o.setContentNameScopesList(A),P.endHasBackReferences&&(o=o.setEndRule(P.getEndWithResolvedBackReferences(t.content,d))),!g&&v.hasSameRuleAs(o))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),c.produce(o,l),void(h=!0)}else if(y instanceof i.BeginWhileRule){if(P=y,s.DebugFlags.InDebugMode&&console.log(" pushing "+P.debugName),R(e,t,n,o,c,P.beginCaptures,d),c.produce(o,d[0].end),p=d[0].end,w=P.getContentName(t.content,d),A=C.push(e,w),o=o.setContentNameScopesList(A),P.whileHasBackReferences&&(o=o.setEndRule(P.getWhileWithResolvedBackReferences(t.content,d))),!g&&v.hasSameRuleAs(o))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),c.produce(o,l),void(h=!0)}else{var I=y;if(s.DebugFlags.InDebugMode&&console.log(" matched "+I.debugName+" - "+I.debugMatchRegExp),R(e,t,n,o,c,I.captures,d),c.produce(o,d[0].end),o=o.pop(),!g)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),o=o.safePop(),c.produce(o,l),void(h=!0)}}d[0].end>r&&(r=d[0].end,n=!1)}return o}t.Grammar=v;var I=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),r=e.getTokenType(t),i=e.getFontStyle(t),o=e.getForeground(t),s=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,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,s){var a=e.getLanguageId(t),c=e.getTokenType(t),u=e.getFontStyle(t),l=e.getForeground(t),h=e.getBackground(t);return 0!==n&&(a=n),0!==r&&(c=8===r?0:r),-1!==i&&(u=i),0!==o&&(l=o),0!==s&&(h=s),(a<<0|c<<8|u<<11|l<<14|h<<23)>>>0},e}();t.StackElementMetadata=I;var x=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 s=0,a=n.themeData.length;s<a;s++){var c=n.themeData[s];if(this._matches(t,c.parentScopes)){r=c.fontStyle,i=c.foreground,o=c.background;break}}return I.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 s=r[i],a=n.getMetadataForScope(s),c=e.mergeMetadata(t.metadata,t,a);t=new e(t,s,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=x;var T=function(){function e(e,t,n,r,i,o,s,a){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=s,this.contentNameScopesList=a}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,s,a){return new e(this,t,n,r,i,o,s,a)},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){for(var t=this;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1},e.NULL=new e(null,0,0,0,!1,null,null,null),e}();t.StackElement=T;var G=function(e,t){this.scopes=e,this.endPos=t};t.LocalStackElement=G;var L=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,r=0,i=this._tokenTypeOverrides;r<i.length;r++){var o=i[r];o.matcher(e.generateScopes())&&(n=I.set(n,0,M(o.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 a=e.generateScopes();if(s.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(var c=0;c<a.length;c++)console.log(" * "+a[c])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:a}),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}}},25:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;var r=n(69),i=n(350),o=n(974);t.parseRawGrammar=function(e,t){return void 0===t&&(t=null),null!==t&&/\.json$/.test(t)?(n=e,s=t,i.DebugFlags.InDebugMode?o.parse(n,s,!0):JSON.parse(n)):function(e,t){return i.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parse(e)}(e,t);var n,s}},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0,t.parse=function(e,t,s){var a=new r(e),c=new i,u=0,l=null,h=[],p=[];function d(){h.push(u),p.push(l)}function f(){u=h.pop(),l=p.pop()}function g(e){n(a,e)}for(;o(a,c);){if(0===u){if(null!==l&&g("too many constructs in root"),3===c.type){l={},s&&(l.$vscodeTextmateLocation=c.toLocation(t)),d(),u=1;continue}if(2===c.type){l=[],d(),u=4;continue}g("unexpected token in root")}if(2===u){if(5===c.type){f();continue}if(7===c.type){u=3;continue}g("expected , or }")}if(1===u||3===u){if(1===u&&5===c.type){f();continue}if(1===c.type){var m=c.value;if(o(a,c)&&6===c.type||g("expected colon"),o(a,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 _=[];l[m]=_,d(),u=4,l=_;continue}if(3===c.type){var y={};s&&(y.$vscodeTextmateLocation=c.toLocation(t)),l[m]=y,d(),u=1,l=y;continue}}g("unexpected token in dict")}if(5===u){if(4===c.type){f();continue}if(7===c.type){u=6;continue}g("expected , or ]")}if(4===u||6===u){if(4===u&&4===c.type){f();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){_=[],l.push(_),d(),u=4,l=_;continue}if(3===c.type){y={},s&&(y.$vscodeTextmateLocation=c.toLocation(t)),l.push(y),d(),u=1,l=y;continue}g("unexpected token in array")}g("unknown state")}return 0!==p.length&&g("unclosed constructs"),l};var r=function(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0},i=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 o(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;for(var r,i=e.source,o=e.pos,s=e.len,a=e.line,c=e.char;;){if(o>=s)return!1;if(32!==(r=i.charCodeAt(o))&&9!==r&&13!==r){if(10!==r)break;o++,a++,c=0}else o++,c++}if(t.offset=o,t.line=a,t.char=c,34===r){for(t.type=1,o++,c++;;){if(o>=s)return!1;if(r=i.charCodeAt(o),o++,c++,92!==r){if(34===r)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,r){switch(r){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:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===r)t.type=2,o++,c++;else if(123===r)t.type=3,o++,c++;else if(93===r)t.type=4,o++,c++;else if(125===r)t.type=5,o++,c++;else if(58===r)t.type=6,o++,c++;else if(44===r)t.type=7,o++,c++;else if(110===r){if(t.type=8,o++,c++,117!==(r=i.charCodeAt(o)))return!1;if(o++,c++,108!==(r=i.charCodeAt(o)))return!1;if(o++,c++,108!==(r=i.charCodeAt(o)))return!1;o++,c++}else if(116===r){if(t.type=9,o++,c++,114!==(r=i.charCodeAt(o)))return!1;if(o++,c++,117!==(r=i.charCodeAt(o)))return!1;if(o++,c++,101!==(r=i.charCodeAt(o)))return!1;o++,c++}else if(102===r){if(t.type=10,o++,c++,97!==(r=i.charCodeAt(o)))return!1;if(o++,c++,108!==(r=i.charCodeAt(o)))return!1;if(o++,c++,115!==(r=i.charCodeAt(o)))return!1;if(o++,c++,101!==(r=i.charCodeAt(o)))return!1;o++,c++}else for(t.type=11;;){if(o>=s)return!1;if(!(46===(r=i.charCodeAt(o))||r>=48&&r<=57||101===r||69===r||45===r||43===r))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=a,e.char=c,!0}},787:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(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(s,a)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)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 s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}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,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;var a=n(652),c=n(25),u=n(583),l=n(527);i(n(42),t);var h=function(){function e(e){this._options=e,this._syncRegistry=new a.SyncRegistry(u.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(u.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 o(this,void 0,void 0,(function(){var t,n;return s(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 o(this,void 0,void 0,(function(){return s(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 l.FullScopeDependency?l.collectDependencies(t,this._syncRegistry.lookup(e),r):l.collectSpecificDependencies(t,this._syncRegistry.lookup(e),r,n.include);var i=this._syncRegistry.injections(n.scopeName);if(i)for(var o=0,s=i;o<s.length;o++){var a=s[o];t.add(new l.FullScopeDependency(a))}}else if(n.scopeName===e)throw new Error("No grammar provided for <"+e+">")},e.prototype._loadGrammar=function(e,t,n,r){return o(this,void 0,void 0,(function(){var i,o,a,c,u,h,p,d,f,g,m,_,y=this;return s(this,(function(s){switch(s.label){case 0:i=new Set,o=new Set,i.add(e),a=[new l.FullScopeDependency(e)],s.label=1;case 1:return a.length>0?(c=a,a=[],[4,Promise.all(c.map((function(e){return y._loadSingleGrammar(e.scopeName)})))]):[3,3];case 2:for(s.sent(),u=new l.ScopeDependencyCollector,h=0,p=c;h<p.length;h++)_=p[h],this._collectDependenciesForDep(e,u,_);for(d=0,f=u.full;d<f.length;d++)_=f[d],i.has(_.scopeName)||(i.add(_.scopeName),a.push(_));for(g=0,m=u.partial;g<m.length;g++)_=m[g],i.has(_.scopeName)||o.has(_.toKey())||(o.add(_.toKey()),a.push(_));return[3,1];case 3:return[2,this.grammarForScopeName(e,t,n,r)]}}))}))},e.prototype.addGrammar=function(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=0),void 0===r&&(r=null),o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return this._syncRegistry.addGrammar(e,t),[4,this.grammarForScopeName(e.scopeName,n,r)];case 1:return[2,i.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=h,t.INITIAL=l.StackElement.NULL,t.parseRawGrammar=c.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){for(var r,i,o,s=[],a=(o=(i=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r=e),{next:function(){if(!o)return null;var e=o[0];return o=i.exec(r),e}}),c=a.next();null!==c;){var u=0;if(2===c.length&&":"===c.charAt(1)){switch(c.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log("Unknown priority "+c+" in scope selector")}c=a.next()}var l=p();if(s.push({matcher:l,priority:u}),","!==c)break;c=a.next()}return s;function h(){if("-"===c){c=a.next();var e=h();return function(t){return!!e&&!e(t)}}if("("===c){c=a.next();var r=function(){for(var e=[],t=p();t&&(e.push(t),"|"===c||","===c);){do{c=a.next()}while("|"===c||","===c);t=p()}return function(t){return e.some((function(e){return e(t)}))}}();return")"===c&&(c=a.next()),r}if(n(c)){var i=[];do{i.push(c),c=a.next()}while(n(c));return function(e){return t(i,e)}}return null}function p(){for(var e=[],t=h();t;)e.push(t),t=h();return function(t){return e.every((function(e){return e(t)}))}}}},69:(e,t)=>{function n(e,t,n){var r=e.length,i=0,o=1,s=0;function a(t){if(null===n)i+=t;else for(;t>0;)10===e.charCodeAt(i)?(i++,o++,s=0):(i++,s++),t--}function c(e){null===n?i=e:a(e-i)}function u(){for(;i<r;){var t=e.charCodeAt(i);if(32!==t&&9!==t&&13!==t&&10!==t)break;a(1)}}function l(t){return e.substr(i,t.length)===t&&(a(t.length),!0)}function h(t){var n=e.indexOf(t,i);c(-1!==n?n+t.length:r)}function p(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 d=0,f=null,g=[],m=[],_=null;function y(e,t){g.push(d),m.push(f),d=e,f=t}function v(){if(0===g.length)return b("illegal state stack");d=g.pop(),f=m.pop()}function b(t){throw new Error("Near offset "+i+": "+t+" ~~~"+e.substr(i,50)+"~~~")}var C,R,S,P,k,w=function(){if(null===_)return b("missing <key>");var e={};null!==n&&(e[n]={filename:t,line:o,char:s}),f[_]=e,_=null,y(1,e)},A=function(){if(null===_)return b("missing <key>");var e=[];f[_]=e,_=null,y(2,e)};function I(){if(1!==d)return b("unexpected </dict>");v()}function x(){return 1===d||2!==d?b("unexpected </array>"):void v()}function T(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function G(e){if(isNaN(e))return b("cannot parse float");if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function L(e){if(isNaN(e))return b("cannot parse integer");if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function M(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function D(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function E(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function N(e){if(e.isClosed)return"";var t=p("</");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(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;i<r&&(u(),!(i>=r));){var O=e.charCodeAt(i);if(a(1),60!==O)return b("expected <");if(i>=r)return b("unexpected end of input");var F=e.charCodeAt(i);if(63!==F)if(33!==F){if(47===F){if(a(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),I();continue}if(l("array")){h(">"),x();continue}return b("unexpected closed tag")}var j=(R=void 0,S=void 0,S=!1,47===(R=p(">")).charCodeAt(R.length-1)&&(S=!0,R=R.substring(0,R.length-1)),{name:R.trim(),isClosed:S});switch(j.name){case"dict":1===d?w():2===d?(k=void 0,k={},null!==n&&(k[n]={filename:t,line:o,char:s}),f.push(k),y(1,k)):(f={},null!==n&&(f[n]={filename:t,line:o,char:s}),y(1,f)),j.isClosed&&I();continue;case"array":1===d?A():2===d?(P=void 0,P=[],f.push(P),y(2,P)):y(2,f=[]),j.isClosed&&x();continue;case"key":C=N(j),1!==d?b("unexpected <key>"):null!==_?b("too many <key>"):_=C;continue;case"string":T(N(j));continue;case"real":G(parseFloat(N(j)));continue;case"integer":L(parseInt(N(j),10));continue;case"date":M(new Date(N(j)));continue;case"data":D(N(j));continue;case"true":N(j),E(!0);continue;case"false":N(j),E(!1);continue}if(!/^plist/.test(j.name))return b("unexpected opened tag "+j.name)}else{if(a(1),l("--")){h("--\x3e");continue}h(">")}else a(1),h("?>")}return f}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parse=function(e){return n(e,null,null)}},652:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(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(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)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 s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}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,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;var o=n(527),s=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,s){return r(this,void 0,void 0,(function(){var r,a,c,u,l;return i(this,(function(i){switch(i.label){case 0:return this._grammars[e]?[3,2]:(r=this._rawGrammars[e])?(a=this._grammars,c=e,u=o.createGrammar,l=[r,t,n,s,this],[4,this._onigLibPromise]):[2,null];case 1:a[c]=u.apply(void 0,l.concat([i.sent()])),i.label=2;case 2:return[2,this._grammars[e]]}}))}))},e}();t.SyncRegistry=s},792:function(e,t,n){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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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}),t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.RegExpSourceList=t.RegExpSource=t.CaptureRule=t.Rule=t.CompiledRule=void 0;var o=n(878),s=/\\(\d+)/,a=/\\(\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:!1,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 s=e.call(this,t,n,r,i)||this;return s.retokenizeCapturedWithRuleId=o,s}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){throw new Error("Not supported!")},t.prototype.compileAG=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=[],a=!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||(a=!0),c++}this.hasAnchor=a,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=s.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 a.lastIndex=0,this.source.replace(a,(function(e,t){return(n[parseInt(t,10)]||"").replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}))},e.prototype._buildAnchorCache=function(){var e,t,n,r,i=[],o=[],s=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,o[e]=n,s[e]=n,a[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="￿",o[e+1]="￿",s[e+1]="A",a[e+1]="A"):"G"===r?(i[e+1]="￿",o[e+1]="G",s[e+1]="￿",a[e+1]="G"):(i[e+1]=r,o[e+1]=r,s[e+1]=r,a[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:o.join(""),A1_G0:s.join(""),A1_G1:a.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 p=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){if(!this._cached){var t=this._items.map((function(e){return e.source}));this._cached=new c(e,t,this._items.map((function(e){return e.ruleId})))}return this._cached},e.prototype.compileAG=function(e,t,n){return this._hasAnchors?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):this.compile(e)},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=p;var d=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r,null)||this;return s._match=new h(i,s.id),s.captures=o,s._cachedCompiledPatterns=null,s}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:!1,configurable:!0}),t.prototype.collectPatternsRecursive=function(e,t,n){t.push(this._match)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t}(u);t.MatchRule=d;var f=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r,i)||this;return s.patterns=o.patterns,s.hasMissingPatterns=o.hasMissingPatterns,s._cachedCompiledPatterns=null,s}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){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t}(u);t.IncludeOnlyRule=f;var g=function(e){function t(t,n,r,i,o,s,a,c,u,l){var p=e.call(this,t,n,r,i)||this;return p._begin=new h(o,p.id),p.beginCaptures=s,p._end=new h(a||"￿",-1),p.endHasBackReferences=p._end.hasBackReferences,p.endCaptures=c,p.applyEndPatternLast=u||!1,p.patterns=l.patterns,p.hasMissingPatterns=l.hasMissingPatterns,p._cachedCompiledPatterns=null,p}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:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugEndRegExp",{get:function(){return""+this._end.source},enumerable:!1,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){return this._getCachedCompiledPatterns(e,t).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e,t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,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},t}(u);t.BeginEndRule=g;var m=function(e){function t(t,n,r,i,o,s,a,c,u){var l=e.call(this,t,n,r,i)||this;return l._begin=new h(o,l.id),l.beginCaptures=s,l.whileCaptures=c,l._while=new h(a,-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:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugWhileRegExp",{get:function(){return""+this._while.source},enumerable:!1,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){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t.prototype.compileWhile=function(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)},t.prototype.compileWhileAG=function(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)},t.prototype._getCachedCompiledWhilePatterns=function(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new p,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns},t}(u);t.BeginWhileRule=m;var _=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 d(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 s=t.patterns;return void 0===s&&t.include&&(s=[{include:t.include}]),new f(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(s,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 s in t)"$vscodeTextmateLocation"!==s&&(c=parseInt(s,10))>o&&(o=c);for(var a=0;a<=o;a++)i[a]=null;for(var s in t)if("$vscodeTextmateLocation"!==s){var c=parseInt(s,10),u=0;t[s].patterns&&(u=e.getCompiledRuleId(t[s],n,r)),i[c]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,u)}}return i},e._compilePatterns=function(t,n,r){var i=[];if(t)for(var o=0,s=t.length;o<s;o++){var a=t[o],c=-1;if(a.include)if("#"===a.include.charAt(0)){var u=r[a.include.substr(1)];u&&(c=e.getCompiledRuleId(u,n,r))}else if("$base"===a.include||"$self"===a.include)c=e.getCompiledRuleId(r[a.include],n,r);else{var l=null,h=null,p=a.include.indexOf("#");p>=0?(l=a.include.substring(0,p),h=a.include.substring(p+1)):l=a.include;var d=n.getExternalGrammar(l,r);if(d)if(h){var _=d.repository[h];_&&(c=e.getCompiledRuleId(_,n,d.repository))}else c=e.getCompiledRuleId(d.repository.$self,n,d.repository)}else c=e.getCompiledRuleId(a,n,r);if(-1!==c){var y=n.getRule(c),v=!1;if((y instanceof f||y instanceof g||y instanceof m)&&y.hasMissingPatterns&&0===y.patterns.length&&(v=!0),v)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}},e}();t.RuleFactory=_},583:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.strArrCmp=t.strcmp=t.Theme=t.ColorMap=t.parseTheme=t.ParsedThemeRule=void 0;var n=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 r(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 i(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];for(var t=e.settings,i=[],o=0,s=0,a=t.length;s<a;s++){var c=t[s];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,p=(g=c.settings.fontStyle.split(" ")).length;h<p;h++)switch(g[h]){case"italic":l|=1;break;case"bold":l|=2;break;case"underline":l|=4}}var d=null;"string"==typeof c.settings.foreground&&r(c.settings.foreground)&&(d=c.settings.foreground);var f=null;for("string"==typeof c.settings.background&&r(c.settings.background)&&(f=c.settings.background),h=0,p=u.length;h<p;h++){var g,m=(g=u[h].trim().split(" "))[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1)).reverse(),i[o++]=new n(m,_,s,l,d,f)}}}return i}function o(e,t){e.sort((function(e,t){var n=c(e.scope,t.scope);return 0!==n||0!==(n=u(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 p=new s(t),d=new l(0,null,n,p.getId(r),p.getId(i)),f=new h(new l(0,null,-1,0,0),[]),g=0,m=e.length;g<m;g++){var _=e[g];f.insert(0,_.scope,_.parentScopes,_.fontStyle,p.getId(_.foreground),p.getId(_.background))}return new a(p,d,f)}t.ParsedThemeRule=n,t.parseTheme=i;var s=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=s;var a=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(i(e),t)},e.createFromParsedTheme=function(e,t){return o(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 c(e,t){return e<t?-1:e>t?1:0}function u(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=c(e[i],t[i]);if(0!==o)return o}return 0}return n-r}t.Theme=a,t.strcmp=c,t.strArrCmp=u;var l=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,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)},e}();t.ThemeTrieElementRule=l;var h=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 s=0;s<i;s++){var a=n[s].length,c=r[s].length;if(a!==c)return c-a}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,s){if(""!==n){var a,c,u,h=n.indexOf(".");-1===h?(a=n,c=""):(a=n.substring(0,h),c=n.substring(h+1)),this._children.hasOwnProperty(a)?u=this._children[a]:(u=new e(this._mainRule.clone(),l.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,r,i,o,s)}else this._doInsertHere(t,r,i,o,s)},e.prototype._doInsertHere=function(e,t,n,r,i){if(null!==t){for(var o=0,s=this._rulesWithParentScopes.length;o<s;o++){var a=this._rulesWithParentScopes[o];if(0===u(a.parentScopes,t))return void a.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 l(e,t,n,r,i))}else this._mainRule.acceptOverwrite(e,n,r,i)},e}();t.ThemeTrieElement=h},42:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){for(var t=[],r=0,i=e.length;r<i;r++)t[r]=n(e[r]);return t}(e):"object"==typeof e?function(e){var t={};for(var r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(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 r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,i=function(){function e(){}return e.hasCaptures=function(e){return null!==e&&(r.lastIndex=0,r.test(e))},e.replaceCaptures=function(e,t,n){return e.replace(r,(function(e,r,i,o){var s=n[parseInt(r||i,10)];if(!s)return e;for(var a=t.substring(s.start,s.end);"."===a[0];)a=a.substring(1);switch(o){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}))},e}();t.RegexSource=i}},t={};return function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(787)})()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vscodetextmate=t():e.vscodetextmate=t()}(this,(function(){return(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},527:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t.StackElement=t.ScopeListElement=t.StackElementMetadata=t.Grammar=t.ScopeMetadata=t.ScopeDependencyProcessor=t.ScopeDependencyCollector=t.PartialScopeDependency=t.FullScopeDependency=t.createGrammar=void 0;var r=n(878),o=n(792),i=n(736),s=n(350),a="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()};t.createGrammar=function(e,t,n,r,o,i,s){return new C(e,t,n,r,o,i,s)};var c=function(e){this.scopeName=e};t.FullScopeDependency=c;var u=function(){function e(e,t){this.scopeName=e,this.include=t}return e.prototype.toKey=function(){return this.scopeName+"#"+this.include},e}();t.PartialScopeDependency=u;var l=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 c?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 h(e,t,n,o,i){for(var s=0,a=o;s<a.length;s++){var l=a[s];if(!e.visitedRule.has(l)){e.visitedRule.add(l);var p=l.repository?r.mergeObjects({},i,l.repository):i;Array.isArray(l.patterns)&&h(e,t,n,l.patterns,p);var d=l.include;if(d)if("$base"===d||d===t.scopeName)g(e,t,t);else if("$self"===d||d===n.scopeName)g(e,t,n);else if("#"===d.charAt(0))f(e,t,n,d.substring(1),p);else{var m=d.indexOf("#");if(m>=0){var _=d.substring(0,m),y=d.substring(m+1);_===t.scopeName?f(e,t,t,y,p):_===n.scopeName?f(e,t,n,y,p):e.add(new u(_,d.substring(m+1)))}else e.add(new c(d))}}}}t.ScopeDependencyCollector=l;var p=function(){function e(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new c(this.initialScopeName)]}return e.prototype.processQueue=function(){var e=this.Q;this.Q=[];for(var t=new l,n=0,r=e;n<r.length;n++){var o=r[n];d(this.repo,this.initialScopeName,t,o)}for(var i=0,s=t.full;i<s.length;i++)o=s[i],this.seenFullScopeRequests.has(o.scopeName)||(this.seenFullScopeRequests.add(o.scopeName),this.Q.push(o));for(var a=0,c=t.partial;a<c.length;a++)o=c[a],this.seenFullScopeRequests.has(o.scopeName)||this.seenPartialScopeRequests.has(o.toKey())||(this.seenPartialScopeRequests.add(o.toKey()),this.Q.push(o))},e}();function d(e,t,n,r){var o=e.lookup(r.scopeName);if(o){r instanceof c?g(n,e.lookup(t),o):f(n,e.lookup(t),o,r.include);var i=e.injections(r.scopeName);if(i)for(var s=0,a=i;s<a.length;s++){var u=a[s];n.add(new c(u))}}else if(r.scopeName===t)throw new Error("No grammar provided for <"+t+">")}function f(e,t,n,r,o){void 0===o&&(o=n.repository),o&&o[r]&&h(e,t,n,[o[r]],o)}function g(e,t,n){if(n.patterns&&Array.isArray(n.patterns)&&h(e,t,n,n.patterns,n.repository),n.injections){var r=[];for(var o in n.injections)r.push(n.injections[o]);h(e,t,n,r,n.repository)}}function m(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 _(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(m(t[r],e))return n=r+1,!0;return!1}))}function y(e,t,n,r,s){for(var a=i.createMatchers(t,_),c=o.RuleFactory.getCompiledRuleId(n,r,s.repository),u=0,l=a;u<l.length;u++){var h=l[u];e.push({debugSelector:t,matcher:h.matcher,ruleId:c,grammar:s,priority:h.priority})}}t.ScopeDependencyProcessor=p;var v=function(e,t,n,r){this.scopeName=e,this.languageId=t,this.tokenType=n,this.themeData=r};t.ScopeMetadata=v;var b=function(){function e(t,n,r){if(this._initialLanguage=t,this._themeProvider=n,this._cache=new Map,this._defaultMetaData=new v("",this._initialLanguage,0,[this._themeProvider.getDefaults()]),this._embeddedLanguages=Object.create(null),r)for(var o=Object.keys(r),i=0,s=o.length;i<s;i++){var a=o[i],c=r[a];"number"==typeof c&&0!==c?this._embeddedLanguages[a]=c:console.warn("Invalid embedded language found at scope "+a+": <<"+c+">>")}var u=Object.keys(this._embeddedLanguages).map((function(t){return e._escapeRegExpCharacters(t)}));0===u.length?this._embeddedLanguagesRegex=null:(u.sort(),u.reverse(),this._embeddedLanguagesRegex=new RegExp("^(("+u.join(")|(")+"))($|\\.)",""))}return e.prototype.onDidChangeTheme=function(){this._cache=new Map,this._defaultMetaData=new v("",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 v(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 v("",0,0,null),e.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/,e}(),C=function(){function e(e,t,n,r,o,s,a){if(this._scopeName=e,this._scopeMetadataProvider=new b(n,s,r),this._onigLib=a,this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=R(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(var c=0,u=Object.keys(o);c<u.length;c++)for(var l=u[c],h=0,p=i.createMatchers(l,_);h<p.length;h++){var d=p[h];this._tokenTypeMatchers.push({matcher:d.matcher,type:o[l]})}}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._collectInjections=function(){var e=this,t={lookup:function(t){return t===e._scopeName?e._grammar:e.getExternalGrammar(t)},injections:function(t){return e._grammarRepository.injections(t)}},n=new p(t,this._scopeName),r=[];return n.seenFullScopeRequests.forEach((function(n){var o=t.lookup(n);if(o){var i=o.injections;if(i)for(var s in i)y(r,s,i[s],e,o);if(e._grammarRepository){var a=e._grammarRepository.injections(n);a&&a.forEach((function(t){var n=e.getExternalGrammar(t);if(n){var o=n.injectionSelector;o&&y(r,o,n,e,n)}}))}}})),r.sort((function(e,t){return e.priority-t.priority})),r},e.prototype.getInjections=function(){if(null===this._injections&&(this._injections=this._collectInjections(),s.DebugFlags.InDebugMode&&this._injections.length>0)){console.log("Grammar "+this._scopeName+" contains the following injections:");for(var e=0,t=this._injections;e<t.length;e++){var n=t[e];console.log(" - "+n.debugSelector)}}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]=R(n,t&&t.$base),this._includedGrammars[e]}},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!==M.NULL)r=!1,t.reset();else{r=!0;var i=this._scopeMetadataProvider.getDefaultMetadata(),s=i.themeData[0],a=T.set(0,i.languageId,i.tokenType,s.fontStyle,s.foreground,s.background),c=this.getRule(this._rootId).getName(null,null),u=this._scopeMetadataProvider.getMetadataForScope(c),l=G.mergeMetadata(a,null,u),h=new G(null,null===c?"unknown":c,l);t=new M(null,this._rootId,-1,-1,!1,null,h,h)}e+="\n";var p=this.createOnigString(e),d=p.content.length,f=new E(n,e,this._tokenTypeMatchers),g=x(this,p,r,0,t,f,!0);return S(p),{lineLength:d,lineTokens:f,ruleStack:g}},e}();function S(e){"function"==typeof e.dispose&&e.dispose()}function R(e,t){return(e=r.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 P(e,t,n,r,o,i,s){if(0!==i.length){for(var a=t.content,c=Math.min(i.length,s.length),u=[],l=s[0].end,h=0;h<c;h++){var p=i[h];if(null!==p){var d=s[h];if(0!==d.length){if(d.start>l)break;for(;u.length>0&&u[u.length-1].endPos<=d.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,d.start):o.produce(r,d.start),p.retokenizeCapturedWithRuleId){var f=p.getName(a,s),g=r.contentNameScopesList.push(e,f),m=p.getContentName(a,s),_=g.push(e,m),y=r.push(p.retokenizeCapturedWithRuleId,d.start,-1,!1,null,g,_),v=e.createOnigString(a.substring(0,d.end));x(e,v,n&&0===d.start,d.start,y,o,!1),S(v)}else{var b=p.getName(a,s);if(null!==b){var C=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).push(e,b);u.push(new L(C,d.end))}}}}}for(;u.length>0;)o.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 w(e,t){var n=0;return e||(n|=1),t||(n|=4),n}function A(e,t,n,r,o){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:w(r,o)}:{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function I(e,t,n,r,o){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:w(r,o)}:{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function x(e,t,n,r,i,c,u){var l=t.content.length,h=!1,p=-1;if(u){var d=function(e,t,n,r,i,a){for(var c=i.beginRuleCapturedEOL?0:-1,u=[],l=i;l;l=l.pop()){var h=l.getRule(e);h instanceof o.BeginWhileRule&&u.push({rule:h,stack:l})}for(var p=u.pop();p;p=u.pop()){var d=I(p.rule,e,p.stack.endRule,n,r===c),f=d.ruleScanner,g=d.findOptions,m=f.scanner.findNextMatchSync(t,r,g);if(s.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(k(f))),!m){s.DebugFlags.InDebugMode&&console.log(" popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),i=p.stack.pop();break}if(-2!==f.rules[m.index]){i=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(a.produce(p.stack,m.captureIndices[0].start),P(e,t,n,p.stack,a,p.rule.whileCaptures,m.captureIndices),a.produce(p.stack,m.captureIndices[0].end),c=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:i,linePos:r,anchorPosition:c,isFirstLine:n}}(e,t,n,r,i,c);i=d.stack,r=d.linePos,n=d.isFirstLine,p=d.anchorPosition}for(;!h;)f();function f(){s.DebugFlags.InDebugMode&&(console.log(""),console.log("@@scanNext "+r+": |"+t.content.substr(r).replace(/\n$/,"\\n")+"|"));var u=function(e,t,n,r,o,i){var c=function(e,t,n,r,o,i){var c=o.getRule(e),u=A(c,e,o.endRule,n,r===i),l=u.ruleScanner,h=u.findOptions,p=0;s.DebugFlags.InDebugMode&&(p=a());var d=l.scanner.findNextMatchSync(t,r,h);if(s.DebugFlags.InDebugMode){var f=a()-p;f>5&&console.warn("Rule "+c.debugName+" ("+c.id+") matching took "+f+" against '"+t+"'"),console.log(" scanning for (linePos: "+r+", anchorPosition: "+i+")"),console.log(k(l)),d&&console.log("matched rule id: "+l.rules[d.index]+" from "+d.captureIndices[0].start+" to "+d.captureIndices[0].end)}return d?{captureIndices:d.captureIndices,matchedRuleId:l.rules[d.index]}:null}(e,t,n,r,o,i),u=e.getInjections();if(0===u.length)return c;var l=function(e,t,n,r,o,i,a){for(var c,u=Number.MAX_VALUE,l=null,h=0,p=i.contentNameScopesList.generateScopes(),d=0,f=e.length;d<f;d++){var g=e[d];if(g.matcher(p)){var m=A(t.getRule(g.ruleId),t,null,r,o===a),_=m.ruleScanner,y=m.findOptions,v=_.scanner.findNextMatchSync(n,o,y);if(v){s.DebugFlags.InDebugMode&&(console.log(" matched injection: "+g.debugSelector),console.log(k(_)));var b=v.captureIndices[0].start;if(!(b>=u)&&(u=b,l=v.captureIndices,c=_.rules[v.index],h=g.priority,u===o))break}}}return l?{priorityMatch:-1===h,captureIndices:l,matchedRuleId:c}:null}(u,e,t,n,r,o,i);if(!l)return c;if(!c)return l;var h=c.captureIndices[0].start,p=l.captureIndices[0].start;return p<h||l.priorityMatch&&p===h?l:c}(e,t,n,r,i,p);if(!u)return s.DebugFlags.InDebugMode&&console.log(" no more matches."),c.produce(i,l),void(h=!0);var d=u.captureIndices,f=u.matchedRuleId,g=!!(d&&d.length>0)&&d[0].end>r;if(-1===f){var m=i.getRule(e);s.DebugFlags.InDebugMode&&console.log(" popping "+m.debugName+" - "+m.debugEndRegExp),c.produce(i,d[0].start),i=i.setContentNameScopesList(i.nameScopesList),P(e,t,n,i,c,m.endCaptures,d),c.produce(i,d[0].end);var _=i;if(i=i.pop(),p=_.getAnchorPos(),!g&&_.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),i=_,c.produce(i,l),void(h=!0)}else{var y=e.getRule(f);c.produce(i,d[0].start);var v=i,b=y.getName(t.content,d),C=i.contentNameScopesList.push(e,b);if(i=i.push(f,r,p,d[0].end===l,null,C,C),y instanceof o.BeginEndRule){var S=y;s.DebugFlags.InDebugMode&&console.log(" pushing "+S.debugName+" - "+S.debugBeginRegExp),P(e,t,n,i,c,S.beginCaptures,d),c.produce(i,d[0].end),p=d[0].end;var R=S.getContentName(t.content,d),w=C.push(e,R);if(i=i.setContentNameScopesList(w),S.endHasBackReferences&&(i=i.setEndRule(S.getEndWithResolvedBackReferences(t.content,d))),!g&&v.hasSameRuleAs(i))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),i=i.pop(),c.produce(i,l),void(h=!0)}else if(y instanceof o.BeginWhileRule){if(S=y,s.DebugFlags.InDebugMode&&console.log(" pushing "+S.debugName),P(e,t,n,i,c,S.beginCaptures,d),c.produce(i,d[0].end),p=d[0].end,R=S.getContentName(t.content,d),w=C.push(e,R),i=i.setContentNameScopesList(w),S.whileHasBackReferences&&(i=i.setEndRule(S.getWhileWithResolvedBackReferences(t.content,d))),!g&&v.hasSameRuleAs(i))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),i=i.pop(),c.produce(i,l),void(h=!0)}else{var I=y;if(s.DebugFlags.InDebugMode&&console.log(" matched "+I.debugName+" - "+I.debugMatchRegExp),P(e,t,n,i,c,I.captures,d),c.produce(i,d[0].end),i=i.pop(),!g)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),i=i.safePop(),c.produce(i,l),void(h=!0)}}d[0].end>r&&(r=d[0].end,n=!1)}return i}t.Grammar=C;var T=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),r=e.getTokenType(t),o=e.getFontStyle(t),i=e.getForeground(t),s=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,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,o,i,s){var a=e.getLanguageId(t),c=e.getTokenType(t),u=e.getFontStyle(t),l=e.getForeground(t),h=e.getBackground(t);return 0!==n&&(a=n),0!==r&&(c=8===r?0:r),-1!==o&&(u=o),0!==i&&(l=i),0!==s&&(h=s),(a<<0|c<<8|u<<11|l<<14|h<<23)>>>0},e}();t.StackElementMetadata=T;var G=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,o=t[r],i=o+".";e;){if(this._matchesScope(e.scope,o,i)){if(++r===n)return!0;i=(o=t[r])+"."}e=e.parent}return!1},e.mergeMetadata=function(e,t,n){if(null===n)return e;var r=-1,o=0,i=0;if(null!==n.themeData)for(var s=0,a=n.themeData.length;s<a;s++){var c=n.themeData[s];if(this._matches(t,c.parentScopes)){r=c.fontStyle,o=c.foreground,i=c.background;break}}return T.set(e,n.languageId,n.tokenType,r,o,i)},e._push=function(t,n,r){for(var o=0,i=r.length;o<i;o++){var s=r[o],a=n.getMetadataForScope(s),c=e.mergeMetadata(t.metadata,t,a);t=new e(t,s,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=G;var M=function(){function e(e,t,n,r,o,i,s,a){this._stackElementBrand=void 0,this.parent=e,this.depth=this.parent?this.parent.depth+1:1,this.ruleId=t,this._enterPos=n,this._anchorPos=r,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=s,this.contentNameScopesList=a}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,o,i,s,a){return new e(this,t,n,r,o,i,s,a)},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){for(var t=this;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1},e.NULL=new e(null,0,0,0,!1,null,null,null),e}();t.StackElement=M;var L=function(e,t){this.scopes=e,this.endPos=t};t.LocalStackElement=L;var E=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){var n=e.metadata;if(this._tokenTypeOverrides.length>0)for(var r=e.generateScopes(),o=0,i=this._tokenTypeOverrides;o<i.length;o++){var a=i[o];a.matcher(r)&&(n=T.set(n,0,N(a.type),-1,0,0))}if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(s.DebugFlags.InDebugMode){var c=e.generateScopes();console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(var u=0;u<c.length;u++)console.log(" * "+c[u])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}var l=e.generateScopes();if(s.DebugFlags.InDebugMode)for(console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|"),u=0;u<l.length;u++)console.log(" * "+l[u]);this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:l}),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,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n},e}();function N(e){switch(e){case 4:return 4;case 2:return 2;case 1:return 1;case 0:default:return 8}}},25:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;var r=n(69),o=n(350),i=n(974);t.parseRawGrammar=function(e,t){return void 0===t&&(t=null),null!==t&&/\.json$/.test(t)?(n=e,s=t,o.DebugFlags.InDebugMode?i.parse(n,s,!0):JSON.parse(n)):function(e,t){return o.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parse(e)}(e,t);var n,s}},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0,t.parse=function(e,t,s){var a=new r(e),c=new o,u=0,l=null,h=[],p=[];function d(){h.push(u),p.push(l)}function f(){u=h.pop(),l=p.pop()}function g(e){n(a,e)}for(;i(a,c);){if(0===u){if(null!==l&&g("too many constructs in root"),3===c.type){l={},s&&(l.$vscodeTextmateLocation=c.toLocation(t)),d(),u=1;continue}if(2===c.type){l=[],d(),u=4;continue}g("unexpected token in root")}if(2===u){if(5===c.type){f();continue}if(7===c.type){u=3;continue}g("expected , or }")}if(1===u||3===u){if(1===u&&5===c.type){f();continue}if(1===c.type){var m=c.value;if(i(a,c)&&6===c.type||g("expected colon"),i(a,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 _=[];l[m]=_,d(),u=4,l=_;continue}if(3===c.type){var y={};s&&(y.$vscodeTextmateLocation=c.toLocation(t)),l[m]=y,d(),u=1,l=y;continue}}g("unexpected token in dict")}if(5===u){if(4===c.type){f();continue}if(7===c.type){u=6;continue}g("expected , or ]")}if(4===u||6===u){if(4===u&&4===c.type){f();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){_=[],l.push(_),d(),u=4,l=_;continue}if(3===c.type){y={},s&&(y.$vscodeTextmateLocation=c.toLocation(t)),l.push(y),d(),u=1,l=y;continue}g("unexpected token in array")}g("unknown state")}return 0!==p.length&&g("unclosed constructs"),l};var r=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 i(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;for(var r,o=e.source,i=e.pos,s=e.len,a=e.line,c=e.char;;){if(i>=s)return!1;if(32!==(r=o.charCodeAt(i))&&9!==r&&13!==r){if(10!==r)break;i++,a++,c=0}else i++,c++}if(t.offset=i,t.line=a,t.char=c,34===r){for(t.type=1,i++,c++;;){if(i>=s)return!1;if(r=o.charCodeAt(i),i++,c++,92!==r){if(34===r)break}else i++,c++}t.value=o.substring(t.offset+1,i-1).replace(/\\u([0-9A-Fa-f]{4})/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/\\(.)/g,(function(t,r){switch(r){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:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===r)t.type=2,i++,c++;else if(123===r)t.type=3,i++,c++;else if(93===r)t.type=4,i++,c++;else if(125===r)t.type=5,i++,c++;else if(58===r)t.type=6,i++,c++;else if(44===r)t.type=7,i++,c++;else if(110===r){if(t.type=8,i++,c++,117!==(r=o.charCodeAt(i)))return!1;if(i++,c++,108!==(r=o.charCodeAt(i)))return!1;if(i++,c++,108!==(r=o.charCodeAt(i)))return!1;i++,c++}else if(116===r){if(t.type=9,i++,c++,114!==(r=o.charCodeAt(i)))return!1;if(i++,c++,117!==(r=o.charCodeAt(i)))return!1;if(i++,c++,101!==(r=o.charCodeAt(i)))return!1;i++,c++}else if(102===r){if(t.type=10,i++,c++,97!==(r=o.charCodeAt(i)))return!1;if(i++,c++,108!==(r=o.charCodeAt(i)))return!1;if(i++,c++,115!==(r=o.charCodeAt(i)))return!1;if(i++,c++,101!==(r=o.charCodeAt(i)))return!1;i++,c++}else for(t.type=11;;){if(i>=s)return!1;if(!(46===(r=o.charCodeAt(i))||r>=48&&r<=57||101===r||69===r||45===r||43===r))break;i++,c++}return t.len=i-t.offset,null===t.value&&(t.value=o.substr(t.offset,t.len)),e.pos=i,e.line=a,e.char=c,!0}},787:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;var a=n(652),c=n(25),u=n(583),l=n(527);o(n(42),t);var h=function(){function e(e){this._options=e,this._syncRegistry=new a.SyncRegistry(u.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(u.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 i(this,void 0,void 0,(function(){var t,n;return s(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 i(this,void 0,void 0,(function(){return s(this,(function(t){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),[2,this._ensureGrammarCache.get(e)]}))}))},e.prototype._loadGrammar=function(e,t,n,r){return i(this,void 0,void 0,(function(){var o,i=this;return s(this,(function(s){switch(s.label){case 0:o=new l.ScopeDependencyProcessor(this._syncRegistry,e),s.label=1;case 1:return o.Q.length>0?[4,Promise.all(o.Q.map((function(e){return i._loadSingleGrammar(e.scopeName)})))]:[3,3];case 2:return s.sent(),o.processQueue(),[3,1];case 3:return[2,this.grammarForScopeName(e,t,n,r)]}}))}))},e.prototype.addGrammar=function(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=0),void 0===r&&(r=null),i(this,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return this._syncRegistry.addGrammar(e,t),[4,this.grammarForScopeName(e.scopeName,n,r)];case 1:return[2,o.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=h,t.INITIAL=l.StackElement.NULL,t.parseRawGrammar=c.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){for(var r,o,i,s=[],a=(i=(o=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r=e),{next:function(){if(!i)return null;var e=i[0];return i=o.exec(r),e}}),c=a.next();null!==c;){var u=0;if(2===c.length&&":"===c.charAt(1)){switch(c.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log("Unknown priority "+c+" in scope selector")}c=a.next()}var l=p();if(s.push({matcher:l,priority:u}),","!==c)break;c=a.next()}return s;function h(){if("-"===c){c=a.next();var e=h();return function(t){return!!e&&!e(t)}}if("("===c){c=a.next();var r=function(){for(var e=[],t=p();t&&(e.push(t),"|"===c||","===c);){do{c=a.next()}while("|"===c||","===c);t=p()}return function(t){return e.some((function(e){return e(t)}))}}();return")"===c&&(c=a.next()),r}if(n(c)){var o=[];do{o.push(c),c=a.next()}while(n(c));return function(e){return t(o,e)}}return null}function p(){for(var e=[],t=h();t;)e.push(t),t=h();return function(t){return e.every((function(e){return e(t)}))}}}},69:(e,t)=>{function n(e,t,n){var r=e.length,o=0,i=1,s=0;function a(t){if(null===n)o+=t;else for(;t>0;)10===e.charCodeAt(o)?(o++,i++,s=0):(o++,s++),t--}function c(e){null===n?o=e:a(e-o)}function u(){for(;o<r;){var t=e.charCodeAt(o);if(32!==t&&9!==t&&13!==t&&10!==t)break;a(1)}}function l(t){return e.substr(o,t.length)===t&&(a(t.length),!0)}function h(t){var n=e.indexOf(t,o);c(-1!==n?n+t.length:r)}function p(t){var n=e.indexOf(t,o);if(-1!==n){var i=e.substring(o,n);return c(n+t.length),i}return i=e.substr(o),c(r),i}r>0&&65279===e.charCodeAt(0)&&(o=1);var d=0,f=null,g=[],m=[],_=null;function y(e,t){g.push(d),m.push(f),d=e,f=t}function v(){if(0===g.length)return b("illegal state stack");d=g.pop(),f=m.pop()}function b(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}var C,S,R,P,k,w=function(){if(null===_)return b("missing <key>");var e={};null!==n&&(e[n]={filename:t,line:i,char:s}),f[_]=e,_=null,y(1,e)},A=function(){if(null===_)return b("missing <key>");var e=[];f[_]=e,_=null,y(2,e)};function I(){if(1!==d)return b("unexpected </dict>");v()}function x(){return 1===d||2!==d?b("unexpected </array>"):void v()}function T(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function G(e){if(isNaN(e))return b("cannot parse float");if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function M(e){if(isNaN(e))return b("cannot parse integer");if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function L(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function E(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function N(e){if(1===d){if(null===_)return b("missing <key>");f[_]=e,_=null}else 2===d?f.push(e):f=e}function O(e){if(e.isClosed)return"";var t=p("</");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(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;o<r&&(u(),!(o>=r));){var D=e.charCodeAt(o);if(a(1),60!==D)return b("expected <");if(o>=r)return b("unexpected end of input");var F=e.charCodeAt(o);if(63!==F)if(33!==F){if(47===F){if(a(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),I();continue}if(l("array")){h(">"),x();continue}return b("unexpected closed tag")}var j=(S=void 0,R=void 0,R=!1,47===(S=p(">")).charCodeAt(S.length-1)&&(R=!0,S=S.substring(0,S.length-1)),{name:S.trim(),isClosed:R});switch(j.name){case"dict":1===d?w():2===d?(k=void 0,k={},null!==n&&(k[n]={filename:t,line:i,char:s}),f.push(k),y(1,k)):(f={},null!==n&&(f[n]={filename:t,line:i,char:s}),y(1,f)),j.isClosed&&I();continue;case"array":1===d?A():2===d?(P=void 0,P=[],f.push(P),y(2,P)):y(2,f=[]),j.isClosed&&x();continue;case"key":C=O(j),1!==d?b("unexpected <key>"):null!==_?b("too many <key>"):_=C;continue;case"string":T(O(j));continue;case"real":G(parseFloat(O(j)));continue;case"integer":M(parseInt(O(j),10));continue;case"date":L(new Date(O(j)));continue;case"data":E(O(j));continue;case"true":O(j),N(!0);continue;case"false":O(j),N(!1);continue}if(!/^plist/.test(j.name))return b("unexpected opened tag "+j.name)}else{if(a(1),l("--")){h("--\x3e");continue}h(">")}else a(1),h("?>")}return f}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parse=function(e){return n(e,null,null)}},652:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;var i=n(527),s=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,s){return r(this,void 0,void 0,(function(){var r,a,c,u,l;return o(this,(function(o){switch(o.label){case 0:return this._grammars[e]?[3,2]:(r=this._rawGrammars[e])?(a=this._grammars,c=e,u=i.createGrammar,l=[e,r,t,n,s,this],[4,this._onigLibPromise]):[2,null];case 1:a[c]=u.apply(void 0,l.concat([o.sent()])),o.label=2;case 2:return[2,this._grammars[e]]}}))}))},e}();t.SyncRegistry=s},792:function(e,t,n){var r,o=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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}),t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.RegExpSourceList=t.RegExpSource=t.CaptureRule=t.Rule=t.CompiledRule=void 0;var i=n(878),s=/\\(\d+)/,a=/\\(\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=i.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=i.RegexSource.hasCaptures(this._contentName)}return Object.defineProperty(e.prototype,"debugName",{get:function(){var e=this.$location?i.basename(this.$location.filename)+":"+this.$location.line:"unknown";return this.constructor.name+"#"+this.id+" @ "+e},enumerable:!1,configurable:!0}),e.prototype.getName=function(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?i.RegexSource.replaceCaptures(this._name,e,t):this._name},e.prototype.getContentName=function(e,t){return this._contentNameIsCapturing&&null!==this._contentName?i.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName},e}();t.Rule=u;var l=function(e){function t(t,n,r,o,i){var s=e.call(this,t,n,r,o)||this;return s.retokenizeCapturedWithRuleId=i,s}return o(t,e),t.prototype.dispose=function(){},t.prototype.collectPatternsRecursive=function(e,t,n){throw new Error("Not supported!")},t.prototype.compile=function(e,t){throw new Error("Not supported!")},t.prototype.compileAG=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,o=0,i=[],a=!1,c=0;c<r;c++)if("\\"===e.charAt(c)&&c+1<r){var u=e.charAt(c+1);"z"===u?(i.push(e.substring(o,c)),i.push("$(?!\\n)(?<!\\n)"),o=c+2):"A"!==u&&"G"!==u||(a=!0),c++}this.hasAnchor=a,0===o?this.source=e:(i.push(e.substring(o,r)),this.source=i.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=s.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 a.lastIndex=0,this.source.replace(a,(function(e,t){return(n[parseInt(t,10)]||"").replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}))},e.prototype._buildAnchorCache=function(){var e,t,n,r,o=[],i=[],s=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),o[e]=n,i[e]=n,s[e]=n,a[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(o[e+1]="￿",i[e+1]="￿",s[e+1]="A",a[e+1]="A"):"G"===r?(o[e+1]="￿",i[e+1]="G",s[e+1]="￿",a[e+1]="G"):(o[e+1]=r,i[e+1]=r,s[e+1]=r,a[e+1]=r),e++);return{A0_G0:o.join(""),A0_G1:i.join(""),A1_G0:s.join(""),A1_G1:a.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 p=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){if(!this._cached){var t=this._items.map((function(e){return e.source}));this._cached=new c(e,t,this._items.map((function(e){return e.ruleId})))}return this._cached},e.prototype.compileAG=function(e,t,n){return this._hasAnchors?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):this.compile(e)},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=p;var d=function(e){function t(t,n,r,o,i){var s=e.call(this,t,n,r,null)||this;return s._match=new h(o,s.id),s.captures=i,s._cachedCompiledPatterns=null,s}return o(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:!1,configurable:!0}),t.prototype.collectPatternsRecursive=function(e,t,n){t.push(this._match)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t}(u);t.MatchRule=d;var f=function(e){function t(t,n,r,o,i){var s=e.call(this,t,n,r,o)||this;return s.patterns=i.patterns,s.hasMissingPatterns=i.hasMissingPatterns,s._cachedCompiledPatterns=null,s}return o(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},t.prototype.collectPatternsRecursive=function(e,t,n){var r,o;for(r=0,o=this.patterns.length;r<o;r++)e.getRule(this.patterns[r]).collectPatternsRecursive(e,t,!1)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t}(u);t.IncludeOnlyRule=f;var g=function(e){function t(t,n,r,o,i,s,a,c,u,l){var p=e.call(this,t,n,r,o)||this;return p._begin=new h(i,p.id),p.beginCaptures=s,p._end=new h(a||"￿",-1),p.endHasBackReferences=p._end.hasBackReferences,p.endCaptures=c,p.applyEndPatternLast=u||!1,p.patterns=l.patterns,p.hasMissingPatterns=l.hasMissingPatterns,p._cachedCompiledPatterns=null,p}return o(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:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugEndRegExp",{get:function(){return""+this._end.source},enumerable:!1,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,o=void 0;for(o=0,r=this.patterns.length;o<r;o++)e.getRule(this.patterns[o]).collectPatternsRecursive(e,t,!1)}else t.push(this._begin)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e,t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,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},t}(u);t.BeginEndRule=g;var m=function(e){function t(t,n,r,o,i,s,a,c,u){var l=e.call(this,t,n,r,o)||this;return l._begin=new h(i,l.id),l.beginCaptures=s,l.whileCaptures=c,l._while=new h(a,-2),l.whileHasBackReferences=l._while.hasBackReferences,l.patterns=u.patterns,l.hasMissingPatterns=u.hasMissingPatterns,l._cachedCompiledPatterns=null,l._cachedCompiledWhilePatterns=null,l}return o(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:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugWhileRegExp",{get:function(){return""+this._while.source},enumerable:!1,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,o=void 0;for(o=0,r=this.patterns.length;o<r;o++)e.getRule(this.patterns[o]).collectPatternsRecursive(e,t,!1)}else t.push(this._begin)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new p,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t.prototype.compileWhile=function(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)},t.prototype.compileWhileAG=function(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)},t.prototype._getCachedCompiledWhilePatterns=function(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new p,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns},t}(u);t.BeginWhileRule=m;var _=function(){function e(){}return e.createCaptureRule=function(e,t,n,r,o){return e.registerRule((function(e){return new l(t,e,n,r,o)}))},e.getCompiledRuleId=function(t,n,r){return t.id||n.registerRule((function(o){if(t.id=o,t.match)return new d(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=i.mergeObjects({},r,t.repository));var s=t.patterns;return void 0===s&&t.include&&(s=[{include:t.include}]),new f(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(s,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 o=[];if(t){var i=0;for(var s in t)"$vscodeTextmateLocation"!==s&&(c=parseInt(s,10))>i&&(i=c);for(var a=0;a<=i;a++)o[a]=null;for(var s in t)if("$vscodeTextmateLocation"!==s){var c=parseInt(s,10),u=0;t[s].patterns&&(u=e.getCompiledRuleId(t[s],n,r)),o[c]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,u)}}return o},e._compilePatterns=function(t,n,r){var o=[];if(t)for(var i=0,s=t.length;i<s;i++){var a=t[i],c=-1;if(a.include)if("#"===a.include.charAt(0)){var u=r[a.include.substr(1)];u&&(c=e.getCompiledRuleId(u,n,r))}else if("$base"===a.include||"$self"===a.include)c=e.getCompiledRuleId(r[a.include],n,r);else{var l=null,h=null,p=a.include.indexOf("#");p>=0?(l=a.include.substring(0,p),h=a.include.substring(p+1)):l=a.include;var d=n.getExternalGrammar(l,r);if(d)if(h){var _=d.repository[h];_&&(c=e.getCompiledRuleId(_,n,d.repository))}else c=e.getCompiledRuleId(d.repository.$self,n,d.repository)}else c=e.getCompiledRuleId(a,n,r);if(-1!==c){var y=n.getRule(c),v=!1;if((y instanceof f||y instanceof g||y instanceof m)&&y.hasMissingPatterns&&0===y.patterns.length&&(v=!0),v)continue;o.push(c)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}},e}();t.RuleFactory=_},583:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.strArrCmp=t.strcmp=t.Theme=t.ColorMap=t.parseTheme=t.ParsedThemeRule=void 0;var n=function(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i};function r(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 o(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];for(var t=e.settings,o=[],i=0,s=0,a=t.length;s<a;s++){var c=t[s];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,p=(g=c.settings.fontStyle.split(" ")).length;h<p;h++)switch(g[h]){case"italic":l|=1;break;case"bold":l|=2;break;case"underline":l|=4}}var d=null;"string"==typeof c.settings.foreground&&r(c.settings.foreground)&&(d=c.settings.foreground);var f=null;for("string"==typeof c.settings.background&&r(c.settings.background)&&(f=c.settings.background),h=0,p=u.length;h<p;h++){var g,m=(g=u[h].trim().split(" "))[g.length-1],_=null;g.length>1&&(_=g.slice(0,g.length-1)).reverse(),o[i++]=new n(m,_,s,l,d,f)}}}return o}function i(e,t){e.sort((function(e,t){var n=c(e.scope,t.scope);return 0!==n||0!==(n=u(e.parentScopes,t.parentScopes))?n:e.index-t.index}));for(var n=0,r="#000000",o="#ffffff";e.length>=1&&""===e[0].scope;){var i=e.shift();-1!==i.fontStyle&&(n=i.fontStyle),null!==i.foreground&&(r=i.foreground),null!==i.background&&(o=i.background)}for(var p=new s(t),d=new l(0,null,n,p.getId(r),p.getId(o)),f=new h(new l(0,null,-1,0,0),[]),g=0,m=e.length;g<m;g++){var _=e[g];f.insert(0,_.scope,_.parentScopes,_.fontStyle,p.getId(_.foreground),p.getId(_.background))}return new a(p,d,f)}t.ParsedThemeRule=n,t.parseTheme=o;var s=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=s;var a=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(o(e),t)},e.createFromParsedTheme=function(e,t){return i(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 c(e,t){return e<t?-1:e>t?1:0}function u(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 o=0;o<n;o++){var i=c(e[o],t[o]);if(0!==i)return i}return 0}return n-r}t.Theme=a,t.strcmp=c,t.strArrCmp=u;var l=function(){function e(e,t,n,r,o){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=r,this.background=o}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,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)},e}();t.ThemeTrieElementRule=l;var h=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,o=null===n?0:n.length,i=null===r?0:r.length;if(o===i)for(var s=0;s<o;s++){var a=n[s].length,c=r[s].length;if(a!==c)return c-a}return i-o}return t.scopeDepth-e.scopeDepth},e.prototype.match=function(t){if(""===t)return e._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));var n,r,o=t.indexOf(".");return-1===o?(n=t,r=""):(n=t.substring(0,o),r=t.substring(o+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,o,i,s){if(""!==n){var a,c,u,h=n.indexOf(".");-1===h?(a=n,c=""):(a=n.substring(0,h),c=n.substring(h+1)),this._children.hasOwnProperty(a)?u=this._children[a]:(u=new e(this._mainRule.clone(),l.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,r,o,i,s)}else this._doInsertHere(t,r,o,i,s)},e.prototype._doInsertHere=function(e,t,n,r,o){if(null!==t){for(var i=0,s=this._rulesWithParentScopes.length;i<s;i++){var a=this._rulesWithParentScopes[i];if(0===u(a.parentScopes,t))return void a.acceptOverwrite(e,n,r,o)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new l(e,t,n,r,o))}else this._mainRule.acceptOverwrite(e,n,r,o)},e}();t.ThemeTrieElement=h},42:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){for(var t=[],r=0,o=e.length;r<o;r++)t[r]=n(e[r]);return t}(e):"object"==typeof e?function(e){var t={};for(var r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(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 r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,o=function(){function e(){}return e.hasCaptures=function(e){return null!==e&&(r.lastIndex=0,r.test(e))},e.replaceCaptures=function(e,t,n){return e.replace(r,(function(e,r,o,i){var s=n[parseInt(r||o,10)];if(!s)return e;for(var a=t.substring(s.start,s.end);"."===a[0];)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}))},e}();t.RegexSource=o}},t={};return function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(787)})()}));
//# sourceMappingURL=main.js.map

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc