/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * monaco-css version: 3.3.0(ed57760e69ec24098de2b4e49fa5be7f48be019a) * Released under the MIT license * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md *-----------------------------------------------------------------------------*/ define("vs/language/css/workerManager",["require","exports","./fillers/monaco-editor-core"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0;var r=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval((function(){return t._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return t._stopWorker()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&(Date.now()-this._lastUsedTime>12e4&&this._stopWorker())},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=n.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],r=0;rthis.source.length)return!1;for(var t=0;t=d&&e<=p&&(this.stream.advance(t+1),this.stream.advanceWhileChar((function(e){return e>=d&&e<=p||0===t&&e===V})),!0)},e.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case _:case P:case R:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===_&&this.stream.advanceIfChar(R)&&e.push("\n"),!0}return!1},e.prototype._escape=function(e,t){var n=this.stream.peekChar();if(n===F){this.stream.advance(1),n=this.stream.peekChar();for(var r=0;r<6&&(n>=d&&n<=p||n>=i&&n<=o||n>=a&&n<=l);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-r),16);s&&e.push(String.fromCharCode(s))}catch(e){}return n===N||n===M?this.stream.advance(1):this._newline([]),!0}if(n!==_&&n!==P&&n!==R)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!==F&&n!==_&&n!==P&&n!==R&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)},e.prototype._string=function(e){if(this.stream.peekChar()===I||this.stream.peekChar()===z){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)),n.String):n.BadString}return null},e.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return 0!==t&&t!==F&&t!==I&&t!==z&&t!==w&&t!==x&&t!==N&&t!==M&&t!==R&&t!==P&&t!==_&&(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 this.stream.advanceWhileChar((function(e){return e===N||e===M||e===R||e===P||e===_}))>0},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===b||t>=i&&t<=s||t>=a&&t<=c||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._minus=function(e){var t=this.stream.peekChar();return t===g&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._identChar=function(e){var t=this.stream.peekChar();return(t===b||t===g||t>=i&&t<=s||t>=a&&t<=c||t>=d&&t<=p||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e}();t.Scanner=G})),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/utils/strings",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trim=t.getLimitedString=t.difference=t.endsWith=t.startsWith=void 0,t.startsWith=function(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t},t.difference=function(e,t,n){void 0===n&&(n=4);var r=Math.abs(e.length-t.length);if(r>n)return 0;var i,o,s=[],a=[];for(i=0;ie.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)}!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.MixinDeclaration=33]="MixinDeclaration",e[e.MixinReference=34]="MixinReference",e[e.VariableName=35]="VariableName",e[e.VariableDeclaration=36]="VariableDeclaration",e[e.Prio=37]="Prio",e[e.Interpolation=38]="Interpolation",e[e.NestedProperties=39]="NestedProperties",e[e.ExtendsReference=40]="ExtendsReference",e[e.SelectorPlaceholder=41]="SelectorPlaceholder",e[e.Debug=42]="Debug",e[e.If=43]="If",e[e.Else=44]="Else",e[e.For=45]="For",e[e.Each=46]="Each",e[e.While=47]="While",e[e.MixinContentReference=48]="MixinContentReference",e[e.MixinContentDeclaration=49]="MixinContentDeclaration",e[e.Media=50]="Media",e[e.Keyframe=51]="Keyframe",e[e.FontFace=52]="FontFace",e[e.Import=53]="Import",e[e.Namespace=54]="Namespace",e[e.Invocation=55]="Invocation",e[e.FunctionDeclaration=56]="FunctionDeclaration",e[e.ReturnStatement=57]="ReturnStatement",e[e.MediaQuery=58]="MediaQuery",e[e.FunctionParameter=59]="FunctionParameter",e[e.FunctionArgument=60]="FunctionArgument",e[e.KeyframeSelector=61]="KeyframeSelector",e[e.ViewPort=62]="ViewPort",e[e.Document=63]="Document",e[e.AtApplyRule=64]="AtApplyRule",e[e.CustomPropertyDeclaration=65]="CustomPropertyDeclaration",e[e.CustomPropertySet=66]="CustomPropertySet",e[e.ListEntry=67]="ListEntry",e[e.Supports=68]="Supports",e[e.SupportsCondition=69]="SupportsCondition",e[e.NamespacePrefix=70]="NamespacePrefix",e[e.GridLine=71]="GridLine",e[e.Plugin=72]="Plugin",e[e.UnknownAtRule=73]="UnknownAtRule",e[e.Use=74]="Use",e[e.ModuleConfiguration=75]="ModuleConfiguration",e[e.Forward=76]="Forward",e[e.ForwardVisibility=77]="ForwardVisibility",e[e.Module=78]="Module"}(n=t.NodeType||(t.NodeType={})),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"}(t.ReferenceType||(t.ReferenceType={})),t.getNodeAtOffset=i,t.getNodePath=function(e,t){for(var n=i(e,t),r=[];n;)r.unshift(n),n=n.parent;return r},t.getParentDeclaration=function(e){var t=e.findParent(n.Declaration),r=t&&t.getValue();return r&&r.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:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.nodeType||n.Undefined},set:function(e){this.nodeType=e},enumerable:!1,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=0&&e.parent.children.splice(n,1)}e.parent=this;var r=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(e){return Array.isArray(this.issues)&&this.issues.some((function(t){return t.getRule()===e}))},e.prototype.isErroneous=function(e){return void 0===e&&(e=!1),!!(this.issues&&this.issues.length>0)||e&&Array.isArray(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.offsetthis.end||-1===this.length)&&(this.length=t-this.offset)},e.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},e.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},e.prototype.getChild=function(e){return this.children&&e=0;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 s;)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.findAParent=function(){for(var e=[],t=0;t/g,">")}function i(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;var r="";if(!1!==(null==t?void 0:t.documentation)){e.status&&(r+=n(e.status)),r+=e.description;var i=s(e.browsers);i&&(r+="\n("+i+")"),"syntax"in e&&(r+="\n\nSyntax: "+e.syntax)}return e.references&&e.references.length>0&&!1!==(null==t?void 0:t.references)&&(r.length>0&&(r+="\n\n"),r+=e.references.map((function(e){return e.name+": "+e.url})).join(" | ")),r}function o(e,t){if(!e.description||""===e.description)return"";var i="";if(!1!==(null==t?void 0:t.documentation)){e.status&&(i+=n(e.status)),i+=r("string"==typeof e.description?e.description:e.description.value);var o=s(e.browsers);o&&(i+="\n\n("+r(o)+")"),"syntax"in e&&e.syntax&&(i+="\n\nSyntax: "+r(e.syntax))}return e.references&&e.references.length>0&&!1!==(null==t?void 0:t.references)&&(i.length>0&&(i+="\n\n"),i+=e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | ")),i}function s(e){return void 0===e&&(e=[]),0===e.length?null:e.map((function(e){var n="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],o=r[2];return i in t.browserNames&&(n+=t.browserNames[i]),o&&(n+=" "+o),n})).join(", ")}Object.defineProperty(t,"__esModule",{value:!0}),t.getBrowserLabel=t.textToMarkedString=t.getEntryDescription=t.browserNames=void 0,t.browserNames={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"},t.getEntryDescription=function(e,t,n){var r;if(""!==(r=t?{kind:"markdown",value:o(e,n)}:{kind:"plaintext",value:i(e,n)}).value)return r},t.textToMarkedString=r,t.getBrowserLabel=s})),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/languageFacts/colors",["require","exports","../parser/cssNodes","vscode-nls"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColorValue=t.hslFromColor=t.colorFromHSL=t.colorFrom256RGB=t.colorFromHex=t.hexDigit=t.isColorValue=t.isColorConstructor=t.colorKeywords=t.colors=t.colorFunctions=void 0;var n=e("../parser/cssNodes"),r=e("vscode-nls").loadMessageBundle();function i(e,t){var n=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(n){n[2]&&(t=100);var r=parseFloat(n[1])/t;if(r>=0&&r<=1)return r}throw new Error}function o(e){var t=e.getName();return!!t&&/^(rgb|rgba|hsl|hsla)$/gi.test(t)}t.colorFunctions=[{func:"rgb($red, $green, $blue)",desc:r("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:r("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:r("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:r("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],t.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},t.colorKeywords={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},t.isColorConstructor=o,t.isColorValue=function(e){if(e.type===n.NodeType.HexColorValue)return!0;if(e.type===n.NodeType.Function)return o(e);if(e.type===n.NodeType.Identifier){if(e.parent&&e.parent.type!==n.NodeType.Term)return!1;var r=e.getText().toLowerCase();if("none"===r)return!1;if(t.colors[r])return!0}return!1};function s(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function a(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*s(e.charCodeAt(1))/255,green:17*s(e.charCodeAt(2))/255,blue:17*s(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*s(e.charCodeAt(1))/255,green:17*s(e.charCodeAt(2))/255,blue:17*s(e.charCodeAt(3))/255,alpha:17*s(e.charCodeAt(4))/255};case 7:return{red:(16*s(e.charCodeAt(1))+s(e.charCodeAt(2)))/255,green:(16*s(e.charCodeAt(3))+s(e.charCodeAt(4)))/255,blue:(16*s(e.charCodeAt(5))+s(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*s(e.charCodeAt(1))+s(e.charCodeAt(2)))/255,green:(16*s(e.charCodeAt(3))+s(e.charCodeAt(4)))/255,blue:(16*s(e.charCodeAt(5))+s(e.charCodeAt(6)))/255,alpha:(16*s(e.charCodeAt(7))+s(e.charCodeAt(8)))/255}}return null}function l(e,t,n,r){if(void 0===r&&(r=1),0===t)return{red:n,green:n,blue:n,alpha:r};var i=function(e,t,n){for(;n<0;)n+=6;for(;n>=6;)n-=6;return n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e},o=n<=.5?n*(t+1):n+t-n*t,s=2*n-o;return{red:i(s,o,(e/=60)+2),green:i(s,o,e),blue:i(s,o,e-2),alpha:r}}t.hexDigit=s,t.colorFromHex=a,t.colorFrom256RGB=function(e,t,n,r){return void 0===r&&(r=1),{red:e/255,green:t/255,blue:n/255,alpha:r}},t.colorFromHSL=l,t.hslFromColor=function(e){var t=e.red,n=e.green,r=e.blue,i=e.alpha,o=Math.max(t,n,r),s=Math.min(t,n,r),a=0,l=0,c=(s+o)/2,d=o-s;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),o){case t:a=(n-r)/d+(n4)return null;try{var c=4===s.length?i(s[3],1):1;if("rgb"===o||"rgba"===o)return{red:i(s[0],255),green:i(s[1],255),blue:i(s[2],255),alpha:c};if("hsl"===o||"hsla"===o)return l(function(e){var t=e.getText();if(t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/))return parseFloat(t)%360;throw new Error}(s[0]),i(s[1],100),i(s[2],100),c)}catch(e){return null}}else if(e.type===n.NodeType.Identifier){if(e.parent&&e.parent.type!==n.NodeType.Term)return null;var d=e.parent;if(d&&d.parent&&d.parent.type===n.NodeType.BinaryExpression){var p=d.parent;if(p.parent&&p.parent.type===n.NodeType.ListEntry&&p.parent.key===p)return null}var h=e.getText().toLowerCase();if("none"===h)return null;var u=t.colors[h];if(u)return a(u)}return null}})),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/languageFacts/builtinData",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pageBoxDirectives=t.svgElements=t.html5Tags=t.units=t.basicShapeFunctions=t.transitionTimingFunctions=t.imageFunctions=t.cssWideKeywords=t.geometryBoxKeywords=t.boxKeywords=t.lineWidthKeywords=t.lineStyleKeywords=t.repeatStyleKeywords=t.positionKeywords=void 0,t.positionKeywords={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},t.repeatStyleKeywords={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},t.lineStyleKeywords={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},t.lineWidthKeywords=["medium","thick","thin"],t.boxKeywords={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},t.geometryBoxKeywords={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},t.cssWideKeywords={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},t.imageFunctions={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},t.transitionTimingFunctions={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},t.basicShapeFunctions={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},t.units={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},t.html5Tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],t.svgElements=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],t.pageBoxDirectives=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"]}));var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),__exportStar=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,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/languageFacts/facts",["require","exports","./entry","./colors","./builtinData"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),__exportStar(e("./entry"),t),__exportStar(e("./colors"),t),__exportStar(e("./builtinData"),t)})),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/utils/objects",["require","exports"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.values=void 0,t.values=function(e){return Object.keys(e).map((function(t){return e[t]}))},t.isDefined=function(e){return void 0!==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/cssParser",["require","exports","./cssScanner","./cssNodes","./cssErrors","../languageFacts/facts","../utils/objects"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var n=e("./cssScanner"),r=e("./cssNodes"),i=e("./cssErrors"),o=e("../languageFacts/facts"),s=e("../utils/objects"),a=function(){function e(e){void 0===e&&(e=new n.Scanner),this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:n.TokenType.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}return e.prototype.peekIdent=function(e){return n.TokenType.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},e.prototype.peekKeyword=function(e){return n.TokenType.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},e.prototype.peekDelim=function(e){return n.TokenType.Delim===this.token.type&&e===this.token.text},e.prototype.peek=function(e){return e===this.token.type},e.prototype.peekOne=function(e){return-1!==e.indexOf(this.token.type)},e.prototype.peekRegExp=function(e,t){return e===this.token.type&&t.test(this.token.text)},e.prototype.hasWhitespace=function(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset},e.prototype.consumeToken=function(){this.prevToken=this.token,this.token=this.scanner.scan()},e.prototype.mark=function(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}},e.prototype.restoreAtMark=function(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)},e.prototype.try=function(e){var t=this.mark(),n=e();return n||(this.restoreAtMark(t),null)},e.prototype.acceptOneKeyword=function(e){if(n.TokenType.AtKeyword===this.token.type)for(var t=0,r=e;te.offset?o-e.offset:0}return e},e.prototype.markError=function(e,t,n,i){this.token!==this.lastErrorToken&&(e.addIssue(new r.Marker(e,t,r.Level.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||i)&&this.resync(n,i)},e.prototype.parseStylesheet=function(e){var t=e.version,n=e.getText();return this.internalParse(n,this._parseStylesheet,(function(r,i){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(r,i)}))},e.prototype.internalParse=function(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();var r=t.bind(this)();return r&&(r.textProvider=n||function(t,n){return e.substr(t,n)}),r},e.prototype._parseStylesheet=function(){for(var e=this.create(r.Stylesheet);e.addChild(this._parseStylesheetStart()););var t=!1;do{var o=!1;do{o=!1;var s=this._parseStylesheetStatement();for(s&&(e.addChild(s),o=!0,t=!1,this.peek(n.TokenType.EOF)||!this._needsSemicolonAfter(s)||this.accept(n.TokenType.SemiColon)||this.markError(e,i.ParseError.SemiColonExpected));this.accept(n.TokenType.SemiColon)||this.accept(n.TokenType.CDO)||this.accept(n.TokenType.CDC);)o=!0,t=!1}while(o);if(this.peek(n.TokenType.EOF))break;t||(this.peek(n.TokenType.AtKeyword)?this.markError(e,i.ParseError.UnknownAtRule):this.markError(e,i.ParseError.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(n.TokenType.EOF));return this.finish(e)},e.prototype._parseStylesheetStart=function(){return this._parseCharset()},e.prototype._parseStylesheetStatement=function(e){return void 0===e&&(e=!1),this.peek(n.TokenType.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},e.prototype._parseStylesheetAtStatement=function(e){return void 0===e&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},e.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){for(;this.accept(n.TokenType.Comma)&&this._parseSelector(e););if(this.accept(n.TokenType.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},e.prototype._parseRuleset=function(e){void 0===e&&(e=!1);var t=this.create(r.RuleSet),o=t.getSelectors();if(!o.addChild(this._parseSelector(e)))return null;for(;this.accept(n.TokenType.Comma);)if(!o.addChild(this._parseSelector(e)))return this.finish(t,i.ParseError.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseAtApply()||this._parseUnknownAtRule()},e.prototype._parseRuleSetDeclaration=function(){return this.peek(n.TokenType.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},e.prototype._parseAtApply=function(){if(!this.peekKeyword("@apply"))return null;var e=this.create(r.AtApplyRule);return this.consumeToken(),e.setIdentifier(this._parseIdent([r.ReferenceType.Variable]))?this.finish(e):this.finish(e,i.ParseError.IdentifierExpected)},e.prototype._needsSemicolonAfter=function(e){switch(e.type){case r.NodeType.Keyframe:case r.NodeType.ViewPort:case r.NodeType.Media:case r.NodeType.Ruleset:case r.NodeType.Namespace:case r.NodeType.If:case r.NodeType.For:case r.NodeType.Each:case r.NodeType.While:case r.NodeType.MixinDeclaration:case r.NodeType.FunctionDeclaration:case r.NodeType.MixinContentDeclaration:return!1;case r.NodeType.ExtendsReference:case r.NodeType.MixinContentReference:case r.NodeType.ReturnStatement:case r.NodeType.MediaQuery:case r.NodeType.Debug:case r.NodeType.Import:case r.NodeType.AtApplyRule:case r.NodeType.CustomPropertyDeclaration:return!0;case r.NodeType.VariableDeclaration:return e.needsSemicolon;case r.NodeType.MixinReference:return!e.getContent();case r.NodeType.Declaration:return!e.getNestedProperties()}return!1},e.prototype._parseDeclarations=function(e){var t=this.create(r.Declarations);if(!this.accept(n.TokenType.CurlyL))return null;for(var o=e();t.addChild(o)&&!this.peek(n.TokenType.CurlyR);){if(this._needsSemicolonAfter(o)&&!this.accept(n.TokenType.SemiColon))return this.finish(t,i.ParseError.SemiColonExpected,[n.TokenType.SemiColon,n.TokenType.CurlyR]);for(o&&this.prevToken&&this.prevToken.type===n.TokenType.SemiColon&&(o.semicolonPosition=this.prevToken.offset);this.accept(n.TokenType.SemiColon););o=e()}return this.accept(n.TokenType.CurlyR)?this.finish(t):this.finish(t,i.ParseError.RightCurlyExpected,[n.TokenType.CurlyR,n.TokenType.SemiColon])},e.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,i.ParseError.LeftCurlyExpected,[n.TokenType.CurlyR,n.TokenType.SemiColon])},e.prototype._parseSelector=function(e){var t=this.create(r.Selector),n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null},e.prototype._parseDeclaration=function(e){var t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;var o=this.create(r.Declaration);return o.setProperty(this._parseProperty())?this.accept(n.TokenType.Colon)?(this.prevToken&&(o.colonPosition=this.prevToken.offset),o.setValue(this._parseExpr())?(o.addChild(this._parsePrio()),this.peek(n.TokenType.SemiColon)&&(o.semicolonPosition=this.token.offset),this.finish(o)):this.finish(o,i.ParseError.PropertyValueExpected)):this.finish(o,i.ParseError.ColonExpected,[n.TokenType.Colon],e||[n.TokenType.SemiColon]):null},e.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(n.TokenType.Ident,/^--/))return null;var t=this.create(r.CustomPropertyDeclaration);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(n.TokenType.Colon))return this.finish(t,i.ParseError.ColonExpected,[n.TokenType.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);var o=this.mark();if(this.peek(n.TokenType.CurlyL)){var a=this.create(r.CustomPropertySet),l=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(a.setDeclarations(l)&&!l.isErroneous(!0)&&(a.addChild(this._parsePrio()),this.peek(n.TokenType.SemiColon)))return this.finish(a),t.setPropertySet(a),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(o)}var c=this._parseExpr();return c&&!c.isErroneous(!0)&&(this._parsePrio(),this.peekOne(e||[n.TokenType.SemiColon]))?(t.setValue(c),t.semicolonPosition=this.token.offset,this.finish(t)):(this.restoreAtMark(o),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),s.isDefined(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,i.ParseError.PropertyValueExpected):this.finish(t))},e.prototype._parseCustomPropertyValue=function(e){var t=this;void 0===e&&(e=[n.TokenType.CurlyR]);var o=this.create(r.Node),s=function(){return 0===l&&0===c&&0===d},a=function(){return-1!==e.indexOf(t.token.type)},l=0,c=0,d=0;e:for(;;){switch(this.token.type){case n.TokenType.SemiColon:case n.TokenType.Exclamation:if(s())break e;break;case n.TokenType.CurlyL:l++;break;case n.TokenType.CurlyR:if(--l<0){if(a()&&0===c&&0===d)break e;return this.finish(o,i.ParseError.LeftCurlyExpected)}break;case n.TokenType.ParenthesisL:c++;break;case n.TokenType.ParenthesisR:if(--c<0){if(a()&&0===d&&0===l)break e;return this.finish(o,i.ParseError.LeftParenthesisExpected)}break;case n.TokenType.BracketL:d++;break;case n.TokenType.BracketR:if(--d<0)return this.finish(o,i.ParseError.LeftSquareBracketExpected);break;case n.TokenType.BadString:break e;case n.TokenType.EOF:var p=i.ParseError.RightCurlyExpected;return d>0?p=i.ParseError.RightSquareBracketExpected:c>0&&(p=i.ParseError.RightParenthesisExpected),this.finish(o,p)}this.consumeToken()}return this.finish(o)},e.prototype._tryToParseDeclaration=function(e){var t=this.mark();return this._parseProperty()&&this.accept(n.TokenType.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)},e.prototype._parseProperty=function(){var e=this.create(r.Property),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},e.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},e.prototype._parseCharset=function(){if(!this.peek(n.TokenType.Charset))return null;var e=this.create(r.Node);return this.consumeToken(),this.accept(n.TokenType.String)?this.accept(n.TokenType.SemiColon)?this.finish(e):this.finish(e,i.ParseError.SemiColonExpected):this.finish(e,i.ParseError.IdentifierExpected)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(r.Import);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(n.TokenType.SemiColon)||this.peek(n.TokenType.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)):this.finish(e,i.ParseError.URIOrStringExpected)},e.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(r.Namespace);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(n.TokenType.SemiColon)?this.finish(e):this.finish(e,i.ParseError.SemiColonExpected):this.finish(e,i.ParseError.URIExpected,[n.TokenType.SemiColon])},e.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(r.FontFace);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(r.ViewPort);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseKeyframe=function(){if(!this.peekRegExp(n.TokenType.AtKeyword,this.keyframeRegex))return null;var e=this.create(r.Keyframe),t=this.create(r.Node);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,i.ParseError.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,i.ParseError.IdentifierExpected,[n.TokenType.CurlyR])},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([r.ReferenceType.Keyframe])},e.prototype._parseKeyframeSelector=function(){var e=this.create(r.KeyframeSelector);if(!e.addChild(this._parseIdent())&&!this.accept(n.TokenType.Percentage))return null;for(;this.accept(n.TokenType.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(n.TokenType.Percentage))return this.finish(e,i.ParseError.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._tryParseKeyframeSelector=function(){var e=this.create(r.KeyframeSelector),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(n.TokenType.Percentage))return null;for(;this.accept(n.TokenType.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(n.TokenType.Percentage))return this.restoreAtMark(t),null;return this.peek(n.TokenType.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},e.prototype._parseSupports=function(e){if(void 0===e&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create(r.Supports);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},e.prototype._parseSupportsDeclaration=function(e){return void 0===e&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},e.prototype._parseSupportsCondition=function(){var e=this.create(r.SupportsCondition);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(n.TokenType.Ident,/^(and|or)$/i))for(var t=this.token.text.toLowerCase();this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},e.prototype._parseSupportsConditionInParens=function(){var e=this.create(r.SupportsCondition);if(this.accept(n.TokenType.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration([n.TokenType.ParenthesisR]))||this._parseSupportsCondition()?this.accept(n.TokenType.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,i.ParseError.RightParenthesisExpected,[n.TokenType.ParenthesisR],[]):this.finish(e,i.ParseError.ConditionExpected);if(this.peek(n.TokenType.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(n.TokenType.ParenthesisL)){for(var o=1;this.token.type!==n.TokenType.EOF&&0!==o;)this.token.type===n.TokenType.ParenthesisL?o++:this.token.type===n.TokenType.ParenthesisR&&o--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,i.ParseError.LeftParenthesisExpected,[],[n.TokenType.ParenthesisL])},e.prototype._parseMediaDeclaration=function(e){return void 0===e&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},e.prototype._parseMedia=function(e){if(void 0===e&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(r.Media);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,i.ParseError.MediaQueryExpected)},e.prototype._parseMediaQueryList=function(){var e=this.create(r.Medialist);if(!e.addChild(this._parseMediaQuery([n.TokenType.CurlyL])))return this.finish(e,i.ParseError.MediaQueryExpected);for(;this.accept(n.TokenType.Comma);)if(!e.addChild(this._parseMediaQuery([n.TokenType.CurlyL])))return this.finish(e,i.ParseError.MediaQueryExpected);return this.finish(e)},e.prototype._parseMediaQuery=function(e){var t=this.create(r.MediaQuery),o=!0,s=!1;if(!this.peek(n.TokenType.ParenthesisL)){if(this.acceptIdent("only")||this.acceptIdent("not"),!t.addChild(this._parseIdent()))return null;s=!0,o=this.acceptIdent("and")}for(;o;)if(t.addChild(this._parseMediaContentStart()))o=this.acceptIdent("and");else{if(!this.accept(n.TokenType.ParenthesisL))return s?this.finish(t,i.ParseError.LeftParenthesisExpected,[],e):null;if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,i.ParseError.IdentifierExpected,[],e);if(this.accept(n.TokenType.Colon)&&!t.addChild(this._parseExpr()))return this.finish(t,i.ParseError.TermExpected,[],e);if(!this.accept(n.TokenType.ParenthesisR))return this.finish(t,i.ParseError.RightParenthesisExpected,[],e);o=this.acceptIdent("and")}return this.finish(t)},e.prototype._parseMediaContentStart=function(){return null},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()},e.prototype._parseMedium=function(){var e=this.create(r.Node);return e.addChild(this._parseIdent())?this.finish(e):null},e.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},e.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(r.Page);if(this.consumeToken(),e.addChild(this._parsePageSelector()))for(;this.accept(n.TokenType.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,i.ParseError.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))},e.prototype._parsePageMarginBox=function(){if(!this.peek(n.TokenType.AtKeyword))return null;var e=this.create(r.PageBoxMarginBox);return this.acceptOneKeyword(o.pageBoxDirectives)||this.markError(e,i.ParseError.UnknownAtRule,[],[n.TokenType.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parsePageSelector=function(){if(!this.peek(n.TokenType.Ident)&&!this.peek(n.TokenType.Colon))return null;var e=this.create(r.Node);return e.addChild(this._parseIdent()),this.accept(n.TokenType.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,i.ParseError.IdentifierExpected):this.finish(e)},e.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(r.Document);return this.consumeToken(),this.resync([],[n.TokenType.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},e.prototype._parseUnknownAtRule=function(){if(!this.peek(n.TokenType.AtKeyword))return null;var e=this.create(r.UnknownAtRule);e.addChild(this._parseUnknownAtRuleName());var t=0,o=0,s=0,a=0;e:for(;;){switch(this.token.type){case n.TokenType.SemiColon:if(0===o&&0===s&&0===a)break e;break;case n.TokenType.EOF:return o>0?this.finish(e,i.ParseError.RightCurlyExpected):a>0?this.finish(e,i.ParseError.RightSquareBracketExpected):s>0?this.finish(e,i.ParseError.RightParenthesisExpected):this.finish(e);case n.TokenType.CurlyL:t++,o++;break;case n.TokenType.CurlyR:if(o--,t>0&&0===o){if(this.consumeToken(),a>0)return this.finish(e,i.ParseError.RightSquareBracketExpected);if(s>0)return this.finish(e,i.ParseError.RightParenthesisExpected);break e}if(o<0){if(0===s&&0===a)break e;return this.finish(e,i.ParseError.LeftCurlyExpected)}break;case n.TokenType.ParenthesisL:s++;break;case n.TokenType.ParenthesisR:if(--s<0)return this.finish(e,i.ParseError.LeftParenthesisExpected);break;case n.TokenType.BracketL:a++;break;case n.TokenType.BracketR:if(--a<0)return this.finish(e,i.ParseError.LeftSquareBracketExpected)}this.consumeToken()}return e},e.prototype._parseUnknownAtRuleName=function(){var e=this.create(r.Node);return this.accept(n.TokenType.AtKeyword)?this.finish(e):e},e.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(n.TokenType.Dashmatch)||this.peek(n.TokenType.Includes)||this.peek(n.TokenType.SubstringOperator)||this.peek(n.TokenType.PrefixOperator)||this.peek(n.TokenType.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(r.NodeType.Operator);return this.consumeToken(),this.finish(e)}return null},e.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(r.Node);return this.consumeToken(),this.finish(e)},e.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(r.Node);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=r.NodeType.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=r.NodeType.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){e=this.create(r.Node);return this.consumeToken(),e.type=r.NodeType.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){e=this.create(r.Node);return this.consumeToken(),e.type=r.NodeType.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){e=this.create(r.Node);this.consumeToken();t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=r.NodeType.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},e.prototype._parseSimpleSelector=function(){var e=this.create(r.SimpleSelector),t=0;for(e.addChild(this._parseElementName())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},e.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},e.prototype._parseSelectorIdent=function(){return this._parseIdent()},e.prototype._parseHash=function(){if(!this.peek(n.TokenType.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(r.NodeType.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,i.ParseError.IdentifierExpected)}else this.consumeToken();return this.finish(e)},e.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(r.NodeType.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,i.ParseError.IdentifierExpected):this.finish(e)},e.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(r.NodeType.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*")?this.finish(t):(this.restoreAtMark(e),null)},e.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(r.NodeType.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},e.prototype._parseAttrib=function(){if(!this.peek(n.TokenType.BracketL))return null;var e=this.create(r.AttributeSelector);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(n.TokenType.BracketR)?this.finish(e):this.finish(e,i.ParseError.RightSquareBracketExpected)):this.finish(e,i.ParseError.IdentifierExpected)},e.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(n.TokenType.ParenthesisL)){if(t.addChild(this.try((function(){var t=e.create(r.Node);if(!t.addChild(e._parseSelector(!1)))return null;for(;e.accept(n.TokenType.Comma)&&t.addChild(e._parseSelector(!1)););return e.peek(n.TokenType.ParenthesisR)?e.finish(t):null}))||this._parseBinaryExpr()),!this.accept(n.TokenType.ParenthesisR))return this.finish(t,i.ParseError.RightParenthesisExpected)}return this.finish(t)}return null},e.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(n.TokenType.Colon))return null;var e=this.mark(),t=this.createNode(r.NodeType.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(n.TokenType.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,i.ParseError.IdentifierExpected):this.finish(t))},e.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},e.prototype._parsePrio=function(){if(!this.peek(n.TokenType.Exclamation))return null;var e=this.createNode(r.NodeType.Prio);return this.accept(n.TokenType.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},e.prototype._parseExpr=function(e){void 0===e&&(e=!1);var t=this.create(r.Expression);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(n.TokenType.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},e.prototype._parseNamedLine=function(){if(!this.peek(n.TokenType.BracketL))return null;var e=this.createNode(r.NodeType.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(n.TokenType.BracketR)?this.finish(e):this.finish(e,i.ParseError.RightSquareBracketExpected)},e.prototype._parseBinaryExpr=function(e,t){var n=this.create(r.BinaryExpression);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,i.ParseError.TermExpected);n=this.finish(n);var o=this._parseOperator();return o&&(n=this._parseBinaryExpr(n,o)),this.finish(n)},e.prototype._parseTerm=function(){var e=this.create(r.Term);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},e.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},e.prototype._parseOperation=function(){if(!this.peek(n.TokenType.ParenthesisL))return null;var e=this.create(r.Node);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(n.TokenType.ParenthesisR)?this.finish(e):this.finish(e,i.ParseError.RightParenthesisExpected)},e.prototype._parseNumeric=function(){if(this.peek(n.TokenType.Num)||this.peek(n.TokenType.Percentage)||this.peek(n.TokenType.Resolution)||this.peek(n.TokenType.Length)||this.peek(n.TokenType.EMS)||this.peek(n.TokenType.EXS)||this.peek(n.TokenType.Angle)||this.peek(n.TokenType.Time)||this.peek(n.TokenType.Dimension)||this.peek(n.TokenType.Freq)){var e=this.create(r.NumericValue);return this.consumeToken(),this.finish(e)}return null},e.prototype._parseStringLiteral=function(){if(!this.peek(n.TokenType.String)&&!this.peek(n.TokenType.BadString))return null;var e=this.createNode(r.NodeType.StringLiteral);return this.consumeToken(),this.finish(e)},e.prototype._parseURILiteral=function(){if(!this.peekRegExp(n.TokenType.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(r.NodeType.URILiteral);return this.accept(n.TokenType.Ident),this.hasWhitespace()||!this.peek(n.TokenType.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(n.TokenType.ParenthesisR)?this.finish(t):this.finish(t,i.ParseError.RightParenthesisExpected))},e.prototype._parseURLArgument=function(){var e=this.create(r.Node);return this.accept(n.TokenType.String)||this.accept(n.TokenType.BadString)||this.acceptUnquotedString()?this.finish(e):null},e.prototype._parseIdent=function(e){if(!this.peek(n.TokenType.Ident))return null;var t=this.create(r.Identifier);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(n.TokenType.Ident,/^--/),this.consumeToken(),this.finish(t)},e.prototype._parseFunction=function(){var e=this.mark(),t=this.create(r.Function);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(n.TokenType.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(n.TokenType.Comma)&&!this.peek(n.TokenType.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,i.ParseError.ExpressionExpected);return this.accept(n.TokenType.ParenthesisR)?this.finish(t):this.finish(t,i.ParseError.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(!this.peek(n.TokenType.Ident))return null;var e=this.create(r.Identifier);if(e.referenceTypes=[r.ReferenceType.Function],this.acceptIdent("progid")){if(this.accept(n.TokenType.Colon))for(;this.accept(n.TokenType.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},e.prototype._parseFunctionArgument=function(){var e=this.create(r.FunctionArgument);return e.setValue(this._parseExpr(!0))?this.finish(e):null},e.prototype._parseHexColor=function(){if(this.peekRegExp(n.TokenType.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(r.HexColorValue);return this.consumeToken(),this.finish(e)}return null},e}();t.Parser=a})),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/utils/arrays",["require","exports"],e)}((function(e,t){"use strict";function n(e,t){return-1!==e.indexOf(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.union=t.includes=t.findFirst=void 0,t.findFirst=function(e,t){var n=0,r=e.length;if(0===r)return 0;for(;ne+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},e.prototype.findInScope=function(e,t){void 0===t&&(t=0);var n=e+t,i=r.findFirst(this.children,(function(e){return e.offset>n}));if(0===i)return this;var o=this.children[i-1];return o.offset<=e&&o.offset+o.length>=e+t?o.findInScope(e,t):this},e.prototype.addSymbol=function(e){this.symbols.push(e)},e.prototype.getSymbol=function(e,t){for(var n=0;n0&&(i.arguments=n),i},e.is=function(e){var t=e;return E.defined(t)&&E.string(t.title)&&E.string(t.command)}}(c=t.Command||(t.Command={})),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 E.objectLiteral(t)&&E.string(t.newText)&&i.is(t.range)}}(d=t.TextEdit||(t.TextEdit={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return void 0!==t&&E.objectLiteral(t)&&E.string(t.label)&&(E.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(E.string(t.description)||void 0===t.description)}}(p=t.ChangeAnnotation||(t.ChangeAnnotation={})),function(e){e.is=function(e){return"string"==typeof e}}(h=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={})),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 d.is(t)&&(p.is(t.annotationId)||h.is(t.annotationId))}}(u=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return E.defined(t)&&v.is(t.textDocument)&&Array.isArray(t.edits)}}(m=t.TextDocumentEdit||(t.TextDocumentEdit={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&E.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||E.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||E.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||h.is(t.annotationId))}}(f=t.CreateFile||(t.CreateFile={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&E.string(t.oldUri)&&E.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||E.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||E.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||h.is(t.annotationId))}}(g=t.RenameFile||(t.RenameFile={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&E.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||E.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||E.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||h.is(t.annotationId))}}(b=t.DeleteFile||(t.DeleteFile={})),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 E.string(e.kind)?f.is(e)||g.is(e)||b.is(e):m.is(e)})))}}(y=t.WorkspaceEdit||(t.WorkspaceEdit={}));var v,w,x,S,k=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=d.insert(e,t):h.is(n)?(i=n,r=u.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=u.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=d.replace(e,t):h.is(n)?(i=n,r=u.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=u.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=d.del(e):h.is(t)?(r=t,n=u.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=u.del(e,r)),this.edits.push(n),void 0!==r)return r},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}(),C=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(h.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),T=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new C(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(m.is(e)){var n=new k(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new k(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}return 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(v.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new k(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===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 k(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new C,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 r,i,o;if(p.is(t)||h.is(t)?r=t:n=t,void 0===r?i=f.create(e,n):(o=h.is(r)?r:this._changeAnnotations.manage(r),i=f.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(p.is(n)||h.is(n)?i=n:r=n,void 0===i?o=g.create(e,t,r):(s=h.is(i)?i:this._changeAnnotations.manage(i),o=g.create(e,t,r,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 r,i,o;if(p.is(t)||h.is(t)?r=t:n=t,void 0===r?i=b.create(e,n):(o=h.is(r)?r:this._changeAnnotations.manage(r),i=b.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e}();t.WorkspaceChange=T,function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return E.defined(t)&&E.string(t.uri)}}(t.TextDocumentIdentifier||(t.TextDocumentIdentifier={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return E.defined(t)&&E.string(t.uri)&&E.integer(t.version)}}(t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return E.defined(t)&&E.string(t.uri)&&(null===t.version||E.integer(t.version))}}(v=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return E.defined(t)&&E.string(t.uri)&&E.string(t.languageId)&&E.integer(t.version)&&E.string(t.text)}}(t.TextDocumentItem||(t.TextDocumentItem={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(w=t.MarkupKind||(t.MarkupKind={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(w=t.MarkupKind||(t.MarkupKind={})),function(e){e.is=function(e){var t=e;return E.objectLiteral(e)&&w.is(t.kind)&&E.string(t.value)}}(x=t.MarkupContent||(t.MarkupContent={})),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}(t.CompletionItemKind||(t.CompletionItemKind={})),function(e){e.PlainText=1,e.Snippet=2}(t.InsertTextFormat||(t.InsertTextFormat={})),function(e){e.Deprecated=1}(t.CompletionItemTag||(t.CompletionItemTag={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&E.string(t.newText)&&i.is(t.insert)&&i.is(t.replace)}}(t.InsertReplaceEdit||(t.InsertReplaceEdit={})),function(e){e.asIs=1,e.adjustIndentation=2}(t.InsertTextMode||(t.InsertTextMode={})),function(e){e.create=function(e){return{label:e}}}(t.CompletionItem||(t.CompletionItem={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(t.CompletionList||(t.CompletionList={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return E.string(t)||E.objectLiteral(t)&&E.string(t.language)&&E.string(t.value)}}(S=t.MarkedString||(t.MarkedString={})),function(e){e.is=function(e){var t=e;return!!t&&E.objectLiteral(t)&&(x.is(t.contents)||S.is(t.contents)||E.typedArray(t.contents,S.is))&&(void 0===e.range||i.is(e.range))}}(t.Hover||(t.Hover={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(t.ParameterInformation||(t.ParameterInformation={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;s--){var a=i[s],l=e.offsetAt(a.range.start),c=e.offsetAt(a.range.end);if(!(c<=o))throw new Error("Overlapping edit");r=r.substring(0,l)+a.newText+r.substring(c,r.length),o=l}return r}}(t.TextDocument||(t.TextDocument={}));var E,F=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,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=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&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,i=t.length;if(0===i)return r.create(0,e);for(;ne?i=o:n=o+1}var s=n-1;return r.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+1e?r=i:n=i+1}var o=n-1;return{line:o,character:e-t[o]}},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+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function s(e){var t=o(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,r,i){return new n(e,t,r,i)},e.update=function(e,t,r){if(e instanceof n)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),i=0,o=[],a=0,l=r(t.map(s),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));ai&&o.push(n.substring(i,d)),c.newText.length&&o.push(c.newText),i=e.offsetAt(c.range.end)}return o.push(n.substr(i)),o.join("")}}(t.TextDocument||(t.TextDocument={}))})),define("vscode-languageserver-textdocument",["vscode-languageserver-textdocument/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/cssLanguageTypes",["require","exports","vscode-languageserver-types","vscode-languageserver-textdocument"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.ClientCapabilities=t.DocumentHighlightKind=t.VersionedTextDocumentIdentifier=t.TextDocumentEdit=t.CodeActionKind=t.TextEdit=t.WorkspaceEdit=t.DocumentLink=t.DocumentHighlight=t.CodeAction=t.Command=t.CodeActionContext=t.MarkedString=t.Hover=t.Location=t.DocumentSymbol=t.SymbolKind=t.SymbolInformation=t.InsertTextFormat=t.CompletionItemTag=t.CompletionList=t.CompletionItemKind=t.CompletionItem=t.DiagnosticSeverity=t.Diagnostic=t.SelectionRange=t.FoldingRangeKind=t.FoldingRange=t.ColorPresentation=t.ColorInformation=t.Color=t.MarkupKind=t.MarkupContent=t.Position=t.Range=t.TextDocument=void 0;var n=e("vscode-languageserver-types");Object.defineProperty(t,"Range",{enumerable:!0,get:function(){return n.Range}}),Object.defineProperty(t,"Position",{enumerable:!0,get:function(){return n.Position}}),Object.defineProperty(t,"MarkupContent",{enumerable:!0,get:function(){return n.MarkupContent}}),Object.defineProperty(t,"MarkupKind",{enumerable:!0,get:function(){return n.MarkupKind}}),Object.defineProperty(t,"Color",{enumerable:!0,get:function(){return n.Color}}),Object.defineProperty(t,"ColorInformation",{enumerable:!0,get:function(){return n.ColorInformation}}),Object.defineProperty(t,"ColorPresentation",{enumerable:!0,get:function(){return n.ColorPresentation}}),Object.defineProperty(t,"FoldingRange",{enumerable:!0,get:function(){return n.FoldingRange}}),Object.defineProperty(t,"FoldingRangeKind",{enumerable:!0,get:function(){return n.FoldingRangeKind}}),Object.defineProperty(t,"SelectionRange",{enumerable:!0,get:function(){return n.SelectionRange}}),Object.defineProperty(t,"Diagnostic",{enumerable:!0,get:function(){return n.Diagnostic}}),Object.defineProperty(t,"DiagnosticSeverity",{enumerable:!0,get:function(){return n.DiagnosticSeverity}}),Object.defineProperty(t,"CompletionItem",{enumerable:!0,get:function(){return n.CompletionItem}}),Object.defineProperty(t,"CompletionItemKind",{enumerable:!0,get:function(){return n.CompletionItemKind}}),Object.defineProperty(t,"CompletionList",{enumerable:!0,get:function(){return n.CompletionList}}),Object.defineProperty(t,"CompletionItemTag",{enumerable:!0,get:function(){return n.CompletionItemTag}}),Object.defineProperty(t,"InsertTextFormat",{enumerable:!0,get:function(){return n.InsertTextFormat}}),Object.defineProperty(t,"SymbolInformation",{enumerable:!0,get:function(){return n.SymbolInformation}}),Object.defineProperty(t,"SymbolKind",{enumerable:!0,get:function(){return n.SymbolKind}}),Object.defineProperty(t,"DocumentSymbol",{enumerable:!0,get:function(){return n.DocumentSymbol}}),Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return n.Location}}),Object.defineProperty(t,"Hover",{enumerable:!0,get:function(){return n.Hover}}),Object.defineProperty(t,"MarkedString",{enumerable:!0,get:function(){return n.MarkedString}}),Object.defineProperty(t,"CodeActionContext",{enumerable:!0,get:function(){return n.CodeActionContext}}),Object.defineProperty(t,"Command",{enumerable:!0,get:function(){return n.Command}}),Object.defineProperty(t,"CodeAction",{enumerable:!0,get:function(){return n.CodeAction}}),Object.defineProperty(t,"DocumentHighlight",{enumerable:!0,get:function(){return n.DocumentHighlight}}),Object.defineProperty(t,"DocumentLink",{enumerable:!0,get:function(){return n.DocumentLink}}),Object.defineProperty(t,"WorkspaceEdit",{enumerable:!0,get:function(){return n.WorkspaceEdit}}),Object.defineProperty(t,"TextEdit",{enumerable:!0,get:function(){return n.TextEdit}}),Object.defineProperty(t,"CodeActionKind",{enumerable:!0,get:function(){return n.CodeActionKind}}),Object.defineProperty(t,"TextDocumentEdit",{enumerable:!0,get:function(){return n.TextDocumentEdit}}),Object.defineProperty(t,"VersionedTextDocumentIdentifier",{enumerable:!0,get:function(){return n.VersionedTextDocumentIdentifier}}),Object.defineProperty(t,"DocumentHighlightKind",{enumerable:!0,get:function(){return n.DocumentHighlightKind}});var r=e("vscode-languageserver-textdocument");Object.defineProperty(t,"TextDocument",{enumerable:!0,get:function(){return r.TextDocument}}),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[n.MarkupKind.Markdown,n.MarkupKind.PlainText]}},hover:{contentFormat:[n.MarkupKind.Markdown,n.MarkupKind.PlainText]}}}}(t.ClientCapabilities||(t.ClientCapabilities={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={}))})),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("vscode-uri/index",[],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(function(){return(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),o=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,i=47===s.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(a+p))return n.slice(a+p+1);if(0===p)return n.slice(a+p)}else s>c&&(47===e.charCodeAt(i+p)?d=p:0===p&&(d=0));break}var h=e.charCodeAt(i+p);if(h!==n.charCodeAt(a+p))break;47===h&&(d=p)}var u="";for(p=i+d+1;p<=o;++p)p!==o&&47!==e.charCodeAt(p)||(0===u.length?u+="..":u+="/..");return u.length>0?u+n.slice(a+d):(a+=d,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,o=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!s){i=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){i=r+1;break}}else-1===o&&(s=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(o=!1,i=a+1),46===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!o){r=a+1;break}}return-1===n||-1===i||0===s||1===s&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),o=47===i;o?(n.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,c=!0,d=e.length-1,p=0;d>=r;--d)if(47!==(i=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===i?-1===s?s=d:1!==p&&(p=1):-1!==s&&(p=-1);else if(!c){a=d+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===a+1?-1!==l&&(n.base=n.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(a,s),n.base=e.slice(a,l)),n.ext=e.slice(s,l)),a>0?n.dir=e.slice(0,a-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},465:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;var r=n(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return r.URI}});var i=n(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})},674:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows="win32"===process.platform;else if("object"==typeof navigator){var n=navigator.userAgent;t.isWindows=n.indexOf("Windows")>=0}},796:function(e,t,n){var r,i,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;var s=n(674),a=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//,d="",p="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,u=function(){function e(e,t,n,r,i,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,n||d),this.query=r||d,this.fragment=i||d,function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return v(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===r?r=this.path:null===r&&(r=d),void 0===i?i=this.query:null===i&&(i=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new f(t,n,r,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=h.exec(e);return n?new f(n[2]||d,k(n[4]||d),k(n[5]||d),k(n[7]||d),k(n[9]||d),t):new f(d,d,d,d,d)},e.file=function(e){var t=d;if(s.isWindows&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){var n=e.indexOf(p,2);-1===n?(t=e.substring(2),e=p):(t=e.substring(2,n),e=e.substring(n)||p)}return new f("file",t,e,d,d)},e.from=function(e){return new f(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),w(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new f(t);return n._formatted=t.external,n._fsPath=t._sep===m?t.fsPath:null,n}return t},e}();t.URI=u;var m=s.isWindows?1:void 0,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return o(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(u),g=((i={})[58]="%3A",i[47]="%2F",i[63]="%3F",i[35]="%23",i[91]="%5B",i[93]="%5D",i[64]="%40",i[33]="%21",i[36]="%24",i[38]="%26",i[39]="%27",i[40]="%28",i[41]="%29",i[42]="%2A",i[43]="%2B",i[44]="%2C",i[59]="%3B",i[61]="%3D",i[32]="%20",i);function b(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=g[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function y(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s.isWindows&&(n=n.replace(/\//g,"\\")),n}function w(e,t){var n=t?y:b,r="",i=e.scheme,o=e.authority,s=e.path,a=e.query,l=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=p,r+=p),o){var c=o.indexOf("@");if(-1!==c){var d=o.substr(0,c);o=o.substr(c+1),-1===(c=d.indexOf(":"))?r+=n(d,!1):(r+=n(d.substr(0,c),!1),r+=":",r+=n(d.substr(c+1),!1)),r+="@"}-1===(c=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(h=s.charCodeAt(1))>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var h;(h=s.charCodeAt(0))>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),l&&(r+="#",r+=t?l:b(l,!1)),r}function x(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+x(e.substr(3)):e}}t.uriToFsPath=v;var S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(S)?e.replace(S,(function(e){return x(e)})):e}},679:function(e,t,n){var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=a.Range.create(a.Position.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=i;try{var o={isIncomplete:!1,items:[]};this.nodePath=r.getNodePath(this.styleSheet,this.offset);for(var s=this.nodePath.length-1;s>=0;s--){var l=this.nodePath[s];if(l instanceof r.Property)this.getCompletionsForDeclarationProperty(l.getParent(),o);else if(l instanceof r.Expression)l.parent instanceof r.Interpolation?this.getVariableProposals(null,o):this.getCompletionsForExpression(l,o);else if(l instanceof r.SimpleSelector){var c=l.findAParent(r.NodeType.ExtendsReference,r.NodeType.Ruleset);if(c)if(c.type===r.NodeType.ExtendsReference)this.getCompletionsForExtendsReference(c,l,o);else{var d=c;this.getCompletionsForSelector(d,d&&d.isNested(),o)}}else if(l instanceof r.FunctionArgument)this.getCompletionsForFunctionArgument(l,l.getParent(),o);else if(l instanceof r.Declarations)this.getCompletionsForDeclarations(l,o);else if(l instanceof r.VariableDeclaration)this.getCompletionsForVariableDeclaration(l,o);else if(l instanceof r.RuleSet)this.getCompletionsForRuleSet(l,o);else if(l instanceof r.Interpolation)this.getCompletionsForInterpolation(l,o);else if(l instanceof r.FunctionDeclaration)this.getCompletionsForFunctionDeclaration(l,o);else if(l instanceof r.MixinReference)this.getCompletionsForMixinReference(l,o);else if(l instanceof r.Function)this.getCompletionsForFunctionArgument(null,l,o);else if(l instanceof r.Supports)this.getCompletionsForSupports(l,o);else if(l instanceof r.SupportsCondition)this.getCompletionsForSupportsCondition(l,o);else if(l instanceof r.ExtendsReference)this.getCompletionsForExtendsReference(l,null,o);else if(l.type===r.NodeType.URILiteral)this.getCompletionForUriLiteralValue(l,o);else if(null===l.parent)this.getCompletionForTopLevel(o);else{if(l.type!==r.NodeType.StringLiteral||!this.isImportPathParent(l.parent.type))continue;this.getCompletionForImportPath(l,o)}if(o.items.length>0||this.offset>l.offset)return this.finalize(o)}return this.getCompletionsForStylesheet(o),0===o.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,o),this.finalize(o)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},e.prototype.isImportPathParent=function(e){return e===r.NodeType.Import},e.prototype.finalize=function(e){return e},e.prototype.findInNodePath=function(){for(var e=[],t=0;t=0;n--){var r=this.nodePath[n];if(-1!==e.indexOf(r.type))return r}return null},e.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},e.prototype.getPropertyProposals=function(e,t){var r=this,i=this.isTriggerPropertyValueCompletionEnabled,l=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach((function(d){var p,h,u=!1;e?(p=r.getCompletionRange(e.getProperty()),h=d.name,c.isDefined(e.colonPosition)||(h+=": ",u=!0)):(p=r.getCompletionRange(null),h=d.name+": ",u=!0),!e&&l&&(h+="$0;"),e&&!e.semicolonPosition&&l&&r.offset>=r.textDocument.offsetAt(p.end)&&(h+="$0;");var f={label:d.name,documentation:o.getEntryDescription(d,r.doesSupportMarkdown()),tags:m(d)?[a.CompletionItemTag.Deprecated]:[],textEdit:a.TextEdit.replace(p,h),insertTextFormat:a.InsertTextFormat.Snippet,kind:a.CompletionItemKind.Property};d.restrictions||(u=!1),i&&u&&(f.command={title:"Suggest",command:"editor.action.triggerSuggest"});var g=(255-("number"==typeof d.relevance?Math.min(Math.max(d.relevance,0),99):50)).toString(16),b=s.startsWith(d.name,"-")?n.VendorPrefixed:n.Normal;f.sortText=b+"_"+g,t.items.push(f)})),this.completionParticipants.forEach((function(e){e.onCssProperty&&e.onCssProperty({propertyName:r.currentWord,range:r.defaultReplaceRange})})),t},Object.defineProperty(e.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,t;return null===(t=null===(e=this.documentSettings)||void 0===e?void 0:e.triggerPropertyValueCompletion)||void 0===t||t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,t;return null===(t=null===(e=this.documentSettings)||void 0===e?void 0:e.completePropertyWithSemicolon)||void 0===t||t},enumerable:!1,configurable:!0}),e.prototype.getCompletionsForDeclarationValue=function(e,t){for(var n=this,i=e.getFullPropertyName(),o=this.cssDataManager.getProperty(i),s=e.getValue()||null;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach((function(e){e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:i,propertyValue:n.currentWord,range:n.getCompletionRange(s)})})),o){if(o.restrictions)for(var l=0,c=o.restrictions;l=e.offset+2&&this.getVariableProposals(null,t),t},e.prototype.getVariableProposals=function(e,t){for(var i=0,o=this.getSymbolContext().findSymbolsAtOffset(this.offset,r.ReferenceType.Variable);i0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],n.isIncomplete=i.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===r.NodeType.Term&&(t=t.getParent()),e.restrictions)for(var l=0,c=e.restrictions;l=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},e.prototype.getCompletionsForSelector=function(e,t,i){var l=this,c=this.findInNodePath(r.NodeType.PseudoSelector,r.NodeType.IdentifierSelector,r.NodeType.ClassSelector,r.NodeType.ElementNameSelector);if(!c&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=a.Range.create(a.Position.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach((function(e){var t=g(e.name),r={label:e.name,textEdit:a.TextEdit.replace(l.getCompletionRange(c),t),documentation:o.getEntryDescription(e,l.doesSupportMarkdown()),tags:m(e)?[a.CompletionItemTag.Deprecated]:[],kind:a.CompletionItemKind.Function,insertTextFormat:e.name!==t?h:void 0};s.startsWith(e.name,":-")&&(r.sortText=n.VendorPrefixed),i.items.push(r)})),this.cssDataManager.getPseudoElements().forEach((function(e){var t=g(e.name),r={label:e.name,textEdit:a.TextEdit.replace(l.getCompletionRange(c),t),documentation:o.getEntryDescription(e,l.doesSupportMarkdown()),tags:m(e)?[a.CompletionItemTag.Deprecated]:[],kind:a.CompletionItemKind.Function,insertTextFormat:e.name!==t?h:void 0};s.startsWith(e.name,"::-")&&(r.sortText=n.VendorPrefixed),i.items.push(r)})),!t){for(var d=0,p=o.html5Tags;d0){var t=v.substr(e.offset,e.length);return"."!==t.charAt(0)||y[t]||(y[t]=!0,i.items.push({label:t,textEdit:a.TextEdit.replace(l.getCompletionRange(c),t),kind:a.CompletionItemKind.Keyword})),!1}return!0})),e&&e.isNested()){var w=e.getSelectors().findFirstChildBeforeOffset(this.offset);w&&0===e.getSelectors().getChildren().indexOf(w)&&this.getPropertyProposals(null,i)}return i},e.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof r.AbstractDeclaration){var i=n;if(!c.isDefined(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,t);if(c.isDefined(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),t),t},e.prototype.getCompletionsForExpression=function(e,t){var n=e.getParent();if(n instanceof r.FunctionArgument)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;var i=e.findParent(r.NodeType.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;var o=e.findChildAtOffset(this.offset,!0);return o?o instanceof r.NumericValue||o instanceof r.Identifier?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)},e.prototype.getCompletionsForFunctionArgument=function(e,t,n){var r=t.getIdentifier();return r&&r.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n},e.prototype.getCompletionsForFunctionDeclaration=function(e,t){var n=e.getDeclarations();return n&&this.offset>n.offset&&this.offsete.lParent&&(!c.isDefined(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},e.prototype.getCompletionsForSupports=function(e,t){var n=e.getDeclarations();if(!n||this.offset<=n.offset){var i=e.findFirstChildBeforeOffset(this.offset);return i instanceof r.SupportsCondition?this.getCompletionsForSupportsCondition(i,t):t}return this.getCompletionForTopLevel(t)},e.prototype.getCompletionsForExtendsReference=function(e,t,n){return n},e.prototype.getCompletionForUriLiteralValue=function(e,t){var n,r,i;if(e.hasChildren()){var o=e.getChild(0);n=o.getText(),r=this.position,i=this.getCompletionRange(o)}else{n="",r=this.position;var s=this.textDocument.positionAt(e.offset+"url(".length);i=a.Range.create(s,s)}return this.completionParticipants.forEach((function(e){e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})})),t},e.prototype.getCompletionForImportPath=function(e,t){var n=this;return this.completionParticipants.forEach((function(t){t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:n.position,range:n.getCompletionRange(e)})})),t},e.prototype.hasCharacterAtPosition=function(e,t){var n=this.textDocument.getText();return e>=0&&e"),this.writeLine(t,r.join(""))}},e}();!function(e){function t(e){var t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,n){return n+t(e)+n},e.remove=t}(l||(l={}));var d=function(){this.id=0,this.attr=0,this.tag=0};function p(e,t){for(var r=new o,i=0,s=e.getChildren();i1){var p=t.cloneWithParent();r.addChild(p.findRoot()),r=p}r.append(c[d])}}break;case n.NodeType.SelectorPlaceholder:if(a.matches("@at-root"))return r;case n.NodeType.ElementNameSelector:var u=a.getText();r.addAttr("name","*"===u?"element":h(u));break;case n.NodeType.ClassSelector:r.addAttr("class",h(a.getText().substring(1)));break;case n.NodeType.IdentifierSelector:r.addAttr("id",h(a.getText().substring(1)));break;case n.NodeType.MixinDeclaration:r.addAttr("class",a.getName());break;case n.NodeType.PseudoSelector:r.addAttr(h(a.getText()),"");break;case n.NodeType.AttributeSelector:var m=a,f=m.getIdentifier();if(f){var g=m.getValue(),b=m.getOperator(),y=void 0;if(g&&b)switch(h(b.getText())){case"|=":y=l.remove(h(g.getText()))+"-…";break;case"^=":y=l.remove(h(g.getText()))+"…";break;case"$=":y="…"+l.remove(h(g.getText()));break;case"~=":y=" … "+l.remove(h(g.getText()))+" … ";break;case"*=":y="…"+l.remove(h(g.getText()))+"…";break;default:y=l.remove(h(g.getText()))}r.addAttr(h(f.getText()),y)}}}return r}function h(e){var t=new r.Scanner;t.setSource(e);var n=t.scanUnquotedString();return n?n.text:e}t.toElement=p;var u=function(){function e(e){this.cssDataManager=e}return e.prototype.selectorToMarkedString=function(e){var t=g(e);if(t){var n=new c('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}return[]},e.prototype.simpleSelectorToMarkedString=function(e){var t=p(e),n=new c('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n},e.prototype.isPseudoElementIdentifier=function(e){var t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])},e.prototype.selectorToSpecificityMarkedString=function(e){var t=this,r=function(e){for(var i=0,s=e.getChildren();i0&&r(a)}},o=new d;return r(e),i("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",o.id,o.attr,o.tag)},e}();t.SelectorPrinting=u;var m=function(){function e(e){this.prev=null,this.element=e}return e.prototype.processSelector=function(e){var t=null;if(!(this.element instanceof s)&&e.getChildren().some((function(e){return e.hasChildren()&&e.getChild(0).type===n.NodeType.SelectorCombinator}))){var r=this.element.findRoot();r.parent instanceof s&&(t=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(var i=0,o=e.getChildren();i=0;l--){var c=r[l].getSelectors().getChild(0);c&&a.processSelector(c)}return a.processSelector(e),t}t.selectorToElement=g})),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/services/cssHover",["require","exports","../parser/cssNodes","../languageFacts/facts","./selectorPrinting","../utils/strings","../cssLanguageTypes","../utils/objects"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CSSHover=void 0;var n=e("../parser/cssNodes"),r=e("../languageFacts/facts"),i=e("./selectorPrinting"),o=e("../utils/strings"),s=e("../cssLanguageTypes"),a=e("../utils/objects"),l=function(){function e(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new i.SelectorPrinting(t)}return e.prototype.configure=function(e){this.defaultSettings=e},e.prototype.doHover=function(e,t,i,a){function l(t){return s.Range.create(e.positionAt(t.offset),e.positionAt(t.end))}void 0===a&&(a=this.defaultSettings);for(var c=e.offsetAt(t),d=n.getNodePath(i,c),p=null,h=0;h0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=a.length/2&&l.push({property:e.name,score:t})})),l.sort((function(e,t){return t.score-e.score||e.property.localeCompare(t.property)}));for(var c=3,d=0,p=l;d=0;c--){var d=l[c];if(d instanceof n.Declaration){var p=d.getProperty();if(p&&p.offset===s&&p.end===a)return void this.getFixesForUnknownProperty(e,p,r,o)}}},e}();t.CSSCodeActions=a})),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/services/lintUtil",["require","exports","../utils/arrays"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Element=void 0;var n=e("../utils/arrays"),r=function(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e};function i(e,t,r,i){var o=e[t];o.value=r,r&&(n.includes(o.properties,i)||o.properties.push(i))}function o(e,t,n,r){"top"===t||"right"===t||"bottom"===t||"left"===t?i(e,t,n,r):function(e,t,n){i(e,"top",t,n),i(e,"right",t,n),i(e,"bottom",t,n),i(e,"left",t,n)}(e,n,r)}function s(e,t,n){switch(t.length){case 1:o(e,void 0,t[0],n);break;case 2:o(e,"top",t[0],n),o(e,"bottom",t[0],n),o(e,"right",t[1],n),o(e,"left",t[1],n);break;case 3:o(e,"top",t[0],n),o(e,"right",t[1],n),o(e,"left",t[1],n),o(e,"bottom",t[2],n);break;case 4:o(e,"top",t[0],n),o(e,"right",t[1],n),o(e,"bottom",t[2],n),o(e,"left",t[3],n)}}function a(e,t){for(var n=0,r=t;n0)for(var w=this.fetch(r,"float"),x=0;x0)for(w=this.fetch(r,"vertical-align"),x=0;x1)for(var D=0;D".charCodeAt(0),m=".".charCodeAt(0),f=("@".charCodeAt(0),n.TokenType.CustomToken);t.VariableName=f++,t.InterpolationFunction=f++,t.Default=f++,t.EqualsOperator=f++,t.NotEqualsOperator=f++,t.GreaterEqualsOperator=f++,t.SmallerEqualsOperator=f++,t.Ellipsis=f++,t.Module=f++;var g=function(e){function f(){return null!==e&&e.apply(this,arguments)||this}return __extends(f,e),f.prototype.scanNext=function(r){if(this.stream.advanceIfChar(a)){var i=["$"];if(this.ident(i))return this.finishToken(r,t.VariableName,i.join(""));this.stream.goBackTo(r)}return this.stream.advanceIfChars([l,c])?this.finishToken(r,t.InterpolationFunction):this.stream.advanceIfChars([d,d])?this.finishToken(r,t.EqualsOperator):this.stream.advanceIfChars([p,d])?this.finishToken(r,t.NotEqualsOperator):this.stream.advanceIfChar(h)?this.stream.advanceIfChar(d)?this.finishToken(r,t.SmallerEqualsOperator):this.finishToken(r,n.TokenType.Delim):this.stream.advanceIfChar(u)?this.stream.advanceIfChar(d)?this.finishToken(r,t.GreaterEqualsOperator):this.finishToken(r,n.TokenType.Delim):this.stream.advanceIfChars([m,m,m])?this.finishToken(r,t.Ellipsis):e.prototype.scanNext.call(this,r)},f.prototype.comment=function(){return!!e.prototype.comment.call(this)||!(this.inURL||!this.stream.advanceIfChars([r,r]))&&(this.stream.advanceWhileChar((function(e){switch(e){case i:case o:case s:return!1;default:return!0}})),!0)},f}(n.Scanner);t.SCSSScanner=g})),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/scssErrors",["require","exports","vscode-nls"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCSSParseError=t.SCSSIssueType=void 0;var n=e("vscode-nls").loadMessageBundle(),r=function(e,t){this.id=e,this.message=t};t.SCSSIssueType=r,t.SCSSParseError={FromExpected:new r("scss-fromexpected",n("expected.from","'from' expected")),ThroughOrToExpected:new r("scss-throughexpected",n("expected.through","'through' or 'to' expected")),InExpected:new r("scss-fromexpected",n("expected.in","'in' expected"))}}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!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/scssParser",["require","exports","./scssScanner","./cssScanner","./cssParser","./cssNodes","./scssErrors","./cssErrors"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCSSParser=void 0;var n=e("./scssScanner"),r=e("./cssScanner"),i=e("./cssParser"),o=e("./cssNodes"),s=e("./scssErrors"),a=e("./cssErrors"),l=function(e){function t(){return e.call(this,new n.SCSSScanner)||this}return __extends(t,e),t.prototype._parseStylesheetStatement=function(t){return void 0===t&&(t=!1),this.peek(r.TokenType.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(t)||e.prototype._parseStylesheetAtStatement.call(this,t):this._parseRuleset(!0)||this._parseVariableDeclaration()},t.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(o.Import);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,a.ParseError.URIOrStringExpected);for(;this.accept(r.TokenType.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,a.ParseError.URIOrStringExpected);return this.peek(r.TokenType.SemiColon)||this.peek(r.TokenType.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)},t.prototype._parseVariableDeclaration=function(e){if(void 0===e&&(e=[]),!this.peek(n.VariableName))return null;var t=this.create(o.VariableDeclaration);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(r.TokenType.Colon))return this.finish(t,a.ParseError.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,a.ParseError.VariableValueExpected,[],e);for(;this.peek(r.TokenType.Exclamation);)if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(r.TokenType.Ident,/^(default|global)$/))return this.finish(t,a.ParseError.UnknownKeyword);this.consumeToken()}return this.peek(r.TokenType.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseMediaContentStart=function(){return this._parseInterpolation()},t.prototype._parseMediaFeatureName=function(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()},t.prototype._parseKeyframeSelector=function(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseVariableDeclaration()||this._parseMixinContent()},t.prototype._parseVariable=function(){if(!this.peek(n.VariableName))return null;var e=this.create(o.Variable);return this.consumeToken(),e},t.prototype._parseModuleMember=function(){var e=this.mark(),t=this.create(o.Module);return t.setIdentifier(this._parseIdent([o.ReferenceType.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,a.ParseError.IdentifierOrVariableExpected):null},t.prototype._parseIdent=function(e){var t=this;if(!this.peek(r.TokenType.Ident)&&!this.peek(n.InterpolationFunction)&&!this.peekDelim("-"))return null;var i=this.create(o.Identifier);i.referenceTypes=e,i.isCustomProperty=this.peekRegExp(r.TokenType.Ident,/^--/);for(var s,a=!1;(this.accept(r.TokenType.Ident)||i.addChild((s=void 0,s=t.mark(),t.acceptDelim("-")&&(t.hasWhitespace()||t.acceptDelim("-"),t.hasWhitespace())?(t.restoreAtMark(s),null):t._parseInterpolation()))||a&&this.acceptRegexp(/^[\w-]/))&&(a=!0,!this.hasWhitespace()););return a?this.finish(i):null},t.prototype._parseTermExpression=function(){return this._parseModuleMember()||this._parseVariable()||this._parseSelectorCombinator()||e.prototype._parseTermExpression.call(this)},t.prototype._parseInterpolation=function(){if(this.peek(n.InterpolationFunction)){var e=this.create(o.Interpolation);return this.consumeToken(),e.addChild(this._parseExpr())||this._parseSelectorCombinator()?this.accept(r.TokenType.CurlyR)?this.finish(e):this.finish(e,a.ParseError.RightCurlyExpected):this.accept(r.TokenType.CurlyR)?this.finish(e):this.finish(e,a.ParseError.ExpressionExpected)}return null},t.prototype._parseOperator=function(){if(this.peek(n.EqualsOperator)||this.peek(n.NotEqualsOperator)||this.peek(n.GreaterEqualsOperator)||this.peek(n.SmallerEqualsOperator)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(o.NodeType.Operator);return this.consumeToken(),this.finish(t)}return e.prototype._parseOperator.call(this)},t.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(o.Node);return this.consumeToken(),this.finish(t)}return e.prototype._parseUnaryOperator.call(this)},t.prototype._parseRuleSetDeclaration=function(){return this.peek(r.TokenType.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||e.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||e.prototype._parseRuleSetDeclaration.call(this)},t.prototype._parseDeclaration=function(e){var t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;var n=this.create(o.Declaration);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(r.TokenType.Colon))return this.finish(n,a.ParseError.ColonExpected,[r.TokenType.Colon],e||[r.TokenType.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var i=!1;if(n.setValue(this._parseExpr())&&(i=!0,n.addChild(this._parsePrio())),this.peek(r.TokenType.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(n,a.ParseError.PropertyValueExpected);return this.peek(r.TokenType.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)},t.prototype._parseNestedProperties=function(){var e=this.create(o.NestedProperties);return this._parseBody(e,this._parseDeclaration.bind(this))},t.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var e=this.create(o.ExtendsReference);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,a.ParseError.SelectorExpected);for(;this.accept(r.TokenType.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(r.TokenType.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,a.ParseError.UnknownKeyword):this.finish(e)}return null},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var e=this.createNode(o.NodeType.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(r.TokenType.Num)||this.accept(r.TokenType.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null},t.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var e=this.createNode(o.NodeType.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){e=this.createNode(o.NodeType.SelectorPlaceholder);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseElementName=function(){var t=this.mark(),n=e.prototype._parseElementName.call(this);return n&&!this.hasWhitespace()&&this.peek(r.TokenType.ParenthesisL)?(this.restoreAtMark(t),null):n},t.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||e.prototype._tryParsePseudoIdentifier.call(this)},t.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var e=this.createNode(o.NodeType.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)},t.prototype._parseControlStatement=function(e){return void 0===e&&(e=this._parseRuleSetDeclaration.bind(this)),this.peek(r.TokenType.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null},t.prototype._parseIfStatement=function(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null},t.prototype._internalParseIfStatement=function(e){var t=this.create(o.IfStatement);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,a.ParseError.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(r.TokenType.CurlyL)){var n=this.create(o.ElseStatement);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)},t.prototype._parseForStatement=function(e){if(!this.peekKeyword("@for"))return null;var t=this.create(o.ForStatement);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR]):this.finish(t,s.SCSSParseError.ThroughOrToExpected,[r.TokenType.CurlyR]):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR]):this.finish(t,s.SCSSParseError.FromExpected,[r.TokenType.CurlyR]):this.finish(t,a.ParseError.VariableNameExpected,[r.TokenType.CurlyR])},t.prototype._parseEachStatement=function(e){if(!this.peekKeyword("@each"))return null;var t=this.create(o.EachStatement);this.consumeToken();var n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,a.ParseError.VariableNameExpected,[r.TokenType.CurlyR]);for(;this.accept(r.TokenType.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,a.ParseError.VariableNameExpected,[r.TokenType.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR]):this.finish(t,s.SCSSParseError.InExpected,[r.TokenType.CurlyR])},t.prototype._parseWhileStatement=function(e){if(!this.peekKeyword("@while"))return null;var t=this.create(o.WhileStatement);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR])},t.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},t.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var e=this.create(o.FunctionDeclaration);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([o.ReferenceType.Function])))return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);if(!this.accept(r.TokenType.ParenthesisL))return this.finish(e,a.ParseError.LeftParenthesisExpected,[r.TokenType.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);return this.accept(r.TokenType.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,a.ParseError.RightParenthesisExpected,[r.TokenType.CurlyR])},t.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var e=this.createNode(o.NodeType.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,a.ParseError.ExpressionExpected)},t.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var e=this.create(o.MixinDeclaration);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([o.ReferenceType.Mixin])))return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);if(this.accept(r.TokenType.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected,[r.TokenType.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseParameterDeclaration=function(){var e=this.create(o.FunctionParameter);return e.setIdentifier(this._parseVariable())?(this.accept(n.Ellipsis),this.accept(r.TokenType.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,a.ParseError.VariableValueExpected,[],[r.TokenType.Comma,r.TokenType.ParenthesisR]):this.finish(e)):null},t.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var e=this.create(o.MixinContentReference);if(this.consumeToken(),this.accept(r.TokenType.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,a.ParseError.ExpressionExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected)}return this.finish(e)},t.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var e=this.create(o.MixinReference);this.consumeToken();var t=this._parseIdent([o.ReferenceType.Mixin]);if(!e.setIdentifier(t))return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var n=this._parseIdent([o.ReferenceType.Mixin]);if(!n)return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);var i=this.create(o.Module);t.referenceTypes=[o.ReferenceType.Module],i.setIdentifier(t),e.setIdentifier(n),e.addChild(i)}if(this.accept(r.TokenType.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,a.ParseError.ExpressionExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(r.TokenType.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)},t.prototype._parseMixinContentDeclaration=function(){var e=this.create(o.MixinContentDeclaration);if(this.acceptIdent("using")){if(!this.accept(r.TokenType.ParenthesisL))return this.finish(e,a.ParseError.LeftParenthesisExpected,[r.TokenType.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected,[r.TokenType.CurlyL])}return this.peek(r.TokenType.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)},t.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},t.prototype._parseFunctionArgument=function(){var e=this.create(o.FunctionArgument),t=this.mark(),i=this._parseVariable();if(i)if(this.accept(r.TokenType.Colon))e.setIdentifier(i);else{if(this.accept(n.Ellipsis))return e.setValue(i),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(n.Ellipsis),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null},t.prototype._parseURLArgument=function(){var t=this.mark(),n=e.prototype._parseURLArgument.call(this);if(!n||!this.peek(r.TokenType.ParenthesisR)){this.restoreAtMark(t);var i=this.create(o.Node);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return n},t.prototype._parseOperation=function(){if(!this.peek(r.TokenType.ParenthesisL))return null;var e=this.create(o.Node);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(r.TokenType.Comma);return this.accept(r.TokenType.ParenthesisR)?this.finish(e):this.finish(e,a.ParseError.RightParenthesisExpected)},t.prototype._parseListElement=function(){var e=this.create(o.ListEntry),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(r.TokenType.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,a.ParseError.ExpressionExpected)}else e.setValue(t);return this.finish(e)},t.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var e=this.create(o.Use);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,a.ParseError.StringLiteralExpected);if(!this.peek(r.TokenType.SemiColon)&&!this.peek(r.TokenType.EOF)){if(!this.peekRegExp(r.TokenType.Ident,/as|with/))return this.finish(e,a.ParseError.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([o.ReferenceType.Module]))&&!this.acceptDelim("*"))return this.finish(e,a.ParseError.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(r.TokenType.ParenthesisL))return this.finish(e,a.ParseError.LeftParenthesisExpected,[r.TokenType.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected)}}return this.accept(r.TokenType.SemiColon)||this.accept(r.TokenType.EOF)?this.finish(e):this.finish(e,a.ParseError.SemiColonExpected)},t.prototype._parseModuleConfigDeclaration=function(){var e=this.create(o.ModuleConfiguration);return e.setIdentifier(this._parseVariable())?this.accept(r.TokenType.Colon)&&e.setValue(this._parseExpr(!0))?!this.accept(r.TokenType.Exclamation)||!this.hasWhitespace()&&this.acceptIdent("default")?this.finish(e):this.finish(e,a.ParseError.UnknownKeyword):this.finish(e,a.ParseError.VariableValueExpected,[],[r.TokenType.Comma,r.TokenType.ParenthesisR]):null},t.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var e=this.create(o.Forward);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,a.ParseError.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(r.TokenType.ParenthesisL))return this.finish(e,a.ParseError.LeftParenthesisExpected,[r.TokenType.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);for(;this.accept(r.TokenType.Comma)&&!this.peek(r.TokenType.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected)}if(!this.peek(r.TokenType.SemiColon)&&!this.peek(r.TokenType.EOF)){if(!this.peekRegExp(r.TokenType.Ident,/as|hide|show/))return this.finish(e,a.ParseError.UnknownKeyword);if(this.acceptIdent("as")){var t=this._parseIdent([o.ReferenceType.Forward]);if(!e.setIdentifier(t))return this.finish(e,a.ParseError.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,a.ParseError.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,a.ParseError.IdentifierOrVariableExpected)}return this.accept(r.TokenType.SemiColon)||this.accept(r.TokenType.EOF)?this.finish(e):this.finish(e,a.ParseError.SemiColonExpected)},t.prototype._parseForwardVisibility=function(){var e=this.create(o.ForwardVisibility);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(r.TokenType.Comma);return e.getChildren().length>1?e:null},t.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||e.prototype._parseSupportsCondition.call(this)},t}(i.Parser);t.SCSSParser=l}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!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/services/scssCompletion",["require","exports","./cssCompletion","../parser/cssNodes","../cssLanguageTypes","vscode-nls"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCSSCompletion=void 0;var n=e("./cssCompletion"),r=e("../parser/cssNodes"),i=e("../cssLanguageTypes"),o=e("vscode-nls").loadMessageBundle(),s=function(e){function t(n,r){var i=e.call(this,"$",n,r)||this;return a(t.scssModuleLoaders),a(t.scssModuleBuiltIns),i}return __extends(t,e),t.prototype.isImportPathParent=function(t){return t===r.NodeType.Forward||t===r.NodeType.Use||e.prototype.isImportPathParent.call(this,t)},t.prototype.getCompletionForImportPath=function(n,o){var s=n.getParent().type;if(s===r.NodeType.Forward||s===r.NodeType.Use)for(var a=0,l=t.scssModuleBuiltIns;a0){var t="string"==typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | "),e.documentation=t}}))}t.SCSSCompletion=s}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!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/lessScanner",["require","exports","./cssScanner"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LESSScanner=t.Ellipsis=void 0;var n=e("./cssScanner"),r="/".charCodeAt(0),i="\n".charCodeAt(0),o="\r".charCodeAt(0),s="\f".charCodeAt(0),a="`".charCodeAt(0),l=".".charCodeAt(0),c=n.TokenType.CustomToken;t.Ellipsis=c++;var d=function(e){function c(){return null!==e&&e.apply(this,arguments)||this}return __extends(c,e),c.prototype.scanNext=function(n){var r=this.escapedJavaScript();return null!==r?this.finishToken(n,r):this.stream.advanceIfChars([l,l,l])?this.finishToken(n,t.Ellipsis):e.prototype.scanNext.call(this,n)},c.prototype.comment=function(){return!!e.prototype.comment.call(this)||!(this.inURL||!this.stream.advanceIfChars([r,r]))&&(this.stream.advanceWhileChar((function(e){switch(e){case i:case o:case s:return!1;default:return!0}})),!0)},c.prototype.escapedJavaScript=function(){return this.stream.peekChar()===a?(this.stream.advance(1),this.stream.advanceWhileChar((function(e){return e!==a})),this.stream.advanceIfChar(a)?n.TokenType.EscapedJavaScript:n.TokenType.BadEscapedJavaScript):null},c}(n.Scanner);t.LESSScanner=d}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!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/lessParser",["require","exports","./lessScanner","./cssScanner","./cssParser","./cssNodes","./cssErrors"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LESSParser=void 0;var n=e("./lessScanner"),r=e("./cssScanner"),i=e("./cssParser"),o=e("./cssNodes"),s=e("./cssErrors"),a=function(e){function t(){return e.call(this,new n.LESSScanner)||this}return __extends(t,e),t.prototype._parseStylesheetStatement=function(t){return void 0===t&&(t=!1),this.peek(r.TokenType.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||e.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var e=this.create(o.Import);if(this.consumeToken(),this.accept(r.TokenType.ParenthesisL)){if(!this.accept(r.TokenType.Ident))return this.finish(e,s.ParseError.IdentifierExpected,[r.TokenType.SemiColon]);do{if(!this.accept(r.TokenType.Comma))break}while(this.accept(r.TokenType.Ident));if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,s.ParseError.RightParenthesisExpected,[r.TokenType.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(r.TokenType.SemiColon)||this.peek(r.TokenType.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)):this.finish(e,s.ParseError.URIOrStringExpected,[r.TokenType.SemiColon])},t.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var e=this.createNode(o.NodeType.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(r.TokenType.SemiColon)?this.finish(e):this.finish(e,s.ParseError.SemiColonExpected):this.finish(e,s.ParseError.StringLiteralExpected)},t.prototype._parseMediaQuery=function(t){var n=e.prototype._parseMediaQuery.call(this,t);if(!n){var r=this.create(o.MediaQuery);return r.addChild(this._parseVariable())?this.finish(r):null}return n},t.prototype._parseMediaDeclaration=function(e){return void 0===e&&(e=!1),this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},t.prototype._parseVariableDeclaration=function(e){void 0===e&&(e=[]);var t=this.create(o.VariableDeclaration),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(r.TokenType.Colon))return this.restoreAtMark(n),null;if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,s.ParseError.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(r.TokenType.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseDetachedRuleSet=function(){var e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),this.hasWhitespace()||!this.accept(r.TokenType.ParenthesisL))return this.restoreAtMark(e),null;var t=this.create(o.MixinDeclaration);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(r.TokenType.Comma)||this.accept(r.TokenType.SemiColon))&&!this.peek(r.TokenType.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,s.ParseError.IdentifierExpected,[],[r.TokenType.ParenthesisR]);if(!this.accept(r.TokenType.ParenthesisR))return this.restoreAtMark(e),null}if(!this.peek(r.TokenType.CurlyL))return null;var n=this.create(o.BodyDeclaration);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)},t.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},t.prototype._addLookupChildren=function(e){if(!e.addChild(this._parseLookupValue()))return!1;for(var t=!1;this.peek(r.TokenType.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t},t.prototype._parseLookupValue=function(){var e=this.create(o.Node),t=this.mark();return this.accept(r.TokenType.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(r.TokenType.BracketR)||this.accept(r.TokenType.BracketR))?e:(this.restoreAtMark(t),null)},t.prototype._parseVariable=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(r.TokenType.AtKeyword))return null;for(var i=this.create(o.Variable),s=this.mark();this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return(this.accept(r.TokenType.AtKeyword)||this.accept(r.TokenType.Ident))&&(t||!this.peek(r.TokenType.BracketL)||this._addLookupChildren(i))?i:(this.restoreAtMark(s),null)},t.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||e.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},t.prototype._parseEscaped=function(){if(this.peek(r.TokenType.EscapedJavaScript)||this.peek(r.TokenType.BadEscapedJavaScript)){var e=this.createNode(o.NodeType.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){e=this.createNode(o.NodeType.EscapedValue);return this.consumeToken(),this.accept(r.TokenType.String)||this.accept(r.TokenType.EscapedJavaScript)?this.finish(e):this.finish(e,s.ParseError.TermExpected)}return null},t.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||e.prototype._parseOperator.call(this)},t.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var e=this.createNode(o.NodeType.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){e=this.createNode(o.NodeType.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){e=this.createNode(o.NodeType.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null},t.prototype._parseRuleSetDeclaration=function(){return this.peek(r.TokenType.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||e.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||e.prototype._parseRuleSetDeclaration.call(this)},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([o.ReferenceType.Keyframe])||this._parseVariable()},t.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||e.prototype._parseKeyframeSelector.call(this)},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelector=function(e){var t=this.create(o.Selector),n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){n=!0;var i=this.mark();if(t.addChild(this._parseGuard())&&this.peek(r.TokenType.CurlyL))break;this.restoreAtMark(i),t.addChild(this._parseCombinator())}return n?this.finish(t):null},t.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var e=this.createNode(o.NodeType.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(r.TokenType.Num)||this.accept(r.TokenType.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null},t.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var e=this.createNode(o.NodeType.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(e){void 0===e&&(e=!1);var t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;var n=this.mark(),r=this.create(o.Identifier);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");return(e?r.isCustomProperty?r.addChild(this._parseIdent()):r.addChild(this._parseRegexp(t)):r.isCustomProperty?this._acceptInterpolatedIdent(r):this._acceptInterpolatedIdent(r,t))?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(n),null)},t.prototype.peekInterpolatedIdent=function(){return this.peek(r.TokenType.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},t.prototype._acceptInterpolatedIdent=function(e,t){for(var n=this,i=!1,o=function(){var e=n.mark();return n.acceptDelim("-")&&(n.hasWhitespace()||n.acceptDelim("-"),n.hasWhitespace())?(n.restoreAtMark(e),null):n._parseInterpolation()},s=t?function(){return n.acceptRegexp(t)}:function(){return n.accept(r.TokenType.Ident)};(s()||e.addChild(this._parseInterpolation()||this.try(o)))&&(i=!0,!this.hasWhitespace()););return i},t.prototype._parseInterpolation=function(){var e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var t=this.createNode(o.NodeType.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(r.TokenType.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(r.TokenType.CurlyR)?this.finish(t):this.finish(t,s.ParseError.RightCurlyExpected):this.finish(t,s.ParseError.IdentifierExpected)}return null},t.prototype._tryParseMixinDeclaration=function(){var e=this.mark(),t=this.create(o.MixinDeclaration);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(r.TokenType.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(r.TokenType.Comma)||this.accept(r.TokenType.SemiColon))&&!this.peek(r.TokenType.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,s.ParseError.IdentifierExpected,[],[r.TokenType.ParenthesisR]);return this.accept(r.TokenType.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(r.TokenType.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)},t.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},t.prototype._parseMixinDeclarationIdentifier=function(){var e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(o.Identifier),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(r.TokenType.Hash))return null;e=this.create(o.Identifier),this.consumeToken()}return e.referenceTypes=[o.ReferenceType.Mixin],this.finish(e)},t.prototype._parsePseudo=function(){if(!this.peek(r.TokenType.Colon))return null;var t=this.mark(),n=this.create(o.ExtendsReference);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(t),e.prototype._parsePseudo.call(this))},t.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var e=this.mark(),t=this.create(o.ExtendsReference);return this.consumeToken(),!this.hasWhitespace()&&this.accept(r.TokenType.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)},t.prototype._completeExtends=function(e){if(!this.accept(r.TokenType.ParenthesisL))return this.finish(e,s.ParseError.LeftParenthesisExpected);var t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,s.ParseError.SelectorExpected);for(;this.accept(r.TokenType.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,s.ParseError.SelectorExpected);return this.accept(r.TokenType.ParenthesisR)?this.finish(e):this.finish(e,s.ParseError.RightParenthesisExpected)},t.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(r.TokenType.AtKeyword))return null;var e=this.mark(),t=this.create(o.MixinReference);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(r.TokenType.ParenthesisL)?this.accept(r.TokenType.ParenthesisR)?this.finish(t):this.finish(t,s.ParseError.RightParenthesisExpected):(this.restoreAtMark(e),null)},t.prototype._tryParseMixinReference=function(e){void 0===e&&(e=!0);for(var t=this.mark(),n=this.create(o.MixinReference),i=this._parseMixinDeclarationIdentifier();i;){this.acceptDelim(">");var a=this._parseMixinDeclarationIdentifier();if(!a)break;n.getNamespaces().addChild(i),i=a}if(!n.setIdentifier(i))return this.restoreAtMark(t),null;var l=!1;if(this.accept(r.TokenType.ParenthesisL)){if(l=!0,n.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(r.TokenType.Comma)||this.accept(r.TokenType.SemiColon))&&!this.peek(r.TokenType.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,s.ParseError.ExpressionExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(n,s.ParseError.RightParenthesisExpected);i.referenceTypes=[o.ReferenceType.Mixin]}else i.referenceTypes=[o.ReferenceType.Mixin,o.ReferenceType.Rule];return this.peek(r.TokenType.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),l||this.peek(r.TokenType.SemiColon)||this.peek(r.TokenType.CurlyR)||this.peek(r.TokenType.EOF)?this.finish(n):(this.restoreAtMark(t),null)},t.prototype._parseMixinArgument=function(){var e=this.create(o.FunctionArgument),t=this.mark(),n=this._parseVariable();return n&&(this.accept(r.TokenType.Colon)?e.setIdentifier(n):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)},t.prototype._parseMixinParameter=function(){var e=this.create(o.FunctionParameter);if(this.peekKeyword("@rest")){var t=this.create(o.Node);return this.consumeToken(),this.accept(n.Ellipsis)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,s.ParseError.DotExpected,[],[r.TokenType.Comma,r.TokenType.ParenthesisR])}if(this.peek(n.Ellipsis)){var i=this.create(o.Node);return this.consumeToken(),e.setIdentifier(this.finish(i)),this.finish(e)}var a=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(r.TokenType.Colon),a=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||a?this.finish(e):null},t.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var e=this.create(o.LessGuard);if(this.consumeToken(),e.isNegated=this.acceptIdent("not"),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,s.ParseError.ConditionExpected);for(;this.acceptIdent("and")||this.accept(r.TokenType.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,s.ParseError.ConditionExpected);return this.finish(e)},t.prototype._parseGuardCondition=function(){if(!this.peek(r.TokenType.ParenthesisL))return null;var e=this.create(o.GuardCondition);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(r.TokenType.ParenthesisR)?this.finish(e):this.finish(e,s.ParseError.RightParenthesisExpected)},t.prototype._parseFunction=function(){var e=this.mark(),t=this.create(o.Function);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(r.TokenType.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(r.TokenType.Comma)||this.accept(r.TokenType.SemiColon))&&!this.peek(r.TokenType.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,s.ParseError.ExpressionExpected);return this.accept(r.TokenType.ParenthesisR)?this.finish(t):this.finish(t,s.ParseError.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(o.Identifier);return t.referenceTypes=[o.ReferenceType.Function],this.consumeToken(),this.finish(t)}return e.prototype._parseFunctionIdentifier.call(this)},t.prototype._parseURLArgument=function(){var t=this.mark(),n=e.prototype._parseURLArgument.call(this);if(!n||!this.peek(r.TokenType.ParenthesisR)){this.restoreAtMark(t);var i=this.create(o.Node);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return n},t}(i.Parser);t.LESSParser=a}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!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/services/lessCompletion",["require","exports","./cssCompletion","../cssLanguageTypes","vscode-nls"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LESSCompletion=void 0;var n=e("./cssCompletion"),r=e("../cssLanguageTypes"),i=e("vscode-nls").loadMessageBundle(),o=function(e){function t(t,n){return e.call(this,"@",t,n)||this}return __extends(t,e),t.prototype.createFunctionProposals=function(e,t,n,i){for(var o=0,s=e;o 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:i("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:i("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:i("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:i("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:i("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:i("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:i("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:i("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:i("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:i("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],t.colorProposals=[{name:"argb",example:"argb(@color);",description:i("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:i("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:i("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:i("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:i("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:i("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:i("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:i("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:i("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:i("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:i("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:i("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:i("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:i("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:i("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:i("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:i("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:i("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:i("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:i("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:i("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:i("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:i("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:i("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:i("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:i("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:i("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],t}(n.CSSCompletion);t.LESSCompletion=o})),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/services/cssFolding",["require","exports","../parser/cssScanner","../parser/scssScanner","../parser/lessScanner"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFoldingRanges=void 0;var n=e("../parser/cssScanner"),r=e("../parser/scssScanner"),i=e("../parser/lessScanner");function o(e,t){if(0===e.length)return null;for(var n=e.length-1;n>=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}t.getFoldingRanges=function(e,t){return function(e,t){var n=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((function(e,t){var n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n})),i=[],o=-1;return r.forEach((function(e){e.startLine && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:60,description:"Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:83,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:51,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:52,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:70,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:52,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:80,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"