@weapp-vite/dashboard 6.16.18 → 6.16.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@
39
39
 
40
40
  (`+xu(t)+`)`),`syntax`in e&&e.syntax&&(n+=`\n\nSyntax: ${xu(e.syntax)}`)}return e.references&&e.references.length>0&&t?.references!==!1&&(n.length>0&&(n+=`
41
41
 
42
- `),n+=e.references.map(e=>`[${e.name}](${e.url})`).join(` | `)),n}function wu(e=[]){return e.length===0?null:e.map(e=>{let t=``,n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in vu&&(t+=vu[r]),i&&(t+=` `+i),t}).join(`, `)}var Tu;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw 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(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let d={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 f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Tu=r})();let{URI:Eu,Utils:Du}=Tu;function Ou(e){return Du.dirname(Eu.parse(e)).toString(!0)}function ku(e,...t){return Du.joinPath(Eu.parse(e),...t).toString(!0)}var Au=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 n={items:[],isIncomplete:!1};for(let r of this.literalCompletions){let i=r.uriValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let e of a)n.items.push(e)}}for(let r of this.importCompletions){let i=r.pathValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);e.languageId===`scss`&&a.forEach(e=>{L(e.label,`_`)&&Do(e.label,`.scss`)&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of a)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,r,i){let a=Mu(e),o=L(e,`'`)||L(e,`"`),s=o?a.slice(0,t.character-(n.start.character+1)):a.slice(0,t.character-n.start.character),c=r.uri,l=Nu(s,a,o?Lu(n,1,-1):n),u=s.substring(0,s.lastIndexOf(`/`)+1),d=i.resolveReference(u||`.`,c);if(d)try{let e=[],t=await this.readDirectory(d);for(let[n,r]of t)n.charCodeAt(0)!==ju&&(r===Ol.Directory||ku(d,n)!==c)&&e.push(Pu(n,r===Ol.Directory,l));return e}catch{}return[]}};let ju=46;function Mu(e){return L(e,`'`)||L(e,`"`)?e.slice(1,-1):e}function Nu(e,t,n){let r,i=e.lastIndexOf(`/`);if(i===-1)r=n;else{let e=t.slice(i+1),a=Iu(n.end,-e.length),o=e.indexOf(` `),s;s=o===-1?n.end:Iu(a,o),r=K.create(a,s)}return r}function Pu(e,t,n){return t?(e+=`/`,{label:Fu(e),kind:J.Folder,textEdit:q.replace(n,Fu(e)),command:{title:`Suggest`,command:`editor.action.triggerSuggest`}}):{label:Fu(e),kind:J.File,textEdit:q.replace(n,Fu(e))}}function Fu(e){return e.replace(/(\s|\(|\)|,|"|')/g,`\\$1`)}function Iu(e,t){return nc.create(e.line,e.character+t)}function Lu(e,t,n){let r=Iu(e.start,t),i=Iu(e.end,n);return K.create(r,i)}let Ru=Ac.Snippet,zu={title:`Suggest`,command:`editor.action.triggerSuggest`};var Bu;(function(e){e.Enums=` `,e.Normal=`d`,e.VendorPrefixed=`x`,e.Term=`y`,e.Variable=`z`})(Bu||={});var Vu=class{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||=new _u(this.styleSheet),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);let a=new Au(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);let s=this.doComplete(e,t,n,i);try{let t=await a.computeCompletions(e,r);return{isIncomplete:s.isIncomplete||t.isIncomplete,itemDefaults:s.itemDefaults,items:t.items.concat(s.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=Ju(e,this.offset),this.defaultReplaceRange=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{let e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=No(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(n instanceof Ko)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof Ds)n.parent instanceof Fs?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof Vo){let t=n.findAParent(R.ExtendsReference,R.Ruleset);if(t)if(t.type===R.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{let n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Xo)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof Ro)this.getCompletionsForDeclarations(n,e);else if(n instanceof Ps)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof zo)this.getCompletionsForRuleSet(n,e);else if(n instanceof Fs)this.getCompletionsForInterpolation(n,e);else if(n instanceof ns)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof Bs)this.getCompletionsForMixinReference(n,e);else if(n instanceof Jo)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof hs)this.getCompletionsForSupports(n,e);else if(n instanceof ws)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof Ls)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===R.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(n.parent===null)this.getCompletionForTopLevel(e);else if(n.type===R.StringLiteral&&this.isImportPathParent(n.parent.type))this.getCompletionForImportPath(n,e);else continue;if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),e.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,e),this.finalize(e)}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===R.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(e.indexOf(n.type)!==-1)return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){let n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(i=>{let a,o,s=!1;e?(a=this.getCompletionRange(e.getProperty()),o=i.name,cu(e.colonPosition)||(o+=`: `,s=!0)):(a=this.getCompletionRange(null),o=i.name+`: `,s=!0),!e&&r&&(o+=`$0;`),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(a.end)&&(o+=`$0;`);let c={label:i.name,documentation:bu(i,this.doesSupportMarkdown()),tags:Hu(i)?[jc.Deprecated]:[],textEdit:q.replace(a,o),insertTextFormat:Ac.Snippet,kind:J.Property};i.restrictions||(s=!1),n&&s&&(c.command=zu);let l=(255-(typeof i.relevance==`number`?Math.min(Math.max(i.relevance,0),99):50)).toString(16);c.sortText=(L(i.name,`-`)?Bu.VendorPrefixed:Bu.Normal)+`_`+l,t.items.push(c)}),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.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 n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n),i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(let e of r.restrictions)switch(e){case`color`:this.getColorProposals(r,i,t);break;case`position`:this.getPositionProposals(r,i,t);break;case`repeat`:this.getRepeatStyleProposals(r,i,t);break;case`line-style`:this.getLineStyleProposals(r,i,t);break;case`line-width`:this.getLineWidthProposals(r,i,t);break;case`geometry-box`:this.getGeometryBoxProposals(r,i,t);break;case`box`:this.getBoxProposals(r,i,t);break;case`image`:this.getImageProposals(r,i,t);break;case`timing-function`:this.getTimingFunctionProposals(r,i,t);break;case`shape`:this.getBasicShapeProposals(r,i,t);break}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{let n=Gu(this.styleSheet,e);for(let e of n.getEntries())t.items.push({label:e,textEdit:q.replace(this.getCompletionRange(i),e),kind:J.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(let r of e.values){let i=r.name,a;if(Do(i,`)`)){let e=i.lastIndexOf(`(`);e!==-1&&(i=i.substring(0,e+1)+`$1`+i.substring(e+1),a=Ru)}let o=Bu.Enums;L(r.name,`-`)&&(o+=Bu.VendorPrefixed);let s={label:r.name,documentation:bu(r,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],textEdit:q.replace(this.getCompletionRange(t),i),sortText:o,kind:J.Value,insertTextFormat:a};n.items.push(s)}return n}getCSSWideKeywordProposals(e,t,n){for(let e in Ql)n.items.push({label:e,documentation:Ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});for(let e in $l){let r=Wu(e);n.items.push({label:e,documentation:$l[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:Ru,command:L(e,`var`)?zu:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){let n=L(r.name,`--`)?`var(${r.name})`:r.name,i={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(e),n),kind:J.Variable,sortText:Bu.Variable};if(typeof i.documentation==`string`&&zl(i.documentation)&&(i.kind=J.Color),r.node.type===R.FunctionParameter){let e=r.node.getParent();e.type===R.MixinDeclaration&&(i.detail=U(`argument from '{0}'`,e.getName()))}t.items.push(i)}return t}getVariableProposalsForCSSVarFunction(e){let t=new Uu;this.styleSheet.acceptVisitor(new qu(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){if(L(r.name,`--`)){let t={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(null),r.name),kind:J.Variable};typeof t.documentation==`string`&&zl(t.documentation)&&(t.kind=J.Color),e.items.push(t)}t.remove(r.name)}for(let n of t.getEntries())if(L(n,`--`)){let t={label:n,textEdit:q.replace(this.getCompletionRange(null),n),kind:J.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let r=`0`;if(this.currentWord.length>0){let e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(r=e[0],n.isIncomplete=r.length===this.currentWord.length)}else this.currentWord.length===0&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===R.Term&&(t=t.getParent()),e.restrictions)for(let i of e.restrictions){let e=ru[i];if(e)for(let i of e){let e=r+i;n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let t=e.end===-1?this.position:this.textDocument.positionAt(e.end),n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return K.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(let e in Ml)n.items.push({label:e,documentation:Ml[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e in Pl)n.items.push({label:e,documentation:Pl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});let r=new Uu;this.styleSheet.acceptVisitor(new Ku(r,this.offset));for(let e of r.getEntries())n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e of Al)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:q.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Ru,kind:J.Function});return n}getPositionProposals(e,t,n){for(let e in Kl)n.items.push({label:e,documentation:Kl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getRepeatStyleProposals(e,t,n){for(let e in ql)n.items.push({label:e,documentation:ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineStyleProposals(e,t,n){for(let e in Jl)n.items.push({label:e,documentation:Jl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineWidthProposals(e,t,n){for(let e of Yl)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getGeometryBoxProposals(e,t,n){for(let e in Zl)n.items.push({label:e,documentation:Zl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getBoxProposals(e,t,n){for(let e in Xl)n.items.push({label:e,documentation:Xl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getImageProposals(e,t,n){for(let e in eu){let r=Wu(e);n.items.push({label:e,documentation:eu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getTimingFunctionProposals(e,t,n){for(let e in tu){let r=Wu(e);n.items.push({label:e,documentation:tu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getBasicShapeProposals(e,t,n){for(let e in nu){let r=Wu(e);n.items.push({label:e,documentation:nu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getCompletionsForStylesheet(e){let t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof zo?this.getCompletionsForRuleSet(t,e):t instanceof hs?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:q.replace(this.getCompletionRange(null),t.name),documentation:bu(t,this.doesSupportMarkdown()),tags:Hu(t)?[jc.Deprecated]:[],kind:J.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){let n=e.getDeclarations();return n&&n.endsWith(`}`)&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){let r=this.findInNodePath(R.PseudoSelector,R.IdentifierSelector,R.ClassSelector,R.ElementNameSelector);if(!r&&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=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`:-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),this.cssDataManager.getPseudoElements().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`::-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),!t){for(let e of iu)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword});for(let e of au)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword})}let i={};i[this.currentWord]=!0;let a=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===R.SimpleSelector&&e.length>0){let t=a.substr(e.offset,e.length);return t.charAt(0)===`.`&&!i[t]&&(i[t]=!0,n.items.push({label:t,textEdit:q.replace(this.getCompletionRange(r),t),kind:J.Keyword})),!1}return!0}),e&&e.isNested()){let t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&e.getSelectors().getChildren().indexOf(t)===0&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;let n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof Ho){let e=n;if(!cu(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(cu(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof Wo)return this.getCompletionsForDeclarationValue(e,t)}else n instanceof Ls?this.getCompletionsForExtendsReference(n,null,t):(this.currentWord&&this.currentWord[0]===`@`||n instanceof zo)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&cu(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){let n=e.getParent();if(n instanceof Xo)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;let r=e.findParent(R.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;let i=e.findChildAtOffset(this.offset,!0);return!i||i instanceof Ns||i instanceof Io?this.getCompletionsForDeclarationValue(r,t):t}getCompletionsForFunctionArgument(e,t,n){let r=t.getIdentifier();return r&&r.matches(`var`)&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(n),n}getCompletionsForFunctionDeclaration(e,t){let n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset<n.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Mixin);for(let e of n)e.node instanceof Vs&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));let r=e.getIdentifier()||null;return this.completionParticipants.forEach(e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Function);for(let e of r)e.node instanceof ns&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;let r=t.getChildren().map(e=>e instanceof Yo?e.getName():e.getText()),i=e.name+`(`+r.map((e,t)=>"${"+(t+1)+`:`+e+`}`).join(`, `)+`)`;return{label:e.name,detail:e.name+`(`+r.join(`, `)+`)`,textEdit:q.replace(this.getCompletionRange(n),i),insertTextFormat:Ru,kind:J.Function,sortText:Bu.Term}}getCompletionsForSupportsCondition(e,t){let n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof Wo)return!cu(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof ws)return this.getCompletionsForSupportsCondition(n,t)}return cu(e.lParent)&&this.offset>e.lParent&&(!cu(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){let n=e.getDeclarations();if(!n||this.offset<=n.offset){let n=e.findFirstChildBeforeOffset(this.offset);return n instanceof ws?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){let t=e.getChild(0);n=t.getText(),r=this.position,i=this.getCompletionRange(t)}else{n=``,r=this.position;let t=this.textDocument.positionAt(e.offset+4);i=K.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){let n=this.textDocument.getText();return e>=0&&e<n.length&&n.charAt(e)===t}doesSupportMarkdown(){if(!cu(this.supportsMarkdown)){if(!cu(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(Oc.Markdown)!==-1}return this.supportsMarkdown}};function Hu(e){return!!(e.status&&(e.status===`nonstandard`||e.status===`obsolete`))}var Uu=class{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}};function Wu(e){return e.replace(/\(\)$/,`($1)`)}function Gu(e,t){let n=t.getFullPropertyName(),r=new Uu;function i(e){return(e instanceof Io||e instanceof Ns||e instanceof js)&&r.add(e.getText()),!0}function a(e){return n===e.getFullPropertyName()}function o(e){if(e instanceof Wo&&e!==t&&a(e)){let t=e.getValue();t&&t.accept(i)}return!0}return e.accept(o),r}var Ku=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof js||e instanceof Jo&&Rl(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}},qu=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof Io&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}};function Ju(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
42
+ `),n+=e.references.map(e=>`[${e.name}](${e.url})`).join(` | `)),n}function wu(e=[]){return e.length===0?null:e.map(e=>{let t=``,n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in vu&&(t+=vu[r]),i&&(t+=` `+i),t}).join(`, `)}var Tu;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw 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(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let d={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 f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Tu=r})();let{URI:Eu,Utils:Du}=Tu;function Ou(e){return Du.dirname(Eu.parse(e)).toString(!0)}function ku(e,...t){return Du.joinPath(Eu.parse(e),...t).toString(!0)}var Au=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 n={items:[],isIncomplete:!1};for(let r of this.literalCompletions){let i=r.uriValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let e of a)n.items.push(e)}}for(let r of this.importCompletions){let i=r.pathValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);e.languageId===`scss`&&a.forEach(e=>{L(e.label,`_`)&&Do(e.label,`.scss`)&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of a)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,r,i){let a=Mu(e),o=L(e,`'`)||L(e,`"`),s=o?a.slice(0,t.character-(n.start.character+1)):a.slice(0,t.character-n.start.character),c=r.uri,l=Nu(s,a,o?Lu(n,1,-1):n),u=s.substring(0,s.lastIndexOf(`/`)+1),d=i.resolveReference(u||`.`,c);if(d)try{let e=[],t=await this.readDirectory(d);for(let[n,r]of t)n.charCodeAt(0)!==ju&&(r===Ol.Directory||ku(d,n)!==c)&&e.push(Pu(n,r===Ol.Directory,l));return e}catch{}return[]}};let ju=46;function Mu(e){return L(e,`'`)||L(e,`"`)?e.slice(1,-1):e}function Nu(e,t,n){let r,i=e.lastIndexOf(`/`);if(i===-1)r=n;else{let e=t.slice(i+1),a=Iu(n.end,-e.length),o=e.indexOf(` `),s;s=o===-1?n.end:Iu(a,o),r=K.create(a,s)}return r}function Pu(e,t,n){return t?(e+=`/`,{label:Fu(e),kind:J.Folder,textEdit:q.replace(n,Fu(e)),command:{title:`Suggest`,command:`editor.action.triggerSuggest`}}):{label:Fu(e),kind:J.File,textEdit:q.replace(n,Fu(e))}}function Fu(e){return e.replace(/(\s|\(|\)|,|"|')/g,`\\$1`)}function Iu(e,t){return nc.create(e.line,e.character+t)}function Lu(e,t,n){let r=Iu(e.start,t),i=Iu(e.end,n);return K.create(r,i)}let Ru=Ac.Snippet,zu={title:`Suggest`,command:`editor.action.triggerSuggest`};var Bu;(function(e){e.Enums=` `,e.Normal=`d`,e.VendorPrefixed=`x`,e.Term=`y`,e.Variable=`z`})(Bu||={});var Vu=class{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||=new _u(this.styleSheet),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);let a=new Au(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);let s=this.doComplete(e,t,n,i);try{let t=await a.computeCompletions(e,r);return{isIncomplete:s.isIncomplete||t.isIncomplete,itemDefaults:s.itemDefaults,items:t.items.concat(s.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=Ju(e,this.offset),this.defaultReplaceRange=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{let e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=No(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(n instanceof Ko)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof Ds)n.parent instanceof Fs?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof Vo){let t=n.findAParent(R.ExtendsReference,R.Ruleset);if(t)if(t.type===R.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{let n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Xo)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof Ro)this.getCompletionsForDeclarations(n,e);else if(n instanceof Ps)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof zo)this.getCompletionsForRuleSet(n,e);else if(n instanceof Fs)this.getCompletionsForInterpolation(n,e);else if(n instanceof ns)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof Bs)this.getCompletionsForMixinReference(n,e);else if(n instanceof Jo)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof hs)this.getCompletionsForSupports(n,e);else if(n instanceof ws)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof Ls)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===R.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(n.parent===null)this.getCompletionForTopLevel(e);else if(n.type===R.StringLiteral&&this.isImportPathParent(n.parent.type))this.getCompletionForImportPath(n,e);else continue;if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),e.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,e),this.finalize(e)}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===R.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(e.indexOf(n.type)!==-1)return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){let n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(i=>{let a,o,s=!1;e?(a=this.getCompletionRange(e.getProperty()),o=i.name,cu(e.colonPosition)||(o+=`: `,s=!0)):(a=this.getCompletionRange(null),o=i.name+`: `,s=!0),!e&&r&&(o+=`$0;`),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(a.end)&&(o+=`$0;`);let c={label:i.name,documentation:bu(i,this.doesSupportMarkdown()),tags:Hu(i)?[jc.Deprecated]:[],textEdit:q.replace(a,o),insertTextFormat:Ac.Snippet,kind:J.Property};i.restrictions||(s=!1),n&&s&&(c.command=zu);let l=(255-(typeof i.relevance==`number`?Math.min(Math.max(i.relevance,0),99):50)).toString(16);c.sortText=(L(i.name,`-`)?Bu.VendorPrefixed:Bu.Normal)+`_`+l,t.items.push(c)}),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.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 n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n),i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(let e of r.restrictions)switch(e){case`color`:this.getColorProposals(r,i,t);break;case`position`:this.getPositionProposals(r,i,t);break;case`repeat`:this.getRepeatStyleProposals(r,i,t);break;case`line-style`:this.getLineStyleProposals(r,i,t);break;case`line-width`:this.getLineWidthProposals(r,i,t);break;case`geometry-box`:this.getGeometryBoxProposals(r,i,t);break;case`box`:this.getBoxProposals(r,i,t);break;case`image`:this.getImageProposals(r,i,t);break;case`timing-function`:this.getTimingFunctionProposals(r,i,t);break;case`shape`:this.getBasicShapeProposals(r,i,t);break}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{let n=Gu(this.styleSheet,e);for(let e of n.getEntries())t.items.push({label:e,textEdit:q.replace(this.getCompletionRange(i),e),kind:J.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(let r of e.values){let i=r.name,a;if(Do(i,`)`)){let e=i.lastIndexOf(`(`);e!==-1&&(i=i.substring(0,e+1)+`$1`+i.substring(e+1),a=Ru)}let o=Bu.Enums;L(r.name,`-`)&&(o+=Bu.VendorPrefixed);let s={label:r.name,documentation:bu(r,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],textEdit:q.replace(this.getCompletionRange(t),i),sortText:o,kind:J.Value,insertTextFormat:a};n.items.push(s)}return n}getCSSWideKeywordProposals(e,t,n){for(let e in Ql)n.items.push({label:e,documentation:Ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});for(let e in $l){let r=Wu(e);n.items.push({label:e,documentation:$l[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:Ru,command:L(e,`var`)?zu:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){let n=L(r.name,`--`)?`var(${r.name})`:r.name,i={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(e),n),kind:J.Variable,sortText:Bu.Variable};if(typeof i.documentation==`string`&&zl(i.documentation)&&(i.kind=J.Color),r.node.type===R.FunctionParameter){let e=r.node.getParent();e.type===R.MixinDeclaration&&(i.detail=U(`argument from '{0}'`,e.getName()))}t.items.push(i)}return t}getVariableProposalsForCSSVarFunction(e){let t=new Uu;this.styleSheet.acceptVisitor(new qu(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){if(L(r.name,`--`)){let t={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(null),r.name),kind:J.Variable};typeof t.documentation==`string`&&zl(t.documentation)&&(t.kind=J.Color),e.items.push(t)}t.remove(r.name)}for(let n of t.getEntries())if(L(n,`--`)){let t={label:n,textEdit:q.replace(this.getCompletionRange(null),n),kind:J.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let r=`0`;if(this.currentWord.length>0){let e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(r=e[0],n.isIncomplete=r.length===this.currentWord.length)}else this.currentWord.length===0&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===R.Term&&(t=t.getParent()),e.restrictions)for(let i of e.restrictions){let e=ru[i];if(e)for(let i of e){let e=r+i;n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let t=e.end===-1?this.position:this.textDocument.positionAt(e.end),n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return K.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(let e in Ml)n.items.push({label:e,documentation:Ml[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e in Pl)n.items.push({label:e,documentation:Pl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});let r=new Uu;this.styleSheet.acceptVisitor(new Ku(r,this.offset));for(let e of r.getEntries())n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e of Al)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:q.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Ru,kind:J.Function});return n}getPositionProposals(e,t,n){for(let e in Kl)n.items.push({label:e,documentation:Kl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getRepeatStyleProposals(e,t,n){for(let e in ql)n.items.push({label:e,documentation:ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineStyleProposals(e,t,n){for(let e in Jl)n.items.push({label:e,documentation:Jl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineWidthProposals(e,t,n){for(let e of Yl)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getGeometryBoxProposals(e,t,n){for(let e in Zl)n.items.push({label:e,documentation:Zl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getBoxProposals(e,t,n){for(let e in Xl)n.items.push({label:e,documentation:Xl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getImageProposals(e,t,n){for(let e in eu){let r=Wu(e);n.items.push({label:e,documentation:eu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getTimingFunctionProposals(e,t,n){for(let e in tu){let r=Wu(e);n.items.push({label:e,documentation:tu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getBasicShapeProposals(e,t,n){for(let e in nu){let r=Wu(e);n.items.push({label:e,documentation:nu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getCompletionsForStylesheet(e){let t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof zo?this.getCompletionsForRuleSet(t,e):t instanceof hs?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:q.replace(this.getCompletionRange(null),t.name),documentation:bu(t,this.doesSupportMarkdown()),tags:Hu(t)?[jc.Deprecated]:[],kind:J.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){let n=e.getDeclarations();return n&&n.endsWith(`}`)&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){let r=this.findInNodePath(R.PseudoSelector,R.IdentifierSelector,R.ClassSelector,R.ElementNameSelector);if(!r&&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=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`:-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),this.cssDataManager.getPseudoElements().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`::-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),!t){for(let e of iu)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword});for(let e of au)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword})}let i={};i[this.currentWord]=!0;let a=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===R.SimpleSelector&&e.length>0){let t=a.substr(e.offset,e.length);return t.charAt(0)===`.`&&!i[t]&&(i[t]=!0,n.items.push({label:t,textEdit:q.replace(this.getCompletionRange(r),t),kind:J.Keyword})),!1}return!0}),e&&e.isNested()){let t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&e.getSelectors().getChildren().indexOf(t)===0&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;let n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof Ho){let e=n;if(!cu(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(cu(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof Wo)return this.getCompletionsForDeclarationValue(e,t)}else n instanceof Ls?this.getCompletionsForExtendsReference(n,null,t):(this.currentWord&&this.currentWord[0]===`@`||n instanceof zo)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&cu(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){let n=e.getParent();if(n instanceof Xo)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;let r=e.findParent(R.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;let i=e.findChildAtOffset(this.offset,!0);return!i||i instanceof Ns||i instanceof Io?this.getCompletionsForDeclarationValue(r,t):t}getCompletionsForFunctionArgument(e,t,n){let r=t.getIdentifier();return r&&r.matches(`var`)&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(n),n}getCompletionsForFunctionDeclaration(e,t){let n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset<n.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Mixin);for(let e of n)e.node instanceof Vs&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));let r=e.getIdentifier()||null;return this.completionParticipants.forEach(e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Function);for(let e of r)e.node instanceof ns&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;let r=t.getChildren().map(e=>e instanceof Yo?e.getName():e.getText()),i=e.name+`(`+r.map((e,t)=>"${"+(t+1)+`:`+e+`}`).join(`, `)+`)`;return{label:e.name,detail:e.name+`(`+r.join(`, `)+`)`,textEdit:q.replace(this.getCompletionRange(n),i),insertTextFormat:Ru,kind:J.Function,sortText:Bu.Term}}getCompletionsForSupportsCondition(e,t){let n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof Wo)return!cu(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof ws)return this.getCompletionsForSupportsCondition(n,t)}return cu(e.lParent)&&this.offset>e.lParent&&(!cu(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){let n=e.getDeclarations();if(!n||this.offset<=n.offset){let n=e.findFirstChildBeforeOffset(this.offset);return n instanceof ws?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){let t=e.getChild(0);n=t.getText(),r=this.position,i=this.getCompletionRange(t)}else{n=``,r=this.position;let t=this.textDocument.positionAt(e.offset+4);i=K.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){let n=this.textDocument.getText();return e>=0&&e<n.length&&n.charAt(e)===t}doesSupportMarkdown(){if(!cu(this.supportsMarkdown)){if(!cu(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(Oc.Markdown)!==-1}return this.supportsMarkdown}};function Hu(e){return!!(e.status&&(e.status===`nonstandard`||e.status===`obsolete`))}var Uu=class{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}};function Wu(e){return e.replace(/\(\)$/,`($1)`)}function Gu(e,t){let n=t.getFullPropertyName(),r=new Uu;function i(e){return(e instanceof Io||e instanceof Ns||e instanceof js)&&r.add(e.getText()),!0}function a(e){return n===e.getFullPropertyName()}function o(e){if(e instanceof Wo&&e!==t&&a(e)){let t=e.getValue();t&&t.accept(i)}return!0}return e.accept(o),r}var Ku=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof js||e instanceof Jo&&Rl(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}},qu=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof Io&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}};function Ju(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
43
43
  \r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}var Yu=class e{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(t){t instanceof e&&(t.parent=this),this.children||=[],this.children.push(t)}append(e){if(this.attributes){let t=this.attributes[this.attributes.length-1];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 Xu);)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||=[];for(let n of this.attributes)if(n.name===e){n.value+=` `+t;return}this.attributes.push({name:e,value:t})}clone(t=!0){let n=new e;if(this.attributes){n.attributes=[];for(let e of this.attributes)n.addAttr(e.name,e.value)}if(t&&this.children){n.children=[];for(let e=0;e<this.children.length;e++)n.addChild(this.children[e].clone())}return n}cloneWithParent(){let e=this.clone(!1);return this.parent&&!(this.parent instanceof Xu)&&this.parent.cloneWithParent().addChild(e),e}},Xu=class extends Yu{},Zu=class extends Yu{constructor(e){super(),this.addAttr(`name`,e)}},Qu=class{constructor(e){this.quote=e,this.result=[]}print(e,t){this.result=[],e instanceof Xu?e.children&&this.doPrint(e.children,0):this.doPrint([e],0);let n;return n=t?`${t.text}\n … `+this.result.join(`
44
44
  `):this.result.join(`
45
45
  `),[{language:`html`,value:n}]}doPrint(e,t){for(let n of e)this.doPrintElement(n,t),n.children&&this.doPrint(n.children,t+1)}writeLine(e,t){let n=Array(e+1).join(` `);this.result.push(n+t)}doPrintElement(e,t){let n=e.findAttribute(`name`);if(e instanceof Zu||n===`…`){this.writeLine(t,n);return}let r=[`<`];if(n?r.push(n):r.push(`element`),e.attributes){for(let t of e.attributes)if(t.name!==`name`){r.push(` `),r.push(t.name);let e=t.value;e&&(r.push(`=`),r.push($u.ensure(e,this.quote)))}}r.push(`>`),this.writeLine(t,r.join(``))}},$u;(function(e){function t(e,t){return t+n(e)+t}e.ensure=t;function n(e){let t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.remove=n})($u||={});var ed=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function td(e,t){let n=new Yu;for(let r of e.getChildren())switch(r.type){case R.SelectorCombinator:if(t){let e=r.getText().split(`&`);if(e.length===1){n.addAttr(`name`,e[0]);break}n=t.cloneWithParent(),e[0]&&n.findRoot().prepend(e[0]);for(let r=1;r<e.length;r++){if(r>1){let e=t.cloneWithParent();n.addChild(e.findRoot()),n=e}n.append(e[r])}}break;case R.SelectorPlaceholder:if(r.matches(`@at-root`))return n;case R.ElementNameSelector:let e=r.getText();n.addAttr(`name`,e===`*`?`element`:nd(e));break;case R.ClassSelector:n.addAttr(`class`,nd(r.getText().substring(1)));break;case R.IdentifierSelector:n.addAttr(`id`,nd(r.getText().substring(1)));break;case R.MixinDeclaration:n.addAttr(`class`,r.getName());break;case R.PseudoSelector:n.addAttr(nd(r.getText()),``);break;case R.AttributeSelector:let i=r,a=i.getIdentifier();if(a){let e=i.getValue(),t=i.getOperator(),r;if(e&&t)switch(nd(t.getText())){case`|=`:r=`${$u.remove(nd(e.getText()))}-\u2026`;break;case`^=`:r=`${$u.remove(nd(e.getText()))}\u2026`;break;case`$=`:r=`\u2026${$u.remove(nd(e.getText()))}`;break;case`~=`:r=` \u2026 ${$u.remove(nd(e.getText()))} \u2026 `;break;case`*=`:r=`\u2026${$u.remove(nd(e.getText()))}\u2026`;break;default:r=$u.remove(nd(e.getText()));break}n.addAttr(nd(a.getText()),r)}break}return n}function nd(e){let t=new Eo;t.setSource(e);let n=t.scanUnquotedString();return n?n.text:e}var rd=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){let n=od(e);if(n){let r=new Qu(`"`).print(n,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]}simpleSelectorToMarkedString(e){let t=td(e),n=new Qu(`"`).print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}isPseudoElementIdentifier(e){let t=e.match(/^::?([\w-]+)/);return t?!!this.cssDataManager.getPseudoElement(`::`+t[1]):!1}selectorToSpecificityMarkedString(e){let t=e=>{let t=new ed,r=new ed;for(let t of e)for(let e of t.getChildren()){let t=n(e);if(t.id>r.id){r=t;continue}else if(t.id<r.id)continue;if(t.attr>r.attr){r=t;continue}else if(t.attr<r.attr)continue;if(t.tag>r.tag){r=t;continue}}return t.id+=r.id,t.attr+=r.attr,t.tag+=r.tag,t},n=e=>{let r=new ed;elementLoop:for(let i of e.getChildren()){switch(i.type){case R.IdentifierSelector:r.id++;break;case R.ClassSelector:case R.AttributeSelector:r.attr++;break;case R.ElementNameSelector:if(i.matches(`*`))break;r.tag++;break;case R.PseudoSelector:let e=i.getText(),n=i.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&n.length>0){r.tag++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}r.tag++;continue elementLoop}if(e.match(/^:where/i))continue elementLoop;if(e.match(/^:(?:not|has|is)/i)&&n.length>0){let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}if(e.match(/^:(?:host|host-context)/i)&&n.length>0){r.attr++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&n.length>0){if(r.attr++,n.length===3&&n[1].type===23){let e=t(n[2].getChildren());r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}let e=new lu,i=n[1].getText();e.scanner.setSource(i);let a=e.scanner.scan(),o=e.scanner.scan();if(a.text===`n`||a.text===`-n`&&o.text===`of`){let n=[],a=i.slice(o.offset+2).split(`,`);for(let t of a){let r=e.internalParse(t,e._parseSelector);r&&n.push(r)}let s=t(n);r.id+=s.id,r.attr+=s.attr,r.tag+=s.tag;continue elementLoop}continue elementLoop}r.attr++;continue elementLoop}if(i.getChildren().length>0){let e=n(i);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag}}return r},r=n(e);return`[${U(`Selector Specificity`)}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}},id=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Xu)&&e.getChildren().some(e=>e.hasChildren()&&e.getChild(0).type===R.SelectorCombinator)){let e=this.element.findRoot();e.parent instanceof Xu&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(let n of e.getChildren()){if(n instanceof Vo){if(this.prev instanceof Vo){let e=new Zu(`…`);this.element.addChild(e),this.element=e}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 Zu(`⋮`));let e=td(n,t),r=e.findRoot();this.element.addChild(r),this.element=e}(n instanceof Vo||n.type===R.SelectorCombinatorParent||n.type===R.SelectorCombinatorShadowPiercingDescendant||n.type===R.SelectorCombinatorSibling||n.type===R.SelectorCombinatorAllSiblings)&&(this.prev=n)}}};function ad(e){switch(e.type){case R.MixinDeclaration:case R.Stylesheet:return!0}return!1}function od(e){if(e.matches(`@at-root`))return null;let t=new Xu,n=[],r=e.getParent();if(r instanceof zo){let e=r.getParent();for(;e&&!ad(e);){if(e instanceof zo){if(e.getSelectors().matches(`@at-root`))break;n.push(e)}e=e.getParent()}}let i=new id(t);for(let e=n.length-1;e>=0;e--){let t=n[e].getSelectors().getChild(0);t&&i.processSelector(t)}return i.processSelector(e),t}var sd=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new rd(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,r=this.defaultSettings){function i(t){return K.create(e.positionAt(t.offset),e.positionAt(t.end))}let a=No(n,e.offsetAt(t)),o=null,s;for(let e=0;e<a.length;e++){let t=a[e];if(t instanceof ms&&(s={isMedia:!0,text:t.getText().match(/@media[^\{]+/g)?.[0]}),t instanceof Bo){o={contents:this.selectorPrinting.selectorToMarkedString(t,s),range:i(t)};break}if(t instanceof Vo){L(t.getText(),`@`)||(o={contents:this.selectorPrinting.simpleSelectorToMarkedString(t),range:i(t)});break}if(t instanceof Wo){let e=t.getFullPropertyName(),n=this.cssDataManager.getProperty(e);if(n){let e=bu(n,this.doesSupportMarkdown(),r);o=e?{contents:e,range:i(t)}:null}continue}if(t instanceof Hs){let e=t.getText(),n=this.cssDataManager.getAtDirective(e);if(n){let e=bu(n,this.doesSupportMarkdown(),r);o=e?{contents:e,range:i(t)}:null}continue}if(t instanceof B&&t.type===R.PseudoSelector){let e=t.getText(),n=e.slice(0,2)===`::`?this.cssDataManager.getPseudoElement(e):this.cssDataManager.getPseudoClass(e);if(n){let e=bu(n,this.doesSupportMarkdown(),r);o=e?{contents:e,range:i(t)}:null}continue}}return o&&(o.contents=this.convertContents(o.contents)),o}convertContents(e){return this.doesSupportMarkdown()||typeof e==`string`?e:`kind`in e?{kind:`plaintext`,value:e.value}:Array.isArray(e)?e.map(e=>typeof e==`string`?e:e.value):e.value}doesSupportMarkdown(){if(!cu(this.supportsMarkdown)){if(!cu(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(Oc.Markdown)!==-1}return this.supportsMarkdown}};let cd=/^\w+:\/\//,ld=/^data:/;var ud=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){let r=new _u(n),i=Mo(n,e.offsetAt(t));if(!i)return null;let a=r.findSymbolFromNode(i);return a?{uri:e.uri,range:fd(a.node,e)}:null}findReferences(e,t,n){return this.findDocumentHighlights(e,t,n).map(t=>({uri:e.uri,range:t.range}))}getHighlightNode(e,t,n){let r=Mo(n,e.offsetAt(t));if(!(!r||r.type===R.Stylesheet||r.type===R.Declarations))return r.type===R.Identifier&&r.parent&&r.parent.type===R.ClassSelector&&(r=r.parent),r}findDocumentHighlights(e,t,n){let r=[],i=this.getHighlightNode(e,t,n);if(!i)return r;let a=new _u(n),o=a.findSymbolFromNode(i),s=i.getText();return n.accept(t=>{if(o){if(a.matchesSymbol(t,o))return r.push({kind:md(t),range:fd(t,e)}),!1}else i&&i.type===t.type&&t.matches(s)&&r.push({kind:md(t),range:fd(t,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===R.Import}findDocumentLinks(e,t,n){let r=this.findUnresolvedLinks(e,t),i=[];for(let t of r){let r=t.link,a=r.target;if(!(!a||ld.test(a)))if(cd.test(a))i.push(r);else{let t=n.resolveReference(a,e.uri);t&&(r.target=t),i.push(r)}}return i}async findDocumentLinks2(e,t,n){let r=this.findUnresolvedLinks(e,t),i=[];for(let t of r){let r=t.link,a=r.target;if(!(!a||ld.test(a)))if(cd.test(a))i.push(r);else{let o=await this.resolveReference(a,e.uri,n,t.isRawLink);o!==void 0&&(r.target=o,i.push(r))}}return i}findUnresolvedLinks(e,t){let n=[],r=t=>{let r=t.getText(),i=fd(t,e);if(i.start.line===i.end.line&&i.start.character===i.end.character)return;(L(r,`'`)||L(r,`"`))&&(r=r.slice(1,-1));let a=t.parent?this.isRawStringDocumentLinkNode(t.parent):!1;n.push({link:{target:r,range:i},isRawLink:a})};return t.accept(e=>{if(e.type===R.URILiteral){let t=e.getChild(0);return t&&r(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){let t=e.getText();return(L(t,`'`)||L(t,`"`))&&r(e),!1}return!0}),n}findSymbolInformations(e,t){let n=[];return this.collectDocumentSymbols(e,t,(t,r,i)=>{let a=i instanceof B?fd(i,e):i,o={name:t||U(`<undefined>`),kind:r,location:rc.create(e.uri,a)};n.push(o)}),n}findDocumentSymbols(e,t){let n=[],r=[];return this.collectDocumentSymbols(e,t,(t,i,a,o,s)=>{let c=a instanceof B?fd(a,e):a,l=o instanceof B?fd(o,e):o;(!l||!pd(c,l))&&(l=K.create(c.start,c.start));let u={name:t||U(`<undefined>`),kind:i,range:c,selectionRange:l},d=r.pop();for(;d&&!pd(d[1],c);)d=r.pop();if(d){let e=d[0];e.children||=[],e.children.push(u),r.push(d)}else n.push(u);s&&r.push([u,fd(s,e)])}),n}collectDocumentSymbols(e,t,n){t.accept(t=>{if(t instanceof zo){for(let r of t.getSelectors().getChildren())if(r instanceof Bo){let i=K.create(e.positionAt(r.offset),e.positionAt(t.end));n(r.getText(),Uc.Class,i,r,t.getDeclarations())}}else if(t instanceof Ps)n(t.getName(),Uc.Variable,t,t.getVariable(),void 0);else if(t instanceof Vs)n(t.getName(),Uc.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof ns)n(t.getName(),Uc.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof os)n(U(`@keyframes {0}`,t.getName()),Uc.Class,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof is)n(U(`@font-face`),Uc.Class,t,void 0,t.getDeclarations());else if(t instanceof ms){let e=t.getChild(0);e instanceof bs&&n(`@media `+e.getText(),Uc.Module,t,e,t.getDeclarations())}return!0})}findDocumentColors(e,t){let n=[];return t.accept(t=>{let r=dd(t,e);return r&&n.push(r),!0}),n}getColorPresentations(e,t,n,r){let i=[],a=Math.round(n.red*255),o=Math.round(n.green*255),s=Math.round(n.blue*255),c;c=n.alpha===1?`rgb(${a}, ${o}, ${s})`:`rgba(${a}, ${o}, ${s}, ${n.alpha})`,i.push({label:c,textEdit:q.replace(r,c)}),c=n.alpha===1?`#${hd(a)}${hd(o)}${hd(s)}`:`#${hd(a)}${hd(o)}${hd(s)}${hd(Math.round(n.alpha*255))}`,i.push({label:c,textEdit:q.replace(r,c)});let l=Hl(n);c=l.a===1?`hsl(${l.h}, ${Math.round(l.s*100)}%, ${Math.round(l.l*100)}%)`:`hsla(${l.h}, ${Math.round(l.s*100)}%, ${Math.round(l.l*100)}%, ${l.a})`,i.push({label:c,textEdit:q.replace(r,c)});let u=Wl(n);return c=u.a===1?`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,i.push({label:c,textEdit:q.replace(r,c)}),i}prepareRename(e,t,n){let r=this.getHighlightNode(e,t,n);if(r)return K.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,n,r){let i=this.findDocumentHighlights(e,t,r).map(e=>q.replace(e.range,n));return{changes:{[e.uri]:i}}}async resolveModuleReference(e,t,n){if(L(t,`file://`)){let r=gd(e);if(r&&r!==`.`&&r!==`..`){let i=n.resolveReference(`/`,t),a=Ou(t),o=await this.resolvePathToModule(r,a,i);if(o)return ku(o,e.substring(r.length+1))}}}async mapReference(e,t){return e}async resolveReference(e,t,n,r=!1,i=this.defaultSettings){if(e[0]===`~`&&e[1]!==`/`&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,n),r);let a=await this.mapReference(n.resolveReference(e,t),r);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;let i=await this.mapReference(await this.resolveModuleReference(e,t,n),r);if(i)return i}if(a&&!await this.fileExists(a)){let a=n.resolveReference(`/`,t);if(i&&a){if(e in i)return this.mapReference(ku(a,i[e]),r);let t=e.indexOf(`/`),n=`${e.substring(0,t)}/`;if(n in i){let t=ku(a,i[n].slice(0,-1));return this.mapReference(t=ku(t,e.substring(n.length-1)),r)}}}return a}async resolvePathToModule(e,t,n){let r=ku(t,`node_modules`,e,`package.json`);if(await this.fileExists(r))return Ou(r);if(n&&t.startsWith(n)&&t.length!==n.length)return this.resolvePathToModule(e,Ou(t),n)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{let t=await this.fileSystemProvider.stat(e);return!(t.type===Ol.Unknown&&t.size===-1)}catch{return!1}}};function dd(e,t){let n=Gl(e);return n?{color:n,range:fd(e,t)}:null}function fd(e,t){return K.create(t.positionAt(e.offset),t.positionAt(e.end))}function pd(e,t){let n=t.start.line,r=t.end.line,i=e.start.line,a=e.end.line;return!(n<i||r<i||n>a||r>a||n===i&&t.start.character<e.start.character||r===a&&t.end.character>e.end.character)}function md(e){if(e.type===R.Selector||e instanceof Io&&e.parent&&e.parent instanceof Ko&&e.isCustomProperty)return Vc.Write;if(e.parent)switch(e.parent.type){case R.FunctionDeclaration:case R.MixinDeclaration:case R.Keyframe:case R.VariableDeclaration:case R.FunctionParameter:return Vc.Write}return Vc.Read}function hd(e){let t=e.toString(16);return t.length===2?t:`0`+t}function gd(e){let t=e.indexOf(`/`);if(t===-1)return``;if(e[0]===`@`){let n=e.indexOf(`/`,t+1);return n===-1?e:e.substring(0,n)}return e.substring(0,t)}let _d=qs.Warning,vd=qs.Error,yd=qs.Ignore;var Z=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},bd=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}};let Q={AllVendorPrefixes:new Z(`compatibleVendorPrefixes`,U(`When using a vendor-specific prefix make sure to also include all other vendor-specific properties`),yd),IncludeStandardPropertyWhenUsingVendorPrefix:new Z(`vendorPrefix`,U(`When using a vendor-specific prefix also include the standard property`),_d),DuplicateDeclarations:new Z(`duplicateProperties`,U(`Do not use duplicate style definitions`),yd),EmptyRuleSet:new Z(`emptyRules`,U(`Do not use empty rulesets`),_d),ImportStatemement:new Z(`importStatement`,U(`Import statements do not load in parallel`),yd),BewareOfBoxModelSize:new Z(`boxModel`,U(`Do not use width or height when using padding or border`),yd),UniversalSelector:new Z(`universalSelector`,U(`The universal selector (*) is known to be slow`),yd),ZeroWithUnit:new Z(`zeroUnits`,U(`No unit for zero needed`),yd),RequiredPropertiesForFontFace:new Z(`fontFaceProperties`,U(`@font-face rule must define 'src' and 'font-family' properties`),_d),HexColorLength:new Z(`hexColorLength`,U(`Hex colors must consist of three, four, six or eight hex numbers`),vd),ArgsInColorFunction:new Z(`argumentsInColorFunction`,U(`Invalid number of parameters`),vd),UnknownProperty:new Z(`unknownProperties`,U(`Unknown property.`),_d),UnknownAtRules:new Z(`unknownAtRules`,U(`Unknown at-rule.`),_d),IEStarHack:new Z(`ieHack`,U(`IE hacks are only necessary when supporting IE7 and older`),yd),UnknownVendorSpecificProperty:new Z(`unknownVendorSpecificProperties`,U(`Unknown vendor specific property.`),yd),PropertyIgnoredDueToDisplay:new Z(`propertyIgnoredDueToDisplay`,U(`Property is ignored due to the display.`),_d),AvoidImportant:new Z(`important`,U(`Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored.`),yd),AvoidFloat:new Z(`float`,U(`Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes.`),yd),AvoidIdSelector:new Z(`idSelector`,U(`Selectors should not contain IDs because these rules are too tightly coupled with the HTML.`),yd)},xd={ValidProperties:new bd(`validProperties`,U("A list of properties that are not validated against the `unknownProperties` rule."),[])};var Sd=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){let t=Cd(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}};function Cd(e){switch(e){case`ignore`:return qs.Ignore;case`warning`:return qs.Warning;case`error`:return qs.Error}return null}var wd=class{constructor(e){this.cssDataManager=e}doCodeActions(e,t,n,r){return this.doCodeActions2(e,t,n,r).map(t=>{let n=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return hc.create(t.title,`_css.applyCodeAction`,e.uri,e.version,n&&n.edits)})}doCodeActions2(e,t,n,r){let i=[];if(n.diagnostics)for(let t of n.diagnostics)this.appendFixesForMarker(e,r,t,i);return i}getFixesForUnknownProperty(e,t,n,r){let i=t.getName(),a=[];this.cssDataManager.getProperties().forEach(e=>{let t=Oo(i,e.name);t>=i.length/2&&a.push({property:e.name,score:t})}),a.sort((e,t)=>t.score-e.score||e.property.localeCompare(t.property));let o=3;for(let t of a){let i=t.property,a=U(`Rename to '{0}'`,i),s=q.replace(n.range,i),c=Tc.create(e.uri,e.version),l={documentChanges:[yc.create(c,[s])]},u=Zc.create(a,l,Jc.QuickFix);if(u.diagnostics=[n],r.push(u),--o<=0)return}}appendFixesForMarker(e,t,n,r){if(n.code!==Q.UnknownProperty.id)return;let i=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end),o=No(t,i);for(let t=o.length-1;t>=0;t--){let s=o[t];if(s instanceof Wo){let t=s.getProperty();if(t&&t.offset===i&&t.end===a){this.getFixesForUnknownProperty(e,t,n,r);return}}}}},Td=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function Ed(e,t,n,r){let i=e[t];i.value=n,n&&(du(i.properties,r)||i.properties.push(r))}function Dd(e,t,n){Ed(e,`top`,t,n),Ed(e,`right`,t,n),Ed(e,`bottom`,t,n),Ed(e,`left`,t,n)}function $(e,t,n,r){t===`top`||t===`right`||t===`bottom`||t===`left`?Ed(e,t,n,r):Dd(e,n,r)}function Od(e,t,n){switch(t.length){case 1:$(e,void 0,t[0],n);break;case 2:$(e,`top`,t[0],n),$(e,`bottom`,t[0],n),$(e,`right`,t[1],n),$(e,`left`,t[1],n);break;case 3:$(e,`top`,t[0],n),$(e,`right`,t[1],n),$(e,`left`,t[1],n),$(e,`bottom`,t[2],n);break;case 4:$(e,`top`,t[0],n),$(e,`right`,t[1],n),$(e,`bottom`,t[2],n),$(e,`left`,t[3],n);break}}function kd(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function Ad(e,t=!0){return t&&kd(e,[`initial`,`unset`])?!1:parseFloat(e.getText())!==0}function jd(e,t=!0){return e.map(e=>Ad(e,t))}function Md(e,t=!0){return!(kd(e,[`none`,`hidden`])||t&&kd(e,[`initial`,`unset`]))}function Nd(e,t=!0){return e.map(e=>Md(e,t))}function Pd(e){let t=e.getChildren();if(t.length===1){let e=t[0];return Ad(e)&&Md(e)}for(let e of t){let t=e;if(!Ad(t,!1)||!Md(t,!1))return!1}return!0}function Fd(e){let t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(let n of e){let e=n.node.value;if(e!==void 0)switch(n.fullPropertyName){case`box-sizing`:return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case`width`:t.width=n;break;case`height`:t.height=n;break;default:let r=n.fullPropertyName.split(`-`);switch(r[0]){case`border`:switch(r[1]){case void 0:case`top`:case`right`:case`bottom`:case`left`:switch(r[2]){case void 0:$(t,r[1],Pd(e),n);break;case`width`:$(t,r[1],Ad(e,!1),n);break;case`style`:$(t,r[1],Md(e,!0),n);break}break;case`width`:Od(t,jd(e.getChildren(),!1),n);break;case`style`:Od(t,Nd(e.getChildren(),!0),n);break}break;case`padding`:r.length===1?Od(t,jd(e.getChildren(),!0),n):$(t,r[1],Ad(e,!0),n);break}break}}return t}var Id=class{constructor(){this.data={}}add(e,t,n){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),n&&r.nodes.push(n)}},Ld=class e{static entries(t,n,r,i,a){let o=new e(n,r,i);return t.acceptVisitor(o),o.completeValidations(),o.getEntries(a)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new Id,this.validProperties={};let r=t.getSetting(xd.ValidProperties);Array.isArray(r)&&r.forEach(e=>{if(typeof e==`string`){let t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}})}isValidPropertyDeclaration(e){let t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){let n=[];for(let r of e)r.fullPropertyName===t&&n.push(r);return n}fetchWithValue(e,t,n){let r=[];for(let i of e)if(i.fullPropertyName===t){let e=i.node.getValue();e&&this.findValueInExpression(e,n)&&r.push(i)}return r}findValueInExpression(e,t){let n=!1;return e.accept(e=>(e.type===R.Identifier&&e.matches(t)&&(n=!0),!n)),n}getEntries(e=qs.Warning|qs.Error){return this.warnings.filter(t=>(t.getLevel()&e)!==0)}addEntry(e,t,n){let r=new Js(e,t,this.settings.getRule(t),n);this.warnings.push(r)}getMissingNames(e,t){let n=e.slice(0);for(let e=0;e<t.length;e++){let r=n.indexOf(t[e]);r!==-1&&(n[r]=null)}let r=null;for(let e=0;e<n.length;e++){let t=n[e];t&&(r=r===null?U(`'{0}'`,t):U(`{0}, '{1}'`,r,t))}return r}visitNode(e){switch(e.type){case R.UnknownAtRule:return this.visitUnknownAtRule(e);case R.Keyframe:return this.visitKeyframe(e);case R.FontFace:return this.visitFontFace(e);case R.Ruleset:return this.visitRuleSet(e);case R.SimpleSelector:return this.visitSimpleSelector(e);case R.Function:return this.visitFunction(e);case R.NumericValue:return this.visitNumericValue(e);case R.Import:return this.visitImport(e);case R.HexColorValue:return this.visitHexColorValue(e);case R.Prio:return this.visitPrio(e);case R.IdentifierSelector:return this.visitIdentifierSelector(e)}return!0}completeValidations(){this.validateKeyframes()}visitUnknownAtRule(e){let t=e.getChild(0);return!t||this.cssDataManager.getAtDirective(t.getText())?!1:(this.addEntry(t,Q.UnknownAtRules,`Unknown at rule ${t.getText()}`),!0)}visitKeyframe(e){let t=e.getKeyword();if(!t)return!1;let n=t.getText();return this.keyframes.add(e.getName(),n,n===`@keyframes`?null:t),!0}validateKeyframes(){let e=[`@-webkit-keyframes`,`@-moz-keyframes`,`@-o-keyframes`];for(let t in this.keyframes.data){let n=this.keyframes.data[t].names,r=n.indexOf(`@keyframes`)===-1;if(!r&&n.length===1)continue;let i=this.getMissingNames(e,n);if(i||r)for(let e of this.keyframes.data[t].nodes){if(r){let t=U(`Always define standard rule '@keyframes' when defining keyframes.`);this.addEntry(e,Q.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(i){let t=U(`Always include all vendor specific rules: Missing: {0}`,i);this.addEntry(e,Q.AllVendorPrefixes,t)}}}return!0}visitSimpleSelector(e){let t=this.documentText.charAt(e.offset);return e.length===1&&t===`*`&&this.addEntry(e,Q.UniversalSelector),!0}visitIdentifierSelector(e){return this.addEntry(e,Q.AvoidIdSelector),!0}visitImport(e){return this.addEntry(e,Q.ImportStatemement),!0}visitRuleSet(t){let n=t.getDeclarations();if(!n)return!1;n.hasChildren()||this.addEntry(t.getSelectors(),Q.EmptyRuleSet);let r=[];for(let e of n.getChildren())e instanceof Wo&&r.push(new Td(e));let i=Fd(r);if(i.width){let e=[];if(i.right.value&&(e=fu(e,i.right.properties)),i.left.value&&(e=fu(e,i.left.properties)),e.length!==0){for(let t of e)this.addEntry(t.node,Q.BewareOfBoxModelSize);this.addEntry(i.width.node,Q.BewareOfBoxModelSize)}}if(i.height){let e=[];if(i.top.value&&(e=fu(e,i.top.properties)),i.bottom.value&&(e=fu(e,i.bottom.properties)),e.length!==0){for(let t of e)this.addEntry(t.node,Q.BewareOfBoxModelSize);this.addEntry(i.height.node,Q.BewareOfBoxModelSize)}}let a=this.fetchWithValue(r,`display`,`inline-block`);if(a.length>0){let e=this.fetch(r,`float`);for(let t=0;t<e.length;t++){let n=e[t].node,r=n.getValue();r&&!r.matches(`none`)&&this.addEntry(n,Q.PropertyIgnoredDueToDisplay,U(`inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'`))}}if(a=this.fetchWithValue(r,`display`,`block`),a.length>0){let e=this.fetch(r,`vertical-align`);for(let t=0;t<e.length;t++)this.addEntry(e[t].node,Q.PropertyIgnoredDueToDisplay,U(`Property is ignored due to the display. With 'display: block', vertical-align should not be used.`))}let o=this.fetch(r,`float`);for(let e=0;e<o.length;e++){let t=o[e];this.isValidPropertyDeclaration(t)||this.addEntry(t.node,Q.AvoidFloat)}for(let e=0;e<r.length;e++){let t=r[e];if(t.fullPropertyName!==`background`&&!this.validProperties[t.fullPropertyName]){let e=t.node.getValue();if(e&&this.documentText.charAt(e.offset)!==`-`){let e=this.fetch(r,t.fullPropertyName);if(e.length>1)for(let n=0;n<e.length;n++){let r=e[n].node.getValue();r&&this.documentText.charAt(r.offset)!==`-`&&e[n]!==t&&this.addEntry(t.node,Q.DuplicateDeclarations)}}}}if(!t.getSelectors().matches(`:export`)){let n=new Id,i=!1;for(let e of r){let t=e.node;if(this.isCSSDeclaration(t)){let r=e.fullPropertyName,i=r.charAt(0);if(i===`-`){if(r.charAt(1)!==`-`){!this.cssDataManager.isKnownProperty(r)&&!this.validProperties[r]&&this.addEntry(t.getProperty(),Q.UnknownVendorSpecificProperty);let e=t.getNonPrefixedPropertyName();n.add(e,r,t.getProperty())}}else{let e=r;(i===`*`||i===`_`)&&(this.addEntry(t.getProperty(),Q.IEStarHack),r=r.substr(1)),!this.cssDataManager.isKnownProperty(e)&&!this.cssDataManager.isKnownProperty(r)&&(this.validProperties[r]||this.addEntry(t.getProperty(),Q.UnknownProperty,U(`Unknown property: '{0}'`,t.getFullPropertyName()))),n.add(r,r,null)}}else i=!0}if(!i)for(let r in n.data){let i=n.data[r],a=i.names,o=this.cssDataManager.isStandardProperty(r)&&a.indexOf(r)===-1;if(!o&&a.length===1)continue;let s=new Set(o?i.nodes:[]);if(o){let e=this.getContextualVendorSpecificPseudoElements(t);for(let t of i.nodes){let n=t.getName(),i=n.substring(0,n.length-r.length);e.some(e=>e.startsWith(i))&&s.delete(t)}}let c=[];for(let t=0,n=e.prefixes.length;t<n;t++){let n=e.prefixes[t];this.cssDataManager.isStandardProperty(n+r)&&c.push(n+r)}let l=this.getMissingNames(c,a);if(l||o)for(let e of i.nodes){if(o&&s.has(e)){let t=U(`Also define the standard property '{0}' for compatibility`,r);this.addEntry(e,Q.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(l){let t=U(`Always include all vendor specific properties: Missing: {0}`,l);this.addEntry(e,Q.AllVendorPrefixes,t)}}}}return!0}getContextualVendorSpecificPseudoElements(e){function t(e,n){for(let r of n.getChildren()){if(r.type===R.PseudoSelector){let t=r.getChildren()[0]?.getText();t&&e.add(t)}t(e,r)}}function n(e,r){if(r.type===R.Ruleset)for(let n of r.getSelectors().getChildren())t(e,n);return r.parent?n(e,r.parent):void 0}let r=new Set;return n(r,e),Array.from(r)}visitPrio(e){return this.addEntry(e,Q.AvoidImportant),!0}visitNumericValue(e){let t=e.findParent(R.Function);if(t&&t.getName()===`calc`)return!0;let n=e.findParent(R.Declaration);if(n&&n.getValue()){let t=e.getValue();if(!t.unit||ru.length.indexOf(t.unit.toLowerCase())===-1)return!0;parseFloat(t.value)===0&&t.unit&&!this.validProperties[n.getFullPropertyName()]&&this.addEntry(e,Q.ZeroWithUnit)}return!0}visitFontFace(e){let t=e.getDeclarations();if(!t)return!1;let n=!1,r=!1,i=!1;for(let e of t.getChildren())if(this.isCSSDeclaration(e)){let t=e.getProperty().getName().toLowerCase();t===`src`&&(n=!0),t===`font-family`&&(r=!0)}else i=!0;return!i&&(!n||!r)&&this.addEntry(e,Q.RequiredPropertiesForFontFace),!0}isCSSDeclaration(e){if(e instanceof Wo){if(!e.getValue())return!1;let t=e.getProperty();if(!t)return!1;let n=t.getIdentifier();return!(!n||n.containsInterpolation())}return!1}visitHexColorValue(e){let t=e.length;return t!==9&&t!==7&&t!==5&&t!==4&&this.addEntry(e,Q.HexColorLength),!1}visitFunction(e){let t=e.getName().toLowerCase(),n=-1,r=0;switch(t){case`rgb(`:case`hsl(`:n=3;break;case`rgba(`:case`hsla(`:n=4;break}return n!==-1&&(e.getArguments().accept(e=>e instanceof Os?(r+=1,!1):!0),r!==n&&this.addEntry(e,Q.ArgsInColorFunction)),!0}};Ld.prefixes=[`-ms-`,`-moz-`,`-o-`,`-webkit-`];var Rd=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,n=this.settings){if(n&&n.validate===!1)return[];let r=[];r.push.apply(r,Ys.entries(t)),r.push.apply(r,Ld.entries(t,e,new Sd(n&&n.lint),this.cssDataManager));let i=[];for(let e in Q)i.push(Q[e].id);function a(t){let n=K.create(e.positionAt(t.getOffset()),e.positionAt(t.getOffset()+t.getLength())),r=e.languageId;return{code:t.getRule().id,source:r,message:t.getMessage(),severity:t.getLevel()===qs.Warning?dc.Warning:dc.Error,range:n}}return r.filter(e=>e.getLevel()!==qs.Ignore).map(a)}};let zd=F.CustomToken,Bd=zd++,Vd=zd++;zd++;let Hd=zd++,Ud=zd++,Wd=zd++,Gd=zd++,Kd=zd++;zd++;var qd=class extends Eo{scanNext(e){if(this.stream.advanceIfChar(36)){let t=[`$`];if(this.ident(t))return this.finishToken(e,Bd,t.join(``));this.stream.goBackTo(e)}return this.stream.advanceIfChars([35,123])?this.finishToken(e,Vd):this.stream.advanceIfChars([61,61])?this.finishToken(e,Hd):this.stream.advanceIfChars([33,61])?this.finishToken(e,Ud):this.stream.advanceIfChar(60)?this.stream.advanceIfChar(61)?this.finishToken(e,Gd):this.finishToken(e,F.Delim):this.stream.advanceIfChar(62)?this.stream.advanceIfChar(61)?this.finishToken(e,Wd):this.finishToken(e,F.Delim):this.stream.advanceIfChars([46,46,46])?this.finishToken(e,Kd):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([47,47])?(this.stream.advanceWhileChar(e=>{switch(e){case 10:case 13:case 12:return!1;default:return!0}}),!0):!1}},Jd=class{constructor(e,t){this.id=e,this.message=t}};let Yd={FromExpected:new Jd(`scss-fromexpected`,U(`'from' expected`)),ThroughOrToExpected:new Jd(`scss-throughexpected`,U(`'through' or 'to' expected`)),InExpected:new Jd(`scss-fromexpected`,U(`'in' expected`))};var Xd=class extends lu{constructor(){super(new qd)}_parseStylesheetStatement(e=!1){return this.peek(F.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(cs);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,G.URIOrStringExpected);for(;this.accept(F.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,G.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Bd))return null;let t=this.create(Ps);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(F.Colon))return this.finish(t,G.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,G.VariableValueExpected,[],e);for(;this.peek(F.Exclamation);)if(!t.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(F.Ident,/^(default|global)$/))return this.finish(t,G.UnknownKeyword);this.consumeToken()}return this.peek(F.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Gd)||this.accept(Wd)||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(Bd))return null;let e=this.create(Is);return this.consumeToken(),e}_parseModuleMember(){let e=this.mark(),t=this.create(Ks);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,G.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(F.Ident)&&!this.peek(Vd)&&!this.peekDelim(`-`))return null;let t=this.create(Io);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(F.Ident,/^--/);let n=!1,r=()=>{let e=this.mark();return this.acceptDelim(`-`)&&(this.hasWhitespace()||this.acceptDelim(`-`),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(F.Ident)||t.addChild(r())||n&&this.acceptRegexp(/^[\w-]/))&&(n=!0,!this.hasWhitespace()););return n?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Vd)){let e=this.create(Fs);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(F.CurlyR)?this.finish(e):this.finish(e,G.ExpressionExpected):this.accept(F.CurlyR)?this.finish(e):this.finish(e,G.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Hd)||this.peek(Ud)||this.peek(Wd)||this.peek(Gd)||this.peekDelim(`>`)||this.peekDelim(`<`)||this.peekIdent(`and`)||this.peekIdent(`or`)||this.peekDelim(`%`)){let e=this.createNode(R.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent(`not`)){let e=this.create(B);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(F.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 n=this.create(Wo);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(F.Colon))return this.finish(n,G.ColonExpected,[F.Colon],e||[F.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let r=!1;if(n.setValue(this._parseExpr())&&(r=!0,n.addChild(this._parsePrio())),this.peek(F.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!r)return this.finish(n,G.PropertyValueExpected);return this.peek(F.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){let e=this.create(as);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword(`@extend`)){let e=this.create(Ls);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,G.SelectorExpected);for(;this.accept(F.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(F.Exclamation)&&!this.acceptIdent(`optional`)?this.finish(e,G.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim(`&`)){let e=this.createNode(R.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim(`-`)||this.accept(F.Num)||this.accept(F.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim(`&`)););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim(`%`)){let e=this.createNode(R.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword(`@at-root`)){let e=this.createNode(R.SelectorPlaceholder);if(this.consumeToken(),this.accept(F.ParenthesisL)){if(!this.acceptIdent(`with`)&&!this.acceptIdent(`without`))return this.finish(e,G.IdentifierExpected);if(!this.accept(F.Colon))return this.finish(e,G.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,G.IdentifierExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.CurlyR])}return this.finish(e)}return null}_parseElementName(){let e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(F.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(R.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(F.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(Zo);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,G.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword(`@else`)){if(this.peekIdent(`if`))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(F.CurlyL)){let n=this.create(ts);this._parseBody(n,e),t.setElseClause(n)}}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword(`@for`))return null;let t=this.create(Qo);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent(`from`)?t.addChild(this._parseBinaryExpr())?!this.acceptIdent(`to`)&&!this.acceptIdent(`through`)?this.finish(t,Yd.ThroughOrToExpected,[F.CurlyR]):t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,G.ExpressionExpected,[F.CurlyR]):this.finish(t,G.ExpressionExpected,[F.CurlyR]):this.finish(t,Yd.FromExpected,[F.CurlyR]):this.finish(t,G.VariableNameExpected,[F.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword(`@each`))return null;let t=this.create($o);this.consumeToken();let n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,G.VariableNameExpected,[F.CurlyR]);for(;this.accept(F.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,G.VariableNameExpected,[F.CurlyR]);return this.finish(n),this.acceptIdent(`in`)?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,G.ExpressionExpected,[F.CurlyR]):this.finish(t,Yd.InExpected,[F.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword(`@while`))return null;let t=this.create(es);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,G.ExpressionExpected,[F.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(ns);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([z.Function])))return this.finish(e,G.IdentifierExpected,[F.CurlyR]);if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,G.VariableNameExpected)}return this.accept(F.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,G.RightParenthesisExpected,[F.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword(`@return`))return null;let e=this.createNode(R.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,G.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword(`@mixin`))return null;let e=this.create(Vs);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([z.Mixin])))return this.finish(e,G.IdentifierExpected,[F.CurlyR]);if(this.accept(F.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,G.VariableNameExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){let e=this.create(Yo);return e.setIdentifier(this._parseVariable())?(this.accept(Kd),this.accept(F.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,G.VariableValueExpected,[],[F.Comma,F.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword(`@content`))return null;let e=this.create(Rs);if(this.consumeToken(),this.accept(F.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,G.ExpressionExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword(`@include`))return null;let e=this.create(Bs);this.consumeToken();let t=this._parseIdent([z.Mixin]);if(!e.setIdentifier(t))return this.finish(e,G.IdentifierExpected,[F.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(`.`)&&!this.hasWhitespace()){let n=this._parseIdent([z.Mixin]);if(!n)return this.finish(e,G.IdentifierExpected,[F.CurlyR]);let r=this.create(Ks);t.referenceTypes=[z.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(F.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,G.ExpressionExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}return(this.peekIdent(`using`)||this.peek(F.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){let e=this.create(zs);if(this.acceptIdent(`using`)){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,G.VariableNameExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.CurlyL])}return this.peek(F.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){let e=this.create(Xo),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(F.Colon))e.setIdentifier(n);else{if(this.accept(Kd))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Kd),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(F.ParenthesisR)){this.restoreAtMark(e);let t=this.create(B);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(F.ParenthesisL))return null;let e=this.create(B);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(F.Comma);return this.accept(F.ParenthesisR)?this.finish(e):this.finish(e,G.RightParenthesisExpected)}_parseListElement(){let e=this.create(Us),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(F.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,G.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword(`@use`))return null;let e=this.create(ls);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,G.StringLiteralExpected);if(!this.peek(F.SemiColon)&&!this.peek(F.EOF)){if(!this.peekRegExp(F.Ident,/as|with/))return this.finish(e,G.UnknownKeyword);if(this.acceptIdent(`as`)&&!e.setIdentifier(this._parseIdent([z.Module]))&&!this.acceptDelim(`*`))return this.finish(e,G.IdentifierOrWildcardExpected);if(this.acceptIdent(`with`)){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}}return!this.accept(F.SemiColon)&&!this.accept(F.EOF)?this.finish(e,G.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){let e=this.create(us);return e.setIdentifier(this._parseVariable())?!this.accept(F.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,G.VariableValueExpected,[],[F.Comma,F.ParenthesisR]):this.accept(F.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent(`default`))?this.finish(e,G.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword(`@forward`))return null;let e=this.create(ds);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,G.StringLiteralExpected);if(this.acceptIdent(`as`)){let t=this._parseIdent([z.Forward]);if(!e.setIdentifier(t))return this.finish(e,G.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim(`*`))return this.finish(e,G.WildcardExpected)}if(this.acceptIdent(`with`)){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}else if((this.peekIdent(`hide`)||this.peekIdent(`show`))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,G.IdentifierOrVariableExpected);return!this.accept(F.SemiColon)&&!this.accept(F.EOF)?this.finish(e,G.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){let e=this.create(fs);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(F.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}};let Zd=U(`Sass documentation`);var Qd=class e extends Vu{constructor(t,n){super(`$`,t,n),$d(e.scssModuleLoaders),$d(e.scssModuleBuiltIns)}isImportPathParent(e){return e===R.Forward||e===R.Use||super.isImportPathParent(e)}getCompletionForImportPath(t,n){let r=t.getParent().type;if(r===R.Forward||r===R.Use)for(let r of e.scssModuleBuiltIns){let e={label:r.label,documentation:r.documentation,textEdit:q.replace(this.getCompletionRange(t),`'${r.label}'`),kind:J.Module};n.items.push(e)}return super.getCompletionForImportPath(t,n)}createReplaceFunction(){let t=1;return(n,r)=>`\\`+r+": ${"+ t+++`:`+(e.variableDefaults[r]||``)+`}`}createFunctionProposals(e,t,n,r){for(let i of e){let e=i.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),a={label:i.func.substr(0,i.func.indexOf(`(`)),detail:i.func,documentation:i.desc,textEdit:q.replace(this.getCompletionRange(t),e),insertTextFormat:Ac.Snippet,kind:J.Function};n&&(a.sortText=`z`),r.items.push(a)}return r}getCompletionsForSelector(t,n,r){return this.createFunctionProposals(e.selectorFuncs,null,!0,r),super.getCompletionsForSelector(t,n,r)}getTermProposals(t,n,r){let i=e.builtInFuncs;return t&&(i=i.filter(e=>!e.type||!t.restrictions||t.restrictions.indexOf(e.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(t,n,r)}getColorProposals(t,n,r){return this.createFunctionProposals(e.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Rule);for(let e of r){let r={label:e.name,textEdit:q.replace(this.getCompletionRange(t),e.name),kind:J.Function};n.items.push(r)}return n}getCompletionForAtDirectives(t){return t.items.push(...e.scssAtDirectives),t}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(t){return t.items.push(...e.scssModuleLoaders),t}};Qd.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`},Qd.colorProposals=[{func:`red($color)`,desc:U(`Gets the red component of a color.`)},{func:`green($color)`,desc:U(`Gets the green component of a color.`)},{func:`blue($color)`,desc:U(`Gets the blue component of a color.`)},{func:`mix($color, $color, [$weight])`,desc:U(`Mixes two colors together.`)},{func:`hue($color)`,desc:U(`Gets the hue component of a color.`)},{func:`saturation($color)`,desc:U(`Gets the saturation component of a color.`)},{func:`lightness($color)`,desc:U(`Gets the lightness component of a color.`)},{func:`adjust-hue($color, $degrees)`,desc:U(`Changes the hue of a color.`)},{func:`lighten($color, $amount)`,desc:U(`Makes a color lighter.`)},{func:`darken($color, $amount)`,desc:U(`Makes a color darker.`)},{func:`saturate($color, $amount)`,desc:U(`Makes a color more saturated.`)},{func:`desaturate($color, $amount)`,desc:U(`Makes a color less saturated.`)},{func:`grayscale($color)`,desc:U(`Converts a color to grayscale.`)},{func:`complement($color)`,desc:U(`Returns the complement of a color.`)},{func:`invert($color)`,desc:U(`Returns the inverse of a color.`)},{func:`alpha($color)`,desc:U(`Gets the opacity component of a color.`)},{func:`opacity($color)`,desc:`Gets the alpha component (opacity) of a color.`},{func:`rgba($color, $alpha)`,desc:U(`Changes the alpha component for a color.`)},{func:`opacify($color, $amount)`,desc:U(`Makes a color more opaque.`)},{func:`fade-in($color, $amount)`,desc:U(`Makes a color more opaque.`)},{func:`transparentize($color, $amount)`,desc:U(`Makes a color more transparent.`)},{func:`fade-out($color, $amount)`,desc:U(`Makes a color more transparent.`)},{func:`adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])`,desc:U(`Increases or decreases one or more components of a color.`)},{func:`scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])`,desc:U(`Fluidly scales one or more properties of a color.`)},{func:`change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])`,desc:U(`Changes one or more properties of a color.`)},{func:`ie-hex-str($color)`,desc:U(`Converts a color into the format understood by IE filters.`)}],Qd.selectorFuncs=[{func:`selector-nest($selectors…)`,desc:U(`Nests selector beneath one another like they would be nested in the stylesheet.`)},{func:`selector-append($selectors…)`,desc:U(`Appends selectors to one another without spaces in between.`)},{func:`selector-extend($selector, $extendee, $extender)`,desc:U(`Extends $extendee with $extender within $selector.`)},{func:`selector-replace($selector, $original, $replacement)`,desc:U(`Replaces $original with $replacement within $selector.`)},{func:`selector-unify($selector1, $selector2)`,desc:U(`Unifies two selectors to produce a selector that matches elements matched by both.`)},{func:`is-superselector($super, $sub)`,desc:U(`Returns whether $super matches all the elements $sub does, and possibly more.`)},{func:`simple-selectors($selector)`,desc:U(`Returns the simple selectors that comprise a compound selector.`)},{func:`selector-parse($selector)`,desc:U(`Parses a selector into the format returned by &.`)}],Qd.builtInFuncs=[{func:`unquote($string)`,desc:U(`Removes quotes from a string.`)},{func:`quote($string)`,desc:U(`Adds quotes to a string.`)},{func:`str-length($string)`,desc:U(`Returns the number of characters in a string.`)},{func:`str-insert($string, $insert, $index)`,desc:U(`Inserts $insert into $string at $index.`)},{func:`str-index($string, $substring)`,desc:U(`Returns the index of the first occurance of $substring in $string.`)},{func:`str-slice($string, $start-at, [$end-at])`,desc:U(`Extracts a substring from $string.`)},{func:`to-upper-case($string)`,desc:U(`Converts a string to upper case.`)},{func:`to-lower-case($string)`,desc:U(`Converts a string to lower case.`)},{func:`percentage($number)`,desc:U(`Converts a unitless number to a percentage.`),type:`percentage`},{func:`round($number)`,desc:U(`Rounds a number to the nearest whole number.`)},{func:`ceil($number)`,desc:U(`Rounds a number up to the next whole number.`)},{func:`floor($number)`,desc:U(`Rounds a number down to the previous whole number.`)},{func:`abs($number)`,desc:U(`Returns the absolute value of a number.`)},{func:`min($numbers)`,desc:U(`Finds the minimum of several numbers.`)},{func:`max($numbers)`,desc:U(`Finds the maximum of several numbers.`)},{func:`random([$limit])`,desc:U(`Returns a random number.`)},{func:`length($list)`,desc:U(`Returns the length of a list.`)},{func:`nth($list, $n)`,desc:U(`Returns a specific item in a list.`)},{func:`set-nth($list, $n, $value)`,desc:U(`Replaces the nth item in a list.`)},{func:`join($list1, $list2, [$separator])`,desc:U(`Joins together two lists into one.`)},{func:`append($list1, $val, [$separator])`,desc:U(`Appends a single value onto the end of a list.`)},{func:`zip($lists)`,desc:U(`Combines several lists into a single multidimensional list.`)},{func:`index($list, $value)`,desc:U(`Returns the position of a value within a list.`)},{func:`list-separator(#list)`,desc:U(`Returns the separator of a list.`)},{func:`map-get($map, $key)`,desc:U(`Returns the value in a map associated with a given key.`)},{func:`map-merge($map1, $map2)`,desc:U(`Merges two maps together into a new map.`)},{func:`map-remove($map, $keys)`,desc:U(`Returns a new map with keys removed.`)},{func:`map-keys($map)`,desc:U(`Returns a list of all keys in a map.`)},{func:`map-values($map)`,desc:U(`Returns a list of all values in a map.`)},{func:`map-has-key($map, $key)`,desc:U(`Returns whether a map has a value associated with a given key.`)},{func:`keywords($args)`,desc:U(`Returns the keywords passed to a function that takes variable arguments.`)},{func:`feature-exists($feature)`,desc:U(`Returns whether a feature exists in the current Sass runtime.`)},{func:`variable-exists($name)`,desc:U(`Returns whether a variable with the given name exists in the current scope.`)},{func:`global-variable-exists($name)`,desc:U(`Returns whether a variable with the given name exists in the global scope.`)},{func:`function-exists($name)`,desc:U(`Returns whether a function with the given name exists.`)},{func:`mixin-exists($name)`,desc:U(`Returns whether a mixin with the given name exists.`)},{func:`inspect($value)`,desc:U(`Returns the string representation of a value as it would be represented in Sass.`)},{func:`type-of($value)`,desc:U(`Returns the type of a value.`)},{func:`unit($number)`,desc:U(`Returns the unit(s) associated with a number.`)},{func:`unitless($number)`,desc:U(`Returns whether a number has units.`)},{func:`comparable($number1, $number2)`,desc:U(`Returns whether two numbers can be added, subtracted, or compared.`)},{func:`call($name, $args…)`,desc:U(`Dynamically calls a Sass function.`)}],Qd.scssAtDirectives=[{label:`@extend`,documentation:U(`Inherits the styles of another selector.`),kind:J.Keyword},{label:`@at-root`,documentation:U(`Causes one or more rules to be emitted at the root of the document.`),kind:J.Keyword},{label:`@debug`,documentation:U(`Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files.`),kind:J.Keyword},{label:`@warn`,documentation:U("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:J.Keyword},{label:`@error`,documentation:U(`Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions.`),kind:J.Keyword},{label:`@if`,documentation:U("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} {