ode(n),r=n});return}e.children.forEach(this.node,this)}function Ac(e){Le(e,(t,r,n)=>{this.token(t,e.slice(r,n))})}function wa(e){let t=new Map;for(let r in e.node){let n=e.node[r];typeof(n.generate||n)=="function"&&t.set(r,n.generate||n)}return function(r,n){let o="",i=0,a={node(c){if(t.has(c.type))t.get(c.type).call(l,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:_r,token(c,s){i=this.tokenBefore(i,c,s),this.emit(s,c,!1),c===9&&s.charCodeAt(0)===Sc&&this.emit(` `,13,!0)},emit(c){o+=c},result(){return o}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=ya(a)),n.mode in $t&&(a.tokenBefore=$t[n.mode]));let l={node:c=>a.node(c),children:Cc,token:(c,s)=>a.token(c,s),tokenize:Ac};return a.node(r),a.result()}}function va(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof w)&&(r.children=new w().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof w&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:Ur}=Object.prototype,bt=function(){};function Sa(e){return typeof e=="function"?e:bt}function Ca(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Ec(e,t){let r=t.structure,n=[];for(let o in r){if(Ur.call(r,o)===!1)continue;let i=r[o],a={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let l of i)l===null?a.nullable=!0:typeof l=="string"?a.type="node":Array.isArray(l)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function Tc(e){let t={};for(let r in e.node)if(Ur.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Ec(r,n)}return t}function Aa(e,t){let r=e.fields.slice(),n=e.context,o=typeof n=="string";return t&&r.reverse(),function(i,a,l,c){let s;o&&(s=a[n],a[n]=i);for(let u of r){let p=i[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(c,!1):p.reduce(c,!1))return!0}else if(l(p))return!0}}o&&(a[n]=s)}}function Ea({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function Ta(e){let t=Tc(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let s in t)Ur.call(t,s)&&t[s]!==null&&(r[s]=Aa(t[s],!1),n[s]=Aa(t[s],!0));let a=Ea(r),l=Ea(n),c=function(s,u){function p(C,D,Ae){let B=h.call(N,C,D,Ae);return B===o?!0:B===i?!1:!!(b.hasOwnProperty(C.type)&&b[C.type](C,N,p,T)||m.call(N,C,D,Ae)===o)}let h=bt,m=bt,b=r,T=(C,D,Ae,B)=>C||p(D,Ae,B),N={break:o,skip:i,root:s,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")h=u;else if(u&&(h=Sa(u.enter),m=Sa(u.leave),u.reverse&&(b=n),u.visit)){if(a.hasOwnProperty(u.visit))b=u.reverse?l[u.visit]:a[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=Ca(h,u.visit),m=Ca(m,u.visit)}if(h===bt&&m===bt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(s)};return c.break=o,c.skip=i,c.find=function(s,u){let p=null;return c(s,function(h,m,b){if(u.call(this,h,m,b))return p=h,o}),p},c.findLast=function(s,u){let p=null;return c(s,{reverse:!0,enter(h,m,b){if(u.call(this,h,m,b))return p=h,o}}),p},c.findAll=function(s,u){let p=[];return c(s,function(h,m,b){u.call(this,h,m,b)&&p.push(h)}),p},c}function Lc(e){return e}function Pc(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function Ic(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function Oc(e,t,r,n){let o=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",i=e.terms.map(a=>jr(a,t,r,n)).join(o);return e.explicit||r?(n||i[0]===","?"[":"[ ")+i+(n?"]":" ]"):i}function jr(e,t,r,n){let o;switch(e.type){case"Group":o=Oc(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return jr(e.term,t,r,n)+t(Pc(e),e);case"Type":o="<"+e.name+(e.opts?t(Ic(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function Ge(e,t){let r=Lc,n=!1,o=!1;return typeof t=="function"?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),typeof t.decorate=="function"&&(r=t.decorate)),jr(e,r,n,o)}var La={offset:0,line:1,column:1};function Dc(e,t){let r=e.tokens,n=e.longestMatch,o=n1?(u=Xt(i||t,"end")||yt(La,s),p=yt(u)):(u=Xt(i,"start")||yt(Xt(t,"start")||La,s.slice(0,a)),p=Xt(i,"end")||yt(u,s.substr(a,l))),{css:s,mismatchOffset:a,mismatchLength:l,start:u,end:p}}function Xt(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?yt(r):r:null}function yt({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let i=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=i.length-1,o.column=i.length===1?o.column+n.length:i.pop().length+1}return o}var Ke=function(e,t){let r=Re("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},Pa=function(e,t,r,n){let o=Re("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:l,start:c,end:s}=Dc(n,r);return o.rawMessage=e,o.syntax=t?Ge(t):"",o.css=i,o.mismatchOffset=a,o.mismatchLength=l,o.message=e+` syntax: `+o.syntax+` value: `+(i||"")+` --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,c),o.loc={source:r&&r.loc&&r.loc.source||"",start:c,end:s},o};var Zt=new Map,Qe=new Map,Jt=45,Z=Nc,me=Mc;function er(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Jt&&e.charCodeAt(t+1)===Jt}function Ia(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Jt&&e.charCodeAt(t+1)!==Jt){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function Nc(e){if(Zt.has(e))return Zt.get(e);let t=e.toLowerCase(),r=Zt.get(t);if(r===void 0){let n=er(t,0),o=n?"":Ia(t,0);r=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:n})}return Zt.set(e,r),r}function Mc(e){if(Qe.has(e))return Qe.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=er(t,r.length);if(!n&&(t=t.toLowerCase(),Qe.has(t))){let l=Qe.get(t);return Qe.set(e,l),l}let o=n?"":Ia(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return Qe.set(e,a),a}var tr=["initial","inherit","unset","revert","revert-layer"];var kt=43,de=45,qr=110,$e=!0,zc=!1;function Wr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function xt(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Pe(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===kt||o===de){if(r)return 0;t++}for(;t6)return 0}return n}function rr(e,t,r){if(!e)return 0;for(;Vr(r(t),Da);){if(++e>6)return 0;t++}return t}function Gr(e,t){let r=0;if(e===null||e.type!==1||!xe(e.value,0,Bc)||(e=t(++r),e===null))return 0;if(Vr(e,Fc))return e=t(++r),e===null?0:e.type===1?rr(wt(e,0,!0),++r,t):Vr(e,Da)?rr(1,++r,t):0;if(e.type===10){let n=wt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!_c(e,Oa)||!wt(e,1,!1)?0:r+1:rr(n,r,t))}return e.type===12?rr(wt(e,1,!0),++r,t):0}var Uc=["calc(","-moz-calc(","-webkit-calc("],Kr=new Map([[2,22],[21,22],[19,20],[23,24]]),jc=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],qc=["deg","grad","rad","turn"],Hc=["s","ms"],Wc=["hz","khz"],Yc=["dpi","dpcm","dppx","x"],Vc=["fr"],Gc=["db"],Kc=["st"];function ue(e,t){return te.max&&typeof e.max!="string")return!0}return!1}function Qc(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Kr.get(e.type);break}o++}while(e=t(o));return o}function le(e){return function(t,r,n){return t===null?0:t.type===2&&Ra(t.value,Uc)?Qc(t,r):e(t,r,n)}}function z(e){return function(t){return t===null||t.type!==e?0:1}}function $c(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Ra(t,tr)||Ma(t,"default")?0:1}function Xc(e){return e===null||e.type!==1||ue(e.value,0)!==45||ue(e.value,1)!==45?0:1}function Zc(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),qa={" ":1,"&&":2,"||":3,"|":4};function sr(e){return e.substringToPos(e.findWsEnd(e.pos))}function Xe(e){let t=e.pos;for(;t=128||vt[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function lr(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function bu(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Ha(e){let t=null,r=null;return e.eat(ar),t=lr(e),e.charCode()===tn?(e.pos++,e.charCode()!==Ua&&(r=lr(e))):r=t,e.eat(Ua),{min:Number(t),max:r?Number(r):0}}function yu(e){let t=null,r=!1;switch(e.charCode()){case Va:e.pos++,t={min:0,max:0};break;case en:e.pos++,t={min:1,max:0};break;case Zr:e.pos++,t={min:0,max:1};break;case Jr:e.pos++,r=!0,e.charCode()===ar?t=Ha(e):e.charCode()===Zr?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case ar:t=Ha(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ze(e,t){let r=yu(e);return r!==null?(r.term=t,e.charCode()===Jr&&e.charCodeAt(e.pos-1)===en?Ze(e,r):r):t}function Xr(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function xu(e){let t;return e.eat(rn),e.eat(ir),t=Xe(e),e.eat(ir),e.eat(Ga),Ze(e,{type:"Property",name:t})}function ku(e){let t=null,r=null,n=1;return e.eat(cr),e.charCode()===Ba&&(e.peek(),n=-1),n==-1&&e.charCode()===ja?e.peek():(t=n*Number(lr(e)),vt[e.charCode()]!==0&&(t+=Xe(e))),sr(e),e.eat(tn),sr(e),e.charCode()===ja?e.peek():(n=1,e.charCode()===Ba&&(e.peek(),n=-1),r=n*Number(lr(e)),vt[e.charCode()]!==0&&(r+=Xe(e))),e.eat(nn),{type:"Range",min:t,max:r}}function wu(e){let t,r=null;return e.eat(rn),t=Xe(e),e.charCode()===Ya&&e.nextCharCode()===du&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===cr&&(sr(e),r=ku(e)),e.eat(Ga),Ze(e,{type:"Type",name:t,opts:r})}function vu(e){let t=Xe(e);return e.charCode()===Ya?(e.pos++,{type:"Function",name:t}):Ze(e,{type:"Keyword",name:t})}function Su(e,t){function r(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((o,i)=>qa[o]-qa[i]);t.length>0;){n=t.shift();let o=0,i=0;for(;o1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function Ka(e){let t=[],r={},n,o=null,i=e.pos;for(;n=Au(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),r[n.value]=!0):o!==null&&o.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),o=n,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Su(t,r)||" ",disallowEmpty:!1,explicit:!1}}function Cu(e){let t;return e.eat(cr),t=Ka(e),e.eat(nn),t.explicit=!0,e.charCode()===Wa&&(e.pos++,t.disallowEmpty=!0),t}function Au(e){let t=e.charCode();if(t<128&&vt[t]===1)return vu(e);switch(t){case nn:break;case cr:return Ze(e,Cu(e));case rn:return e.nextCharCode()===ir?xu(e):wu(e);case _a:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===_a?2:1))};case Fa:return e.pos++,e.eat(Fa),{type:"Combinator",value:"&&"};case tn:return e.pos++,{type:"Comma"};case ir:return Ze(e,{type:"String",value:bu(e)});case mu:case uu:case pu:case fu:case hu:return{type:"Spaces",value:sr(e)};case gu:return t=e.nextCharCode(),t<128&&vt[t]===1?(e.pos++,{type:"AtKeyword",name:Xe(e)}):Xr(e);case Va:case en:case Zr:case Jr:case Wa:break;case ar:if(t=e.nextCharCode(),t<48||t>57)return Xr(e);break;default:return Xr(e)}}function St(e){let t=new or(e),r=Ka(t);return t.pos!==e.length&&t.error("Unexpected input"),r.terms.length===1&&r.terms[0].type==="Group"?r.terms[0]:r}var Ct=function(){};function Qa(e){return typeof e=="function"?e:Ct}function on(e,t,r){function n(a){switch(o.call(r,a),a.type){case"Group":a.terms.forEach(n);break;case"Multiplier":n(a.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+a.type)}i.call(r,a)}let o=Ct,i=Ct;if(typeof t=="function"?o=t:t&&(o=Qa(t.enter),i=Qa(t.leave)),o===Ct&&i===Ct)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");n(e,r)}var Tu={decorator(e){let t=[],r=null;return{...e,node(n){let o=r;r=n,e.node.call(this,n),r=o},emit(n,o,i){t.push({type:o,value:n,node:i?null:r})},result(){return t}}}};function Lu(e){let t=[];return Le(e,(r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null})),t}function $a(e,t){return typeof e=="string"?Lu(e):t.generate(e,Tu)}var E={type:"Match"},O={type:"Mismatch"},ur={type:"DisallowEmpty"},Pu=40,Iu=41;function ee(e,t,r){return t===E&&r===O||e===E&&t===E&&r===E?e:(e.type==="If"&&e.else===O&&t===E&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function Za(e){return e.length>2&&e.charCodeAt(e.length-2)===Pu&&e.charCodeAt(e.length-1)===Iu}function Xa(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Za(e.name)}function an(e,t,r){switch(e){case" ":{let n=E;for(let o=t.length-1;o>=0;o--){let i=t[o];n=ee(i,n,O)}return n}case"|":{let n=O,o=null;for(let i=t.length-1;i>=0;i--){let a=t[i];if(Xa(a)&&(o===null&&i>0&&Xa(t[i-1])&&(o=Object.create(null),n=ee({type:"Enum",map:o},E,n)),o!==null)){let l=(Za(a.name)?a.name.slice(0,-1):a.name).toLowerCase();if(!(l in o)){o[l]=a;continue}}o=null,n=ee(a,E,n)}return n}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=O;for(let o=t.length-1;o>=0;o--){let i=t[o],a;t.length>1?a=an(e,t.filter(function(l){return l!==i}),!1):a=E,n=ee(i,a,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?E:O;for(let o=t.length-1;o>=0;o--){let i=t[o],a;t.length>1?a=an(e,t.filter(function(l){return l!==i}),!0):a=E,n=ee(i,a,n)}return n}}}function Ou(e){let t=E,r=sn(e.term);if(e.max===0)r=ee(r,ur,O),t=ee(r,null,O),t.then=ee(E,E,t),e.comma&&(t.then.else=ee({type:"Comma",syntax:e},t,O));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==E&&(t=ee({type:"Comma",syntax:e},t,O)),t=ee(r,ee(E,E,t),O);if(e.min===0)t=ee(E,E,t);else for(let n=0;n=65&&o<=90&&(o=o|32),o!==n)return!1}return!0}function Bu(e){return e.type!==9?!1:e.value!=="?"}function rs(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||Bu(e)}function ns(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function _u(e,t,r){function n(){do D++,C=DAe&&(Ae=D)}function s(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},B={type:cn,syntax:t.syntax,token:B.token,prev:B}}function u(){B.type===cn?B=B.prev:B={type:os,syntax:p.syntax,token:B.token,prev:B},p=p.prev}let p=null,h=null,m=null,b=null,T=0,N=null,C=null,D=-1,Ae=0,B={type:Du,syntax:null,token:null,prev:null};for(n();N===null&&++Tm.tokenIndex)&&(m=b,b=!1);else if(m===null){N=Mu;break}t=m.nextState,h=m.thenStack,p=m.syntaxStack,B=m.matchStack,D=m.tokenIndex,C=DD){for(;D":"<'"+t.name+"'>"));if(b!==!1&&C!==null&&t.type==="Type"&&(t.name==="custom-ident"&&C.type===1||t.name==="length"&&C.value==="0")){b===null&&(b=i(t,m)),t=O;break}s(),t=te.match;break}case"Keyword":{let J=t.name;if(C!==null){let te=C.value;if(te.indexOf("\\")!==-1&&(te=te.replace(/\\[09].*$/,"")),ln(te,J)){c(),t=E;break}}t=O;break}case"AtKeyword":case"Function":if(C!==null&&ln(C.value,t.name)){c(),t=E;break}t=O;break;case"Token":if(C!==null&&C.value===t.value){c(),t=E;break}t=O;break;case"Comma":C!==null&&C.type===18?rs(B.token)?t=O:(c(),t=ns(C)?O:E):t=rs(B.token)||ns(C)?E:O;break;case"String":let ce="",ye=D;for(;yeis,isKeyword:()=>qu,isProperty:()=>ju,isType:()=>Uu});function is(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function r(o){if(Array.isArray(o.match)){for(let i=0;ir.type==="Type"&&r.name===t)}function ju(e,t){return pn(this,e,r=>r.type==="Property"&&r.name===t)}function qu(e){return pn(this,e,t=>t.type==="Keyword")}function pn(e,t,r){let n=is.call(e,t);return n===null?!1:n.some(r)}function as(e){return"node"in e?e.node:as(e.match[0])}function ss(e){return"node"in e?e.node:ss(e.match[e.match.length-1])}function fn(e,t,r,n,o){function i(l){if(l.syntax!==null&&l.syntax.type===n&&l.syntax.name===o){let c=as(l),s=ss(l);e.syntax.walk(t,function(u,p,h){if(u===c){let m=new w;do{if(m.appendData(p.data),p.data===s)break;p=p.next}while(p!==null);a.push({parent:h,nodes:m})}})}Array.isArray(l.match)&&l.match.forEach(i)}let a=[];return r.matched!==null&&i(r.matched),a}var{hasOwnProperty:At}=Object.prototype;function mn(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function ls(e){return Boolean(e)&&mn(e.offset)&&mn(e.line)&&mn(e.column)}function Hu(e,t){return function(n,o){if(!n||n.constructor!==Object)return o(n,"Type of node should be an Object");for(let i in n){let a=!0;if(At.call(n,i)!==!1){if(i==="type")n.type!==e&&o(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(i==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")i+=".source";else if(!ls(n.loc.start))i+=".start";else if(!ls(n.loc.end))i+=".end";else continue;a=!1}else if(t.hasOwnProperty(i)){a=!1;for(let l=0;!a&&l");else if(Array.isArray(s))a.push("List");else throw new Error("Wrong value `"+s+"` in `"+e+"."+i+"` structure definition")}o[i]=a.join(" | ")}return{docs:o,check:Hu(e,n)}}function cs(e){let t={};if(e.node){for(let r in e.node)if(At.call(e.node,r)){let n=e.node[r];if(n.structure)t[r]=Wu(r,n);else throw new Error("Missed `structure` field in `"+r+"` node type definition")}}return t}var Yu=pr(tr.join(" | "));function dn(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:Ge(e[o].syntax,{compact:t}));return n}function Vu(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:Ge(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&dn(i.descriptors,t,r)};return n}function Gu(e){for(let t=0;t(n[o]=this.createDescriptor(r.descriptors[o],"AtruleDescriptor",o,t),n),Object.create(null)):null})}addProperty_(t,r){!r||(this.properties[t]=this.createDescriptor(r,"Property",t))}addType_(t,r){!r||(this.types[t]=this.createDescriptor(r,"Type",t))}checkAtruleName(t){if(!this.getAtrule(t))return new Ke("Unknown at-rule","@"+t)}checkAtrulePrelude(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t);if(!o.prelude&&r)return new SyntaxError("At-rule `@"+t+"` should not contain a prelude");if(o.prelude&&!r&&!Je(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+t+"` should contain a prelude")}checkAtruleDescriptorName(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t),i=Z(r);if(!o.descriptors)return new SyntaxError("At-rule `@"+t+"` has no known descriptors");if(!o.descriptors[i.name]&&!o.descriptors[i.basename])return new Ke("Unknown at-rule descriptor",r)}checkPropertyName(t){if(!this.getProperty(t))return new Ke("Unknown property",t)}matchAtrulePrelude(t,r){let n=this.checkAtrulePrelude(t,r);return n?ge(null,n):Je(this,this.getAtrule(t).prelude,r||"",!1)}matchAtruleDescriptor(t,r,n){let o=this.checkAtruleDescriptorName(t,r);if(o)return ge(null,o);let i=this.getAtrule(t),a=Z(r);return Je(this,i.descriptors[a.name]||i.descriptors[a.basename],n,!1)}matchDeclaration(t){return t.type!=="Declaration"?ge(null,new Error("Not a Declaration node")):this.matchProperty(t.property,t.value)}matchProperty(t,r){if(me(t).custom)return ge(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(t);return n?ge(null,n):Je(this,this.getProperty(t),r,!0)}matchType(t,r){let n=this.getType(t);return n?Je(this,n,r,!1):ge(null,new Ke("Unknown type",t))}match(t,r){return typeof t!="string"&&(!t||!t.type)?ge(null,new Ke("Bad syntax")):((typeof t=="string"||!t.match)&&(t=this.createDescriptor(t,"Type","anonymous")),Je(this,t,r,!1))}findValueFragments(t,r,n,o){return fn(this,r,this.matchProperty(t,r),n,o)}findDeclarationValueFragments(t,r,n){return fn(this,t.value,this.matchDeclaration(t),r,n)}findAllFragments(t,r,n){let o=[];return this.syntax.walk(t,{visit:"Declaration",enter:i=>{o.push.apply(o,this.findDeclarationValueFragments(i,r,n))}}),o}getAtrule(t,r=!0){let n=Z(t);return(n.vendor&&r?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(t,r=!0){let n=this.getAtrule(t,r);return n&&n.prelude||null}getAtruleDescriptor(t,r){return this.atrules.hasOwnProperty(t)&&this.atrules.declarators&&this.atrules[t].declarators[r]||null}getProperty(t,r=!0){let n=me(t);return(n.vendor&&r?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(t){return hasOwnProperty.call(this.types,t)?this.types[t]:null}validate(){function t(o,i,a,l){if(a.has(i))return a.get(i);a.set(i,!1),l.syntax!==null&&on(l.syntax,function(c){if(c.type!=="Type"&&c.type!=="Property")return;let s=c.type==="Type"?o.types:o.properties,u=c.type==="Type"?r:n;(!hasOwnProperty.call(s,c.name)||t(o,c.name,u,s[c.name]))&&a.set(i,!0)},this)}let r=new Map,n=new Map;for(let o in this.types)t(this,o,r,this.types[o]);for(let o in this.properties)t(this,o,n,this.properties[o]);return r=[...r.keys()].filter(o=>r.get(o)),n=[...n.keys()].filter(o=>n.get(o)),r.length||n.length?{types:r,properties:n}:null}dump(t,r){return{generic:this.generic,types:dn(this.types,!r,t),properties:dn(this.properties,!r,t),atrules:Vu(this.atrules,!r,t)}}toString(){return JSON.stringify(this.dump())}};var{hasOwnProperty:tt}=Object.prototype,Ku={generic:!0,types:gn,atrules:{prelude:ps,descriptors:ps},properties:gn,parseContext:Qu,scope:fs,atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function hr(e){return e&&e.constructor===Object}function hs(e){return hr(e)?{...e}:e}function Qu(e,t){return Object.assign(e,t)}function fs(e,t){for(let r in t)tt.call(t,r)&&(hr(e[r])?fs(e[r],t[r]):e[r]=hs(t[r]));return e}function us(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function gn(e,t){if(typeof t=="string")return us(e,t);let r={...e};for(let n in t)tt.call(t,n)&&(r[n]=us(tt.call(e,n)?e[n]:void 0,t[n]));return r}function ps(e,t){let r=gn(e,t);return!hr(r)||Object.keys(r).length?r:null}function Et(e,t,r){for(let n in r)if(tt.call(r,n)!==!1){if(r[n]===!0)tt.call(t,n)&&(e[n]=hs(t[n]));else if(r[n]){if(typeof r[n]=="function"){let o=r[n];e[n]=o({},e[n]),e[n]=o(e[n]||{},t[n])}else if(hr(r[n])){let o={};for(let i in e[n])o[i]=Et({},e[n][i],r[n]);for(let i in t[n])o[i]=Et(o[i]||{},t[n][i],r[n]);e[n]=o}else if(Array.isArray(r[n])){let o={},i=r[n].reduce(function(a,l){return a[l]=!0,a},{});for(let[a,l]of Object.entries(e[n]||{}))o[a]={},l&&Et(o[a],l,i);for(let a in t[n])tt.call(t[n],a)&&(o[a]||(o[a]={}),t[n]&&t[n][a]&&Et(o[a],t[n][a],i));e[n]=o}}}return e}var fr=(e,t)=>Et(e,t,Ku);function ms(e){let t=$i(e),r=Ta(e),n=wa(e),{fromPlainObject:o,toPlainObject:i}=va(r),a={lexer:null,createLexer:l=>new et(l,a,a.lexer.structure),tokenize:Le,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(l){let c=fr({},e);return ms(typeof l=="function"?l(c,Object.assign):fr(c,l))}};return a.lexer=new et({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var bn=e=>ms(fr({},e));var ds={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fit-content()":"fit-content( [|] )","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"||||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"||min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","layer()":"layer( )","layer-name":" ['.' ]*","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [||min-content|max-content|auto] , [|||min-content|max-content|auto] )","name-repeat":"repeat( [|auto-fill] , + )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' ","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from ]? [at ]? , )","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","saturate()":"saturate( )","scale()":"scale( , ? )","scale3d()":"scale3d( , , )","scaleX()":"scaleX( )","scaleY()":"scaleY( )","scaleZ()":"scaleZ( )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"