/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/language/css/cssWorker", ["require","require"],(require)=>{ "use strict";var moduleExports=(()=>{var Er=Object.defineProperty;var Fo=Object.getOwnPropertyDescriptor;var Eo=Object.getOwnPropertyNames;var _o=Object.prototype.hasOwnProperty;var Io=(n,e)=>{for(var t in e)Er(n,t,{get:e[t],enumerable:!0})},Do=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Eo(e))!_o.call(n,i)&&i!==t&&Er(n,i,{get:()=>e[i],enumerable:!(r=Fo(e,i))||r.enumerable});return n};var Ro=n=>Do(Er({},"__esModule",{value:!0}),n);var nl={};Io(nl,{CSSWorker:()=>Fr,create:()=>tl});var c;(function(n){n[n.Ident=0]="Ident",n[n.AtKeyword=1]="AtKeyword",n[n.String=2]="String",n[n.BadString=3]="BadString",n[n.UnquotedString=4]="UnquotedString",n[n.Hash=5]="Hash",n[n.Num=6]="Num",n[n.Percentage=7]="Percentage",n[n.Dimension=8]="Dimension",n[n.UnicodeRange=9]="UnicodeRange",n[n.CDO=10]="CDO",n[n.CDC=11]="CDC",n[n.Colon=12]="Colon",n[n.SemiColon=13]="SemiColon",n[n.CurlyL=14]="CurlyL",n[n.CurlyR=15]="CurlyR",n[n.ParenthesisL=16]="ParenthesisL",n[n.ParenthesisR=17]="ParenthesisR",n[n.BracketL=18]="BracketL",n[n.BracketR=19]="BracketR",n[n.Whitespace=20]="Whitespace",n[n.Includes=21]="Includes",n[n.Dashmatch=22]="Dashmatch",n[n.SubstringOperator=23]="SubstringOperator",n[n.PrefixOperator=24]="PrefixOperator",n[n.SuffixOperator=25]="SuffixOperator",n[n.Delim=26]="Delim",n[n.EMS=27]="EMS",n[n.EXS=28]="EXS",n[n.Length=29]="Length",n[n.Angle=30]="Angle",n[n.Time=31]="Time",n[n.Freq=32]="Freq",n[n.Exclamation=33]="Exclamation",n[n.Resolution=34]="Resolution",n[n.Comma=35]="Comma",n[n.Charset=36]="Charset",n[n.EscapedJavaScript=37]="EscapedJavaScript",n[n.BadEscapedJavaScript=38]="BadEscapedJavaScript",n[n.Comment=39]="Comment",n[n.SingleLineComment=40]="SingleLineComment",n[n.EOF=41]="EOF",n[n.ContainerQueryLength=42]="ContainerQueryLength",n[n.CustomToken=43]="CustomToken"})(c||(c={}));var un=class{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;tt&&r===Ui?(e=!0,!1):(t=r===_r,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return this.stream.peekChar()===Bi&&(e=1),t=this.stream.peekChar(e),t>=At&&t<=Wt?(this.stream.advance(e+1),this.stream.advanceWhileChar(r=>r>=At&&r<=Wt||e===0&&r===Bi),!0):!1}_newline(e){let t=this.stream.peekChar();switch(t){case dt:case $t:case ct:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===dt&&this.stream.advanceIfChar(ct)&&e.push(` `),!0}return!1}_escape(e,t){let r=this.stream.peekChar();if(r===Ir){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=At&&r<=Wt||r>=pn&&r<=Pi||r>=mn&&r<=Wi);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{let s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===Dr||r===Rr?this.stream.advance(1):this._newline([]),!0}if(r!==dt&&r!==$t&&r!==ct)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){let r=this.stream.peekChar();return r!==0&&r!==e&&r!==Ir&&r!==dt&&r!==$t&&r!==ct?(this.stream.advance(1),t.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===ji||this.stream.peekChar()===Vi){let 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)),c.String):c.BadString}return null}_unquotedChar(e){let t=this.stream.peekChar();return t!==0&&t!==Ir&&t!==ji&&t!==Vi&&t!==Ki&&t!==Gi&&t!==Dr&&t!==Rr&&t!==ct&&t!==$t&&t!==dt?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(t=>t===Dr||t===Rr||t===ct||t===$t||t===dt)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){let t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1}_identFirstChar(e){let t=this.stream.peekChar();return t===$i||t>=pn&&t<=Ai||t>=mn&&t<=Li||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_minus(e){let t=this.stream.peekChar();return t===Qe?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_identChar(e){let t=this.stream.peekChar();return t===$i||t===Qe||t>=pn&&t<=Ai||t>=mn&&t<=Li||t>=At&&t<=Wt||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(Ho)){let e=r=>r>=At&&r<=Wt||r>=pn&&r<=Pi||r>=mn&&r<=Wi,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===Go);if(t>=1&&t<=6)if(this.stream.advanceIfChar(Qe)){let r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}};function V(n,e){if(n.length0?n.lastIndexOf(e)===t:t===0?n===e:!1}function Hi(n,e,t=4){let r=Math.abs(n.length-e.length);if(r>t)return 0;let i=[],s=[],a,l;for(a=0;a0;)(e&1)===1&&(t+=n),n+=n,e=e>>>1;return t}var m;(function(n){n[n.Undefined=0]="Undefined",n[n.Identifier=1]="Identifier",n[n.Stylesheet=2]="Stylesheet",n[n.Ruleset=3]="Ruleset",n[n.Selector=4]="Selector",n[n.SimpleSelector=5]="SimpleSelector",n[n.SelectorInterpolation=6]="SelectorInterpolation",n[n.SelectorCombinator=7]="SelectorCombinator",n[n.SelectorCombinatorParent=8]="SelectorCombinatorParent",n[n.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",n[n.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",n[n.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",n[n.Page=12]="Page",n[n.PageBoxMarginBox=13]="PageBoxMarginBox",n[n.ClassSelector=14]="ClassSelector",n[n.IdentifierSelector=15]="IdentifierSelector",n[n.ElementNameSelector=16]="ElementNameSelector",n[n.PseudoSelector=17]="PseudoSelector",n[n.AttributeSelector=18]="AttributeSelector",n[n.Declaration=19]="Declaration",n[n.Declarations=20]="Declarations",n[n.Property=21]="Property",n[n.Expression=22]="Expression",n[n.BinaryExpression=23]="BinaryExpression",n[n.Term=24]="Term",n[n.Operator=25]="Operator",n[n.Value=26]="Value",n[n.StringLiteral=27]="StringLiteral",n[n.URILiteral=28]="URILiteral",n[n.EscapedValue=29]="EscapedValue",n[n.Function=30]="Function",n[n.NumericValue=31]="NumericValue",n[n.HexColorValue=32]="HexColorValue",n[n.RatioValue=33]="RatioValue",n[n.MixinDeclaration=34]="MixinDeclaration",n[n.MixinReference=35]="MixinReference",n[n.VariableName=36]="VariableName",n[n.VariableDeclaration=37]="VariableDeclaration",n[n.Prio=38]="Prio",n[n.Interpolation=39]="Interpolation",n[n.NestedProperties=40]="NestedProperties",n[n.ExtendsReference=41]="ExtendsReference",n[n.SelectorPlaceholder=42]="SelectorPlaceholder",n[n.Debug=43]="Debug",n[n.If=44]="If",n[n.Else=45]="Else",n[n.For=46]="For",n[n.Each=47]="Each",n[n.While=48]="While",n[n.MixinContentReference=49]="MixinContentReference",n[n.MixinContentDeclaration=50]="MixinContentDeclaration",n[n.Media=51]="Media",n[n.Keyframe=52]="Keyframe",n[n.FontFace=53]="FontFace",n[n.Import=54]="Import",n[n.Namespace=55]="Namespace",n[n.Invocation=56]="Invocation",n[n.FunctionDeclaration=57]="FunctionDeclaration",n[n.ReturnStatement=58]="ReturnStatement",n[n.MediaQuery=59]="MediaQuery",n[n.MediaCondition=60]="MediaCondition",n[n.MediaFeature=61]="MediaFeature",n[n.FunctionParameter=62]="FunctionParameter",n[n.FunctionArgument=63]="FunctionArgument",n[n.KeyframeSelector=64]="KeyframeSelector",n[n.ViewPort=65]="ViewPort",n[n.Document=66]="Document",n[n.AtApplyRule=67]="AtApplyRule",n[n.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",n[n.CustomPropertySet=69]="CustomPropertySet",n[n.ListEntry=70]="ListEntry",n[n.Supports=71]="Supports",n[n.SupportsCondition=72]="SupportsCondition",n[n.NamespacePrefix=73]="NamespacePrefix",n[n.GridLine=74]="GridLine",n[n.Plugin=75]="Plugin",n[n.UnknownAtRule=76]="UnknownAtRule",n[n.Use=77]="Use",n[n.ModuleConfiguration=78]="ModuleConfiguration",n[n.Forward=79]="Forward",n[n.ForwardVisibility=80]="ForwardVisibility",n[n.Module=81]="Module",n[n.UnicodeRange=82]="UnicodeRange",n[n.Layer=83]="Layer",n[n.LayerNameList=84]="LayerNameList",n[n.LayerName=85]="LayerName",n[n.PropertyAtRule=86]="PropertyAtRule",n[n.Container=87]="Container"})(m||(m={}));var z;(function(n){n[n.Mixin=0]="Mixin",n[n.Rule=1]="Rule",n[n.Variable=2]="Variable",n[n.Function=3]="Function",n[n.Keyframe=4]="Keyframe",n[n.Unknown=5]="Unknown",n[n.Module=6]="Module",n[n.Forward=7]="Forward",n[n.ForwardVisibility=8]="ForwardVisibility",n[n.Property=9]="Property"})(z||(z={}));function Hn(n,e){let t=null;return!n||en.end?null:(n.accept(r=>r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(t?r.length<=t.length&&(t=r):t=r,!0):!1),t)}function vt(n,e){let t=Hn(n,e),r=[];for(;t;)r.unshift(t),t=t.parent;return r}function Xi(n){let e=n.findParent(m.Declaration),t=e&&e.getValue();return t&&t.encloses(n)?e:null}var x=class{get end(){return this.offset+this.length}constructor(e=-1,t=-1,r){this.parent=null,this.offset=e,this.length=t,r&&(this.nodeType=r)}set type(e){this.nodeType=e}get type(){return this.nodeType||m.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(let t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){let i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;let r=this.children;return r||(r=this.children=[]),t!==-1?r.splice(t,0,e):r.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(t=>t.isErroneous(!0))}setNode(e,t,r=-1){return t?(t.attachTo(this,r),this[e]=t,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offsetthis.end||this.length===-1)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;r--)if(t=this.children[r],t.offset<=e)return t}return null}findChildAtOffset(e,t){let r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?t&&r.findChildAtOffset(e,!0)||r:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof J;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(r=>t.type===r);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}},J=class extends x{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}},gn=class extends x{constructor(e,t){super(e,t)}get type(){return m.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}},G=class extends x{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return m.Identifier}containsInterpolation(){return this.hasChildren()}},bn=class extends x{constructor(e,t){super(e,t)}get type(){return m.Stylesheet}},Ze=class extends x{constructor(e,t){super(e,t)}get type(){return m.Declarations}},L=class extends x{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},ae=class extends L{constructor(e,t){super(e,t)}get type(){return m.Ruleset}getSelectors(){return this.selectors||(this.selectors=new J(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(m.Declarations)!==null}},de=class extends x{constructor(e,t){super(e,t)}get type(){return m.Selector}},he=class extends x{constructor(e,t){super(e,t)}get type(){return m.SimpleSelector}};var ht=class extends x{constructor(e,t){super(e,t)}},wn=class extends L{constructor(e,t){super(e,t)}get type(){return m.CustomPropertySet}},Q=class n extends ht{constructor(e,t){super(e,t),this.property=null}get type(){return m.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){let e=this.property?this.property.getName():"unknown";if(this.parent instanceof Ze&&this.parent.getParent()instanceof Ut){let t=this.parent.getParent().getParent();if(t instanceof n)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){let e=this.getFullPropertyName();if(e&&e.charAt(0)==="-"){let t=e.indexOf("-",1);if(t!==-1)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}},vn=class extends Q{constructor(e,t){super(e,t)}get type(){return m.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},Ve=class extends x{constructor(e,t){super(e,t)}get type(){return m.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return Ji(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},Tr=class extends x{constructor(e,t){super(e,t)}get type(){return m.Invocation}getArguments(){return this.arguments||(this.arguments=new J(this)),this.arguments}},me=class extends Tr{constructor(e,t){super(e,t)}get type(){return m.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},ye=class extends x{constructor(e,t){super(e,t)}get type(){return m.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}},le=class extends x{constructor(e,t){super(e,t)}get type(){return m.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},yn=class extends L{constructor(e,t){super(e,t)}get type(){return m.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}},xn=class extends L{constructor(e,t){super(e,t)}get type(){return m.For}setVariable(e){return this.setNode("variable",e,0)}},Sn=class extends L{constructor(e,t){super(e,t)}get type(){return m.Each}getVariables(){return this.variables||(this.variables=new J(this)),this.variables}},Cn=class extends L{constructor(e,t){super(e,t)}get type(){return m.While}},kn=class extends L{constructor(e,t){super(e,t)}get type(){return m.Else}},De=class extends L{constructor(e,t){super(e,t)}get type(){return m.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new J(this)),this.parameters}},Fn=class extends L{constructor(e,t){super(e,t)}get type(){return m.ViewPort}},pt=class extends L{constructor(e,t){super(e,t)}get type(){return m.FontFace}},Ut=class extends L{constructor(e,t){super(e,t)}get type(){return m.NestedProperties}},mt=class extends L{constructor(e,t){super(e,t)}get type(){return m.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},Vt=class extends L{constructor(e,t){super(e,t)}get type(){return m.KeyframeSelector}},je=class extends x{constructor(e,t){super(e,t)}get type(){return m.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}},En=class extends x{get type(){return m.Use}getParameters(){return this.parameters||(this.parameters=new J(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},_n=class extends x{get type(){return m.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}},In=class extends x{get type(){return m.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new J(this)),this.members}getParameters(){return this.parameters||(this.parameters=new J(this)),this.parameters}},Dn=class extends x{get type(){return m.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Rn=class extends x{constructor(e,t){super(e,t)}get type(){return m.Namespace}},Be=class extends L{constructor(e,t){super(e,t)}get type(){return m.Media}},et=class extends L{constructor(e,t){super(e,t)}get type(){return m.Supports}},zn=class extends L{constructor(e,t){super(e,t)}get type(){return m.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},Mn=class extends L{constructor(e,t){super(e,t)}get type(){return m.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}},Tn=class extends L{constructor(e,t){super(e,t)}get type(){return m.Document}},Nn=class extends L{constructor(e,t){super(e,t)}get type(){return m.Container}},ut=class extends x{constructor(e,t){super(e,t)}},ft=class extends x{constructor(e,t){super(e,t)}get type(){return m.MediaQuery}},On=class extends x{constructor(e,t){super(e,t)}get type(){return m.MediaCondition}},Pn=class extends x{constructor(e,t){super(e,t)}get type(){return m.MediaFeature}},Re=class extends x{constructor(e,t){super(e,t)}get type(){return m.SupportsCondition}},An=class extends L{constructor(e,t){super(e,t)}get type(){return m.Page}},Wn=class extends L{constructor(e,t){super(e,t)}get type(){return m.PageBoxMarginBox}},gt=class extends x{constructor(e,t){super(e,t)}get type(){return m.Expression}},qe=class extends x{constructor(e,t){super(e,t)}get type(){return m.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}},Ln=class extends x{constructor(e,t){super(e,t)}get type(){return m.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}},$n=class extends x{constructor(e,t){super(e,t)}get type(){return m.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}};var tt=class extends x{constructor(e,t){super(e,t)}get type(){return m.HexColorValue}},Un=class extends x{constructor(e,t){super(e,t)}get type(){return m.RatioValue}},Yo=46,Qo=48,Zo=57,nt=class extends x{constructor(e,t){super(e,t)}get type(){return m.NumericValue}getValue(){let e=this.getText(),t=0,r;for(let i=0,s=e.length;i0&&(t+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};let s=ea?.[t];return s?typeof s=="string"?Jn(s,i):s.comment?Jn(s.message,i):Jn(r,i):Jn(r,i)}var ta=/{([^}]+)}/g;function Jn(n,e){return Object.keys(e).length===0?n:n.replace(ta,(t,r)=>e[r]??t)}var O=class{constructor(e,t){this.id=e,this.message=t}},f={NumberExpected:new O("css-numberexpected",p("number expected")),ConditionExpected:new O("css-conditionexpected",p("condition expected")),RuleOrSelectorExpected:new O("css-ruleorselectorexpected",p("at-rule or selector expected")),DotExpected:new O("css-dotexpected",p("dot expected")),ColonExpected:new O("css-colonexpected",p("colon expected")),SemiColonExpected:new O("css-semicolonexpected",p("semi-colon expected")),TermExpected:new O("css-termexpected",p("term expected")),ExpressionExpected:new O("css-expressionexpected",p("expression expected")),OperatorExpected:new O("css-operatorexpected",p("operator expected")),IdentifierExpected:new O("css-identifierexpected",p("identifier expected")),PercentageExpected:new O("css-percentageexpected",p("percentage expected")),URIOrStringExpected:new O("css-uriorstringexpected",p("uri or string expected")),URIExpected:new O("css-uriexpected",p("URI expected")),VariableNameExpected:new O("css-varnameexpected",p("variable name expected")),VariableValueExpected:new O("css-varvalueexpected",p("variable value expected")),PropertyValueExpected:new O("css-propertyvalueexpected",p("property value expected")),LeftCurlyExpected:new O("css-lcurlyexpected",p("{ expected")),RightCurlyExpected:new O("css-rcurlyexpected",p("} expected")),LeftSquareBracketExpected:new O("css-rbracketexpected",p("[ expected")),RightSquareBracketExpected:new O("css-lbracketexpected",p("] expected")),LeftParenthesisExpected:new O("css-lparentexpected",p("( expected")),RightParenthesisExpected:new O("css-rparentexpected",p(") expected")),CommaExpected:new O("css-commaexpected",p("comma expected")),PageDirectiveOrDeclarationExpected:new O("css-pagedirordeclexpected",p("page directive or declaraton expected")),UnknownAtRule:new O("css-unknownatrule",p("at-rule unknown")),UnknownKeyword:new O("css-unknownkeyword",p("unknown keyword")),SelectorExpected:new O("css-selectorexpected",p("selector expected")),StringLiteralExpected:new O("css-stringliteralexpected",p("string literal expected")),WhitespaceExpected:new O("css-whitespaceexpected",p("whitespace expected")),MediaQueryExpected:new O("css-mediaqueryexpected",p("media query expected")),IdentifierOrWildcardExpected:new O("css-idorwildcardexpected",p("identifier or wildcard expected")),WildcardExpected:new O("css-wildcardexpected",p("wildcard expected")),IdentifierOrVariableExpected:new O("css-idorvarexpected",p("identifier or variable expected"))};var Nr;(function(n){function e(t){return typeof t=="string"}n.is=e})(Nr||(Nr={}));var Or;(function(n){function e(t){return typeof t=="string"}n.is=e})(Or||(Or={}));var Yi;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Yi||(Yi={}));var Xn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Xn||(Xn={}));var H;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Xn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Xn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&g.uinteger(i.line)&&g.uinteger(i.character)}n.is=t})(H||(H={}));var R;(function(n){function e(r,i,s,a){if(g.uinteger(r)&&g.uinteger(i)&&g.uinteger(s)&&g.uinteger(a))return{start:H.create(r,i),end:H.create(s,a)};if(H.is(r)&&H.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&H.is(i.start)&&H.is(i.end)}n.is=t})(R||(R={}));var it;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&R.is(i.range)&&(g.string(i.uri)||g.undefined(i.uri))}n.is=t})(it||(it={}));var Qi;(function(n){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&R.is(i.targetRange)&&g.string(i.targetUri)&&R.is(i.targetSelectionRange)&&(R.is(i.originSelectionRange)||g.undefined(i.originSelectionRange))}n.is=t})(Qi||(Qi={}));var Yn;(function(n){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&g.numberRange(i.red,0,1)&&g.numberRange(i.green,0,1)&&g.numberRange(i.blue,0,1)&&g.numberRange(i.alpha,0,1)}n.is=t})(Yn||(Yn={}));var Pr;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&R.is(i.range)&&Yn.is(i.color)}n.is=t})(Pr||(Pr={}));var Ar;(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&g.string(i.label)&&(g.undefined(i.textEdit)||_.is(i))&&(g.undefined(i.additionalTextEdits)||g.typedArray(i.additionalTextEdits,_.is))}n.is=t})(Ar||(Ar={}));var Wr;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Wr||(Wr={}));var Lr;(function(n){function e(r,i,s,a,l,o){let d={startLine:r,endLine:i};return g.defined(s)&&(d.startCharacter=s),g.defined(a)&&(d.endCharacter=a),g.defined(l)&&(d.kind=l),g.defined(o)&&(d.collapsedText=o),d}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&g.uinteger(i.startLine)&&g.uinteger(i.startLine)&&(g.undefined(i.startCharacter)||g.uinteger(i.startCharacter))&&(g.undefined(i.endCharacter)||g.uinteger(i.endCharacter))&&(g.undefined(i.kind)||g.string(i.kind))}n.is=t})(Lr||(Lr={}));var $r;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return g.defined(i)&&it.is(i.location)&&g.string(i.message)}n.is=t})($r||($r={}));var yt;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(yt||(yt={}));var Zi;(function(n){n.Unnecessary=1,n.Deprecated=2})(Zi||(Zi={}));var es;(function(n){function e(t){let r=t;return g.objectLiteral(r)&&g.string(r.href)}n.is=e})(es||(es={}));var Bt;(function(n){function e(r,i,s,a,l,o){let d={range:r,message:i};return g.defined(s)&&(d.severity=s),g.defined(a)&&(d.code=a),g.defined(l)&&(d.source=l),g.defined(o)&&(d.relatedInformation=o),d}n.create=e;function t(r){var i;let s=r;return g.defined(s)&&R.is(s.range)&&g.string(s.message)&&(g.number(s.severity)||g.undefined(s.severity))&&(g.integer(s.code)||g.string(s.code)||g.undefined(s.code))&&(g.undefined(s.codeDescription)||g.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(g.string(s.source)||g.undefined(s.source))&&(g.undefined(s.relatedInformation)||g.typedArray(s.relatedInformation,$r.is))}n.is=t})(Bt||(Bt={}));var Me;(function(n){function e(r,i,...s){let a={title:r,command:i};return g.defined(s)&&s.length>0&&(a.arguments=s),a}n.create=e;function t(r){let i=r;return g.defined(i)&&g.string(i.title)&&g.string(i.command)}n.is=t})(Me||(Me={}));var _;(function(n){function e(s,a){return{range:s,newText:a}}n.replace=e;function t(s,a){return{range:{start:s,end:s},newText:a}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){let a=s;return g.objectLiteral(a)&&g.string(a.newText)&&R.is(a.range)}n.is=i})(_||(_={}));var Ur;(function(n){function e(r,i,s){let a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&g.string(i.label)&&(g.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(g.string(i.description)||i.description===void 0)}n.is=t})(Ur||(Ur={}));var xt;(function(n){function e(t){let r=t;return g.string(r)}n.is=e})(xt||(xt={}));var ts;(function(n){function e(s,a,l){return{range:s,newText:a,annotationId:l}}n.replace=e;function t(s,a,l){return{range:{start:s,end:s},newText:a,annotationId:l}}n.insert=t;function r(s,a){return{range:s,newText:"",annotationId:a}}n.del=r;function i(s){let a=s;return _.is(a)&&(Ur.is(a.annotationId)||xt.is(a.annotationId))}n.is=i})(ts||(ts={}));var St;(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return g.defined(i)&&qr.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(St||(St={}));var Vr;(function(n){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&g.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||g.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||g.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=t})(Vr||(Vr={}));var jr;(function(n){function e(r,i,s,a){let l={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),a!==void 0&&(l.annotationId=a),l}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&g.string(i.oldUri)&&g.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||g.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||g.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=t})(jr||(jr={}));var Br;(function(n){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&g.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||g.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||g.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xt.is(i.annotationId))}n.is=t})(Br||(Br={}));var Qn;(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>g.string(i.kind)?Vr.is(i)||jr.is(i)||Br.is(i):St.is(i)))}n.is=e})(Qn||(Qn={}));var ns;(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return g.defined(i)&&g.string(i.uri)}n.is=t})(ns||(ns={}));var qt;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return g.defined(i)&&g.string(i.uri)&&g.integer(i.version)}n.is=t})(qt||(qt={}));var qr;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return g.defined(i)&&g.string(i.uri)&&(i.version===null||g.integer(i.version))}n.is=t})(qr||(qr={}));var rs;(function(n){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}n.create=e;function t(r){let i=r;return g.defined(i)&&g.string(i.uri)&&g.string(i.languageId)&&g.integer(i.version)&&g.string(i.text)}n.is=t})(rs||(rs={}));var se;(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){let r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(se||(se={}));var Ct;(function(n){function e(t){let r=t;return g.objectLiteral(t)&&se.is(r.kind)&&g.string(r.value)}n.is=e})(Ct||(Ct={}));var k;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(k||(k={}));var te;(function(n){n.PlainText=1,n.Snippet=2})(te||(te={}));var Te;(function(n){n.Deprecated=1})(Te||(Te={}));var is;(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){let i=r;return i&&g.string(i.newText)&&R.is(i.insert)&&R.is(i.replace)}n.is=t})(is||(is={}));var ss;(function(n){n.asIs=1,n.adjustIndentation=2})(ss||(ss={}));var os;(function(n){function e(t){let r=t;return r&&(g.string(r.detail)||r.detail===void 0)&&(g.string(r.description)||r.description===void 0)}n.is=e})(os||(os={}));var Kr;(function(n){function e(t){return{label:t}}n.create=e})(Kr||(Kr={}));var Gr;(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(Gr||(Gr={}));var Kt;(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){let i=r;return g.string(i)||g.objectLiteral(i)&&g.string(i.language)&&g.string(i.value)}n.is=t})(Kt||(Kt={}));var Hr;(function(n){function e(t){let r=t;return!!r&&g.objectLiteral(r)&&(Ct.is(r.contents)||Kt.is(r.contents)||g.typedArray(r.contents,Kt.is))&&(t.range===void 0||R.is(t.range))}n.is=e})(Hr||(Hr={}));var as;(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(as||(as={}));var ls;(function(n){function e(t,r,...i){let s={label:t};return g.defined(r)&&(s.documentation=r),g.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(ls||(ls={}));var Ge;(function(n){n.Text=1,n.Read=2,n.Write=3})(Ge||(Ge={}));var Jr;(function(n){function e(t,r){let i={range:t};return g.number(r)&&(i.kind=r),i}n.create=e})(Jr||(Jr={}));var ge;(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(ge||(ge={}));var cs;(function(n){n.Deprecated=1})(cs||(cs={}));var Xr;(function(n){function e(t,r,i,s,a){let l={name:t,kind:r,location:{uri:s,range:i}};return a&&(l.containerName=a),l}n.create=e})(Xr||(Xr={}));var ds;(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(ds||(ds={}));var Yr;(function(n){function e(r,i,s,a,l,o){let d={name:r,detail:i,kind:s,range:a,selectionRange:l};return o!==void 0&&(d.children=o),d}n.create=e;function t(r){let i=r;return i&&g.string(i.name)&&g.number(i.kind)&&R.is(i.range)&&R.is(i.selectionRange)&&(i.detail===void 0||g.string(i.detail))&&(i.deprecated===void 0||g.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(Yr||(Yr={}));var Gt;(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(Gt||(Gt={}));var Zn;(function(n){n.Invoked=1,n.Automatic=2})(Zn||(Zn={}));var Qr;(function(n){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}n.create=e;function t(r){let i=r;return g.defined(i)&&g.typedArray(i.diagnostics,Bt.is)&&(i.only===void 0||g.typedArray(i.only,g.string))&&(i.triggerKind===void 0||i.triggerKind===Zn.Invoked||i.triggerKind===Zn.Automatic)}n.is=t})(Qr||(Qr={}));var Ht;(function(n){function e(r,i,s){let a={title:r},l=!0;return typeof i=="string"?(l=!1,a.kind=i):Me.is(i)?a.command=i:a.edit=i,l&&s!==void 0&&(a.kind=s),a}n.create=e;function t(r){let i=r;return i&&g.string(i.title)&&(i.diagnostics===void 0||g.typedArray(i.diagnostics,Bt.is))&&(i.kind===void 0||g.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Me.is(i.command))&&(i.isPreferred===void 0||g.boolean(i.isPreferred))&&(i.edit===void 0||Qn.is(i.edit))}n.is=t})(Ht||(Ht={}));var hs;(function(n){function e(r,i){let s={range:r};return g.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return g.defined(i)&&R.is(i.range)&&(g.undefined(i.command)||Me.is(i.command))}n.is=t})(hs||(hs={}));var ps;(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return g.defined(i)&&g.uinteger(i.tabSize)&&g.boolean(i.insertSpaces)}n.is=t})(ps||(ps={}));var Zr;(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return g.defined(i)&&R.is(i.range)&&(g.undefined(i.target)||g.string(i.target))}n.is=t})(Zr||(Zr={}));var kt;(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&R.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(kt||(kt={}));var ms;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(ms||(ms={}));var us;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(us||(us={}));var fs;(function(n){function e(t){let r=t;return g.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(fs||(fs={}));var gs;(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){let i=r;return i!=null&&R.is(i.range)&&g.string(i.text)}n.is=t})(gs||(gs={}));var bs;(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){let i=r;return i!=null&&R.is(i.range)&&g.boolean(i.caseSensitiveLookup)&&(g.string(i.variableName)||i.variableName===void 0)}n.is=t})(bs||(bs={}));var ws;(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){let i=r;return i!=null&&R.is(i.range)&&(g.string(i.expression)||i.expression===void 0)}n.is=t})(ws||(ws={}));var vs;(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){let i=r;return g.defined(i)&&R.is(r.stoppedLocation)}n.is=t})(vs||(vs={}));var ei;(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(ei||(ei={}));var ti;(function(n){function e(r){return{value:r}}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&(i.tooltip===void 0||g.string(i.tooltip)||Ct.is(i.tooltip))&&(i.location===void 0||it.is(i.location))&&(i.command===void 0||Me.is(i.command))}n.is=t})(ti||(ti={}));var ys;(function(n){function e(r,i,s){let a={position:r,label:i};return s!==void 0&&(a.kind=s),a}n.create=e;function t(r){let i=r;return g.objectLiteral(i)&&H.is(i.position)&&(g.string(i.label)||g.typedArray(i.label,ti.is))&&(i.kind===void 0||ei.is(i.kind))&&i.textEdits===void 0||g.typedArray(i.textEdits,_.is)&&(i.tooltip===void 0||g.string(i.tooltip)||Ct.is(i.tooltip))&&(i.paddingLeft===void 0||g.boolean(i.paddingLeft))&&(i.paddingRight===void 0||g.boolean(i.paddingRight))}n.is=t})(ys||(ys={}));var xs;(function(n){function e(t){return{kind:"snippet",value:t}}n.createSnippet=e})(xs||(xs={}));var Ss;(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(Ss||(Ss={}));var Cs;(function(n){function e(t){return{items:t}}n.create=e})(Cs||(Cs={}));var ks;(function(n){n.Invoked=0,n.Automatic=1})(ks||(ks={}));var Fs;(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Fs||(Fs={}));var Es;(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(Es||(Es={}));var _s;(function(n){function e(t){let r=t;return g.objectLiteral(r)&&Or.is(r.uri)&&g.string(r.name)}n.is=e})(_s||(_s={}));var Is;(function(n){function e(s,a,l,o){return new ni(s,a,l,o)}n.create=e;function t(s){let a=s;return!!(g.defined(a)&&g.string(a.uri)&&(g.undefined(a.languageId)||g.string(a.languageId))&&g.uinteger(a.lineCount)&&g.func(a.getText)&&g.func(a.positionAt)&&g.func(a.offsetAt))}n.is=t;function r(s,a){let l=s.getText(),o=i(a,(h,u)=>{let w=h.range.start.line-u.range.start.line;return w===0?h.range.start.character-u.range.start.character:w}),d=l.length;for(let h=o.length-1;h>=0;h--){let u=o[h],w=s.offsetAt(u.range.start),b=s.offsetAt(u.range.end);if(b<=d)l=l.substring(0,w)+u.newText+l.substring(b,l.length);else throw new Error("Overlapping edit");d=w}return l}n.applyEdits=r;function i(s,a){if(s.length<=1)return s;let l=s.length/2|0,o=s.slice(0,l),d=s.slice(l);i(o,a),i(d,a);let h=0,u=0,w=0;for(;h0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return H.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return H.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(b){return b===!0||b===!1}n.boolean=i;function s(b){return e.call(b)==="[object String]"}n.string=s;function a(b){return e.call(b)==="[object Number]"}n.number=a;function l(b,y,E){return e.call(b)==="[object Number]"&&y<=b&&b<=E}n.numberRange=l;function o(b){return e.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}n.integer=o;function d(b){return e.call(b)==="[object Number]"&&0<=b&&b<=2147483647}n.uinteger=d;function h(b){return e.call(b)==="[object Function]"}n.func=h;function u(b){return b!==null&&typeof b=="object"}n.objectLiteral=u;function w(b,y){return Array.isArray(b)&&b.every(y)}n.typedArray=w})(g||(g={}));var er=class n{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(n.isIncremental(r)){let i=Rs(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);let l=Math.max(i.start.line,0),o=Math.max(i.end.line,0),d=this._lineOffsets,h=Ds(r.text,!1,s);if(o-l===h.length)for(let w=0,b=h.length;we?i=a:r=a+1}let s=r-1;return{line:s,character:e-t[s]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1{let w=h.range.start.line-u.range.start.line;return w===0?h.range.start.character-u.range.start.character:w}),o=0,d=[];for(let h of l){let u=i.offsetAt(h.range.start);if(uo&&d.push(a.substring(o,u)),h.newText.length&&d.push(h.newText),o=i.offsetAt(h.range.end)}return d.push(a.substr(o)),d.join("")}n.applyEdits=r})(Jt||(Jt={}));function ri(n,e){if(n.length<=1)return n;let t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);ri(r,e),ri(i,e);let s=0,a=0,l=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function na(n){let e=Rs(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var zs;(function(n){n.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[se.Markdown,se.PlainText]}},hover:{contentFormat:[se.Markdown,se.PlainText]}}}})(zs||(zs={}));var st;(function(n){n[n.Unknown=0]="Unknown",n[n.File=1]="File",n[n.Directory=2]="Directory",n[n.SymbolicLink=64]="SymbolicLink"})(st||(st={}));var Ms={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Ts(n){switch(n){case"experimental":return`\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F `;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. `;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. `;default:return""}}function Ce(n,e,t){let r;if(e?r={kind:"markdown",value:ia(n,t)}:r={kind:"plaintext",value:ra(n,t)},r.value!=="")return r}function tr(n){return n=n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),n.replace(//g,">")}function ra(n,e){if(!n.description||n.description==="")return"";if(typeof n.description!="string")return n.description.value;let t="";if(e?.documentation!==!1){n.status&&(t+=Ts(n.status)),t+=n.description;let r=Ns(n.browsers);r&&(t+=` (`+r+")"),"syntax"in n&&(t+=` Syntax: ${n.syntax}`)}return n.references&&n.references.length>0&&e?.references!==!1&&(t.length>0&&(t+=` `),t+=n.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),t}function ia(n,e){if(!n.description||n.description==="")return"";let t="";if(e?.documentation!==!1){n.status&&(t+=Ts(n.status)),typeof n.description=="string"?t+=tr(n.description):t+=n.description.kind===se.Markdown?n.description.value:tr(n.description.value);let r=Ns(n.browsers);r&&(t+=` (`+tr(r)+")"),"syntax"in n&&n.syntax&&(t+=` Syntax: ${tr(n.syntax)}`)}return n.references&&n.references.length>0&&e?.references!==!1&&(t.length>0&&(t+=` `),t+=n.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),t}function Ns(n=[]){return n.length===0?null:n.map(e=>{let t="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Ms&&(t+=Ms[i]),s&&(t+=" "+s),t}).join(", ")}var sa=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,Ws=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:p("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:p("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:p("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:p("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:p("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:p("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:p("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:p("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:p("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:p("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:p("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:p("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:p("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:p("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:p("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:p("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:p("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:p("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:p("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:p("Mix two colors together in a polar color space.")}],oa=/^(rgb|rgba|hsl|hsla|hwb)$/i,Xt={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"},aa=new RegExp(`^(${Object.keys(Xt).join("|")})$`,"i"),rr={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."},la=new RegExp(`^(${Object.keys(rr).join("|")})$`,"i");function He(n,e){let r=n.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);let i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function Os(n){let e=n.getText(),t=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(t)switch(t[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof t[2]>"u")return parseFloat(e)%360}throw new Error}function Ls(n){let e=n.getName();return e?oa.test(e):!1}function ii(n){return sa.test(n)||aa.test(n)||la.test(n)}var Ps=48,ca=57,da=65;var nr=97,ha=102;function B(n){return n=nr&&n<=ha?n-nr+10:0)}function As(n){if(n[0]!=="#")return null;switch(n.length){case 4:return{red:B(n.charCodeAt(1))*17/255,green:B(n.charCodeAt(2))*17/255,blue:B(n.charCodeAt(3))*17/255,alpha:1};case 5:return{red:B(n.charCodeAt(1))*17/255,green:B(n.charCodeAt(2))*17/255,blue:B(n.charCodeAt(3))*17/255,alpha:B(n.charCodeAt(4))*17/255};case 7:return{red:(B(n.charCodeAt(1))*16+B(n.charCodeAt(2)))/255,green:(B(n.charCodeAt(3))*16+B(n.charCodeAt(4)))/255,blue:(B(n.charCodeAt(5))*16+B(n.charCodeAt(6)))/255,alpha:1};case 9:return{red:(B(n.charCodeAt(1))*16+B(n.charCodeAt(2)))/255,green:(B(n.charCodeAt(3))*16+B(n.charCodeAt(4)))/255,blue:(B(n.charCodeAt(5))*16+B(n.charCodeAt(6)))/255,alpha:(B(n.charCodeAt(7))*16+B(n.charCodeAt(8)))/255}}return null}function $s(n,e,t,r=1){if(n=n/60,e===0)return{red:t,green:t,blue:t,alpha:r};{let i=(l,o,d)=>{for(;d<0;)d+=6;for(;d>=6;)d-=6;return d<1?(o-l)*d+l:d<3?o:d<4?(o-l)*(4-d)+l:l},s=t<=.5?t*(e+1):t+e-t*e,a=t*2-s;return{red:i(a,s,n+2),green:i(a,s,n),blue:i(a,s,n-2),alpha:r}}}function si(n){let e=n.red,t=n.green,r=n.blue,i=n.alpha,s=Math.max(e,t,r),a=Math.min(e,t,r),l=0,o=0,d=(a+s)/2,h=s-a;if(h>0){switch(o=Math.min(d<=.5?h/(2*d):h/(2-2*d),1),s){case e:l=(t-r)/h+(t=1){let o=e/(e+t);return{red:o,green:o,blue:o,alpha:r}}let i=$s(n,1,.5,r),s=i.red;s*=1-e-t,s+=e;let a=i.green;a*=1-e-t,a+=e;let l=i.blue;return l*=1-e-t,l+=e,{red:s,green:a,blue:l,alpha:r}}function Us(n){let e=si(n),t=Math.min(n.red,n.green,n.blue),r=1-Math.max(n.red,n.green,n.blue);return{h:e.h,w:t,b:r,a:e.a}}function Vs(n){if(n.type===m.HexColorValue){let e=n.getText();return As(e)}else if(n.type===m.Function){let e=n,t=e.getName(),r=e.getArguments().getChildren();if(r.length===1){let i=r[0].getChildren();if(i.length===1&&i[0].type===m.Expression&&(r=i[0].getChildren(),r.length===3)){let s=r[2];if(s instanceof qe){let a=s.getLeft(),l=s.getRight(),o=s.getOperator();a&&l&&o&&o.matches("/")&&(r=[r[0],r[1],a,l])}}}if(!t||r.length<3||r.length>4)return null;try{let i=r.length===4?He(r[3],1):1;if(t==="rgb"||t==="rgba")return{red:He(r[0],255),green:He(r[1],255),blue:He(r[2],255),alpha:i};if(t==="hsl"||t==="hsla"){let s=Os(r[0]),a=He(r[1],100),l=He(r[2],100);return $s(s,a,l,i)}else if(t==="hwb"){let s=Os(r[0]),a=He(r[1],100),l=He(r[2],100);return pa(s,a,l,i)}}catch{return null}}else if(n.type===m.Identifier){if(n.parent&&n.parent.type!==m.Term)return null;let e=n.parent;if(e&&e.parent&&e.parent.type===m.BinaryExpression){let i=e.parent;if(i.parent&&i.parent.type===m.ListEntry&&i.parent.key===i)return null}let t=n.getText().toLowerCase();if(t==="none")return null;let r=Xt[t];if(r)return As(r)}return null}var oi={bottom:"Computes to \u2018100%\u2019 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 \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 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 \u2018100%\u2019 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 \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},ai={"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 \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t 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."},li={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 \u2018none\u2019, 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."},js=["medium","thick","thin"],ci={"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."},di={"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."},hi={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},pi={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},mi={"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\u2019s position and the first specified color-stop\u2019s 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\u2019s position and the first specified color-stop\u2019s position."},ui={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 \u201Cstart\u201D or \u201Cend\u201D.","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."},fi={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},ir={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Bs=["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"],qs=["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"],Ks=["@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"];function Yt(n){return Object.keys(n).map(e=>n[e])}function ie(n){return typeof n<"u"}var ke=class{constructor(e=new ce){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:c.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return c.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return c.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return c.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,t){return e!==this.token.type?!1:t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){let e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){let t=this.mark(),r=e();return r||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(c.AtKeyword===this.token.type){for(let t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type?(this.consumeToken(),!0):!1}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let t=this.createNode(m.Identifier);do;while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){let e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);let t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(t&&t.indexOf(this.token.type)!==-1)return!0;if(this.token.type===c.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new x(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,r,i){if(!(e instanceof J)&&(t&&this.markError(e,t,r,i),this.prevToken)){let s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e}markError(e,t,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new wt(e,t,ee.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)}parseStylesheet(e){let t=e.version,r=e.getText(),i=(s,a)=>{if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)}internalParse(e,t,r){this.scanner.setSource(e),this.token=this.scanner.scan();let i=t.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=(s,a)=>e.substr(s,a)),i}_parseStylesheet(){let e=this.create(bn);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let r=!1;do{r=!1;let i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,t=!1,!this.peek(c.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(c.SemiColon)&&this.markError(e,f.SemiColonExpected));this.accept(c.SemiColon)||this.accept(c.CDO)||this.accept(c.CDC);)r=!0,t=!1}while(r);if(this.peek(c.EOF))break;t||(this.peek(c.AtKeyword)?this.markError(e,f.UnknownAtRule):this.markError(e,f.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(c.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(c.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){let t=this.mark();if(this._parseSelector(e)){for(;this.accept(c.Comma)&&this._parseSelector(e););if(this.accept(c.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){let t=this.create(ae),r=t.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(c.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(t,f.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(c.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(c.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case m.Keyframe:case m.ViewPort:case m.Media:case m.Ruleset:case m.Namespace:case m.If:case m.For:case m.Each:case m.While:case m.MixinDeclaration:case m.FunctionDeclaration:case m.MixinContentDeclaration:return!1;case m.ExtendsReference:case m.MixinContentReference:case m.ReturnStatement:case m.MediaQuery:case m.Debug:case m.Import:case m.AtApplyRule:case m.CustomPropertyDeclaration:return!0;case m.VariableDeclaration:return e.needsSemicolon;case m.MixinReference:return!e.getContent();case m.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){let t=this.create(Ze);if(!this.accept(c.CurlyL))return null;let r=e();for(;t.addChild(r)&&!this.peek(c.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(c.SemiColon))return this.finish(t,f.SemiColonExpected,[c.SemiColon,c.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===c.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(c.SemiColon););r=e()}return this.accept(c.CurlyR)?this.finish(t):this.finish(t,f.RightCurlyExpected,[c.CurlyR,c.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,f.LeftCurlyExpected,[c.CurlyR,c.SemiColon])}_parseSelector(e){let t=this.create(de),r=!1;for(e&&(r=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)r=!0,t.addChild(this._parseCombinator());return r?this.finish(t):null}_parseDeclaration(e){let t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;let r=this.create(Q);return r.setProperty(this._parseProperty())?this.accept(c.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(c.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,f.PropertyValueExpected)):this.finish(r,f.ColonExpected,[c.Colon],e||[c.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(c.Ident,/^--/))return null;let t=this.create(vn);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(c.Colon))return this.finish(t,f.ColonExpected,[c.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);let r=this.mark();if(this.peek(c.CurlyL)){let s=this.create(wn),a=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(s.setDeclarations(a)&&!a.isErroneous(!0)&&(s.addChild(this._parsePrio()),this.peek(c.SemiColon)))return this.finish(s),t.setPropertySet(s),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(r)}let i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],c.SemiColon,c.EOF))?(t.setValue(i),this.peek(c.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(r),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),ie(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,f.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[c.CurlyR]){let t=this.create(x),r=()=>s===0&&a===0&&l===0,i=()=>e.indexOf(this.token.type)!==-1,s=0,a=0,l=0;e:for(;;){switch(this.token.type){case c.SemiColon:if(r())break e;break;case c.Exclamation:if(r())break e;break;case c.CurlyL:s++;break;case c.CurlyR:if(s--,s<0){if(i()&&a===0&&l===0)break e;return this.finish(t,f.LeftCurlyExpected)}break;case c.ParenthesisL:a++;break;case c.ParenthesisR:if(a--,a<0){if(i()&&l===0&&s===0)break e;return this.finish(t,f.LeftParenthesisExpected)}break;case c.BracketL:l++;break;case c.BracketR:if(l--,l<0)return this.finish(t,f.LeftSquareBracketExpected);break;case c.BadString:break e;case c.EOF:let o=f.RightCurlyExpected;return l>0?o=f.RightSquareBracketExpected:a>0&&(o=f.RightParenthesisExpected),this.finish(t,o)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){let t=this.mark();return this._parseProperty()&&this.accept(c.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){let e=this.create(Ve),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(c.Charset))return null;let e=this.create(x);return this.consumeToken(),this.accept(c.String)?this.accept(c.SemiColon)?this.finish(e):this.finish(e,f.SemiColonExpected):this.finish(e,f.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;let e=this.create(je);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,f.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(c.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,f.IdentifierExpected,[c.SemiColon]);if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[c.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(c.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(c.ParenthesisR))?this.finish(e,f.RightParenthesisExpected,[c.ParenthesisR],[]):(!this.peek(c.SemiColon)&&!this.peek(c.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;let e=this.create(Rn);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,f.URIExpected,[c.SemiColon]):this.accept(c.SemiColon)?this.finish(e):this.finish(e,f.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;let e=this.create(pt);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;let e=this.create(Fn);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(c.AtKeyword,this.keyframeRegex))return null;let e=this.create(mt),t=this.create(x);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,f.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,f.IdentifierExpected,[c.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([z.Keyframe])}_parseKeyframeSelector(){let e=this.create(Vt),t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(c.Percentage)&&(t=!0),!t)return null;for(;this.accept(c.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(c.Percentage)&&(t=!0),!t)return this.finish(e,f.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){let e=this.create(Vt),t=this.mark(),r=!1;if(e.addChild(this._parseIdent())&&(r=!0),this.accept(c.Percentage)&&(r=!0),!r)return null;for(;this.accept(c.Comma);)if(r=!1,e.addChild(this._parseIdent())&&(r=!0),this.accept(c.Percentage)&&(r=!0),!r)return this.restoreAtMark(t),null;return this.peek(c.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;let e=this.create(Mn);return this.consumeToken(),!this.peekRegExp(c.Ident,/^--/)||!e.setName(this._parseIdent([z.Property]))?this.finish(e,f.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;let t=this.create(zn);this.consumeToken();let r=this._parseLayerNameList();return r&&t.setNames(r),(!r||r.getChildren().length===1)&&this.peek(c.CurlyL)?this._parseBody(t,this._parseLayerDeclaration.bind(this,e)):this.accept(c.SemiColon)?this.finish(t):this.finish(t,f.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){let e=this.createNode(m.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(c.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,f.IdentifierExpected);return this.finish(e)}_parseLayerName(){let e=this.createNode(m.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,f.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;let t=this.create(et);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){let e=this.create(Re);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(c.Ident,/^(and|or)$/i)){let t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){let e=this.create(Re);if(this.accept(c.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([c.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,f.ConditionExpected):this.accept(c.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,f.RightParenthesisExpected,[c.ParenthesisR],[]);if(this.peek(c.Ident)){let t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(c.ParenthesisL)){let r=1;for(;this.token.type!==c.EOF&&r!==0;)this.token.type===c.ParenthesisL?r++:this.token.type===c.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(t)}return this.finish(e,f.LeftParenthesisExpected,[],[c.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;let t=this.create(Be);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,f.MediaQueryExpected)}_parseMediaQueryList(){let e=this.create(ut);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,f.MediaQueryExpected);for(;this.accept(c.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,f.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){let e=this.create(ft),t=this.mark();if(this.acceptIdent("not"),this.peek(c.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){let e=this.mark(),t=this.create(Un);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,f.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){let e=this.create(On);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[],[c.CurlyL]);if(this.peek(c.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[],[c.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){let e=[c.ParenthesisR],t=this.create(Pn);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(c.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,f.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,f.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,f.TermExpected,[],e)}}else if(t.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(t,f.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,f.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,f.TermExpected,[],e)}else return this.finish(t,f.IdentifierExpected,[],e);return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){let e=this.create(x);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;let e=this.create(An);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(c.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,f.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(c.AtKeyword))return null;let e=this.create(Wn);return this.acceptOneKeyword(Ks)||this.markError(e,f.UnknownAtRule,[],[c.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(c.Ident)&&!this.peek(c.Colon))return null;let e=this.create(x);return e.addChild(this._parseIdent()),this.accept(c.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,f.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;let e=this.create(Tn);return this.consumeToken(),this.resync([],[c.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;let t=this.create(Nn);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){let e=this.create(x);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){let e=this.create(x);if(this.accept(c.ParenthesisL)){if(this.peekIdent("not")||this.peek(c.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[],[c.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[],[c.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[],[c.CurlyL])}else return this.finish(e,f.LeftParenthesisExpected,[],[c.CurlyL]);return this.finish(e)}_parseStyleQuery(){let e=this.create(x);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(c.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([c.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){let e=this.create(x);if(this.accept(c.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[],[c.CurlyL])}else return this.finish(e,f.LeftParenthesisExpected,[],[c.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(c.AtKeyword))return null;let e=this.create(bt);e.addChild(this._parseUnknownAtRuleName());let t=()=>i===0&&s===0&&a===0,r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case c.SemiColon:if(t())break e;break;case c.EOF:return i>0?this.finish(e,f.RightCurlyExpected):a>0?this.finish(e,f.RightSquareBracketExpected):s>0?this.finish(e,f.RightParenthesisExpected):this.finish(e);case c.CurlyL:r++,i++;break;case c.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,f.RightSquareBracketExpected);if(s>0)return this.finish(e,f.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,f.LeftCurlyExpected)}break;case c.ParenthesisL:s++;break;case c.ParenthesisR:if(s--,s<0)return this.finish(e,f.LeftParenthesisExpected);break;case c.BracketL:a++;break;case c.BracketR:if(a--,a<0)return this.finish(e,f.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){let e=this.create(x);return this.accept(c.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(c.Dashmatch)||this.peek(c.Includes)||this.peek(c.SubstringOperator)||this.peek(c.PrefixOperator)||this.peek(c.SuffixOperator)||this.peekDelim("=")){let e=this.createNode(m.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;let e=this.create(x);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){let e=this.create(x);this.consumeToken();let t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=m.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=m.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){let e=this.create(x);return this.consumeToken(),e.type=m.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){let e=this.create(x);return this.consumeToken(),e.type=m.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){let e=this.create(x);this.consumeToken();let t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=m.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){let e=this.create(he),t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(m.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(c.Hash)&&!this.peekDelim("#"))return null;let e=this.createNode(m.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,f.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;let e=this.createNode(m.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,f.IdentifierExpected):this.finish(e)}_parseElementName(){let e=this.mark(),t=this.createNode(m.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(t)}_parseNamespacePrefix(){let e=this.mark(),t=this.createNode(m.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(c.BracketL))return null;let e=this.create($n);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(c.BracketR)?this.finish(e):this.finish(e,f.RightSquareBracketExpected)):this.finish(e,f.IdentifierExpected)}_parsePseudo(){let e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(c.ParenthesisL)){let t=()=>{let i=this.create(x);if(!i.addChild(this._parseSelector(!0)))return null;for(;this.accept(c.Comma)&&i.addChild(this._parseSelector(!0)););return this.peek(c.ParenthesisR)?this.finish(i):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(t)))return this.finish(e,f.SelectorExpected);if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(c.Colon))return null;let e=this.mark(),t=this.createNode(m.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(c.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,f.IdentifierExpected):this.finish(t))}_tryParsePrio(){let e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(c.Exclamation))return null;let e=this.createNode(m.Prio);return this.accept(c.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){let t=this.create(gt);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(c.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;let e=this.create(gn);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(c.BracketL))return null;let e=this.createNode(m.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(c.BracketR)?this.finish(e):this.finish(e,f.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let r=this.create(qe);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(t||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,f.TermExpected);r=this.finish(r);let i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)}_parseTerm(){let e=this.create(Ln);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(c.ParenthesisL))return null;let e=this.create(x);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(c.ParenthesisR)?this.finish(e):this.finish(e,f.RightParenthesisExpected)}_parseNumeric(){if(this.peek(c.Num)||this.peek(c.Percentage)||this.peek(c.Resolution)||this.peek(c.Length)||this.peek(c.EMS)||this.peek(c.EXS)||this.peek(c.Angle)||this.peek(c.Time)||this.peek(c.Dimension)||this.peek(c.ContainerQueryLength)||this.peek(c.Freq)){let e=this.create(nt);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(c.String)&&!this.peek(c.BadString))return null;let e=this.createNode(m.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(c.Ident,/^url(-prefix)?$/i))return null;let e=this.mark(),t=this.createNode(m.URILiteral);return this.accept(c.Ident),this.hasWhitespace()||!this.peek(c.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(c.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected))}_parseURLArgument(){let e=this.create(x);return!this.accept(c.String)&&!this.accept(c.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(c.Ident))return null;let t=this.create(G);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(c.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){let e=this.mark(),t=this.create(me);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(c.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,f.ExpressionExpected);return this.accept(c.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(c.Ident))return null;let e=this.create(G);if(e.referenceTypes=[z.Function],this.acceptIdent("progid")){if(this.accept(c.Colon))for(;this.accept(c.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){let e=this.create(le);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(c.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){let e=this.create(tt);return this.consumeToken(),this.finish(e)}else return null}};function Hs(n,e){let t=0,r=n.length;if(r===0)return 0;for(;te+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){let r=e+t,i=Hs(this.children,a=>a.offset>r);if(i===0)return this;let s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+t?s.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let r=0;r{"use strict";var n={470:i=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,d){for(var h,u="",w=0,b=-1,y=0,E=0;E<=o.length;++E){if(E2){var A=u.lastIndexOf("/");if(A!==u.length-1){A===-1?(u="",w=0):w=(u=u.slice(0,A)).length-1-u.lastIndexOf("/"),b=E,y=0;continue}}else if(u.length===2||u.length===1){u="",w=0,b=E,y=0;continue}}d&&(u.length>0?u+="/..":u="..",w=2)}else u.length>0?u+="/"+o.slice(b+1,E):u=o.slice(b+1,E),w=E-b-1;b=E,y=0}else h===46&&y!==-1?++y:y=-1}return u}var l={resolve:function(){for(var o,d="",h=!1,u=arguments.length-1;u>=-1&&!h;u--){var w;u>=0?w=arguments[u]:(o===void 0&&(o=process.cwd()),w=o),s(w),w.length!==0&&(d=w+"/"+d,h=w.charCodeAt(0)===47)}return d=a(d,!h),h?d.length>0?"/"+d:"/":d.length>0?d:"."},normalize:function(o){if(s(o),o.length===0)return".";var d=o.charCodeAt(0)===47,h=o.charCodeAt(o.length-1)===47;return(o=a(o,!d)).length!==0||d||(o="."),o.length>0&&h&&(o+="/"),d?"/"+o:o},isAbsolute:function(o){return s(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,d=0;d0&&(o===void 0?o=h:o+="/"+h)}return o===void 0?".":l.normalize(o)},relative:function(o,d){if(s(o),s(d),o===d||(o=l.resolve(o))===(d=l.resolve(d)))return"";for(var h=1;hE){if(d.charCodeAt(b+I)===47)return d.slice(b+I+1);if(I===0)return d.slice(b+I)}else w>E&&(o.charCodeAt(h+I)===47?A=I:I===0&&(A=0));break}var P=o.charCodeAt(h+I);if(P!==d.charCodeAt(b+I))break;P===47&&(A=I)}var T="";for(I=h+A+1;I<=u;++I)I!==u&&o.charCodeAt(I)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+d.slice(b+A):(b+=A,d.charCodeAt(b)===47&&++b,d.slice(b))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var d=o.charCodeAt(0),h=d===47,u=-1,w=!0,b=o.length-1;b>=1;--b)if((d=o.charCodeAt(b))===47){if(!w){u=b;break}}else w=!1;return u===-1?h?"/":".":h&&u===1?"//":o.slice(0,u)},basename:function(o,d){if(d!==void 0&&typeof d!="string")throw new TypeError('"ext" argument must be a string');s(o);var h,u=0,w=-1,b=!0;if(d!==void 0&&d.length>0&&d.length<=o.length){if(d.length===o.length&&d===o)return"";var y=d.length-1,E=-1;for(h=o.length-1;h>=0;--h){var A=o.charCodeAt(h);if(A===47){if(!b){u=h+1;break}}else E===-1&&(b=!1,E=h+1),y>=0&&(A===d.charCodeAt(y)?--y==-1&&(w=h):(y=-1,w=E))}return u===w?w=E:w===-1&&(w=o.length),o.slice(u,w)}for(h=o.length-1;h>=0;--h)if(o.charCodeAt(h)===47){if(!b){u=h+1;break}}else w===-1&&(b=!1,w=h+1);return w===-1?"":o.slice(u,w)},extname:function(o){s(o);for(var d=-1,h=0,u=-1,w=!0,b=0,y=o.length-1;y>=0;--y){var E=o.charCodeAt(y);if(E!==47)u===-1&&(w=!1,u=y+1),E===46?d===-1?d=y:b!==1&&(b=1):d!==-1&&(b=-1);else if(!w){h=y+1;break}}return d===-1||u===-1||b===0||b===1&&d===u-1&&d===h+1?"":o.slice(d,u)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(d,h){var u=h.dir||h.root,w=h.base||(h.name||"")+(h.ext||"");return u?u===h.root?u+w:u+"/"+w:w}(0,o)},parse:function(o){s(o);var d={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return d;var h,u=o.charCodeAt(0),w=u===47;w?(d.root="/",h=1):h=0;for(var b=-1,y=0,E=-1,A=!0,I=o.length-1,P=0;I>=h;--I)if((u=o.charCodeAt(I))!==47)E===-1&&(A=!1,E=I+1),u===46?b===-1?b=I:P!==1&&(P=1):b!==-1&&(P=-1);else if(!A){y=I+1;break}return b===-1||E===-1||P===0||P===1&&b===E-1&&b===y+1?E!==-1&&(d.base=d.name=y===0&&w?o.slice(1,E):o.slice(y,E)):(y===0&&w?(d.name=o.slice(1,b),d.base=o.slice(1,E)):(d.name=o.slice(y,b),d.base=o.slice(y,E)),d.ext=o.slice(b,E)),y>0?d.dir=o.slice(0,y-1):w&&(d.dir="/"),d},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},e={};function t(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return n[i](a,a.exports,t),a.exports}t.d=(i,s)=>{for(var a in s)t.o(s,a)&&!t.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},t.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),t.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;t.r(r),t.d(r,{URI:()=>w,Utils:()=>Ie}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(S,v){if(!S.scheme&&v)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${S.authority}", path: "${S.path}", query: "${S.query}", fragment: "${S.fragment}"}`);if(S.scheme&&!s.test(S.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(S.path){if(S.authority){if(!a.test(S.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(l.test(S.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let d="",h="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static isUri(v){return v instanceof w||!!v&&typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="string"&&typeof v.with=="function"&&typeof v.toString=="function"}scheme;authority;path;query;fragment;constructor(v,F,C,N,D,M=!1){typeof v=="object"?(this.scheme=v.scheme||d,this.authority=v.authority||d,this.path=v.path||d,this.query=v.query||d,this.fragment=v.fragment||d):(this.scheme=function(oe,Z){return oe||Z?oe:"file"}(v,M),this.authority=F||d,this.path=function(oe,Z){switch(oe){case"https":case"http":case"file":Z?Z[0]!==h&&(Z=h+Z):Z=h}return Z}(this.scheme,C||d),this.query=N||d,this.fragment=D||d,o(this,M))}get fsPath(){return P(this,!1)}with(v){if(!v)return this;let{scheme:F,authority:C,path:N,query:D,fragment:M}=v;return F===void 0?F=this.scheme:F===null&&(F=d),C===void 0?C=this.authority:C===null&&(C=d),N===void 0?N=this.path:N===null&&(N=d),D===void 0?D=this.query:D===null&&(D=d),M===void 0?M=this.fragment:M===null&&(M=d),F===this.scheme&&C===this.authority&&N===this.path&&D===this.query&&M===this.fragment?this:new y(F,C,N,D,M)}static parse(v,F=!1){let C=u.exec(v);return C?new y(C[2]||d,Y(C[4]||d),Y(C[5]||d),Y(C[7]||d),Y(C[9]||d),F):new y(d,d,d,d,d)}static file(v){let F=d;if(i&&(v=v.replace(/\\/g,h)),v[0]===h&&v[1]===h){let C=v.indexOf(h,2);C===-1?(F=v.substring(2),v=h):(F=v.substring(2,C),v=v.substring(C)||h)}return new y("file",F,v,d,d)}static from(v){let F=new y(v.scheme,v.authority,v.path,v.query,v.fragment);return o(F,!0),F}toString(v=!1){return T(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof w)return v;{let F=new y(v);return F._formatted=v.external,F._fsPath=v._sep===b?v.fsPath:null,F}}return v}}let b=i?1:void 0;class y extends w{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=P(this,!1)),this._fsPath}toString(v=!1){return v?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let v={$mid:1};return this._fsPath&&(v.fsPath=this._fsPath,v._sep=b),this._formatted&&(v.external=this._formatted),this.path&&(v.path=this.path),this.scheme&&(v.scheme=this.scheme),this.authority&&(v.authority=this.authority),this.query&&(v.query=this.query),this.fragment&&(v.fragment=this.fragment),v}}let E={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function A(S,v,F){let C,N=-1;for(let D=0;D=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57||M===45||M===46||M===95||M===126||v&&M===47||F&&M===91||F&&M===93||F&&M===58)N!==-1&&(C+=encodeURIComponent(S.substring(N,D)),N=-1),C!==void 0&&(C+=S.charAt(D));else{C===void 0&&(C=S.substr(0,D));let oe=E[M];oe!==void 0?(N!==-1&&(C+=encodeURIComponent(S.substring(N,D)),N=-1),C+=oe):N===-1&&(N=D)}}return N!==-1&&(C+=encodeURIComponent(S.substring(N))),C!==void 0?C:S}function I(S){let v;for(let F=0;F1&&S.scheme==="file"?`//${S.authority}${S.path}`:S.path.charCodeAt(0)===47&&(S.path.charCodeAt(1)>=65&&S.path.charCodeAt(1)<=90||S.path.charCodeAt(1)>=97&&S.path.charCodeAt(1)<=122)&&S.path.charCodeAt(2)===58?v?S.path.substr(1):S.path[1].toLowerCase()+S.path.substr(2):S.path,i&&(F=F.replace(/\//g,"\\")),F}function T(S,v){let F=v?I:A,C="",{scheme:N,authority:D,path:M,query:oe,fragment:Z}=S;if(N&&(C+=N,C+=":"),(D||N==="file")&&(C+=h,C+=h),D){let $=D.indexOf("@");if($!==-1){let Ue=D.substr(0,$);D=D.substr($+1),$=Ue.lastIndexOf(":"),$===-1?C+=F(Ue,!1,!1):(C+=F(Ue.substr(0,$),!1,!1),C+=":",C+=F(Ue.substr($+1),!1,!0)),C+="@"}D=D.toLowerCase(),$=D.lastIndexOf(":"),$===-1?C+=F(D,!1,!0):(C+=F(D.substr(0,$),!1,!0),C+=D.substr($))}if(M){if(M.length>=3&&M.charCodeAt(0)===47&&M.charCodeAt(2)===58){let $=M.charCodeAt(1);$>=65&&$<=90&&(M=`/${String.fromCharCode($+32)}:${M.substr(3)}`)}else if(M.length>=2&&M.charCodeAt(1)===58){let $=M.charCodeAt(0);$>=65&&$<=90&&(M=`${String.fromCharCode($+32)}:${M.substr(2)}`)}C+=F(M,!0,!1)}return oe&&(C+="?",C+=F(oe,!1,!1)),Z&&(C+="#",C+=v?Z:A(Z,!1,!1)),C}function j(S){try{return decodeURIComponent(S)}catch{return S.length>3?S.substr(0,3)+j(S.substr(3)):S}}let X=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Y(S){return S.match(X)?S.replace(X,v=>j(v)):S}var $e=t(470);let K=$e.posix||$e,_e="/";var Ie;(function(S){S.joinPath=function(v,...F){return v.with({path:K.join(v.path,...F)})},S.resolvePath=function(v,...F){let C=v.path,N=!1;C[0]!==_e&&(C=_e+C,N=!0);let D=K.resolve(C,...F);return N&&D[0]===_e&&!v.authority&&(D=D.substring(1)),v.with({path:D})},S.dirname=function(v){if(v.path.length===0||v.path===_e)return v;let F=K.dirname(v.path);return F.length===1&&F.charCodeAt(0)===46&&(F=""),v.with({path:F})},S.basename=function(v){return K.basename(v.path)},S.extname=function(v){return K.extname(v.path)}})(Ie||(Ie={}))})(),Js=r})();var{URI:Zt,Utils:Fe}=Js;function ar(n){return Fe.dirname(Zt.parse(n)).toString(!0)}function Je(n,...e){return Fe.joinPath(Zt.parse(n),...e).toString(!0)}var cr=class{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){let r={items:[],isIncomplete:!1};for(let i of this.literalCompletions){let s=i.uriValue,a=vi(s);if(a==="."||a==="..")r.isIncomplete=!0;else{let l=await this.providePathSuggestions(s,i.position,i.range,e,t);for(let o of l)r.items.push(o)}}for(let i of this.importCompletions){let s=i.pathValue,a=vi(s);if(a==="."||a==="..")r.isIncomplete=!0;else{let l=await this.providePathSuggestions(s,i.position,i.range,e,t);e.languageId==="scss"&&l.forEach(o=>{V(o.label,"_")&&fn(o.label,".scss")&&(o.textEdit?o.textEdit.newText=o.label.slice(1,-5):o.label=o.label.slice(1,-5))});for(let o of l)r.items.push(o)}}return r}async providePathSuggestions(e,t,r,i,s){let a=vi(e),l=V(e,"'")||V(e,'"'),o=l?a.slice(0,t.character-(r.start.character+1)):a.slice(0,t.character-r.start.character),d=i.uri,h=l?ba(r,1,-1):r,u=fa(o,a,h),w=o.substring(0,o.lastIndexOf("/")+1),b=s.resolveReference(w||".",d);if(b)try{let y=[],E=await this.readDirectory(b);for(let[A,I]of E)A.charCodeAt(0)!==ua&&(I===st.Directory||Je(b,A)!==d)&&y.push(ga(A,I===st.Directory,u));return y}catch{}return[]}},ua=46;function vi(n){return V(n,"'")||V(n,'"')?n.slice(1,-1):n}function fa(n,e,t){let r,i=n.lastIndexOf("/");if(i===-1)r=t;else{let s=e.slice(i+1),a=dr(t.end,-s.length),l=s.indexOf(" "),o;l!==-1?o=dr(a,l):o=t.end,r=R.create(a,o)}return r}function ga(n,e,t){return e?(n=n+"/",{label:lr(n),kind:k.Folder,textEdit:_.replace(t,lr(n)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:lr(n),kind:k.File,textEdit:_.replace(t,lr(n))}}function lr(n){return n.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function dr(n,e){return H.create(n.line,n.character+e)}function ba(n,e,t){let r=dr(n.start,e),i=dr(n.end,t);return R.create(r,i)}var Ne=te.Snippet,Xs={title:"Suggest",command:"editor.action.triggerSuggest"},Ee;(function(n){n.Enums=" ",n.Normal="d",n.VendorPrefixed="x",n.Term="y",n.Variable="z"})(Ee||(Ee={}));var Xe=class{constructor(e=null,t,r){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=r,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new ot(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,r,i,s=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,r,s);let a=new cr(this.lsOptions.fileSystemProvider.readDirectory),l=this.completionParticipants;this.completionParticipants=[a].concat(l);let o=this.doComplete(e,t,r,s);try{let d=await a.computeCompletions(e,i);return{isIncomplete:o.isIncomplete||d.isIncomplete,itemDefaults:o.itemDefaults,items:d.items.concat(o.items)}}finally{this.completionParticipants=l}}doComplete(e,t,r,i){this.offset=e.offsetAt(t),this.position=t,this.currentWord=va(e,this.offset),this.defaultReplaceRange=R.create(H.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=r,this.documentSettings=i;try{let s={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=vt(this.styleSheet,this.offset);for(let a=this.nodePath.length-1;a>=0;a--){let l=this.nodePath[a];if(l instanceof Ve)this.getCompletionsForDeclarationProperty(l.getParent(),s);else if(l instanceof gt)l.parent instanceof rt?this.getVariableProposals(null,s):this.getCompletionsForExpression(l,s);else if(l instanceof he){let o=l.findAParent(m.ExtendsReference,m.Ruleset);if(o)if(o.type===m.ExtendsReference)this.getCompletionsForExtendsReference(o,l,s);else{let d=o;this.getCompletionsForSelector(d,d&&d.isNested(),s)}}else if(l instanceof le)this.getCompletionsForFunctionArgument(l,l.getParent(),s);else if(l instanceof Ze)this.getCompletionsForDeclarations(l,s);else if(l instanceof xe)this.getCompletionsForVariableDeclaration(l,s);else if(l instanceof ae)this.getCompletionsForRuleSet(l,s);else if(l instanceof rt)this.getCompletionsForInterpolation(l,s);else if(l instanceof De)this.getCompletionsForFunctionDeclaration(l,s);else if(l instanceof ze)this.getCompletionsForMixinReference(l,s);else if(l instanceof me)this.getCompletionsForFunctionArgument(null,l,s);else if(l instanceof et)this.getCompletionsForSupports(l,s);else if(l instanceof Re)this.getCompletionsForSupportsCondition(l,s);else if(l instanceof Se)this.getCompletionsForExtendsReference(l,null,s);else if(l.type===m.URILiteral)this.getCompletionForUriLiteralValue(l,s);else if(l.parent===null)this.getCompletionForTopLevel(s);else if(l.type===m.StringLiteral&&this.isImportPathParent(l.parent.type))this.getCompletionForImportPath(l,s);else continue;if(s.items.length>0||this.offset>l.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===m.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){let r=this.nodePath[t];if(e.indexOf(r.type)!==-1)return r}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){let r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(a=>{let l,o,d=!1;e?(l=this.getCompletionRange(e.getProperty()),o=a.name,ie(e.colonPosition)||(o+=": ",d=!0)):(l=this.getCompletionRange(null),o=a.name+": ",d=!0),!e&&i&&(o+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(l.end)&&(o+="$0;");let h={label:a.name,documentation:Ce(a,this.doesSupportMarkdown()),tags:en(a)?[Te.Deprecated]:[],textEdit:_.replace(l,o),insertTextFormat:te.Snippet,kind:k.Property};a.restrictions||(d=!1),r&&d&&(h.command=Xs);let w=(255-(typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50)).toString(16),b=V(a.name,"-")?Ee.VendorPrefixed:Ee.Normal;h.sortText=b+"_"+w,t.items.push(h)}),this.completionParticipants.forEach(a=>{a.onCssProperty&&a.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){let r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r),s=e.getValue()||null;for(;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(a=>{a.onCssPropertyValue&&a.onCssPropertyValue({propertyName:r,propertyValue:this.currentWord,range:this.getCompletionRange(s)})}),i){if(i.restrictions)for(let a of i.restrictions)switch(a){case"color":this.getColorProposals(i,s,t);break;case"position":this.getPositionProposals(i,s,t);break;case"repeat":this.getRepeatStyleProposals(i,s,t);break;case"line-style":this.getLineStyleProposals(i,s,t);break;case"line-width":this.getLineWidthProposals(i,s,t);break;case"geometry-box":this.getGeometryBoxProposals(i,s,t);break;case"box":this.getBoxProposals(i,s,t);break;case"image":this.getImageProposals(i,s,t);break;case"timing-function":this.getTimingFunctionProposals(i,s,t);break;case"shape":this.getBasicShapeProposals(i,s,t);break}this.getValueEnumProposals(i,s,t),this.getCSSWideKeywordProposals(i,s,t),this.getUnitProposals(i,s,t)}else{let a=wa(this.styleSheet,e);for(let l of a.getEntries())t.items.push({label:l,textEdit:_.replace(this.getCompletionRange(s),l),kind:k.Value})}return this.getVariableProposals(s,t),this.getTermProposals(i,s,t),t}getValueEnumProposals(e,t,r){if(e.values)for(let i of e.values){let s=i.name,a;if(fn(s,")")){let d=s.lastIndexOf("(");d!==-1&&(s=s.substring(0,d+1)+"$1"+s.substring(d+1),a=Ne)}let l=Ee.Enums;V(i.name,"-")&&(l+=Ee.VendorPrefixed);let o={label:i.name,documentation:Ce(i,this.doesSupportMarkdown()),tags:en(e)?[Te.Deprecated]:[],textEdit:_.replace(this.getCompletionRange(t),s),sortText:l,kind:k.Value,insertTextFormat:a};r.items.push(o)}return r}getCSSWideKeywordProposals(e,t,r){for(let i in hi)r.items.push({label:i,documentation:hi[i],textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});for(let i in pi){let s=Et(i);r.items.push({label:i,documentation:pi[i],textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Function,insertTextFormat:Ne,command:V(i,"var")?Xs:void 0})}return r}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let i of r){let s=V(i.name,"--")?`var(${i.name})`:i.name,a={label:i.name,documentation:i.value?zr(i.value):i.value,textEdit:_.replace(this.getCompletionRange(e),s),kind:k.Variable,sortText:Ee.Variable};if(typeof a.documentation=="string"&&ii(a.documentation)&&(a.kind=k.Color),i.node.type===m.FunctionParameter){let l=i.node.getParent();l.type===m.MixinDeclaration&&(a.detail=p("argument from '{0}'",l.getName()))}t.items.push(a)}return t}getVariableProposalsForCSSVarFunction(e){let t=new tn;this.styleSheet.acceptVisitor(new xi(t,this.offset));let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let i of r){if(V(i.name,"--")){let s={label:i.name,documentation:i.value?zr(i.value):i.value,textEdit:_.replace(this.getCompletionRange(null),i.name),kind:k.Variable};typeof s.documentation=="string"&&ii(s.documentation)&&(s.kind=k.Color),e.items.push(s)}t.remove(i.name)}for(let i of t.getEntries())if(V(i,"--")){let s={label:i,textEdit:_.replace(this.getCompletionRange(null),i),kind:k.Variable};e.items.push(s)}return e}getUnitProposals(e,t,r){let i="0";if(this.currentWord.length>0){let s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(t&&t.parent&&t.parent.type===m.Term&&(t=t.getParent()),e.restrictions)for(let s of e.restrictions){let a=ir[s];if(a)for(let l of a){let o=i+l;r.items.push({label:o,textEdit:_.replace(this.getCompletionRange(t),o),kind:k.Unit})}}return r}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let t=e.end!==-1?this.textDocument.positionAt(e.end):this.position,r=this.textDocument.positionAt(e.offset);if(r.line===t.line)return R.create(r,t)}return this.defaultReplaceRange}getColorProposals(e,t,r){for(let s in Xt)r.items.push({label:s,documentation:Xt[s],textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Color});for(let s in rr)r.items.push({label:s,documentation:rr[s],textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Value});let i=new tn;this.styleSheet.acceptVisitor(new yi(i,this.offset));for(let s of i.getEntries())r.items.push({label:s,textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Color});for(let s of Ws)r.items.push({label:s.label,detail:s.func,documentation:s.desc,textEdit:_.replace(this.getCompletionRange(t),s.insertText),insertTextFormat:Ne,kind:k.Function});return r}getPositionProposals(e,t,r){for(let i in oi)r.items.push({label:i,documentation:oi[i],textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});return r}getRepeatStyleProposals(e,t,r){for(let i in ai)r.items.push({label:i,documentation:ai[i],textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});return r}getLineStyleProposals(e,t,r){for(let i in li)r.items.push({label:i,documentation:li[i],textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});return r}getLineWidthProposals(e,t,r){for(let i of js)r.items.push({label:i,textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});return r}getGeometryBoxProposals(e,t,r){for(let i in di)r.items.push({label:i,documentation:di[i],textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});return r}getBoxProposals(e,t,r){for(let i in ci)r.items.push({label:i,documentation:ci[i],textEdit:_.replace(this.getCompletionRange(t),i),kind:k.Value});return r}getImageProposals(e,t,r){for(let i in mi){let s=Et(i);r.items.push({label:i,documentation:mi[i],textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Function,insertTextFormat:i!==s?Ne:void 0})}return r}getTimingFunctionProposals(e,t,r){for(let i in ui){let s=Et(i);r.items.push({label:i,documentation:ui[i],textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Function,insertTextFormat:i!==s?Ne:void 0})}return r}getBasicShapeProposals(e,t,r){for(let i in fi){let s=Et(i);r.items.push({label:i,documentation:fi[i],textEdit:_.replace(this.getCompletionRange(t),s),kind:k.Function,insertTextFormat:i!==s?Ne:void 0})}return r}getCompletionsForStylesheet(e){let t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof ae?this.getCompletionsForRuleSet(t,e):t instanceof et?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:_.replace(this.getCompletionRange(null),t.name),documentation:Ce(t,this.doesSupportMarkdown()),tags:en(t)?[Te.Deprecated]:[],kind:k.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){let r=e.getDeclarations();return r&&r.endsWith("}")&&this.offset>=r.end?this.getCompletionForTopLevel(t):!r||this.offset<=r.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,r){let i=this.findInNodePath(m.PseudoSelector,m.IdentifierSelector,m.ClassSelector,m.ElementNameSelector);if(!i&&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=R.create(H.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(d=>{let h=Et(d.name),u={label:d.name,textEdit:_.replace(this.getCompletionRange(i),h),documentation:Ce(d,this.doesSupportMarkdown()),tags:en(d)?[Te.Deprecated]:[],kind:k.Function,insertTextFormat:d.name!==h?Ne:void 0};V(d.name,":-")&&(u.sortText=Ee.VendorPrefixed),r.items.push(u)}),this.cssDataManager.getPseudoElements().forEach(d=>{let h=Et(d.name),u={label:d.name,textEdit:_.replace(this.getCompletionRange(i),h),documentation:Ce(d,this.doesSupportMarkdown()),tags:en(d)?[Te.Deprecated]:[],kind:k.Function,insertTextFormat:d.name!==h?Ne:void 0};V(d.name,"::-")&&(u.sortText=Ee.VendorPrefixed),r.items.push(u)}),!t){for(let d of Bs)r.items.push({label:d,textEdit:_.replace(this.getCompletionRange(i),d),kind:k.Keyword});for(let d of qs)r.items.push({label:d,textEdit:_.replace(this.getCompletionRange(i),d),kind:k.Keyword})}let l={};l[this.currentWord]=!0;let o=this.textDocument.getText();if(this.styleSheet.accept(d=>{if(d.type===m.SimpleSelector&&d.length>0){let h=o.substr(d.offset,d.length);return h.charAt(0)==="."&&!l[h]&&(l[h]=!0,r.items.push({label:h,textEdit:_.replace(this.getCompletionRange(i),h),kind:k.Keyword})),!1}return!0}),e&&e.isNested()){let d=e.getSelectors().findFirstChildBeforeOffset(this.offset);d&&e.getSelectors().getChildren().indexOf(d)===0&&this.getPropertyProposals(null,r)}return r}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;let r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,t);if(r instanceof ht){let i=r;if(!ie(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,t);if(ie(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){let r=e.getParent();if(r instanceof le)return this.getCompletionsForFunctionArgument(r,r.getParent(),t),t;let i=e.findParent(m.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;let s=e.findChildAtOffset(this.offset,!0);return s?s instanceof nt||s instanceof G?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)}getCompletionsForFunctionArgument(e,t,r){let i=t.getIdentifier();return i&&i.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r}getCompletionsForFunctionDeclaration(e,t){let r=e.getDeclarations();return r&&this.offset>r.offset&&this.offset{s.onCssMixinReference&&s.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),t}getTermProposals(e,t,r){let i=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Function);for(let s of i)s.node instanceof De&&r.items.push(this.makeTermProposal(s,s.node.getParameters(),t));return r}makeTermProposal(e,t,r){let i=e.node,s=t.getChildren().map(l=>l instanceof ye?l.getName():l.getText()),a=e.name+"("+s.map((l,o)=>"${"+(o+1)+":"+l+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+s.join(", ")+")",textEdit:_.replace(this.getCompletionRange(r),a),insertTextFormat:Ne,kind:k.Function,sortText:Ee.Term}}getCompletionsForSupportsCondition(e,t){let r=e.findFirstChildBeforeOffset(this.offset);if(r){if(r instanceof Q)return!ie(r.colonPosition)||this.offset<=r.colonPosition?this.getCompletionsForDeclarationProperty(r,t):this.getCompletionsForDeclarationValue(r,t);if(r instanceof Re)return this.getCompletionsForSupportsCondition(r,t)}return ie(e.lParent)&&this.offset>e.lParent&&(!ie(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){let r=e.getDeclarations();if(!r||this.offset<=r.offset){let s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Re?this.getCompletionsForSupportsCondition(s,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,r){return r}getCompletionForUriLiteralValue(e,t){let r,i,s;if(e.hasChildren()){let a=e.getChild(0);r=a.getText(),i=this.position,s=this.getCompletionRange(a)}else{r="",i=this.position;let a=this.textDocument.positionAt(e.offset+4);s=R.create(a,a)}return this.completionParticipants.forEach(a=>{a.onCssURILiteralValue&&a.onCssURILiteralValue({uriValue:r,position:i,range:s})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(r=>{r.onCssImportPath&&r.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){let r=this.textDocument.getText();return e>=0&&e=0&&` \r":{[()]},*>+`.indexOf(r.charAt(t))===-1;)t--;return r.substring(t+1,e)}var rn=class n{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(let t of this.attributes)if(t.name===e)return t.value}return null}addChild(e){e instanceof n&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){let t=this.attributes[this.attributes.length-1];t.value=t.value+e}}prepend(e){if(this.attributes){let t=this.attributes[0];t.value=e+t.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Ye);)e=e.parent;return e}removeChild(e){if(this.children){let t=this.children.indexOf(e);if(t!==-1)return this.children.splice(t,1),!0}return!1}addAttr(e,t){this.attributes||(this.attributes=[]);for(let r of this.attributes)if(r.name===e){r.value+=" "+t;return}this.attributes.push({name:e,value:t})}clone(e=!0){let t=new n;if(this.attributes){t.attributes=[];for(let r of this.attributes)t.addAttr(r.name,r.value)}if(e&&this.children){t.children=[];for(let r=0;r"),this.writeLine(t,i.join(""))}},Oe;(function(n){function e(r,i){return i+t(r)+i}n.ensure=e;function t(r){let i=r.match(/^['"](.*)["']$/);return i?i[1]:r}n.remove=t})(Oe||(Oe={}));var nn=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function Ys(n,e){let t=new rn;for(let r of n.getChildren())switch(r.type){case m.SelectorCombinator:if(e){let l=r.getText().split("&");if(l.length===1){t.addAttr("name",l[0]);break}t=e.cloneWithParent(),l[0]&&t.findRoot().prepend(l[0]);for(let o=1;o1){let d=e.cloneWithParent();t.addChild(d.findRoot()),t=d}t.append(l[o])}}break;case m.SelectorPlaceholder:if(r.matches("@at-root"))return t;case m.ElementNameSelector:let i=r.getText();t.addAttr("name",i==="*"?"element":pe(i));break;case m.ClassSelector:t.addAttr("class",pe(r.getText().substring(1)));break;case m.IdentifierSelector:t.addAttr("id",pe(r.getText().substring(1)));break;case m.MixinDeclaration:t.addAttr("class",r.getName());break;case m.PseudoSelector:t.addAttr(pe(r.getText()),"");break;case m.AttributeSelector:let s=r,a=s.getIdentifier();if(a){let l=s.getValue(),o=s.getOperator(),d;if(l&&o)switch(pe(o.getText())){case"|=":d=`${Oe.remove(pe(l.getText()))}-\u2026`;break;case"^=":d=`${Oe.remove(pe(l.getText()))}\u2026`;break;case"$=":d=`\u2026${Oe.remove(pe(l.getText()))}`;break;case"~=":d=` \u2026 ${Oe.remove(pe(l.getText()))} \u2026 `;break;case"*=":d=`\u2026${Oe.remove(pe(l.getText()))}\u2026`;break;default:d=Oe.remove(pe(l.getText()));break}t.addAttr(pe(a.getText()),d)}break}return t}function pe(n){let e=new ce;e.setSource(n);let t=e.scanUnquotedString();return t?t.text:n}var pr=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){let r=xa(e);if(r){let i=new hr('"').print(r,t);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){let t=Ys(e),r=new hr('"').print(t);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){let t=e.match(/^::?([\w-]+)/);return t?!!this.cssDataManager.getPseudoElement("::"+t[1]):!1}selectorToSpecificityMarkedString(e){let t=s=>{let a=new nn,l=new nn;for(let o of s)for(let d of o.getChildren()){let h=r(d);if(h.id>l.id){l=h;continue}else if(h.idl.attr){l=h;continue}else if(h.attrl.tag){l=h;continue}}return a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag,a},r=s=>{let a=new nn;e:for(let l of s.getChildren()){switch(l.type){case m.IdentifierSelector:a.id++;break;case m.ClassSelector:case m.AttributeSelector:a.attr++;break;case m.ElementNameSelector:if(l.matches("*"))break;a.tag++;break;case m.PseudoSelector:let o=l.getText(),d=l.getChildren();if(this.isPseudoElementIdentifier(o)){if(o.match(/^::slotted/i)&&d.length>0){a.tag++;let h=t(d);a.id+=h.id,a.attr+=h.attr,a.tag+=h.tag;continue e}a.tag++;continue e}if(o.match(/^:where/i))continue e;if(o.match(/^:(?:not|has|is)/i)&&d.length>0){let h=t(d);a.id+=h.id,a.attr+=h.attr,a.tag+=h.tag;continue e}if(o.match(/^:(?:host|host-context)/i)&&d.length>0){a.attr++;let h=t(d);a.id+=h.id,a.attr+=h.attr,a.tag+=h.tag;continue e}if(o.match(/^:(?:nth-child|nth-last-child)/i)&&d.length>0){if(a.attr++,d.length===3&&d[1].type===23){let y=t(d[2].getChildren());a.id+=y.id,a.attr+=y.attr,a.tag+=y.tag;continue e}let h=new ke,u=d[1].getText();h.scanner.setSource(u);let w=h.scanner.scan(),b=h.scanner.scan();if(w.text==="n"||w.text==="-n"&&b.text==="of"){let y=[],A=u.slice(b.offset+2).split(",");for(let P of A){let T=h.internalParse(P,h._parseSelector);T&&y.push(T)}let I=t(y);a.id+=I.id,a.attr+=I.attr,a.tag+=I.tag;continue e}continue e}a.attr++;continue e}if(l.getChildren().length>0){let o=r(l);a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag}}return a},i=r(e);return`[${p("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}},Si=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Ye)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===m.SelectorCombinator)){let r=this.element.findRoot();r.parent instanceof Ye&&(t=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(let r of e.getChildren()){if(r instanceof he){if(this.prev instanceof he){let a=new sn("\u2026");this.element.addChild(a),this.element=a}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new sn("\u22EE"));let i=Ys(r,t),s=i.findRoot();this.element.addChild(s),this.element=i}(r instanceof he||r.type===m.SelectorCombinatorParent||r.type===m.SelectorCombinatorShadowPiercingDescendant||r.type===m.SelectorCombinatorSibling||r.type===m.SelectorCombinatorAllSiblings)&&(this.prev=r)}}};function ya(n){switch(n.type){case m.MixinDeclaration:case m.Stylesheet:return!0}return!1}function xa(n){if(n.matches("@at-root"))return null;let e=new Ye,t=[],r=n.getParent();if(r instanceof ae){let s=r.getParent();for(;s&&!ya(s);){if(s instanceof ae){if(s.getSelectors().matches("@at-root"))break;t.push(s)}s=s.getParent()}}let i=new Si(e);for(let s=t.length-1;s>=0;s--){let a=t[s].getSelectors().getChild(0);a&&i.processSelector(a)}return i.processSelector(n),e}var _t=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new pr(t)}configure(e){this.defaultSettings=e}doHover(e,t,r,i=this.defaultSettings){function s(h){return R.create(e.positionAt(h.offset),e.positionAt(h.end))}let a=e.offsetAt(t),l=vt(r,a),o=null,d;for(let h=0;htypeof t=="string"?t:t.value):e.value}doesSupportMarkdown(){if(!ie(this.supportsMarkdown)){if(!ie(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(se.Markdown)!==-1}return this.supportsMarkdown}};var Qs=/^\w+:\/\//,Zs=/^data:/,lt=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,r){let i=new ot(r),s=e.offsetAt(t),a=Hn(r,s);if(!a)return null;let l=i.findSymbolFromNode(a);return l?{uri:e.uri,range:Pe(l.node,e)}:null}findReferences(e,t,r){return this.findDocumentHighlights(e,t,r).map(s=>({uri:e.uri,range:s.range}))}getHighlightNode(e,t,r){let i=e.offsetAt(t),s=Hn(r,i);if(!(!s||s.type===m.Stylesheet||s.type===m.Declarations))return s.type===m.Identifier&&s.parent&&s.parent.type===m.ClassSelector&&(s=s.parent),s}findDocumentHighlights(e,t,r){let i=[],s=this.getHighlightNode(e,t,r);if(!s)return i;let a=new ot(r),l=a.findSymbolFromNode(s),o=s.getText();return r.accept(d=>{if(l){if(a.matchesSymbol(d,l))return i.push({kind:to(d),range:Pe(d,e)}),!1}else s&&s.type===d.type&&d.matches(o)&&i.push({kind:to(d),range:Pe(d,e)});return!0}),i}isRawStringDocumentLinkNode(e){return e.type===m.Import}findDocumentLinks(e,t,r){let i=this.findUnresolvedLinks(e,t),s=[];for(let a of i){let l=a.link,o=l.target;if(!(!o||Zs.test(o)))if(Qs.test(o))s.push(l);else{let d=r.resolveReference(o,e.uri);d&&(l.target=d),s.push(l)}}return s}async findDocumentLinks2(e,t,r){let i=this.findUnresolvedLinks(e,t),s=[];for(let a of i){let l=a.link,o=l.target;if(!(!o||Zs.test(o)))if(Qs.test(o))s.push(l);else{let d=await this.resolveReference(o,e.uri,r,a.isRawLink);d!==void 0&&(l.target=d,s.push(l))}}return s}findUnresolvedLinks(e,t){let r=[],i=s=>{let a=s.getText(),l=Pe(s,e);if(l.start.line===l.end.line&&l.start.character===l.end.character)return;(V(a,"'")||V(a,'"'))&&(a=a.slice(1,-1));let o=s.parent?this.isRawStringDocumentLinkNode(s.parent):!1;r.push({link:{target:a,range:l},isRawLink:o})};return t.accept(s=>{if(s.type===m.URILiteral){let a=s.getChild(0);return a&&i(a),!1}if(s.parent&&this.isRawStringDocumentLinkNode(s.parent)){let a=s.getText();return(V(a,"'")||V(a,'"'))&&i(s),!1}return!0}),r}findSymbolInformations(e,t){let r=[],i=(s,a,l)=>{let o=l instanceof x?Pe(l,e):l,d={name:s||p(""),kind:a,location:it.create(e.uri,o)};r.push(d)};return this.collectDocumentSymbols(e,t,i),r}findDocumentSymbols(e,t){let r=[],i=[],s=(a,l,o,d,h)=>{let u=o instanceof x?Pe(o,e):o,w=d instanceof x?Pe(d,e):d;(!w||!eo(u,w))&&(w=R.create(u.start,u.start));let b={name:a||p(""),kind:l,range:u,selectionRange:w},y=i.pop();for(;y&&!eo(y[1],u);)y=i.pop();if(y){let E=y[0];E.children||(E.children=[]),E.children.push(b),i.push(y)}else r.push(b);h&&i.push([b,Pe(h,e)])};return this.collectDocumentSymbols(e,t,s),r}collectDocumentSymbols(e,t,r){t.accept(i=>{if(i instanceof ae){for(let s of i.getSelectors().getChildren())if(s instanceof de){let a=R.create(e.positionAt(s.offset),e.positionAt(i.end));r(s.getText(),ge.Class,a,s,i.getDeclarations())}}else if(i instanceof xe)r(i.getName(),ge.Variable,i,i.getVariable(),void 0);else if(i instanceof ue)r(i.getName(),ge.Method,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof De)r(i.getName(),ge.Function,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof mt){let s=p("@keyframes {0}",i.getName());r(s,ge.Class,i,i.getIdentifier(),i.getDeclarations())}else if(i instanceof pt){let s=p("@font-face");r(s,ge.Class,i,void 0,i.getDeclarations())}else if(i instanceof Be){let s=i.getChild(0);if(s instanceof ut){let a="@media "+s.getText();r(a,ge.Module,i,s,i.getDeclarations())}}return!0})}findDocumentColors(e,t){let r=[];return t.accept(i=>{let s=Sa(i,e);return s&&r.push(s),!0}),r}getColorPresentations(e,t,r,i){let s=[],a=Math.round(r.red*255),l=Math.round(r.green*255),o=Math.round(r.blue*255),d;r.alpha===1?d=`rgb(${a}, ${l}, ${o})`:d=`rgba(${a}, ${l}, ${o}, ${r.alpha})`,s.push({label:d,textEdit:_.replace(i,d)}),r.alpha===1?d=`#${at(a)}${at(l)}${at(o)}`:d=`#${at(a)}${at(l)}${at(o)}${at(Math.round(r.alpha*255))}`,s.push({label:d,textEdit:_.replace(i,d)});let h=si(r);h.a===1?d=`hsl(${h.h}, ${Math.round(h.s*100)}%, ${Math.round(h.l*100)}%)`:d=`hsla(${h.h}, ${Math.round(h.s*100)}%, ${Math.round(h.l*100)}%, ${h.a})`,s.push({label:d,textEdit:_.replace(i,d)});let u=Us(r);return u.a===1?d=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:d=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,s.push({label:d,textEdit:_.replace(i,d)}),s}prepareRename(e,t,r){let i=this.getHighlightNode(e,t,r);if(i)return R.create(e.positionAt(i.offset),e.positionAt(i.end))}doRename(e,t,r,i){let a=this.findDocumentHighlights(e,t,i).map(l=>_.replace(l.range,r));return{changes:{[e.uri]:a}}}async resolveModuleReference(e,t,r){if(V(t,"file://")){let i=Ca(e);if(i&&i!=="."&&i!==".."){let s=r.resolveReference("/",t),a=ar(t),l=await this.resolvePathToModule(i,a,s);if(l){let o=e.substring(i.length+1);return Je(l,o)}}}}async mapReference(e,t){return e}async resolveReference(e,t,r,i=!1,s=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,r),i);let a=await this.mapReference(r.resolveReference(e,t),i);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;let l=await this.mapReference(await this.resolveModuleReference(e,t,r),i);if(l)return l}if(a&&!await this.fileExists(a)){let l=r.resolveReference("/",t);if(s&&l){if(e in s)return this.mapReference(Je(l,s[e]),i);let o=e.indexOf("/"),d=`${e.substring(0,o)}/`;if(d in s){let h=s[d].slice(0,-1),u=Je(l,h);return this.mapReference(u=Je(u,e.substring(d.length-1)),i)}}}return a}async resolvePathToModule(e,t,r){let i=Je(t,"node_modules",e,"package.json");if(await this.fileExists(i))return ar(i);if(r&&t.startsWith(r)&&t.length!==r.length)return this.resolvePathToModule(e,ar(t),r)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{let t=await this.fileSystemProvider.stat(e);return!(t.type===st.Unknown&&t.size===-1)}catch{return!1}}};function Sa(n,e){let t=Vs(n);if(t){let r=Pe(n,e);return{color:t,range:r}}return null}function Pe(n,e){return R.create(e.positionAt(n.offset),e.positionAt(n.end))}function eo(n,e){let t=e.start.line,r=e.end.line,i=n.start.line,s=n.end.line;return!(ts||r>s||t===i&&e.start.charactern.end.character)}function to(n){if(n.type===m.Selector)return Ge.Write;if(n instanceof G&&n.parent&&n.parent instanceof Ve&&n.isCustomProperty)return Ge.Write;if(n.parent)switch(n.parent.type){case m.FunctionDeclaration:case m.MixinDeclaration:case m.Keyframe:case m.VariableDeclaration:case m.FunctionParameter:return Ge.Write}return Ge.Read}function at(n){let e=n.toString(16);return e.length!==2?"0"+e:e}function Ca(n){let e=n.indexOf("/");if(e===-1)return"";if(n[0]==="@"){let t=n.indexOf("/",e+1);return t===-1?n:n.substring(0,t)}return n.substring(0,e)}var It=ee.Warning,no=ee.Error,be=ee.Ignore,q=class{constructor(e,t,r){this.id=e,this.message=t,this.defaultValue=r}},Ci=class{constructor(e,t,r){this.id=e,this.message=t,this.defaultValue=r}},W={AllVendorPrefixes:new q("compatibleVendorPrefixes",p("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),be),IncludeStandardPropertyWhenUsingVendorPrefix:new q("vendorPrefix",p("When using a vendor-specific prefix also include the standard property"),It),DuplicateDeclarations:new q("duplicateProperties",p("Do not use duplicate style definitions"),be),EmptyRuleSet:new q("emptyRules",p("Do not use empty rulesets"),It),ImportStatemement:new q("importStatement",p("Import statements do not load in parallel"),be),BewareOfBoxModelSize:new q("boxModel",p("Do not use width or height when using padding or border"),be),UniversalSelector:new q("universalSelector",p("The universal selector (*) is known to be slow"),be),ZeroWithUnit:new q("zeroUnits",p("No unit for zero needed"),be),RequiredPropertiesForFontFace:new q("fontFaceProperties",p("@font-face rule must define 'src' and 'font-family' properties"),It),HexColorLength:new q("hexColorLength",p("Hex colors must consist of three, four, six or eight hex numbers"),no),ArgsInColorFunction:new q("argumentsInColorFunction",p("Invalid number of parameters"),no),UnknownProperty:new q("unknownProperties",p("Unknown property."),It),UnknownAtRules:new q("unknownAtRules",p("Unknown at-rule."),It),IEStarHack:new q("ieHack",p("IE hacks are only necessary when supporting IE7 and older"),be),UnknownVendorSpecificProperty:new q("unknownVendorSpecificProperties",p("Unknown vendor specific property."),be),PropertyIgnoredDueToDisplay:new q("propertyIgnoredDueToDisplay",p("Property is ignored due to the display."),It),AvoidImportant:new q("important",p("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),be),AvoidFloat:new q("float",p("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),be),AvoidIdSelector:new q("idSelector",p("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),be)},ro={ValidProperties:new Ci("validProperties",p("A list of properties that are not validated against the `unknownProperties` rule."),[])},mr=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){let t=ka(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}};function ka(n){switch(n){case"ignore":return ee.Ignore;case"warning":return ee.Warning;case"error":return ee.Error}return null}var Dt=class{constructor(e){this.cssDataManager=e}doCodeActions(e,t,r,i){return this.doCodeActions2(e,t,r,i).map(s=>{let a=s.edit&&s.edit.documentChanges&&s.edit.documentChanges[0];return Me.create(s.title,"_css.applyCodeAction",e.uri,e.version,a&&a.edits)})}doCodeActions2(e,t,r,i){let s=[];if(r.diagnostics)for(let a of r.diagnostics)this.appendFixesForMarker(e,i,a,s);return s}getFixesForUnknownProperty(e,t,r,i){let s=t.getName(),a=[];this.cssDataManager.getProperties().forEach(o=>{let d=Hi(s,o.name);d>=s.length/2&&a.push({property:o.name,score:d})}),a.sort((o,d)=>d.score-o.score||o.property.localeCompare(d.property));let l=3;for(let o of a){let d=o.property,h=p("Rename to '{0}'",d),u=_.replace(r.range,d),w=qt.create(e.uri,e.version),b={documentChanges:[St.create(w,[u])]},y=Ht.create(h,b,Gt.QuickFix);if(y.diagnostics=[r],i.push(y),--l<=0)return}}appendFixesForMarker(e,t,r,i){if(r.code!==W.UnknownProperty.id)return;let s=e.offsetAt(r.range.start),a=e.offsetAt(r.range.end),l=vt(t,s);for(let o=l.length-1;o>=0;o--){let d=l[o];if(d instanceof Q){let h=d.getProperty();if(h&&h.offset===s&&h.end===a){this.getFixesForUnknownProperty(e,h,r,i);return}}}}};var ur=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function on(n,e,t,r){let i=n[e];i.value=t,t&&(gi(i.properties,r)||i.properties.push(r))}function Fa(n,e,t){on(n,"top",e,t),on(n,"right",e,t),on(n,"bottom",e,t),on(n,"left",e,t)}function ne(n,e,t,r){e==="top"||e==="right"||e==="bottom"||e==="left"?on(n,e,t,r):Fa(n,t,r)}function ki(n,e,t){switch(e.length){case 1:ne(n,void 0,e[0],t);break;case 2:ne(n,"top",e[0],t),ne(n,"bottom",e[0],t),ne(n,"right",e[1],t),ne(n,"left",e[1],t);break;case 3:ne(n,"top",e[0],t),ne(n,"right",e[1],t),ne(n,"left",e[1],t),ne(n,"bottom",e[2],t);break;case 4:ne(n,"top",e[0],t),ne(n,"right",e[1],t),ne(n,"bottom",e[2],t),ne(n,"left",e[3],t);break}}function Fi(n,e){for(let t of e)if(n.matches(t))return!0;return!1}function an(n,e=!0){return e&&Fi(n,["initial","unset"])?!1:parseFloat(n.getText())!==0}function io(n,e=!0){return n.map(t=>an(t,e))}function fr(n,e=!0){return!(Fi(n,["none","hidden"])||e&&Fi(n,["initial","unset"]))}function Ea(n,e=!0){return n.map(t=>fr(t,e))}function _a(n){let e=n.getChildren();if(e.length===1){let t=e[0];return an(t)&&fr(t)}for(let t of e){let r=t;if(!an(r,!1)||!fr(r,!1))return!1}return!0}function Ei(n){let e={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(let t of n){let r=t.node.value;if(!(typeof r>"u"))switch(t.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=t;break;case"height":e.height=t;break;default:let i=t.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:ne(e,i[1],_a(r),t);break;case"width":ne(e,i[1],an(r,!1),t);break;case"style":ne(e,i[1],fr(r,!0),t);break}break;case"width":ki(e,io(r.getChildren(),!1),t);break;case"style":ki(e,Ea(r.getChildren(),!0),t);break}break;case"padding":i.length===1?ki(e,io(r.getChildren(),!0),t):ne(e,i[1],an(r,!0),t);break}break}}return e}var gr=class{constructor(){this.data={}}add(e,t,r){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(t),r&&i.nodes.push(r)}},ln=class n{static entries(e,t,r,i,s){let a=new n(t,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)}constructor(e,t,r){this.cssDataManager=r,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new gr,this.validProperties={};let i=t.getSetting(ro.ValidProperties);Array.isArray(i)&&i.forEach(s=>{if(typeof s=="string"){let a=s.trim().toLowerCase();a.length&&(this.validProperties[a]=!0)}})}isValidPropertyDeclaration(e){let t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){let r=[];for(let i of e)i.fullPropertyName===t&&r.push(i);return r}fetchWithValue(e,t,r){let i=[];for(let s of e)if(s.fullPropertyName===t){let a=s.node.getValue();a&&this.findValueInExpression(a,r)&&i.push(s)}return i}findValueInExpression(e,t){let r=!1;return e.accept(i=>(i.type===m.Identifier&&i.matches(t)&&(r=!0),!r)),r}getEntries(e=ee.Warning|ee.Error){return this.warnings.filter(t=>(t.getLevel()&e)!==0)}addEntry(e,t,r){let i=new wt(e,t,this.settings.getRule(t),r);this.warnings.push(i)}getMissingNames(e,t){let r=e.slice(0);for(let s=0;s0){let o=this.fetch(r,"float");for(let d=0;d0){let o=this.fetch(r,"vertical-align");for(let d=0;d1)for(let w=0;wX.startsWith(j))&&y.delete(P)}}let E=[];for(let I=0,P=n.prefixes.length;Is instanceof qe?(i+=1,!1):!0),i!==r&&this.addEntry(e,W.ArgsInColorFunction)),!0}};ln.prefixes=["-ms-","-moz-","-o-","-webkit-"];var Rt=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,r=this.settings){if(r&&r.validate===!1)return[];let i=[];i.push.apply(i,Gn.entries(t)),i.push.apply(i,ln.entries(t,e,new mr(r&&r.lint),this.cssDataManager));let s=[];for(let l in W)s.push(W[l].id);function a(l){let o=R.create(e.positionAt(l.getOffset()),e.positionAt(l.getOffset()+l.getLength())),d=e.languageId;return{code:l.getRule().id,source:d,message:l.getMessage(),severity:l.getLevel()===ee.Warning?yt.Warning:yt.Error,range:o}}return i.filter(l=>l.getLevel()!==ee.Ignore).map(a)}};var so=47,Ia=10,Da=13,Ra=12,za=36,Ma=35,Ta=123,cn=61,Na=33,Oa=60,Pa=62,_i=46;var Ae=c.CustomToken,br=Ae++,Mt=Ae++,pc=Ae++,Ii=Ae++,Di=Ae++,wr=Ae++,vr=Ae++,dn=Ae++,mc=Ae++,zt=class extends ce{scanNext(e){if(this.stream.advanceIfChar(za)){let t=["$"];if(this.ident(t))return this.finishToken(e,br,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Ma,Ta])?this.finishToken(e,Mt):this.stream.advanceIfChars([cn,cn])?this.finishToken(e,Ii):this.stream.advanceIfChars([Na,cn])?this.finishToken(e,Di):this.stream.advanceIfChar(Oa)?this.stream.advanceIfChar(cn)?this.finishToken(e,vr):this.finishToken(e,c.Delim):this.stream.advanceIfChar(Pa)?this.stream.advanceIfChar(cn)?this.finishToken(e,wr):this.finishToken(e,c.Delim):this.stream.advanceIfChars([_i,_i,_i])?this.finishToken(e,dn):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([so,so])?(this.stream.advanceWhileChar(e=>{switch(e){case Ia:case Da:case Ra:return!1;default:return!0}}),!0):!1}};var hn=class{constructor(e,t){this.id=e,this.message=t}},yr={FromExpected:new hn("scss-fromexpected",p("'from' expected")),ThroughOrToExpected:new hn("scss-throughexpected",p("'through' or 'to' expected")),InExpected:new hn("scss-fromexpected",p("'in' expected"))};var xr=class extends ke{constructor(){super(new zt)}_parseStylesheetStatement(e=!1){return this.peek(c.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;let e=this.create(je);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,f.URIOrStringExpected);for(;this.accept(c.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,f.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(br))return null;let t=this.create(xe);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(c.Colon))return this.finish(t,f.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,f.VariableValueExpected,[],e);for(;this.peek(c.Exclamation);)if(!t.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(c.Ident,/^(default|global)$/))return this.finish(t,f.UnknownKeyword);this.consumeToken()}return this.peek(c.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(vr)||this.accept(wr)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(br))return null;let e=this.create(Ke);return this.consumeToken(),e}_parseModuleMember(){let e=this.mark(),t=this.create(jt);return t.setIdentifier(this._parseIdent([z.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,f.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(c.Ident)&&!this.peek(Mt)&&!this.peekDelim("-"))return null;let t=this.create(G);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(c.Ident,/^--/);let r=!1,i=()=>{let s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()};for(;(this.accept(c.Ident)||t.addChild(i())||r&&this.acceptRegexp(/^[\w-]/))&&(r=!0,!this.hasWhitespace()););return r?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Mt)){let e=this.create(rt);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(c.CurlyR)?this.finish(e):this.finish(e,f.ExpressionExpected):this.accept(c.CurlyR)?this.finish(e):this.finish(e,f.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Ii)||this.peek(Di)||this.peek(wr)||this.peek(vr)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){let e=this.createNode(m.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){let e=this.create(x);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(c.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)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){let t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;let r=this.create(Q);if(!r.setProperty(this._parseProperty()))return null;if(!this.accept(c.Colon))return this.finish(r,f.ColonExpected,[c.Colon],e||[c.SemiColon]);this.prevToken&&(r.colonPosition=this.prevToken.offset);let i=!1;if(r.setValue(this._parseExpr())&&(i=!0,r.addChild(this._parsePrio())),this.peek(c.CurlyL))r.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(r,f.PropertyValueExpected);return this.peek(c.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)}_parseNestedProperties(){let e=this.create(Ut);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){let e=this.create(Se);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,f.SelectorExpected);for(;this.accept(c.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(c.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,f.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(m.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(c.Num)||this.accept(c.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){let e=this.createNode(m.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){let e=this.createNode(m.SelectorPlaceholder);if(this.consumeToken(),this.accept(c.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,f.IdentifierExpected);if(!this.accept(c.Colon))return this.finish(e,f.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,f.IdentifierExpected);if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[c.CurlyR])}return this.finish(e)}return null}_parseElementName(){let e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(c.ParenthesisL)?(this.restoreAtMark(e),null):t}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;let e=this.createNode(m.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(c.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){let t=this.create(yn);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,f.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(c.CurlyL)){let r=this.create(kn);this._parseBody(r,e),t.setElseClause(r)}}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;let t=this.create(xn);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(t,yr.ThroughOrToExpected,[c.CurlyR]):t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,f.ExpressionExpected,[c.CurlyR]):this.finish(t,f.ExpressionExpected,[c.CurlyR]):this.finish(t,yr.FromExpected,[c.CurlyR]):this.finish(t,f.VariableNameExpected,[c.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;let t=this.create(Sn);this.consumeToken();let r=t.getVariables();if(!r.addChild(this._parseVariable()))return this.finish(t,f.VariableNameExpected,[c.CurlyR]);for(;this.accept(c.Comma);)if(!r.addChild(this._parseVariable()))return this.finish(t,f.VariableNameExpected,[c.CurlyR]);return this.finish(r),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,f.ExpressionExpected,[c.CurlyR]):this.finish(t,yr.InExpected,[c.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;let t=this.create(Cn);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,f.ExpressionExpected,[c.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;let e=this.create(De);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([z.Function])))return this.finish(e,f.IdentifierExpected,[c.CurlyR]);if(!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[c.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,f.VariableNameExpected)}return this.accept(c.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,f.RightParenthesisExpected,[c.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;let e=this.createNode(m.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,f.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;let e=this.create(ue);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([z.Mixin])))return this.finish(e,f.IdentifierExpected,[c.CurlyR]);if(this.accept(c.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,f.VariableNameExpected)}if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[c.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){let e=this.create(ye);return e.setIdentifier(this._parseVariable())?(this.accept(dn),this.accept(c.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,f.VariableValueExpected,[],[c.Comma,c.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;let e=this.create(Vn);if(this.consumeToken(),this.accept(c.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,f.ExpressionExpected)}if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;let e=this.create(ze);this.consumeToken();let t=this._parseIdent([z.Mixin]);if(!e.setIdentifier(t))return this.finish(e,f.IdentifierExpected,[c.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){let r=this._parseIdent([z.Mixin]);if(!r)return this.finish(e,f.IdentifierExpected,[c.CurlyR]);let i=this.create(jt);t.referenceTypes=[z.Module],i.setIdentifier(t),e.setIdentifier(r),e.addChild(i)}if(this.accept(c.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,f.ExpressionExpected)}if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(c.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){let e=this.create(jn);if(this.acceptIdent("using")){if(!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[c.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,f.VariableNameExpected)}if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[c.CurlyL])}return this.peek(c.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){let e=this.create(le),t=this.mark(),r=this._parseVariable();if(r)if(this.accept(c.Colon))e.setIdentifier(r);else{if(this.accept(dn))return e.setValue(r),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(dn),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){let e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(c.ParenthesisR)){this.restoreAtMark(e);let r=this.create(x);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return t}_parseOperation(){if(!this.peek(c.ParenthesisL))return null;let e=this.create(x);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(c.Comma);return this.accept(c.ParenthesisR)?this.finish(e):this.finish(e,f.RightParenthesisExpected)}_parseListElement(){let e=this.create(Bn),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(c.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,f.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;let e=this.create(En);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,f.StringLiteralExpected);if(!this.peek(c.SemiColon)&&!this.peek(c.EOF)){if(!this.peekRegExp(c.Ident,/as|with/))return this.finish(e,f.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([z.Module]))&&!this.acceptDelim("*"))return this.finish(e,f.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[c.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,f.VariableNameExpected);for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,f.VariableNameExpected);if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected)}}return!this.accept(c.SemiColon)&&!this.accept(c.EOF)?this.finish(e,f.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){let e=this.create(_n);return e.setIdentifier(this._parseVariable())?!this.accept(c.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,f.VariableValueExpected,[],[c.Comma,c.ParenthesisR]):this.accept(c.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,f.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;let e=this.create(In);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,f.StringLiteralExpected);if(this.acceptIdent("as")){let t=this._parseIdent([z.Forward]);if(!e.setIdentifier(t))return this.finish(e,f.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,f.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[c.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,f.VariableNameExpected);for(;this.accept(c.Comma)&&!this.peek(c.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,f.VariableNameExpected);if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,f.IdentifierOrVariableExpected);return!this.accept(c.SemiColon)&&!this.accept(c.EOF)?this.finish(e,f.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){let e=this.create(Dn);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(c.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}};var We=p("Sass documentation"),we=class n extends Xe{constructor(e,t){super("$",e,t),oo(n.scssModuleLoaders),oo(n.scssModuleBuiltIns)}isImportPathParent(e){return e===m.Forward||e===m.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,t){let r=e.getParent().type;if(r===m.Forward||r===m.Use)for(let i of n.scssModuleBuiltIns){let s={label:i.label,documentation:i.documentation,textEdit:_.replace(this.getCompletionRange(e),`'${i.label}'`),kind:k.Module};t.items.push(s)}return super.getCompletionForImportPath(e,t)}createReplaceFunction(){let e=1;return(t,r)=>"\\"+r+": ${"+e+++":"+(n.variableDefaults[r]||"")+"}"}createFunctionProposals(e,t,r,i){for(let s of e){let a=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),o={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:_.replace(this.getCompletionRange(t),a),insertTextFormat:te.Snippet,kind:k.Function};r&&(o.sortText="z"),i.items.push(o)}return i}getCompletionsForSelector(e,t,r){return this.createFunctionProposals(n.selectorFuncs,null,!0,r),super.getCompletionsForSelector(e,t,r)}getTermProposals(e,t,r){let i=n.builtInFuncs;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,t,!0,r),super.getTermProposals(e,t,r)}getColorProposals(e,t,r){return this.createFunctionProposals(n.colorProposals,t,!1,r),super.getColorProposals(e,t,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,r){let i=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Rule);for(let s of i){let a={label:s.name,textEdit:_.replace(this.getCompletionRange(t),s.name),kind:k.Function};r.items.push(a)}return r}getCompletionForAtDirectives(e){return e.items.push(...n.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...n.scssModuleLoaders),e}};we.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"};we.colorProposals=[{func:"red($color)",desc:p("Gets the red component of a color.")},{func:"green($color)",desc:p("Gets the green component of a color.")},{func:"blue($color)",desc:p("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:p("Mixes two colors together.")},{func:"hue($color)",desc:p("Gets the hue component of a color.")},{func:"saturation($color)",desc:p("Gets the saturation component of a color.")},{func:"lightness($color)",desc:p("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:p("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:p("Makes a color lighter.")},{func:"darken($color, $amount)",desc:p("Makes a color darker.")},{func:"saturate($color, $amount)",desc:p("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:p("Makes a color less saturated.")},{func:"grayscale($color)",desc:p("Converts a color to grayscale.")},{func:"complement($color)",desc:p("Returns the complement of a color.")},{func:"invert($color)",desc:p("Returns the inverse of a color.")},{func:"alpha($color)",desc:p("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:p("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:p("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:p("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:p("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:p("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:p("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:p("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:p("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:p("Converts a color into the format understood by IE filters.")}];we.selectorFuncs=[{func:"selector-nest($selectors\u2026)",desc:p("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors\u2026)",desc:p("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:p("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:p("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:p("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:p("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:p("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:p("Parses a selector into the format returned by &.")}];we.builtInFuncs=[{func:"unquote($string)",desc:p("Removes quotes from a string.")},{func:"quote($string)",desc:p("Adds quotes to a string.")},{func:"str-length($string)",desc:p("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:p("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:p("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:p("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:p("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:p("Converts a string to lower case.")},{func:"percentage($number)",desc:p("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:p("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:p("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:p("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:p("Returns the absolute value of a number.")},{func:"min($numbers)",desc:p("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:p("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:p("Returns a random number.")},{func:"length($list)",desc:p("Returns the length of a list.")},{func:"nth($list, $n)",desc:p("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:p("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:p("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:p("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:p("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:p("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:p("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:p("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:p("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:p("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:p("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:p("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:p("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:p("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:p("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:p("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:p("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:p("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:p("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:p("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:p("Returns the type of a value.")},{func:"unit($number)",desc:p("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:p("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:p("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args\u2026)",desc:p("Dynamically calls a Sass function.")}];we.scssAtDirectives=[{label:"@extend",documentation:p("Inherits the styles of another selector."),kind:k.Keyword},{label:"@at-root",documentation:p("Causes one or more rules to be emitted at the root of the document."),kind:k.Keyword},{label:"@debug",documentation:p("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:k.Keyword},{label:"@warn",documentation:p("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:k.Keyword},{label:"@error",documentation:p("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:k.Keyword},{label:"@if",documentation:p("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { $0 }`,insertTextFormat:te.Snippet,kind:k.Keyword},{label:"@for",documentation:p("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:te.Snippet,kind:k.Keyword},{label:"@each",documentation:p("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:te.Snippet,kind:k.Keyword},{label:"@while",documentation:p("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { $0 }`,insertTextFormat:te.Snippet,kind:k.Keyword},{label:"@mixin",documentation:p("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { $0 }`,insertTextFormat:te.Snippet,kind:k.Keyword},{label:"@include",documentation:p("Includes the styles defined by another mixin into the current rule."),kind:k.Keyword},{label:"@function",documentation:p("Defines complex operations that can be re-used throughout stylesheets."),kind:k.Keyword}];we.scssModuleLoaders=[{label:"@use",documentation:p("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:We,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:te.Snippet,kind:k.Keyword},{label:"@forward",documentation:p("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:We,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:te.Snippet,kind:k.Keyword}];we.scssModuleBuiltIns=[{label:"sass:math",documentation:p("Provides functions that operate on numbers."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:p("Makes it easy to combine, search, or split apart strings."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:p("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:p("Lets you access and modify values in lists."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:p("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:p("Provides access to Sass\u2019s powerful selector engine."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:p("Exposes the details of Sass\u2019s inner workings."),references:[{name:We,url:"https://sass-lang.com/documentation/modules/meta"}]}];function oo(n){n.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){let t=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+=` `,t.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=t}})}var ao=47,Wa=10,La=13,$a=12,Ri=96,zi=46,Ua=c.CustomToken,Sr=Ua++,Tt=class extends ce{scanNext(e){let t=this.escapedJavaScript();return t!==null?this.finishToken(e,t):this.stream.advanceIfChars([zi,zi,zi])?this.finishToken(e,Sr):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([ao,ao])?(this.stream.advanceWhileChar(e=>{switch(e){case Wa:case La:case $a:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===Ri?(this.stream.advance(1),this.stream.advanceWhileChar(t=>t!==Ri),this.stream.advanceIfChar(Ri)?c.EscapedJavaScript:c.BadEscapedJavaScript):null}};var Cr=class extends ke{constructor(){super(new Tt)}_parseStylesheetStatement(e=!1){return this.peek(c.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;let e=this.create(je);if(this.consumeToken(),this.accept(c.ParenthesisL)){if(!this.accept(c.Ident))return this.finish(e,f.IdentifierExpected,[c.SemiColon]);do if(!this.accept(c.Comma))break;while(this.accept(c.Ident));if(!this.accept(c.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[c.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,f.URIOrStringExpected,[c.SemiColon]):(!this.peek(c.SemiColon)&&!this.peek(c.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;let e=this.createNode(m.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(c.SemiColon)?this.finish(e):this.finish(e,f.SemiColonExpected):this.finish(e,f.StringLiteralExpected)}_parseMediaQuery(){let e=super._parseMediaQuery();if(!e){let t=this.create(ft);return t.addChild(this._parseVariable())?this.finish(t):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){let t=this.create(xe),r=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(this.accept(c.Colon)){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,f.VariableValueExpected,[],e);t.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(c.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(c.ParenthesisL)){let r=this.create(ue);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(c.Comma)||this.accept(c.SemiColon))&&!this.peek(c.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,f.IdentifierExpected,[],[c.ParenthesisR]);if(!this.accept(c.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(c.CurlyL))return null;let t=this.create(L);return this._parseBody(t,this._parseDetachedRuleSetBody.bind(this)),this.finish(t)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let t=!1;for(;this.peek(c.BracketL)&&(t=!0),!!e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){let e=this.create(x),t=this.mark();return this.accept(c.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(c.BracketR)||this.accept(c.BracketR)?e:(this.restoreAtMark(t),null):(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){let r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(c.AtKeyword))return null;let i=this.create(Ke),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(c.AtKeyword)&&!this.accept(c.Ident)?(this.restoreAtMark(s),null):!t&&this.peek(c.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(c.EscapedJavaScript)||this.peek(c.BadEscapedJavaScript)){let e=this.createNode(m.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){let e=this.createNode(m.EscapedValue);return this.consumeToken(),this.accept(c.String)||this.accept(c.EscapedJavaScript)?this.finish(e):this.finish(e,f.TermExpected)}return null}_parseOperator(){let e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){let e=this.createNode(m.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){let e=this.createNode(m.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){let e=this.createNode(m.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(c.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([z.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){let t=this.create(de),r=!1;for(e&&(r=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){r=!0;let i=this.mark();if(t.addChild(this._parseGuard())&&this.peek(c.CurlyL))break;this.restoreAtMark(i),t.addChild(this._parseCombinator())}return r?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(m.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(c.Num)||this.accept(c.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;let e=this.createNode(m.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){let t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;let r=this.mark(),i=this.create(G);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let s=!1;return e?i.isCustomProperty?s=i.addChild(this._parseIdent()):s=i.addChild(this._parseRegexp(t)):i.isCustomProperty?s=this._acceptInterpolatedIdent(i):s=this._acceptInterpolatedIdent(i,t),s?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(r),null)}peekInterpolatedIdent(){return this.peek(c.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let r=!1,i=()=>{let a=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(a),null):this._parseInterpolation()},s=t?()=>this.acceptRegexp(t):()=>this.accept(c.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(i)))&&(r=!0,!this.hasWhitespace()););return r}_parseInterpolation(){let e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){let t=this.createNode(m.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(c.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(c.CurlyR)?this.finish(t):this.finish(t,f.RightCurlyExpected):this.finish(t,f.IdentifierExpected)}return null}_tryParseMixinDeclaration(){let e=this.mark(),t=this.create(ue);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(c.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(c.Comma)||this.accept(c.SemiColon))&&!this.peek(c.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,f.IdentifierExpected,[],[c.ParenthesisR]);return this.accept(c.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(c.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(G),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(c.Hash))e=this.create(G),this.consumeToken();else return null;return e.referenceTypes=[z.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(c.Colon))return null;let e=this.mark(),t=this.create(Se);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;let e=this.mark(),t=this.create(Se);return this.consumeToken(),this.hasWhitespace()||!this.accept(c.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(t)}_completeExtends(e){if(!this.accept(c.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected);let t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,f.SelectorExpected);for(;this.accept(c.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,f.SelectorExpected);return this.accept(c.ParenthesisR)?this.finish(e):this.finish(e,f.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(c.AtKeyword))return null;let e=this.mark(),t=this.create(ze);return t.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(c.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(c.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)}_tryParseMixinReference(e=!0){let t=this.mark(),r=this.create(ze),i=this._parseMixinDeclarationIdentifier();for(;i;){this.acceptDelim(">");let a=this._parseMixinDeclarationIdentifier();if(a)r.getNamespaces().addChild(i),i=a;else break}if(!r.setIdentifier(i))return this.restoreAtMark(t),null;let s=!1;if(this.accept(c.ParenthesisL)){if(s=!0,r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(c.Comma)||this.accept(c.SemiColon))&&!this.peek(c.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,f.ExpressionExpected)}if(!this.accept(c.ParenthesisR))return this.finish(r,f.RightParenthesisExpected);i.referenceTypes=[z.Mixin]}else i.referenceTypes=[z.Mixin,z.Rule];return this.peek(c.BracketL)?e||this._addLookupChildren(r):r.addChild(this._parsePrio()),!s&&!this.peek(c.SemiColon)&&!this.peek(c.CurlyR)&&!this.peek(c.EOF)?(this.restoreAtMark(t),null):this.finish(r)}_parseMixinArgument(){let e=this.create(le),t=this.mark(),r=this._parseVariable();return r&&(this.accept(c.Colon)?e.setIdentifier(r):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)}_parseMixinParameter(){let e=this.create(ye);if(this.peekKeyword("@rest")){let r=this.create(x);return this.consumeToken(),this.accept(Sr)?(e.setIdentifier(this.finish(r)),this.finish(e)):this.finish(e,f.DotExpected,[],[c.Comma,c.ParenthesisR])}if(this.peek(Sr)){let r=this.create(x);return this.consumeToken(),e.setIdentifier(this.finish(r)),this.finish(e)}let t=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(c.Colon),t=!0),!e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!t?null:this.finish(e)}_parseGuard(){if(!this.peekIdent("when"))return null;let e=this.create(qn);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,f.ConditionExpected);for(;this.acceptIdent("and")||this.accept(c.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,f.ConditionExpected);return this.finish(e)}_parseGuardCondition(){let e=this.create(Kn);return e.isNegated=this.acceptIdent("not"),this.accept(c.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(c.ParenthesisR)?this.finish(e):this.finish(e,f.RightParenthesisExpected)):e.isNegated?this.finish(e,f.LeftParenthesisExpected):null}_parseFunction(){let e=this.mark(),t=this.create(me);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(c.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(c.Comma)||this.accept(c.SemiColon))&&!this.peek(c.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,f.ExpressionExpected)}return this.accept(c.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){let e=this.create(G);return e.referenceTypes=[z.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){let e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(c.ParenthesisR)){this.restoreAtMark(e);let r=this.create(x);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return t}};var Nt=class n extends Xe{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,r,i){for(let s of e){let a={label:s.name,detail:s.example,documentation:s.description,textEdit:_.replace(this.getCompletionRange(t),s.name+"($0)"),insertTextFormat:te.Snippet,kind:k.Function};r&&(a.sortText="z"),i.items.push(a)}return i}getTermProposals(e,t,r){let i=n.builtInProposals;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,t,!0,r),super.getTermProposals(e,t,r)}getColorProposals(e,t,r){return this.createFunctionProposals(n.colorProposals,t,!1,r),super.getColorProposals(e,t,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}};Nt.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:p("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:p('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:p("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:p("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:p("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:p("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:p("URL encodes a string")},{name:"e",example:"e(@string);",description:p("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:p("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:p("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:p("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:p("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:p("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:p("absolute value of a number"),example:"abs(number);"},{name:"acos",description:p("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:p("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:p("rounds up to an integer")},{name:"cos",description:p("cosine function"),example:"cos(number);"},{name:"floor",description:p("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:p("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:p("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:p("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:p("sine function"),example:"sin(number);"},{name:"tan",description:p("tangent function"),example:"tan(number);"},{name:"atan",description:p("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:p("returns pi"),example:"pi();"},{name:"pow",description:p("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:p("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:p("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:p("returns the lowest of one or more values"),example:"max(@x, @y);"}];Nt.colorProposals=[{name:"argb",example:"argb(@color);",description:p("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:p("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:p("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:p("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:p("creates a color")},{name:"hue",example:"hue(@color);",description:p("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:p("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:p("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:p("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:p("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:p("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:p("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:p("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:p("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:p("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:p("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:p("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:p("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:p("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:p("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:p("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:p("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:p("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:p("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:p("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:p("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:p("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);"}];function co(n,e){let t=ja(n);return Ba(t,e)}function ja(n){function e(h){return n.positionAt(h.offset).line}function t(h){return n.positionAt(h.offset+h.len).line}function r(){switch(n.languageId){case"scss":return new zt;case"less":return new Tt;default:return new ce}}function i(h,u){let w=e(h),b=t(h);return w!==b?{startLine:w,endLine:b,kind:u}:null}let s=[],a=[],l=r();l.ignoreComment=!1,l.setSource(n.getText());let o=l.scan(),d=null;for(;o.type!==c.EOF;){switch(o.type){case c.CurlyL:case Mt:{a.push({line:e(o),type:"brace",isStart:!0});break}case c.CurlyR:{if(a.length!==0){let h=lo(a,"brace");if(!h)break;let u=t(o);h.type==="brace"&&(d&&t(d)!==u&&u--,h.line!==u&&s.push({startLine:h.line,endLine:u,kind:void 0}))}break}case c.Comment:{let h=b=>b==="#region"?{line:e(o),type:"comment",isStart:!0}:{line:t(o),type:"comment",isStart:!1},w=(b=>{let y=b.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(y)return h(y[1]);if(n.languageId==="scss"||n.languageId==="less"){let E=b.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(E)return h(E[1])}return null})(o);if(w)if(w.isStart)a.push(w);else{let b=lo(a,"comment");if(!b)break;b.type==="comment"&&b.line!==w.line&&s.push({startLine:b.line,endLine:w.line,kind:"region"})}else{let b=i(o,"comment");b&&s.push(b)}break}}d=o,o=l.scan()}return s}function lo(n,e){if(n.length===0)return null;for(let t=n.length-1;t>=0;t--)if(n[t].type===e&&n[t].isStart)return n.splice(t,1)[0];return null}function Ba(n,e){let t=e&&e.rangeLimit||Number.MAX_VALUE,r=n.sort((a,l)=>{let o=a.startLine-l.startLine;return o===0&&(o=a.endLine-l.endLine),o}),i=[],s=-1;return r.forEach(a=>{a.startLine=0;d--)if(this.__items[d].match(o))return!0;return!1},s.prototype.set_indent=function(o,d){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(o){this.__items.push(o);var d=o.lastIndexOf(` `);d!==-1?this.__character_count=o.length-d:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,d){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),d=d||"",o.indent_level>0&&(d=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}a.prototype.get_indent_size=function(o,d){var h=this.__base_string_length;return d=d||0,o<0&&(h=0),h+=o*this.__indent_size,h+=d,h},a.prototype.get_indent_string=function(o,d){var h=this.__base_string;return d=d||0,o<0&&(o=0,h=""),d+=o*this.__indent_size,this.__ensure_cache(d),h+=this.__cache[d],h},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,d=0,h="";this.__indent_size&&o>=this.__indent_size&&(d=Math.floor(o/this.__indent_size),o-=d*this.__indent_size,h=new Array(d+1).join(this.__indent_string)),o&&(h+=new Array(o+1).join(" ")),this.__cache.push(h)};function l(o,d){this.__indent_cache=new a(o,d),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,d){return this.__indent_cache.get_indent_string(o,d)},l.prototype.get_indent_size=function(o,d){return this.__indent_cache.get_indent_size(o,d)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===` `&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` `);return o!==` `&&(h=h.replace(/[\n]/g,o)),h},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,d){return o=o||0,d=d||0,this.next_line.set_indent(o,d),this.__lines.length>1?(this.current_line.set_indent(o,d),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var d=0;d1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,d){for(var h=this.__lines.length-2;h>=0;){var u=this.__lines[h];if(u.is_empty())break;if(u.item(0).indexOf(o)!==0&&u.item(-1)!==d){this.__lines.splice(h+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},i.exports.Output=l},,,,function(i){function s(o,d){this.raw_options=a(o,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,d){var h=this.raw_options[o],u=d||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(u=h.concat()):typeof h=="string"&&(u=h.split(/[^a-zA-Z0-9_\/\-]+/)),u},s.prototype._get_boolean=function(o,d){var h=this.raw_options[o],u=h===void 0?!!d:!!h;return u},s.prototype._get_characters=function(o,d){var h=this.raw_options[o],u=d||"";return typeof h=="string"&&(u=h.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),u},s.prototype._get_number=function(o,d){var h=this.raw_options[o];d=parseInt(d,10),isNaN(d)&&(d=0);var u=parseInt(h,10);return isNaN(u)&&(u=d),u},s.prototype._get_selection=function(o,d,h){var u=this._get_selection_list(o,d,h);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values: `+d+` You passed in: '`+this.raw_options[o]+"'");return u[0]},s.prototype._get_selection_list=function(o,d,h){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[d[0]],!this._is_valid_selection(h,d))throw new Error("Invalid Default Value!");var u=this._get_array(o,h);if(!this._is_valid_selection(u,d))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values: `+d+` You passed in: '`+this.raw_options[o]+"'");return u},s.prototype._is_valid_selection=function(o,d){return o.length&&d.length&&!o.some(function(h){return d.indexOf(h)===-1})};function a(o,d){var h={};o=l(o);var u;for(u in o)u!==d&&(h[u]=o[u]);if(d&&o[d])for(u in o[d])h[u]=o[d][u];return h}function l(o){var d={},h;for(h in o){var u=h.replace(/-/g,"_");d[u]=o[h]}return d}i.exports.Options=s,i.exports.normalizeOpts=l,i.exports.mergeOpts=a},,function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&l=0&&o=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},i.exports.InputScanner=a},,,,,function(i){function s(a,l){a=typeof a=="string"?a:a.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+l,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)l[o[1]]=o[2],o=this.__directive_pattern.exec(a);return l},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s},,function(i,s,a){var l=a(16).Beautifier,o=a(17).Options;function d(h,u){var w=new l(h,u);return w.beautify()}i.exports=d,i.exports.defaultOptions=function(){return new o}},function(i,s,a){var l=a(17).Options,o=a(2).Output,d=a(8).InputScanner,h=a(13).Directives,u=new h(/\/\*/,/\*\//),w=/\r\n|[\r\n]/,b=/\r\n|[\r\n]/g,y=/\s/,E=/(?:\s|\n)+/g,A=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,I=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function P(T,j){this._source_text=T||"",this._options=new l(j),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}P.prototype.eatString=function(T){var j="";for(this._ch=this._input.next();this._ch;){if(j+=this._ch,this._ch==="\\")j+=this._input.next();else if(T.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return j},P.prototype.eatWhitespace=function(T){for(var j=y.test(this._input.peek()),X=0;y.test(this._input.peek());)this._ch=this._input.next(),T&&this._ch===` `&&(X===0||X0&&this._indentLevel--},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T=this._source_text,j=this._options.eol;j==="auto"&&(j=` `,T&&w.test(T||"")&&(j=T.match(w)[0])),T=T.replace(b,` `);var X=T.match(/^[\t ]*/)[0];this._output=new o(this._options,X),this._input=new d(T),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Y=0,$e=!1,K=!1,_e=!1,Ie=!1,S=!1,v=this._ch,F=!1,C,N,D;C=this._input.read(E),N=C!=="",D=v,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),v=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var M=this._input.read(A),oe=u.get_directives(M);oe&&oe.ignore==="start"&&(M+=u.readIgnored(this._input)),this.print_string(M),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(I)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(N),this.print_string(this._ch);var Z=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Z.match(/[ :]$/)&&(Z=this.eatString(": ").replace(/\s+$/,""),this.print_string(Z),this._output.space_before_token=!0),Y===0&&Z.indexOf(":")!==-1&&(K=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(N),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$.match(/[ :]$/)&&($=this.eatString(": ").replace(/\s+$/,""),this.print_string($),this._output.space_before_token=!0),Y===0&&$.indexOf(":")!==-1?(K=!0,this.indent()):$ in this.NESTED_AT_RULE?(this._nestedLevel+=1,$ in this.CONDITIONAL_GROUP_RULE&&(_e=!0)):Y===0&&!K&&(Ie=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(N),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")K&&(K=!1,this.outdent()),Ie=!1,_e?(_e=!1,$e=this._indentLevel>=this._nestedLevel):$e=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&$e&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(D==="("?this._output.space_before_token=!1:D!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),D==="{"&&this._output.trim(!0),K&&(this.outdent(),K=!1),this.print_string(this._ch),$e=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Ue=0;Ue"||this._ch==="+"||this._ch==="~")&&!K&&Y===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&y.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(N),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),y.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Co=D==='"'||D==="'";this.preserveSingleSpace(Co||N),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&F&&this._output.add_new_line()}var ko=this._output.get_code(j);return ko},i.exports.Beautifier=P},function(i,s,a){var l=a(6).Options;function o(d){l.call(this,d,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var w=0;w0&&fo(r,u-1);)u--;u===0||uo(r,u-1)?h=u:u0){let h=t.insertSpaces?Mr(" ",l*s):Mr(" ",s);d=d.split(` `).join(` `+h),e.start.character===0&&(d=h+d)}return[{range:e,newText:d}]}function mo(n){return n.replace(/^\s+/,"")}var qa=123,Ka=125;function Ga(n,e){for(;e>=0;){let t=n.charCodeAt(e);if(t===qa)return!0;if(t===Ka)return!1;e--}return!1}function Le(n,e,t){if(n&&n.hasOwnProperty(e)){let r=n[e];if(r!==null)return r}return t}function Ha(n,e,t){let r=e,i=0,s=t.tabSize||4;for(;r && ]#",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",browsers:["E12","FF28","S9","C29","IE11","O16"],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."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],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",browsers:["E12","FF20","S9","C29","IE11","O16"],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."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],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:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],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",browsers:["E16","FF45","S10.1","C57","IE10","O44"],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:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],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:"normal"},{name:"self-end"},{name:"self-start"},{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."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],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 | revert-layer",relevance:53,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",browsers:["E12","FF16","S9","C43","IE10","O30"],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:82,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",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"