UNPKG

cloudstudio

Version:

Run VS Code on a remote server.

1 lines 914 kB
(()=>{"use strict";var e={666:(e,t,n)=>{var i;n.r(t),n.d(t,{ClientCapabilities:()=>Yn,CodeAction:()=>En,CodeActionContext:()=>Fn,CodeActionKind:()=>Dn,Color:()=>It,ColorInformation:()=>At,ColorPresentation:()=>Ot,Command:()=>Bt,CompletionItem:()=>mn,CompletionItemKind:()=>cn,CompletionItemTag:()=>dn,CompletionList:()=>fn,Diagnostic:()=>$t,DiagnosticSeverity:()=>jt,DocumentHighlight:()=>xn,DocumentHighlightKind:()=>wn,DocumentLink:()=>zn,DocumentSymbol:()=>Rn,DocumentUri:()=>Dt,FileType:()=>Zn,FoldingRange:()=>qt,FoldingRangeKind:()=>Wt,Hover:()=>bn,InsertTextFormat:()=>ln,Location:()=>zt,MarkedString:()=>gn,MarkupContent:()=>an,MarkupKind:()=>sn,Position:()=>Pt,Range:()=>Nt,SelectionRange:()=>Mn,SymbolInformation:()=>Cn,SymbolKind:()=>Sn,TextDocument:()=>Xn,TextDocumentEdit:()=>Xt,TextEdit:()=>Kt,VersionedTextDocumentIdentifier:()=>nn,WorkspaceEdit:()=>en,getCSSLanguageService:()=>ps,getDefaultCSSDataProvider:()=>cs,getLESSLanguageService:()=>ms,getSCSSLanguageService:()=>us,newCSSDataProvider:()=>ls}),function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.CustomToken=42]="CustomToken"}(i||(i={}));class r{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceWhileChar(e){const t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}}const o="a".charCodeAt(0),s="f".charCodeAt(0),a="z".charCodeAt(0),c=("u".charCodeAt(0),"A".charCodeAt(0)),l="F".charCodeAt(0),d="Z".charCodeAt(0),h="0".charCodeAt(0),p="9".charCodeAt(0),u="~".charCodeAt(0),m="^".charCodeAt(0),f="=".charCodeAt(0),g="|".charCodeAt(0),b="-".charCodeAt(0),y="_".charCodeAt(0),v="%".charCodeAt(0),w="*".charCodeAt(0),x="(".charCodeAt(0),S=")".charCodeAt(0),k="<".charCodeAt(0),C=">".charCodeAt(0),_="@".charCodeAt(0),R="#".charCodeAt(0),D="$".charCodeAt(0),T="\\".charCodeAt(0),F="/".charCodeAt(0),E="\n".charCodeAt(0),P="\r".charCodeAt(0),N="\f".charCodeAt(0),z='"'.charCodeAt(0),M="'".charCodeAt(0),I=" ".charCodeAt(0),A="\t".charCodeAt(0),O=";".charCodeAt(0),W=":".charCodeAt(0),q="{".charCodeAt(0),L="}".charCodeAt(0),j="[".charCodeAt(0),U="]".charCodeAt(0),V=",".charCodeAt(0),$=".".charCodeAt(0),B="!".charCodeAt(0),K="?".charCodeAt(0),H="+".charCodeAt(0),G={};G[O]=i.SemiColon,G[W]=i.Colon,G[q]=i.CurlyL,G[L]=i.CurlyR,G[U]=i.BracketR,G[j]=i.BracketL,G[x]=i.ParenthesisL,G[S]=i.ParenthesisR,G[V]=i.Comma;const J={};J.em=i.EMS,J.ex=i.EXS,J.px=i.Length,J.cm=i.Length,J.mm=i.Length,J.in=i.Length,J.pt=i.Length,J.pc=i.Length,J.deg=i.Angle,J.rad=i.Angle,J.grad=i.Angle,J.ms=i.Time,J.s=i.Time,J.hz=i.Freq,J.khz=i.Freq,J["%"]=i.Percentage,J.fr=i.Percentage,J.dpi=i.Resolution,J.dpcm=i.Resolution;class X{constructor(){this.stream=new r(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new r(e)}finishToken(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){const e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,i.UnquotedString,t.join("")):null}scan(){const e=this.trivia();if(null!==e)return e;const t=this.stream.pos();return this.stream.eos()?this.finishToken(t,i.EOF):this.scanNext(t)}tryScanUnicode(){const e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,i.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([k,B,b,b]))return this.finishToken(e,i.CDO);if(this.stream.advanceIfChars([b,b,C]))return this.finishToken(e,i.CDC);let t=[];if(this.ident(t))return this.finishToken(e,i.Ident,t.join(""));if(this.stream.advanceIfChar(_)){if(t=["@"],this._name(t)){const n=t.join("");return"@charset"===n?this.finishToken(e,i.Charset,n):this.finishToken(e,i.AtKeyword,n)}return this.finishToken(e,i.Delim)}if(this.stream.advanceIfChar(R))return t=["#"],this._name(t)?this.finishToken(e,i.Hash,t.join("")):this.finishToken(e,i.Delim);if(this.stream.advanceIfChar(B))return this.finishToken(e,i.Exclamation);if(this._number()){const n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(v))return this.finishToken(e,i.Percentage);if(this.ident(t)){const r=this.stream.substring(n).toLowerCase(),o=J[r];return void 0!==o?this.finishToken(e,o,t.join("")):this.finishToken(e,i.Dimension,t.join(""))}return this.finishToken(e,i.Num)}t=[];let n=this._string(t);return null!==n?this.finishToken(e,n,t.join("")):(n=G[this.stream.peekChar()],void 0!==n?(this.stream.advance(1),this.finishToken(e,n)):this.stream.peekChar(0)===u&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,i.Includes)):this.stream.peekChar(0)===g&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,i.Dashmatch)):this.stream.peekChar(0)===w&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,i.SubstringOperator)):this.stream.peekChar(0)===m&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,i.PrefixOperator)):this.stream.peekChar(0)===D&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,i.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,i.Delim)))}trivia(){for(;;){const e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,i.Whitespace)}else{if(!this.comment())return null;if(!this.ignoreComment)return this.finishToken(e,i.Comment)}}}comment(){if(this.stream.advanceIfChars([F,w])){let e=!1,t=!1;return this.stream.advanceWhileChar((n=>t&&n===F?(e=!0,!1):(t=n===w,!0))),e&&this.stream.advance(1),!0}return!1}_number(){let e,t=0;return this.stream.peekChar()===$&&(t=1),e=this.stream.peekChar(t),e>=h&&e<=p&&(this.stream.advance(t+1),this.stream.advanceWhileChar((e=>e>=h&&e<=p||0===t&&e===$)),!0)}_newline(e){const t=this.stream.peekChar();switch(t){case P:case N:case E:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===P&&this.stream.advanceIfChar(E)&&e.push("\n"),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===T){this.stream.advance(1),n=this.stream.peekChar();let i=0;for(;i<6&&(n>=h&&n<=p||n>=o&&n<=s||n>=c&&n<=l);)this.stream.advance(1),n=this.stream.peekChar(),i++;if(i>0){try{const t=parseInt(this.stream.substring(this.stream.pos()-i),16);t&&e.push(String.fromCharCode(t))}catch(e){}return n===I||n===A?this.stream.advance(1):this._newline([]),!0}if(n!==P&&n!==N&&n!==E)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){const n=this.stream.peekChar();return 0!==n&&n!==e&&n!==T&&n!==P&&n!==N&&n!==E&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)}_string(e){if(this.stream.peekChar()===M||this.stream.peekChar()===z){const t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),i.String):i.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return 0!==t&&t!==T&&t!==M&&t!==z&&t!==x&&t!==S&&t!==I&&t!==A&&t!==E&&t!==N&&t!==P&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar((e=>e===I||e===A||e===E||e===N||e===P))>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){const t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1}_identFirstChar(e){const t=this.stream.peekChar();return(t===y||t>=o&&t<=a||t>=c&&t<=d||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_minus(e){const t=this.stream.peekChar();return t===b&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_identChar(e){const t=this.stream.peekChar();return(t===y||t===b||t>=o&&t<=a||t>=c&&t<=d||t>=h&&t<=p||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unicodeRange(){if(this.stream.advanceIfChar(H)){const e=e=>e>=h&&e<=p||e>=o&&e<=s||e>=c&&e<=l,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar((e=>e===K));if(t>=1&&t<=6){if(!this.stream.advanceIfChar(b))return!0;{const t=this.stream.advanceWhileChar(e);if(t>=1&&t<=6)return!0}}}return!1}}function Y(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Z(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function Q(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}function ee(e,t){let n="";for(;t>0;)1==(1&t)&&(n+=e),e+=e,t>>>=1;return n}var te,ne;function ie(e,t){let n=null;return!e||t<e.offset||t>e.end?null:(e.accept((e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0))),n)}function re(e,t){let n=ie(e,t);const i=[];for(;n;)i.unshift(n),n=n.parent;return i}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange"}(te||(te={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility"}(ne||(ne={}));class oe{constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}get end(){return this.offset+this.length}set type(e){this.nodeType=e}get type(){return this.nodeType||te.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),-1!==t?n.splice(t,0,e):n.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some((t=>t.getRule()===e))}isErroneous(e=!1){return!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some((e=>e.isErroneous(!0)))}setNode(e,t,n=-1){return!!t&&(t.attachTo(this,n),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset);const t=e.end;(t>this.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e<this.children.length?this.children[e]:null}addChildren(e){for(const t of e)this.addChild(t)}findFirstChildBeforeOffset(e){if(this.children){let t=null;for(let n=this.children.length-1;n>=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){const n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof se;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some((e=>t.type===e));)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}}class se extends oe{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class ae extends oe{constructor(e,t){super(e,t)}get type(){return te.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class ce extends oe{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return te.Identifier}containsInterpolation(){return this.hasChildren()}}class le extends oe{constructor(e,t){super(e,t)}get type(){return te.Stylesheet}}class de extends oe{constructor(e,t){super(e,t)}get type(){return te.Declarations}}class he extends oe{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class pe extends he{constructor(e,t){super(e,t)}get type(){return te.Ruleset}getSelectors(){return this.selectors||(this.selectors=new se(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(te.Declarations)}}class ue extends oe{constructor(e,t){super(e,t)}get type(){return te.Selector}}class me extends oe{constructor(e,t){super(e,t)}get type(){return te.SimpleSelector}}class fe extends oe{constructor(e,t){super(e,t)}}class ge extends he{constructor(e,t){super(e,t)}get type(){return te.CustomPropertySet}}class be extends fe{constructor(e,t){super(e,t),this.property=null}get type(){return te.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof de&&this.parent.getParent()instanceof Ne){const t=this.parent.getParent().getParent();if(t instanceof be)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){const t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class ye extends be{constructor(e,t){super(e,t)}get type(){return te.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class ve extends oe{constructor(e,t){super(e,t)}get type(){return te.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e,t){const n=/[_\+]+$/.exec(e);return n&&n[0].length?e.substr(0,e.length-n[0].length):e}(this.getText())}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class we extends oe{constructor(e,t){super(e,t)}get type(){return te.Invocation}getArguments(){return this.arguments||(this.arguments=new se(this)),this.arguments}}class xe extends we{constructor(e,t){super(e,t)}get type(){return te.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class Se extends oe{constructor(e,t){super(e,t)}get type(){return te.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class ke extends oe{constructor(e,t){super(e,t)}get type(){return te.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class Ce extends he{constructor(e,t){super(e,t)}get type(){return te.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class _e extends he{constructor(e,t){super(e,t)}get type(){return te.For}setVariable(e){return this.setNode("variable",e,0)}}class Re extends he{constructor(e,t){super(e,t)}get type(){return te.Each}getVariables(){return this.variables||(this.variables=new se(this)),this.variables}}class De extends he{constructor(e,t){super(e,t)}get type(){return te.While}}class Te extends he{constructor(e,t){super(e,t)}get type(){return te.Else}}class Fe extends he{constructor(e,t){super(e,t)}get type(){return te.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new se(this)),this.parameters}}class Ee extends he{constructor(e,t){super(e,t)}get type(){return te.ViewPort}}class Pe extends he{constructor(e,t){super(e,t)}get type(){return te.FontFace}}class Ne extends he{constructor(e,t){super(e,t)}get type(){return te.NestedProperties}}class ze extends he{constructor(e,t){super(e,t)}get type(){return te.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class Me extends he{constructor(e,t){super(e,t)}get type(){return te.KeyframeSelector}}class Ie extends oe{constructor(e,t){super(e,t)}get type(){return te.Import}setMedialist(e){return!!e&&(e.attachTo(this),!0)}}class Ae extends oe{get type(){return te.Use}getParameters(){return this.parameters||(this.parameters=new se(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Oe extends oe{get type(){return te.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class We extends oe{get type(){return te.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new se(this)),this.members}getParameters(){return this.parameters||(this.parameters=new se(this)),this.parameters}}class qe extends oe{get type(){return te.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Le extends oe{constructor(e,t){super(e,t)}get type(){return te.Namespace}}class je extends he{constructor(e,t){super(e,t)}get type(){return te.Media}}class Ue extends he{constructor(e,t){super(e,t)}get type(){return te.Supports}}class Ve extends he{constructor(e,t){super(e,t)}get type(){return te.Document}}class $e extends oe{constructor(e,t){super(e,t)}getMediums(){return this.mediums||(this.mediums=new se(this)),this.mediums}}class Be extends oe{constructor(e,t){super(e,t)}get type(){return te.MediaQuery}}class Ke extends oe{constructor(e,t){super(e,t)}get type(){return te.MediaCondition}}class He extends oe{constructor(e,t){super(e,t)}get type(){return te.MediaFeature}}class Ge extends oe{constructor(e,t){super(e,t)}get type(){return te.SupportsCondition}}class Je extends he{constructor(e,t){super(e,t)}get type(){return te.Page}}class Xe extends he{constructor(e,t){super(e,t)}get type(){return te.PageBoxMarginBox}}class Ye extends oe{constructor(e,t){super(e,t)}get type(){return te.Expression}}class Ze extends oe{constructor(e,t){super(e,t)}get type(){return te.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class Qe extends oe{constructor(e,t){super(e,t)}get type(){return te.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class et extends oe{constructor(e,t){super(e,t)}get type(){return te.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class tt extends oe{constructor(e,t){super(e,t)}get type(){return te.HexColorValue}}class nt extends oe{constructor(e,t){super(e,t)}get type(){return te.RatioValue}}const it=".".charCodeAt(0),rt="0".charCodeAt(0),ot="9".charCodeAt(0);class st extends oe{constructor(e,t){super(e,t)}get type(){return te.NumericValue}getValue(){const e=this.getText();let t,n=0;for(let i=0,r=e.length;i<r&&(t=e.charCodeAt(i),rt<=t&&t<=ot||t===it);i++)n+=1;return{value:e.substring(0,n),unit:n<e.length?e.substring(n):void 0}}}class at extends fe{constructor(e,t){super(e,t),this.variable=null,this.value=null,this.needsSemicolon=!0}get type(){return te.VariableDeclaration}setVariable(e){return!!e&&(e.attachTo(this),this.variable=e,!0)}getVariable(){return this.variable}getName(){return this.variable?this.variable.getName():""}setValue(e){return!!e&&(e.attachTo(this),this.value=e,!0)}getValue(){return this.value}}class ct extends oe{constructor(e,t){super(e,t)}get type(){return te.Interpolation}}class lt extends oe{constructor(e,t){super(e,t)}get type(){return te.VariableName}getName(){return this.getText()}}class dt extends oe{constructor(e,t){super(e,t)}get type(){return te.ExtendsReference}getSelectors(){return this.selectors||(this.selectors=new se(this)),this.selectors}}class ht extends oe{constructor(e,t){super(e,t)}get type(){return te.MixinContentReference}getArguments(){return this.arguments||(this.arguments=new se(this)),this.arguments}}class pt extends he{constructor(e,t){super(e,t)}get type(){return te.MixinContentReference}getParameters(){return this.parameters||(this.parameters=new se(this)),this.parameters}}class ut extends oe{constructor(e,t){super(e,t)}get type(){return te.MixinReference}getNamespaces(){return this.namespaces||(this.namespaces=new se(this)),this.namespaces}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getArguments(){return this.arguments||(this.arguments=new se(this)),this.arguments}setContent(e){return this.setNode("content",e)}getContent(){return this.content}}class mt extends he{constructor(e,t){super(e,t)}get type(){return te.MixinDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new se(this)),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}}class ft extends he{constructor(e,t){super(e,t)}get type(){return te.UnknownAtRule}setAtRuleName(e){this.atRuleName=e}getAtRuleName(){return this.atRuleName}}class gt extends oe{get type(){return te.ListEntry}setKey(e){return this.setNode("key",e,0)}setValue(e){return this.setNode("value",e,1)}}class bt extends oe{getConditions(){return this.conditions||(this.conditions=new se(this)),this.conditions}}class yt extends oe{setVariable(e){return this.setNode("variable",e)}}class vt extends oe{get type(){return te.Module}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}var wt;!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(wt||(wt={}));class xt{constructor(e,t,n,i,r=e.offset,o=e.length){this.node=e,this.rule=t,this.level=n,this.message=i||t.message,this.offset=r,this.length=o}getRule(){return this.rule}getLevel(){return this.level}getOffset(){return this.offset}getLength(){return this.length}getNode(){return this.node}getMessage(){return this.message}}class St{constructor(){this.entries=[]}static entries(e){const t=new St;return e.acceptVisitor(t),t.entries}visitNode(e){return e.isErroneous()&&e.collectIssues(this.entries),!0}}var kt=n(8472);const Ct=kt.LV();class _t{constructor(e,t){this.id=e,this.message=t}}const Rt={NumberExpected:new _t("css-numberexpected",Ct("expected.number","number expected")),ConditionExpected:new _t("css-conditionexpected",Ct("expected.condt","condition expected")),RuleOrSelectorExpected:new _t("css-ruleorselectorexpected",Ct("expected.ruleorselector","at-rule or selector expected")),DotExpected:new _t("css-dotexpected",Ct("expected.dot","dot expected")),ColonExpected:new _t("css-colonexpected",Ct("expected.colon","colon expected")),SemiColonExpected:new _t("css-semicolonexpected",Ct("expected.semicolon","semi-colon expected")),TermExpected:new _t("css-termexpected",Ct("expected.term","term expected")),ExpressionExpected:new _t("css-expressionexpected",Ct("expected.expression","expression expected")),OperatorExpected:new _t("css-operatorexpected",Ct("expected.operator","operator expected")),IdentifierExpected:new _t("css-identifierexpected",Ct("expected.ident","identifier expected")),PercentageExpected:new _t("css-percentageexpected",Ct("expected.percentage","percentage expected")),URIOrStringExpected:new _t("css-uriorstringexpected",Ct("expected.uriorstring","uri or string expected")),URIExpected:new _t("css-uriexpected",Ct("expected.uri","URI expected")),VariableNameExpected:new _t("css-varnameexpected",Ct("expected.varname","variable name expected")),VariableValueExpected:new _t("css-varvalueexpected",Ct("expected.varvalue","variable value expected")),PropertyValueExpected:new _t("css-propertyvalueexpected",Ct("expected.propvalue","property value expected")),LeftCurlyExpected:new _t("css-lcurlyexpected",Ct("expected.lcurly","{ expected")),RightCurlyExpected:new _t("css-rcurlyexpected",Ct("expected.rcurly","} expected")),LeftSquareBracketExpected:new _t("css-rbracketexpected",Ct("expected.lsquare","[ expected")),RightSquareBracketExpected:new _t("css-lbracketexpected",Ct("expected.rsquare","] expected")),LeftParenthesisExpected:new _t("css-lparentexpected",Ct("expected.lparen","( expected")),RightParenthesisExpected:new _t("css-rparentexpected",Ct("expected.rparent",") expected")),CommaExpected:new _t("css-commaexpected",Ct("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new _t("css-pagedirordeclexpected",Ct("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new _t("css-unknownatrule",Ct("unknown.atrule","at-rule unknown")),UnknownKeyword:new _t("css-unknownkeyword",Ct("unknown.keyword","unknown keyword")),SelectorExpected:new _t("css-selectorexpected",Ct("expected.selector","selector expected")),StringLiteralExpected:new _t("css-stringliteralexpected",Ct("expected.stringliteral","string literal expected")),WhitespaceExpected:new _t("css-whitespaceexpected",Ct("expected.whitespace","whitespace expected")),MediaQueryExpected:new _t("css-mediaqueryexpected",Ct("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new _t("css-idorwildcardexpected",Ct("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new _t("css-wildcardexpected",Ct("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new _t("css-idorvarexpected",Ct("expected.idorvar","identifier or variable expected"))};var Dt,Tt,Ft,Et,Pt,Nt,zt,Mt,It,At,Ot,Wt,qt,Lt,jt,Ut,Vt,$t,Bt,Kt,Ht,Gt,Jt,Xt,Yt,Zt,Qt,en;!function(e){e.is=function(e){return"string"==typeof e}}(Dt||(Dt={})),function(e){e.is=function(e){return"string"==typeof e}}(Tt||(Tt={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(Ft||(Ft={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(Et||(Et={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=Et.MAX_VALUE),t===Number.MAX_VALUE&&(t=Et.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.uinteger(t.line)&&Jn.uinteger(t.character)}}(Pt||(Pt={})),function(e){e.create=function(e,t,n,i){if(Jn.uinteger(e)&&Jn.uinteger(t)&&Jn.uinteger(n)&&Jn.uinteger(i))return{start:Pt.create(e,t),end:Pt.create(n,i)};if(Pt.is(e)&&Pt.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(i,"]"))},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Pt.is(t.start)&&Pt.is(t.end)}}(Nt||(Nt={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Jn.defined(t)&&Nt.is(t.range)&&(Jn.string(t.uri)||Jn.undefined(t.uri))}}(zt||(zt={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){var t=e;return Jn.defined(t)&&Nt.is(t.targetRange)&&Jn.string(t.targetUri)&&Nt.is(t.targetSelectionRange)&&(Nt.is(t.originSelectionRange)||Jn.undefined(t.originSelectionRange))}}(Mt||(Mt={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.numberRange(t.red,0,1)&&Jn.numberRange(t.green,0,1)&&Jn.numberRange(t.blue,0,1)&&Jn.numberRange(t.alpha,0,1)}}(It||(It={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Nt.is(t.range)&&It.is(t.color)}}(At||(At={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.string(t.label)&&(Jn.undefined(t.textEdit)||Kt.is(t))&&(Jn.undefined(t.additionalTextEdits)||Jn.typedArray(t.additionalTextEdits,Kt.is))}}(Ot||(Ot={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(Wt||(Wt={})),function(e){e.create=function(e,t,n,i,r,o){var s={startLine:e,endLine:t};return Jn.defined(n)&&(s.startCharacter=n),Jn.defined(i)&&(s.endCharacter=i),Jn.defined(r)&&(s.kind=r),Jn.defined(o)&&(s.collapsedText=o),s},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.uinteger(t.startLine)&&Jn.uinteger(t.startLine)&&(Jn.undefined(t.startCharacter)||Jn.uinteger(t.startCharacter))&&(Jn.undefined(t.endCharacter)||Jn.uinteger(t.endCharacter))&&(Jn.undefined(t.kind)||Jn.string(t.kind))}}(qt||(qt={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Jn.defined(t)&&zt.is(t.location)&&Jn.string(t.message)}}(Lt||(Lt={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(jt||(jt={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Ut||(Ut={})),function(e){e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.string(t.href)}}(Vt||(Vt={})),function(e){e.create=function(e,t,n,i,r,o){var s={range:e,message:t};return Jn.defined(n)&&(s.severity=n),Jn.defined(i)&&(s.code=i),Jn.defined(r)&&(s.source=r),Jn.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,n=e;return Jn.defined(n)&&Nt.is(n.range)&&Jn.string(n.message)&&(Jn.number(n.severity)||Jn.undefined(n.severity))&&(Jn.integer(n.code)||Jn.string(n.code)||Jn.undefined(n.code))&&(Jn.undefined(n.codeDescription)||Jn.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Jn.string(n.source)||Jn.undefined(n.source))&&(Jn.undefined(n.relatedInformation)||Jn.typedArray(n.relatedInformation,Lt.is))}}($t||($t={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={title:e,command:t};return Jn.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){var t=e;return Jn.defined(t)&&Jn.string(t.title)&&Jn.string(t.command)}}(Bt||(Bt={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.string(t.newText)&&Nt.is(t.range)}}(Kt||(Kt={})),function(e){e.create=function(e,t,n){var i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){var t=e;return Jn.objectLiteral(t)&&Jn.string(t.label)&&(Jn.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Jn.string(t.description)||void 0===t.description)}}(Ht||(Ht={})),function(e){e.is=function(e){var t=e;return Jn.string(t)}}(Gt||(Gt={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return Kt.is(t)&&(Ht.is(t.annotationId)||Gt.is(t.annotationId))}}(Jt||(Jt={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Jn.defined(t)&&rn.is(t.textDocument)&&Array.isArray(t.edits)}}(Xt||(Xt={})),function(e){e.create=function(e,t,n){var i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"create"===t.kind&&Jn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Jn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Jn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Gt.is(t.annotationId))}}(Yt||(Yt={})),function(e){e.create=function(e,t,n,i){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Jn.string(t.oldUri)&&Jn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Jn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Jn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Gt.is(t.annotationId))}}(Zt||(Zt={})),function(e){e.create=function(e,t,n){var i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Jn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Jn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Jn.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Gt.is(t.annotationId))}}(Qt||(Qt={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Jn.string(e.kind)?Yt.is(e)||Zt.is(e)||Qt.is(e):Xt.is(e)})))}}(en||(en={}));var tn,nn,rn,on,sn,an,cn,ln,dn,hn,pn,un,mn,fn,gn,bn,yn,vn,wn,xn,Sn,kn,Cn,_n,Rn,Dn,Tn,Fn,En,Pn,Nn,zn,Mn,In,An,On,Wn,qn,Ln,jn,Un,Vn,$n,Bn,Kn,Hn=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var i,r;if(void 0===n?i=Kt.insert(e,t):Gt.is(n)?(r=n,i=Jt.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=Jt.insert(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.replace=function(e,t,n){var i,r;if(void 0===n?i=Kt.replace(e,t):Gt.is(n)?(r=n,i=Jt.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=Jt.replace(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.delete=function(e,t){var n,i;if(void 0===t?n=Kt.del(e):Gt.is(t)?(i=t,n=Jt.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=Jt.del(e,i)),this.edits.push(n),void 0!==i)return i},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Gn=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(Gt.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Gn(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Xt.is(e)){var n=new Hn(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new Hn(e.changes[n]);t._textEditChanges[n]=i}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(rn.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),i=new Hn(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,i=new Hn(r),this._textEditChanges[e]=i}return i},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Gn,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(Ht.is(t)||Gt.is(t)?i=t:n=t,void 0===i?r=Yt.create(e,n):(o=Gt.is(i)?i:this._changeAnnotations.manage(i),r=Yt.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,s;if(Ht.is(n)||Gt.is(n)?r=n:i=n,void 0===r?o=Zt.create(e,t,i):(s=Gt.is(r)?r:this._changeAnnotations.manage(r),o=Zt.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(Ht.is(t)||Gt.is(t)?i=t:n=t,void 0===i?r=Qt.create(e,n):(o=Gt.is(i)?i:this._changeAnnotations.manage(i),r=Qt.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}}(),function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Jn.defined(t)&&Jn.string(t.uri)}}(tn||(tn={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Jn.defined(t)&&Jn.string(t.uri)&&Jn.integer(t.version)}}(nn||(nn={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Jn.defined(t)&&Jn.string(t.uri)&&(null===t.version||Jn.integer(t.version))}}(rn||(rn={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return Jn.defined(t)&&Jn.string(t.uri)&&Jn.string(t.languageId)&&Jn.integer(t.version)&&Jn.string(t.text)}}(on||(on={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(sn||(sn={})),function(e){e.is=function(e){var t=e;return Jn.objectLiteral(e)&&sn.is(t.kind)&&Jn.string(t.value)}}(an||(an={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(cn||(cn={})),function(e){e.PlainText=1,e.Snippet=2}(ln||(ln={})),function(e){e.Deprecated=1}(dn||(dn={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Jn.string(t.newText)&&Nt.is(t.insert)&&Nt.is(t.replace)}}(hn||(hn={})),function(e){e.asIs=1,e.adjustIndentation=2}(pn||(pn={})),function(e){e.is=function(e){var t=e;return t&&(Jn.string(t.detail)||void 0===t.detail)&&(Jn.string(t.description)||void 0===t.description)}}(un||(un={})),function(e){e.create=function(e){return{label:e}}}(mn||(mn={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(fn||(fn={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Jn.string(t)||Jn.objectLiteral(t)&&Jn.string(t.language)&&Jn.string(t.value)}}(gn||(gn={})),function(e){e.is=function(e){var t=e;return!!t&&Jn.objectLiteral(t)&&(an.is(t.contents)||gn.is(t.contents)||Jn.typedArray(t.contents,gn.is))&&(void 0===e.range||Nt.is(e.range))}}(bn||(bn={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(yn||(yn={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={label:e};return Jn.defined(t)&&(r.documentation=t),Jn.defined(n)?r.parameters=n:r.parameters=[],r}}(vn||(vn={})),function(e){e.Text=1,e.Read=2,e.Write=3}(wn||(wn={})),function(e){e.create=function(e,t){var n={range:e};return Jn.number(t)&&(n.kind=t),n}}(xn||(xn={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Sn||(Sn={})),function(e){e.Deprecated=1}(kn||(kn={})),function(e){e.create=function(e,t,n,i,r){var o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(Cn||(Cn={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(_n||(_n={})),function(e){e.create=function(e,t,n,i,r,o){var s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&Jn.string(t.name)&&Jn.number(t.kind)&&Nt.is(t.range)&&Nt.is(t.selectionRange)&&(void 0===t.detail||Jn.string(t.detail))&&(void 0===t.deprecated||Jn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Rn||(Rn={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Dn||(Dn={})),function(e){e.Invoked=1,e.Automatic=2}(Tn||(Tn={})),function(e){e.create=function(e,t,n){var i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){var t=e;return Jn.defined(t)&&Jn.typedArray(t.diagnostics,$t.is)&&(void 0===t.only||Jn.typedArray(t.only,Jn.string))&&(void 0===t.triggerKind||t.triggerKind===Tn.Invoked||t.triggerKind===Tn.Automatic)}}(Fn||(Fn={})),function(e){e.create=function(e,t,n){var i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):Bt.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){var t=e;return t&&Jn.string(t.title)&&(void 0===t.diagnostics||Jn.typedArray(t.diagnostics,$t.is))&&(void 0===t.kind||Jn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Bt.is(t.command))&&(void 0===t.isPreferred||Jn.boolean(t.isPreferred))&&(void 0===t.edit||en.is(t.edit))}}(En||(En={})),function(e){e.create=function(e,t){var n={range:e};return Jn.defined(t