UNPKG

iobroker.javascript

Version:

Javascript/Coffescript Script Engine for ioBroker

7 lines 501 kB
/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * monaco-css version: 2.1.1(a021ab7a38731f54509ae2a95507f8165728cd2f) * Released under the MIT license * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md *-----------------------------------------------------------------------------*/ !function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-languageserver-types/main",["require","exports"],e)}(function(e,t){"use strict";var o,n,r,i,s,a,l,c,h,d,p,m,u;Object.defineProperty(t,"__esModule",{value:!0}),(n=o=t.Position||(t.Position={})).create=function(e,t){return{line:e,character:t}},n.is=function(e){var t=e;return O.defined(t)&&O.number(t.line)&&O.number(t.character)},(i=r=t.Range||(t.Range={})).create=function(e,t,n,r){if(O.number(e)&&O.number(t)&&O.number(n)&&O.number(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},i.is=function(e){var t=e;return O.defined(t)&&o.is(t.start)&&o.is(t.end)},(s=t.Location||(t.Location={})).create=function(e,t){return{uri:e,range:t}},s.is=function(e){var t=e;return O.defined(t)&&r.is(t.range)&&(O.string(t.uri)||O.undefined(t.uri))},(a=t.DiagnosticSeverity||(t.DiagnosticSeverity={})).Error=1,a.Warning=2,a.Information=3,a.Hint=4,(c=l=t.Diagnostic||(t.Diagnostic={})).create=function(e,t,n,r,i){var s={range:e,message:t};return O.defined(n)&&(s.severity=n),O.defined(r)&&(s.code=r),O.defined(i)&&(s.source=i),s},c.is=function(e){var t=e;return O.defined(t)&&r.is(t.range)&&O.string(t.message)&&(O.number(t.severity)||O.undefined(t.severity))&&(O.number(t.code)||O.string(t.code)||O.undefined(t.code))&&(O.string(t.source)||O.undefined(t.source))},(d=h=t.Command||(t.Command={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return O.defined(n)&&0<n.length&&(i.arguments=n),i},d.is=function(e){var t=e;return O.defined(t)&&O.string(t.title)&&O.string(t.title)},(m=p=t.TextEdit||(t.TextEdit={})).replace=function(e,t){return{range:e,newText:t}},m.insert=function(e,t){return{range:{start:e,end:e},newText:t}},m.del=function(e){return{range:e,newText:""}},(u=t.TextDocumentEdit||(t.TextDocumentEdit={})).create=function(e,t){return{textDocument:e,edits:t}},u.is=function(e){var t=e;return O.defined(t)&&g.is(t.textDocument)&&Array.isArray(t.edits)};var f,g,b,y,w,v,x,k,S,F,C,T,E=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(p.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(p.replace(e,t))},e.prototype.delete=function(e){this.edits.push(p.del(e))},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}(),I=function(){function e(n){var r=this;this._textEditChanges=Object.create(null),n&&((this._workspaceEdit=n).documentChanges?n.documentChanges.forEach(function(e){var t=new E(e.edits);r._textEditChanges[e.textDocument.uri]=t}):n.changes&&Object.keys(n.changes).forEach(function(e){var t=new E(n.changes[e]);r._textEditChanges[e]=t}))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(g.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for versioned document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new E(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new E(i),this._textEditChanges[e]=r}return r},e}();t.WorkspaceChange=I,(f=t.TextDocumentIdentifier||(t.TextDocumentIdentifier={})).create=function(e){return{uri:e}},f.is=function(e){var t=e;return O.defined(t)&&O.string(t.uri)},(b=g=t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={})).create=function(e,t){return{uri:e,version:t}},b.is=function(e){var t=e;return O.defined(t)&&O.string(t.uri)&&O.number(t.version)},(y=t.TextDocumentItem||(t.TextDocumentItem={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},y.is=function(e){var t=e;return O.defined(t)&&O.string(t.uri)&&O.string(t.languageId)&&O.number(t.version)&&O.string(t.text)},(w=t.MarkupKind||(t.MarkupKind={})).PlainText="plaintext",w.Markdown="markdown",(v=t.CompletionItemKind||(t.CompletionItemKind={})).Text=1,v.Method=2,v.Function=3,v.Constructor=4,v.Field=5,v.Variable=6,v.Class=7,v.Interface=8,v.Module=9,v.Property=10,v.Unit=11,v.Value=12,v.Enum=13,v.Keyword=14,v.Snippet=15,v.Color=16,v.File=17,v.Reference=18,v.Folder=19,v.EnumMember=20,v.Constant=21,v.Struct=22,v.Event=23,v.Operator=24,v.TypeParameter=25,(x=t.InsertTextFormat||(t.InsertTextFormat={})).PlainText=1,x.Snippet=2,(t.CompletionItem||(t.CompletionItem={})).create=function(e){return{label:e}},(t.CompletionList||(t.CompletionList={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(t.MarkedString||(t.MarkedString={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},(t.ParameterInformation||(t.ParameterInformation={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(t.SignatureInformation||(t.SignatureInformation={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return O.defined(t)&&(i.documentation=t),O.defined(n)?i.parameters=n:i.parameters=[],i},(k=t.DocumentHighlightKind||(t.DocumentHighlightKind={})).Text=1,k.Read=2,k.Write=3,(t.DocumentHighlight||(t.DocumentHighlight={})).create=function(e,t){var n={range:e};return O.number(t)&&(n.kind=t),n},(S=t.SymbolKind||(t.SymbolKind={})).File=1,S.Module=2,S.Namespace=3,S.Package=4,S.Class=5,S.Method=6,S.Property=7,S.Field=8,S.Constructor=9,S.Enum=10,S.Interface=11,S.Function=12,S.Variable=13,S.Constant=14,S.String=15,S.Number=16,S.Boolean=17,S.Array=18,S.Object=19,S.Key=20,S.Null=21,S.EnumMember=22,S.Struct=23,S.Event=24,S.Operator=25,S.TypeParameter=26,(t.SymbolInformation||(t.SymbolInformation={})).create=function(e,t,n,r,i){var s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s},(F=t.CodeActionContext||(t.CodeActionContext={})).create=function(e){return{diagnostics:e}},F.is=function(e){var t=e;return O.defined(t)&&O.typedArray(t.diagnostics,l.is)},(C=t.CodeLens||(t.CodeLens={})).create=function(e,t){var n={range:e};return O.defined(t)&&(n.data=t),n},C.is=function(e){var t=e;return O.defined(t)&&r.is(t.range)&&(O.undefined(t.command)||h.is(t.command))},(T=t.FormattingOptions||(t.FormattingOptions={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},T.is=function(e){var t=e;return O.defined(t)&&O.number(t.tabSize)&&O.boolean(t.insertSpaces)};var P,_,A,D=function(){};t.DocumentLink=D,(P=D=t.DocumentLink||(t.DocumentLink={})).create=function(e,t){return{range:e,target:t}},P.is=function(e){var t=e;return O.defined(t)&&r.is(t.range)&&(O.undefined(t.target)||O.string(t.target))},t.DocumentLink=D,t.EOL=["\n","\r\n","\r"],(_=t.TextDocument||(t.TextDocument={})).create=function(e,t,n,r){return new N(e,t,n,r)},_.is=function(e){var t=e;return!!(O.defined(t)&&O.string(t.uri)&&(O.undefined(t.languageId)||O.string(t.languageId))&&O.number(t.lineCount)&&O.func(t.getText)&&O.func(t.positionAt)&&O.func(t.offsetAt))},_.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,i=t.slice(0,r),s=t.slice(r);e(i,n),e(s,n);for(var o=0,a=0,l=0;o<i.length&&a<s.length;){var c=n(i[o],s[a]);t[l++]=c<=0?i[o++]:s[a++]}for(;o<i.length;)t[l++]=i[o++];for(;a<s.length;)t[l++]=s[a++];return t}(t,function(e,t){return 0==e.range.start.line-t.range.start.line?e.range.start.character-t.range.start.character:0}),i=n.length,s=r.length-1;0<=s;s--){var o=r[s],a=e.offsetAt(o.range.start),l=e.offsetAt(o.range.end);if(!(l<=i))throw new Error("Ovelapping edit");n=n.substring(0,a)+o.newText+n.substring(l,n.length),i=a}return n},(A=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,A.AfterDelay=2,A.FocusOut=3;var O,R,z,N=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&0<t.length&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return o.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var s=n-1;return o.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();R=O||(O={}),z=Object.prototype.toString,R.defined=function(e){return void 0!==e},R.undefined=function(e){return void 0===e},R.boolean=function(e){return!0===e||!1===e},R.string=function(e){return"[object String]"===z.call(e)},R.number=function(e){return"[object Number]"===z.call(e)},R.func=function(e){return"[object Function]"===z.call(e)},R.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}),define("vscode-languageserver-types",["vscode-languageserver-types/main"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-css-languageservice/parser/cssScanner",["require","exports"],e)}(function(e,t){"use strict";var a,n;Object.defineProperty(t,"__esModule",{value:!0}),(n=a=t.TokenType||(t.TokenType={}))[n.Ident=0]="Ident",n[n.AtKeyword=1]="AtKeyword",n[n.String=2]="String",n[n.BadString=3]="BadString",n[n.UnquotedString=4]="UnquotedString",n[n.Hash=5]="Hash",n[n.Num=6]="Num",n[n.Percentage=7]="Percentage",n[n.Dimension=8]="Dimension",n[n.UnicodeRange=9]="UnicodeRange",n[n.CDO=10]="CDO",n[n.CDC=11]="CDC",n[n.Colon=12]="Colon",n[n.SemiColon=13]="SemiColon",n[n.CurlyL=14]="CurlyL",n[n.CurlyR=15]="CurlyR",n[n.ParenthesisL=16]="ParenthesisL",n[n.ParenthesisR=17]="ParenthesisR",n[n.BracketL=18]="BracketL",n[n.BracketR=19]="BracketR",n[n.Whitespace=20]="Whitespace",n[n.Includes=21]="Includes",n[n.Dashmatch=22]="Dashmatch",n[n.SubstringOperator=23]="SubstringOperator",n[n.PrefixOperator=24]="PrefixOperator",n[n.SuffixOperator=25]="SuffixOperator",n[n.Delim=26]="Delim",n[n.EMS=27]="EMS",n[n.EXS=28]="EXS",n[n.Length=29]="Length",n[n.Angle=30]="Angle",n[n.Time=31]="Time",n[n.Freq=32]="Freq",n[n.Exclamation=33]="Exclamation",n[n.Resolution=34]="Resolution",n[n.Comma=35]="Comma",n[n.Charset=36]="Charset",n[n.EscapedJavaScript=37]="EscapedJavaScript",n[n.BadEscapedJavaScript=38]="BadEscapedJavaScript",n[n.Comment=39]="Comment",n[n.SingleLineComment=40]="SingleLineComment",n[n.EOF=41]="EOF",n[n.CustomToken=42]="CustomToken";var r=function(){function e(e){this.source=e,this.len=e.length,this.position=0}return e.prototype.substring=function(e,t){return void 0===t&&(t=this.position),this.source.substring(e,t)},e.prototype.eos=function(){return this.len<=this.position},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.lookbackChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position-e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)},e.prototype.advanceIfChars=function(e){var t;if(this.position+e.length>this.source.length)return!1;for(t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},e.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},e}();t.MultiLineStream=r;var s="a".charCodeAt(0),o="f".charCodeAt(0),i="z".charCodeAt(0),l="A".charCodeAt(0),c="F".charCodeAt(0),h="Z".charCodeAt(0),d="0".charCodeAt(0),p="9".charCodeAt(0),m="~".charCodeAt(0),u="^".charCodeAt(0),f="=".charCodeAt(0),g="|".charCodeAt(0),b="-".charCodeAt(0),y="_".charCodeAt(0),w="%".charCodeAt(0),v="*".charCodeAt(0),x="(".charCodeAt(0),k=")".charCodeAt(0),S="<".charCodeAt(0),F=">".charCodeAt(0),C="@".charCodeAt(0),T="#".charCodeAt(0),E="$".charCodeAt(0),I="\\".charCodeAt(0),P="/".charCodeAt(0),_="\n".charCodeAt(0),A="\r".charCodeAt(0),D="\f".charCodeAt(0),O='"'.charCodeAt(0),R="'".charCodeAt(0),z=" ".charCodeAt(0),N="\t".charCodeAt(0),U=";".charCodeAt(0),M=":".charCodeAt(0),L="{".charCodeAt(0),j="}".charCodeAt(0),V="[".charCodeAt(0),B="]".charCodeAt(0),K=",".charCodeAt(0),q=".".charCodeAt(0),$="!".charCodeAt(0),W={};W[U]=a.SemiColon,W[M]=a.Colon,W[L]=a.CurlyL,W[j]=a.CurlyR,W[B]=a.BracketR,W[V]=a.BracketL,W[x]=a.ParenthesisL,W[k]=a.ParenthesisR,W[K]=a.Comma;var G={};G.em=a.EMS,G.ex=a.EXS,G.px=a.Length,G.cm=a.Length,G.mm=a.Length,G.in=a.Length,G.pt=a.Length,G.pc=a.Length,G.deg=a.Angle,G.rad=a.Angle,G.grad=a.Angle,G.ms=a.Time,G.s=a.Time,G.hz=a.Freq,G.khz=a.Freq,G["%"]=a.Percentage,G.dpi=a.Resolution,G.dpcm=a.Resolution;var H=function(){function e(){this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return e.prototype.setSource=function(e){this.stream=new r(e)},e.prototype.finishToken=function(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}},e.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},e.prototype.pos=function(){return this.stream.pos()},e.prototype.goBackTo=function(e){this.stream.goBackTo(e)},e.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,a.UnquotedString,t.join("")):null},e.prototype.scan=function(){var e=this.trivia();if(null!==e)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,a.EOF):this.scanNext(t)},e.prototype.scanNext=function(e){if(this.stream.advanceIfChars([S,$,b,b]))return this.finishToken(e,a.CDO);if(this.stream.advanceIfChars([b,b,F]))return this.finishToken(e,a.CDC);var t=[];if(this.ident(t))return this.finishToken(e,a.Ident,t.join(""));if(this.stream.advanceIfChar(C)){if(t=["@"],this._name(t)){var n=t.join("");return"@charset"===n?this.finishToken(e,a.Charset,n):this.finishToken(e,a.AtKeyword,n)}return this.finishToken(e,a.Delim)}if(this.stream.advanceIfChar(T))return t=["#"],this._name(t)?this.finishToken(e,a.Hash,t.join("")):this.finishToken(e,a.Delim);if(this.stream.advanceIfChar($))return this.finishToken(e,a.Exclamation);if(this._number()){var r=this.stream.pos();if(t=[this.stream.substring(e,r)],this.stream.advanceIfChar(w))return this.finishToken(e,a.Percentage);if(this.ident(t)){var i=this.stream.substring(r).toLowerCase(),s=G[i];return void 0!==s?this.finishToken(e,s,t.join("")):this.finishToken(e,a.Dimension,t.join(""))}return this.finishToken(e,a.Num)}t=[];var o=this._string(t);return null!==o?this.finishToken(e,o,t.join("")):void 0!==(o=W[this.stream.peekChar()])?(this.stream.advance(1),this.finishToken(e,o)):this.stream.peekChar(0)===m&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,a.Includes)):this.stream.peekChar(0)===g&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,a.Dashmatch)):this.stream.peekChar(0)===v&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,a.SubstringOperator)):this.stream.peekChar(0)===u&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,a.PrefixOperator)):this.stream.peekChar(0)===E&&this.stream.peekChar(1)===f?(this.stream.advance(2),this.finishToken(e,a.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,a.Delim))},e.prototype._matchWordAnyCase=function(n){var r=0;return this.stream.advanceWhileChar(function(e){var t=n[r]===e||n[r+1]===e;return t&&(r+=2),t}),r===n.length||(this.stream.goBack(r/2),!1)},e.prototype.trivia=function(){for(;;){var e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,a.Whitespace)}else{if(!this.comment())return null;if(!this.ignoreComment)return this.finishToken(e,a.Comment)}}},e.prototype.comment=function(){if(this.stream.advanceIfChars([P,v])){var t=!1,n=!1;return this.stream.advanceWhileChar(function(e){return n&&e===P?(t=!0,!1):(n=e===v,!0)}),t&&this.stream.advance(1),!0}return!1},e.prototype._number=function(){var e,t=0;return this.stream.peekChar()===q&&(t=1),e=this.stream.peekChar(t),d<=e&&e<=p&&(this.stream.advance(t+1),this.stream.advanceWhileChar(function(e){return d<=e&&e<=p||0===t&&e===q}),!0)},e.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case A:case D:case _:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===A&&this.stream.advanceIfChar(_)&&e.push("\n"),!0}return!1},e.prototype._escape=function(e,t){var n=this.stream.peekChar();if(n===I){this.stream.advance(1),n=this.stream.peekChar();for(var r=0;r<6&&(d<=n&&n<=p||s<=n&&n<=o||l<=n&&n<=c);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(0<r){try{var i=parseInt(this.stream.substring(this.stream.pos()-r),16);i&&e.push(String.fromCharCode(i))}catch(e){}return n===z||n===N?this.stream.advance(1):this._newline([]),!0}if(n!==A&&n!==D&&n!==_)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1},e.prototype._stringChar=function(e,t){var n=this.stream.peekChar();return 0!==n&&n!==e&&n!==I&&n!==A&&n!==D&&n!==_&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)},e.prototype._string=function(e){if(this.stream.peekChar()===R||this.stream.peekChar()===O){var 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)),a.String):a.BadString}return null},e.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return 0!==t&&t!==I&&t!==R&&t!==O&&t!==x&&t!==k&&t!==z&&t!==N&&t!==_&&t!==D&&t!==A&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},e.prototype._whitespace=function(){return 0<this.stream.advanceWhileChar(function(e){return e===z||e===N||e===_||e===D||e===A})},e.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},e.prototype.ident=function(e){var t=this.stream.pos();if(this._minus(e)&&this._minus(e)){if(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},e.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return(t===y||s<=t&&t<=i||l<=t&&t<=h||128<=t&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._minus=function(e){var t=this.stream.peekChar();return t===b&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._identChar=function(e){var t=this.stream.peekChar();return(t===y||t===b||s<=t&&t<=i||l<=t&&t<=h||d<=t&&t<=p||128<=t&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e}();t.Scanner=H});var __extends=this&&this.__extends||function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-css-languageservice/parser/cssNodes",["require","exports"],e)}(function(e,t){"use strict";var i,n,r;function s(e,t){var n=null;return!e||t<e.offset||t>e.end?null:(e.accept(function(e){return-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0)}),n)}Object.defineProperty(t,"__esModule",{value:!0}),(n=i=t.NodeType||(t.NodeType={}))[n.Undefined=0]="Undefined",n[n.Identifier=1]="Identifier",n[n.Stylesheet=2]="Stylesheet",n[n.Ruleset=3]="Ruleset",n[n.Selector=4]="Selector",n[n.SimpleSelector=5]="SimpleSelector",n[n.SelectorInterpolation=6]="SelectorInterpolation",n[n.SelectorCombinator=7]="SelectorCombinator",n[n.SelectorCombinatorParent=8]="SelectorCombinatorParent",n[n.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",n[n.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",n[n.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",n[n.Page=12]="Page",n[n.PageBoxMarginBox=13]="PageBoxMarginBox",n[n.ClassSelector=14]="ClassSelector",n[n.IdentifierSelector=15]="IdentifierSelector",n[n.ElementNameSelector=16]="ElementNameSelector",n[n.PseudoSelector=17]="PseudoSelector",n[n.AttributeSelector=18]="AttributeSelector",n[n.Declaration=19]="Declaration",n[n.Declarations=20]="Declarations",n[n.Property=21]="Property",n[n.Expression=22]="Expression",n[n.BinaryExpression=23]="BinaryExpression",n[n.Term=24]="Term",n[n.Operator=25]="Operator",n[n.Value=26]="Value",n[n.StringLiteral=27]="StringLiteral",n[n.URILiteral=28]="URILiteral",n[n.EscapedValue=29]="EscapedValue",n[n.Function=30]="Function",n[n.NumericValue=31]="NumericValue",n[n.HexColorValue=32]="HexColorValue",n[n.MixinDeclaration=33]="MixinDeclaration",n[n.MixinReference=34]="MixinReference",n[n.VariableName=35]="VariableName",n[n.VariableDeclaration=36]="VariableDeclaration",n[n.Prio=37]="Prio",n[n.Interpolation=38]="Interpolation",n[n.NestedProperties=39]="NestedProperties",n[n.ExtendsReference=40]="ExtendsReference",n[n.SelectorPlaceholder=41]="SelectorPlaceholder",n[n.Debug=42]="Debug",n[n.If=43]="If",n[n.Else=44]="Else",n[n.For=45]="For",n[n.Each=46]="Each",n[n.While=47]="While",n[n.MixinContent=48]="MixinContent",n[n.Media=49]="Media",n[n.Keyframe=50]="Keyframe",n[n.FontFace=51]="FontFace",n[n.Import=52]="Import",n[n.Namespace=53]="Namespace",n[n.Invocation=54]="Invocation",n[n.FunctionDeclaration=55]="FunctionDeclaration",n[n.ReturnStatement=56]="ReturnStatement",n[n.MediaQuery=57]="MediaQuery",n[n.FunctionParameter=58]="FunctionParameter",n[n.FunctionArgument=59]="FunctionArgument",n[n.KeyframeSelector=60]="KeyframeSelector",n[n.ViewPort=61]="ViewPort",n[n.Document=62]="Document",n[n.AtApplyRule=63]="AtApplyRule",n[n.CustomPropertyDeclaration=64]="CustomPropertyDeclaration",n[n.CustomPropertySet=65]="CustomPropertySet",n[n.ListEntry=66]="ListEntry",n[n.Supports=67]="Supports",n[n.SupportsCondition=68]="SupportsCondition",n[n.NamespacePrefix=69]="NamespacePrefix",n[n.GridLine=70]="GridLine",n[n.Plugin=71]="Plugin",(r=t.ReferenceType||(t.ReferenceType={}))[r.Mixin=0]="Mixin",r[r.Rule=1]="Rule",r[r.Variable=2]="Variable",r[r.Function=3]="Function",r[r.Keyframe=4]="Keyframe",r[r.Unknown=5]="Unknown",t.getNodeAtOffset=s,t.getNodePath=function(e,t){for(var n=s(e,t),r=[];n;)r.unshift(n),n=n.parent;return r},t.getParentDeclaration=function(e){var t=e.findParent(i.Declaration);return t&&t.getValue()&&t.getValue().encloses(e)?t:null};var o=function(){function e(e,t,n){void 0===e&&(e=-1),void 0===t&&(t=-1),this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}return Object.defineProperty(e.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.nodeType||i.Undefined},set:function(e){this.nodeType=e},enumerable:!0,configurable:!0}),e.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},e.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},e.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},e.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},e.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},e.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,n=this.children;t<n.length;t++){n[t].accept(e)}},e.prototype.acceptVisitor=function(e){this.accept(e.visitNode.bind(e))},e.prototype.adoptChild=function(e,t){if(void 0===t&&(t=-1),e.parent&&e.parent.children){var n=e.parent.children.indexOf(e);0<=n&&e.parent.children.splice(n,1)}var r=(e.parent=this).children;return r||(r=this.children=[]),-1!==t?r.splice(t,0,e):r.push(e),e},e.prototype.attachTo=function(e,t){return void 0===t&&(t=-1),e&&e.adoptChild(this,t),this},e.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},e.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},e.prototype.hasIssue=function(t){return this.issues&&this.issues.some(function(e){return e.getRule()===t})},e.prototype.isErroneous=function(e){return void 0===e&&(e=!1),!!(this.issues&&0<this.issues.length)||e&&this.children&&this.children.some(function(e){return e.isErroneous(!0)})},e.prototype.setNode=function(e,t,n){return void 0===n&&(n=-1),!!t&&(t.attachTo(this,n),this[e]=t,!0)},e.prototype.addChild=function(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)},e.prototype.updateOffsetAndLength=function(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset);var t=e.end;(t>this.end||-1===this.length)&&(this.length=t-this.offset)},e.prototype.hasChildren=function(){return this.children&&0<this.children.length},e.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},e.prototype.getChild=function(e){return this.children&&e<this.children.length?this.children[e]:null},e.prototype.addChildren=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addChild(r)}},e.prototype.findFirstChildBeforeOffset=function(e){if(this.children)for(var t=null,n=this.children.length-1;0<=n;n--)if((t=this.children[n]).offset<=e)return t;return null},e.prototype.findChildAtOffset=function(e,t){var n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null},e.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},e.prototype.getParent=function(){for(var e=this.parent;e instanceof a;)e=e.parent;return e},e.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},e.prototype.setData=function(e,t){this.options||(this.options={}),this.options[e]=t},e.prototype.getData=function(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null},e}(),a=function(r){function e(e,t){void 0===t&&(t=-1);var n=r.call(this,-1,-1)||this;return n.attachTo(e,t),n.offset=-1,n.length=-1,n}return __extends(e,r),e}(t.Node=o);t.Nodelist=a;var l=function(r){function e(e,t){var n=r.call(this,e,t)||this;return n.isCustomProperty=!1,n}return __extends(e,r),Object.defineProperty(e.prototype,"type",{get:function(){return i.Identifier},enumerable:!0,configurable:!0}),e.prototype.containsInterpolation=function(){return this.hasChildren()},e}(o);t.Identifier=l;var c=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Stylesheet},enumerable:!0,configurable:!0}),e.prototype.setName=function(e){this.name=e},e}(o);t.Stylesheet=c;var h=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Declarations},enumerable:!0,configurable:!0}),e}(o);t.Declarations=h;var d=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),e.prototype.getDeclarations=function(){return this.declarations},e.prototype.setDeclarations=function(e){return this.setNode("declarations",e)},e}(o),p=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Ruleset},enumerable:!0,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new a(this)),this.selectors},e.prototype.isNested=function(){return this.parent&&null!==this.parent.findParent(i.Declarations)},e}(t.BodyDeclaration=d);t.RuleSet=p;var m=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Selector},enumerable:!0,configurable:!0}),e}(o);t.Selector=m;var u=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.SimpleSelector},enumerable:!0,configurable:!0}),e}(o);t.SimpleSelector=u;var f=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.AtApplyRule},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(o);t.AtApplyRule=f;var g=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),e}(o),b=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.CustomPropertyDeclaration},enumerable:!0,configurable:!0}),e.prototype.setProperty=function(e){return this.setNode("property",e)},e.prototype.getProperty=function(){return this.property},e.prototype.setValue=function(e){return this.setNode("value",e)},e.prototype.getValue=function(){return this.value},e.prototype.setPropertySet=function(e){return this.setNode("propertySet",e)},e.prototype.getPropertySet=function(){return this.propertySet},e}(t.AbstractDeclaration=g);t.CustomPropertyDeclaration=b;var y=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.CustomPropertySet},enumerable:!0,configurable:!0}),e}(d);t.CustomPropertySet=y;var w=function(n){function r(e,t){return n.call(this,e,t)||this}return __extends(r,n),Object.defineProperty(r.prototype,"type",{get:function(){return i.Declaration},enumerable:!0,configurable:!0}),r.prototype.setProperty=function(e){return this.setNode("property",e)},r.prototype.getProperty=function(){return this.property},r.prototype.getFullPropertyName=function(){var e=this.property?this.property.getName():"unknown";if(this.parent instanceof h&&this.parent.getParent()instanceof O){var t=this.parent.getParent().getParent();if(t instanceof r)return t.getFullPropertyName()+e}return e},r.prototype.getNonPrefixedPropertyName=function(){var e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){var t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e},r.prototype.setValue=function(e){return this.setNode("value",e)},r.prototype.getValue=function(){return this.value},r.prototype.setNestedProperties=function(e){return this.setNode("nestedProprties",e)},r.prototype.getNestedProperties=function(){return this.nestedProprties},r}(g);t.Declaration=w;var v=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Property},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.getText()},e.prototype.isCustomProperty=function(){return this.identifier.isCustomProperty},e}(o);t.Property=v;var x=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Invocation},enumerable:!0,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new a(this)),this.arguments},e}(o),k=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Function},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(t.Invocation=x);t.Function=k;var S=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.FunctionParameter},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setDefaultValue=function(e){return this.setNode("defaultValue",e,0)},e.prototype.getDefaultValue=function(){return this.defaultValue},e}(o);t.FunctionParameter=S;var F=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.FunctionArgument},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(e){return this.setNode("value",e,0)},e.prototype.getValue=function(){return this.value},e}(o);t.FunctionArgument=F;var C=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.If},enumerable:!0,configurable:!0}),e.prototype.setExpression=function(e){return this.setNode("expression",e,0)},e.prototype.setElseClause=function(e){return this.setNode("elseClause",e)},e}(d);t.IfStatement=C;var T=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.For},enumerable:!0,configurable:!0}),e.prototype.setVariable=function(e){return this.setNode("variable",e,0)},e}(d);t.ForStatement=T;var E=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Each},enumerable:!0,configurable:!0}),e.prototype.getVariables=function(){return this.variables||(this.variables=new a(this)),this.variables},e}(d);t.EachStatement=E;var I=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.While},enumerable:!0,configurable:!0}),e}(d);t.WhileStatement=I;var P=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Else},enumerable:!0,configurable:!0}),e}(d);t.ElseStatement=P;var _=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.FunctionDeclaration},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new a(this)),this.parameters},e}(d);t.FunctionDeclaration=_;var A=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.ViewPort},enumerable:!0,configurable:!0}),e}(d);t.ViewPort=A;var D=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.FontFace},enumerable:!0,configurable:!0}),e}(d);t.FontFace=D;var O=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.NestedProperties},enumerable:!0,configurable:!0}),e}(d);t.NestedProperties=O;var R=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Keyframe},enumerable:!0,configurable:!0}),e.prototype.setKeyword=function(e){return this.setNode("keyword",e,0)},e.prototype.getKeyword=function(){return this.keyword},e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(d);t.Keyframe=R;var z=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.KeyframeSelector},enumerable:!0,configurable:!0}),e}(d);t.KeyframeSelector=z;var N=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Import},enumerable:!0,configurable:!0}),e.prototype.setMedialist=function(e){return!!e&&(e.attachTo(this),this.medialist=e,!0)},e}(o);t.Import=N;var U=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Namespace},enumerable:!0,configurable:!0}),e}(o);t.Namespace=U;var M=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Media},enumerable:!0,configurable:!0}),e}(d);t.Media=M;var L=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Supports},enumerable:!0,configurable:!0}),e}(d);t.Supports=L;var j=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Document},enumerable:!0,configurable:!0}),e}(d);t.Document=j;var V=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),e.prototype.getMediums=function(){return this.mediums||(this.mediums=new a(this)),this.mediums},e}(o);t.Medialist=V;var B=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.MediaQuery},enumerable:!0,configurable:!0}),e}(o);t.MediaQuery=B;var K=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.SupportsCondition},enumerable:!0,configurable:!0}),e}(o);t.SupportsCondition=K;var q=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Page},enumerable:!0,configurable:!0}),e}(d);t.Page=q;var $=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.PageBoxMarginBox},enumerable:!0,configurable:!0}),e}(d);t.PageBoxMarginBox=$;var W=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Expression},enumerable:!0,configurable:!0}),e}(o);t.Expression=W;var G=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.BinaryExpression},enumerable:!0,configurable:!0}),e.prototype.setLeft=function(e){return this.setNode("left",e)},e.prototype.getLeft=function(){return this.left},e.prototype.setRight=function(e){return this.setNode("right",e)},e.prototype.getRight=function(){return this.right},e.prototype.setOperator=function(e){return this.setNode("operator",e)},e.prototype.getOperator=function(){return this.operator},e}(o);t.BinaryExpression=G;var H=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Term},enumerable:!0,configurable:!0}),e.prototype.setOperator=function(e){return this.setNode("operator",e)},e.prototype.getOperator=function(){return this.operator},e.prototype.setExpression=function(e){return this.setNode("expression",e)},e.prototype.getExpression=function(){return this.expression},e}(o);t.Term=H;var J=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.AttributeSelector},enumerable:!0,configurable:!0}),e.prototype.setExpression=function(e){return this.setNode("expression",e)},e.prototype.getExpression=function(){return this.expression},e.prototype.setNamespacePrefix=function(e){return this.setNode("namespacePrefix",e)},e.prototype.getNamespacePrefix=function(){return this.namespacePrefix},e}(o);t.AttributeSelector=J;var X=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Operator},enumerable:!0,configurable:!0}),e}(o);t.Operator=X;var Y=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.HexColorValue},enumerable:!0,configurable:!0}),e}(o);t.HexColorValue=Y;var Q=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.NumericValue},enumerable:!0,configurable:!0}),e.prototype.getValue=function(){for(var e,t=this.getText(),n=0,r=".".charCodeAt(0),i="0".charCodeAt(0),s="9".charCodeAt(0),o=0,a=t.length;o<a&&(i<=(e=t.charCodeAt(o))&&e<=s||e===r);o++)n+=1;return{value:t.substring(0,n),unit:n<t.length?t.substring(n):void 0}},e}(o);t.NumericValue=Q;var Z=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.VariableDeclaration},enumerable:!0,configurable:!0}),e.prototype.setVariable=function(e){return!!e&&(e.attachTo(this),this.variable=e,!0)},e.prototype.getVariable=function(){return this.variable},e.prototype.getName=function(){return this.variable?this.variable.getName():""},e.prototype.setValue=function(e){return!!e&&(e.attachTo(this),this.value=e,!0)},e.prototype.getValue=function(){return this.value},e}(g);t.VariableDeclaration=Z;var ee=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.Interpolation},enumerable:!0,configurable:!0}),e}(o);t.Interpolation=ee;var te=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.VariableName},enumerable:!0,configurable:!0}),e.prototype.getName=function(){return this.getText()},e}(o);t.Variable=te;var ne=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.ExtendsReference},enumerable:!0,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new a(this)),this.selectors},e}(o);t.ExtendsReference=ne;var re=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.MixinReference},enumerable:!0,configurable:!0}),e.prototype.getNamespaces=function(){return this.namespaces||(this.namespaces=new a(this)),this.namespaces},e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getArguments=function(){return this.arguments||(this.arguments=new a(this)),this.arguments},e.prototype.setContent=function(e){return this.setNode("content",e)},e.prototype.getContent=function(){return this.content},e}(o);t.MixinReference=re;var ie=function(n){function e(e,t){return n.call(this,e,t)||this}return __extends(e,n),Object.defineProperty(e.prototype,"type",{get:function(){return i.MixinDeclaration},enumerable:!0,configurable:!0}),e.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new a(this)),this.parameters},e.prototype.setGuard=function(e){return e&&(e.attachTo(this),this.guard=e),!1},e}(d);t.MixinDeclaration=ie;var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getConditions=function(){return this.conditions||(this.conditions=new a(this)),this.conditions},t}(o);t.LessGuard=se;var oe,ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.setVariable=function(e){return this.setNode("variable",e)},t}(o);t.GuardCondition=ae,(oe=t.Level||(t.Level={}))[oe.Ignore=1]="Ignore",oe[oe.Warning=2]="Warning",oe[oe.Error=4]="Error";var le=function(){function e(e,t,n,r,i,s){void 0===i&&(i=e.offset),void 0===s&&(s=e.length),this.node=e,this.rule=t,this.level=n,this.message=r||t.message,this.offset=i,this.length=s}return e.prototype.getRule=function(){return this.rule},e.prototype.getLevel=function(){return this.level},e.prototype.getOffset=function(){return this.offset},e.prototype.getLength=function(){return this.length},e.prototype.getNode=function(){return this.node},e.prototype.getMessage=function(){return this.message},e}();t.Marker=le;var ce=function(){function n(){this.entries=[]}return n.entries=function(e){var t=new n;return e.acceptVisitor(t),t.entries},n.prototype.visitNode=function(e){return e.isErroneous()&&e.collectIssues(this.entries),!0},n}();t.ParseErrorCollector=ce}),define("vscode-nls/vscode-nls",["require","exports"],function(e,t){"use strict";function n(e,t){for(var n,r,i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];return n=t,0===(r=i).length?n:n.replace(/\{(\d+)\}/g,function(e,t){var n=t[0];return void 0!==r[n]?r[n]:e})}function r(e){return n}Object.defineProperty(t,"__esModule",{value:!0}),t.loadMessageBundle=r,t.config=function(e){return r}}),define("vscode-nls",["vscode-nls/vscode-nls"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-css-languageservice/parser/cssErrors",["require","exports","vscode-nls"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("vscode-nls").loadMessageBundle(),r=function(e,t){this.id=e,this.message=t};t.CSSIssueType=r,t.ParseError={NumberExpected:new r("css-numberexpected",n("expected.number","number expected")),ConditionExpected:new r("css-conditionexpected",n("expected.condt","condition expected")),RuleOrSelectorExpected:new r("css-ruleorselectorexpected",n("expected.ruleorselector","at-rule or selector expected")),DotExpected:new r("css-dotexpected",n("expected.dot","dot expected")),ColonExpected:new r("css-colonexpected",n("expected.colon","colon expected")),SemiColonExpected:new r("css-semicolonexpected",n("expected.semicolon","semi-colon expected")),TermExpected:new r("css-termexpected",n("expected.term","term expected")),ExpressionExpected:new r("css-expressionexpected",n("expected.expression","expression expected")),OperatorExpected:new r("css-operatorexpected",n("expected.operator","operator expected")),IdentifierExpected:new r("css-identifierexpected",n("expected.ident","identifier expected")),PercentageExpected:new r("css-percentageexpected",n("expected.percentage","percentage expected")),URIOrStringExpected:new r("css-uriorstringexpected",n("expected.uriorstring","uri or string expected")),URIExpected:new r