@projectwallace/css-analyzer 6.0.0 → 7.0.0

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.
@@ -1,7 +0,0 @@
1
- (function(q,Fe){typeof exports=="object"&&typeof module<"u"?Fe(exports,require("css-tree/parser"),require("css-tree/walker")):typeof define=="function"&&define.amd?define(["exports","css-tree/parser","css-tree/walker"],Fe):(q=typeof globalThis<"u"?globalThis:q||self,Fe(q.analyzeCss={},q.parse$i,q.walk))})(this,function(q,Fe,ce){"use strict";let Te=null;class G{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return G.createItem(e)}allocateCursor(e,n){let r;return Te!==null?(r=Te,Te=Te.cursor,r.prev=e,r.next=n,r.cursor=this.cursor):r={prev:e,next:n,cursor:this.cursor},this.cursor=r,r}releaseCursor(){const{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Te,Te=e}updateCursors(e,n,r,s){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=n),o.next===r&&(o.next=s),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let n=this.head;n!==null;n=n.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let n=null;this.head=null;for(let r of e){const s=G.createItem(r);n!==null?n.next=s:this.head=s,s.prev=n,n=s}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,n=this){const r=this.allocateCursor(null,this.head);for(;r.next!==null;){const s=r.next;r.next=s.next,e.call(n,s.data,s,this)}this.releaseCursor()}forEachRight(e,n=this){const r=this.allocateCursor(this.tail,null);for(;r.prev!==null;){const s=r.prev;r.prev=s.prev,e.call(n,s.data,s,this)}this.releaseCursor()}reduce(e,n,r=this){let s=this.allocateCursor(null,this.head),o=n,a;for(;s.next!==null;)a=s.next,s.next=a.next,o=e.call(r,o,a.data,a,this);return this.releaseCursor(),o}reduceRight(e,n,r=this){let s=this.allocateCursor(this.tail,null),o=n,a;for(;s.prev!==null;)a=s.prev,s.prev=a.prev,o=e.call(r,o,a.data,a,this);return this.releaseCursor(),o}some(e,n=this){for(let r=this.head;r!==null;r=r.next)if(e.call(n,r.data,r,this))return!0;return!1}map(e,n=this){const r=new G;for(let s=this.head;s!==null;s=s.next)r.appendData(e.call(n,s.data,s,this));return r}filter(e,n=this){const r=new G;for(let s=this.head;s!==null;s=s.next)e.call(n,s.data,s,this)&&r.appendData(s.data);return r}nextUntil(e,n,r=this){if(e===null)return;const s=this.allocateCursor(null,e);for(;s.next!==null;){const o=s.next;if(s.next=o.next,n.call(r,o.data,o,this))break}this.releaseCursor()}prevUntil(e,n,r=this){if(e===null)return;const s=this.allocateCursor(e,null);for(;s.prev!==null;){const o=s.prev;if(s.prev=o.prev,n.call(r,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){const e=new G;for(let n of this)e.appendData(n);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(G.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(G.createItem(e))}insert(e,n=null){if(n!==null)if(this.updateCursors(n.prev,e,n,e),n.prev===null){if(this.head!==n)throw new Error("before doesn't belong to list");this.head=e,n.prev=e,e.next=n,this.updateCursors(null,e)}else n.prev.next=e,e.prev=n.prev,n.prev=e,e.next=n;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,n){return this.insert(G.createItem(e),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(G.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(G.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,n){return e.head===null?this:(n!=null?(this.updateCursors(n.prev,e.tail,n,e.head),n.prev!==null?(n.prev.next=e.head,e.head.prev=n.prev):this.head=e.head,n.prev=e.tail,e.tail.next=n):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,n){"head"in n?this.insertList(n,e):this.insert(n,e),this.remove(e)}}function ii(t,e){const n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:t,message:e,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${t}: ${e}
2
- `)}})}const vt=100,_n=60,Tn=" ";function On({source:t,line:e,column:n,baseLine:r,baseColumn:s},o){function a(S,T){return i.slice(S,T).map((P,Y)=>String(S+Y+1).padStart(y)+" |"+P).join(`
3
- `)}const c=`
4
- `.repeat(Math.max(r-1,0)),u=" ".repeat(Math.max(s-1,0)),i=(c+u+t).split(/\r\n?|\n|\f/),l=Math.max(1,e-o)-1,d=Math.min(e+o,i.length+1),y=Math.max(4,String(d).length)+1;let g=0;n+=(Tn.length-1)*(i[e-1].substr(0,n-1).match(/\t/g)||[]).length,n>vt&&(g=n-_n+3,n=_n-2);for(let S=l;S<=d;S++)S>=0&&S<i.length&&(i[S]=i[S].replace(/\t/g,Tn),i[S]=(g>0&&i[S].length>g?"…":"")+i[S].substr(g,vt-2)+(i[S].length>g+vt-1?"…":""));return[a(l,e),new Array(n+y+2).join("-")+"^",a(e,d)].filter(Boolean).join(`
5
- `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function In(t,e,n,r,s,o=1,a=1){return Object.assign(ii("SyntaxError",t),{source:e,offset:n,line:r,column:s,sourceFragment(u){return On({source:e,line:r,column:s,baseLine:o,baseColumn:a},isNaN(u)?0:u)},get formattedMessage(){return`Parse error: ${t}
6
- `+On({source:e,line:r,column:s,baseLine:o,baseColumn:a},2)}})}const Re=0,x=1,D=2,U=3,z=4,Oe=5,si=6,ie=7,se=8,$=9,E=10,M=11,N=12,H=13,Nn=14,oe=15,X=16,Je=17,Ie=18,Ye=19,Xe=20,Z=21,O=22,wt=23,At=24,ue=25,oi=0;function W(t){return t>=48&&t<=57}function qe(t){return W(t)||t>=65&&t<=70||t>=97&&t<=102}function Lt(t){return t>=65&&t<=90}function ai(t){return t>=97&&t<=122}function li(t){return Lt(t)||ai(t)}function ci(t){return t>=128}function Ze(t){return li(t)||ci(t)||t===95}function $n(t){return Ze(t)||W(t)||t===45}function ui(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function et(t){return t===10||t===13||t===12}function Be(t){return et(t)||t===32||t===9}function me(t,e){return!(t!==92||et(e)||e===oi)}function Et(t,e,n){return t===45?Ze(e)||e===45||me(e,n):Ze(t)?!0:t===92?me(t,e):!1}function _t(t,e,n){return t===43||t===45?W(e)?2:e===46&&W(n)?3:0:t===46?W(e)?2:0:W(t)?1:0}function Dn(t){return t===65279||t===65534?1:0}const Tt=new Array(128),hi=128,tt=130,Pn=131,Ot=132,Mn=133;for(let t=0;t<Tt.length;t++)Tt[t]=Be(t)&&tt||W(t)&&Pn||Ze(t)&&Ot||ui(t)&&Mn||t||hi;function It(t){return t<128?Tt[t]:Ot}function Ne(t,e){return e<t.length?t.charCodeAt(e):0}function Nt(t,e,n){return n===13&&Ne(t,e+1)===10?2:1}function zn(t,e,n){let r=t.charCodeAt(e);return Lt(r)&&(r=r|32),r===n}function nt(t,e,n,r){if(n-e!==r.length||e<0||n>t.length)return!1;for(let s=e;s<n;s++){const o=r.charCodeAt(s-e);let a=t.charCodeAt(s);if(Lt(a)&&(a=a|32),a!==o)return!1}return!0}function fi(t,e){for(;e>=0&&Be(t.charCodeAt(e));e--);return e+1}function rt(t,e){for(;e<t.length&&Be(t.charCodeAt(e));e++);return e}function $t(t,e){for(;e<t.length&&W(t.charCodeAt(e));e++);return e}function je(t,e){if(e+=2,qe(Ne(t,e-1))){for(const r=Math.min(t.length,e+5);e<r&&qe(Ne(t,e));e++);const n=Ne(t,e);Be(n)&&(e+=Nt(t,e,n))}return e}function it(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(!$n(n)){if(me(n,Ne(t,e+1))){e=je(t,e)-1;continue}break}}return e}function Fn(t,e){let n=t.charCodeAt(e);if((n===43||n===45)&&(n=t.charCodeAt(e+=1)),W(n)&&(e=$t(t,e+1),n=t.charCodeAt(e)),n===46&&W(t.charCodeAt(e+1))&&(e+=2,e=$t(t,e)),zn(t,e,101)){let r=0;n=t.charCodeAt(e+1),(n===45||n===43)&&(r=1,n=t.charCodeAt(e+2)),W(n)&&(e=$t(t,e+1+r+1))}return e}function Dt(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(n===41){e++;break}me(n,Ne(t,e+1))&&(e=je(t,e))}return e}function pi(t){if(t.length===1&&!qe(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}const Rn=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"],di=16*1024;function st(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,di)):t}const qn=10,mi=12,Bn=13;function jn(t){const e=t.source,n=e.length,r=e.length>0?Dn(e.charCodeAt(0)):0,s=st(t.lines,n),o=st(t.columns,n);let a=t.startLine,c=t.startColumn;for(let u=r;u<n;u++){const i=e.charCodeAt(u);s[u]=a,o[u]=c++,(i===qn||i===Bn||i===mi)&&(i===Bn&&u+1<n&&e.charCodeAt(u+1)===qn&&(u++,s[u]=a,o[u]=c),a++,c=1)}s[n]=a,o[n]=c,t.lines=s,t.columns=o,t.computed=!0}class gi{constructor(e,n,r,s){this.setSource(e,n,r,s),this.lines=null,this.columns=null}setSource(e="",n=0,r=1,s=1){this.source=e,this.startOffset=n,this.startLine=r,this.startColumn=s,this.computed=!1}getLocation(e,n){return this.computed||jn(this),{source:n,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,n,r){return this.computed||jn(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+n,line:this.lines[n],column:this.columns[n]}}}}const he=16777215,fe=24,ve=new Uint8Array(32);ve[D]=O,ve[Z]=O,ve[Ye]=Xe,ve[wt]=At;function Un(t){return ve[t]!==0}class ki{constructor(e,n){this.setSource(e,n)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",n=()=>{}){e=String(e||"");const r=e.length,s=st(this.offsetAndType,e.length+1),o=st(this.balance,e.length+1);let a=0,c=-1,u=0,i=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),n(e,(l,d,y)=>{const g=a++;if(s[g]=l<<fe|y,c===-1&&(c=d),o[g]=i,l===u){const S=o[i];o[i]=g,i=S,u=ve[s[S]>>fe]}else Un(l)&&(i=g,u=ve[l])}),s[a]=Re<<fe|r,o[a]=a;for(let l=0;l<a;l++){const d=o[l];if(d<=l){const y=o[d];y!==l&&(o[l]=y)}else d>a&&(o[l]=a)}this.source=e,this.firstCharOffset=c===-1?0:c,this.tokenCount=a,this.offsetAndType=s,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>fe:Re}lookupTypeNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>fe;if(r!==H&&r!==ue&&e--===0)return r}return Re}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&he:this.source.length}lookupOffsetNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>fe;if(r!==H&&r!==ue&&e--===0)return n-this.tokenIndex}return Re}lookupValue(e,n){return e+=this.tokenIndex,e<this.tokenCount?nt(this.source,this.offsetAndType[e-1]&he,this.offsetAndType[e]&he,n):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&he:this.offsetAndType[this.tokenCount]&he:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,n){return n?this.lookupType(n)===$&&this.source.charCodeAt(this.lookupOffset(n))===e:this.tokenType===$&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let n=this.tokenIndex+e;n<this.tokenCount?(this.tokenIndex=n,this.tokenStart=this.offsetAndType[n-1]&he,n=this.offsetAndType[n],this.tokenType=n>>fe,this.tokenEnd=n&he):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>fe,this.tokenEnd=e&he):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Re,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===H||this.tokenType===ue;)this.next()}skipUntilBalanced(e,n){let r=e,s=0,o=0;e:for(;r<this.tokenCount;r++){if(s=this.balance[r],s<e)break e;switch(o=r>0?this.offsetAndType[r-1]&he:this.firstCharOffset,n(this.source.charCodeAt(o))){case 1:break e;case 2:r++;break e;default:Un(this.offsetAndType[r]>>fe)&&(r=s)}}this.skip(r-this.tokenIndex)}forEachToken(e){for(let n=0,r=this.firstCharOffset;n<this.tokenCount;n++){const s=r,o=this.offsetAndType[n],a=o&he,c=o>>fe;r=a,e(c,s,a,n)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((n,r,s,o)=>{e[o]={idx:o,type:Rn[n],chunk:this.source.substring(r,s),balance:this.balance[o]}}),e}}function Vn(t,e){function n(d){return d<c?t.charCodeAt(d):0}function r(){if(i=Fn(t,i),Et(n(i),n(i+1),n(i+2))){l=N,i=it(t,i);return}if(n(i)===37){l=M,i++;return}l=E}function s(){const d=i;if(i=it(t,i),nt(t,d,i,"url")&&n(i)===40){if(i=rt(t,i+1),n(i)===34||n(i)===39){l=D,i=d+4;return}a();return}if(n(i)===40){l=D,i++;return}l=x}function o(d){for(d||(d=n(i++)),l=Oe;i<t.length;i++){const y=t.charCodeAt(i);switch(It(y)){case d:i++;return;case tt:if(et(y)){i+=Nt(t,i,y),l=si;return}break;case 92:if(i===t.length-1)break;const g=n(i+1);et(g)?i+=Nt(t,i+1,g):me(y,g)&&(i=je(t,i)-1);break}}}function a(){for(l=ie,i=rt(t,i);i<t.length;i++){const d=t.charCodeAt(i);switch(It(d)){case 41:i++;return;case tt:if(i=rt(t,i),n(i)===41||i>=t.length){i<t.length&&i++;return}i=Dt(t,i),l=se;return;case 34:case 39:case 40:case Mn:i=Dt(t,i),l=se;return;case 92:if(me(d,n(i+1))){i=je(t,i)-1;break}i=Dt(t,i),l=se;return}}}t=String(t||"");const c=t.length;let u=Dn(n(0)),i=u,l;for(;i<c;){const d=t.charCodeAt(i);switch(It(d)){case tt:l=H,i=rt(t,i+1);break;case 34:o();break;case 35:$n(n(i+1))||me(n(i+1),n(i+2))?(l=z,i=it(t,i+1)):(l=$,i++);break;case 39:o();break;case 40:l=Z,i++;break;case 41:l=O,i++;break;case 43:_t(d,n(i+1),n(i+2))?r():(l=$,i++);break;case 44:l=Ie,i++;break;case 45:_t(d,n(i+1),n(i+2))?r():n(i+1)===45&&n(i+2)===62?(l=oe,i=i+3):Et(d,n(i+1),n(i+2))?s():(l=$,i++);break;case 46:_t(d,n(i+1),n(i+2))?r():(l=$,i++);break;case 47:n(i+1)===42?(l=ue,i=t.indexOf("*/",i+2),i=i===-1?t.length:i+2):(l=$,i++);break;case 58:l=X,i++;break;case 59:l=Je,i++;break;case 60:n(i+1)===33&&n(i+2)===45&&n(i+3)===45?(l=Nn,i=i+4):(l=$,i++);break;case 64:Et(n(i+1),n(i+2),n(i+3))?(l=U,i=it(t,i+1)):(l=$,i++);break;case 91:l=Ye,i++;break;case 92:me(d,n(i+1))?s():(l=$,i++);break;case 93:l=Xe,i++;break;case 123:l=wt,i++;break;case 125:l=At,i++;break;case Pn:r();break;case Ot:s();break;default:l=$,i++}e(l,u,u=i)}}function yi(t){const e=this.createList();let n=!1;const r={recognizer:t};for(;!this.eof;){switch(this.tokenType){case ue:this.next();continue;case H:n=!0,this.next();continue}let s=t.getNode.call(this,r);if(s===void 0)break;n&&(t.onWhiteSpace&&t.onWhiteSpace.call(this,s,e,r),n=!1),e.push(s)}return n&&t.onWhiteSpace&&t.onWhiteSpace.call(this,null,e,r),e}const Gn=()=>{},Si=33,xi=35,Pt=59,Hn=123,Wn=0;function Ci(t){return function(){return this[t]()}}function Mt(t){const e=Object.create(null);for(const n of Object.keys(t)){const r=t[n],s=r.parse||r;s&&(e[n]=s)}return e}function bi(t){const e={context:Object.create(null),features:Object.assign(Object.create(null),t.features),scope:Object.assign(Object.create(null),t.scope),atrule:Mt(t.atrule),pseudo:Mt(t.pseudo),node:Mt(t.node)};for(const[n,r]of Object.entries(t.parseContext))switch(typeof r){case"function":e.context[n]=r;break;case"string":e.context[n]=Ci(r);break}return{config:e,...e,...e.node}}function vi(t){let e="",n="<unknown>",r=!1,s=Gn,o=!1;const a=new gi,c=Object.assign(new ki,bi(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:yi,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(i){return i===Hn?1:0},consumeUntilLeftCurlyBracketOrSemicolon(i){return i===Hn||i===Pt?1:0},consumeUntilExclamationMarkOrSemicolon(i){return i===Si||i===Pt?1:0},consumeUntilSemicolonIncluded(i){return i===Pt?2:0},createList(){return new G},createSingleNodeList(i){return new G().appendData(i)},getFirstListNode(i){return i&&i.first},getLastListNode(i){return i&&i.last},parseWithFallback(i,l){const d=this.tokenIndex;try{return i.call(this)}catch(y){if(o)throw y;this.skip(d-this.tokenIndex);const g=l.call(this);return o=!0,s(y,g),o=!1,g}},lookupNonWSType(i){let l;do if(l=this.lookupType(i++),l!==H&&l!==ue)return l;while(l!==Wn);return Wn},charCodeAt(i){return i>=0&&i<e.length?e.charCodeAt(i):0},substring(i,l){return e.substring(i,l)},substrToCursor(i){return this.source.substring(i,this.tokenStart)},cmpChar(i,l){return zn(e,i,l)},cmpStr(i,l,d){return nt(e,i,l,d)},consume(i){const l=this.tokenStart;return this.eat(i),this.substrToCursor(l)},consumeFunctionName(){const i=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(D),i},consumeNumber(i){const l=e.substring(this.tokenStart,Fn(e,this.tokenStart));return this.eat(i),l},eat(i){if(this.tokenType!==i){const l=Rn[i].slice(0,-6).replace(/-/g," ").replace(/^./,g=>g.toUpperCase());let d=`${/[[\](){}]/.test(l)?`"${l}"`:l} is expected`,y=this.tokenStart;switch(i){case x:this.tokenType===D||this.tokenType===ie?(y=this.tokenEnd-1,d="Identifier is expected but function found"):d="Identifier is expected";break;case z:this.isDelim(xi)&&(this.next(),y++,d="Name is expected");break;case M:this.tokenType===E&&(y=this.tokenEnd,d="Percent sign is expected");break}this.error(d,y)}this.next()},eatIdent(i){(this.tokenType!==x||this.lookupValue(0,i)===!1)&&this.error(`Identifier "${i}" is expected`),this.next()},eatDelim(i){this.isDelim(i)||this.error(`Delim "${String.fromCharCode(i)}" is expected`),this.next()},getLocation(i,l){return r?a.getLocationRange(i,l,n):null},getLocationFromList(i){if(r){const l=this.getFirstListNode(i),d=this.getLastListNode(i);return a.getLocationRange(l!==null?l.loc.start.offset-a.startOffset:this.tokenStart,d!==null?d.loc.end.offset-a.startOffset:this.tokenStart,n)}return null},error(i,l){const d=typeof l<"u"&&l<e.length?a.getLocation(l):this.eof?a.getLocation(fi(e,e.length-1)):a.getLocation(this.tokenStart);throw new In(i||"Unexpected input",e,d.offset,d.line,d.column,a.startLine,a.startColumn)}});return Object.assign(function(i,l){e=i,l=l||{},c.setSource(e,Vn),a.setSource(e,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=!!l.positions,s=typeof l.onParseError=="function"?l.onParseError:Gn,o=!1,c.parseAtrulePrelude="parseAtrulePrelude"in l?!!l.parseAtrulePrelude:!0,c.parseRulePrelude="parseRulePrelude"in l?!!l.parseRulePrelude:!0,c.parseValue="parseValue"in l?!!l.parseValue:!0,c.parseCustomProperty="parseCustomProperty"in l?!!l.parseCustomProperty:!1;const{context:d="default",onComment:y}=l;if(!(d in c.context))throw new Error("Unknown context `"+d+"`");typeof y=="function"&&c.forEachToken((S,T,P)=>{if(S===ue){const Y=c.getLocation(T,P),ee=nt(e,P-2,P,"*/")?e.slice(T+2,P-2):e.slice(T+2,P);y(ee,Y)}});const g=c.context[d].call(c,l);return c.eof||c.error(),g},{SyntaxError:In,config:c.config})}const wi=35,Ai=38,Li=42,Ei=43,_i=47,Kn=46,Ti=62,Oi=124,Ii=126;function Ni(t,e){e.last!==null&&e.last.type!=="Combinator"&&t!==null&&t.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}function $i(){switch(this.tokenType){case Ye:return this.AttributeSelector();case z:return this.IdSelector();case X:return this.lookupType(1)===X?this.PseudoElementSelector():this.PseudoClassSelector();case x:return this.TypeSelector();case E:case M:return this.Percentage();case N:this.charCodeAt(this.tokenStart)===Kn&&this.error("Identifier is expected",this.tokenStart+1);break;case $:{switch(this.charCodeAt(this.tokenStart)){case Ei:case Ti:case Ii:case _i:return this.Combinator();case Kn:return this.ClassSelector();case Li:case Oi:return this.TypeSelector();case wi:return this.IdSelector();case Ai:return this.NestingSelector()}break}}}const Di={onWhiteSpace:Ni,getNode:$i};function Pi(){const t=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case x:t.push(this.Identifier());break;case Oe:t.push(this.String());break;case Ie:t.push(this.Operator());break;case O:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return t}const we={parse(){return this.createSingleNodeList(this.SelectorList())}},zt={parse(){return this.createSingleNodeList(this.Selector())}},Mi={parse(){return this.createSingleNodeList(this.Identifier())}},zi={parse:Pi},ot={parse(){return this.createSingleNodeList(this.Nth())}},Fi={dir:Mi,has:we,lang:zi,matches:we,is:we,"-moz-any":we,"-webkit-any":we,where:we,not:we,"nth-child":ot,"nth-last-child":ot,"nth-last-of-type":ot,"nth-of-type":ot,slotted:zt,host:zt,"host-context":zt},pe=43,K=45,at=110,Ae=!0,Ri=!1;function lt(t,e){let n=this.tokenStart+t;const r=this.charCodeAt(n);for((r===pe||r===K)&&(e&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)W(this.charCodeAt(n))||this.error("Integer is expected",n)}function $e(t){return lt.call(this,0,t)}function Se(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let n="";switch(e){case at:n="N is expected";break;case K:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+t)}}function Ft(){let t=0,e=0,n=this.tokenType;for(;n===H||n===ue;)n=this.lookupType(++t);if(n!==E)if(this.isDelim(pe,t)||this.isDelim(K,t)){e=this.isDelim(pe,t)?pe:K;do n=this.lookupType(++t);while(n===H||n===ue);n!==E&&(this.skip(t),$e.call(this,Ae))}else return null;return t>0&&this.skip(t),e===0&&(n=this.charCodeAt(this.tokenStart),n!==pe&&n!==K&&this.error("Number sign is expected")),$e.call(this,e!==0),e===K?"-"+this.consume(E):this.consume(E)}function qi(){const t=this.tokenStart;let e=null,n=null;if(this.tokenType===E)$e.call(this,Ri),n=this.consume(E);else if(this.tokenType===x&&this.cmpChar(this.tokenStart,K))switch(e="-1",Se.call(this,1,at),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ft.call(this);break;case 3:Se.call(this,2,K),this.next(),this.skipSC(),$e.call(this,Ae),n="-"+this.consume(E);break;default:Se.call(this,2,K),lt.call(this,3,Ae),this.next(),n=this.substrToCursor(t+2)}else if(this.tokenType===x||this.isDelim(pe)&&this.lookupType(1)===x){let r=0;switch(e="1",this.isDelim(pe)&&(r=1,this.next()),Se.call(this,0,at),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ft.call(this);break;case 2:Se.call(this,1,K),this.next(),this.skipSC(),$e.call(this,Ae),n="-"+this.consume(E);break;default:Se.call(this,1,K),lt.call(this,2,Ae),this.next(),n=this.substrToCursor(t+r+1)}}else if(this.tokenType===N){const r=this.charCodeAt(this.tokenStart),s=r===pe||r===K;let o=this.tokenStart+s;for(;o<this.tokenEnd&&W(this.charCodeAt(o));o++);o===this.tokenStart+s&&this.error("Integer is expected",this.tokenStart+s),Se.call(this,o-this.tokenStart,at),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),n=Ft.call(this)):(Se.call(this,o-this.tokenStart+1,K),o+2===this.tokenEnd?(this.next(),this.skipSC(),$e.call(this,Ae),n="-"+this.consume(E)):(lt.call(this,o-this.tokenStart+2,Ae),this.next(),n=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===pe&&(e=e.substr(1)),n!==null&&n.charCodeAt(0)===pe&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:n}}function Bi(t){if(t.a){const e=t.a==="+1"&&"n"||t.a==="1"&&"n"||t.a==="-1"&&"-n"||t.a+"n";if(t.b){const n=t.b[0]==="-"||t.b[0]==="+"?t.b:"+"+t.b;this.tokenize(e+n)}else this.tokenize(e)}else this.tokenize(t.b)}const ji=36,Qn=42,ct=61,Ui=94,Rt=124,Vi=126;function Gi(){this.eof&&this.error("Unexpected end of input");const t=this.tokenStart;let e=!1;return this.isDelim(Qn)?(e=!0,this.next()):this.isDelim(Rt)||this.eat(x),this.isDelim(Rt)?this.charCodeAt(this.tokenStart+1)!==ct?(this.next(),this.eat(x)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Hi(){const t=this.tokenStart,e=this.charCodeAt(t);return e!==ct&&e!==Vi&&e!==Ui&&e!==ji&&e!==Qn&&e!==Rt&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==ct&&(this.isDelim(ct)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}function Wi(){const t=this.tokenStart;let e,n=null,r=null,s=null;return this.eat(Ye),this.skipSC(),e=Gi.call(this),this.skipSC(),this.tokenType!==Xe&&(this.tokenType!==x&&(n=Hi.call(this),this.skipSC(),r=this.tokenType===Oe?this.String():this.Identifier(),this.skipSC()),this.tokenType===x&&(s=this.consume(x),this.skipSC())),this.eat(Xe),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:s}}function Ki(t){this.token($,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(x,t.flags),this.token($,"]")}const Qi=46;function Ji(){return this.eatDelim(Qi),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(x)}}function Yi(t){this.token($,"."),this.token(x,t.name)}const Xi=43,Jn=47,Zi=62,es=126;function ts(){const t=this.tokenStart;let e;switch(this.tokenType){case H:e=" ";break;case $:switch(this.charCodeAt(this.tokenStart)){case Zi:case Xi:case es:this.next();break;case Jn:this.next(),this.eatIdent("deep"),this.eatDelim(Jn);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function ns(t){this.tokenize(t.name)}function rs(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(x)}}function is(t){this.token(x,t.name)}function ss(){const t=this.tokenStart;return this.eat(z),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function os(t){this.token($,"#"+t.name)}const as=38;function ls(){const t=this.tokenStart;return this.eatDelim(as),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function cs(){this.token($,"&")}function us(){this.skipSC();const t=this.tokenStart;let e=t,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(t,e),nth:r,selector:n}}function hs(t){this.node(t.nth),t.selector!==null&&(this.token(x,"of"),this.node(t.selector))}function fs(){const t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function ps(t){this.tokenize(t.value)}function ds(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(M)}}function ms(t){this.token(M,t.value+"%")}function gs(){const t=this.tokenStart;let e=null,n,r;return this.eat(X),this.tokenType===D?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==O?e=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(O)):n=this.consume(x),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function ks(t){this.token(X,":"),t.children===null?this.token(x,t.name):(this.token(D,t.name+"("),this.children(t),this.token(O,")"))}function ys(){const t=this.tokenStart;let e=null,n,r;return this.eat(X),this.eat(X),this.tokenType===D?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==O?e=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(O)):n=this.consume(x),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function Ss(t){this.token(X,":"),this.token(X,":"),t.children===null?this.token(x,t.name):(this.token(D,t.name+"("),this.children(t),this.token(O,")"))}function xs(){return this.tokenIndex>0&&this.lookupType(-1)===H?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function Cs(t,e){const n=this.getTokenStart(this.tokenIndex);let r;return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),e&&this.tokenStart>n?r=xs.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function bs(t){this.tokenize(t.value)}function vs(){const t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}function ws(t){this.children(t)}function As(){const t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===Ie){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function Ls(t){this.children(t,()=>this.token(Ie,","))}const qt=92,Yn=34,Es=39;function _s(t){const e=t.length,n=t.charCodeAt(0),r=n===Yn||n===Es?1:0,s=r===1&&e>1&&t.charCodeAt(e-1)===n?e-2:e-1;let o="";for(let a=r;a<=s;a++){let c=t.charCodeAt(a);if(c===qt){if(a===s){a!==e-1&&(o=t.substr(a+1));break}if(c=t.charCodeAt(++a),me(qt,c)){const u=a-1,i=je(t,u);a=i-1,o+=pi(t.substring(u+1,i))}else c===13&&t.charCodeAt(a+1)===10&&a++}else o+=t[a]}return o}function Ts(t,e){const n='"',r=Yn;let s="",o=!1;for(let a=0;a<t.length;a++){const c=t.charCodeAt(a);if(c===0){s+="�";continue}if(c<=31||c===127){s+="\\"+c.toString(16),o=!0;continue}c===r||c===qt?(s+="\\"+t.charAt(a),o=!1):(o&&(qe(c)||Be(c))&&(s+=" "),s+=t.charAt(a),o=!1)}return n+s+n}function Os(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:_s(this.consume(Oe))}}function Is(t){this.token(Oe,Ts(t.value))}const Ns=42,Xn=124;function Bt(){this.tokenType!==x&&this.isDelim(Ns)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function $s(){const t=this.tokenStart;return this.isDelim(Xn)?(this.next(),Bt.call(this)):(Bt.call(this),this.isDelim(Xn)&&(this.next(),Bt.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Ds(t){this.tokenize(t.name)}const Zn=vi({parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:Di},atrule:{},pseudo:Fi,node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:qi,AttributeSelector:Wi,ClassSelector:Ji,Combinator:ts,IdSelector:ss,Identifier:rs,NestingSelector:ls,Nth:us,Operator:fs,Percentage:ds,PseudoClassSelector:gs,PseudoElementSelector:ys,Raw:Cs,Selector:vs,SelectorList:As,String:Os,TypeSelector:$s},Symbol.toStringTag,{value:"Module"}))});var jt={},ut={},ht={},er;function Ps(){if(er)return ht;er=1;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return ht.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},ht.decode=function(e){var n=65,r=90,s=97,o=122,a=48,c=57,u=43,i=47,l=26,d=52;return n<=e&&e<=r?e-n:s<=e&&e<=o?e-s+l:a<=e&&e<=c?e-a+d:e==u?62:e==i?63:-1},ht}var tr;function Ms(){if(tr)return ut;tr=1;var t=Ps(),e=5,n=1<<e,r=n-1,s=n;function o(c){return c<0?(-c<<1)+1:(c<<1)+0}function a(c){var u=(c&1)===1,i=c>>1;return u?-i:i}return ut.encode=function(u){var i="",l,d=o(u);do l=d&r,d>>>=e,d>0&&(l|=s),i+=t.encode(l);while(d>0);return i},ut.decode=function(u,i,l){var d=u.length,y=0,g=0,S,T;do{if(i>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(T=t.decode(u.charCodeAt(i++)),T===-1)throw new Error("Invalid base64 digit: "+u.charAt(i-1));S=!!(T&s),T&=r,y=y+(T<<g),g+=e}while(S);l.value=a(y),l.rest=i},ut}var Ut={},nr;function Vt(){return nr||(nr=1,function(t){function e(h,f,k){if(f in h)return h[f];if(arguments.length===3)return k;throw new Error('"'+f+'" is a required argument.')}t.getArg=e;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function s(h){var f=h.match(n);return f?{scheme:f[1],auth:f[2],host:f[3],port:f[4],path:f[5]}:null}t.urlParse=s;function o(h){var f="";return h.scheme&&(f+=h.scheme+":"),f+="//",h.auth&&(f+=h.auth+"@"),h.host&&(f+=h.host),h.port&&(f+=":"+h.port),h.path&&(f+=h.path),f}t.urlGenerate=o;var a=32;function c(h){var f=[];return function(k){for(var p=0;p<f.length;p++)if(f[p].input===k){var ne=f[0];return f[0]=f[p],f[p]=ne,f[0].result}var V=h(k);return f.unshift({input:k,result:V}),f.length>a&&f.pop(),V}}var u=c(function(f){var k=f,p=s(f);if(p){if(!p.path)return f;k=p.path}for(var ne=t.isAbsolute(k),V=[],xe=0,R=0;;)if(xe=R,R=k.indexOf("/",xe),R===-1){V.push(k.slice(xe));break}else for(V.push(k.slice(xe,R));R<k.length&&k[R]==="/";)R++;for(var Ce,ye=0,R=V.length-1;R>=0;R--)Ce=V[R],Ce==="."?V.splice(R,1):Ce===".."?ye++:ye>0&&(Ce===""?(V.splice(R+1,ye),ye=0):(V.splice(R,2),ye--));return k=V.join("/"),k===""&&(k=ne?"/":"."),p?(p.path=k,o(p)):k});t.normalize=u;function i(h,f){h===""&&(h="."),f===""&&(f=".");var k=s(f),p=s(h);if(p&&(h=p.path||"/"),k&&!k.scheme)return p&&(k.scheme=p.scheme),o(k);if(k||f.match(r))return f;if(p&&!p.host&&!p.path)return p.host=f,o(p);var ne=f.charAt(0)==="/"?f:u(h.replace(/\/+$/,"")+"/"+f);return p?(p.path=ne,o(p)):ne}t.join=i,t.isAbsolute=function(h){return h.charAt(0)==="/"||n.test(h)};function l(h,f){h===""&&(h="."),h=h.replace(/\/$/,"");for(var k=0;f.indexOf(h+"/")!==0;){var p=h.lastIndexOf("/");if(p<0||(h=h.slice(0,p),h.match(/^([^\/]+:\/)?\/*$/)))return f;++k}return Array(k+1).join("../")+f.substr(h.length+1)}t.relative=l;var d=function(){var h=Object.create(null);return!("__proto__"in h)}();function y(h){return h}function g(h){return T(h)?"$"+h:h}t.toSetString=d?y:g;function S(h){return T(h)?h.slice(1):h}t.fromSetString=d?y:S;function T(h){if(!h)return!1;var f=h.length;if(f<9||h.charCodeAt(f-1)!==95||h.charCodeAt(f-2)!==95||h.charCodeAt(f-3)!==111||h.charCodeAt(f-4)!==116||h.charCodeAt(f-5)!==111||h.charCodeAt(f-6)!==114||h.charCodeAt(f-7)!==112||h.charCodeAt(f-8)!==95||h.charCodeAt(f-9)!==95)return!1;for(var k=f-10;k>=0;k--)if(h.charCodeAt(k)!==36)return!1;return!0}function P(h,f,k){var p=te(h.source,f.source);return p!==0||(p=h.originalLine-f.originalLine,p!==0)||(p=h.originalColumn-f.originalColumn,p!==0||k)||(p=h.generatedColumn-f.generatedColumn,p!==0)||(p=h.generatedLine-f.generatedLine,p!==0)?p:te(h.name,f.name)}t.compareByOriginalPositions=P;function Y(h,f,k){var p;return p=h.originalLine-f.originalLine,p!==0||(p=h.originalColumn-f.originalColumn,p!==0||k)||(p=h.generatedColumn-f.generatedColumn,p!==0)||(p=h.generatedLine-f.generatedLine,p!==0)?p:te(h.name,f.name)}t.compareByOriginalPositionsNoSource=Y;function ee(h,f,k){var p=h.generatedLine-f.generatedLine;return p!==0||(p=h.generatedColumn-f.generatedColumn,p!==0||k)||(p=te(h.source,f.source),p!==0)||(p=h.originalLine-f.originalLine,p!==0)||(p=h.originalColumn-f.originalColumn,p!==0)?p:te(h.name,f.name)}t.compareByGeneratedPositionsDeflated=ee;function Le(h,f,k){var p=h.generatedColumn-f.generatedColumn;return p!==0||k||(p=te(h.source,f.source),p!==0)||(p=h.originalLine-f.originalLine,p!==0)||(p=h.originalColumn-f.originalColumn,p!==0)?p:te(h.name,f.name)}t.compareByGeneratedPositionsDeflatedNoLine=Le;function te(h,f){return h===f?0:h===null?1:f===null?-1:h>f?1:-1}function mt(h,f){var k=h.generatedLine-f.generatedLine;return k!==0||(k=h.generatedColumn-f.generatedColumn,k!==0)||(k=te(h.source,f.source),k!==0)||(k=h.originalLine-f.originalLine,k!==0)||(k=h.originalColumn-f.originalColumn,k!==0)?k:te(h.name,f.name)}t.compareByGeneratedPositionsInflated=mt;function gt(h){return JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=gt;function kt(h,f,k){if(f=f||"",h&&(h[h.length-1]!=="/"&&f[0]!=="/"&&(h+="/"),f=h+f),k){var p=s(k);if(!p)throw new Error("sourceMapURL could not be parsed");if(p.path){var ne=p.path.lastIndexOf("/");ne>=0&&(p.path=p.path.substring(0,ne+1))}f=i(o(p),f)}return u(f)}t.computeSourceURL=kt}(Ut)),Ut}var Gt={},rr;function zs(){if(rr)return Gt;rr=1;var t=Vt(),e=Object.prototype.hasOwnProperty,n=typeof Map<"u";function r(){this._array=[],this._set=n?new Map:Object.create(null)}return r.fromArray=function(o,a){for(var c=new r,u=0,i=o.length;u<i;u++)c.add(o[u],a);return c},r.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(o,a){var c=n?o:t.toSetString(o),u=n?this.has(o):e.call(this._set,c),i=this._array.length;(!u||a)&&this._array.push(o),u||(n?this._set.set(o,i):this._set[c]=i)},r.prototype.has=function(o){if(n)return this._set.has(o);var a=t.toSetString(o);return e.call(this._set,a)},r.prototype.indexOf=function(o){if(n){var a=this._set.get(o);if(a>=0)return a}else{var c=t.toSetString(o);if(e.call(this._set,c))return this._set[c]}throw new Error('"'+o+'" is not in the set.')},r.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},r.prototype.toArray=function(){return this._array.slice()},Gt.ArraySet=r,Gt}var Ht={},ir;function Fs(){if(ir)return Ht;ir=1;var t=Vt();function e(r,s){var o=r.generatedLine,a=s.generatedLine,c=r.generatedColumn,u=s.generatedColumn;return a>o||a==o&&u>=c||t.compareByGeneratedPositionsInflated(r,s)<=0}function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return n.prototype.unsortedForEach=function(s,o){this._array.forEach(s,o)},n.prototype.add=function(s){e(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Ht.MappingList=n,Ht}var sr;function Rs(){if(sr)return jt;sr=1;var t=Ms(),e=Vt(),n=zs().ArraySet,r=Fs().MappingList;function s(o){o||(o={}),this._file=e.getArg(o,"file",null),this._sourceRoot=e.getArg(o,"sourceRoot",null),this._skipValidation=e.getArg(o,"skipValidation",!1),this._ignoreInvalidMapping=e.getArg(o,"ignoreInvalidMapping",!1),this._sources=new n,this._names=new n,this._mappings=new r,this._sourcesContents=null}return s.prototype._version=3,s.fromSourceMap=function(a,c){var u=a.sourceRoot,i=new s(Object.assign(c||{},{file:a.file,sourceRoot:u}));return a.eachMapping(function(l){var d={generated:{line:l.generatedLine,column:l.generatedColumn}};l.source!=null&&(d.source=l.source,u!=null&&(d.source=e.relative(u,d.source)),d.original={line:l.originalLine,column:l.originalColumn},l.name!=null&&(d.name=l.name)),i.addMapping(d)}),a.sources.forEach(function(l){var d=l;u!==null&&(d=e.relative(u,l)),i._sources.has(d)||i._sources.add(d);var y=a.sourceContentFor(l);y!=null&&i.setSourceContent(l,y)}),i},s.prototype.addMapping=function(a){var c=e.getArg(a,"generated"),u=e.getArg(a,"original",null),i=e.getArg(a,"source",null),l=e.getArg(a,"name",null);!this._skipValidation&&this._validateMapping(c,u,i,l)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),l!=null&&(l=String(l),this._names.has(l)||this._names.add(l)),this._mappings.add({generatedLine:c.line,generatedColumn:c.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:i,name:l}))},s.prototype.setSourceContent=function(a,c){var u=a;this._sourceRoot!=null&&(u=e.relative(this._sourceRoot,u)),c!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(u)]=c):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(a,c,u){var i=c;if(c==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=a.file}var l=this._sourceRoot;l!=null&&(i=e.relative(l,i));var d=new n,y=new n;this._mappings.unsortedForEach(function(g){if(g.source===i&&g.originalLine!=null){var S=a.originalPositionFor({line:g.originalLine,column:g.originalColumn});S.source!=null&&(g.source=S.source,u!=null&&(g.source=e.join(u,g.source)),l!=null&&(g.source=e.relative(l,g.source)),g.originalLine=S.line,g.originalColumn=S.column,S.name!=null&&(g.name=S.name))}var T=g.source;T!=null&&!d.has(T)&&d.add(T);var P=g.name;P!=null&&!y.has(P)&&y.add(P)},this),this._sources=d,this._names=y,a.sources.forEach(function(g){var S=a.sourceContentFor(g);S!=null&&(u!=null&&(g=e.join(u,g)),l!=null&&(g=e.relative(l,g)),this.setSourceContent(g,S))},this)},s.prototype._validateMapping=function(a,c,u,i){if(c&&typeof c.line!="number"&&typeof c.column!="number"){var l="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(l),!1;throw new Error(l)}if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!c&&!u&&!i)){if(a&&"line"in a&&"column"in a&&c&&"line"in c&&"column"in c&&a.line>0&&a.column>=0&&c.line>0&&c.column>=0&&u)return;var l="Invalid mapping: "+JSON.stringify({generated:a,source:u,original:c,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(l),!1;throw new Error(l)}},s.prototype._serializeMappings=function(){for(var a=0,c=1,u=0,i=0,l=0,d=0,y="",g,S,T,P,Y=this._mappings.toArray(),ee=0,Le=Y.length;ee<Le;ee++){if(S=Y[ee],g="",S.generatedLine!==c)for(a=0;S.generatedLine!==c;)g+=";",c++;else if(ee>0){if(!e.compareByGeneratedPositionsInflated(S,Y[ee-1]))continue;g+=","}g+=t.encode(S.generatedColumn-a),a=S.generatedColumn,S.source!=null&&(P=this._sources.indexOf(S.source),g+=t.encode(P-d),d=P,g+=t.encode(S.originalLine-1-i),i=S.originalLine-1,g+=t.encode(S.originalColumn-u),u=S.originalColumn,S.name!=null&&(T=this._names.indexOf(S.name),g+=t.encode(T-l),l=T)),y+=g}return y},s.prototype._generateSourcesContent=function(a,c){return a.map(function(u){if(!this._sourcesContents)return null;c!=null&&(u=e.relative(c,u));var i=e.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},s.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},jt.SourceMapGenerator=s,jt}var qs=Rs();const or=new Set(["Atrule","Selector","Declaration"]);function Bs(t){const e=new qs.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},s={line:1,column:0},o={generated:s};let a=1,c=0,u=!1;const i=t.node;t.node=function(y){if(y.loc&&y.loc.start&&or.has(y.type)){const g=y.loc.start.line,S=y.loc.start.column-1;(r.line!==g||r.column!==S)&&(r.line=g,r.column=S,n.line=a,n.column=c,u&&(u=!1,(n.line!==s.line||n.column!==s.column)&&e.addMapping(o)),u=!0,e.addMapping({source:y.loc.source,original:r,generated:n}))}i.call(this,y),u&&or.has(y.type)&&(s.line=a,s.column=c)};const l=t.emit;t.emit=function(y,g,S){for(let T=0;T<y.length;T++)y.charCodeAt(T)===10?(a++,c=0):c++;l(y,g,S)};const d=t.result;return t.result=function(){return u&&e.addMapping(o),{css:d(),map:e}},t}const js=43,Us=45,Wt=(t,e)=>{if(t===$&&(t=e),typeof t=="string"){const n=t.charCodeAt(0);return n>127?32768:n<<8}return t},ar=[[x,x],[x,D],[x,ie],[x,se],[x,"-"],[x,E],[x,M],[x,N],[x,oe],[x,Z],[U,x],[U,D],[U,ie],[U,se],[U,"-"],[U,E],[U,M],[U,N],[U,oe],[z,x],[z,D],[z,ie],[z,se],[z,"-"],[z,E],[z,M],[z,N],[z,oe],[N,x],[N,D],[N,ie],[N,se],[N,"-"],[N,E],[N,M],[N,N],[N,oe],["#",x],["#",D],["#",ie],["#",se],["#","-"],["#",E],["#",M],["#",N],["#",oe],["-",x],["-",D],["-",ie],["-",se],["-","-"],["-",E],["-",M],["-",N],["-",oe],[E,x],[E,D],[E,ie],[E,se],[E,E],[E,M],[E,N],[E,"%"],[E,oe],["@",x],["@",D],["@",ie],["@",se],["@","-"],["@",oe],[".",E],[".",M],[".",N],["+",E],["+",M],["+",N],["/","*"]],Vs=ar.concat([[x,z],[N,z],[z,z],[U,Z],[U,Oe],[U,X],[M,M],[M,N],[M,D],[M,"-"],[O,x],[O,D],[O,M],[O,N],[O,z],[O,"-"]]);function lr(t){const e=new Set(t.map(([n,r])=>Wt(n)<<16|Wt(r)));return function(n,r,s){const o=Wt(r,s),a=s.charCodeAt(0);return(a===Us&&r!==x&&r!==D&&r!==oe||a===js?e.has(n<<16|a<<8):e.has(n<<16|o))&&this.emit(" ",H,!0),o}}const Gs=lr(ar),cr=lr(Vs),ur=Object.freeze(Object.defineProperty({__proto__:null,safe:cr,spec:Gs},Symbol.toStringTag,{value:"Module"})),Hs=92;function Ws(t,e){if(typeof e=="function"){let n=null;t.children.forEach(r=>{n!==null&&e.call(this,n),this.node(r),n=r});return}t.children.forEach(this.node,this)}function Ks(t){Vn(t,(e,n,r)=>{this.token(e,t.slice(n,r))})}function Qs(t){const e=new Map;for(let[n,r]of Object.entries(t.node))typeof(r.generate||r)=="function"&&e.set(n,r.generate||r);return function(n,r){let s="",o=0,a={node(u){if(e.has(u.type))e.get(u.type).call(c,u);else throw new Error("Unknown node type: "+u.type)},tokenBefore:cr,token(u,i){o=this.tokenBefore(o,u,i),this.emit(i,u,!1),u===$&&i.charCodeAt(0)===Hs&&this.emit(`
7
- `,H,!0)},emit(u){s+=u},result(){return s}};r&&(typeof r.decorator=="function"&&(a=r.decorator(a)),r.sourceMap&&(a=Bs(a)),r.mode in ur&&(a.tokenBefore=ur[r.mode]));const c={node:u=>a.node(u),children:Ws,token:(u,i)=>a.token(u,i),tokenize:Ks};return a.node(n),a.result()}}function Js(t){this.token(U,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(Je,";")}function Ys(t){this.children(t)}function Xs(t){this.token(wt,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(Je,";")}),this.token(At,"}")}function Zs(t){this.token($,"["),this.children(t),this.token($,"]")}function eo(){this.token(oe,"-->")}function to(){this.token(Nn,"<!--")}function no(t){this.token(ue,"/*"+t.value+"*/")}function ro(t){t.children.forEach(e=>{e.type==="Condition"?(this.token(Z,"("),this.node(e),this.token(O,")")):this.node(e)})}function io(t){this.token(x,t.property),this.token(X,":"),this.node(t.value),t.important&&(this.token($,"!"),this.token(x,t.important===!0?"important":t.important))}function so(t){this.children(t,e=>{e.type==="Declaration"&&this.token(Je,";")})}function oo(t){this.token(N,t.value+t.unit)}function ao(t){this.token(Z,"("),this.token(x,t.name),t.value!==null&&(this.token(X,":"),this.node(t.value)),this.token(O,")")}function lo(t){this.token(D,t.feature+"("),this.node(t.value),this.token(O,")")}function co(t){this.token(Z,"("),this.node(t.left),this.tokenize(t.leftComparison),this.node(t.middle),t.right&&(this.tokenize(t.rightComparison),this.node(t.right)),this.token(O,")")}function uo(t){this.token(D,t.name+"("),this.children(t),this.token(O,")")}function ho(t){t.function?this.token(D,t.function+"("):this.token(Z,"("),this.children(t),this.token(O,")")}function fo(t){this.token(z,"#"+t.value)}function po(t){this.tokenize(t.name)}function mo(t){this.children(t,()=>this.token(Ie,","))}function go(t){t.mediaType?(t.modifier&&this.token(x,t.modifier),this.token(x,t.mediaType),t.condition&&(this.token(x,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}function ko(t){this.children(t,()=>this.token(Ie,","))}function yo(t){this.token(E,t.value)}function So(t){this.token(Z,"("),this.children(t),this.token(O,")")}function xo(t){this.node(t.left),this.token($,"/"),t.right?this.node(t.right):this.node(E,1)}function Co(t){this.node(t.prelude),this.node(t.block)}function bo(t){t.root&&(this.token(Z,"("),this.node(t.root),this.token(O,")")),t.limit&&(this.token(x,"to"),this.token(Z,"("),this.node(t.limit),this.token(O,")"))}function vo(t){this.children(t)}function wo(t){this.token(Z,"("),this.node(t.declaration),this.token(O,")")}function Ao(t){this.tokenize(t.value)}const Lo=32,Eo=92,_o=34,To=39,Oo=40,Io=41;function No(t){let e="",n=!1;for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);if(s===0){e+="�";continue}if(s<=31||s===127){e+="\\"+s.toString(16),n=!0;continue}s===Lo||s===Eo||s===_o||s===To||s===Oo||s===Io?(e+="\\"+t.charAt(r),n=!1):(n&&qe(s)&&(e+=" "),e+=t.charAt(r),n=!1)}return"url("+e+")"}function $o(t){this.token(ie,No(t.value))}function Do(t){this.children(t)}function Po(t){this.token(H,t.value)}const Mo=Qs({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Bi,Atrule:Js,AtrulePrelude:Ys,AttributeSelector:Ki,Block:Xs,Brackets:Zs,CDC:eo,CDO:to,ClassSelector:Yi,Combinator:ns,Comment:no,Condition:ro,Declaration:io,DeclarationList:so,Dimension:oo,Feature:ao,FeatureFunction:lo,FeatureRange:co,Function:uo,GeneralEnclosed:ho,Hash:fo,IdSelector:os,Identifier:is,Layer:po,LayerList:mo,MediaQuery:go,MediaQueryList:ko,NestingSelector:cs,Nth:hs,Number:yo,Operator:ps,Parentheses:So,Percentage:ms,PseudoClassSelector:ks,PseudoElementSelector:Ss,Ratio:xo,Raw:bs,Rule:Co,Scope:bo,Selector:ws,SelectorList:Ls,String:Is,StyleSheet:vo,SupportsDeclaration:wo,TypeSelector:Ds,UnicodeRange:Ao,Url:$o,Value:Do,WhiteSpace:Po},Symbol.toStringTag,{value:"Module"}))}),Ue=(t,e)=>t.a===e.a?t.b===e.b?t.c-e.c:t.b-e.b:t.a-e.a,hr=(t,e)=>Ue(t,e)===0,fr=(t,e)=>Ue(t,e)>0,pr=(t,e)=>Ue(t,e)<0,dr=(t,e="ASC")=>{const n=t.sort(Ue);return e==="DESC"?n.reverse():n},mr=(...t)=>dr(t,"ASC"),gr=(...t)=>dr(t,"DESC"),Kt=(...t)=>gr(...t)[0],zo=(...t)=>mr(...t)[0];class Qt extends Error{constructor(){super("Manipulating a Specificity instance is not allowed. Instead, create a new Specificity()")}}class Fo{constructor(e,n=null){this.value=e,this.selector=n}get a(){return this.value.a}set a(e){throw new Qt}get b(){return this.value.b}set b(e){throw new Qt}get c(){return this.value.c}set c(e){throw new Qt}selectorString(){return typeof this.selector=="string"||this.selector instanceof String?this.selector:this.selector instanceof Object&&this.selector.type==="Selector"?Mo(this.selector):""}toObject(){return this.value}toArray(){return[this.value.a,this.value.b,this.value.c]}toString(){return`(${this.value.a},${this.value.b},${this.value.c})`}toJSON(){return{selector:this.selectorString(),asObject:this.toObject(),asArray:this.toArray(),asString:this.toString()}}isEqualTo(e){return hr(this,e)}isGreaterThan(e){return fr(this,e)}isLessThan(e){return pr(this,e)}static calculate(e){return Ve(e)}static calculateForAST(e){return ft(e)}static compare(e,n){return Ue(e,n)}static equals(e,n){return hr(e,n)}static lessThan(e,n){return pr(e,n)}static greaterThan(e,n){return fr(e,n)}static min(...e){return zo(...e)}static max(...e){return Kt(...e)}static sortAsc(...e){return mr(...e)}static sortDesc(...e){return gr(...e)}}const ft=t=>{if(!t||t.type!=="Selector")throw new TypeError("Passed in source is not a Selector AST");let e=0,n=0,r=0;return t.children.forEach(s=>{switch(s.type){case"IdSelector":e+=1;break;case"AttributeSelector":case"ClassSelector":n+=1;break;case"PseudoClassSelector":switch(s.name.toLowerCase()){case"where":break;case"-webkit-any":case"any":s.children&&(n+=1);break;case"-moz-any":case"is":case"matches":case"not":case"has":if(s.children){const a=Kt(...Ve(s.children.first));e+=a.a,n+=a.b,r+=a.c}break;case"nth-child":case"nth-last-child":if(n+=1,s.children&&s.children.first.selector){const a=Kt(...Ve(s.children.first.selector));e+=a.a,n+=a.b,r+=a.c}break;case"host-context":case"host":if(n+=1,s.children){const a={type:"Selector",children:[]};let c=!1;s.children.first.children.forEach(i=>{if(c)return!1;if(i.type==="Combinator")return c=!0,!1;a.children.push(i)});const u=Ve(a)[0];e+=u.a,n+=u.b,r+=u.c}break;case"after":case"before":case"first-letter":case"first-line":r+=1;break;default:n+=1;break}break;case"PseudoElementSelector":switch(s.name){case"slotted":if(r+=1,s.children){const a={type:"Selector",children:[]};let c=!1;s.children.first.children.forEach(i=>{if(c)return!1;if(i.type==="Combinator")return c=!0,!1;a.children.push(i)});const u=Ve(a)[0];e+=u.a,n+=u.b,r+=u.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(s.children&&s.children.first.value==="*")break;r+=1;break;default:r+=1;break}break;case"TypeSelector":let o=s.name;o.includes("|")&&(o=o.split("|")[1]),o!=="*"&&(r+=1);break}}),new Fo({a:e,b:n,c:r},t)},Ro=t=>{if(typeof t=="string"||t instanceof String)try{return Zn(t,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source '${t}' to SelectorList: ${e.message}`)}if(t instanceof Object){if(t.type&&["Selector","SelectorList"].includes(t.type))return t;if(t.type&&t.type==="Raw")try{return Zn(t.value,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source to SelectorList: ${e.message}`)}throw new TypeError("Passed in source is an Object but no AST / AST of the type Selector or SelectorList")}throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.")},Ve=t=>{if(!t)return[];const e=Ro(t);if(e.type==="Selector")return[ft(t)];if(e.type==="SelectorList"){const n=[];return e.children.forEach(r=>{const s=ft(r);n.push(s)}),n}};function Jt(t,e){return e>=65&&e<=90&&(e=e|32),t===e}function Q(t,e){if(t===e)return!0;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Jt(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}function ge(t,e){if(t===e)return!0;let n=e.length,r=n-t.length;if(r<0)return!1;for(let s=n-1;s>=r;s--)if(Jt(t.charCodeAt(s-r),e.charCodeAt(s))===!1)return!1;return!0}function Yt(t,e){if(t===e)return!0;let n=t.length;if(e.length<n)return!1;for(let r=0;r<n;r++)if(Jt(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}const qo="Atrule",Bo="MediaQuery",jo="MediaFeature",Uo="Rule",Xt="Selector",kr="TypeSelector",Ge="PseudoClassSelector",yr="AttributeSelector",Sr="PseudoElementSelector",Zt="Declaration",Vo="Value",de="Identifier",Go="Nth",Ho="Combinator",Wo="Number",xr="Dimension",De="Operator",Ko="Hash",Qo="Url",en="Function";function Cr(t,e,n){let r=t.value.children.first;return Q(e,t.property)&&r.type===de&&Q(n,r.name)}function br(t){let e=!1;return ce(t,function(n){if(n.type===Zt&&(Cr(n,"-webkit-appearance","none")||Cr(n,"-moz-appearance","meterbar")))return e=!0,this.break}),e}function vr(t){let e=!1;return ce(t,function(n){let r=n.children,s=n.name,o=n.value;if(n.type===Bo&&r.size===1&&r.first.type===de){let a=r.first.name;if(Yt("\\0",a)||ge("\\9 ",a))return e=!0,this.break}else if(n.type===jo){if(o&&o.unit&&o.unit==="\\0")return e=!0,this.break;if(Q("-moz-images-in-menus",s)||Q("min--moz-device-pixel-ratio",s)||Q("-ms-high-contrast",s))return e=!0,this.break;if(Q("min-resolution",s)&&o&&Q(".001",o.value)&&Q("dpcm",o.unit))return e=!0,this.break;if(Q("-webkit-min-device-pixel-ratio",s)&&o&&o.value&&(Q("0",o.value)||Q("10000",o.value)))return e=!0,this.break}}),e}const wr=45;function ke(t){return t.charCodeAt(0)===wr&&t.charCodeAt(1)!==wr&&t.indexOf("-",2)!==-1}class ae{constructor(e){this.set=new Set(e)}has(e){return this.set.has(e.toLowerCase())}}function Ar(t,e){let n=[];return ce(t,{visit:Xt,enter:function(r){n.push(e(r))}}),n}const Lr=new ae(["nth-child","where","not","is","has","nth-last-child","matches","-webkit-any","-moz-any"]);function tn(t){let e=!1;return ce(t,function(n){if(n.type===yr){let r=n.name.name;if(Q("role",r)||Yt("aria-",r))return e=!0,this.break}else if(n.type===Ge&&Lr.has(n.name)){let r=Ar(n,tn);for(let s of r)if(s===!0){e=!0;break}return this.skip}}),e}function Er(t){let e=!1;return ce(t,function(n){let r=n.type;if((r===Sr||r===kr||r===Ge)&&ke(n.name))return e=!0,this.break}),e}function Jo(t){let e=[];return ce(t,function(n){n.type===Ge&&e.push(n.name)}),e.length===0?!1:e}function nn(t){let e=0;return ce(t,function(n){let r=n.type;if(!(r===Xt||r===Go)){if(e++,(r===Sr||r===kr||r===Ge)&&ke(n.name)&&e++,r===yr)return n.value&&e++,this.skip;if(r===Ge&&Lr.has(n.name)){let s=Ar(n,nn);if(s.length===0)return;for(let o of s)e+=o;return this.skip}}}),e}function Yo(t,e){ce(t,function(n,r){if(n.type===Ho){let s=n.loc,o=n.name;if(s===null){let a=r.prev.data.loc.end,c={offset:a.offset,line:a.line,column:a.column};e({name:o,loc:{start:c,end:{offset:c.offset+1,line:c.line,column:c.column+1}}})}else e({name:o,loc:s})}})}const Xo=new ae(["white","black","red","gray","silver","grey","green","orange","blue","dimgray","whitesmoke","lightgray","lightgrey","yellow","gold","pink","gainsboro","magenta","purple","darkgray","navy","darkred","teal","maroon","darkgrey","tomato","darkorange","brown","crimson","lightyellow","slategray","salmon","lightgreen","lightblue","orangered","aliceblue","dodgerblue","lime","darkblue","darkgoldenrod","skyblue","royalblue","darkgreen","ivory","olive","aqua","turquoise","cyan","khaki","beige","snow","ghostwhite","limegreen","coral","dimgrey","hotpink","midnightblue","firebrick","indigo","wheat","mediumblue","lightpink","plum","azure","violet","lavender","deepskyblue","darkslategrey","goldenrod","cornflowerblue","lightskyblue","indianred","yellowgreen","saddlebrown","palegreen","bisque","tan","antiquewhite","steelblue","forestgreen","fuchsia","mediumaquamarine","seagreen","sienna","deeppink","mediumseagreen","peru","greenyellow","lightgoldenrodyellow","orchid","cadetblue","navajowhite","lightsteelblue","slategrey","linen","lightseagreen","darkcyan","lightcoral","aquamarine","blueviolet","cornsilk","lightsalmon","chocolate","lightslategray","floralwhite","darkturquoise","darkslategray","rebeccapurple","burlywood","chartreuse","lightcyan","lemonchiffon","palevioletred","darkslateblue","mediumpurple","lawngreen","slateblue","darkseagreen","blanchedalmond","mistyrose","darkolivegreen","seashell","olivedrab","peachpuff","darkviolet","powderblue","darkmagenta","lightslategrey","honeydew","palegoldenrod","darkkhaki","oldlace","mintcream","sandybrown","mediumturquoise","papayawhip","paleturquoise","mediumvioletred","thistle","springgreen","moccasin","rosybrown","lavenderblush","mediumslateblue","darkorchid","mediumorchid","darksalmon","mediumspringgreen"]),Zo=new ae(["accentcolor","accentcolortext","activetext","buttonborder","buttonface","buttontext","canvas","canvastext","field","fieldtext","graytext","highlight","highlighttext","linktext","mark","marktext","selecteditem","selecteditemtext","visitedtext"]),ea=new ae(["rgba","rgb","hsla","hsl","oklch","color","hwb","lch","lab","oklab"]),ta=new ae(["transparent","currentcolor"]),pt=new ae(["auto","none","inherit","initial","unset","revert","revert-layer"]);function dt(t){let e=t.children,n=e.size;if(!e||n>1||n===0)return!1;let r=e.first;return r.type===de&&pt.has(r.name)}const na=new ae(["caption","icon","menu","message-box","small-caption","status-bar"]),ra=new ae(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","smaller","larger"]),ia=44,_r=47;function rn(t){let e=t.children.first;return e===null?!1:e.type===de&&na.has(e.name)}function sa(t,e,n){let r=Array.from({length:2}),s,o;t.children.forEach(function(c,u){let i=u.prev?u.prev.data:void 0,l=u.next?u.next.data:void 0;if(c.type===de&&pt.has(c.name)&&n({type:"keyword",value:c.name}),l&&l.type===De&&l.value.charCodeAt(0)===_r){s=e(c);return}if(i&&i.type===De&&i.value.charCodeAt(0)===_r){o=e(c);return}if(l&&l.type===De&&l.value.charCodeAt(0)===ia&&!r[0]){r[0]=c,!s&&i&&(s=e(i));return}if(c.type!==Wo){if(u.next===null){r[1]=c,!s&&!r[0]&&i&&(s=e(i));return}if(c.type===de){let d=c.name;if(ra.has(d)){s=d;return}}}});let a=r[0]||r[1]?e({loc:{start:{offset:(r[0]||r[1]).loc.start.offset},end:{offset:r[1].loc.end.offset}}}):null;return{font_size:s,line_height:o,font_family:a}}const oa=new ae(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),aa=new ae(["cubic-bezier","steps"]);function la(t,e){let n=!1;for(let r of t){let s=r.type,o=r.name;s===De?n=!1:s===xr&&n===!1?(n=!0,e({type:"duration",value:r})):s===de?oa.has(o)?e({type:"fn",value:r}):pt.has(o)&&e({type:"keyword",value:r}):s===en&&aa.has(o)&&e({type:"fn",value:r})}}function sn(t){let e=t.children;if(!e)return!1;for(let n of e){let{type:r,name:s}=n;if(r===de&&ke(s)||r===en&&(ke(s)||sn(n)))return!0}return!1}class b{constructor(e=!1){this._items=new Map,this._total=0,e&&(this._nodes=[]),this._useLocations=e}p(e,n){let r=this._total;if(this._useLocations){let s=n.start,o=s.offset,a=r*4;this._nodes[a]=s.line,this._nodes[a+1]=s.column,this._nodes[a+2]=o,this._nodes[a+3]=n.end.offset-o}if(this._items.has(e)){this._items.get(e).push(r),this._total++;return}this._items.set(e,[r]),this._total++}size(){return this._total}c(){let e=new Map,n={},r=this._useLocations,s=this._items,o=this._nodes,a=s.size;s.forEach((i,l)=>{if(r){let d=i.map(function(y){let g=y*4;return{line:o[g],column:o[g+1],offset:o[g+2],length:o[g+3]}});e.set(l,d)}else n[l]=i.length});let c=this._total,u={total:c,totalUnique:a,unique:n,uniquenessRatio:c===0?0:a/c};return r&&(u.uniqueWithLocations=Object.fromEntries(e)),u}}class on{constructor(e){this._list=new b(e),this._contexts=new Map,this._useLocations=e}push(e,n,r){this._list.p(e,r),this._contexts.has(n)||this._contexts.set(n,new b(this._useLocations)),this._contexts.get(n).p(e,r)}count(){let e=new Map;for(let[n,r]of this._contexts.entries())e.set(n,r.c());return Object.assign(this._list.c(),{itemsPerContext:Object.fromEntries(e)})}}function ca(t){let e=new Map,n=-1,r=0,s=0,o=t.length;for(let a=0;a<o;a++){let c=t[a],u=(e.get(c)||0)+1;e.set(c,u),u>n&&(n=u,r=0,s=0),u>=n&&(r++,s+=c)}return s/r}class le{constructor(){this._items=[],this._sum=0}push(e){this._items.push(e),this._sum+=e}size(){return this._items.length}aggregate(){let e=this._items.length;if(e===0)return{min:0,max:0,mean:0,mode:0,range:0,sum:0};let n=this._items.slice().sort((c,u)=>c-u),r=n[0],s=n[e-1],o=ca(n),a=this._sum;return{min:r,max:s,mean:a/e,mode:o,range:s-r,sum:a}}toArray(){return this._items}}function Tr(t){if(an(t)||ke(t))return!1;let e=t.charCodeAt(0);return e===47||e===42||e===95||e===43||e===38||e===36||e===35}function an(t){return t.length<3?!1:t.charCodeAt(0)===45&&t.charCodeAt(1)===45}function J(t,e){return an(e)?!1:ge(t,e)}function ua(t){return ke(t)?t.slice(t.indexOf("-",2)+1):t}function ha(t){let e=5,n=t.indexOf(";"),r=t.indexOf(",");return n===-1||r!==-1&&r<n?t.substring(e,r):t.substring(e,n)}function fa(t){let e=t.children;if(e){let n=e.last;return n&&n.type===de&&ge("\\9",n.name)}return!1}let pa=new ae(["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius"]);function j(t,e){return e===0?0:t/e}let da={useLocations:!1};function ma(t,e={}){let r=Object.assign({},da,e).useLocations===!0,s=Date.now();function o(m){return a(m).trim()}function a(m){let A=m.loc;return t.substring(A.start.offset,A.end.offset)}let c=0,u=0,i=0,l={total:0,unique:new Map},d=Date.now(),y=Fe(t,{parseCustomProperty:!0,positions:!0,onComment:function(m){c++,u+=m.length}}),g=Date.now(),S=y.loc.end.line-y.loc.start.line+1,T=0,P=new le,Y=[],ee=new b(r),Le=new b(r),te=new b(r),mt=new b(r),gt=new b(r),kt=new b(r),h=new b(r),f=new b(r),k=new b(r),p=new b(r),ne=new b(r),V=new b(r),xe=0,R=0,Ce=new le,ye=new le,cn=new le,Or=new b(r),Ir=new b(r),Nr=new b(r),un=new b(r),$r=new Set,hn=new b(r),Ee,_e,Dr=new le,Pr=new le,Mr=new le,zr=new b(r),yt=new le,Fr=new b(r),Rr=[],fn=new b(r),pn=new b(r),qr=new b(r),Br=new b(r),jr=new Set,He=0,Ur=new le,St=0,dn=0,mn=new b(r),We=new b(r),gn=new b(r),kn=new b(r),xt=new b(r),Ke=new le,yn=new le,Vr=new b(r),Sn=new b(r),Gr=new b(r),Hr=new b(r),Wr=new b(r),xn=new b(r),Cn=new b(r),bn=new b(r),Ct=new b(r),bt=new b(r),Pe=new on(r),Me=new b(r),vn=new on(r),Kr=new b(r),Qe=new b(r),Qr=new on(r);ce(y,function(m){switch(m.type){case qo:{T++;let A=m.name;if(A==="font-face"){let I={};r&&ee.p(m.loc.start.offset,m.loc),m.block.children.forEach(v=>{v.type===Zt&&(I[v.property]=o(v.value))}),Y.push(I),P.push(1);break}let C=1;if(m.prelude!==null){let I=m.prelude,v=I&&o(m.prelude),L=I.loc;if(A==="media")mt.p(v,L),vr(I)&&(gt.p(v,L),C++);else if(A==="supports")h.p(v,L),br(I)&&(f.p(v,L),C++);else if(ge("keyframes",A)){let w="@"+A+" "+v;ke(A)&&(p.p(w,L),C++),k.p(w,L)}else A==="import"?te.p(v,L):A==="charset"?kt.p(v,L):A==="container"?ne.p(v,L):A==="layer"?v.split(",").forEach(w=>Le.p(w.trim(),L)):A==="property"&&V.p(v,L)}else A==="layer"&&(Le.p("<anonymous>",m.loc),C++);P.push(C);break}case Uo:{let A=m.prelude,C=m.block,I=A.children,v=C.children,L=I?I.size:0,w=v?v.size:0;Ce.push(L+w),Or.p(L+w,m.loc),ye.push(L),Ir.p(L,A.loc),cn.push(w),Nr.p(w,C.loc),xe++,w===0&&R++;break}case Xt:{let A=o(m);if(this.atrule&&ge("keyframes",this.atrule.name))return un.p(A,m.loc),this.skip;tn(m)&&pn.p(A,m.loc);let C=Jo(m);if(C!==!1)for(let B of C)qr.p(B,m.loc);let I=nn(m);Er(m)&&hn.p(A,m.loc),$r.add(A),yt.push(I),Fr.p(I,m.loc);let v=ft(m).toArray(),[L,w,_]=v;return zr.p(v.toString(),m.loc),Dr.push(L),Pr.push(w),Mr.push(_),Ee===void 0&&(Ee=v),_e===void 0&&(_e=v),_e!==void 0&&ln(_e,v)<0&&(_e=v),Ee!==void 0&&ln(Ee,v)>0&&(Ee=v),Rr.push(v),L>0&&fn.p(A,m.loc),Yo(m,function(re){Br.p(re.name,re.loc)}),this.skip}case xr:{if(!this.declaration)break;let A=m.unit;return ge("\\9",A)?vn.push(A.substring(0,A.length-2),this.declaration.property,m.loc):vn.push(A,this.declaration.property,m.loc),this.skip}case Qo:{if(Yt("data:",m.value)){let A=m.value,C=A.length,I=ha(A);l.total++,i+=C;let v={line:m.loc.start.line,column:m.loc.start.column,offset:m.loc.start.offset,length:m.loc.end.offset-m.loc.start.offset};if(l.unique.has(I)){let L=l.unique.get(I);L.count++,L.size+=C,l.unique.set(I,L),r&&L.uniqueWithLocations.push(v)}else{let L={count:1,size:C};r&&(L.uniqueWithLocations=[v]),l.unique.set(I,L)}}break}case Vo:{if(dt(m)){yn.push(1),Qe.p(o(m),m.loc);break}let A=this.declaration,{property:C,important:I}=A,v=1;sn(m)&&(Vr.p(o(m),m.loc),v++),typeof I=="string"&&(Sn.p(a(m)+"!"+I,m.loc),v++),fa(m)&&(Sn.p(o(m),m.loc),v++);let L=m.children,w=m.loc;if(yn.push(v),J("z-index",C))return Gr.p(o(m),w),this.skip;if(J("font",C)){if(rn(m))return;let{font_size:_,line_height:B,font_family:re}=sa(m,o,function(be){be.type==="keyword"&&Qe.p(be.value,w)});re&&xn.p(re,w),_&&Cn.p(_,w),B&&bn.p(B,w);break}else if(J("font-size",C)){rn(m)||Cn.p(o(m),w);break}else if(J("font-family",C)){rn(m)||xn.p(o(m),w);break}else if(J("line-height",C))bn.p(o(m),w);else if(J("transition",C)||J("animation",C)){la(L,function(_){_.type==="fn"?Ct.p(o(_.value),w):_.type==="duration"?bt.p(o(_.value),w):_.type==="keyword"&&Qe.p(o(_.value),w)});break}else if(J("animation-duration",C)||J("transition-duration",C)){L&&L.size>1?L.forEach(_=>{_.type!==De&&bt.p(o(_),w)}):bt.p(o(m),w);break}else if(J("transition-timing-function",C)||J("animation-timing-function",C)){L&&L.size>1?L.forEach(_=>{_.type!==De&&Ct.p(o(_),w)}):Ct.p(o(m),w);break}else if(pa.has(ua(C))){dt(m)||Qr.push(o(m),C,w);break}else J("text-shadow",C)?dt(m)||Hr.p(o(m),w):J("box-shadow",C)&&(dt(m)||Wr.p(o(m),w));ce(m,function(_){let B=_.name;switch(_.type){case Ko:{let re=_.value.length;return ge("\\9",_.value)&&(re=re-2),Pe.push("#"+_.value,C,w),Me.p("hex"+re,w),this.skip}case de:{pt.has(B)&&Qe.p(B,w);let re=B.length;if(re>20||re<3)return this.skip;if(ta.has(B)){let be=o(_);Pe.push(be,C,w),Me.p(B.toLowerCase(),w);return}if(Xo.has(B)){let be=o(_);Pe.push(be,C,w),Me.p("named",w);return}if(Zo.has(B)){let be=o(_);Pe.push(be,C,w),Me.p("system",w);return}return this.skip}case en:{if(Q("var",B))return this.skip;if(ea.has(B)){Pe.push(o(_),C,_.loc),Me.p(B.toLowerCase(),_.loc);return}if(ge("gradient",B)){Kr.p(o(_),_.loc);return}}}});break}case Zt:{if(this.atrulePrelude!==null)return this.skip;He++;let A=1;jr.add(o(m)),m.important===!0&&(St++,A++,this.atrule&&ge("keyframes",this.atrule.name)&&(dn++,A++)),Ur.push(A);let{property:C,loc:{start:I}}=m,v={start:{line:I.line,column:I.column,offset:I.offset},end:{offset:I.offset+C.length}};We.p(C,v),ke(C)?(kn.p(C,v),Ke.push(2)):Tr(C)?(gn.p(C,v),Ke.push(2)):an(C)?(xt.p(C,v),Ke.push(m.important?3:2),m.important===!0&&mn.p(C,v)):Ke.push(1);break}}});let Jr=jr.size,ze=yt.size(),wn=Dr.aggregate(),An=Pr.aggregate(),Ln=Mr.aggregate(),Yr=$r.size,F=Object.assign,Xr=t.length,En=Y.length,Zr=P.aggregate(),ei=yt.aggregate(),ti=Ur.aggregate(),ni=Ke.aggregate(),ri=yn.aggregate();return{stylesheet:{sourceLinesOfCode:T+ze+He+un.size(),linesOfCode:S,size:Xr,complexity:Zr.sum+ei.sum+ti.sum+ni.sum+ri.sum,comments:{total:c,size:u},embeddedContent:{size:{total:i,ratio:j(i,Xr)},types:{total:l.total,totalUnique:l.unique.size,uniquenessRatio:j(l.unique.size,l.total),unique:Object.fromEntries(l.unique)}}},atrules:{fontface:F({total:En,totalUnique:En,unique:Y,uniquenessRatio:En===0?0:1},r?{uniqueWithLocations:ee.c().uniqueWithLocations}:{}),import:te.c(),media:F(mt.c(),{browserhacks:gt.c()}),charset:kt.c(),supports:F(h.c(),{browserhacks:f.c()}),keyframes:F(k.c(),{prefixed:F(p.c(),{ratio:j(p.size(),k.size())})}),container:ne.c(),layer:Le.c(),property:V.c(),total:T,complexity:Zr},rules:{total:xe,empty:{total:R,ratio:j(R,xe)},sizes:F(Ce.aggregate(),{items:Ce.toArray()},Or.c()),selectors:F(ye.aggregate(),{items:ye.toArray()},Ir.c()),declarations:F(cn.aggregate(),{items:cn.toArray()},Nr.c())},selectors:{total:ze,totalUnique:Yr,uniquenessRatio:j(Yr,ze),specificity:F({min:_e===void 0?[0,0,0]:_e,max:Ee===void 0?[0,0,0]:Ee,sum:[wn.sum,An.sum,Ln.sum],mean:[wn.mean,An.mean,Ln.mean],mode:[wn.mode,An.mode,Ln.mode],items:Rr},zr.c()),complexity:F(ei,Fr.c(),{items:yt.toArray()}),id:F(fn.c(),{ratio:j(fn.size(),ze)}),pseudoClasses:qr.c(),accessibility:F(pn.c(),{ratio:j(pn.size(),ze)}),keyframes:un.c(),prefixed:F(hn.c(),{ratio:j(hn.size(),ze)}),combinators:Br.c()},declarations:{total:He,totalUnique:Jr,uniquenessRatio:j(Jr,He),importants:{total:St,ratio:j(St,He),inKeyframes:{total:dn,ratio:j(dn,St)}},complexity:ti},properties:F(We.c(),{prefixed:F(kn.c(),{ratio:j(kn.size(),We.size())}),custom:F(xt.c(),{ratio:j(xt.size(),We.size()),importants:F(mn.c(),{ratio:j(mn.size(),xt.size())})}),browserhacks:F(gn.c(),{ratio:j(gn.size(),We.size())}),complexity:ni}),values:{colors:F(Pe.count(),{formats:Me.c()}),gradients:Kr.c(),fontFamilies:xn.c(),fontSizes:Cn.c(),lineHeights:bn.c(),zindexes:Gr.c(),textShadows:Hr.c(),boxShadows:Wr.c(),borderRadiuses:Qr.count(),animations:{durations:bt.c(),timingFunctions:Ct.c()},prefixes:Vr.c(),browserhacks:Sn.c(),units:vn.count(),complexity:ri,keywords:Qe.c()},__meta__:{parseTime:g-d,analyzeTime:Date.now()-g,total:Date.now()-s}}}function ln(t,e){return t[0]===e[0]?t[1]===e[1]?e[2]-t[2]:e[1]-t[1]:e[0]-t[0]}q.analyze=ma,q.compareSpecificity=ln,q.hasVendorPrefix=ke,q.isAccessibilitySelector=tn,q.isMediaBrowserhack=vr,q.isPropertyHack=Tr,q.isSelectorPrefixed=Er,q.isSupportsBrowserhack=br,q.isValuePrefixed=sn,q.selectorComplexity=nn,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});