copilot-operator 0.1.55 → 0.1.57
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.
- package/LICENSE +21 -21
- package/README.md +625 -609
- package/dist/src/api/folderPicker.js +22 -22
- package/dist/src/api/operator.controller.js +30 -3
- package/dist/src/api/operator.service.js +96 -10
- package/dist/src/api/security.js +1 -1
- package/dist/src/api/server.js +9 -1
- package/dist/src/api/settings.js +18 -4
- package/dist/src/cli.js +16 -15
- package/dist/src/config/home.js +109 -0
- package/dist/src/config/layout.js +40 -5
- package/dist/src/config/schema.js +5 -1
- package/dist/src/exec/network.js +50 -3
- package/dist/src/orchestrator/leadRunner.js +20 -3
- package/dist/src/orchestrator/review.js +3 -2
- package/dist/src/orchestrator/taskRunner.js +88 -6
- package/dist/src/plan/kerrigan.js +126 -126
- package/dist/src/plan/systemGuide.js +99 -11
- package/dist/src/session/store.js +4 -0
- package/dist/src/session/workspaceGit.js +95 -1
- package/dist/src/transport/profileLock.js +34 -4
- package/dist/web/404.html +3 -3
- package/dist/web/_next/static/chunks/1077.7e88c156c16718c0.js +1 -0
- package/dist/web/_next/static/chunks/1083.0122bea31f7199d9.js +1 -0
- package/dist/web/_next/static/chunks/1490.f5154054ddfd3dee.js +1 -0
- package/dist/web/_next/static/chunks/1536.98fab69162f370f0.js +1 -0
- package/dist/web/_next/static/chunks/1548.a7127a9edf3f266b.js +1 -0
- package/dist/web/_next/static/chunks/1584.7500138d08971f81.js +1 -0
- package/dist/web/_next/static/chunks/1732.90182d376c75c315.js +1 -0
- package/dist/web/_next/static/chunks/17449abc.fa53da036b7dcfb4.js +1 -0
- package/dist/web/_next/static/chunks/1872.d12259d09bb1173f.js +1 -0
- package/dist/web/_next/static/chunks/192.955be0d5fcd27ec6.js +1 -0
- package/dist/web/_next/static/chunks/1920.59b93a4215a75653.js +1 -0
- package/dist/web/_next/static/chunks/2063.4745e20abad5b208.js +1 -0
- package/dist/web/_next/static/chunks/2163.60f52655ceb57752.js +1 -0
- package/dist/web/_next/static/chunks/2175.8c8957600f6b88a8.js +1 -0
- package/dist/web/_next/static/chunks/2280.5a3754f49656d989.js +1 -0
- package/dist/web/_next/static/chunks/2355.d6bb92f10d516f81.js +1 -0
- package/dist/web/_next/static/chunks/2378.4f15342be64a9d23.js +1 -0
- package/dist/web/_next/static/chunks/2395.c2c4d3696d3b5542.js +1 -0
- package/dist/web/_next/static/chunks/2486.d130023b2b399eaa.js +1 -0
- package/dist/web/_next/static/chunks/2606.8e9434e7fee257b9.js +1 -0
- package/dist/web/_next/static/chunks/26dd8e60.1890515693b4ca88.js +1 -0
- package/dist/web/_next/static/chunks/2738.2559ed1058f6fb19.js +1 -0
- package/dist/web/_next/static/chunks/2821.409d92f5ac5b8142.js +1 -0
- package/dist/web/_next/static/chunks/3088.12b1d19ca55225b7.js +1 -0
- package/dist/web/_next/static/chunks/3152.d623d85a9afed5d3.js +1 -0
- package/dist/web/_next/static/chunks/3184.0788c67536fc4140.js +1 -0
- package/dist/web/_next/static/chunks/3194.8ee589997ce1e093.js +1 -0
- package/dist/web/_next/static/chunks/3322.4f7b378a41711478.js +1 -0
- package/dist/web/_next/static/chunks/3564.bfa030e92401f57d.js +1 -0
- package/dist/web/_next/static/chunks/358.4791f77f174006f3.js +1 -0
- package/dist/web/_next/static/chunks/3696.a367f4c8f42909d1.js +1 -0
- package/dist/web/_next/static/chunks/3748.8726b202d79d0dba.js +3 -0
- package/dist/web/_next/static/chunks/3794.19aedfb95f89dc48.js +1 -0
- package/dist/web/_next/static/chunks/384.063f394c789898a7.js +1 -0
- package/dist/web/_next/static/chunks/3854.39b7a1bf2b4189fe.js +1 -0
- package/dist/web/_next/static/chunks/386.2718f961400a3322.js +1 -0
- package/dist/web/_next/static/chunks/4008.3691a32e1711848f.js +1 -0
- package/dist/web/_next/static/chunks/4054.1c8d37b1513d20d8.js +1 -0
- package/dist/web/_next/static/chunks/4328.e326d66dd5c820c6.js +1 -0
- package/dist/web/_next/static/chunks/4444.36f5d8532bd6300d.js +1 -0
- package/dist/web/_next/static/chunks/4512-8bcb4b34f41115b4.js +1 -0
- package/dist/web/_next/static/chunks/4560.b8235d283fb3608c.js +1 -0
- package/dist/web/_next/static/chunks/464.f60ecfb6c72ec733.js +1 -0
- package/dist/web/_next/static/chunks/4912.1ab85b0ebf52a3e0.js +1 -0
- package/dist/web/_next/static/chunks/4982.bbbd303d665de4f0.js +1 -0
- package/dist/web/_next/static/chunks/4fecf3c3.e14d65bd1dce80cf.js +1 -0
- package/dist/web/_next/static/chunks/5052.dc8c36742419eed5.js +1 -0
- package/dist/web/_next/static/chunks/{7496.17282033df0e8794.js → 5115.fbe164892bfd6fa4.js} +1 -1
- package/dist/web/_next/static/chunks/5120.b4aadb89d4fb4f65.js +1 -0
- package/dist/web/_next/static/chunks/5448.1c4e0b719af53b3f.js +1 -0
- package/dist/web/_next/static/chunks/5623.cc6818f4096ce4c2.js +1 -0
- package/dist/web/_next/static/chunks/5664.507fea1f6305067e.js +1 -0
- package/dist/web/_next/static/chunks/5706.be484c6a7bed3fde.js +1 -0
- package/dist/web/_next/static/chunks/6336.b09d0d920c7631eb.js +1 -0
- package/dist/web/_next/static/chunks/6364.5b0466f24f4ecf58.js +1 -0
- package/dist/web/_next/static/chunks/640.2c2baacde5197a77.js +1 -0
- package/dist/web/_next/static/chunks/6419.61399b0413b8bef0.js +1 -0
- package/dist/web/_next/static/chunks/642.b70763e1cfe9e45e.js +1 -0
- package/dist/web/_next/static/chunks/6554.0110334a71e72bbe.js +1 -0
- package/dist/web/_next/static/chunks/6688.4a6ac23ba061262b.js +1 -0
- package/dist/web/_next/static/chunks/6815.6537cc012ba16cca.js +1 -0
- package/dist/web/_next/static/chunks/6896.33fdeb4e682c2cab.js +1 -0
- package/dist/web/_next/static/chunks/6912.3416822e13b4bc03.js +1 -0
- package/dist/web/_next/static/chunks/6944.635230aa8cb23871.js +1 -0
- package/dist/web/_next/static/chunks/6964.35718884ad3375bc.js +1 -0
- package/dist/web/_next/static/chunks/6992.4b059bae2659231d.js +1 -0
- package/dist/web/_next/static/chunks/6996.7c41217972cabc3f.js +1 -0
- package/dist/web/_next/static/chunks/7024.8bc670b892a558bb.js +1 -0
- package/dist/web/_next/static/chunks/7040.e058d8f95c3c11e7.js +1 -0
- package/dist/web/_next/static/chunks/714.bee36b765509e92c.js +1 -0
- package/dist/web/_next/static/chunks/7220.c9c5c5f25baafec7.js +1 -0
- package/dist/web/_next/static/chunks/7250.7f1d45021e49d2fd.js +1 -0
- package/dist/web/_next/static/chunks/7290.7bceed706f7b6df5.js +1 -0
- package/dist/web/_next/static/chunks/7301.c60eb2ba8ae6b859.js +1 -0
- package/dist/web/_next/static/chunks/7328.021e5e45124e40de.js +1 -0
- package/dist/web/_next/static/chunks/7340.a5a75ee889c30b74.js +1 -0
- package/dist/web/_next/static/chunks/7443.c189418756727101.js +1 -0
- package/dist/web/_next/static/chunks/7484.c0e6bfca7b2fb65e.js +1 -0
- package/dist/web/_next/static/chunks/7496.e638a7286c17e438.js +1 -0
- package/dist/web/_next/static/chunks/7695.11ba99db589cb586.js +1 -0
- package/dist/web/_next/static/chunks/7764.e62333ee1d63a458.js +1 -0
- package/dist/web/_next/static/chunks/7921-fb0045927b0e86a8.js +1 -0
- package/dist/web/_next/static/chunks/80.df762af692aca107.js +1 -0
- package/dist/web/_next/static/chunks/8024.4bd0b5a7f26a0f7d.js +1 -0
- package/dist/web/_next/static/chunks/82b69429.c6dd4e5c5ac704f3.js +368 -0
- package/dist/web/_next/static/chunks/8360.371456f14873ee9f.js +1 -0
- package/dist/web/_next/static/chunks/8544.7c1fb012f9073eaa.js +1 -0
- package/dist/web/_next/static/chunks/8547.424f9970cc72775f.js +1 -0
- package/dist/web/_next/static/chunks/8584.97613589db58864f.js +1 -0
- package/dist/web/_next/static/chunks/8616.8e05c4a20dcdf39d.js +1 -0
- package/dist/web/_next/static/chunks/8752.bf29293df3366e17.js +298 -0
- package/dist/web/_next/static/chunks/8800.3c7b01176e98160a.js +1 -0
- package/dist/web/_next/static/chunks/88b2132a.04b02968da05b8a6.js +1005 -0
- package/dist/web/_next/static/chunks/8924.49dd385ac101fb7e.js +1 -0
- package/dist/web/_next/static/chunks/896.eb46d6e001d25d0f.js +1 -0
- package/dist/web/_next/static/chunks/9003.3d5c7a418d0b858b.js +1 -0
- package/dist/web/_next/static/chunks/9067.f7e111c6aa999784.js +1 -0
- package/dist/web/_next/static/chunks/9068.9662bb8fa5fdc637.js +1 -0
- package/dist/web/_next/static/chunks/9178.a7631bd283f2a69c.js +1 -0
- package/dist/web/_next/static/chunks/9190.e3a90b1a9ed21668.js +1 -0
- package/dist/web/_next/static/chunks/9296.59fcfc8261a4c6bd.js +1 -0
- package/dist/web/_next/static/chunks/9312.e1fb4089a122d3d3.js +1 -0
- package/dist/web/_next/static/chunks/9348.022486b05b882739.js +1 -0
- package/dist/web/_next/static/chunks/948.132a0571d85c8b01.js +1 -0
- package/dist/web/_next/static/chunks/951.43a4ba54b1d1ff4e.js +3 -0
- package/dist/web/_next/static/chunks/9544.acc06fe34aa32c5c.js +7 -0
- package/dist/web/_next/static/chunks/9591.d205941f0062de24.js +1 -0
- package/dist/web/_next/static/chunks/9628.d8954a2bd28b85a6.js +1 -0
- package/dist/web/_next/static/chunks/9636.35df6241125f8513.js +1 -0
- package/dist/web/_next/static/chunks/9658.cdecb568f615e4c9.js +782 -0
- package/dist/web/_next/static/chunks/9672.b379566a8bfcd947.js +1 -0
- package/dist/web/_next/static/chunks/9680.d10b204d08ca3a62.js +1 -0
- package/dist/web/_next/static/chunks/9728.1d4cb6c68bd55f44.js +1 -0
- package/dist/web/_next/static/chunks/9747.a5828643aaff11c0.js +1 -0
- package/dist/web/_next/static/chunks/9784.c9938b7e977e14eb.js +1 -0
- package/dist/web/_next/static/chunks/9812.024424a52730b057.js +1 -0
- package/dist/web/_next/static/chunks/9888.ce925cd415b672ef.js +1 -0
- package/dist/web/_next/static/chunks/{9891.91a2c59fd073fd48.js → 9891.a97db7c8f05693d1.js} +1 -1
- package/dist/web/_next/static/chunks/9904.a3d2f8569d7355ab.js +1 -0
- package/dist/web/_next/static/chunks/992.8470b96c23472686.js +1 -0
- package/dist/web/_next/static/chunks/9924.03252dda78c705c3.js +1 -0
- package/dist/web/_next/static/chunks/9968.3d45ff9183e8b07b.js +1 -0
- package/dist/web/_next/static/chunks/app/_not-found/page-23c6c0396966da29.js +1 -0
- package/dist/web/_next/static/chunks/app/defaults/page-4e5be923763ba3d9.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-9cd9b0b0587f4882.js +1 -0
- package/dist/web/_next/static/chunks/app/page-8e85b507af649f85.js +1 -0
- package/dist/web/_next/static/chunks/app/settings/page-b39878dce98ded94.js +1 -0
- package/dist/web/_next/static/chunks/app/system/page-176448acb2c8baa6.js +1 -0
- package/dist/web/_next/static/chunks/{main-app-f747f0f5ddb4213b.js → main-app-d23441ca81b3a063.js} +1 -1
- package/dist/web/_next/static/chunks/webpack-d103630008e57024.js +1 -0
- package/dist/web/_next/static/css/2de713eca93a7750.css +3 -0
- package/dist/web/_next/static/css/4bf77b2aec4626c2.css +1 -0
- package/dist/web/_next/static/css/4bfdd3ebb3d1a180.css +1 -0
- package/dist/web/_next/static/css/73368887921d70d9.css +1 -0
- package/dist/web/_next/static/g2MUlOzNxfAGFR7EI9zQv/_buildManifest.js +1 -0
- package/dist/web/_next/static/media/codicon.5ce2572b.ttf +0 -0
- package/dist/web/_next/static/media/editorWebWorkerMain.828b206c.js +1 -0
- package/dist/web/defaults.html +3 -3
- package/dist/web/defaults.txt +11 -10
- package/dist/web/icon.svg +4 -0
- package/dist/web/index.html +4 -4
- package/dist/web/index.txt +11 -10
- package/dist/web/settings.html +14 -0
- package/dist/web/settings.txt +26 -0
- package/dist/web/system.html +3 -3
- package/dist/web/system.txt +11 -10
- package/dist/web/third-party-notices.txt +5966 -0
- package/package.json +160 -153
- package/prompts/lead1.md +140 -140
- package/prompts/level1.md +574 -574
- package/prompts/review1.md +287 -287
- package/dist/src/context/desktopDir.js +0 -44
- package/dist/web/_next/static/chunks/1077.3c07f38a61cef38a.js +0 -1
- package/dist/web/_next/static/chunks/1548.55dadf800d6c2a79.js +0 -1
- package/dist/web/_next/static/chunks/2163.83d1085b99ac1773.js +0 -1
- package/dist/web/_next/static/chunks/714.88c495053f62f187.js +0 -1
- package/dist/web/_next/static/chunks/7220.f1e8a10d52a7ee87.js +0 -1
- package/dist/web/_next/static/chunks/7500-1353339f7e2eda10.js +0 -1
- package/dist/web/_next/static/chunks/7921-56de379f7bdfbacf.js +0 -1
- package/dist/web/_next/static/chunks/8547.0a9997b67008c706.js +0 -1
- package/dist/web/_next/static/chunks/8584.b34930a6837344a6.js +0 -1
- package/dist/web/_next/static/chunks/9067.5651e8647cef053f.js +0 -1
- package/dist/web/_next/static/chunks/9591.fabd60bd0d10341c.js +0 -1
- package/dist/web/_next/static/chunks/9747.ad6b319cf12169ee.js +0 -1
- package/dist/web/_next/static/chunks/app/_not-found/page-1264c0db9665169c.js +0 -1
- package/dist/web/_next/static/chunks/app/defaults/page-ba24062a86d50e12.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-46efb208d7c88648.js +0 -1
- package/dist/web/_next/static/chunks/app/page-07f80fd07281a230.js +0 -1
- package/dist/web/_next/static/chunks/app/system/page-825f53f14d16033d.js +0 -1
- package/dist/web/_next/static/chunks/webpack-ab0451ef95a8f52a.js +0 -1
- package/dist/web/_next/static/css/131c746a9d388eda.css +0 -1
- package/dist/web/_next/static/w1xPyNasTvFr11R3F7HkS/_buildManifest.js +0 -1
- /package/dist/web/_next/static/{w1xPyNasTvFr11R3F7HkS → g2MUlOzNxfAGFR7EI9zQv}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9544],{99544:(e,t,i)=>{var r,n,s,a,o,l,h,c,u,p,d,f,m,g,_,y,b,x,C,k,v,S,w,P,E,R,I,D,A,T,$,M,L,F,N,V,O,U,B,W,K,z,j,q,H,Q,G,J,X,Z,Y,ee,et,ei,er,en,es,ea,eo,el,eh,ec,eu,ep,ed,ef,em,eg,e_,ey,eb,ex,eC,ek,ev,eS,ew,eP,eE,eR,eI,eD,eA,eT,e$,eM,eL,eF,eN,eV,eO,eU=i(11006),eB=i(72222),eW=i(77254);!function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.ContainerQueryLength=42]="ContainerQueryLength",e[e.CustomToken=43]="CustomToken"}(r||(r={}));class eK{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceWhileChar(e){let t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}}let ez={};ez[59]=r.SemiColon,ez[58]=r.Colon,ez[123]=r.CurlyL,ez[125]=r.CurlyR,ez[93]=r.BracketR,ez[91]=r.BracketL,ez[40]=r.ParenthesisL,ez[41]=r.ParenthesisR,ez[44]=r.Comma;let ej={};ej.em=r.EMS,ej.ex=r.EXS,ej.px=r.Length,ej.cm=r.Length,ej.mm=r.Length,ej.in=r.Length,ej.pt=r.Length,ej.pc=r.Length,ej.deg=r.Angle,ej.rad=r.Angle,ej.grad=r.Angle,ej.ms=r.Time,ej.s=r.Time,ej.hz=r.Freq,ej.khz=r.Freq,ej["%"]=r.Percentage,ej.fr=r.Percentage,ej.dpi=r.Resolution,ej.dpcm=r.Resolution,ej.cqw=r.ContainerQueryLength,ej.cqh=r.ContainerQueryLength,ej.cqi=r.ContainerQueryLength,ej.cqb=r.ContainerQueryLength,ej.cqmin=r.ContainerQueryLength,ej.cqmax=r.ContainerQueryLength;class eq{constructor(){this.stream=new eK(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new eK(e)}finishToken(e,t,i){return{offset:e,len:this.stream.pos()-e,type:t,text:i||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){let e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,r.UnquotedString,t.join("")):null}scan(){let e=this.trivia();if(null!==e)return e;let t=this.stream.pos();return this.stream.eos()?this.finishToken(t,r.EOF):this.scanNext(t)}tryScanUnicode(){let e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,r.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([60,33,45,45]))return this.finishToken(e,r.CDO);if(this.stream.advanceIfChars([45,45,62]))return this.finishToken(e,r.CDC);let t=[];if(this.ident(t))return this.finishToken(e,r.Ident,t.join(""));if(this.stream.advanceIfChar(64)){if(t=["@"],!this._name(t))return this.finishToken(e,r.Delim);{let i=t.join("");return"@charset"===i?this.finishToken(e,r.Charset,i):this.finishToken(e,r.AtKeyword,i)}}if(this.stream.advanceIfChar(35))return(t=["#"],this._name(t))?this.finishToken(e,r.Hash,t.join("")):this.finishToken(e,r.Delim);if(this.stream.advanceIfChar(33))return this.finishToken(e,r.Exclamation);if(this._number()){let i=this.stream.pos();if(t=[this.stream.substring(e,i)],this.stream.advanceIfChar(37))return this.finishToken(e,r.Percentage);if(this.ident(t)){let n=ej[this.stream.substring(i).toLowerCase()];return void 0!==n?this.finishToken(e,n,t.join("")):this.finishToken(e,r.Dimension,t.join(""))}return this.finishToken(e,r.Num)}t=[];let i=this._string(t);return null!==i?this.finishToken(e,i,t.join("")):void 0!==(i=ez[this.stream.peekChar()])?(this.stream.advance(1),this.finishToken(e,i)):126===this.stream.peekChar(0)&&61===this.stream.peekChar(1)?(this.stream.advance(2),this.finishToken(e,r.Includes)):124===this.stream.peekChar(0)&&61===this.stream.peekChar(1)?(this.stream.advance(2),this.finishToken(e,r.Dashmatch)):42===this.stream.peekChar(0)&&61===this.stream.peekChar(1)?(this.stream.advance(2),this.finishToken(e,r.SubstringOperator)):94===this.stream.peekChar(0)&&61===this.stream.peekChar(1)?(this.stream.advance(2),this.finishToken(e,r.PrefixOperator)):36===this.stream.peekChar(0)&&61===this.stream.peekChar(1)?(this.stream.advance(2),this.finishToken(e,r.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,r.Delim))}trivia(){for(;;){let e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,r.Whitespace)}else if(!this.comment())return null;else if(!this.ignoreComment)return this.finishToken(e,r.Comment)}}comment(){if(this.stream.advanceIfChars([47,42])){let e=!1,t=!1;return this.stream.advanceWhileChar(i=>t&&47===i?(e=!0,!1):(t=42===i,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return 46===this.stream.peekChar()&&(e=1),(t=this.stream.peekChar(e))>=48&&t<=57&&(this.stream.advance(e+1),this.stream.advanceWhileChar(t=>t>=48&&t<=57||0===e&&46===t),!0)}_newline(e){let t=this.stream.peekChar();switch(t){case 13:case 12:case 10:return this.stream.advance(1),e.push(String.fromCharCode(t)),13===t&&this.stream.advanceIfChar(10)&&e.push("\n"),!0}return!1}_escape(e,t){let i=this.stream.peekChar();if(92===i){this.stream.advance(1),i=this.stream.peekChar();let r=0;for(;r<6&&(i>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70);)this.stream.advance(1),i=this.stream.peekChar(),r++;if(r>0){try{let t=parseInt(this.stream.substring(this.stream.pos()-r),16);t&&e.push(String.fromCharCode(t))}catch(e){}return 32===i||9===i?this.stream.advance(1):this._newline([]),!0}if(13!==i&&12!==i&&10!==i)return this.stream.advance(1),e.push(String.fromCharCode(i)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){let i=this.stream.peekChar();return 0!==i&&i!==e&&92!==i&&13!==i&&12!==i&&10!==i&&(this.stream.advance(1),t.push(String.fromCharCode(i)),!0)}_string(e){if(39===this.stream.peekChar()||34===this.stream.peekChar()){let t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),r.String):r.BadString}return null}_unquotedChar(e){let t=this.stream.peekChar();return 0!==t&&92!==t&&39!==t&&34!==t&&40!==t&&41!==t&&32!==t&&9!==t&&10!==t&&12!==t&&13!==t&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(e=>32===e||9===e||10===e||12===e||13===e)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){let t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1}_identFirstChar(e){let t=this.stream.peekChar();return(95===t||t>=97&&t<=122||t>=65&&t<=90||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_minus(e){let t=this.stream.peekChar();return 45===t&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_identChar(e){let t=this.stream.peekChar();return(95===t||45===t||t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unicodeRange(){if(this.stream.advanceIfChar(43)){let e=e=>e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(e=>63===e);if(t>=1&&t<=6)if(!this.stream.advanceIfChar(45))return!0;else{let t=this.stream.advanceWhileChar(e);if(t>=1&&t<=6)return!0}}return!1}}function eH(e,t){if(e.length<t.length)return!1;for(let i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0}function eQ(e,t){let i=e.length-t.length;return i>0?e.lastIndexOf(t)===i:0===i&&e===t}function eG(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}function eJ(e,t){let i="";for(;t>0;)(1&t)==1&&(i+=e),e+=e,t>>>=1;return i}function eX(e,t){let i=null;return!e||t<e.offset||t>e.end?null:(e.accept(e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(i?e.length<=i.length&&(i=e):i=e,!0)),i)}function eZ(e,t){let i=eX(e,t),r=[];for(;i;)r.unshift(i),i=i.parent;return r}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange",e[e.Layer=83]="Layer",e[e.LayerNameList=84]="LayerNameList",e[e.LayerName=85]="LayerName",e[e.PropertyAtRule=86]="PropertyAtRule",e[e.Container=87]="Container"}(n||(n={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility",e[e.Property=9]="Property"}(s||(s={}));class eY{get end(){return this.offset+this.length}constructor(e=-1,t=-1,i){this.parent=null,this.offset=e,this.length=t,i&&(this.nodeType=i)}set type(e){this.nodeType=e}get type(){return this.nodeType||n.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(let t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){let t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let i=this.children;return i||(i=this.children=[]),-1!==t?i.splice(t,0,e):i.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return!!this.issues&&this.issues.length>0||e&&Array.isArray(this.children)&&this.children.some(e=>e.isErroneous(!0))}setNode(e,t,i=-1){return!!t&&(t.attachTo(this,i),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset);let t=e.end;(t>this.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e<this.children.length?this.children[e]:null}addChildren(e){for(let t of e)this.addChild(t)}findFirstChildBeforeOffset(e){if(this.children){let t=null;for(let i=this.children.length-1;i>=0;i--)if((t=this.children[i]).offset<=e)return t}return null}findChildAtOffset(e,t){let i=this.findFirstChildBeforeOffset(e);return i&&i.end>=e?t&&i.findChildAtOffset(e,!0)||i:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof e0;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(e=>t.type===e);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}}class e0 extends eY{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class e1 extends eY{constructor(e,t){super(e,t)}get type(){return n.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class e2 extends eY{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return n.Identifier}containsInterpolation(){return this.hasChildren()}}class e5 extends eY{constructor(e,t){super(e,t)}get type(){return n.Stylesheet}}class e4 extends eY{constructor(e,t){super(e,t)}get type(){return n.Declarations}}class e3 extends eY{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class e6 extends e3{constructor(e,t){super(e,t)}get type(){return n.Ruleset}getSelectors(){return this.selectors||(this.selectors=new e0(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(n.Declarations)}}class e7 extends eY{constructor(e,t){super(e,t)}get type(){return n.Selector}}class e8 extends eY{constructor(e,t){super(e,t)}get type(){return n.SimpleSelector}}class e9 extends eY{constructor(e,t){super(e,t)}}class te extends e3{constructor(e,t){super(e,t)}get type(){return n.CustomPropertySet}}class tt extends e9{constructor(e,t){super(e,t),this.property=null}get type(){return n.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){let e=this.property?this.property.getName():"unknown";if(this.parent instanceof e4&&this.parent.getParent()instanceof tg){let t=this.parent.getParent().getParent();if(t instanceof tt)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){let e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){let t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class ti extends tt{constructor(e,t){super(e,t)}get type(){return n.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class tr extends eY{constructor(e,t){super(e,t)}get type(){return n.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e,t){let i=t.exec(e);return i&&i[0].length?e.substr(0,e.length-i[0].length):e}(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class tn extends eY{constructor(e,t){super(e,t)}get type(){return n.Invocation}getArguments(){return this.arguments||(this.arguments=new e0(this)),this.arguments}}class ts extends tn{constructor(e,t){super(e,t)}get type(){return n.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class ta extends eY{constructor(e,t){super(e,t)}get type(){return n.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class to extends eY{constructor(e,t){super(e,t)}get type(){return n.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class tl extends e3{constructor(e,t){super(e,t)}get type(){return n.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class th extends e3{constructor(e,t){super(e,t)}get type(){return n.For}setVariable(e){return this.setNode("variable",e,0)}}class tc extends e3{constructor(e,t){super(e,t)}get type(){return n.Each}getVariables(){return this.variables||(this.variables=new e0(this)),this.variables}}class tu extends e3{constructor(e,t){super(e,t)}get type(){return n.While}}class tp extends e3{constructor(e,t){super(e,t)}get type(){return n.Else}}class td extends e3{constructor(e,t){super(e,t)}get type(){return n.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new e0(this)),this.parameters}}class tf extends e3{constructor(e,t){super(e,t)}get type(){return n.ViewPort}}class tm extends e3{constructor(e,t){super(e,t)}get type(){return n.FontFace}}class tg extends e3{constructor(e,t){super(e,t)}get type(){return n.NestedProperties}}class t_ extends e3{constructor(e,t){super(e,t)}get type(){return n.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class ty extends e3{constructor(e,t){super(e,t)}get type(){return n.KeyframeSelector}}class tb extends eY{constructor(e,t){super(e,t)}get type(){return n.Import}setMedialist(e){return!!e&&(e.attachTo(this),!0)}}class tx extends eY{get type(){return n.Use}getParameters(){return this.parameters||(this.parameters=new e0(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class tC extends eY{get type(){return n.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class tk extends eY{get type(){return n.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new e0(this)),this.members}getParameters(){return this.parameters||(this.parameters=new e0(this)),this.parameters}}class tv extends eY{get type(){return n.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class tS extends eY{constructor(e,t){super(e,t)}get type(){return n.Namespace}}class tw extends e3{constructor(e,t){super(e,t)}get type(){return n.Media}}class tP extends e3{constructor(e,t){super(e,t)}get type(){return n.Supports}}class tE extends e3{constructor(e,t){super(e,t)}get type(){return n.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class tR extends e3{constructor(e,t){super(e,t)}get type(){return n.PropertyAtRule}setName(e){return!!e&&(e.attachTo(this),this.name=e,!0)}getName(){return this.name}}class tI extends e3{constructor(e,t){super(e,t)}get type(){return n.Document}}class tD extends e3{constructor(e,t){super(e,t)}get type(){return n.Container}}class tA extends eY{constructor(e,t){super(e,t)}}class tT extends eY{constructor(e,t){super(e,t)}get type(){return n.MediaQuery}}class t$ extends eY{constructor(e,t){super(e,t)}get type(){return n.MediaCondition}}class tM extends eY{constructor(e,t){super(e,t)}get type(){return n.MediaFeature}}class tL extends eY{constructor(e,t){super(e,t)}get type(){return n.SupportsCondition}}class tF extends e3{constructor(e,t){super(e,t)}get type(){return n.Page}}class tN extends e3{constructor(e,t){super(e,t)}get type(){return n.PageBoxMarginBox}}class tV extends eY{constructor(e,t){super(e,t)}get type(){return n.Expression}}class tO extends eY{constructor(e,t){super(e,t)}get type(){return n.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class tU extends eY{constructor(e,t){super(e,t)}get type(){return n.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class tB extends eY{constructor(e,t){super(e,t)}get type(){return n.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class tW extends eY{constructor(e,t){super(e,t)}get type(){return n.HexColorValue}}class tK extends eY{constructor(e,t){super(e,t)}get type(){return n.RatioValue}}class tz extends eY{constructor(e,t){super(e,t)}get type(){return n.NumericValue}getValue(){let e,t=this.getText(),i=0;for(let r=0,n=t.length;r<n&&(48<=(e=t.charCodeAt(r))&&e<=57||46===e);r++)i+=1;return{value:t.substring(0,i),unit:i<t.length?t.substring(i):void 0}}}class tj extends e9{constructor(e,t){super(e,t),this.needsSemicolon=!0}get type(){return n.VariableDeclaration}setVariable(e){return!!e&&(e.attachTo(this),this.variable=e,!0)}getVariable(){return this.variable}getName(){return this.variable?this.variable.getName():""}setValue(e){return!!e&&(e.attachTo(this),this.value=e,!0)}getValue(){return this.value}}class tq extends eY{constructor(e,t){super(e,t)}get type(){return n.Interpolation}}class tH extends eY{constructor(e,t){super(e,t)}get type(){return n.VariableName}getName(){return this.getText()}}class tQ extends eY{constructor(e,t){super(e,t)}get type(){return n.ExtendsReference}getSelectors(){return this.selectors||(this.selectors=new e0(this)),this.selectors}}class tG extends eY{constructor(e,t){super(e,t)}get type(){return n.MixinContentReference}getArguments(){return this.arguments||(this.arguments=new e0(this)),this.arguments}}class tJ extends e3{constructor(e,t){super(e,t)}get type(){return n.MixinContentDeclaration}getParameters(){return this.parameters||(this.parameters=new e0(this)),this.parameters}}class tX extends eY{constructor(e,t){super(e,t)}get type(){return n.MixinReference}getNamespaces(){return this.namespaces||(this.namespaces=new e0(this)),this.namespaces}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getArguments(){return this.arguments||(this.arguments=new e0(this)),this.arguments}setContent(e){return this.setNode("content",e)}getContent(){return this.content}}class tZ extends e3{constructor(e,t){super(e,t)}get type(){return n.MixinDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new e0(this)),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}}class tY extends e3{constructor(e,t){super(e,t)}get type(){return n.UnknownAtRule}setAtRuleName(e){this.atRuleName=e}getAtRuleName(){return this.atRuleName}}class t0 extends eY{get type(){return n.ListEntry}setKey(e){return this.setNode("key",e,0)}setValue(e){return this.setNode("value",e,1)}}class t1 extends eY{getConditions(){return this.conditions||(this.conditions=new e0(this)),this.conditions}}class t2 extends eY{setVariable(e){return this.setNode("variable",e)}}class t5 extends eY{get type(){return n.Module}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(a||(a={}));class t4{constructor(e,t,i,r,n=e.offset,s=e.length){this.node=e,this.rule=t,this.level=i,this.message=r||t.message,this.offset=n,this.length=s}getRule(){return this.rule}getLevel(){return this.level}getOffset(){return this.offset}getLength(){return this.length}getNode(){return this.node}getMessage(){return this.message}}class t3{static entries(e){let t=new t3;return e.acceptVisitor(t),t.entries}constructor(){this.entries=[]}visitNode(e){return e.isErroneous()&&e.collectIssues(this.entries),!0}}function t6(...e){var t,i;let r,n,s=e[0];if("string"==typeof s)r=s,e.splice(0,1),n=e&&"object"==typeof e[0]?e[0]:e;else if(s instanceof Array){let t=e.slice(1);if(s.length!==t.length+1)throw Error("expected a string as the first argument to l10n.t");let i=s[0];for(let e=1;e<s.length;e++)i+=`{${e-1}}`+s[e];return t6(i,...t)}else r=s.message,s.comment&&s.comment.length>0&&(Array.isArray(s.comment)?s.comment.join(""):s.comment),n=s.args??{};return t=r,0===Object.keys(i=n).length?t:t.replace(t7,(e,t)=>i[t]??e)}var t7=/{([^}]+)}/g;class t8{constructor(e,t){this.id=e,this.message=t}}let t9={NumberExpected:new t8("css-numberexpected",t6("number expected")),ConditionExpected:new t8("css-conditionexpected",t6("condition expected")),RuleOrSelectorExpected:new t8("css-ruleorselectorexpected",t6("at-rule or selector expected")),DotExpected:new t8("css-dotexpected",t6("dot expected")),ColonExpected:new t8("css-colonexpected",t6("colon expected")),SemiColonExpected:new t8("css-semicolonexpected",t6("semi-colon expected")),TermExpected:new t8("css-termexpected",t6("term expected")),ExpressionExpected:new t8("css-expressionexpected",t6("expression expected")),OperatorExpected:new t8("css-operatorexpected",t6("operator expected")),IdentifierExpected:new t8("css-identifierexpected",t6("identifier expected")),PercentageExpected:new t8("css-percentageexpected",t6("percentage expected")),URIOrStringExpected:new t8("css-uriorstringexpected",t6("uri or string expected")),URIExpected:new t8("css-uriexpected",t6("URI expected")),VariableNameExpected:new t8("css-varnameexpected",t6("variable name expected")),VariableValueExpected:new t8("css-varvalueexpected",t6("variable value expected")),PropertyValueExpected:new t8("css-propertyvalueexpected",t6("property value expected")),LeftCurlyExpected:new t8("css-lcurlyexpected",t6("{ expected")),RightCurlyExpected:new t8("css-rcurlyexpected",t6("} expected")),LeftSquareBracketExpected:new t8("css-rbracketexpected",t6("[ expected")),RightSquareBracketExpected:new t8("css-lbracketexpected",t6("] expected")),LeftParenthesisExpected:new t8("css-lparentexpected",t6("( expected")),RightParenthesisExpected:new t8("css-rparentexpected",t6(") expected")),CommaExpected:new t8("css-commaexpected",t6("comma expected")),PageDirectiveOrDeclarationExpected:new t8("css-pagedirordeclexpected",t6("page directive or declaraton expected")),UnknownAtRule:new t8("css-unknownatrule",t6("at-rule unknown")),UnknownKeyword:new t8("css-unknownkeyword",t6("unknown keyword")),SelectorExpected:new t8("css-selectorexpected",t6("selector expected")),StringLiteralExpected:new t8("css-stringliteralexpected",t6("string literal expected")),WhitespaceExpected:new t8("css-whitespaceexpected",t6("whitespace expected")),MediaQueryExpected:new t8("css-mediaqueryexpected",t6("media query expected")),IdentifierOrWildcardExpected:new t8("css-idorwildcardexpected",t6("identifier or wildcard expected")),WildcardExpected:new t8("css-wildcardexpected",t6("wildcard expected")),IdentifierOrVariableExpected:new t8("css-idorvarexpected",t6("identifier or variable expected"))};(o||(o={})).is=function(e){return"string"==typeof e},(l||(l={})).is=function(e){return"string"==typeof e},function(e){e.MIN_VALUE=-0x80000000,e.MAX_VALUE=0x7fffffff,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(h||(h={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=0x7fffffff,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(c||(c={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=c.MAX_VALUE),t===Number.MAX_VALUE&&(t=c.MAX_VALUE),{line:e,character:t}},e.is=function(e){return eT.objectLiteral(e)&&eT.uinteger(e.line)&&eT.uinteger(e.character)}}(u||(u={})),function(e){e.create=function(e,t,i,r){if(eT.uinteger(e)&&eT.uinteger(t)&&eT.uinteger(i)&&eT.uinteger(r))return{start:u.create(e,t),end:u.create(i,r)};if(u.is(e)&&u.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${r}]`)},e.is=function(e){return eT.objectLiteral(e)&&u.is(e.start)&&u.is(e.end)}}(p||(p={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){return eT.objectLiteral(e)&&p.is(e.range)&&(eT.string(e.uri)||eT.undefined(e.uri))}}(d||(d={})),function(e){e.create=function(e,t,i,r){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:r}},e.is=function(e){return eT.objectLiteral(e)&&p.is(e.targetRange)&&eT.string(e.targetUri)&&p.is(e.targetSelectionRange)&&(p.is(e.originSelectionRange)||eT.undefined(e.originSelectionRange))}}(f||(f={})),function(e){e.create=function(e,t,i,r){return{red:e,green:t,blue:i,alpha:r}},e.is=function(e){return eT.objectLiteral(e)&&eT.numberRange(e.red,0,1)&&eT.numberRange(e.green,0,1)&&eT.numberRange(e.blue,0,1)&&eT.numberRange(e.alpha,0,1)}}(m||(m={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){return eT.objectLiteral(e)&&p.is(e.range)&&m.is(e.color)}}(g||(g={})),function(e){e.create=function(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}},e.is=function(e){return eT.objectLiteral(e)&&eT.string(e.label)&&(eT.undefined(e.textEdit)||P.is(e))&&(eT.undefined(e.additionalTextEdits)||eT.typedArray(e.additionalTextEdits,P.is))}}(_||(_={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(y||(y={})),function(e){e.create=function(e,t,i,r,n,s){let a={startLine:e,endLine:t};return eT.defined(i)&&(a.startCharacter=i),eT.defined(r)&&(a.endCharacter=r),eT.defined(n)&&(a.kind=n),eT.defined(s)&&(a.collapsedText=s),a},e.is=function(e){return eT.objectLiteral(e)&&eT.uinteger(e.startLine)&&eT.uinteger(e.startLine)&&(eT.undefined(e.startCharacter)||eT.uinteger(e.startCharacter))&&(eT.undefined(e.endCharacter)||eT.uinteger(e.endCharacter))&&(eT.undefined(e.kind)||eT.string(e.kind))}}(b||(b={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){return eT.defined(e)&&d.is(e.location)&&eT.string(e.message)}}(x||(x={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(C||(C={})),function(e){e.Unnecessary=1,e.Deprecated=2}(k||(k={})),(v||(v={})).is=function(e){return eT.objectLiteral(e)&&eT.string(e.href)},function(e){e.create=function(e,t,i,r,n,s){let a={range:e,message:t};return eT.defined(i)&&(a.severity=i),eT.defined(r)&&(a.code=r),eT.defined(n)&&(a.source=n),eT.defined(s)&&(a.relatedInformation=s),a},e.is=function(e){var t;return eT.defined(e)&&p.is(e.range)&&eT.string(e.message)&&(eT.number(e.severity)||eT.undefined(e.severity))&&(eT.integer(e.code)||eT.string(e.code)||eT.undefined(e.code))&&(eT.undefined(e.codeDescription)||eT.string(null==(t=e.codeDescription)?void 0:t.href))&&(eT.string(e.source)||eT.undefined(e.source))&&(eT.undefined(e.relatedInformation)||eT.typedArray(e.relatedInformation,x.is))}}(S||(S={})),function(e){e.create=function(e,t,...i){let r={title:e,command:t};return eT.defined(i)&&i.length>0&&(r.arguments=i),r},e.is=function(e){return eT.defined(e)&&eT.string(e.title)&&eT.string(e.command)}}(w||(w={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){return eT.objectLiteral(e)&&eT.string(e.newText)&&p.is(e.range)}}(P||(P={})),function(e){e.create=function(e,t,i){let r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==i&&(r.description=i),r},e.is=function(e){return eT.objectLiteral(e)&&eT.string(e.label)&&(eT.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(eT.string(e.description)||void 0===e.description)}}(E||(E={})),(R||(R={})).is=function(e){return eT.string(e)},function(e){e.replace=function(e,t,i){return{range:e,newText:t,annotationId:i}},e.insert=function(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){return P.is(e)&&(E.is(e.annotationId)||R.is(e.annotationId))}}(I||(I={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){return eT.defined(e)&&N.is(e.textDocument)&&Array.isArray(e.edits)}}(D||(D={})),function(e){e.create=function(e,t,i){let r={kind:"create",uri:e};return void 0!==t&&(void 0!==t.overwrite||void 0!==t.ignoreIfExists)&&(r.options=t),void 0!==i&&(r.annotationId=i),r},e.is=function(e){return e&&"create"===e.kind&&eT.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||eT.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||eT.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||R.is(e.annotationId))}}(A||(A={})),function(e){e.create=function(e,t,i,r){let n={kind:"rename",oldUri:e,newUri:t};return void 0!==i&&(void 0!==i.overwrite||void 0!==i.ignoreIfExists)&&(n.options=i),void 0!==r&&(n.annotationId=r),n},e.is=function(e){return e&&"rename"===e.kind&&eT.string(e.oldUri)&&eT.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||eT.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||eT.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||R.is(e.annotationId))}}(T||(T={})),function(e){e.create=function(e,t,i){let r={kind:"delete",uri:e};return void 0!==t&&(void 0!==t.recursive||void 0!==t.ignoreIfNotExists)&&(r.options=t),void 0!==i&&(r.annotationId=i),r},e.is=function(e){return e&&"delete"===e.kind&&eT.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||eT.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||eT.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||R.is(e.annotationId))}}($||($={})),(M||(M={})).is=function(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>eT.string(e.kind)?A.is(e)||T.is(e)||$.is(e):D.is(e)))},function(e){e.create=function(e){return{uri:e}},e.is=function(e){return eT.defined(e)&&eT.string(e.uri)}}(L||(L={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){return eT.defined(e)&&eT.string(e.uri)&&eT.integer(e.version)}}(F||(F={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){return eT.defined(e)&&eT.string(e.uri)&&(null===e.version||eT.integer(e.version))}}(N||(N={})),function(e){e.create=function(e,t,i,r){return{uri:e,languageId:t,version:i,text:r}},e.is=function(e){return eT.defined(e)&&eT.string(e.uri)&&eT.string(e.languageId)&&eT.integer(e.version)&&eT.string(e.text)}}(V||(V={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){return t===e.PlainText||t===e.Markdown}}(O||(O={})),(U||(U={})).is=function(e){return eT.objectLiteral(e)&&O.is(e.kind)&&eT.string(e.value)},function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(B||(B={})),function(e){e.PlainText=1,e.Snippet=2}(W||(W={})),(K||(K={})).Deprecated=1,function(e){e.create=function(e,t,i){return{newText:e,insert:t,replace:i}},e.is=function(e){return e&&eT.string(e.newText)&&p.is(e.insert)&&p.is(e.replace)}}(z||(z={})),function(e){e.asIs=1,e.adjustIndentation=2}(j||(j={})),(q||(q={})).is=function(e){return e&&(eT.string(e.detail)||void 0===e.detail)&&(eT.string(e.description)||void 0===e.description)},(H||(H={})).create=function(e){return{label:e}},(Q||(Q={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){return eT.string(e)||eT.objectLiteral(e)&&eT.string(e.language)&&eT.string(e.value)}}(G||(G={})),(J||(J={})).is=function(e){return!!e&&eT.objectLiteral(e)&&(U.is(e.contents)||G.is(e.contents)||eT.typedArray(e.contents,G.is))&&(void 0===e.range||p.is(e.range))},(X||(X={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Z||(Z={})).create=function(e,t,...i){let r={label:e};return eT.defined(t)&&(r.documentation=t),eT.defined(i)?r.parameters=i:r.parameters=[],r},function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),(ee||(ee={})).create=function(e,t){let i={range:e};return eT.number(t)&&(i.kind=t),i},function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(et||(et={})),(ei||(ei={})).Deprecated=1,(er||(er={})).create=function(e,t,i,r,n){let s={name:e,kind:t,location:{uri:r,range:i}};return n&&(s.containerName=n),s},(en||(en={})).create=function(e,t,i,r){return void 0!==r?{name:e,kind:t,location:{uri:i,range:r}}:{name:e,kind:t,location:{uri:i}}},function(e){e.create=function(e,t,i,r,n,s){let a={name:e,detail:t,kind:i,range:r,selectionRange:n};return void 0!==s&&(a.children=s),a},e.is=function(e){return e&&eT.string(e.name)&&eT.number(e.kind)&&p.is(e.range)&&p.is(e.selectionRange)&&(void 0===e.detail||eT.string(e.detail))&&(void 0===e.deprecated||eT.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}}(es||(es={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ea||(ea={})),function(e){e.Invoked=1,e.Automatic=2}(eo||(eo={})),function(e){e.create=function(e,t,i){let r={diagnostics:e};return null!=t&&(r.only=t),null!=i&&(r.triggerKind=i),r},e.is=function(e){return eT.defined(e)&&eT.typedArray(e.diagnostics,S.is)&&(void 0===e.only||eT.typedArray(e.only,eT.string))&&(void 0===e.triggerKind||e.triggerKind===eo.Invoked||e.triggerKind===eo.Automatic)}}(el||(el={})),function(e){e.create=function(e,t,i){let r={title:e},n=!0;return"string"==typeof t?(n=!1,r.kind=t):w.is(t)?r.command=t:r.edit=t,n&&void 0!==i&&(r.kind=i),r},e.is=function(e){return e&&eT.string(e.title)&&(void 0===e.diagnostics||eT.typedArray(e.diagnostics,S.is))&&(void 0===e.kind||eT.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||w.is(e.command))&&(void 0===e.isPreferred||eT.boolean(e.isPreferred))&&(void 0===e.edit||M.is(e.edit))}}(eh||(eh={})),function(e){e.create=function(e,t){let i={range:e};return eT.defined(t)&&(i.data=t),i},e.is=function(e){return eT.defined(e)&&p.is(e.range)&&(eT.undefined(e.command)||w.is(e.command))}}(ec||(ec={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){return eT.defined(e)&&eT.uinteger(e.tabSize)&&eT.boolean(e.insertSpaces)}}(eu||(eu={})),function(e){e.create=function(e,t,i){return{range:e,target:t,data:i}},e.is=function(e){return eT.defined(e)&&p.is(e.range)&&(eT.undefined(e.target)||eT.string(e.target))}}(ep||(ep={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){return eT.objectLiteral(t)&&p.is(t.range)&&(void 0===t.parent||e.is(t.parent))}}(ed||(ed={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ef||(ef={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(em||(em={})),(eg||(eg={})).is=function(e){return eT.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])},function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){return null!=e&&p.is(e.range)&&eT.string(e.text)}}(e_||(e_={})),function(e){e.create=function(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}},e.is=function(e){return null!=e&&p.is(e.range)&&eT.boolean(e.caseSensitiveLookup)&&(eT.string(e.variableName)||void 0===e.variableName)}}(ey||(ey={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){return null!=e&&p.is(e.range)&&(eT.string(e.expression)||void 0===e.expression)}}(eb||(eb={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){return eT.defined(e)&&p.is(e.stoppedLocation)}}(ex||(ex={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(eC||(eC={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){return eT.objectLiteral(e)&&(void 0===e.tooltip||eT.string(e.tooltip)||U.is(e.tooltip))&&(void 0===e.location||d.is(e.location))&&(void 0===e.command||w.is(e.command))}}(ek||(ek={})),function(e){e.create=function(e,t,i){let r={position:e,label:t};return void 0!==i&&(r.kind=i),r},e.is=function(e){return eT.objectLiteral(e)&&u.is(e.position)&&(eT.string(e.label)||eT.typedArray(e.label,ek.is))&&(void 0===e.kind||eC.is(e.kind))&&void 0===e.textEdits||eT.typedArray(e.textEdits,P.is)&&(void 0===e.tooltip||eT.string(e.tooltip)||U.is(e.tooltip))&&(void 0===e.paddingLeft||eT.boolean(e.paddingLeft))&&(void 0===e.paddingRight||eT.boolean(e.paddingRight))}}(ev||(ev={})),(eS||(eS={})).createSnippet=function(e){return{kind:"snippet",value:e}},(ew||(ew={})).create=function(e,t,i,r){return{insertText:e,filterText:t,range:i,command:r}},(eP||(eP={})).create=function(e){return{items:e}},function(e){e.Invoked=0,e.Automatic=1}(eE||(eE={})),(eR||(eR={})).create=function(e,t){return{range:e,text:t}},(eI||(eI={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(eD||(eD={})).is=function(e){return eT.objectLiteral(e)&&l.is(e.uri)&&eT.string(e.name)},function(e){e.create=function(e,t,i,r){return new ie(e,t,i,r)},e.is=function(e){return!!(eT.defined(e)&&eT.string(e.uri)&&(eT.undefined(e.languageId)||eT.string(e.languageId))&&eT.uinteger(e.lineCount)&&eT.func(e.getText)&&eT.func(e.positionAt)&&eT.func(e.offsetAt))},e.applyEdits=function(e,t){let i=e.getText(),r=function e(t,i){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),s=t.slice(r);e(n,i),e(s,i);let a=0,o=0,l=0;for(;a<n.length&&o<s.length;)0>=i(n[a],s[o])?t[l++]=n[a++]:t[l++]=s[o++];for(;a<n.length;)t[l++]=n[a++];for(;o<s.length;)t[l++]=s[o++];return t}(t,(e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i}),n=i.length;for(let t=r.length-1;t>=0;t--){let s=r[t],a=e.offsetAt(s.range.start),o=e.offsetAt(s.range.end);if(o<=n)i=i.substring(0,a)+s.newText+i.substring(o,i.length);else throw Error("Overlapping edit");n=a}return i}}(eA||(eA={}));class ie{constructor(e,t,i,r){this._uri=e,this._languageId=t,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,i=!0;for(let r=0;r<t.length;r++){i&&(e.push(r),i=!1);let n=t.charAt(r);i="\r"===n||"\n"===n,"\r"===n&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,r=t.length;if(0===r)return u.create(0,e);for(;i<r;){let n=Math.floor((i+r)/2);t[n]>e?r=n:i=n+1}let n=i-1;return u.create(n,e-t[n])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,r),i)}get lineCount(){return this.getLineOffsets().length}}!function(e){let t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,i,r){return"[object Number]"===t.call(e)&&i<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-0x80000000<=e&&e<=0x7fffffff},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=0x7fffffff},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(eT||(eT={}));class it{constructor(e,t,i,r){this._uri=e,this._languageId=t,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){for(let t of e)if(it.isIncremental(t)){let e=ir(t.range),i=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,i)+t.text+this._content.substring(r,this._content.length);let n=Math.max(e.start.line,0),s=Math.max(e.end.line,0),a=this._lineOffsets,o=ii(t.text,!1,i);if(s-n===o.length)for(let e=0,t=o.length;e<t;e++)a[e+n+1]=o[e];else o.length<1e4?a.splice(n+1,s-n,...o):this._lineOffsets=a=a.slice(0,n+1).concat(o,a.slice(s+1));let l=t.text.length-(r-i);if(0!==l)for(let e=n+1+o.length,t=a.length;e<t;e++)a[e]=a[e]+l}else if(it.isFull(t))this._content=t.text,this._lineOffsets=void 0;else throw Error("Unknown change event received");this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=ii(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,r=t.length;if(0===r)return{line:0,character:e};for(;i<r;){let n=Math.floor((i+r)/2);t[n]>e?r=n:i=n+1}let n=i-1;return{line:n,character:e-t[n]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,r),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}}function ii(e,t,i=0){let r=t?[i]:[];for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);(13===n||10===n)&&(13===n&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(i+t+1))}return r}function ir(e){let t=e.start,i=e.end;return t.line>i.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:e}function is(e){let t=ir(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,i,r){return new it(e,t,i,r)},e.update=function(e,t,i){if(e instanceof it)return e.update(t,i),e;throw Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let i=e.getText(),r=function e(t,i){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),s=t.slice(r);e(n,i),e(s,i);let a=0,o=0,l=0;for(;a<n.length&&o<s.length;)0>=i(n[a],s[o])?t[l++]=n[a++]:t[l++]=s[o++];for(;a<n.length;)t[l++]=n[a++];for(;o<s.length;)t[l++]=s[o++];return t}(t.map(is),(e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i}),n=0,s=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<n)throw Error("Overlapping edit");r>n&&s.push(i.substring(n,r)),t.newText.length&&s.push(t.newText),n=e.offsetAt(t.range.end)}return s.push(i.substr(n)),s.join("")}}(e$||(e$={})),(eM||(eM={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[O.Markdown,O.PlainText]}},hover:{contentFormat:[O.Markdown,O.PlainText]}}},function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(eL||(eL={}));let ia=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,io=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:t6("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:t6("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:t6("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:t6("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:t6("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:t6("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:t6("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:t6("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:t6("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:t6("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:t6("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:t6("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:t6("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:t6("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:t6("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:t6("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:t6("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:t6("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:t6("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:t6("Mix two colors together in a polar color space.")}],il=/^(rgb|rgba|hsl|hsla|hwb)$/i,ih={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ic=RegExp(`^(${Object.keys(ih).join("|")})$`,"i"),iu={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},ip=RegExp(`^(${Object.keys(iu).join("|")})$`,"i");function id(e,t){let i=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(i){i[2]&&(t=100);let e=parseFloat(i[1])/t;if(e>=0&&e<=1)return e}throw Error()}function im(e){let t=e.getText(),i=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(i)switch(i[2]){case"deg":return parseFloat(t)%360;case"rad":return 180*parseFloat(t)/Math.PI%360;case"grad":return .9*parseFloat(t)%360;case"turn":return 360*parseFloat(t)%360;default:if(void 0===i[2])return parseFloat(t)%360}throw Error()}function ig(e){return ia.test(e)||ic.test(e)||ip.test(e)}function i_(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102)?e-97+10:0}function iy(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*i_(e.charCodeAt(1))/255,green:17*i_(e.charCodeAt(2))/255,blue:17*i_(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*i_(e.charCodeAt(1))/255,green:17*i_(e.charCodeAt(2))/255,blue:17*i_(e.charCodeAt(3))/255,alpha:17*i_(e.charCodeAt(4))/255};case 7:return{red:(16*i_(e.charCodeAt(1))+i_(e.charCodeAt(2)))/255,green:(16*i_(e.charCodeAt(3))+i_(e.charCodeAt(4)))/255,blue:(16*i_(e.charCodeAt(5))+i_(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*i_(e.charCodeAt(1))+i_(e.charCodeAt(2)))/255,green:(16*i_(e.charCodeAt(3))+i_(e.charCodeAt(4)))/255,blue:(16*i_(e.charCodeAt(5))+i_(e.charCodeAt(6)))/255,alpha:(16*i_(e.charCodeAt(7))+i_(e.charCodeAt(8)))/255}}return null}function ib(e,t,i,r=1){if(e/=60,0===t)return{red:i,green:i,blue:i,alpha:r};{let n=(e,t,i)=>{for(;i<0;)i+=6;for(;i>=6;)i-=6;return i<1?(t-e)*i+e:i<3?t:i<4?(t-e)*(4-i)+e:e},s=i<=.5?i*(t+1):i+t-i*t,a=2*i-s;return{red:n(a,s,e+2),green:n(a,s,e),blue:n(a,s,e-2),alpha:r}}}function ix(e){let t=e.red,i=e.green,r=e.blue,n=e.alpha,s=Math.max(t,i,r),a=Math.min(t,i,r),o=0,l=0,h=(a+s)/2,c=s-a;if(c>0){switch(l=Math.min(h<=.5?c/(2*h):c/(2-2*h),1),s){case t:o=(i-r)/c+6*(i<r);break;case i:o=(r-t)/c+2;break;case r:o=(t-i)/c+4}o*=60,o=Math.round(o)}return{h:o,s:l,l:h,a:n}}let iC={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},ik={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},iv={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},iS=["medium","thick","thin"],iw={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},iP={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},iE={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},iR={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},iI={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},iD={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},iA={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},iT={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},i$=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],iM=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],iL=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function iF(e){return Object.keys(e).map(t=>e[t])}function iN(e){return void 0!==e}class iV{constructor(e=new eq){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:r.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return r.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return r.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return r.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return -1!==e.indexOf(this.token.type)}peekRegExp(e,t){return e===this.token.type&&t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){let e=this.scanner.tryScanUnicode();return!!e&&(this.prevToken=e,this.token=this.scanner.scan(),!0)}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){let t=this.mark(),i=e();return i||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(r.AtKeyword===this.token.type){for(let t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type&&(this.consumeToken(),!0)}acceptIdent(e){return!!this.peekIdent(e)&&(this.consumeToken(),!0)}acceptKeyword(e){return!!this.peekKeyword(e)&&(this.consumeToken(),!0)}acceptDelim(e){return!!this.peekDelim(e)&&(this.consumeToken(),!0)}acceptRegexp(e){return!!e.test(this.token.text)&&(this.consumeToken(),!0)}_parseRegexp(e){let t=this.createNode(n.Identifier);do;while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){let e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);let t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;)if(e&&-1!==e.indexOf(this.token.type))return this.consumeToken(),!0;else{if(t&&-1!==t.indexOf(this.token.type))return!0;if(this.token.type===r.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new eY(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,i,r){if(!(e instanceof e0)&&(t&&this.markError(e,t,i,r),this.prevToken)){let t=this.prevToken.offset+this.prevToken.len;e.length=t>e.offset?t-e.offset:0}return e}markError(e,t,i,r){this.token!==this.lastErrorToken&&(e.addIssue(new t4(e,t,a.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(i||r)&&this.resync(i,r)}parseStylesheet(e){let t=e.version,i=e.getText();return this.internalParse(i,this._parseStylesheet,(r,n)=>{if(e.version!==t)throw Error("Underlying model has changed, AST is no longer valid");return i.substr(r,n)})}internalParse(e,t,i){this.scanner.setSource(e),this.token=this.scanner.scan();let r=t.bind(this)();return r&&(i?r.textProvider=i:r.textProvider=(t,i)=>e.substr(t,i)),r}_parseStylesheet(){let e=this.create(e5);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let i=!1;do{i=!1;let n=this._parseStylesheetStatement();for(n&&(e.addChild(n),i=!0,t=!1,!this.peek(r.EOF)&&this._needsSemicolonAfter(n)&&!this.accept(r.SemiColon)&&this.markError(e,t9.SemiColonExpected));this.accept(r.SemiColon)||this.accept(r.CDO)||this.accept(r.CDC);)i=!0,t=!1}while(i);if(this.peek(r.EOF))break;t||(this.peek(r.AtKeyword)?this.markError(e,t9.UnknownAtRule):this.markError(e,t9.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(r.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(r.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){let t=this.mark();if(this._parseSelector(e)){for(;this.accept(r.Comma)&&this._parseSelector(e););if(this.accept(r.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){let t=this.create(e6),i=t.getSelectors();if(!i.addChild(this._parseSelector(e)))return null;for(;this.accept(r.Comma);)if(!i.addChild(this._parseSelector(e)))return this.finish(t,t9.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(r.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(r.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case n.Keyframe:case n.ViewPort:case n.Media:case n.Ruleset:case n.Namespace:case n.If:case n.For:case n.Each:case n.While:case n.MixinDeclaration:case n.FunctionDeclaration:case n.MixinContentDeclaration:break;case n.ExtendsReference:case n.MixinContentReference:case n.ReturnStatement:case n.MediaQuery:case n.Debug:case n.Import:case n.AtApplyRule:case n.CustomPropertyDeclaration:return!0;case n.VariableDeclaration:return e.needsSemicolon;case n.MixinReference:return!e.getContent();case n.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){let t=this.create(e4);if(!this.accept(r.CurlyL))return null;let i=e();for(;t.addChild(i)&&!this.peek(r.CurlyR);){if(this._needsSemicolonAfter(i)&&!this.accept(r.SemiColon))return this.finish(t,t9.SemiColonExpected,[r.SemiColon,r.CurlyR]);for(i&&this.prevToken&&this.prevToken.type===r.SemiColon&&(i.semicolonPosition=this.prevToken.offset);this.accept(r.SemiColon););i=e()}return this.accept(r.CurlyR)?this.finish(t):this.finish(t,t9.RightCurlyExpected,[r.CurlyR,r.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,t9.LeftCurlyExpected,[r.CurlyR,r.SemiColon])}_parseSelector(e){let t=this.create(e7),i=!1;for(e&&(i=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)i=!0,t.addChild(this._parseCombinator());return i?this.finish(t):null}_parseDeclaration(e){let t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;let i=this.create(tt);return i.setProperty(this._parseProperty())?this.accept(r.Colon)?(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseExpr()))?(i.addChild(this._parsePrio()),this.peek(r.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)):this.finish(i,t9.PropertyValueExpected):this.finish(i,t9.ColonExpected,[r.Colon],e||[r.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(r.Ident,/^--/))return null;let t=this.create(ti);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(r.Colon))return this.finish(t,t9.ColonExpected,[r.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);let i=this.mark();if(this.peek(r.CurlyL)){let e=this.create(te),n=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(e.setDeclarations(n)&&!n.isErroneous(!0)&&(e.addChild(this._parsePrio()),this.peek(r.SemiColon)))return this.finish(e),t.setPropertySet(e),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(i)}let n=this._parseExpr();return n&&!n.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],r.SemiColon,r.EOF))?(t.setValue(n),this.peek(r.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(i),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),iN(t.colonPosition)&&this.token.offset===t.colonPosition+1)?this.finish(t,t9.PropertyValueExpected):this.finish(t)}_parseCustomPropertyValue(e=[r.CurlyR]){let t=this.create(eY),i=()=>0===s&&0===a&&0===o,n=()=>-1!==e.indexOf(this.token.type),s=0,a=0,o=0;e:for(;;){switch(this.token.type){case r.SemiColon:case r.Exclamation:if(i())break e;break;case r.CurlyL:s++;break;case r.CurlyR:if(--s<0){if(n()&&0===a&&0===o)break e;return this.finish(t,t9.LeftCurlyExpected)}break;case r.ParenthesisL:a++;break;case r.ParenthesisR:if(--a<0){if(n()&&0===o&&0===s)break e;return this.finish(t,t9.LeftParenthesisExpected)}break;case r.BracketL:o++;break;case r.BracketR:if(--o<0)return this.finish(t,t9.LeftSquareBracketExpected);break;case r.BadString:break e;case r.EOF:let e=t9.RightCurlyExpected;return o>0?e=t9.RightSquareBracketExpected:a>0&&(e=t9.RightParenthesisExpected),this.finish(t,e)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){let t=this.mark();return this._parseProperty()&&this.accept(r.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){let e=this.create(tr),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(r.Charset))return null;let e=this.create(eY);return(this.consumeToken(),this.accept(r.String))?this.accept(r.SemiColon)?this.finish(e):this.finish(e,t9.SemiColonExpected):this.finish(e,t9.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;let e=this.create(tb);return(this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this._completeParseImport(e):this.finish(e,t9.URIOrStringExpected)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(r.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,t9.IdentifierExpected,[r.SemiColon]);if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[r.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(r.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(r.ParenthesisR))?this.finish(e,t9.RightParenthesisExpected,[r.ParenthesisR],[]):(this.peek(r.SemiColon)||this.peek(r.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;let e=this.create(tS);return(this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())))?this.accept(r.SemiColon)?this.finish(e):this.finish(e,t9.SemiColonExpected):this.finish(e,t9.URIExpected,[r.SemiColon])}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;let e=this.create(tm);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;let e=this.create(tf);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(r.AtKeyword,this.keyframeRegex))return null;let e=this.create(t_),t=this.create(eY);return(this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,t9.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent()))?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,t9.IdentifierExpected,[r.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([s.Keyframe])}_parseKeyframeSelector(){let e=this.create(ty),t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(r.Percentage)&&(t=!0),!t)return null;for(;this.accept(r.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(r.Percentage)&&(t=!0),!t)return this.finish(e,t9.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){let e=this.create(ty),t=this.mark(),i=!1;if(e.addChild(this._parseIdent())&&(i=!0),this.accept(r.Percentage)&&(i=!0),!i)return null;for(;this.accept(r.Comma);)if(i=!1,e.addChild(this._parseIdent())&&(i=!0),this.accept(r.Percentage)&&(i=!0),!i)return this.restoreAtMark(t),null;return this.peek(r.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;let e=this.create(tR);return(this.consumeToken(),this.peekRegExp(r.Ident,/^--/)&&e.setName(this._parseIdent([s.Property])))?this._parseBody(e,this._parseDeclaration.bind(this)):this.finish(e,t9.IdentifierExpected)}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;let t=this.create(tE);this.consumeToken();let i=this._parseLayerNameList();return(i&&t.setNames(i),(!i||1===i.getChildren().length)&&this.peek(r.CurlyL))?this._parseBody(t,this._parseLayerDeclaration.bind(this,e)):this.accept(r.SemiColon)?this.finish(t):this.finish(t,t9.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){let e=this.createNode(n.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(r.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,t9.IdentifierExpected);return this.finish(e)}_parseLayerName(){let e=this.createNode(n.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,t9.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;let t=this.create(tP);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){let e=this.create(tL);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(r.Ident,/^(and|or)$/i)){let t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){let e=this.create(tL);if(this.accept(r.ParenthesisL))return(this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration([r.ParenthesisR]))||this._parseSupportsCondition())?this.accept(r.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,t9.RightParenthesisExpected,[r.ParenthesisR],[]):this.finish(e,t9.ConditionExpected);if(this.peek(r.Ident)){let t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(r.ParenthesisL)){let t=1;for(;this.token.type!==r.EOF&&0!==t;)this.token.type===r.ParenthesisL?t++:this.token.type===r.ParenthesisR&&t--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,t9.LeftParenthesisExpected,[],[r.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;let t=this.create(tw);return(this.consumeToken(),t.addChild(this._parseMediaQueryList()))?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,t9.MediaQueryExpected)}_parseMediaQueryList(){let e=this.create(tA);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,t9.MediaQueryExpected);for(;this.accept(r.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,t9.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){let e=this.create(tT),t=this.mark();if(this.acceptIdent("not"),this.peek(r.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){let e=this.mark(),t=this.create(tK);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,t9.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){let e=this.create(t$);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected,[],[r.CurlyL]);if(this.peek(r.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[],[r.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){let e=[r.ParenthesisR],t=this.create(tM);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(r.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,t9.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()&&(!t.addChild(this._parseMediaFeatureValue())||this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue())))return this.finish(t,t9.TermExpected,[],e)}else{if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,t9.IdentifierExpected,[],e);if(!this._parseMediaFeatureRangeOperator())return this.finish(t,t9.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,t9.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,t9.TermExpected,[],e)}return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){let e=this.create(eY);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;let e=this.create(tF);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(r.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,t9.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(r.AtKeyword))return null;let e=this.create(tN);return this.acceptOneKeyword(iL)||this.markError(e,t9.UnknownAtRule,[],[r.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(r.Ident)&&!this.peek(r.Colon))return null;let e=this.create(eY);return(e.addChild(this._parseIdent()),this.accept(r.Colon)&&!e.addChild(this._parseIdent()))?this.finish(e,t9.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;let e=this.create(tI);return this.consumeToken(),this.resync([],[r.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;let t=this.create(tD);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){let e=this.create(eY);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){let e=this.create(eY);if(this.accept(r.ParenthesisL)){if(this.peekIdent("not")||this.peek(r.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[],[r.CurlyL])}else{if(!this.acceptIdent("style")||this.hasWhitespace()||!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected,[],[r.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[],[r.CurlyL])}return this.finish(e)}_parseStyleQuery(){let e=this.create(eY);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(r.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([r.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){let e=this.create(eY);return this.accept(r.ParenthesisL)?(e.addChild(this._parseStyleQuery()),this.accept(r.ParenthesisR))?this.finish(e):this.finish(e,t9.RightParenthesisExpected,[],[r.CurlyL]):this.finish(e,t9.LeftParenthesisExpected,[],[r.CurlyL])}_parseUnknownAtRule(){if(!this.peek(r.AtKeyword))return null;let e=this.create(tY);e.addChild(this._parseUnknownAtRuleName());let t=()=>0===n&&0===s&&0===a,i=0,n=0,s=0,a=0;e:for(;;){switch(this.token.type){case r.SemiColon:if(t())break e;break;case r.EOF:if(n>0)return this.finish(e,t9.RightCurlyExpected);if(a>0)return this.finish(e,t9.RightSquareBracketExpected);if(s>0)return this.finish(e,t9.RightParenthesisExpected);else return this.finish(e);case r.CurlyL:i++,n++;break;case r.CurlyR:if(n--,i>0&&0===n){if(this.consumeToken(),a>0)return this.finish(e,t9.RightSquareBracketExpected);if(s>0)return this.finish(e,t9.RightParenthesisExpected);break e}if(n<0){if(0===s&&0===a)break e;return this.finish(e,t9.LeftCurlyExpected)}break;case r.ParenthesisL:s++;break;case r.ParenthesisR:if(--s<0)return this.finish(e,t9.LeftParenthesisExpected);break;case r.BracketL:a++;break;case r.BracketR:if(--a<0)return this.finish(e,t9.LeftSquareBracketExpected)}this.consumeToken()}return e}_parseUnknownAtRuleName(){let e=this.create(eY);return this.accept(r.AtKeyword)?this.finish(e):e}_parseOperator(){if(!(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(r.Dashmatch)||this.peek(r.Includes)||this.peek(r.SubstringOperator)||this.peek(r.PrefixOperator)||this.peek(r.SuffixOperator)||this.peekDelim("=")))return null;{let e=this.createNode(n.Operator);return this.consumeToken(),this.finish(e)}}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;let e=this.create(eY);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){let e=this.create(eY);this.consumeToken();let t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=n.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=n.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){let e=this.create(eY);return this.consumeToken(),e.type=n.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){let e=this.create(eY);return this.consumeToken(),e.type=n.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){let e=this.create(eY);this.consumeToken();let t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=n.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){let e=this.create(e8),t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(n.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(r.Hash)&&!this.peekDelim("#"))return null;let e=this.createNode(n.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,t9.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;let e=this.createNode(n.ClassSelector);return(this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))?this.finish(e,t9.IdentifierExpected):this.finish(e)}_parseElementName(){let e=this.mark(),t=this.createNode(n.ElementNameSelector);return(t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*"))?this.finish(t):(this.restoreAtMark(e),null)}_parseNamespacePrefix(){let e=this.mark(),t=this.createNode(n.NamespacePrefix);return(!t.addChild(this._parseIdent())&&!this.acceptDelim("*"),this.acceptDelim("|"))?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(r.BracketL))return null;let e=this.create(tB);return(this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent()))?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(r.BracketR))?this.finish(e):this.finish(e,t9.RightSquareBracketExpected):this.finish(e,t9.IdentifierExpected)}_parsePseudo(){let e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(r.ParenthesisL)){let t=()=>{let e=this.create(eY);if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(r.Comma)&&e.addChild(this._parseSelector(!0)););return this.peek(r.ParenthesisR)?this.finish(e):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(t)))return this.finish(e,t9.SelectorExpected);if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(r.Colon))return null;let e=this.mark(),t=this.createNode(n.PseudoSelector);return(this.consumeToken(),this.hasWhitespace())?(this.restoreAtMark(e),null):(this.accept(r.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent()))?this.finish(t,t9.IdentifierExpected):this.finish(t)}_tryParsePrio(){let e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(r.Exclamation))return null;let e=this.createNode(n.Prio);return this.accept(r.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){let t=this.create(tV);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(r.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;let e=this.create(e1);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(r.BracketL))return null;let e=this.createNode(n.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(r.BracketR)?this.finish(e):this.finish(e,t9.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let i=this.create(tO);if(!i.setLeft(e||this._parseTerm()))return null;if(!i.setOperator(t||this._parseOperator()))return this.finish(i);if(!i.setRight(this._parseTerm()))return this.finish(i,t9.TermExpected);i=this.finish(i);let r=this._parseOperator();return r&&(i=this._parseBinaryExpr(i,r)),this.finish(i)}_parseTerm(){let e=this.create(tU);return(e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression()))?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(r.ParenthesisL))return null;let e=this.create(eY);return(this.consumeToken(),e.addChild(this._parseExpr()),this.accept(r.ParenthesisR))?this.finish(e):this.finish(e,t9.RightParenthesisExpected)}_parseNumeric(){if(this.peek(r.Num)||this.peek(r.Percentage)||this.peek(r.Resolution)||this.peek(r.Length)||this.peek(r.EMS)||this.peek(r.EXS)||this.peek(r.Angle)||this.peek(r.Time)||this.peek(r.Dimension)||this.peek(r.ContainerQueryLength)||this.peek(r.Freq)){let e=this.create(tz);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(r.String)&&!this.peek(r.BadString))return null;let e=this.createNode(n.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(r.Ident,/^url(-prefix)?$/i))return null;let e=this.mark(),t=this.createNode(n.URILiteral);return(this.accept(r.Ident),this.hasWhitespace()||!this.peek(r.ParenthesisL))?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(r.ParenthesisR))?this.finish(t):this.finish(t,t9.RightParenthesisExpected)}_parseURLArgument(){let e=this.create(eY);return this.accept(r.String)||this.accept(r.BadString)||this.acceptUnquotedString()?this.finish(e):null}_parseIdent(e){if(!this.peek(r.Ident))return null;let t=this.create(e2);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(r.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){let e=this.mark(),t=this.create(ts);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(r.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,t9.ExpressionExpected);return this.accept(r.ParenthesisR)?this.finish(t):this.finish(t,t9.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(r.Ident))return null;let e=this.create(e2);if(e.referenceTypes=[s.Function],this.acceptIdent("progid")){if(this.accept(r.Colon))for(;this.accept(r.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){let e=this.create(to);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(!this.peekRegExp(r.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g))return null;{let e=this.create(tW);return this.consumeToken(),this.finish(e)}}}function iO(e,t){return -1!==e.indexOf(t)}function iU(...e){let t=[];for(let i of e)for(let e of i)iO(t,e)||t.push(e);return t}class iB{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){let i=e+t,r=function(e,t){let i=0,r=e.length;if(0===r)return 0;for(;i<r;){let n=Math.floor((i+r)/2);t(e[n])?r=n:i=n+1}return i}(this.children,e=>e.offset>i);if(0===r)return this;let n=this.children[r-1];return n.offset<=e&&n.offset+n.length>=e+t?n.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let i=0;i<this.symbols.length;i++){let r=this.symbols[i];if(r.name===e&&r.type===t)return r}return null}getSymbols(){return this.symbols}}class iW extends iB{constructor(){super(0,Number.MAX_VALUE)}}class iK{constructor(e,t,i,r){this.name=e,this.value=t,this.node=i,this.type=r}}class iz{constructor(e){this.scope=e}addSymbol(e,t,i,r){if(-1!==e.offset){let n=this.scope.findScope(e.offset,e.length);n&&n.addSymbol(new iK(t,i,e,r))}}addScope(e){if(-1!==e.offset){let t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){let i=new iB(e.offset,e.length);return t.addChild(i),i}return t}return null}addSymbolToChildScope(e,t,i,r,n){if(e&&-1!==e.offset){let s=this.addScope(e);s&&s.addSymbol(new iK(i,r,t,n))}}visitNode(e){switch(e.type){case n.Keyframe:this.addSymbol(e,e.getName(),void 0,s.Keyframe);break;case n.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case n.VariableDeclaration:return this.visitVariableDeclarationNode(e);case n.Ruleset:return this.visitRuleSet(e);case n.MixinDeclaration:this.addSymbol(e,e.getName(),void 0,s.Mixin);break;case n.FunctionDeclaration:this.addSymbol(e,e.getName(),void 0,s.Function);break;case n.FunctionParameter:return this.visitFunctionParameterNode(e);case n.Declarations:this.addScope(e);break;case n.For:let t=e.getDeclarations();t&&e.variable&&this.addSymbolToChildScope(t,e.variable,e.variable.getName(),void 0,s.Variable);break;case n.Each:{let t=e.getDeclarations();if(t)for(let i of e.getVariables().getChildren())this.addSymbolToChildScope(t,i,i.getName(),void 0,s.Variable)}}return!0}visitRuleSet(e){let t=this.scope.findScope(e.offset,e.length);if(t)for(let i of e.getSelectors().getChildren())i instanceof e7&&1===i.getChildren().length&&t.addSymbol(new iK(i.getChild(0).getText(),void 0,i,s.Rule));return!0}visitVariableDeclarationNode(e){let t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,s.Variable),!0}visitFunctionParameterNode(e){let t=e.getParent().getDeclarations();if(t){let i=e.getDefaultValue(),r=i?i.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),r,s.Variable)}return!0}visitCustomPropertyDeclarationNode(e){let t=e.getValue()?e.getValue().getText():"";return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,s.Variable),!0}addCSSVariable(e,t,i,r){-1!==e.offset&&this.scope.addSymbol(new iK(t,i,e,r))}}class ij{constructor(e){this.global=new iW,e.acceptVisitor(new iz(this.global))}findSymbolsAtOffset(e,t){let i=this.global.findScope(e,0),r=[],n={};for(;i;){let e=i.getSymbols();for(let i=0;i<e.length;i++){let s=e[i];s.type!==t||n[s.name]||(r.push(s),n[s.name]=!0)}i=i.parent}return r}internalFindSymbol(e,t){let i=e;if(e.parent instanceof ta&&e.parent.getParent()instanceof e3&&(i=e.parent.getParent().getDeclarations()),e.parent instanceof to&&e.parent.getParent()instanceof ts){let t=e.parent.getParent().getIdentifier();if(t){let e=this.internalFindSymbol(t,[s.Function]);e&&(i=e.node.getDeclarations())}}if(!i)return null;let r=e.getText(),n=this.global.findScope(i.offset,i.length);for(;n;){for(let e=0;e<t.length;e++){let i=t[e],s=n.getSymbol(r,i);if(s)return s}n=n.parent}return null}evaluateReferenceTypes(e){if(e instanceof e2){let t=e.referenceTypes;if(t)return t;{if(e.isCustomProperty)return[s.Variable];let t=function(e){let t=e.findParent(n.Declaration),i=t&&t.getValue();return i&&i.encloses(e)?t:null}(e);if(t){let i=t.getNonPrefixedPropertyName();if(("animation"===i||"animation-name"===i)&&t.getValue()&&t.getValue().offset===e.offset)return[s.Keyframe]}}}else if(e instanceof tH)return[s.Variable];return e.findAParent(n.Selector,n.ExtendsReference)?[s.Rule]:null}findSymbolFromNode(e){if(!e)return null;for(;e.type===n.Interpolation;)e=e.getParent();let t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null}matchesSymbol(e,t){if(!e)return!1;for(;e.type===n.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;let i=this.evaluateReferenceTypes(e);return!!i&&-1!==i.indexOf(t.type)&&this.internalFindSymbol(e,i)===t}findSymbol(e,t,i){let r=this.global.findScope(i);for(;r;){let i=r.getSymbol(e,t);if(i)return i;r=r.parent}return null}}let iq={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function iH(e){switch(e){case"experimental":return"⚠️ Property is experimental. Be cautious when using it.️\n\n";case"nonstandard":return"\uD83D\uDEA8️ Property is nonstandard. Avoid using it.\n\n";case"obsolete":return"\uD83D\uDEA8️️️ Property is obsolete. Avoid using it.\n\n";default:return""}}function iQ(e,t,i){let r;if(""!==(r=t?{kind:"markdown",value:function(e,t){if(!e.description||""===e.description)return"";let i="";if(t?.documentation!==!1){e.status&&(i+=iH(e.status)),"string"==typeof e.description?i+=iG(e.description):i+=e.description.kind===O.Markdown?e.description.value:iG(e.description.value);let t=iJ(e.browsers);t&&(i+="\n\n("+iG(t)+")"),"syntax"in e&&e.syntax&&(i+=`
|
|
2
|
+
|
|
3
|
+
Syntax: ${iG(e.syntax)}`)}return e.references&&e.references.length>0&&t?.references!==!1&&(i.length>0&&(i+="\n\n"),i+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | ")),i}(e,i)}:{kind:"plaintext",value:function(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;let i="";if(t?.documentation!==!1){e.status&&(i+=iH(e.status)),i+=e.description;let t=iJ(e.browsers);t&&(i+="\n("+t+")"),"syntax"in e&&(i+=`
|
|
4
|
+
|
|
5
|
+
Syntax: ${e.syntax}`)}return e.references&&e.references.length>0&&t?.references!==!1&&(i.length>0&&(i+="\n\n"),i+=e.references.map(e=>`${e.name}: ${e.url}`).join(" | ")),i}(e,i)}).value)return r}function iG(e){return(e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/</g,"<").replace(/>/g,">")}function iJ(e=[]){return 0===e.length?null:e.map(e=>{let t="",i=e.match(/([A-Z]+)(\d+)?/),r=i[1],n=i[2];return r in iq&&(t+=iq[r]),n&&(t+=" "+n),t}).join(", ")}var iX=i(10986);(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,r="",n=0,s=-1,a=0,o=0;o<=e.length;++o){if(o<e.length)i=e.charCodeAt(o);else{if(47===i)break;i=47}if(47===i){if(s===o-1||1===a);else if(s!==o-1&&2===a){if(r.length<2||2!==n||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2)){if(r.length>2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",n=0):n=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",n=0,s=o,a=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),n=o-s-1;s=o,a=0}else 46===i&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r,n="",s=!1,a=arguments.length-1;a>=-1&&!s;a--)a>=0?e=arguments[a]:(void 0===r&&(r=iX.cwd()),e=r),t(e),0!==e.length&&(n=e+"/"+n,s=47===e.charCodeAt(0));return n=i(n,!s),s?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!r)).length||r||(e="."),e.length>0&&n&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,i=0;i<arguments.length;++i){var n=arguments[i];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":r.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i||(e=r.resolve(e))===(i=r.resolve(i)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var s=e.length,a=s-n,o=1;o<i.length&&47===i.charCodeAt(o);++o);for(var l=i.length-o,h=a<l?a:l,c=-1,u=0;u<=h;++u){if(u===h){if(l>h){if(47===i.charCodeAt(o+u))return i.slice(o+u+1);if(0===u)return i.slice(o+u)}else a>h&&(47===e.charCodeAt(n+u)?c=u:0===u&&(c=0));break}var p=e.charCodeAt(n+u);if(p!==i.charCodeAt(o+u))break;47===p&&(c=u)}var d="";for(u=n+c+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+i.slice(o+c):(o+=c,47===i.charCodeAt(o)&&++o,i.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),r=47===i,n=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(i=e.charCodeAt(a))){if(!s){n=a;break}}else s=!1;return -1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw TypeError('"ext" argument must be a string');t(e);var r,n=0,s=-1,a=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var o=i.length-1,l=-1;for(r=e.length-1;r>=0;--r){var h=e.charCodeAt(r);if(47===h){if(!a){n=r+1;break}}else -1===l&&(a=!1,l=r+1),o>=0&&(h===i.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=l))}return n===s?s=l:-1===s&&(s=e.length),e.slice(n,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else -1===s&&(a=!1,s=r+1);return -1===s?"":e.slice(n,s)},extname:function(e){t(e);for(var i=-1,r=0,n=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===n&&(s=!1,n=o+1),46===l?-1===i?i=o:1!==a&&(a=1):-1!==i&&(a=-1);else if(!s){r=o+1;break}}return -1===i||-1===n||0===a||1===a&&i===n-1&&i===r+1?"":e.slice(i,n)},format:function(e){var t,i;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+i:t+"/"+i:i},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var r,n=e.charCodeAt(0),s=47===n;s?(i.root="/",r=1):r=0;for(var a=-1,o=0,l=-1,h=!0,c=e.length-1,u=0;c>=r;--c)if(47!==(n=e.charCodeAt(c)))-1===l&&(h=!1,l=c+1),46===n?-1===a?a=c:1!==u&&(u=1):-1!==a&&(u=-1);else if(!h){o=c+1;break}return -1===a||-1===l||0===u||1===u&&a===l-1&&a===o+1?-1!==l&&(i.base=i.name=0===o&&s?e.slice(1,l):e.slice(o,l)):(0===o&&s?(i.name=e.slice(1,a),i.base=e.slice(1,l)):(i.name=e.slice(o,a),i.base=e.slice(o,l)),i.ext=e.slice(a,l)),o>0?i.dir=e.slice(0,o-1):s&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,i),s.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;(i.r(r),i.d(r,{URI:()=>l,Utils:()=>y}),"object"==typeof iX)?e="win32"===iX.platform:"object"==typeof navigator&&(e=navigator.userAgent.indexOf("Windows")>=0);let t=/^\w[\w\d+.-]*$/,n=/^\//,s=/^\/\//;function a(e,i){if(!e.scheme&&i)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(!n.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(s.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 o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,i,r,n,s=!1){"object"==typeof e?(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,s),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,i||""),this.query=r||"",this.fragment=n||"",a(this,s))}get fsPath(){return f(this)}with(e){if(!e)return this;let{scheme:t,authority:i,path:r,query:n,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===i?i=this.authority:null===i&&(i=""),void 0===r?r=this.path:null===r&&(r=""),void 0===n?n=this.query:null===n&&(n=""),void 0===s?s=this.fragment:null===s&&(s=""),t===this.scheme&&i===this.authority&&r===this.path&&n===this.query&&s===this.fragment?this:new c(t,i,r,n,s)}static parse(e,t=!1){let i=o.exec(e);return i?new c(i[2]||"",_(i[4]||""),_(i[5]||""),_(i[7]||""),_(i[9]||""),t):new c("","","","","")}static file(t){let i="";if(e&&(t=t.replace(/\\/g,"/")),"/"===t[0]&&"/"===t[1]){let e=t.indexOf("/",2);-1===e?(i=t.substring(2),t="/"):(i=t.substring(2,e),t=t.substring(e)||"/")}return new c("file",i,t,"","")}static from(e){let t=new c(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return m(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{let t=new c(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}let h=e?1:void 0;class c extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=f(this)),this._fsPath}toString(e=!1){return e?m(this,!0):(this._formatted||(this._formatted=m(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),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 u={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 p(e,t,i){let r,n=-1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||i&&91===a||i&&93===a||i&&58===a)-1!==n&&(r+=encodeURIComponent(e.substring(n,s)),n=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));let t=u[a];void 0!==t?(-1!==n&&(r+=encodeURIComponent(e.substring(n,s)),n=-1),r+=t):-1===n&&(n=s)}}return -1!==n&&(r+=encodeURIComponent(e.substring(n))),void 0!==r?r:e}function d(e){let t;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);35===r||63===r?(void 0===t&&(t=e.substr(0,i)),t+=u[r]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function f(t,i){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&90>=t.path.charCodeAt(1)||t.path.charCodeAt(1)>=97&&122>=t.path.charCodeAt(1))&&58===t.path.charCodeAt(2)?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function m(e,t){let i=t?d:p,r="",{scheme:n,authority:s,path:a,query:o,fragment:l}=e;if(n&&(r+=n,r+=":"),(s||"file"===n)&&(r+="/",r+="/"),s){let e=s.indexOf("@");if(-1!==e){let t=s.substr(0,e);s=s.substr(e+1),-1===(e=t.lastIndexOf(":"))?r+=i(t,!1,!1):(r+=i(t.substr(0,e),!1,!1),r+=":",r+=i(t.substr(e+1),!1,!0)),r+="@"}-1===(e=(s=s.toLowerCase()).lastIndexOf(":"))?r+=i(s,!1,!0):(r+=i(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){let e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){let e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=i(a,!0,!1)}return o&&(r+="?",r+=i(o,!1,!1)),l&&(r+="#",r+=t?l:p(l,!1,!1)),r}let g=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(e){return e.match(g)?e.replace(g,e=>(function e(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+e(t.substr(3)):t}})(e)):e}var y,b=i(470);let x=b.posix||b;!function(e){e.joinPath=function(e,...t){return e.with({path:x.join(e.path,...t)})},e.resolvePath=function(e,...t){let i=e.path,r=!1;"/"!==i[0]&&(i="/"+i,r=!0);let n=x.resolve(i,...t);return r&&"/"===n[0]&&!e.authority&&(n=n.substring(1)),e.with({path:n})},e.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=x.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return x.basename(e.path)},e.extname=function(e){return x.extname(e.path)}}(y||(y={}))})(),eF=r})();let{URI:iZ,Utils:iY}=eF;function i0(e){return iY.dirname(iZ.parse(e)).toString(!0)}function i1(e,...t){return iY.joinPath(iZ.parse(e),...t).toString(!0)}class i2{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 i={items:[],isIncomplete:!1};for(let r of this.literalCompletions){let n=r.uriValue,s=i4(n);if("."===s||".."===s)i.isIncomplete=!0;else for(let s of(await this.providePathSuggestions(n,r.position,r.range,e,t)))i.items.push(s)}for(let r of this.importCompletions){let n=r.pathValue,s=i4(n);if("."===s||".."===s)i.isIncomplete=!0;else{let s=await this.providePathSuggestions(n,r.position,r.range,e,t);for(let t of("scss"===e.languageId&&s.forEach(e=>{eH(e.label,"_")&&eQ(e.label,".scss")&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))}),s))i.items.push(t)}}return i}async providePathSuggestions(e,t,i,r,n){let s=i4(e),a=eH(e,"'")||eH(e,'"'),o=a?s.slice(0,t.character-(i.start.character+1)):s.slice(0,t.character-i.start.character),l=r.uri,h=function(e,t,i){let r,n=e.lastIndexOf("/");if(-1===n)r=i;else{let e,s=t.slice(n+1),a=i6(i.end,-s.length),o=s.indexOf(" ");e=-1!==o?i6(a,o):i.end,r=p.create(a,e)}return r}(o,s,a?function(e,t,i){let r=i6(e.start,1),n=i6(e.end,-1);return p.create(r,n)}(i,1,-1):i),c=o.substring(0,o.lastIndexOf("/")+1),u=n.resolveReference(c||".",l);if(u)try{let e=[];for(let[t,i]of(await this.readDirectory(u))){var d,f,m;t.charCodeAt(0)!==i5&&(i===eL.Directory||i1(u,t)!==l)&&e.push((d=t,f=i===eL.Directory,m=h,f?{label:i3(d+="/"),kind:B.Folder,textEdit:P.replace(m,i3(d)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:i3(d),kind:B.File,textEdit:P.replace(m,i3(d))}))}return e}catch(e){}return[]}}let i5=46;function i4(e){return eH(e,"'")||eH(e,'"')?e.slice(1,-1):e}function i3(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function i6(e,t){return u.create(e.line,e.character+t)}let i7=W.Snippet,i8={title:"Suggest",command:"editor.action.triggerSuggest"};!function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"}(eN||(eN={}));class i9{constructor(e=null,t,i){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=i,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new ij(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,i,r,n=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,i,n);let s=new i2(this.lsOptions.fileSystemProvider.readDirectory),a=this.completionParticipants;this.completionParticipants=[s].concat(a);let o=this.doComplete(e,t,i,n);try{let t=await s.computeCompletions(e,r);return{isIncomplete:o.isIncomplete||t.isIncomplete,itemDefaults:o.itemDefaults,items:t.items.concat(o.items)}}finally{this.completionParticipants=a}}doComplete(e,t,i,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let i=t-1,r=e.getText();for(;i>=0&&-1===' \n\r":{[()]},*>+'.indexOf(r.charAt(i));)i--;return r.substring(i+1,t)}(e,this.offset),this.defaultReplaceRange=p.create(u.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=i,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=eZ(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){let i=this.nodePath[t];if(i instanceof tr)this.getCompletionsForDeclarationProperty(i.getParent(),e);else if(i instanceof tV)i.parent instanceof tq?this.getVariableProposals(null,e):this.getCompletionsForExpression(i,e);else if(i instanceof e8){let t=i.findAParent(n.ExtendsReference,n.Ruleset);t&&(t.type===n.ExtendsReference?this.getCompletionsForExtendsReference(t,i,e):this.getCompletionsForSelector(t,t&&t.isNested(),e))}else if(i instanceof to)this.getCompletionsForFunctionArgument(i,i.getParent(),e);else if(i instanceof e4)this.getCompletionsForDeclarations(i,e);else if(i instanceof tj)this.getCompletionsForVariableDeclaration(i,e);else if(i instanceof e6)this.getCompletionsForRuleSet(i,e);else if(i instanceof tq)this.getCompletionsForInterpolation(i,e);else if(i instanceof td)this.getCompletionsForFunctionDeclaration(i,e);else if(i instanceof tX)this.getCompletionsForMixinReference(i,e);else if(i instanceof ts)this.getCompletionsForFunctionArgument(null,i,e);else if(i instanceof tP)this.getCompletionsForSupports(i,e);else if(i instanceof tL)this.getCompletionsForSupportsCondition(i,e);else if(i instanceof tQ)this.getCompletionsForExtendsReference(i,null,e);else if(i.type===n.URILiteral)this.getCompletionForUriLiteralValue(i,e);else if(null===i.parent)this.getCompletionForTopLevel(e);else{if(!(i.type===n.StringLiteral&&this.isImportPathParent(i.parent.type)))continue;this.getCompletionForImportPath(i,e)}if(e.items.length>0||this.offset>i.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),0===e.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&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===n.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){let i=this.nodePath[t];if(-1!==e.indexOf(i.type))return i}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){let i=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(n=>{let s,a,o=!1;e?(s=this.getCompletionRange(e.getProperty()),a=n.name,iN(e.colonPosition)||(a+=": ",o=!0)):(s=this.getCompletionRange(null),a=n.name+": ",o=!0),!e&&r&&(a+="$0;"),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(s.end)&&(a+="$0;");let l={label:n.name,documentation:iQ(n,this.doesSupportMarkdown()),tags:re(n)?[K.Deprecated]:[],textEdit:P.replace(s,a),insertTextFormat:W.Snippet,kind:B.Property};n.restrictions||(o=!1),i&&o&&(l.command=i8);let h=(255-("number"==typeof n.relevance?Math.min(Math.max(n.relevance,0),99):50)).toString(16);l.sortText=(eH(n.name,"-")?eN.VendorPrefixed:eN.Normal)+"_"+h,t.items.push(l)}),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 i=e.getFullPropertyName(),r=this.cssDataManager.getProperty(i),n=e.getValue()||null;for(;n&&n.hasChildren();)n=n.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:i,propertyValue:this.currentWord,range:this.getCompletionRange(n)})}),r){if(r.restrictions)for(let e of r.restrictions)switch(e){case"color":this.getColorProposals(r,n,t);break;case"position":this.getPositionProposals(r,n,t);break;case"repeat":this.getRepeatStyleProposals(r,n,t);break;case"line-style":this.getLineStyleProposals(r,n,t);break;case"line-width":this.getLineWidthProposals(r,n,t);break;case"geometry-box":this.getGeometryBoxProposals(r,n,t);break;case"box":this.getBoxProposals(r,n,t);break;case"image":this.getImageProposals(r,n,t);break;case"timing-function":this.getTimingFunctionProposals(r,n,t);break;case"shape":this.getBasicShapeProposals(r,n,t)}this.getValueEnumProposals(r,n,t),this.getCSSWideKeywordProposals(r,n,t),this.getUnitProposals(r,n,t)}else for(let i of(function(e,t){let i=t.getFullPropertyName(),r=new rt;function n(e){return(e instanceof e2||e instanceof tz||e instanceof tW)&&r.add(e.getText()),!0}return e.accept(function(e){if(e instanceof tt&&e!==t&&i===e.getFullPropertyName()){let t=e.getValue();t&&t.accept(n)}return!0}),r})(this.styleSheet,e).getEntries())t.items.push({label:i,textEdit:P.replace(this.getCompletionRange(n),i),kind:B.Value});return this.getVariableProposals(n,t),this.getTermProposals(r,n,t),t}getValueEnumProposals(e,t,i){if(e.values)for(let r of e.values){let n,s=r.name;if(eQ(s,")")){let e=s.lastIndexOf("(");-1!==e&&(s=s.substring(0,e+1)+"$1"+s.substring(e+1),n=i7)}let a=eN.Enums;eH(r.name,"-")&&(a+=eN.VendorPrefixed);let o={label:r.name,documentation:iQ(r,this.doesSupportMarkdown()),tags:re(e)?[K.Deprecated]:[],textEdit:P.replace(this.getCompletionRange(t),s),sortText:a,kind:B.Value,insertTextFormat:n};i.items.push(o)}return i}getCSSWideKeywordProposals(e,t,i){for(let e in iE)i.items.push({label:e,documentation:iE[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});for(let e in iR){let r=ri(e);i.items.push({label:e,documentation:iR[e],textEdit:P.replace(this.getCompletionRange(t),r),kind:B.Function,insertTextFormat:i7,command:eH(e,"var")?i8:void 0})}return i}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){for(let i of this.getSymbolContext().findSymbolsAtOffset(this.offset,s.Variable)){let r=eH(i.name,"--")?`var(${i.name})`:i.name,s={label:i.name,documentation:i.value?eG(i.value):i.value,textEdit:P.replace(this.getCompletionRange(e),r),kind:B.Variable,sortText:eN.Variable};if("string"==typeof s.documentation&&ig(s.documentation)&&(s.kind=B.Color),i.node.type===n.FunctionParameter){let e=i.node.getParent();e.type===n.MixinDeclaration&&(s.detail=t6("argument from '{0}'",e.getName()))}t.items.push(s)}return t}getVariableProposalsForCSSVarFunction(e){let t=new rt;for(let i of(this.styleSheet.acceptVisitor(new rn(t,this.offset)),this.getSymbolContext().findSymbolsAtOffset(this.offset,s.Variable))){if(eH(i.name,"--")){let t={label:i.name,documentation:i.value?eG(i.value):i.value,textEdit:P.replace(this.getCompletionRange(null),i.name),kind:B.Variable};"string"==typeof t.documentation&&ig(t.documentation)&&(t.kind=B.Color),e.items.push(t)}t.remove(i.name)}for(let i of t.getEntries())if(eH(i,"--")){let t={label:i,textEdit:P.replace(this.getCompletionRange(null),i),kind:B.Variable};e.items.push(t)}return e}getUnitProposals(e,t,i){let r="0";if(this.currentWord.length>0){let e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(i.isIncomplete=(r=e[0]).length===this.currentWord.length)}else 0===this.currentWord.length&&(i.isIncomplete=!0);if(t&&t.parent&&t.parent.type===n.Term&&(t=t.getParent()),e.restrictions)for(let n of e.restrictions){let e=iT[n];if(e)for(let n of e){let e=r+n;i.items.push({label:e,textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Unit})}}return i}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let t=-1!==e.end?this.textDocument.positionAt(e.end):this.position,i=this.textDocument.positionAt(e.offset);if(i.line===t.line)return p.create(i,t)}return this.defaultReplaceRange}getColorProposals(e,t,i){for(let e in ih)i.items.push({label:e,documentation:ih[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Color});for(let e in iu)i.items.push({label:e,documentation:iu[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});let r=new rt;for(let e of(this.styleSheet.acceptVisitor(new rr(r,this.offset)),r.getEntries()))i.items.push({label:e,textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Color});for(let e of io)i.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:P.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:i7,kind:B.Function});return i}getPositionProposals(e,t,i){for(let e in iC)i.items.push({label:e,documentation:iC[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});return i}getRepeatStyleProposals(e,t,i){for(let e in ik)i.items.push({label:e,documentation:ik[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});return i}getLineStyleProposals(e,t,i){for(let e in iv)i.items.push({label:e,documentation:iv[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});return i}getLineWidthProposals(e,t,i){for(let e of iS)i.items.push({label:e,textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});return i}getGeometryBoxProposals(e,t,i){for(let e in iP)i.items.push({label:e,documentation:iP[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});return i}getBoxProposals(e,t,i){for(let e in iw)i.items.push({label:e,documentation:iw[e],textEdit:P.replace(this.getCompletionRange(t),e),kind:B.Value});return i}getImageProposals(e,t,i){for(let e in iI){let r=ri(e);i.items.push({label:e,documentation:iI[e],textEdit:P.replace(this.getCompletionRange(t),r),kind:B.Function,insertTextFormat:e!==r?i7:void 0})}return i}getTimingFunctionProposals(e,t,i){for(let e in iD){let r=ri(e);i.items.push({label:e,documentation:iD[e],textEdit:P.replace(this.getCompletionRange(t),r),kind:B.Function,insertTextFormat:e!==r?i7:void 0})}return i}getBasicShapeProposals(e,t,i){for(let e in iA){let r=ri(e);i.items.push({label:e,documentation:iA[e],textEdit:P.replace(this.getCompletionRange(t),r),kind:B.Function,insertTextFormat:e!==r?i7:void 0})}return i}getCompletionsForStylesheet(e){let t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof e6?this.getCompletionsForRuleSet(t,e):t instanceof tP?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:P.replace(this.getCompletionRange(null),t.name),documentation:iQ(t,this.doesSupportMarkdown()),tags:re(t)?[K.Deprecated]:[],kind:B.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){let i=e.getDeclarations();return i&&i.endsWith("}")&&this.offset>=i.end?this.getCompletionForTopLevel(t):!i||this.offset<=i.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,i){let r=this.findInNodePath(n.PseudoSelector,n.IdentifierSelector,n.ClassSelector,n.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=p.create(u.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(e=>{let t=ri(e.name),n={label:e.name,textEdit:P.replace(this.getCompletionRange(r),t),documentation:iQ(e,this.doesSupportMarkdown()),tags:re(e)?[K.Deprecated]:[],kind:B.Function,insertTextFormat:e.name!==t?i7:void 0};eH(e.name,":-")&&(n.sortText=eN.VendorPrefixed),i.items.push(n)}),this.cssDataManager.getPseudoElements().forEach(e=>{let t=ri(e.name),n={label:e.name,textEdit:P.replace(this.getCompletionRange(r),t),documentation:iQ(e,this.doesSupportMarkdown()),tags:re(e)?[K.Deprecated]:[],kind:B.Function,insertTextFormat:e.name!==t?i7:void 0};eH(e.name,"::-")&&(n.sortText=eN.VendorPrefixed),i.items.push(n)}),!t){for(let e of i$)i.items.push({label:e,textEdit:P.replace(this.getCompletionRange(r),e),kind:B.Keyword});for(let e of iM)i.items.push({label:e,textEdit:P.replace(this.getCompletionRange(r),e),kind:B.Keyword})}let s={};s[this.currentWord]=!0;let a=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===n.SimpleSelector&&e.length>0){let t=a.substr(e.offset,e.length);return"."!==t.charAt(0)||s[t]||(s[t]=!0,i.items.push({label:t,textEdit:P.replace(this.getCompletionRange(r),t),kind:B.Keyword})),!1}return!0}),e&&e.isNested()){let t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&0===e.getSelectors().getChildren().indexOf(t)&&this.getPropertyProposals(null,i)}return i}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;let i=e.findFirstChildBeforeOffset(this.offset);if(!i)return this.getCompletionsForDeclarationProperty(null,t);if(i instanceof e9){if(!iN(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,t);if(iN(i.semicolonPosition)&&i.semicolonPosition<this.offset)return this.offset===i.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(i instanceof tt)return this.getCompletionsForDeclarationValue(i,t)}else i instanceof tQ?this.getCompletionsForExtendsReference(i,null,t):this.currentWord&&"@"===this.currentWord[0]?this.getCompletionsForDeclarationProperty(null,t):i instanceof e6&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&iN(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){let i=e.getParent();if(i instanceof to)return this.getCompletionsForFunctionArgument(i,i.getParent(),t),t;let r=e.findParent(n.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;let s=e.findChildAtOffset(this.offset,!0);return!s||s instanceof tz||s instanceof e2?this.getCompletionsForDeclarationValue(r,t):t}getCompletionsForFunctionArgument(e,t,i){let r=t.getIdentifier();return r&&r.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(i),i}getCompletionsForFunctionDeclaration(e,t){let i=e.getDeclarations();return i&&this.offset>i.offset&&this.offset<i.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){for(let e of this.getSymbolContext().findSymbolsAtOffset(this.offset,s.Mixin))e.node instanceof tZ&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));let i=e.getIdentifier()||null;return this.completionParticipants.forEach(e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),t}getTermProposals(e,t,i){for(let e of this.getSymbolContext().findSymbolsAtOffset(this.offset,s.Function))e.node instanceof td&&i.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return i}makeTermProposal(e,t,i){e.node;let r=t.getChildren().map(e=>e instanceof ta?e.getName():e.getText()),n=e.name+"("+r.map((e,t)=>"${"+(t+1)+":"+e+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+r.join(", ")+")",textEdit:P.replace(this.getCompletionRange(i),n),insertTextFormat:i7,kind:B.Function,sortText:eN.Term}}getCompletionsForSupportsCondition(e,t){let i=e.findFirstChildBeforeOffset(this.offset);if(i){if(i instanceof tt)if(!iN(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,t);else return this.getCompletionsForDeclarationValue(i,t);else if(i instanceof tL)return this.getCompletionsForSupportsCondition(i,t)}return iN(e.lParent)&&this.offset>e.lParent&&(!iN(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){let i=e.getDeclarations();if(!i||this.offset<=i.offset){let i=e.findFirstChildBeforeOffset(this.offset);return i instanceof tL?this.getCompletionsForSupportsCondition(i,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,i){return i}getCompletionForUriLiteralValue(e,t){let i,r,n;if(e.hasChildren()){let t=e.getChild(0);i=t.getText(),r=this.position,n=this.getCompletionRange(t)}else{i="",r=this.position;let t=this.textDocument.positionAt(e.offset+4);n=p.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:i,position:r,range:n})}),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 i=this.textDocument.getText();return e>=0&&e<i.length&&i.charAt(e)===t}doesSupportMarkdown(){if(!iN(this.supportsMarkdown)){if(!iN(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(O.Markdown)}return this.supportsMarkdown}}function re(e){return!!e.status&&("nonstandard"===e.status||"obsolete"===e.status)}class rt{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}}function ri(e){return e.replace(/\(\)$/,"($1)")}class rr{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof tW||e instanceof ts&&function(e){let t=e.getName();return!!t&&il.test(t)}(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}class rn{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof e2&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}class rs{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(let t of this.attributes)if(t.name===e)return t.value}return null}addChild(e){e instanceof rs&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){let t=this.attributes[this.attributes.length-1];t.value=t.value+e}}prepend(e){if(this.attributes){let t=this.attributes[0];t.value=e+t.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof ra);)e=e.parent;return e}removeChild(e){if(this.children){let t=this.children.indexOf(e);if(-1!==t)return this.children.splice(t,1),!0}return!1}addAttr(e,t){for(let i of(this.attributes||(this.attributes=[]),this.attributes))if(i.name===e){i.value+=" "+t;return}this.attributes.push({name:e,value:t})}clone(e=!0){let t=new rs;if(this.attributes)for(let e of(t.attributes=[],this.attributes))t.addAttr(e.name,e.value);if(e&&this.children){t.children=[];for(let e=0;e<this.children.length;e++)t.addChild(this.children[e].clone())}return t}cloneWithParent(){let e=this.clone(!1);return!this.parent||this.parent instanceof ra||this.parent.cloneWithParent().addChild(e),e}}class ra extends rs{}class ro extends rs{constructor(e){super(),this.addAttr("name",e)}}class rl{constructor(e){this.quote=e,this.result=[]}print(e,t){return this.result=[],e instanceof ra?e.children&&this.doPrint(e.children,0):this.doPrint([e],0),[{language:"html",value:t?`${t.text}
|
|
6
|
+
… `+this.result.join("\n"):this.result.join("\n")}]}doPrint(e,t){for(let i of e)this.doPrintElement(i,t),i.children&&this.doPrint(i.children,t+1)}writeLine(e,t){let i=Array(e+1).join(" ");this.result.push(i+t)}doPrintElement(e,t){let i=e.findAttribute("name");if(e instanceof ro||"…"===i)return void this.writeLine(t,i);let r=["<"];if(i?r.push(i):r.push("element"),e.attributes){for(let t of e.attributes)if("name"!==t.name){r.push(" "),r.push(t.name);let e=t.value;e&&(r.push("="),r.push(eV.ensure(e,this.quote)))}}r.push(">"),this.writeLine(t,r.join(""))}}!function(e){function t(e){let t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,i){return i+t(e)+i},e.remove=t}(eV||(eV={}));class rh{constructor(){this.id=0,this.attr=0,this.tag=0}}function rc(e,t){let i=new rs;for(let r of e.getChildren())switch(r.type){case n.SelectorCombinator:if(t){let e=r.getText().split("&");if(1===e.length){i.addAttr("name",e[0]);break}i=t.cloneWithParent(),e[0]&&i.findRoot().prepend(e[0]);for(let r=1;r<e.length;r++){if(r>1){let e=t.cloneWithParent();i.addChild(e.findRoot()),i=e}i.append(e[r])}}break;case n.SelectorPlaceholder:if(r.matches("@at-root"))return i;case n.ElementNameSelector:let e=r.getText();i.addAttr("name","*"===e?"element":ru(e));break;case n.ClassSelector:i.addAttr("class",ru(r.getText().substring(1)));break;case n.IdentifierSelector:i.addAttr("id",ru(r.getText().substring(1)));break;case n.MixinDeclaration:i.addAttr("class",r.getName());break;case n.PseudoSelector:i.addAttr(ru(r.getText()),"");break;case n.AttributeSelector:let s=r.getIdentifier();if(s){let e,t=r.getValue(),n=r.getOperator();if(t&&n)switch(ru(n.getText())){case"|=":e=`${eV.remove(ru(t.getText()))}-\u2026`;break;case"^=":e=`${eV.remove(ru(t.getText()))}\u2026`;break;case"$=":e=`\u2026${eV.remove(ru(t.getText()))}`;break;case"~=":e=` \u2026 ${eV.remove(ru(t.getText()))} \u2026 `;break;case"*=":e=`\u2026${eV.remove(ru(t.getText()))}\u2026`;break;default:e=eV.remove(ru(t.getText()))}i.addAttr(ru(s.getText()),e)}}return i}function ru(e){let t=new eq;t.setSource(e);let i=t.scanUnquotedString();return i?i.text:e}class rp{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){let i=function(e){if(e.matches("@at-root"))return null;let t=new ra,i=[],r=e.getParent();if(r instanceof e6){let e=r.getParent();for(;e&&!function(e){switch(e.type){case n.MixinDeclaration:case n.Stylesheet:return!0}return!1}(e);){if(e instanceof e6){if(e.getSelectors().matches("@at-root"))break;i.push(e)}e=e.getParent()}}let s=new rd(t);for(let e=i.length-1;e>=0;e--){let t=i[e].getSelectors().getChild(0);t&&s.processSelector(t)}return s.processSelector(e),t}(e);if(!i)return[];{let r=new rl('"').print(i,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}}simpleSelectorToMarkedString(e){let t=rc(e),i=new rl('"').print(t);return i.push(this.selectorToSpecificityMarkedString(e)),i}isPseudoElementIdentifier(e){let t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])}selectorToSpecificityMarkedString(e){let t=e=>{let t=new rh,r=new rh;for(let t of e)for(let e of t.getChildren()){let t=i(e);if(t.id>r.id){r=t;continue}if(!(t.id<r.id)){if(t.attr>r.attr){r=t;continue}if(!(t.attr<r.attr)&&t.tag>r.tag){r=t;continue}}}return t.id+=r.id,t.attr+=r.attr,t.tag+=r.tag,t},i=e=>{let r=new rh;for(let s of e.getChildren()){switch(s.type){case n.IdentifierSelector:r.id++;break;case n.ClassSelector:case n.AttributeSelector:r.attr++;break;case n.ElementNameSelector:if(s.matches("*"))break;r.tag++;break;case n.PseudoSelector:let e=s.getText(),a=s.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&a.length>0){r.tag++;let e=t(a);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue}r.tag++;continue}if(e.match(/^:where/i))continue;if(e.match(/^:(?:not|has|is)/i)&&a.length>0){let e=t(a);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue}if(e.match(/^:(?:host|host-context)/i)&&a.length>0){r.attr++;let e=t(a);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&a.length>0){if(r.attr++,3===a.length&&23===a[1].type){let e=t(a[2].getChildren());r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue}let e=new iV,i=a[1].getText();e.scanner.setSource(i);let n=e.scanner.scan(),s=e.scanner.scan();if("n"===n.text||"-n"===n.text&&"of"===s.text){let n=[];for(let t of i.slice(s.offset+2).split(",")){let i=e.internalParse(t,e._parseSelector);i&&n.push(i)}let a=t(n);r.id+=a.id,r.attr+=a.attr,r.tag+=a.tag}continue}r.attr++;continue}if(s.getChildren().length>0){let e=i(s);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag}}return r},r=i(e);return`[${t6("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}}class rd{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof ra)&&e.getChildren().some(e=>e.hasChildren()&&e.getChild(0).type===n.SelectorCombinator)){let e=this.element.findRoot();e.parent instanceof ra&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(let i of e.getChildren()){if(i instanceof e8){if(this.prev instanceof e8){let e=new ro("…");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 ro("⋮"));let e=rc(i,t),r=e.findRoot();this.element.addChild(r),this.element=e}(i instanceof e8||i.type===n.SelectorCombinatorParent||i.type===n.SelectorCombinatorShadowPiercingDescendant||i.type===n.SelectorCombinatorSibling||i.type===n.SelectorCombinatorAllSiblings)&&(this.prev=i)}}}class rf{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new rp(t)}configure(e){this.defaultSettings=e}doHover(e,t,i,r=this.defaultSettings){let s;function a(t){return p.create(e.positionAt(t.offset),e.positionAt(t.end))}let o=eZ(i,e.offsetAt(t)),l=null;for(let e=0;e<o.length;e++){let t=o[e];if(t instanceof tw){let e=/@media[^\{]+/g,i=t.getText().match(e);s={isMedia:!0,text:i?.[0]}}if(t instanceof e7){l={contents:this.selectorPrinting.selectorToMarkedString(t,s),range:a(t)};break}if(t instanceof e8){eH(t.getText(),"@")||(l={contents:this.selectorPrinting.simpleSelectorToMarkedString(t),range:a(t)});break}if(t instanceof tt){let e=t.getFullPropertyName(),i=this.cssDataManager.getProperty(e);if(i){let e=iQ(i,this.doesSupportMarkdown(),r);l=e?{contents:e,range:a(t)}:null}continue}if(t instanceof tY){let e=t.getText(),i=this.cssDataManager.getAtDirective(e);if(i){let e=iQ(i,this.doesSupportMarkdown(),r);l=e?{contents:e,range:a(t)}:null}continue}if(t instanceof eY&&t.type===n.PseudoSelector){let e=t.getText(),i="::"===e.slice(0,2)?this.cssDataManager.getPseudoElement(e):this.cssDataManager.getPseudoClass(e);if(i){let e=iQ(i,this.doesSupportMarkdown(),r);l=e?{contents:e,range:a(t)}:null}continue}}return l&&(l.contents=this.convertContents(l.contents)),l}convertContents(e){if(!this.doesSupportMarkdown())if("string"==typeof e);else if("kind"in e)return{kind:"plaintext",value:e.value};else if(Array.isArray(e))return e.map(e=>"string"==typeof e?e:e.value);else return e.value;return e}doesSupportMarkdown(){if(!iN(this.supportsMarkdown)){if(!iN(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)&&-1!==e.contentFormat.indexOf(O.Markdown)}return this.supportsMarkdown}}let rm=/^\w+:\/\//,rg=/^data:/;class r_{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,i){let r=new ij(i),n=eX(i,e.offsetAt(t));if(!n)return null;let s=r.findSymbolFromNode(n);return s?{uri:e.uri,range:ry(s.node,e)}:null}findReferences(e,t,i){return this.findDocumentHighlights(e,t,i).map(t=>({uri:e.uri,range:t.range}))}getHighlightNode(e,t,i){let r=eX(i,e.offsetAt(t));if(r&&r.type!==n.Stylesheet&&r.type!==n.Declarations)return r.type===n.Identifier&&r.parent&&r.parent.type===n.ClassSelector&&(r=r.parent),r}findDocumentHighlights(e,t,i){let r=[],n=this.getHighlightNode(e,t,i);if(!n)return r;let s=new ij(i),a=s.findSymbolFromNode(n),o=n.getText();return i.accept(t=>{if(a){if(s.matchesSymbol(t,a))return r.push({kind:rx(t),range:ry(t,e)}),!1}else n&&n.type===t.type&&t.matches(o)&&r.push({kind:rx(t),range:ry(t,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===n.Import}findDocumentLinks(e,t,i){let r=this.findUnresolvedLinks(e,t),n=[];for(let t of r){let r=t.link,s=r.target;if(!s||rg.test(s));else if(rm.test(s))n.push(r);else{let t=i.resolveReference(s,e.uri);t&&(r.target=t),n.push(r)}}return n}async findDocumentLinks2(e,t,i){let r=this.findUnresolvedLinks(e,t),n=[];for(let t of r){let r=t.link,s=r.target;if(!s||rg.test(s));else if(rm.test(s))n.push(r);else{let a=await this.resolveReference(s,e.uri,i,t.isRawLink);void 0!==a&&(r.target=a,n.push(r))}}return n}findUnresolvedLinks(e,t){let i=[],r=t=>{let r=t.getText(),n=ry(t,e);if(n.start.line===n.end.line&&n.start.character===n.end.character)return;(eH(r,"'")||eH(r,'"'))&&(r=r.slice(1,-1));let s=!!t.parent&&this.isRawStringDocumentLinkNode(t.parent);i.push({link:{target:r,range:n},isRawLink:s})};return t.accept(e=>{if(e.type===n.URILiteral){let t=e.getChild(0);return t&&r(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){let t=e.getText();return(eH(t,"'")||eH(t,'"'))&&r(e),!1}return!0}),i}findSymbolInformations(e,t){let i=[];return this.collectDocumentSymbols(e,t,(t,r,n)=>{let s=n instanceof eY?ry(n,e):n,a={name:t||t6("<undefined>"),kind:r,location:d.create(e.uri,s)};i.push(a)}),i}findDocumentSymbols(e,t){let i=[],r=[];return this.collectDocumentSymbols(e,t,(t,n,s,a,o)=>{let l=s instanceof eY?ry(s,e):s,h=a instanceof eY?ry(a,e):a;h&&rb(l,h)||(h=p.create(l.start,l.start));let c={name:t||t6("<undefined>"),kind:n,range:l,selectionRange:h},u=r.pop();for(;u&&!rb(u[1],l);)u=r.pop();if(u){let e=u[0];e.children||(e.children=[]),e.children.push(c),r.push(u)}else i.push(c);o&&r.push([c,ry(o,e)])}),i}collectDocumentSymbols(e,t,i){t.accept(t=>{if(t instanceof e6){for(let r of t.getSelectors().getChildren())if(r instanceof e7){let n=p.create(e.positionAt(r.offset),e.positionAt(t.end));i(r.getText(),et.Class,n,r,t.getDeclarations())}}else if(t instanceof tj)i(t.getName(),et.Variable,t,t.getVariable(),void 0);else if(t instanceof tZ)i(t.getName(),et.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof td)i(t.getName(),et.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof t_)i(t6("@keyframes {0}",t.getName()),et.Class,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof tm)i(t6("@font-face"),et.Class,t,void 0,t.getDeclarations());else if(t instanceof tw){let e=t.getChild(0);e instanceof tA&&i("@media "+e.getText(),et.Module,t,e,t.getDeclarations())}return!0})}findDocumentColors(e,t){let i=[];return t.accept(t=>{let r=function(e,t){let i=function(e){if(e.type===n.HexColorValue)return iy(e.getText());if(e.type===n.Function){let t=e.getName(),i=e.getArguments().getChildren();if(1===i.length){let e=i[0].getChildren();if(1===e.length&&e[0].type===n.Expression&&3===(i=e[0].getChildren()).length){let e=i[2];if(e instanceof tO){let t=e.getLeft(),r=e.getRight(),n=e.getOperator();t&&r&&n&&n.matches("/")&&(i=[i[0],i[1],t,r])}}}if(!t||i.length<3||i.length>4)return null;try{let e=4===i.length?id(i[3],1):1;if("rgb"===t||"rgba"===t)return{red:id(i[0],255),green:id(i[1],255),blue:id(i[2],255),alpha:e};if("hsl"===t||"hsla"===t){let t=im(i[0]),r=id(i[1],100),n=id(i[2],100);return ib(t,r,n,e)}if("hwb"===t){let t=im(i[0]),r=id(i[1],100),n=id(i[2],100);return function(e,t,i,r=1){if(t+i>=1){let e=t/(t+i);return{red:e,green:e,blue:e,alpha:r}}let n=ib(e,1,.5,r),s=n.red;s*=1-t-i,s+=t;let a=n.green;a*=1-t-i,a+=t;let o=n.blue;return o*=1-t-i,{red:s,green:a,blue:o+=t,alpha:r}}(t,r,n,e)}}catch(e){}}else if(e.type===n.Identifier){if(e.parent&&e.parent.type!==n.Term)return null;let t=e.parent;if(t&&t.parent&&t.parent.type===n.BinaryExpression){let e=t.parent;if(e.parent&&e.parent.type===n.ListEntry&&e.parent.key===e)return null}let i=e.getText().toLowerCase();if("none"===i)return null;let r=ih[i];if(r)return iy(r)}return null}(e);return i?{color:i,range:ry(e,t)}:null}(t,e);return r&&i.push(r),!0}),i}getColorPresentations(e,t,i,r){let n,s=[],a=Math.round(255*i.red),o=Math.round(255*i.green),l=Math.round(255*i.blue);s.push({label:n=1===i.alpha?`rgb(${a}, ${o}, ${l})`:`rgba(${a}, ${o}, ${l}, ${i.alpha})`,textEdit:P.replace(r,n)}),s.push({label:n=1===i.alpha?`#${rC(a)}${rC(o)}${rC(l)}`:`#${rC(a)}${rC(o)}${rC(l)}${rC(Math.round(255*i.alpha))}`,textEdit:P.replace(r,n)});let h=ix(i);s.push({label:n=1===h.a?`hsl(${h.h}, ${Math.round(100*h.s)}%, ${Math.round(100*h.l)}%)`:`hsla(${h.h}, ${Math.round(100*h.s)}%, ${Math.round(100*h.l)}%, ${h.a})`,textEdit:P.replace(r,n)});let c=function(e){let t=ix(e),i=Math.min(e.red,e.green,e.blue),r=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:i,b:r,a:t.a}}(i);return s.push({label:n=1===c.a?`hwb(${c.h} ${Math.round(100*c.w)}% ${Math.round(100*c.b)}%)`:`hwb(${c.h} ${Math.round(100*c.w)}% ${Math.round(100*c.b)}% / ${c.a})`,textEdit:P.replace(r,n)}),s}prepareRename(e,t,i){let r=this.getHighlightNode(e,t,i);if(r)return p.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,i,r){let n=this.findDocumentHighlights(e,t,r).map(e=>P.replace(e.range,i));return{changes:{[e.uri]:n}}}async resolveModuleReference(e,t,i){if(eH(t,"file://")){let r=function(e){let t=e.indexOf("/");if(-1===t)return"";if("@"===e[0]){let i=e.indexOf("/",t+1);return -1===i?e:e.substring(0,i)}return e.substring(0,t)}(e);if(r&&"."!==r&&".."!==r){let n=i.resolveReference("/",t),s=i0(t),a=await this.resolvePathToModule(r,s,n);if(a)return i1(a,e.substring(r.length+1))}}}async mapReference(e,t){return e}async resolveReference(e,t,i,r=!1,n=this.defaultSettings){if("~"===e[0]&&"/"!==e[1]&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,i),r);let s=await this.mapReference(i.resolveReference(e,t),r);if(this.resolveModuleReferences){if(s&&await this.fileExists(s))return s;let n=await this.mapReference(await this.resolveModuleReference(e,t,i),r);if(n)return n}if(s&&!await this.fileExists(s)){let s=i.resolveReference("/",t);if(n&&s){if(e in n)return this.mapReference(i1(s,n[e]),r);let t=e.indexOf("/"),i=`${e.substring(0,t)}/`;if(i in n){let t=i1(s,n[i].slice(0,-1));return this.mapReference(t=i1(t,e.substring(i.length-1)),r)}}}return s}async resolvePathToModule(e,t,i){let r=i1(t,"node_modules",e,"package.json");return await this.fileExists(r)?i0(r):i&&t.startsWith(i)&&t.length!==i.length?this.resolvePathToModule(e,i0(t),i):void 0}async fileExists(e){if(!this.fileSystemProvider)return!1;try{let t=await this.fileSystemProvider.stat(e);if(t.type===eL.Unknown&&-1===t.size)return!1;return!0}catch(e){return!1}}}function ry(e,t){return p.create(t.positionAt(e.offset),t.positionAt(e.end))}function rb(e,t){let i=t.start.line,r=t.end.line,n=e.start.line,s=e.end.line;return!(i<n)&&!(r<n)&&!(i>s)&&!(r>s)&&(i!==n||!(t.start.character<e.start.character))&&(r!==s||!(t.end.character>e.end.character))}function rx(e){if(e.type===n.Selector||e instanceof e2&&e.parent&&e.parent instanceof tr&&e.isCustomProperty)return Y.Write;if(e.parent)switch(e.parent.type){case n.FunctionDeclaration:case n.MixinDeclaration:case n.Keyframe:case n.VariableDeclaration:case n.FunctionParameter:return Y.Write}return Y.Read}function rC(e){let t=e.toString(16);return 2!==t.length?"0"+t:t}let rk=a.Warning,rv=a.Error,rS=a.Ignore;class rw{constructor(e,t,i){this.id=e,this.message=t,this.defaultValue=i}}class rP{constructor(e,t,i){this.id=e,this.message=t,this.defaultValue=i}}let rE={AllVendorPrefixes:new rw("compatibleVendorPrefixes",t6("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),rS),IncludeStandardPropertyWhenUsingVendorPrefix:new rw("vendorPrefix",t6("When using a vendor-specific prefix also include the standard property"),rk),DuplicateDeclarations:new rw("duplicateProperties",t6("Do not use duplicate style definitions"),rS),EmptyRuleSet:new rw("emptyRules",t6("Do not use empty rulesets"),rk),ImportStatemement:new rw("importStatement",t6("Import statements do not load in parallel"),rS),BewareOfBoxModelSize:new rw("boxModel",t6("Do not use width or height when using padding or border"),rS),UniversalSelector:new rw("universalSelector",t6("The universal selector (*) is known to be slow"),rS),ZeroWithUnit:new rw("zeroUnits",t6("No unit for zero needed"),rS),RequiredPropertiesForFontFace:new rw("fontFaceProperties",t6("@font-face rule must define 'src' and 'font-family' properties"),rk),HexColorLength:new rw("hexColorLength",t6("Hex colors must consist of three, four, six or eight hex numbers"),rv),ArgsInColorFunction:new rw("argumentsInColorFunction",t6("Invalid number of parameters"),rv),UnknownProperty:new rw("unknownProperties",t6("Unknown property."),rk),UnknownAtRules:new rw("unknownAtRules",t6("Unknown at-rule."),rk),IEStarHack:new rw("ieHack",t6("IE hacks are only necessary when supporting IE7 and older"),rS),UnknownVendorSpecificProperty:new rw("unknownVendorSpecificProperties",t6("Unknown vendor specific property."),rS),PropertyIgnoredDueToDisplay:new rw("propertyIgnoredDueToDisplay",t6("Property is ignored due to the display."),rk),AvoidImportant:new rw("important",t6("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),rS),AvoidFloat:new rw("float",t6("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),rS),AvoidIdSelector:new rw("idSelector",t6("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),rS)},rR={ValidProperties:new rP("validProperties",t6("A list of properties that are not validated against the `unknownProperties` rule."),[])};class rI{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){let t=function(e){switch(e){case"ignore":return a.Ignore;case"warning":return a.Warning;case"error":return a.Error}return null}(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}}class rD{constructor(e){this.cssDataManager=e}doCodeActions(e,t,i,r){return this.doCodeActions2(e,t,i,r).map(t=>{let i=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return w.create(t.title,"_css.applyCodeAction",e.uri,e.version,i&&i.edits)})}doCodeActions2(e,t,i,r){let n=[];if(i.diagnostics)for(let t of i.diagnostics)this.appendFixesForMarker(e,r,t,n);return n}getFixesForUnknownProperty(e,t,i,r){let n=t.getName(),s=[];this.cssDataManager.getProperties().forEach(e=>{let t=function(e,t,i=4){let r,n,s=Math.abs(e.length-t.length);if(s>i)return 0;let a=[],o=[];for(r=0;r<t.length+1;++r)o.push(0);for(r=0;r<e.length+1;++r)a.push(o);for(r=1;r<e.length+1;++r)for(n=1;n<t.length+1;++n)e[r-1]===t[n-1]?a[r][n]=a[r-1][n-1]+1:a[r][n]=Math.max(a[r-1][n],a[r][n-1]);return a[e.length][t.length]-Math.sqrt(s)}(n,e.name);t>=n.length/2&&s.push({property:e.name,score:t})}),s.sort((e,t)=>t.score-e.score||e.property.localeCompare(t.property));let a=3;for(let t of s){let n=t.property,s=t6("Rename to '{0}'",n),o=P.replace(i.range,n),l=F.create(e.uri,e.version),h={documentChanges:[D.create(l,[o])]},c=eh.create(s,h,ea.QuickFix);if(c.diagnostics=[i],r.push(c),--a<=0)return}}appendFixesForMarker(e,t,i,r){if(i.code!==rE.UnknownProperty.id)return;let n=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end),a=eZ(t,n);for(let t=a.length-1;t>=0;t--){let o=a[t];if(o instanceof tt){let t=o.getProperty();if(t&&t.offset===n&&t.end===s)return void this.getFixesForUnknownProperty(e,t,i,r)}}}}class rA{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function rT(e,t,i,r){let n=e[t];n.value=i,i&&!iO(n.properties,r)&&n.properties.push(r)}function r$(e,t,i,r){if("top"===t||"right"===t||"bottom"===t||"left"===t)rT(e,t,i,r);else rT(e,"top",i,r),rT(e,"right",i,r),rT(e,"bottom",i,r),rT(e,"left",i,r)}function rM(e,t,i){switch(t.length){case 1:r$(e,void 0,t[0],i);break;case 2:r$(e,"top",t[0],i),r$(e,"bottom",t[0],i),r$(e,"right",t[1],i),r$(e,"left",t[1],i);break;case 3:r$(e,"top",t[0],i),r$(e,"right",t[1],i),r$(e,"left",t[1],i),r$(e,"bottom",t[2],i);break;case 4:r$(e,"top",t[0],i),r$(e,"right",t[1],i),r$(e,"bottom",t[2],i),r$(e,"left",t[3],i)}}function rL(e,t){for(let i of t)if(e.matches(i))return!0;return!1}function rF(e,t=!0){return!(t&&rL(e,["initial","unset"]))&&0!==parseFloat(e.getText())}function rN(e,t=!0){return e.map(e=>rF(e,t))}function rV(e,t=!0){return!(rL(e,["none","hidden"])||t&&rL(e,["initial","unset"]))}class rO{constructor(){this.data={}}add(e,t,i){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),i&&r.nodes.push(i)}}class rU{static entries(e,t,i,r,n){let s=new rU(t,i,r);return e.acceptVisitor(s),s.completeValidations(),s.getEntries(n)}constructor(e,t,i){this.cssDataManager=i,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new rO,this.validProperties={};let r=t.getSetting(rR.ValidProperties);Array.isArray(r)&&r.forEach(e=>{if("string"==typeof e){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 i=[];for(let r of e)r.fullPropertyName===t&&i.push(r);return i}fetchWithValue(e,t,i){let r=[];for(let n of e)if(n.fullPropertyName===t){let e=n.node.getValue();e&&this.findValueInExpression(e,i)&&r.push(n)}return r}findValueInExpression(e,t){let i=!1;return e.accept(e=>(e.type===n.Identifier&&e.matches(t)&&(i=!0),!i)),i}getEntries(e=a.Warning|a.Error){return this.warnings.filter(t=>(t.getLevel()&e)!=0)}addEntry(e,t,i){let r=new t4(e,t,this.settings.getRule(t),i);this.warnings.push(r)}getMissingNames(e,t){let i=e.slice(0);for(let e=0;e<t.length;e++){let r=i.indexOf(t[e]);-1!==r&&(i[r]=null)}let r=null;for(let e=0;e<i.length;e++){let t=i[e];t&&(r=null===r?t6("'{0}'",t):t6("{0}, '{1}'",r,t))}return r}visitNode(e){switch(e.type){case n.UnknownAtRule:return this.visitUnknownAtRule(e);case n.Keyframe:return this.visitKeyframe(e);case n.FontFace:return this.visitFontFace(e);case n.Ruleset:return this.visitRuleSet(e);case n.SimpleSelector:return this.visitSimpleSelector(e);case n.Function:return this.visitFunction(e);case n.NumericValue:return this.visitNumericValue(e);case n.Import:return this.visitImport(e);case n.HexColorValue:return this.visitHexColorValue(e);case n.Prio:return this.visitPrio(e);case n.IdentifierSelector:return this.visitIdentifierSelector(e)}return!0}completeValidations(){this.validateKeyframes()}visitUnknownAtRule(e){let t=e.getChild(0);return!(!t||this.cssDataManager.getAtDirective(t.getText()))&&(this.addEntry(t,rE.UnknownAtRules,`Unknown at rule ${t.getText()}`),!0)}visitKeyframe(e){let t=e.getKeyword();if(!t)return!1;let i=t.getText();return this.keyframes.add(e.getName(),i,"@keyframes"!==i?t:null),!0}validateKeyframes(){let e=["@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"];for(let t in this.keyframes.data){let i=this.keyframes.data[t].names,r=-1===i.indexOf("@keyframes");if(!r&&1===i.length)continue;let n=this.getMissingNames(e,i);if(n||r)for(let e of this.keyframes.data[t].nodes){if(r){let t=t6("Always define standard rule '@keyframes' when defining keyframes.");this.addEntry(e,rE.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(n){let t=t6("Always include all vendor specific rules: Missing: {0}",n);this.addEntry(e,rE.AllVendorPrefixes,t)}}}return!0}visitSimpleSelector(e){let t=this.documentText.charAt(e.offset);return 1===e.length&&"*"===t&&this.addEntry(e,rE.UniversalSelector),!0}visitIdentifierSelector(e){return this.addEntry(e,rE.AvoidIdSelector),!0}visitImport(e){return this.addEntry(e,rE.ImportStatemement),!0}visitRuleSet(e){let t=e.getDeclarations();if(!t)return!1;t.hasChildren()||this.addEntry(e.getSelectors(),rE.EmptyRuleSet);let i=[];for(let e of t.getChildren())e instanceof tt&&i.push(new rA(e));let r=function(e){let t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(let i of e){let e=i.node.value;if(void 0!==e)switch(i.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=i;break;case"height":t.height=i;break;default:let r=i.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:r$(t,r[1],function(e){let t=e.getChildren();if(1===t.length){let e=t[0];return rF(e)&&rV(e)}for(let e of t)if(!rF(e,!1)||!rV(e,!1))return!1;return!0}(e),i);break;case"width":r$(t,r[1],rF(e,!1),i);break;case"style":r$(t,r[1],rV(e,!0),i)}break;case"width":rM(t,rN(e.getChildren(),!1),i);break;case"style":rM(t,function(e,t=!0){return e.map(e=>rV(e,t))}(e.getChildren(),!0),i)}break;case"padding":1===r.length?rM(t,rN(e.getChildren(),!0),i):r$(t,r[1],rF(e,!0),i)}}}return t}(i);if(r.width){let e=[];if(r.right.value&&(e=iU(e,r.right.properties)),r.left.value&&(e=iU(e,r.left.properties)),0!==e.length){for(let t of e)this.addEntry(t.node,rE.BewareOfBoxModelSize);this.addEntry(r.width.node,rE.BewareOfBoxModelSize)}}if(r.height){let e=[];if(r.top.value&&(e=iU(e,r.top.properties)),r.bottom.value&&(e=iU(e,r.bottom.properties)),0!==e.length){for(let t of e)this.addEntry(t.node,rE.BewareOfBoxModelSize);this.addEntry(r.height.node,rE.BewareOfBoxModelSize)}}let n=this.fetchWithValue(i,"display","inline-block");if(n.length>0){let e=this.fetch(i,"float");for(let t=0;t<e.length;t++){let i=e[t].node,r=i.getValue();r&&!r.matches("none")&&this.addEntry(i,rE.PropertyIgnoredDueToDisplay,t6("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((n=this.fetchWithValue(i,"display","block")).length>0){let e=this.fetch(i,"vertical-align");for(let t=0;t<e.length;t++)this.addEntry(e[t].node,rE.PropertyIgnoredDueToDisplay,t6("Property is ignored due to the display. With 'display: block', vertical-align should not be used."))}let s=this.fetch(i,"float");for(let e=0;e<s.length;e++){let t=s[e];this.isValidPropertyDeclaration(t)||this.addEntry(t.node,rE.AvoidFloat)}for(let e=0;e<i.length;e++){let t=i[e];if("background"!==t.fullPropertyName&&!this.validProperties[t.fullPropertyName]){let e=t.node.getValue();if(e&&"-"!==this.documentText.charAt(e.offset)){let e=this.fetch(i,t.fullPropertyName);if(e.length>1)for(let i=0;i<e.length;i++){let r=e[i].node.getValue();r&&"-"!==this.documentText.charAt(r.offset)&&e[i]!==t&&this.addEntry(t.node,rE.DuplicateDeclarations)}}}}if(!e.getSelectors().matches(":export")){let t=new rO,r=!1;for(let e of i){let i=e.node;if(this.isCSSDeclaration(i)){let r=e.fullPropertyName,n=r.charAt(0);if("-"===n){if("-"!==r.charAt(1)){this.cssDataManager.isKnownProperty(r)||this.validProperties[r]||this.addEntry(i.getProperty(),rE.UnknownVendorSpecificProperty);let e=i.getNonPrefixedPropertyName();t.add(e,r,i.getProperty())}}else{let e=r;("*"===n||"_"===n)&&(this.addEntry(i.getProperty(),rE.IEStarHack),r=r.substr(1)),this.cssDataManager.isKnownProperty(e)||this.cssDataManager.isKnownProperty(r)||this.validProperties[r]||this.addEntry(i.getProperty(),rE.UnknownProperty,t6("Unknown property: '{0}'",i.getFullPropertyName())),t.add(r,r,null)}}else r=!0}if(!r)for(let i in t.data){let r=t.data[i],n=r.names,s=this.cssDataManager.isStandardProperty(i)&&-1===n.indexOf(i);if(!s&&1===n.length)continue;let a=new Set(s?r.nodes:[]);if(s){let t=this.getContextualVendorSpecificPseudoElements(e);for(let e of r.nodes){let r=e.getName(),n=r.substring(0,r.length-i.length);t.some(e=>e.startsWith(n))&&a.delete(e)}}let o=[];for(let e=0,t=rU.prefixes.length;e<t;e++){let t=rU.prefixes[e];this.cssDataManager.isStandardProperty(t+i)&&o.push(t+i)}let l=this.getMissingNames(o,n);if(l||s)for(let e of r.nodes){if(s&&a.has(e)){let t=t6("Also define the standard property '{0}' for compatibility",i);this.addEntry(e,rE.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(l){let t=t6("Always include all vendor specific properties: Missing: {0}",l);this.addEntry(e,rE.AllVendorPrefixes,t)}}}}return!0}getContextualVendorSpecificPseudoElements(e){let t=new Set;return!function e(t,i){if(i.type===n.Ruleset)for(let e of i.getSelectors().getChildren())!function e(t,i){for(let r of i.getChildren()){if(r.type===n.PseudoSelector){let e=r.getChildren()[0]?.getText();e&&t.add(e)}e(t,r)}}(t,e);return i.parent?e(t,i.parent):void 0}(t,e),Array.from(t)}visitPrio(e){return this.addEntry(e,rE.AvoidImportant),!0}visitNumericValue(e){let t=e.findParent(n.Function);if(t&&"calc"===t.getName())return!0;let i=e.findParent(n.Declaration);if(i&&i.getValue()){let t=e.getValue();if(!t.unit||-1===iT.length.indexOf(t.unit.toLowerCase()))return!0;0===parseFloat(t.value)&&t.unit&&!this.validProperties[i.getFullPropertyName()]&&this.addEntry(e,rE.ZeroWithUnit)}return!0}visitFontFace(e){let t=e.getDeclarations();if(!t)return!1;let i=!1,r=!1,n=!1;for(let e of t.getChildren())if(this.isCSSDeclaration(e)){let t=e.getProperty().getName().toLowerCase();"src"===t&&(i=!0),"font-family"===t&&(r=!0)}else n=!0;return n||i&&r||this.addEntry(e,rE.RequiredPropertiesForFontFace),!0}isCSSDeclaration(e){if(e instanceof tt){if(!e.getValue())return!1;let t=e.getProperty();if(!t)return!1;let i=t.getIdentifier();return!(!i||i.containsInterpolation())}return!1}visitHexColorValue(e){let t=e.length;return 9!==t&&7!==t&&5!==t&&4!==t&&this.addEntry(e,rE.HexColorLength),!1}visitFunction(e){let t=e.getName().toLowerCase(),i=-1,r=0;switch(t){case"rgb(":case"hsl(":i=3;break;case"rgba(":case"hsla(":i=4}return -1!==i&&(e.getArguments().accept(e=>!(e instanceof tO)||(r+=1,!1)),r!==i&&this.addEntry(e,rE.ArgsInColorFunction)),!0}}rU.prefixes=["-ms-","-moz-","-o-","-webkit-"];class rB{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,i=this.settings){if(i&&!1===i.validate)return[];let r=[];r.push.apply(r,t3.entries(t)),r.push.apply(r,rU.entries(t,e,new rI(i&&i.lint),this.cssDataManager));let n=[];for(let e in rE)n.push(rE[e].id);return r.filter(e=>e.getLevel()!==a.Ignore).map(function(t){let i=p.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()===a.Warning?C.Warning:C.Error,range:i}})}}let rW=r.CustomToken,rK=rW++,rz=rW++;rW++;let rj=rW++,rq=rW++,rH=rW++,rQ=rW++,rG=rW++;rW++;class rJ extends eq{scanNext(e){if(this.stream.advanceIfChar(36)){let t=["$"];if(this.ident(t))return this.finishToken(e,rK,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([35,123])?this.finishToken(e,rz):this.stream.advanceIfChars([61,61])?this.finishToken(e,rj):this.stream.advanceIfChars([33,61])?this.finishToken(e,rq):this.stream.advanceIfChar(60)?this.stream.advanceIfChar(61)?this.finishToken(e,rQ):this.finishToken(e,r.Delim):this.stream.advanceIfChar(62)?this.stream.advanceIfChar(61)?this.finishToken(e,rH):this.finishToken(e,r.Delim):this.stream.advanceIfChars([46,46,46])?this.finishToken(e,rG):super.scanNext(e)}comment(){return!!super.comment()||!!(!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)}}class rX{constructor(e,t){this.id=e,this.message=t}}let rZ={FromExpected:new rX("scss-fromexpected",t6("'from' expected")),ThroughOrToExpected:new rX("scss-throughexpected",t6("'through' or 'to' expected")),InExpected:new rX("scss-fromexpected",t6("'in' expected"))};class rY extends iV{constructor(){super(new rJ)}_parseStylesheetStatement(e=!1){return this.peek(r.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(tb);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,t9.URIOrStringExpected);for(;this.accept(r.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,t9.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(rK))return null;let t=this.create(tj);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(r.Colon))return this.finish(t,t9.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,t9.VariableValueExpected,[],e);for(;this.peek(r.Exclamation);)if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(r.Ident,/^(default|global)$/))return this.finish(t,t9.UnknownKeyword);this.consumeToken()}return this.peek(r.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(rQ)||this.accept(rH)||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(rK))return null;let e=this.create(tH);return this.consumeToken(),e}_parseModuleMember(){let e=this.mark(),t=this.create(t5);return t.setIdentifier(this._parseIdent([s.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,t9.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(r.Ident)&&!this.peek(rz)&&!this.peekDelim("-"))return null;let t=this.create(e2);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(r.Ident,/^--/);let i=!1,n=()=>{let e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(r.Ident)||t.addChild(n())||i&&this.acceptRegexp(/^[\w-]/))&&(i=!0,!this.hasWhitespace()););return i?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(rz)){let e=this.create(tq);return(this.consumeToken(),e.addChild(this._parseExpr())||this._parseNestingSelector())?this.accept(r.CurlyR)?this.finish(e):this.finish(e,t9.RightCurlyExpected):this.accept(r.CurlyR)?this.finish(e):this.finish(e,t9.ExpressionExpected)}return null}_parseOperator(){if(this.peek(rj)||this.peek(rq)||this.peek(rH)||this.peek(rQ)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){let e=this.createNode(n.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){let e=this.create(eY);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(r.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 i=this.create(tt);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(r.Colon))return this.finish(i,t9.ColonExpected,[r.Colon],e||[r.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);let n=!1;if(i.setValue(this._parseExpr())&&(n=!0,i.addChild(this._parsePrio())),this.peek(r.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!n)return this.finish(i,t9.PropertyValueExpected);return this.peek(r.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)}_parseNestedProperties(){let e=this.create(tg);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){let e=this.create(tQ);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,t9.SelectorExpected);for(;this.accept(r.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(r.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,t9.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(n.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(r.Num)||this.accept(r.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){let e=this.createNode(n.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){let e=this.createNode(n.SelectorPlaceholder);if(this.consumeToken(),this.accept(r.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,t9.IdentifierExpected);if(!this.accept(r.Colon))return this.finish(e,t9.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,t9.IdentifierExpected);if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[r.CurlyR])}return this.finish(e)}return null}_parseElementName(){let e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(r.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(n.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(r.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(tl);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,t9.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(r.CurlyL)){let i=this.create(tp);this._parseBody(i,e),t.setElseClause(i)}}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;let t=this.create(th);return(this.consumeToken(),t.setVariable(this._parseVariable()))?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,t9.ExpressionExpected,[r.CurlyR]):this.finish(t,rZ.ThroughOrToExpected,[r.CurlyR]):this.finish(t,t9.ExpressionExpected,[r.CurlyR]):this.finish(t,rZ.FromExpected,[r.CurlyR]):this.finish(t,t9.VariableNameExpected,[r.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;let t=this.create(tc);this.consumeToken();let i=t.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(t,t9.VariableNameExpected,[r.CurlyR]);for(;this.accept(r.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(t,t9.VariableNameExpected,[r.CurlyR]);return(this.finish(i),this.acceptIdent("in"))?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,t9.ExpressionExpected,[r.CurlyR]):this.finish(t,rZ.InExpected,[r.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;let t=this.create(tu);return(this.consumeToken(),t.addChild(this._parseBinaryExpr()))?this._parseBody(t,e):this.finish(t,t9.ExpressionExpected,[r.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(td);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([s.Function])))return this.finish(e,t9.IdentifierExpected,[r.CurlyR]);if(!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected,[r.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,t9.VariableNameExpected)}return this.accept(r.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,t9.RightParenthesisExpected,[r.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;let e=this.createNode(n.ReturnStatement);return(this.consumeToken(),e.addChild(this._parseExpr()))?this.finish(e):this.finish(e,t9.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;let e=this.create(tZ);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([s.Mixin])))return this.finish(e,t9.IdentifierExpected,[r.CurlyR]);if(this.accept(r.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,t9.VariableNameExpected)}if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[r.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){let e=this.create(ta);return e.setIdentifier(this._parseVariable())?(this.accept(rG),this.accept(r.Colon)&&!e.setDefaultValue(this._parseExpr(!0)))?this.finish(e,t9.VariableValueExpected,[],[r.Comma,r.ParenthesisR]):this.finish(e):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;let e=this.create(tG);if(this.consumeToken(),this.accept(r.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,t9.ExpressionExpected)}if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;let e=this.create(tX);this.consumeToken();let t=this._parseIdent([s.Mixin]);if(!e.setIdentifier(t))return this.finish(e,t9.IdentifierExpected,[r.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){let i=this._parseIdent([s.Mixin]);if(!i)return this.finish(e,t9.IdentifierExpected,[r.CurlyR]);let n=this.create(t5);t.referenceTypes=[s.Module],n.setIdentifier(t),e.setIdentifier(i),e.addChild(n)}if(this.accept(r.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,t9.ExpressionExpected)}if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(r.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){let e=this.create(tJ);if(this.acceptIdent("using")){if(!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected,[r.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,t9.VariableNameExpected)}if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[r.CurlyL])}return this.peek(r.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){let e=this.create(to),t=this.mark(),i=this._parseVariable();if(i)if(this.accept(r.Colon))e.setIdentifier(i);else{if(this.accept(rG))return e.setValue(i),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(rG),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(r.ParenthesisR)){this.restoreAtMark(e);let t=this.create(eY);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(r.ParenthesisL))return null;let e=this.create(eY);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(r.Comma);return this.accept(r.ParenthesisR)?this.finish(e):this.finish(e,t9.RightParenthesisExpected)}_parseListElement(){let e=this.create(t0),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(r.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,t9.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;let e=this.create(tx);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,t9.StringLiteralExpected);if(!this.peek(r.SemiColon)&&!this.peek(r.EOF)){if(!this.peekRegExp(r.Ident,/as|with/))return this.finish(e,t9.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([s.Module]))&&!this.acceptDelim("*"))return this.finish(e,t9.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected,[r.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,t9.VariableNameExpected);for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,t9.VariableNameExpected);if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected)}}return this.accept(r.SemiColon)||this.accept(r.EOF)?this.finish(e):this.finish(e,t9.SemiColonExpected)}_parseModuleConfigDeclaration(){let e=this.create(tC);return e.setIdentifier(this._parseVariable())?this.accept(r.Colon)&&e.setValue(this._parseExpr(!0))?this.accept(r.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,t9.UnknownKeyword):this.finish(e):this.finish(e,t9.VariableValueExpected,[],[r.Comma,r.ParenthesisR]):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;let e=this.create(tk);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,t9.StringLiteralExpected);if(this.acceptIdent("as")){let t=this._parseIdent([s.Forward]);if(!e.setIdentifier(t))return this.finish(e,t9.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,t9.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected,[r.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,t9.VariableNameExpected);for(;this.accept(r.Comma)&&!this.peek(r.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,t9.VariableNameExpected);if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,t9.IdentifierOrVariableExpected);return this.accept(r.SemiColon)||this.accept(r.EOF)?this.finish(e):this.finish(e,t9.SemiColonExpected)}_parseForwardVisibility(){let e=this.create(tv);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(r.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}let r0=t6("Sass documentation");class r1 extends i9{constructor(e,t){super("$",e,t),r2(r1.scssModuleLoaders),r2(r1.scssModuleBuiltIns)}isImportPathParent(e){return e===n.Forward||e===n.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,t){let i=e.getParent().type;if(i===n.Forward||i===n.Use)for(let i of r1.scssModuleBuiltIns){let r={label:i.label,documentation:i.documentation,textEdit:P.replace(this.getCompletionRange(e),`'${i.label}'`),kind:B.Module};t.items.push(r)}return super.getCompletionForImportPath(e,t)}createReplaceFunction(){let e=1;return(t,i)=>"\\"+i+": ${"+e+++":"+(r1.variableDefaults[i]||"")+"}"}createFunctionProposals(e,t,i,r){for(let n of e){let e=n.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),s={label:n.func.substr(0,n.func.indexOf("(")),detail:n.func,documentation:n.desc,textEdit:P.replace(this.getCompletionRange(t),e),insertTextFormat:W.Snippet,kind:B.Function};i&&(s.sortText="z"),r.items.push(s)}return r}getCompletionsForSelector(e,t,i){return this.createFunctionProposals(r1.selectorFuncs,null,!0,i),super.getCompletionsForSelector(e,t,i)}getTermProposals(e,t,i){let r=r1.builtInFuncs;return e&&(r=r.filter(t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type))),this.createFunctionProposals(r,t,!0,i),super.getTermProposals(e,t,i)}getColorProposals(e,t,i){return this.createFunctionProposals(r1.colorProposals,t,!1,i),super.getColorProposals(e,t,i)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,i){for(let e of this.getSymbolContext().findSymbolsAtOffset(this.offset,s.Rule)){let r={label:e.name,textEdit:P.replace(this.getCompletionRange(t),e.name),kind:B.Function};i.items.push(r)}return i}getCompletionForAtDirectives(e){return e.items.push(...r1.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...r1.scssModuleLoaders),e}}function r2(e){e.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){let t="string"==typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | "),e.documentation=t}})}r1.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"},r1.colorProposals=[{func:"red($color)",desc:t6("Gets the red component of a color.")},{func:"green($color)",desc:t6("Gets the green component of a color.")},{func:"blue($color)",desc:t6("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:t6("Mixes two colors together.")},{func:"hue($color)",desc:t6("Gets the hue component of a color.")},{func:"saturation($color)",desc:t6("Gets the saturation component of a color.")},{func:"lightness($color)",desc:t6("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:t6("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:t6("Makes a color lighter.")},{func:"darken($color, $amount)",desc:t6("Makes a color darker.")},{func:"saturate($color, $amount)",desc:t6("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:t6("Makes a color less saturated.")},{func:"grayscale($color)",desc:t6("Converts a color to grayscale.")},{func:"complement($color)",desc:t6("Returns the complement of a color.")},{func:"invert($color)",desc:t6("Returns the inverse of a color.")},{func:"alpha($color)",desc:t6("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:t6("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:t6("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:t6("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:t6("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:t6("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:t6("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:t6("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:t6("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:t6("Converts a color into the format understood by IE filters.")}],r1.selectorFuncs=[{func:"selector-nest($selectors…)",desc:t6("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:t6("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:t6("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:t6("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:t6("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:t6("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:t6("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:t6("Parses a selector into the format returned by &.")}],r1.builtInFuncs=[{func:"unquote($string)",desc:t6("Removes quotes from a string.")},{func:"quote($string)",desc:t6("Adds quotes to a string.")},{func:"str-length($string)",desc:t6("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:t6("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:t6("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:t6("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:t6("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:t6("Converts a string to lower case.")},{func:"percentage($number)",desc:t6("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:t6("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:t6("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:t6("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:t6("Returns the absolute value of a number.")},{func:"min($numbers)",desc:t6("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:t6("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:t6("Returns a random number.")},{func:"length($list)",desc:t6("Returns the length of a list.")},{func:"nth($list, $n)",desc:t6("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:t6("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:t6("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:t6("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:t6("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:t6("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:t6("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:t6("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:t6("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:t6("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:t6("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:t6("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:t6("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:t6("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:t6("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:t6("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:t6("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:t6("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:t6("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:t6("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:t6("Returns the type of a value.")},{func:"unit($number)",desc:t6("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:t6("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:t6("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:t6("Dynamically calls a Sass function.")}],r1.scssAtDirectives=[{label:"@extend",documentation:t6("Inherits the styles of another selector."),kind:B.Keyword},{label:"@at-root",documentation:t6("Causes one or more rules to be emitted at the root of the document."),kind:B.Keyword},{label:"@debug",documentation:t6("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:B.Keyword},{label:"@warn",documentation:t6("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:B.Keyword},{label:"@error",documentation:t6("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:B.Keyword},{label:"@if",documentation:t6("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n $0\n}",insertTextFormat:W.Snippet,kind:B.Keyword},{label:"@for",documentation:t6("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:W.Snippet,kind:B.Keyword},{label:"@each",documentation:t6("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:W.Snippet,kind:B.Keyword},{label:"@while",documentation:t6("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:"@while ${1:condition} {\n $0\n}",insertTextFormat:W.Snippet,kind:B.Keyword},{label:"@mixin",documentation:t6("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n $0\n}",insertTextFormat:W.Snippet,kind:B.Keyword},{label:"@include",documentation:t6("Includes the styles defined by another mixin into the current rule."),kind:B.Keyword},{label:"@function",documentation:t6("Defines complex operations that can be re-used throughout stylesheets."),kind:B.Keyword}],r1.scssModuleLoaders=[{label:"@use",documentation:t6("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:r0,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:W.Snippet,kind:B.Keyword},{label:"@forward",documentation:t6("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:r0,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:W.Snippet,kind:B.Keyword}],r1.scssModuleBuiltIns=[{label:"sass:math",documentation:t6("Provides functions that operate on numbers."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:t6("Makes it easy to combine, search, or split apart strings."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:t6("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:t6("Lets you access and modify values in lists."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:t6("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:t6("Provides access to Sass’s powerful selector engine."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:t6("Exposes the details of Sass’s inner workings."),references:[{name:r0,url:"https://sass-lang.com/documentation/modules/meta"}]}];let r5=r.CustomToken,r4=r5++;class r3 extends eq{scanNext(e){let t=this.escapedJavaScript();return null!==t?this.finishToken(e,t):this.stream.advanceIfChars([46,46,46])?this.finishToken(e,r4):super.scanNext(e)}comment(){return!!super.comment()||!!(!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)}escapedJavaScript(){return 96===this.stream.peekChar()?(this.stream.advance(1),this.stream.advanceWhileChar(e=>96!==e),this.stream.advanceIfChar(96)?r.EscapedJavaScript:r.BadEscapedJavaScript):null}}class r6 extends iV{constructor(){super(new r3)}_parseStylesheetStatement(e=!1){return this.peek(r.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;let e=this.create(tb);if(this.consumeToken(),this.accept(r.ParenthesisL)){if(!this.accept(r.Ident))return this.finish(e,t9.IdentifierExpected,[r.SemiColon]);do if(!this.accept(r.Comma))break;while(this.accept(r.Ident));if(!this.accept(r.ParenthesisR))return this.finish(e,t9.RightParenthesisExpected,[r.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(r.SemiColon)||this.peek(r.EOF)||e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e)):this.finish(e,t9.URIOrStringExpected,[r.SemiColon])}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;let e=this.createNode(n.Plugin);return(this.consumeToken(),e.addChild(this._parseStringLiteral()))?this.accept(r.SemiColon)?this.finish(e):this.finish(e,t9.SemiColonExpected):this.finish(e,t9.StringLiteralExpected)}_parseMediaQuery(){let e=super._parseMediaQuery();if(!e){let e=this.create(tT);return e.addChild(this._parseVariable())?this.finish(e):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){let t=this.create(tj),i=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(r.Colon))return this.restoreAtMark(i),null;if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,t9.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(r.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),!(!this.hasWhitespace()&&this.accept(r.ParenthesisL)))return this.restoreAtMark(e),null;{let t=this.create(tZ);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(r.Comma)||this.accept(r.SemiColon))&&!this.peek(r.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,t9.IdentifierExpected,[],[r.ParenthesisR]);if(!this.accept(r.ParenthesisR))return this.restoreAtMark(e),null}}if(!this.peek(r.CurlyL))return null;let t=this.create(e3);return this._parseBody(t,this._parseDetachedRuleSetBody.bind(this)),this.finish(t)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let t=!1;for(;this.peek(r.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){let e=this.create(eY),t=this.mark();return this.accept(r.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(r.BracketR)||this.accept(r.BracketR))?e:(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){let i=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(r.AtKeyword))return null;let n=this.create(tH),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(r.AtKeyword)&&!this.accept(r.Ident)||!t&&this.peek(r.BracketL)&&!this._addLookupChildren(n)?(this.restoreAtMark(s),null):n}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(r.EscapedJavaScript)||this.peek(r.BadEscapedJavaScript)){let e=this.createNode(n.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){let e=this.createNode(n.EscapedValue);return(this.consumeToken(),this.accept(r.String)||this.accept(r.EscapedJavaScript))?this.finish(e):this.finish(e,t9.TermExpected)}return null}_parseOperator(){let e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){let e=this.createNode(n.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){let e=this.createNode(n.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){let e=this.createNode(n.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(r.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([s.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){let t=this.create(e7),i=!1;for(e&&(i=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){i=!0;let e=this.mark();if(t.addChild(this._parseGuard())&&this.peek(r.CurlyL))break;this.restoreAtMark(e),t.addChild(this._parseCombinator())}return i?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){let e=this.createNode(n.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(r.Num)||this.accept(r.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;let e=this.createNode(n.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){let t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;let i=this.mark(),r=this.create(e2);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");return(e?r.isCustomProperty?r.addChild(this._parseIdent()):r.addChild(this._parseRegexp(t)):r.isCustomProperty?this._acceptInterpolatedIdent(r):this._acceptInterpolatedIdent(r,t))?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(i),null)}peekInterpolatedIdent(){return this.peek(r.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let i=!1,n=()=>{let e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()},s=t?()=>this.acceptRegexp(t):()=>this.accept(r.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(n)))&&(i=!0,!this.hasWhitespace()););return i}_parseInterpolation(){let e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){let t=this.createNode(n.Interpolation);return(this.consumeToken(),this.hasWhitespace()||!this.accept(r.CurlyL))?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(r.CurlyR)?this.finish(t):this.finish(t,t9.RightCurlyExpected):this.finish(t,t9.IdentifierExpected)}return null}_tryParseMixinDeclaration(){let e=this.mark(),t=this.create(tZ);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(r.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(r.Comma)||this.accept(r.SemiColon))&&!this.peek(r.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,t9.IdentifierExpected,[],[r.ParenthesisR]);return this.accept(r.ParenthesisR)&&(t.setGuard(this._parseGuard()),this.peek(r.CurlyL))?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(e2),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(r.Hash))return null;e=this.create(e2),this.consumeToken()}return e.referenceTypes=[s.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(r.Colon))return null;let e=this.mark(),t=this.create(tQ);return(this.consumeToken(),this.acceptIdent("extend"))?this._completeExtends(t):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;let e=this.mark(),t=this.create(tQ);return(this.consumeToken(),!this.hasWhitespace()&&this.accept(r.Colon)&&this.acceptIdent("extend"))?this._completeExtends(t):(this.restoreAtMark(e),null)}_completeExtends(e){if(!this.accept(r.ParenthesisL))return this.finish(e,t9.LeftParenthesisExpected);let t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,t9.SelectorExpected);for(;this.accept(r.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,t9.SelectorExpected);return this.accept(r.ParenthesisR)?this.finish(e):this.finish(e,t9.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(r.AtKeyword))return null;let e=this.mark(),t=this.create(tX);return t.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(r.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(r.ParenthesisR)?this.finish(t):this.finish(t,t9.RightParenthesisExpected)}_tryParseMixinReference(e=!0){let t=this.mark(),i=this.create(tX),n=this._parseMixinDeclarationIdentifier();for(;n;){this.acceptDelim(">");let e=this._parseMixinDeclarationIdentifier();if(e)i.getNamespaces().addChild(n),n=e;else break}if(!i.setIdentifier(n))return this.restoreAtMark(t),null;let a=!1;if(this.accept(r.ParenthesisL)){if(a=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(r.Comma)||this.accept(r.SemiColon))&&!this.peek(r.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,t9.ExpressionExpected)}if(!this.accept(r.ParenthesisR))return this.finish(i,t9.RightParenthesisExpected);n.referenceTypes=[s.Mixin]}else n.referenceTypes=[s.Mixin,s.Rule];return(this.peek(r.BracketL)?e||this._addLookupChildren(i):i.addChild(this._parsePrio()),a||this.peek(r.SemiColon)||this.peek(r.CurlyR)||this.peek(r.EOF))?this.finish(i):(this.restoreAtMark(t),null)}_parseMixinArgument(){let e=this.create(to),t=this.mark(),i=this._parseVariable();return(i&&(this.accept(r.Colon)?e.setIdentifier(i):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0)))?this.finish(e):(this.restoreAtMark(t),null)}_parseMixinParameter(){let e=this.create(ta);if(this.peekKeyword("@rest")){let t=this.create(eY);return(this.consumeToken(),this.accept(r4))?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,t9.DotExpected,[],[r.Comma,r.ParenthesisR])}if(this.peek(r4)){let t=this.create(eY);return this.consumeToken(),e.setIdentifier(this.finish(t)),this.finish(e)}let t=!1;return(e.setIdentifier(this._parseVariable())&&(this.accept(r.Colon),t=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||t)?this.finish(e):null}_parseGuard(){if(!this.peekIdent("when"))return null;let e=this.create(t1);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,t9.ConditionExpected);for(;this.acceptIdent("and")||this.accept(r.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,t9.ConditionExpected);return this.finish(e)}_parseGuardCondition(){let e=this.create(t2);return(e.isNegated=this.acceptIdent("not"),this.accept(r.ParenthesisL))?(!e.addChild(this._parseExpr()),this.accept(r.ParenthesisR))?this.finish(e):this.finish(e,t9.RightParenthesisExpected):e.isNegated?this.finish(e,t9.LeftParenthesisExpected):null}_parseFunction(){let e=this.mark(),t=this.create(ts);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(r.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(r.Comma)||this.accept(r.SemiColon))&&!this.peek(r.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,t9.ExpressionExpected)}return this.accept(r.ParenthesisR)?this.finish(t):this.finish(t,t9.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){let e=this.create(e2);return e.referenceTypes=[s.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){let e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(r.ParenthesisR)){this.restoreAtMark(e);let t=this.create(eY);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}}class r7 extends i9{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,i,r){for(let n of e){let e={label:n.name,detail:n.example,documentation:n.description,textEdit:P.replace(this.getCompletionRange(t),n.name+"($0)"),insertTextFormat:W.Snippet,kind:B.Function};i&&(e.sortText="z"),r.items.push(e)}return r}getTermProposals(e,t,i){let r=r7.builtInProposals;return e&&(r=r.filter(t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type))),this.createFunctionProposals(r,t,!0,i),super.getTermProposals(e,t,i)}getColorProposals(e,t,i){return this.createFunctionProposals(r7.colorProposals,t,!1,i),super.getColorProposals(e,t,i)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}}function r8(e,t){return function(e,t){let i=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((e,t)=>{let i=e.startLine-t.startLine;return 0===i&&(i=e.endLine-t.endLine),i}),n=[],s=-1;return(r.forEach(e=>{e.startLine<s&&s<e.endLine||(n.push(e),s=e.endLine)}),n.length<i)?n:n.slice(0,i)}(function(e){function t(t){return e.positionAt(t.offset).line}function i(t){return e.positionAt(t.offset+t.len).line}let n=[],s=[],a=function(){switch(e.languageId){case"scss":return new rJ;case"less":return new r3;default:return new eq}}();a.ignoreComment=!1,a.setSource(e.getText());let o=a.scan(),l=null;for(;o.type!==r.EOF;){switch(o.type){case r.CurlyL:case rz:s.push({line:t(o),type:"brace",isStart:!0});break;case r.CurlyR:if(0!==s.length){let e=r9(s,"brace");if(!e)break;let t=i(o);"brace"===e.type&&(l&&i(l)!==t&&t--,e.line!==t&&n.push({startLine:e.line,endLine:t,kind:void 0}))}break;case r.Comment:{let r=e=>"#region"===e?{line:t(o),type:"comment",isStart:!0}:{line:i(o),type:"comment",isStart:!1},a=(t=>{let i=t.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(i)return r(i[1]);if("scss"===e.languageId||"less"===e.languageId){let e=t.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(e)return r(e[1])}return null})(o);if(a)if(a.isStart)s.push(a);else{let e=r9(s,"comment");if(!e)break;"comment"===e.type&&e.line!==a.line&&n.push({startLine:e.line,endLine:a.line,kind:"region"})}else{let e=function(e,r){let n=t(e),s=i(e);return n!==s?{startLine:n,endLine:s,kind:r}:null}(o,"comment");e&&n.push(e)}}}l=o,o=a.scan()}return n}(e),t)}function r9(e,t){if(0===e.length)return null;for(let i=e.length-1;i>=0;i--)if(e[i].type===t&&e[i].isStart)return e.splice(i,1)[0];return null}r7.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:t6("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:t6('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:t6("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:t6("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:t6("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:t6("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:t6("URL encodes a string")},{name:"e",example:"e(@string);",description:t6("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:t6("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:t6("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:t6("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:t6("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:t6("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:t6("absolute value of a number"),example:"abs(number);"},{name:"acos",description:t6("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:t6("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:t6("rounds up to an integer")},{name:"cos",description:t6("cosine function"),example:"cos(number);"},{name:"floor",description:t6("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:t6("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:t6("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:t6("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:t6("sine function"),example:"sin(number);"},{name:"tan",description:t6("tangent function"),example:"tan(number);"},{name:"atan",description:t6("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:t6("returns pi"),example:"pi();"},{name:"pow",description:t6("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:t6("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:t6("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:t6("returns the lowest of one or more values"),example:"max(@x, @y);"}],r7.colorProposals=[{name:"argb",example:"argb(@color);",description:t6("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:t6("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:t6("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:t6("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:t6("creates a color")},{name:"hue",example:"hue(@color);",description:t6("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:t6("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:t6("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:t6("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:t6("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:t6("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:t6("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:t6("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:t6("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:t6("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:t6("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:t6("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:t6("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:t6("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:t6("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:t6("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:t6("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:t6("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:t6("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:t6("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:t6("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:t6("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],!function(){var e=[,,function(e){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function i(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function r(e,r){this.__indent_cache=new i(e,r),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count)+this.__items.join(""),e},i.prototype.get_indent_size=function(e,t){var i=this.__base_string_length;return t=t||0,e<0&&(i=0),i+=e*this.__indent_size,i+=t},i.prototype.get_indent_string=function(e,t){var i=this.__base_string;return e<0&&(e=0,i=""),t=(t||0)+e*this.__indent_size,this.__ensure_cache(t),i+=this.__cache[t]},i.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var e=this.__cache.length,t=0,i="";this.__indent_size&&e>=this.__indent_size&&(t=Math.floor(e/this.__indent_size),e-=t*this.__indent_size,i=Array(t+1).join(this.__indent_string)),e&&(i+=Array(e+1).join(" ")),this.__cache.push(i)},r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},r.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join("\n");return"\n"!==e&&(i=i.replace(/[\n]/g,e)),i},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(e,t){return(e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1)?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},r.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},r.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},r.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},r.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(e,i){for(var r=this.__lines.length-2;r>=0;){var n=this.__lines[r];if(n.is_empty())break;if(0!==n.item(0).indexOf(e)&&n.item(-1)!==i){this.__lines.splice(r+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=r},,,,function(e){function t(e,t){this.raw_options=i(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs"," "===this.indent_char),this.indent_with_tabs&&(this.indent_char=" ",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function i(e,t){var i,n={};for(i in e=r(e))i!==t&&(n[i]=e[i]);if(t&&e[t])for(i in e[t])n[i]=e[t][i];return n}function r(e){var t,i={};for(t in e)i[t.replace(/-/g,"_")]=e[t];return i}t.prototype._get_array=function(e,t){var i=this.raw_options[e],r=t||[];return"object"==typeof i?null!==i&&"function"==typeof i.concat&&(r=i.concat()):"string"==typeof i&&(r=i.split(/[^a-zA-Z0-9_\/\-]+/)),r},t.prototype._get_boolean=function(e,t){var i=this.raw_options[e];return void 0===i?!!t:!!i},t.prototype._get_characters=function(e,t){var i=this.raw_options[e],r=t||"";return"string"==typeof i&&(r=i.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/," ")),r},t.prototype._get_number=function(e,t){var i=this.raw_options[e];isNaN(t=parseInt(t,10))&&(t=0);var r=parseInt(i,10);return isNaN(r)&&(r=t),r},t.prototype._get_selection=function(e,t,i){var r=this._get_selection_list(e,t,i);if(1!==r.length)throw Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},t.prototype._get_selection_list=function(e,t,i){if(!t||0===t.length)throw Error("Selection list cannot be empty.");if(i=i||[t[0]],!this._is_valid_selection(i,t))throw Error("Invalid Default Value!");var r=this._get_array(e,i);if(!this._is_valid_selection(r,t))throw Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return -1===t.indexOf(e)})},e.exports.Options=t,e.exports.normalizeOpts=r,e.exports.mergeOpts=i},,function(e){var t=RegExp.prototype.hasOwnProperty("sticky");function i(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},i.prototype.peek=function(e){var t=null;return(e=(e||0)+this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},i.prototype.__match=function(e,i){e.lastIndex=i;var r=e.exec(this.__input);return r&&!(t&&e.sticky)&&r.index!==i&&(r=null),r},i.prototype.test=function(e,t){return(t=(t||0)+this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},i.prototype.testChar=function(e,t){var i=this.peek(t);return e.lastIndex=0,null!==i&&e.test(i)},i.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},i.prototype.read=function(e,t,i){var r,n="";return e&&(r=this.match(e))&&(n+=r[0]),t&&(r||!e)&&(n+=this.readUntil(t,i)),n},i.prototype.readUntil=function(e,t){var i="",r=this.__position;e.lastIndex=this.__position;var n=e.exec(this.__input);return n?(r=n.index,t&&(r+=n[0].length)):r=this.__input_length,i=this.__input.substring(this.__position,r),this.__position=r,i},i.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},i.prototype.get_regexp=function(e,i){var r=null,n="g";return i&&t&&(n="y"),"string"==typeof e&&""!==e?r=new RegExp(e,n):e&&(r=new RegExp(e.source,n)),r},i.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(e){var t=this.__position,i=this.readUntilAfter(e);return this.__position=t,i},i.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=i},,,,,function(e){function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(e);i;)t[i[1]]=i[2],i=this.__directive_pattern.exec(e);return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=t},,function(e,t,i){var r=i(16).Beautifier,n=i(17).Options;e.exports=function(e,t){return new r(e,t).beautify()},e.exports.defaultOptions=function(){return new n}},function(e,t,i){var r=i(17).Options,n=i(2).Output,s=i(8).InputScanner,a=new(i(13)).Directives(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,h=/\s/,c=/(?:\s|\n)+/g,u=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(e,t){this._source_text=e||"",this._options=new r(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}d.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},d.prototype.eatWhitespace=function(e){for(var t=h.test(this._input.peek()),i=0;h.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===i||i<this._options.max_preserve_newlines)&&(i++,this._output.add_new_line(!0));return t},d.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,i=this._input.peek(t);i;){if("{"===i)return!0;if("("===i)e+=1;else if(")"===i){if(0===e)return!1;e-=1}else if(";"===i||"}"===i)break;t++,i=this._input.peek(t)}return!1},d.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},d.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e,t,i=this._source_text,r=this._options.eol;"auto"===r&&(r="\n",i&&o.test(i||"")&&(r=i.match(o)[0]));var d=(i=i.replace(l,"\n")).match(/^[\t ]*/)[0];this._output=new n(this._options,d),this._input=new s(i),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var f=0,m=!1,g=!1,_=!1,y=!1,b=!1,x=this._ch,C=!1;;)if(e=""!==this._input.read(c),t=x,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),x=this._ch,this._ch)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var k=this._input.read(u),v=a.get_directives(k);v&&"start"===v.ignore&&(k+=a.readIgnored(this._input)),this.print_string(k),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(p)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(e),this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),0===f&&-1!==S.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(e),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var w=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);w.match(/[ :]$/)&&(w=this.eatString(": ").replace(/\s+$/,""),this.print_string(w),this._output.space_before_token=!0),0===f&&-1!==w.indexOf(":")?(g=!0,this.indent()):w in this.NESTED_AT_RULE?(this._nestedLevel+=1,w in this.CONDITIONAL_GROUP_RULE&&(_=!0)):0!==f||g||(y=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(e),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),y=!1,_?(_=!1,m=this._indentLevel>=this._nestedLevel):m=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===t?this._output.space_before_token=!1:","!==t&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===t&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var P=0;P<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;P++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[P])){C=!0;break}!m&&!_||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||y||0!==f?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var E='"'===t||"'"===t;this.preserveSingleSpace(E||e),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)C=!1,0===f?(g&&(this.outdent(),g=!1),y=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),f++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),f&&(f--,this.outdent()));else{var R=!1;this._input.lookBack("with")&&(R=!0),this.preserveSingleSpace(e||R),this.print_string(this._ch),g&&"$"===t&&this._options.selector_separator_newline?(this._output.add_new_line(),b=!0):(this.eatWhitespace(),f++,this.indent())}else if(")"===this._ch)f&&(f--,this.outdent()),b&&";"===this._input.peek()&&this._options.selector_separator_newline&&(b=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!g||b)&&0===f&&!y?this._output.add_new_line():this._output.space_before_token=!0;else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==f)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(e),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),h.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var I='"'===t||"'"===t;this.preserveSingleSpace(I||e),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&C&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&h.test(this._ch)&&(this._ch=""));else break;return this._output.get_code(r)},e.exports.Beautifier=d},function(e,t,i){var r=i(6).Options;function n(e){r.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var n=0;n<i.length;n++)"expand"!==i[n]?this.brace_style="collapse":this.brace_style=i[n]}n.prototype=new r,e.exports.Options=n}],t={};eO=function i(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,i),s.exports}(15)}();var ne=eO;function nt(e,t,i){let r=e.getText(),n=!0,s=0,a=!1,o=i.tabSize||4;if(t){let o=e.offsetAt(t.start),l=o;for(;l>0&&ns(r,l-1);)l--;0===l||nn(r,l-1)?o=l:l<o&&(o=l+1);let h=e.offsetAt(t.end),c=h;for(;c<r.length&&ns(r,c);)c++;if((c===r.length||nn(r,c))&&(h=c),t=p.create(e.positionAt(o),e.positionAt(h)),a=function(e,t){for(;t>=0;){let i=e.charCodeAt(t);if(123===i)return!0;if(125===i)break;t--}return!1}(r,o),n=h===r.length,r=r.substring(o,h),0!==o){let r=e.offsetAt(u.create(t.start.line,0));s=function(e,t,i){let r=t,n=0,s=i.tabSize||4;for(;r<e.length;){let t=e.charAt(r);if(" "===t)n++;else if(" "===t)n+=s;else break;r++}return Math.floor(n/s)}(e.getText(),r,i)}a&&(r=`{
|
|
7
|
+
${ni(r)}`)}else t=p.create(u.create(0,0),e.positionAt(r.length));let l=ne(r,{indent_size:o,indent_char:i.insertSpaces?" ":" ",end_with_newline:n&&nr(i,"insertFinalNewline",!1),selector_separator_newline:nr(i,"newlineBetweenSelectors",!0),newline_between_rules:nr(i,"newlineBetweenRules",!0),space_around_selector_separator:nr(i,"spaceAroundSelectorSeparator",!1),brace_style:nr(i,"braceStyle","collapse"),indent_empty_lines:nr(i,"indentEmptyLines",!1),max_preserve_newlines:nr(i,"maxPreserveNewLines",void 0),preserve_newlines:nr(i,"preserveNewLines",!0),wrap_line_length:nr(i,"wrapLineLength",void 0),eol:"\n"});if(a&&(l=ni(l.substring(2))),s>0){let e=i.insertSpaces?eJ(" ",o*s):eJ(" ",s);l=l.split("\n").join("\n"+e),0===t.start.character&&(l=e+l)}return[{range:t,newText:l}]}function ni(e){return e.replace(/^\s+/,"")}function nr(e,t,i){if(e&&e.hasOwnProperty(t)){let i=e[t];if(null!==i)return i}return i}function nn(e,t){return -1!=="\r\n".indexOf(e.charAt(t))}function ns(e,t){return -1!==" ".indexOf(e.charAt(t))}var na=i(77841);class no{constructor(e){this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.addData(e)}provideProperties(){return this._properties}provideAtDirectives(){return this._atDirectives}providePseudoClasses(){return this._pseudoClasses}providePseudoElements(){return this._pseudoElements}addData(e){if(Array.isArray(e.properties))for(let t of e.properties)"string"==typeof t.name&&this._properties.push(t);if(Array.isArray(e.atDirectives))for(let t of e.atDirectives)"string"==typeof t.name&&this._atDirectives.push(t);if(Array.isArray(e.pseudoClasses))for(let t of e.pseudoClasses)"string"==typeof t.name&&this._pseudoClasses.push(t);if(Array.isArray(e.pseudoElements))for(let t of e.pseudoElements)"string"==typeof t.name&&this._pseudoElements.push(t)}}class nl{constructor(e){this.dataProviders=[],this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.setDataProviders(e?.useDefaultDataProvider!==!1,e?.customDataProviders||[])}setDataProviders(e,t){this.dataProviders=[],e&&this.dataProviders.push(new no(na.U)),this.dataProviders.push(...t),this.collectData()}collectData(){this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this.dataProviders.forEach(e=>{e.provideProperties().forEach(e=>{this._propertySet[e.name]||(this._propertySet[e.name]=e)}),e.provideAtDirectives().forEach(e=>{this._atDirectiveSet[e.name]||(this._atDirectiveSet[e.name]=e)}),e.providePseudoClasses().forEach(e=>{this._pseudoClassSet[e.name]||(this._pseudoClassSet[e.name]=e)}),e.providePseudoElements().forEach(e=>{this._pseudoElementSet[e.name]||(this._pseudoElementSet[e.name]=e)})}),this._properties=iF(this._propertySet),this._atDirectives=iF(this._atDirectiveSet),this._pseudoClasses=iF(this._pseudoClassSet),this._pseudoElements=iF(this._pseudoElementSet)}getProperty(e){return this._propertySet[e]}getAtDirective(e){return this._atDirectiveSet[e]}getPseudoClass(e){return this._pseudoClassSet[e]}getPseudoElement(e){return this._pseudoElementSet[e]}getProperties(){return this._properties}getAtDirectives(){return this._atDirectives}getPseudoClasses(){return this._pseudoClasses}getPseudoElements(){return this._pseudoElements}isKnownProperty(e){return e.toLowerCase()in this._propertySet}isStandardProperty(e){return this.isKnownProperty(e)&&(!this._propertySet[e.toLowerCase()].status||"standard"===this._propertySet[e.toLowerCase()].status)}}function nh(e,t,i){return t.map(function(t){let r,s=function(t){let r=e.offsetAt(t),s=i.findChildAtOffset(r,!0);if(!s)return[];let a=[];for(;s;){if(s.parent&&s.offset===s.parent.offset&&s.end===s.parent.end){s=s.parent;continue}s.type===n.Declarations&&r>s.offset&&r<s.end&&a.push([s.offset+1,s.end-1]),a.push([s.offset,s.end]),s=s.parent}return a}(t);for(let t=s.length-1;t>=0;t--)r=ed.create(p.create(e.positionAt(s[t][0]),e.positionAt(s[t][1])),r);return r||(r=ed.create(p.create(t,t))),r})}class nc extends r_{constructor(e){super(e,!0)}isRawStringDocumentLinkNode(e){return super.isRawStringDocumentLinkNode(e)||e.type===n.Use||e.type===n.Forward}async mapReference(e,t){if(this.fileSystemProvider&&e&&t){for(let t of function(e){if(e.endsWith(".css"))return[e];if(e.endsWith("/"))return[e+"index.scss",e+"_index.scss"];let t=iZ.parse(e.replace(/\.scss$/,"")),i=iY.basename(t),r=iY.dirname(t);return i.startsWith("_")?[iY.joinPath(r,i+".scss").toString(!0)]:[iY.joinPath(r,i+".scss").toString(!0),iY.joinPath(r,"_"+i+".scss").toString(!0),e+"/index.scss",e+"/_index.scss",iY.joinPath(r,i+".css").toString(!0)]}(e))if(await this.fileExists(t))return t}return e}async resolveReference(e,t,i,r=!1){if(!eH(e,"sass:"))return super.resolveReference(e,t,i,r)}}function nu(e,t,i,r,n,s,a){return{configure:e=>{s.configure(e),t.configure(e?.completion),i.configure(e?.hover),r.configure(e?.importAliases)},setDataProviders:a.setDataProviders.bind(a),doValidation:s.doValidation.bind(s),parseStylesheet:e.parseStylesheet.bind(e),doComplete:t.doComplete.bind(t),doComplete2:t.doComplete2.bind(t),setCompletionParticipants:t.setCompletionParticipants.bind(t),doHover:i.doHover.bind(i),format:nt,findDefinition:r.findDefinition.bind(r),findReferences:r.findReferences.bind(r),findDocumentHighlights:r.findDocumentHighlights.bind(r),findDocumentLinks:r.findDocumentLinks.bind(r),findDocumentLinks2:r.findDocumentLinks2.bind(r),findDocumentSymbols:r.findSymbolInformations.bind(r),findDocumentSymbols2:r.findDocumentSymbols.bind(r),doCodeActions:n.doCodeActions.bind(n),doCodeActions2:n.doCodeActions2.bind(n),findDocumentColors:r.findDocumentColors.bind(r),getColorPresentations:r.getColorPresentations.bind(r),prepareRename:r.prepareRename.bind(r),doRename:r.doRename.bind(r),getFoldingRanges:r8,getSelectionRanges:nh}}let np={};class nd{constructor(e,t){this._ctx=e,this._languageSettings=t.options,this._languageId=t.languageId;let i=t.options.data,r=i?.useDefaultDataProvider,n=[];if(i?.dataProviders)for(let e in i.dataProviders)n.push(new no(i.dataProviders[e]));let s={customDataProviders:n,useDefaultDataProvider:r};switch(this._languageId){case"css":this._languageService=function(e=np){let t=new nl(e);return nu(new iV,new i9(null,e,t),new rf(e&&e.clientCapabilities,t),new r_(e&&e.fileSystemProvider,!1),new rD(t),new rB(t),t)}(s);break;case"less":this._languageService=function(e=np){let t=new nl(e);return nu(new r6,new r7(e,t),new rf(e&&e.clientCapabilities,t),new r_(e&&e.fileSystemProvider,!0),new rD(t),new rB(t),t)}(s);break;case"scss":this._languageService=function(e=np){let t=new nl(e);return nu(new rY,new r1(e,t),new rf(e&&e.clientCapabilities,t),new nc(e&&e.fileSystemProvider),new rD(t),new rB(t),t)}(s);break;default:throw Error("Invalid language id: "+this._languageId)}this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let e=this._languageService.parseStylesheet(t);return Promise.resolve(this._languageService.doValidation(t,e))}return Promise.resolve([])}async doComplete(e,t){let i=this._getTextDocument(e);if(!i)return null;let r=this._languageService.parseStylesheet(i);return Promise.resolve(this._languageService.doComplete(i,t,r))}async doHover(e,t){let i=this._getTextDocument(e);if(!i)return null;let r=this._languageService.parseStylesheet(i);return Promise.resolve(this._languageService.doHover(i,t,r))}async findDefinition(e,t){let i=this._getTextDocument(e);if(!i)return null;let r=this._languageService.parseStylesheet(i);return Promise.resolve(this._languageService.findDefinition(i,t,r))}async findReferences(e,t){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.parseStylesheet(i);return Promise.resolve(this._languageService.findReferences(i,t,r))}async findDocumentHighlights(e,t){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.parseStylesheet(i);return Promise.resolve(this._languageService.findDocumentHighlights(i,t,r))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let i=this._languageService.parseStylesheet(t);return Promise.resolve(this._languageService.findDocumentSymbols(t,i))}async doCodeActions(e,t,i){let r=this._getTextDocument(e);if(!r)return[];let n=this._languageService.parseStylesheet(r);return Promise.resolve(this._languageService.doCodeActions(r,t,i,n))}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let i=this._languageService.parseStylesheet(t);return Promise.resolve(this._languageService.findDocumentColors(t,i))}async getColorPresentations(e,t,i){let r=this._getTextDocument(e);if(!r)return[];let n=this._languageService.parseStylesheet(r);return Promise.resolve(this._languageService.getColorPresentations(r,n,t,i))}async getFoldingRanges(e,t){let i=this._getTextDocument(e);return i?Promise.resolve(this._languageService.getFoldingRanges(i,t)):[]}async getSelectionRanges(e,t){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.parseStylesheet(i);return Promise.resolve(this._languageService.getSelectionRanges(i,t,r))}async doRename(e,t,i){let r=this._getTextDocument(e);if(!r)return null;let n=this._languageService.parseStylesheet(r);return Promise.resolve(this._languageService.doRename(r,t,i,n))}async format(e,t,i){let r=this._getTextDocument(e);if(!r)return[];let n={...this._languageSettings.format,...i};return Promise.resolve(this._languageService.format(r,t,n))}_getTextDocument(e){for(let t of this._ctx.getMirrorModels())if(t.uri.toString()===e)return e$.create(e,this._languageId,t.version,t.getValue());return null}}self.onmessage=()=>{self.onmessage=e=>{!function(e){let t,i=(0,eU.n)(r=>{let n=eW.M.getChannel(r);return t=e({host:new Proxy({},{get(e,t,i){if("then"!==t){if("string"!=typeof t)throw Error("Not supported");return(...e)=>n.$fhr(t,e)}}}),getMirrorModels:()=>i.requestHandler.getModels()}),new eB.Q(t)})}(t=>((e,t)=>new nd(e,t))(t,e.data))}}}}]);
|