Files
the-beacon/node_modules/css-tree/dist/csstree.js

13 lines
198 KiB
JavaScript
Raw Normal View History

var csstree=(()=>{var Hs=Object.create;var Pt=Object.defineProperty;var Gs=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Ks=Object.getPrototypeOf,Vs=Object.prototype.hasOwnProperty;var _e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),f=(e,t)=>{for(var r in t)Pt(e,r,{get:t[r],enumerable:!0})},xo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ys(t))!Vs.call(e,i)&&i!==r&&Pt(e,i,{get:()=>t[i],enumerable:!(n=Gs(t,i))||n.enumerable});return e};var Qs=(e,t,r)=>(r=e!=null?Hs(Ks(e)):{},xo(t||!e||!e.__esModule?Pt(r,"default",{value:e,enumerable:!0}):r,e)),Xs=e=>xo(Pt({},"__esModule",{value:!0}),e);var Do=_e(Cr=>{var No="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Cr.encode=function(e){if(0<=e&&e<No.length)return No[e];throw new TypeError("Must be between 0 and 63: "+e)};Cr.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,c=43,u=47,s=26,l=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+s:o<=e&&e<=a?e-o+l:e==c?62:e==u?63:-1}});var Bo=_e(Lr=>{var Oo=Do(),Tr=5,Fo=1<<Tr,Ro=Fo-1,Mo=Fo;function cl(e){return e<0?(-e<<1)+1:(e<<1)+0}function ul(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Lr.encode=function(t){var r="",n,i=cl(t);do n=i&Ro,i>>>=Tr,i>0&&(n|=Mo),r+=Oo.encode(n);while(i>0);return r};Lr.decode=function(t,r,n){var i=t.length,o=0,a=0,c,u;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Oo.decode(t.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));c=!!(u&Mo),u&=Ro,o=o+(u<<a),a+=Tr}while(c);n.value=ul(o),n.rest=r}});var qt=_e(W=>{function pl(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}W.getArg=pl;var _o=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,hl=/^data:.+\,.+$/;function pt(e){var t=e.match(_o);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}W.urlParse=pt;function Xe(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}W.urlGenerate=Xe;var ml=32;function dl(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var i=t[0];return t[0]=t[n],t[n]=i,t[0].result}var o=e(r);return t.unshift({input:r,result:o}),t.length>ml&&t.pop(),o}}var Ar=dl(function(t){var r=t,n=pt(t);if(n){if(!n.path)return t;r=n.path}for(var i=W.isAbsolute(r),o=[],a=0,c=0;;)if(a=c,c=r.indexOf("/",a),c===-1){o.push(r.slice(a));break}else for(o.push(r.slice(a,c));c<r.length&&r[c]==="/";)c++;for(var u,s=0,c=o.length-1;c>=0;c--)u=o[c],u==="."?o.splice(c,1):u===".."?s++:s>0&&(u===""?(o.splice(c+1,s),s=0):(o.splice(c,2),s--));return r=o.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Xe(n)):r});W.normalize=Ar;function Wo(e,t){e===""&&(e="."),t===""&&(t=".");var r=pt(t),n=pt(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Xe(r);if(r||t.match(hl))return t;if(n&&!n.host&&!n.path)return n.host=t,Xe(n);var i=t.charAt(0)==="/"?t:Ar(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,Xe(n)):i}W.join=Wo;W.isAbsolute=function(e){return e.charAt(0)==="/"||_o.test(e)};function fl(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}W.relative=fl;var qo=(function(){var e=Object.create(null);return!("__proto__"in e)})();function jo(e){return e}function gl(e){return Uo(e)?"$"+e:e}W.toSetString=qo?jo:gl;function bl(e){return Uo(e)?e.slice(1):e}W.fromSetString=qo?jo:bl;function Uo(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function yl(e,t,r){var n=ke(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!=
`)}})}var kr=100,To=60,Lo=" ";function Ao({source:e,line:t,column:r,baseLine:n,baseColumn:i},o){function a(b,U){return s.slice(b,U).map((J,v)=>String(b+v+1).padStart(h)+" |"+J).join(`
`)}let c=`
`.repeat(Math.max(n-1,0)),u=" ".repeat(Math.max(i-1,0)),s=(c+u+e).split(/\r\n?|\n|\f/),l=Math.max(1,t-o)-1,p=Math.min(t+o,s.length+1),h=Math.max(4,String(p).length)+1,d=0;r+=(Lo.length-1)*(s[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>kr&&(d=r-To+3,r=To-2);for(let b=l;b<=p;b++)b>=0&&b<s.length&&(s[b]=s[b].replace(/\t/g,Lo),s[b]=(d>0&&s[b].length>d?"\u2026":"")+s[b].substr(d,kr-2)+(s[b].length>d+kr-1?"\u2026":""));return[a(l,t),new Array(r+h+2).join("-")+"^",a(t,p)].filter(Boolean).join(`
`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function wr(e,t,r,n,i,o=1,a=1){return Object.assign(De("SyntaxError",e),{source:t,offset:r,line:n,column:i,sourceFragment(u){return Ao({source:t,line:n,column:i,baseLine:o,baseColumn:a},isNaN(u)?0:u)},get formattedMessage(){return`Parse error: ${e}
`+Ao({source:t,line:n,column:i,baseLine:o,baseColumn:a},2)}})}function Eo(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let i=e.getNode.call(this,n);if(i===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,n),r=!1),t.push(i)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Qe=()=>{},nl=33,il=35,vr=59,zo=123,Po=0,ol={createList(){return[]},createSingleNodeList(e){return[e]},getFirstListNode(e){return e&&e[0]||null},getLastListNode(e){return e&&e.length>0?e[e.length-1]:null}},al={createList(){return new j},createSingleNodeList(e){return new j().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last}};function sl(e){return function(){return this[e]()}}function Sr(e){let t=Object.create(null);for(let r of Object.keys(e)){let n=e[r],i=n.parse||n;i&&(t[r]=i)}return t}function ll(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:Sr(e.atrule),pseudo:Sr(e.pseudo),node:Sr(e.node)};for(let[r,n]of Object.entries(e.parseContext))switch(typeof n){case"function":t.context[r]=n;break;case"string":t.context[r]=sl(n);break}return{config:t,...t,...t.node}}function Io(e){let t="",r="<unknown>",n=!1,i=Qe,o=!1,a=new Ye,c=Object.assign(new Ke,ll(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Eo,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===zo?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===zo||l===vr?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===nl||l===vr?1:0},consumeUntilSemicolonIncluded(l){return l===vr?2:0},createList:Qe,createSingleNodeList:Qe,getFirstListNode:Qe,getLastListNode:Qe,parseWithFallback(l,p){let h=this.tokenIndex;try{return l.call(this)}catch(d){if(o)throw d;this.skip(h-this.tokenIndex);let b=p.call(this);return o=!0,i(d,b),o=!1,b}},lookupNonWSType(l){let p;do if(p=this.lookupType(l++),p!==13&&p!==25)return p;while(p!==Po);return Po},charCodeAt(l){return l>=0&&l<t.length?t.charCodeAt(l):0},substring(l,p){return t.substring(l,p)},substrToCursor(l){return this.source.substring(l,this.tokenStart)},cmpChar(l,p){return ye(t,l,p)},cmpStr(l,p,h){return xe(t,l,p,h)},consume(l){let p=this.tokenStart;return this.eat(l),this.substrToCursor(p)},consumeFunctionName(){let l=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),l},consumeNumber(l){let p=t.substring(this.tokenStart,Ne(t,this.tokenStart));return this.eat(l),p},eat(l){if(this.tokenType!==l){let p=Te[l].slice(0,-6).replace(/-/g," ").replace(/^./,b=>b.toUpperCase()),h=`${/[[\](){}]/.test(p)?`"${p}"`:p} is expected`,d=this.tokenStart;switch(l){case 1:this.tokenType===2||this.tokenType===7?(d=this.tokenEnd-1,h="Identifier is expected but function found"):h="Identifier is expected";break;case 4:this.isDelim(il)&&(this.next(),d++,h="Name is expected");break;case 11:this.tokenType===10&&(d=this.tokenEnd,h="Percent sign is expected");break}this.error(h,d)}this.next()},eatIdent(l){(this.tokenType!==1||this.lookupValue(0,l)===!1)&&this.error(`Identifier "${l}" is expected`),this.next()},eatDelim(l){this.isDelim(l)||this.error(`Delim "${String.fromCharCode(l)}" is expected`),this.next()},getLocation(l,p){return n?a.getLocationRange(l,p,r):null},getLocationFromList(l){if(n){let p=this.getFirstListNode(l),h=this.getLastListNode(l);return a.getLocationRange(p!==null?p.loc.start.offset-a.startOffset:this.tokenStart,h!==null?h.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(l,p){let h=typeof p<"u"&&p<t.length?a.getLocation(p):this.eof?a.getLocation(ko(t,t.length-1)):a.getLocation(this.tokenStart);throw new wr(l||"Unexpected input",t,h.offset,h.line,h.column,a.startLine,a.startColumn)}}),u=()=>({filename:r,source:t,tokenCount:c.tokenCount,getTokenType:l=>c.getTokenType(l),getTokenTypeName:l=>Te[c.getTokenType(l)],getTokenStart:l=>c.getTokenStart(l),getTokenEnd:l=>c.getTokenEnd(l),getTokenValue:l=>c
`,13,!0)},emit(u){i+=u},result(){return i}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=Jo(a)),n.mode in Ht&&(a.tokenBefore=Ht[n.mode]));let c={node:u=>a.node(u),children:Nl,token:(u,s)=>a.token(u,s),tokenize:u=>Ae(u,(s,l,p)=>{a.token(s,u.slice(l,p),l!==0)})};return a.node(r),a.result()}}function na(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof j)&&(r.children=new j().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof j&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:Nr}=Object.prototype,mt=function(){};function ia(e){return typeof e=="function"?e:mt}function oa(e,t){return function(r,n,i){r.type===t&&e.call(this,r,n,i)}}function Dl(e,t){let r=t.structure,n=[];for(let i in r){if(Nr.call(r,i)===!1)continue;let o=r[i],a={name:i,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(let c of o)c===null?a.nullable=!0:typeof c=="string"?a.type="node":Array.isArray(c)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function Ol(e){let t={};for(let r in e.node)if(Nr.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]=Dl(r,n)}return t}function aa(e,t){let r=e.fields.slice(),n=e.context,i=typeof n=="string";return t&&r.reverse(),function(o,a,c,u){let s;i&&(s=a[n],a[n]=o);for(let l of r){let p=o[l.name];if(!l.nullable||p){if(l.type==="list"){if(t?p.reduceRight(u,!1):p.reduce(u,!1))return!0}else if(c(p))return!0}}i&&(a[n]=s)}}function sa({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}){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:i}}}function la(e){let t=Ol(e),r={},n={},i=Symbol("break-walk"),o=Symbol("skip-node");for(let s in t)Nr.call(t,s)&&t[s]!==null&&(r[s]=aa(t[s],!1),n[s]=aa(t[s],!0));let a=sa(r),c=sa(n),u=function(s,l){function p(v,E,H){let z=h.call(J,v,E,H);return z===i?!0:z===o?!1:!!(b.hasOwnProperty(v.type)&&b[v.type](v,J,p,U)||d.call(J,v,E,H)===i)}let h=mt,d=mt,b=r,U=(v,E,H,z)=>v||p(E,H,z),J={break:i,skip:o,root:s,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof l=="function")h=l;else if(l&&(h=ia(l.enter),d=ia(l.leave),l.reverse&&(b=n),l.visit)){if(a.hasOwnProperty(l.visit))b=l.reverse?c[l.visit]:a[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=oa(h,l.visit),d=oa(d,l.visit)}if(h===mt&&d===mt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(s)};return u.break=i,u.skip=o,u.find=function(s,l){let p=null;return u(s,function(h,d,b){if(l.call(this,h,d,b))return p=h,i}),p},u.findLast=function(s,l){let p=null;return u(s,{reverse:!0,enter(h,d,b){if(l.call(this,h,d,b))return p=h,i}}),p},u.findAll=function(s,l){let p=[];return u(s,function(h,d,b){l.call(this,h,d,b)&&p.push(h)}),p},u}function Fl(e){return e}function Rl(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 Ml(e){if(e.type==="Range")return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}function Bl(e,t,r,n){let i=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",o=e.terms.map(a=>Gt(a,t,r,n)).join(i);return e.explicit||r?(n||o[0]===","?"[":"[ ")+o+(n?"]":" ]"):o}function Gt(e,t,r,n){let i;switch(e.type){case"Group":i=Bl(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Gt(e.term,t,r,n)+t(Rl(e),e);case"Boolean":i="<boolean-expr["+Gt(e.term,t,r,n)+"]>";break;case"Type":i="<"+e.name+(e.opts?t(Ml(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break
syntax: `+i.syntax+`
value: `+(o||"<empty string>")+`
--------`+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,u),i.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:u,end:s},i};var Kt=new Map,Ze=new Map,Vt=45,ft=ql,Qt=jl,Wl=Dr;function gt(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Vt&&e.charCodeAt(t+1)===Vt}function Dr(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Vt&&e.charCodeAt(t+1)!==Vt){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function ql(e){if(Kt.has(e))return Kt.get(e);let t=e.toLowerCase(),r=Kt.get(t);if(r===void 0){let n=gt(t,0),i=n?"":Dr(t,0);r=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:n})}return Kt.set(e,r),r}function jl(e){if(Ze.has(e))return Ze.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=gt(t,r.length);if(!n&&(t=t.toLowerCase(),Ze.has(t))){let c=Ze.get(t);return Ze.set(e,c),c}let i=n?"":Dr(t,r.length),o=t.substr(0,r.length+i.length),a=Object.freeze({basename:t.substr(o.length),name:t.substr(r.length),hack:r,vendor:i,prefix:o,custom:n});return Ze.set(e,a),a}var Je=["initial","inherit","unset","revert","revert-layer"];var yt=43,de=45,Or=110,et=!0,Hl=!1;function Rr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function bt(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Ee(e,t,r,n){if(!e)return 0;let i=e.value.charCodeAt(t);if(i===yt||i===de){if(r)return 0;t++}for(;t<e.value.length;t++)if(!O(e.value.charCodeAt(t)))return 0;return n+1}function Fr(e,t,r){let n=!1,i=bt(e,t,r);if(e=r(i),e===null)return t;if(e.type!==10)if(Rr(e,yt)||Rr(e,de)){if(n=!0,i=bt(r(++i),i,r),e=r(i),e===null||e.type!==10)return 0}else return t;if(!n){let o=e.value.charCodeAt(0);if(o!==yt&&o!==de)return 0}return Ee(e,n?0:1,n,i)}function Mr(e,t){let r=0;if(!e)return 0;if(e.type===10)return Ee(e,0,Hl,r);if(e.type===1&&e.value.charCodeAt(0)===de){if(!ye(e.value,1,Or))return 0;switch(e.value.length){case 2:return Fr(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==de?0:(r=bt(t(++r),r,t),e=t(r),Ee(e,0,et,r));default:return e.value.charCodeAt(2)!==de?0:Ee(e,3,et,r)}}else if(e.type===1||Rr(e,yt)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!ye(e.value,0,Or))return 0;switch(e.value.length){case 1:return Fr(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==de?0:(r=bt(t(++r),r,t),e=t(r),Ee(e,0,et,r));default:return e.value.charCodeAt(1)!==de?0:Ee(e,2,et,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),i=n===yt||n===de?1:0,o=i;for(;o<e.value.length&&O(e.value.charCodeAt(o));o++);return o===i||!ye(e.value,o,Or)?0:o+1===e.value.length?Fr(t(++r),r,t):e.value.charCodeAt(o+1)!==de?0:o+2===e.value.length?(r=bt(t(++r),r,t),e=t(r),Ee(e,0,et,r)):Ee(e,o+2,et,r)}return 0}var Gl=43,pa=45,ha=63,Yl=117;function Br(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Kl(e,t){return e.value.charCodeAt(0)===t}function xt(e,t,r){let n=0;for(let i=t;i<e.value.length;i++){let o=e.value.charCodeAt(i);if(o===pa&&r&&n!==0)return xt(e,t+n+1,!1),6;if(!te(o)||++n>6)return 0}return n}function Xt(e,t,r){if(!e)return 0;for(;Br(r(t),ha);){if(++e>6)return 0;t++}return t}function _r(e,t){let r=0;if(e===null||e.type!==1||!ye(e.value,0,Yl)||(e=t(++r),e===null))return 0;if(Br(e,Gl))return e=t(++r),e===null?0:e.type===1?Xt(xt(e,0,!0),++r,t):Br(e,ha)?Xt(1,++r,t):0;if(e.type===10){let n=xt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!Kl(e,pa)||!xt(e,1,!1)?0:r+1:Xt(n,r,t))}return e.type===12?Xt(xt(e,1,!0),++r,t):0}var Wr=["calc(","-moz-calc(","-webkit-calc("],qr=["min(","max(","clamp("],jr=["round(","mod(","rem("],Vl=["sin(","cos(","tan("],Ql=["asin(","acos(","atan(","atan2("],Xl=["pow(","sqrt(","log(","exp(","sign("],Ur=["hypot("],Hr=["abs("],ma=[...Wr,...qr,...jr,...Vl,...Xl,...Ur,...Hr],$l=[...Wr,...qr,...jr,...Ur,...Hr],ve=[...Wr,...qr,...jr,...Ql,...Ur,...Hr],Gr=new Map([[2,22],[21,22],[19,20],[23,24]]);function pe(e,t){return t<e.length?e.charCodeAt(t):0}function da(e,t){return xe(e,0,e.length,t)}function fa(e,t){for(let r=0;r<t.length;r++)if(da(e,t[r]))return!0;return!1}functi
`+t+`
--`+new Array((r||t.length)+1).join("-")+"^"})}var wc=9,vc=10,Sc=12,Cc=13,Tc=32,ka=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),er=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}isNameCharCode(t=this.charCode()){return t<128&&ka[t]===1}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(t){for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r!==Cc&&r!==vc&&r!==Sc&&r!==Tc&&r!==wc)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new Jt(t,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let t=this.pos;for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r>=128||ka[r]===0)break}return this.pos===t&&this.error("Expect a keyword"),this.substringToPos(t)}scanNumber(){let t=this.pos;for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r<48||r>57)break}return this.pos===t&&this.error("Expect a number"),this.substringToPos(t)}scanString(){let t=this.str.indexOf("'",this.pos+1);return t===-1&&(this.pos=this.str.length,this.error("Expect an apostrophe")),this.substringToPos(t+1)}};var Lc=9,Ac=10,Ec=12,zc=13,Pc=32,Aa=33,Qr=35,wa=38,tr=39,Ea=40,za=41,Pa=42,Xr=43,$r=44,va=45,Zr=60,Kr=62,rr=63,Ic=64,kt=91,tt=93,nr=123,Sa=124,Vr=125,Ca=8734,Ta={" ":1,"&&":2,"||":3,"|":4};function La(e){let t=null,r=null;return e.eat(nr),e.skipWs(),t=e.scanNumber(e),e.skipWs(),e.charCode()===$r?(e.pos++,e.skipWs(),e.charCode()!==Vr&&(r=e.scanNumber(e),e.skipWs())):r=t,e.eat(Vr),{min:Number(t),max:r?Number(r):0}}function Nc(e){let t=null,r=!1;switch(e.charCode()){case Pa:e.pos++,t={min:0,max:0};break;case Xr:e.pos++,t={min:1,max:0};break;case rr:e.pos++,t={min:0,max:1};break;case Qr:e.pos++,r=!0,e.charCode()===nr?t=La(e):e.charCode()===rr?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case nr:t=La(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ce(e,t){let r=Nc(e);return r!==null?(r.term=t,e.charCode()===Qr&&e.charCodeAt(e.pos-1)===Xr||e.charCode()===rr&&e.charCodeAt(e.pos-1)===Vr?Ce(e,r):r):t}function Yr(e){let t=e.peek();return t===""?null:Ce(e,{type:"Token",value:t})}function Dc(e){let t;return e.eat(Zr),e.eat(tr),t=e.scanWord(),e.eat(tr),e.eat(Kr),Ce(e,{type:"Property",name:t})}function Oc(e){let t=null,r=null,n=1;return e.eat(kt),e.charCode()===va&&(e.peek(),n=-1),n==-1&&e.charCode()===Ca?e.peek():(t=n*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat($r),e.skipWs(),e.charCode()===Ca?e.peek():(n=1,e.charCode()===va&&(e.peek(),n=-1),r=n*Number(e.scanNumber(e)),e.isNameCharCode()&&(r+=e.scanWord())),e.eat(tt),{type:"Range",min:t,max:r}}function Fc(e){let t,r=null;if(e.eat(Zr),t=e.scanWord(),t==="boolean-expr"){e.eat(kt);let n=ir(e,tt);return e.eat(tt),e.eat(Kr),Ce(e,{type:"Boolean",term:n.terms.length===1?n.terms[0]:n})}return e.charCode()===Ea&&e.nextCharCode()===za&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===kt&&(e.skipWs(),r=Oc(e)),e.eat(Kr),Ce(e,{type:"Type",name:t,opts:r})}function Rc(e){let t=e.scanWord();return e.charCode()===Ea?(e.pos++,{type:"Function",name:t}):Ce(e,{type:"Keyword",name:t})}function Mc(e,t){function r(i,o){return{type:"Group",terms:i,combinator:o,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((i,o)=>Ta[i]-Ta[o]);t.length>0;){n=t.shift();let i=0,o=0;for(;i<e.length;i++){let a=e[i];a.type==="Combinator"&&(a.value===n?(o===-1&&(o=i-1),e.splice(i,1),i--):(o!==-1&&i-o>1&&(e.splice(o,i-o,r(e.slice(o,i),n)),i=o+1),o=-1))}o!==-1&&t.length&&e.splice(o,i-o,r(e.slice(o,i),n))}return n}function ir(e,t=-1){let r=Object.create(null),n=[],i=null,o=e.pos,a=!1;for(;e.charCode()!==t;){let c=a?ir(e,za):_c(e);if(!c)break;if