!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).singlefile={})}(this,(function(e){"use strict";const t=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"],n=1,r=3,a=8,i=[{tagName:"HEAD",accept:e=>!e.childNodes.length||e.childNodes[0].nodeType==n},{tagName:"BODY",accept:e=>!e.childNodes.length}],o=[{tagName:"HTML",accept:e=>!e||e.nodeType!=a},{tagName:"HEAD",accept:e=>!e||e.nodeType!=a&&(e.nodeType!=r||!u(e.textContent))},{tagName:"BODY",accept:e=>!e||e.nodeType!=a},{tagName:"LI",accept:(e,t)=>!e&&t.parentElement&&("UL"==h(t.parentElement)||"OL"==h(t.parentElement))||e&&["LI"].includes(h(e))},{tagName:"DT",accept:e=>!e||["DT","DD"].includes(h(e))},{tagName:"P",accept:e=>e&&["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIV","DL","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"].includes(h(e))},{tagName:"DD",accept:e=>!e||["DT","DD"].includes(h(e))},{tagName:"RT",accept:e=>!e||["RT","RP"].includes(h(e))},{tagName:"RP",accept:e=>!e||["RT","RP"].includes(h(e))},{tagName:"OPTGROUP",accept:e=>!e||["OPTGROUP"].includes(h(e))},{tagName:"OPTION",accept:e=>!e||["OPTION","OPTGROUP"].includes(h(e))},{tagName:"COLGROUP",accept:e=>!e||e.nodeType!=a&&(e.nodeType!=r||!u(e.textContent))},{tagName:"CAPTION",accept:e=>!e||e.nodeType!=a&&(e.nodeType!=r||!u(e.textContent))},{tagName:"THEAD",accept:e=>!e||["TBODY","TFOOT"].includes(h(e))},{tagName:"TBODY",accept:e=>!e||["TBODY","TFOOT"].includes(h(e))},{tagName:"TFOOT",accept:e=>!e},{tagName:"TR",accept:e=>!e||["TR"].includes(h(e))},{tagName:"TD",accept:e=>!e||["TD","TH"].includes(h(e))},{tagName:"TH",accept:e=>!e||["TD","TH"].includes(h(e))}],l=["STYLE","SCRIPT","XMP","IFRAME","NOEMBED","NOFRAMES","PLAINTEXT","NOSCRIPT"];function s(e,t){const n=e.doctype;let r="";return n&&(r=" "),r+c(e.documentElement,t)}function c(e,s,u){return e.nodeType==r?function(e){const t=e.parentNode;let r;t&&t.nodeType==n&&(r=h(t));return!r||l.includes(r)?"SCRIPT"==r||"STYLE"==r?e.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):e.textContent:e.textContent.replace(/&/g,"&").replace(/\u00a0/g," ").replace(//g,">")}(e):e.nodeType==a?"\x3c!--"+e.textContent+"--\x3e":e.nodeType==n?function(e,n,r){const a=h(e),l=n&&i.find((t=>a==h(t)&&t.accept(e)));let s="";l&&!e.attributes.length||(s="<"+a.toLowerCase(),Array.from(e.attributes).forEach((t=>s+=function(e,t,n){const r=e.name;let a="";if(!r.match(/["'>/=]/)){let i,o=e.value;n&&"class"==r&&(o=Array.from(t.classList).map((e=>e.trim())).join(" ")),o=o.replace(/&/g,"&").replace(/\u00a0/g," "),o.includes('"')&&(o.includes("'")||!n?o=o.replace(/"/g,"""):i=!0);const l=!n||o.match(/[ \t\n\f\r'"`=<>]/);a+=" ",e.namespace?"http://www.w3.org/XML/1998/namespace"==e.namespaceURI?a+="xml:"+r:"http://www.w3.org/2000/xmlns/"==e.namespaceURI?("xmlns"!==r&&(a+="xmlns:"),a+=r):"http://www.w3.org/1999/xlink"==e.namespaceURI?a+="xlink:"+r:a+=r:a+=r,""!=o&&(a+="=",l&&(a+=i?"'":'"'),a+=o,l&&(a+=i?"'":'"'))}return a}(t,e,n))),s+=">");"TEMPLATE"!=a||e.childNodes.length?Array.from(e.childNodes).forEach((e=>s+=c(e,n,r||"svg"==a))):s+=e.innerHTML;const u=n&&o.find((t=>a==h(t)&&t.accept(e.nextSibling,e)));(r||!u&&!t.includes(a))&&(s+="");return s}(e,s,u):void 0}function u(e){return Boolean(e.match(/^[ \t\n\f\r]/))}function h(e){return e.tagName&&e.tagName.toUpperCase()}const d="single-file-infobar",p="\n.infobar,\n.infobar .infobar-icon,\n.infobar .infobar-link-icon {\n min-inline-size: 28px;\n min-block-size: 28px;\n box-sizing: border-box;\n}\n\n.infobar,\n.infobar .infobar-close-icon,\n.infobar .infobar-link-icon {\n opacity: 0.7;\n transition: opacity 250ms;\n}\n\n.infobar:hover,\n.infobar .infobar-close-icon:hover,\n.infobar .infobar-link-icon:hover {\n opacity: 1;\n}\n\n.infobar,\n.infobar-content {\n display: flex;\n}\n\n.infobar {\n position: fixed;\n top: 16px;\n right: 16px;\n margin-inline-start: 16px;\n margin-block-end: 16px;\n color: #2d2d2d;\n background-color: #737373;\n border: 2px solid;\n border-color: #eee;\n border-radius: 16px;\n z-index: 2147483647;\n}\n\n.infobar:valid, .infobar:not(:focus-within) .infobar-content {\n display: none;\n}\n\n.infobar:focus-within {\n background-color: #f9f9f9;\n border-color: #878787;\n border-radius: 8px;\n opacity: 1;\n transition-property: opacity, background-color, border-color, border-radius,\n color;\n}\n\n.infobar-content {\n align-items: center;\n}\n\n.infobar-content span {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 18px;\n word-break: break-word;\n white-space: pre-wrap;\n margin-inline: 4px;\n margin-block: 4px;\n}\n\n.infobar .infobar-icon,\n.infobar .infobar-close-icon,\n.infobar .infobar-link-icon {\n cursor: pointer;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n.infobar .infobar-close-icon,\n.infobar .infobar-link-icon {\n align-self: flex-start;\n}\n\n.infobar .infobar-icon {\n position: absolute;\n min-inline-size: 24px;\n min-block-size: 24px;\n}\n\n.infobar:focus-within .infobar-icon {\n z-index: -1;\n background-image: none;\n}\n\n.infobar .infobar-close-icon {\n min-inline-size: 22px;\n min-block-size: 22px;\n}\n\n.infobar .infobar-icon {\n background-color: transparent;\n background-size: 70%;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHADIRLMaOHwAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAPUExURQAAAIqKioyNjY2OjvDw8L2y1DEAAAABdFJOUwBA5thmAAAAAWJLR0QB/wIt3gAAAGNJREFUSMdjYCAJsLi4OBCQx6/CBQwIGIDPCBcXAkYQUsACU+AwlBVQHg6Eg5pgZBGOboIJZugDFwRwoJECJCUOhJI1wZwzqmBUwagCuipgIqTABG9h7YIKaKGAURAFEF/6AQAO4HqSoDP8bgAAAABJRU5ErkJggg==);\n}\n\n.infobar .infobar-link-icon {\n background-size: 60%;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC);\n}\n\n.infobar .infobar-close-icon {\n appearance: none;\n background-size: 80%;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8VC4EQ6QAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJtJREFUOI3NkrsBgCAMRLFwBPdxBArcfxXFkO8rbKWAAJfHJ9faf9vuYX/749T5NmShm3bEwbe2SxeuM4+2oxDL1cDoKtVUjRy+tH78Cv2CS+wIiQNC1AEhk4AQeUTMWUJMfUJMSEJMSEY8kIx4IONroaYAimNxsXp1PA7PxwfVL8QnowwoVC0lig07wDDVUjAdbAnjwtow/z/bDW7eI4M2KruJAAAAAElFTkSuQmCC);\n}\n";function m(e,t,n){if(!e.querySelector(d)){let r=t.infobarContent?t.infobarContent:t.saveDate;r=r||"No info";const a=function(e,t,n){const r=e.createElement(t);return n.appendChild(r),Array.from(getComputedStyle(r)).forEach((e=>r.style.setProperty(e,"initial","important"))),r}(e,d,e.body);let i;if(n)i=a.attachShadow({mode:"open"});else{const t=e.createElement("template");t.setAttribute("shadowroot","open"),a.appendChild(t),i=t}const o=e.createElement("div"),l=e.createElement("style");l.textContent=p.replace(/ {2}/g,"").replace(/\n/g,"").replace(/: /g,":").replace(/, /g,","),o.appendChild(l);const s=e.createElement("form");s.classList.add("infobar"),o.appendChild(s);const c=e.createElement("span");c.tabIndex=-1,c.classList.add("infobar-icon"),s.appendChild(c);const u=e.createElement("span");u.tabIndex=-1,u.classList.add("infobar-content");const h=e.createElement("input");h.type="checkbox",h.required=!0,h.classList.add("infobar-close-icon"),u.appendChild(h);const m=e.createElement("span");m.textContent=r,u.appendChild(m);const y=e.createElement("a");if(y.classList.add("infobar-link-icon"),y.target="_blank",y.rel="noopener noreferrer",y.title="Open source URL: "+t.saveUrl,y.href=t.saveUrl,u.appendChild(y),s.appendChild(u),n)i.appendChild(o);else{const t=e.createElement("script");let n=f.toString();n+=g.toString(),n+="("+b.toString()+")(document)",t.textContent=n,o.appendChild(t),i.innerHTML=o.outerHTML}e.body.appendChild(a)}}function g(e){const t=e.evaluate("//comment()",e,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);let n=t&&t.singleNodeValue;if(n&&n.nodeType==Node.COMMENT_NODE&&n.textContent.includes("SingleFile")){const e=n.textContent.split("\n"),[,,t,...r]=e,a=t.match(/^ url: (.*) ?$/),i=a&&a[1];if(i){let e,t;if(r.length&&(t=r[0].split("saved date: ")[1],t&&r.shift(),r.length>1)){let t=r[0].split("info: ")[1].trim();for(let e=1;e()=>(t||e((t={exports:{}}).exports,t),t.exports),S=(e,t)=>{for(var n in t)k(e,n,{get:t[n],enumerable:!0})},E=C((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e{var t=E();e.encode=function(e){var n,r,a="",i=(r=e)<0?1+(-r<<1):0+(r<<1);do{n=31&i,(i>>>=5)>0&&(n|=32),a+=t.encode(n)}while(i>0);return a},e.decode=function(e,n,r){var a,i,o=e.length,l=0,s=0;do{if(n>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(32&i),l+=(i&=31)<>1;return 1==(1&e)?-t:t}(l),r.rest=n}})),z=C((e=>{e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function a(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}e.urlParse=r,e.urlGenerate=a;var i,o,l=(i=function(t){var n=t,i=r(t);if(i){if(!i.path)return t;n=i.path}for(var o=e.isAbsolute(n),l=[],s=0,c=0;;){if(s=c,-1===(c=n.indexOf("/",s))){l.push(n.slice(s));break}for(l.push(n.slice(s,c));c=0;c--)"."===(u=l[c])?l.splice(c,1):".."===u?h++:h>0&&(""===u?(l.splice(c+1,h),h=0):(l.splice(c,2),h--));return""===(n=l.join("/"))&&(n=o?"/":"."),i?(i.path=n,a(i)):n},o=[],function(e){for(var t=0;t32&&o.pop(),r});function s(e,t){""===e&&(e="."),""===t&&(t=".");var i=r(t),o=r(e);if(o&&(e=o.path||"/"),i&&!i.scheme)return o&&(i.scheme=o.scheme),a(i);if(i||t.match(n))return t;if(o&&!o.host&&!o.path)return o.host=t,a(o);var s="/"===t.charAt(0)?t:l(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=s,a(o)):s}e.normalize=l,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=c?u:function(e){return h(e)?"$"+e:e},e.fromSetString=c?u:function(e){return h(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=d(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||(0!==(r=e.originalColumn-t.originalColumn)||n)||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!==(r=e.originalLine-t.originalLine)||(0!==(r=e.originalColumn-t.originalColumn)||n)||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||(0!==(r=e.generatedColumn-t.generatedColumn)||n)||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var i=r(n);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var o=i.path.lastIndexOf("/");o>=0&&(i.path=i.path.substring(0,o+1))}t=s(a(i),t)}return l(t)}})),L=C((e=>{var t=z(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function a(){this._array=[],this._set=r?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,i=e.length;r=0)return a}else{var i=t.toSetString(e);if(n.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e{var t=z();function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,n){var r=e.generatedLine,a=n.generatedLine,i=e.generatedColumn,o=n.generatedColumn;return a>r||a==r&&o>=i||t.compareByGeneratedPositionsInflated(e,n)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=n})),I=C((e=>{var t=T(),n=z(),r=L().ArraySet,a=R().MappingList;function i(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new a,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,r=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var a={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(a.source=e.source,null!=t&&(a.source=n.relative(t,a.source)),a.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(a.name=e.name)),r.addMapping(a)})),e.sources.forEach((function(a){var i=a;null!==t&&(i=n.relative(t,a)),r._sources.has(i)||r._sources.add(i);var o=e.sourceContentFor(a);null!=o&&r.setSourceContent(a,o)})),r},i.prototype.addMapping=function(e){var t=n.getArg(e,"generated"),r=n.getArg(e,"original",null),a=n.getArg(e,"source",null),i=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,a,i),null!=a&&(a=String(a),this._sources.has(a)||this._sources.add(a)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:a,name:i})},i.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=n.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,a){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var o=this._sourceRoot;null!=o&&(i=n.relative(o,i));var l=new r,s=new r;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=a&&(t.source=n.join(a,t.source)),null!=o&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}var c=t.source;null!=c&&!l.has(c)&&l.add(c);var u=t.name;null!=u&&!s.has(u)&&s.add(u)}),this),this._sources=l,this._names=s,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=a&&(t=n.join(a,t)),null!=o&&(t=n.relative(o,t)),this.setSourceContent(t,r))}),this)},i.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("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(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}},i.prototype._serializeMappings=function(){for(var e,r,a,i,o=0,l=1,s=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),m=0,g=p.length;m0){if(!n.compareByGeneratedPositionsInflated(r,p[m-1]))continue;e+=","}e+=t.encode(r.generatedColumn-o),o=r.generatedColumn,null!=r.source&&(i=this._sources.indexOf(r.source),e+=t.encode(i-h),h=i,e+=t.encode(r.originalLine-1-c),c=r.originalLine-1,e+=t.encode(r.originalColumn-s),s=r.originalColumn,null!=r.name&&(a=this._names.indexOf(r.name),e+=t.encode(a-u),u=a)),d+=e}return d},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}));S({},{AtKeyword:()=>N,BadString:()=>j,BadUrl:()=>U,CDC:()=>J,CDO:()=>$,Colon:()=>Q,Comma:()=>G,Comment:()=>re,Delim:()=>F,Dimension:()=>V,EOF:()=>_,Function:()=>P,Hash:()=>M,Ident:()=>O,LeftCurlyBracket:()=>te,LeftParenthesis:()=>Z,LeftSquareBracket:()=>Y,Number:()=>q,Percentage:()=>H,RightCurlyBracket:()=>ne,RightParenthesis:()=>ee,RightSquareBracket:()=>X,Semicolon:()=>K,String:()=>D,Url:()=>B,WhiteSpace:()=>W});var _=0,O=1,P=2,N=3,M=4,D=5,j=6,B=7,U=8,F=9,q=10,H=11,V=12,W=13,$=14,J=15,Q=16,K=17,G=18,Y=19,X=20,Z=21,ee=22,te=23,ne=24,re=25;function ae(e){return e>=48&&e<=57}function ie(e){return ae(e)||e>=65&&e<=70||e>=97&&e<=102}function oe(e){return e>=65&&e<=90}function le(e){return function(e){return oe(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function se(e){return le(e)||ae(e)||45===e}function ce(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function ue(e){return 10===e||13===e||12===e}function he(e){return ue(e)||32===e||9===e}function de(e,t){return!(92!==e||ue(t)||0===t)}function pe(e,t,n){return 45===e?le(t)||45===t||de(t,n):!!le(e)||92===e&&de(e,t)}function me(e,t,n){return 43===e||45===e?ae(t)?2:46===t&&ae(n)?3:0:46===e?ae(t)?2:0:ae(e)?1:0}function ge(e){return 65279===e||65534===e?1:0}var fe=new Array(128),be=130,ye=131,ke=132,we=133;for(let e=0;ee.length)return!1;for(let a=t;a=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Oe=["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"];function Pe(e=null,t){return null===e||e.length0?ge(t.charCodeAt(0)):0,a=Pe(e.lines,n),i=Pe(e.columns,n),o=e.startLine,l=e.startColumn;for(let e=r;e{})){let n=(e=String(e||"")).length,r=Pe(this.offsetAndType,e.length+1),a=Pe(this.balance,e.length+1),i=0,o=0,l=0,s=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:a[i]=n;break;case o:{let e=l&De;for(l=a[e],o=l>>je,a[i]=e,a[e++]=i;e>je:0}lookupOffset(e){return(e+=this.tokenIndex)0?e>je,this.tokenEnd=t&De):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>je,this.tokenEnd=e&De):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let n,r,a=e;e:for(;a0?this.offsetAndType[a-1]&De:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:a++;break e;default:this.balance[n]===a&&(a=n)}this.skip(a-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t>je,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,a)=>{e[a]={idx:a,type:Oe[t],chunk:this.source.substring(n,r),balance:this.balance[a]}})),e}};function Fe(e,t){function n(t){return t=e.length?void(cString(e+n+1).padStart(s)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),o=Math.max(1,t-r)-1,l=Math.min(t+r,i.length+1),s=Math.max(4,String(l).length)+1,c=0;(n+=(Je.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length)>We&&(c=n-$e+3,n=$e-2);for(let e=o;e<=l;e++)e>=0&&e0&&i[e].length>c?"โ€ฆ":"")+i[e].substr(c,We-2)+(i[e].length>c+We-1?"โ€ฆ":""));return[a(o,t),new Array(n+s+2).join("-")+"^",a(t,l)].filter(Boolean).join("\n")}function Ke(e,t,n,r,a){return Object.assign(Ve("SyntaxError",e),{source:t,offset:n,line:r,column:a,sourceFragment:e=>Qe({source:t,line:r,column:a},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+Qe({source:t,line:r,column:a},2)}})}function Ge(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let a=e.getNode.call(this,r);if(void 0===a)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,a,t,r),n=!1),t.push(a)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Ye=()=>{},Xe=33,Ze=35,et=59,tt=123,nt=0;function rt(e){return function(){return this[e]()}}function at(e){let t=Object.create(null);for(let n in e){let r=e[n],a=r.parse||r;a&&(t[n]=a)}return t}function it(e){let t="",n="",r=!1,a=Ye,i=!1,o=new Me,l=Object.assign(new Ue,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:at(e.atrule),pseudo:at(e.pseudo),node:at(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=rt(e.parseContext[n])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Ge,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>e===tt?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>e===tt||e===et?1:0,consumeUntilExclamationMarkOrSemicolon:e=>e===Xe||e===et?1:0,consumeUntilSemicolonIncluded:e=>e===et?2:0,createList:()=>new He,createSingleNodeList:e=>(new He).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let r=t.call(this,n);return i=!0,a(e,r),i=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(t!==nt);return nt},charCodeAt:e=>e>=0&&et.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>Ce(t,e,n),cmpStr:(e,n,r)=>Se(t,e,n,r),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,Re(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=Oe[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case 4:this.isDelim(Ze)&&(this.next(),r++,n="Name is expected");break;case 11:10===this.tokenType&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>r?o.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return o.getLocationRange(null!==t?t.loc.start.offset-o.startOffset:this.tokenStart,null!==r?r.loc.end.offset-o.startOffset:this.tokenStart,n)}return null},error(e,n){let r=typeof n<"u"&&n=0&&he(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):o.getLocation(this.tokenStart);throw new Ke(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,s){t=e,s=s||{},l.setSource(t,Fe),o.setSource(t,s.offset,s.line,s.column),n=s.filename||"",r=Boolean(s.positions),a="function"==typeof s.onParseError?s.onParseError:Ye,i=!1,l.parseAtrulePrelude=!("parseAtrulePrelude"in s)||Boolean(s.parseAtrulePrelude),l.parseRulePrelude=!("parseRulePrelude"in s)||Boolean(s.parseRulePrelude),l.parseValue=!("parseValue"in s)||Boolean(s.parseValue),l.parseCustomProperty="parseCustomProperty"in s&&Boolean(s.parseCustomProperty);let{context:c="default",onComment:u}=s;if(!(c in l.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&l.forEachToken(((e,n,r)=>{if(25===e){let e=l.getLocation(n,r),a=Se(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(a,e)}}));let h=l.context[c].call(l,s);return l.eof||l.error(),h}),{SyntaxError:Ke,config:l.config})}var ot,lt,st,ct=(ot=I(),lt=1,st=null!=ot?y(x(ot)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of v(t))!A.call(e,a)&&a!==n&&k(e,a,{get:()=>t[a],enumerable:!(r=w(t,a))||r.enumerable});return e})(!lt&&ot&&ot.__esModule?st:k(st,"default",{value:ot,enumerable:!0}),ot)),ut=new Set(["Atrule","Selector","Declaration"]);var ht={};S(ht,{safe:()=>bt,spec:()=>ft});var dt=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},pt=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],mt=pt.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function gt(e){let t=new Set(e.map((([e,t])=>dt(e)<<16|dt(t))));return function(e,n,r){let a=dt(n,r),i=r.charCodeAt(0);return(45===i&&1!==n&&2!==n&&15!==n||43===i?t.has(e<<16|i<<8):t.has(e<<16|a))&&this.emit(" ",13,!0),a}}var ft=gt(pt),bt=gt(mt),yt=92;function kt(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let n=null;e.children.forEach((e=>{null!==n&&t.call(this,n),this.node(e),n=e}))}}function wt(e){Fe(e,((t,n,r)=>{this.token(t,e.slice(n,r))}))}function vt(e){let t=new Map;for(let n in e.node){let r=e.node[n];"function"==typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){let r="",a=0,i={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(o,e)},tokenBefore:bt,token(e,t){a=this.tokenBefore(a,e,t),this.emit(t,e,!1),9===e&&t.charCodeAt(0)===yt&&this.emit("\n",13,!0)},emit(e){r+=e},result:()=>r};n&&("function"==typeof n.decorator&&(i=n.decorator(i)),n.sourceMap&&(i=function(e){let t=new ct.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},a={line:1,column:0},i={generated:a},o=1,l=0,s=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&ut.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(r.line!==c||r.column!==u)&&(r.line=c,r.column=u,n.line=o,n.column=l,s&&(s=!1,(n.line!==a.line||n.column!==a.column)&&t.addMapping(i)),s=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),s&&ut.has(e.type)&&(a.line=o,a.column=l)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;ti.node(e),children:kt,token:(e,t)=>i.token(e,t),tokenize:wt};return i.node(e),i.result()}}var{hasOwnProperty:xt}=Object.prototype,At=function(){};function Ct(e){return"function"==typeof e?e:At}function St(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function Et(e,t){let n=t.structure,r=[];for(let e in n){if(!1===xt.call(n,e))continue;let t=n[e],a={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?a.nullable=!0:"string"==typeof e?a.type="node":Array.isArray(e)&&(a.type="list");a.type&&r.push(a)}return r.length?{context:t.walkContext,fields:r}:null}function Tt(e,t){let n=e.fields.slice(),r=e.context,a="string"==typeof r;return t&&n.reverse(),function(e,i,o,l){let s;a&&(s=i[r],i[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n)if("list"===r.type){if(t?n.reduceRight(l,!1):n.reduce(l,!1))return!0}else if(o(n))return!0}a&&(i[r]=s)}}function zt({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:a}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:a}}}function Lt(e){let t=function(e){let t={};for(let n in e.node)if(xt.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Et(0,r)}return t}(e),n={},r={},a=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)xt.call(t,e)&&null!==t[e]&&(n[e]=Tt(t[e],!1),r[e]=Tt(t[e],!0));let o=zt(n),l=zt(r),s=function(e,s){function c(e,t,n){let r=u.call(m,e,t,n);return r===a||r!==i&&!!(d.hasOwnProperty(e.type)&&d[e.type](e,m,c,p)||h.call(m,e,t,n)===a)}let u=At,h=At,d=n,p=(e,t,n,r)=>e||c(t,n,r),m={break:a,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof s)u=s;else if(s&&(u=Ct(s.enter),h=Ct(s.leave),s.reverse&&(d=r),s.visit)){if(o.hasOwnProperty(s.visit))d=s.reverse?l[s.visit]:o[s.visit];else if(!t.hasOwnProperty(s.visit))throw new Error("Bad value `"+s.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=St(u,s.visit),h=St(h,s.visit)}if(u===At&&h===At)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return s.break=a,s.skip=i,s.find=function(e,t){let n=null;return s(e,(function(e,r,i){if(t.call(this,e,r,i))return n=e,a})),n},s.findLast=function(e,t){let n=null;return s(e,{reverse:!0,enter(e,r,i){if(t.call(this,e,r,i))return n=e,a}}),n},s.findAll=function(e,t){let n=[];return s(e,(function(e,r,a){t.call(this,e,r,a)&&n.push(e)})),n},s}function Rt(e){return e}function It(e,t,n,r){let a;switch(e.type){case"Group":a=function(e,t,n,r){let a=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",i=e.terms.map((e=>It(e,t,n,r))).join(a);return e.explicit||n?(r||","===i[0]?"[":"[ ")+i+(r?"]":" ]"):i}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return It(e.term,t,n,r)+t(function(e){let{min:t,max:n,comma:r}=e;return 0===t&&0===n?r?"#?":"*":0===t&&1===n?"?":1===t&&0===n?r?"#":"+":1===t&&1===n?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(0!==n?n:"")+"}")}(e),e);case"Type":a="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-โˆž":e.min)+","+(null===e.max?"โˆž":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":a="<'"+e.name+"'>";break;case"Keyword":a=e.name;break;case"AtKeyword":a="@"+e.name;break;case"Function":a=e.name+"(";break;case"String":case"Token":a=e.value;break;case"Comma":a=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(a,e)}function _t(e,t){let n=Rt,r=!1,a=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),a=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),It(e,n,r,a)}var Ot={offset:0,line:1,column:1};function Pt(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Nt(n):n:null}function Nt({offset:e,line:t,column:n},r){let a={offset:e,line:t,column:n};if(r){let e=r.split(/\n|\r\n?|\f/);a.offset+=r.length,a.line+=e.length-1,a.column=1===e.length?a.column+r.length:e.pop().length+1}return a}var Mt=function(e,t){let n=Ve("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},Dt=function(e,t,n,r){let a=Ve("SyntaxMatchError",e),{css:i,mismatchOffset:o,mismatchLength:l,start:s,end:c}=function(e,t){let n,r,a=e.tokens,i=e.longestMatch,o=i1?(n=Pt(l||t,"end")||Nt(Ot,h),r=Nt(n)):(n=Pt(l,"start")||Nt(Pt(t,"start")||Ot,h.slice(0,s)),r=Pt(l,"end")||Nt(n,h.substr(s,c))),{css:h,mismatchOffset:s,mismatchLength:c,start:n,end:r}}(r,n);return a.rawMessage=e,a.syntax=t?_t(t):"",a.css=i,a.mismatchOffset=o,a.mismatchLength=l,a.message=e+"\n syntax: "+a.syntax+"\n value: "+(i||"")+"\n --------"+new Array(a.mismatchOffset+1).join("-")+"^",Object.assign(a,s),a.loc={source:n&&n.loc&&n.loc.source||"",start:s,end:c},a},jt=new Map,Bt=new Map,Ut=45,Ft=function(e){if(jt.has(e))return jt.get(e);let t=e.toLowerCase(),n=jt.get(t);if(void 0===n){let e=Ht(t,0),r=e?"":Vt(t,0);n=Object.freeze({basename:t.substr(r.length),name:t,prefix:r,vendor:r,custom:e})}return jt.set(e,n),n},qt=function(e){if(Bt.has(e))return Bt.get(e);let t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");let r=Ht(t,n.length);if(!r&&(t=t.toLowerCase(),Bt.has(t))){let n=Bt.get(t);return Bt.set(e,n),n}let a=r?"":Vt(t,n.length),i=t.substr(0,n.length+a.length),o=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:a,prefix:i,custom:r});return Bt.set(e,o),o};function Ht(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Ut&&e.charCodeAt(t+1)===Ut}function Vt(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Ut&&e.charCodeAt(t+1)!==Ut){let n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var Wt=["initial","inherit","unset","revert","revert-layer"],$t=43,Jt=45,Qt=!0;function Kt(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Gt(e,t,n){for(;null!==e&&(13===e.type||25===e.type);)e=n(++t);return t}function Yt(e,t,n,r){if(!e)return 0;let a=e.value.charCodeAt(t);if(a===$t||a===Jt){if(n)return 0;t++}for(;t6)return 0}return r}function rn(e,t,n){if(!e)return 0;for(;tn(n(t),en);){if(++e>6)return 0;t++}return t}var an=["calc(","-moz-calc(","-webkit-calc("],on=new Map([[2,22],[21,22],[19,20],[23,24]]);function ln(e,t){return te.max&&"string"!=typeof e.max)return!0}return!1}function dn(e){return function(t,n,r){return null===t?0:2===t.type&&cn(t.value,an)?function(e,t){let n=0,r=[],a=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),0===r.length){a++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=on.get(e.type)}a++}while(e=t(a));return a}(t,n):e(t,n,r)}}function pn(e){return function(t){return null===t||t.type!==e?0:1}}function mn(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||12!==t.type)return 0;let a=Re(t.value,0);if(null!==e){let n=t.value.indexOf("\\",a),r=-1!==n&&un(t.value,n)?t.value.substring(a,n):t.value.substr(a);if(!1===e.has(r.toLowerCase()))return 0}return hn(r,t.value,a)?0:1}}function gn(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,n,r)}}var fn={"ident-token":pn(1),"function-token":pn(2),"at-keyword-token":pn(3),"hash-token":pn(4),"string-token":pn(5),"bad-string-token":pn(6),"url-token":pn(7),"bad-url-token":pn(8),"delim-token":pn(9),"number-token":pn(10),"percentage-token":pn(11),"dimension-token":pn(12),"whitespace-token":pn(13),"CDO-token":pn(14),"CDC-token":pn(15),"colon-token":pn(16),"semicolon-token":pn(17),"comma-token":pn(18),"[-token":pn(19),"]-token":pn(20),"(-token":pn(21),")-token":pn(22),"{-token":pn(23),"}-token":pn(24)},bn={string:pn(5),ident:pn(1),percentage:dn((function(e,t,n){return null===e||11!==e.type||hn(n,e.value,e.value.length-1)?0:1})),zero:gn(),number:dn((function(e,t,n){if(null===e)return 0;let r=Re(e.value,0);return r!==e.value.length&&!un(e.value,r)||hn(n,e.value,r)?0:1})),integer:dn((function(e,t,n){if(null===e||10!==e.type)return 0;let r=43===ln(e.value,0)||45===ln(e.value,0)?1:0;for(;rvn,decibel:()=>En,flex:()=>Sn,frequency:()=>An,length:()=>wn,resolution:()=>Cn,semitones:()=>Tn,time:()=>xn});var wn=["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"],vn=["deg","grad","rad","turn"],xn=["s","ms"],An=["hz","khz"],Cn=["dpi","dpcm","dppx","x"],Sn=["fr"],En=["db"],Tn=["st"];function zn(e,t,n){return Object.assign(Ve("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((n||t.length)+1).join("-")+"^"})}S({},{SyntaxError:()=>zn,generate:()=>_t,parse:()=>mr,walk:()=>br});var Ln=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),nr={" ":1,"&&":2,"||":3,"|":4};function rr(e){return e.substringToPos(e.findWsEnd(e.pos))}function ar(e){let t=e.pos;for(;t=128||0===tr[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function ir(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function or(e){let t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function lr(e){let t=null,n=null;return e.eat(Yn),t=ir(e),e.charCode()===Hn?(e.pos++,e.charCode()!==Zn&&(n=ir(e))):n=t,e.eat(Zn),{min:Number(t),max:n?Number(n):0}}function sr(e,t){let n=function(e){let t=null,n=!1;switch(e.charCode()){case Fn:e.pos++,t={min:0,max:0};break;case qn:e.pos++,t={min:1,max:0};break;case Jn:e.pos++,t={min:0,max:1};break;case Mn:e.pos++,n=!0,e.charCode()===Yn?t=lr(e):e.charCode()===Jn?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Yn:t=lr(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,e.charCode()===Mn&&e.charCodeAt(e.pos-1)===qn?sr(e,n):n):t}function cr(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function ur(e){let t,n=null;return e.eat(Wn),t=ar(e),e.charCode()===Bn&&e.nextCharCode()===Un&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Kn&&(rr(e),n=function(e){let t=null,n=null,r=1;return e.eat(Kn),e.charCode()===Vn&&(e.peek(),r=-1),-1==r&&e.charCode()===er?e.peek():(t=r*Number(ir(e)),0!==tr[e.charCode()]&&(t+=ar(e))),rr(e),e.eat(Hn),rr(e),e.charCode()===er?e.peek():(r=1,e.charCode()===Vn&&(e.peek(),r=-1),n=r*Number(ir(e)),0!==tr[e.charCode()]&&(n+=ar(e))),e.eat(Gn),{type:"Range",min:t,max:n}}(e)),e.eat($n),sr(e,{type:"Type",name:t,opts:n})}function hr(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort(((e,t)=>nr[e]-nr[t]));t.length>0;){r=t.shift();let a=0,i=0;for(;a1&&(e.splice(i,a-i,n(e.slice(i,a),r)),a=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,a-i,n(e.slice(i,a),r))}return r}function dr(e){let t,n=[],r={},a=null,i=e.pos;for(;t=pr(e);)"Spaces"!==t.type&&("Combinator"===t.type?((null===a||"Combinator"===a.type)&&(e.pos=i,e.error("Unexpected combinator")),r[t.value]=!0):null!==a&&"Combinator"!==a.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),a=t,i=e.pos);return null!==a&&"Combinator"===a.type&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:hr(n,r)||" ",disallowEmpty:!1,explicit:!1}}function pr(e){let t=e.charCode();if(t<128&&1===tr[t])return function(e){let t=ar(e);return e.charCode()===Bn?(e.pos++,{type:"Function",name:t}):sr(e,{type:"Keyword",name:t})}(e);switch(t){case Gn:break;case Kn:return sr(e,function(e){let t;return e.eat(Kn),t=dr(e),e.eat(Gn),t.explicit=!0,e.charCode()===Nn&&(e.pos++,t.disallowEmpty=!0),t}(e));case Wn:return e.nextCharCode()===jn?function(e){let t;return e.eat(Wn),e.eat(jn),t=ar(e),e.eat(jn),e.eat($n),sr(e,{type:"Property",name:t})}(e):ur(e);case Xn:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Xn?2:1))};case Dn:return e.pos++,e.eat(Dn),{type:"Combinator",value:"&&"};case Hn:return e.pos++,{type:"Comma"};case jn:return sr(e,{type:"String",value:or(e)});case Pn:case Rn:case In:case On:case _n:return{type:"Spaces",value:rr(e)};case Qn:return t=e.nextCharCode(),t<128&&1===tr[t]?(e.pos++,{type:"AtKeyword",name:ar(e)}):cr(e);case Fn:case qn:case Jn:case Mn:case Nn:break;case Yn:if(t=e.nextCharCode(),t<48||t>57)return cr(e);break;default:return cr(e)}}function mr(e){let t=new Ln(e),n=dr(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type?n.terms[0]:n}var gr=function(){};function fr(e){return"function"==typeof e?e:gr}function br(e,t,n){let r=gr,a=gr;if("function"==typeof t?r=t:t&&(r=fr(t.enter),a=fr(t.leave)),r===gr&&a===gr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.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: "+t.type)}a.call(n,t)}(e)}var yr={decorator(e){let t=[],n=null;return{...e,node(t){let r=n;n=t,e.node.call(this,t),n=r},emit(e,r,a){t.push({type:r,value:e,node:a?null:n})},result:()=>t}}};function kr(e,t){return"string"==typeof e?function(e){let t=[];return Fe(e,((n,r,a)=>t.push({type:n,value:e.slice(r,a),node:null}))),t}(e):t.generate(e,yr)}var wr={type:"Match"},vr={type:"Mismatch"},xr={type:"DisallowEmpty"},Ar=40,Cr=41;function Sr(e,t,n){return t===wr&&n===vr||e===wr&&t===wr&&n===wr?e:("If"===e.type&&e.else===vr&&t===wr&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Er(e){return e.length>2&&e.charCodeAt(e.length-2)===Ar&&e.charCodeAt(e.length-1)===Cr}function Tr(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&Er(e.name)}function zr(e,t,n){switch(e){case" ":{let e=wr;for(let n=t.length-1;n>=0;n--){e=Sr(t[n],e,vr)}return e}case"|":{let e=vr,n=null;for(let r=t.length-1;r>=0;r--){let a=t[r];if(Tr(a)&&(null===n&&r>0&&Tr(t[r-1])&&(n=Object.create(null),e=Sr({type:"Enum",map:n},wr,e)),null!==n)){let e=(Er(a.name)?a.name.slice(0,-1):a.name).toLowerCase();if(!(e in n)){n[e]=a;continue}}n=null,e=Sr(a,wr,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=vr;for(let r=t.length-1;r>=0;r--){let a,i=t[r];a=t.length>1?zr(e,t.filter((function(e){return e!==i})),!1):wr,n=Sr(i,a,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?wr:vr;for(let n=t.length-1;n>=0;n--){let a,i=t[n];a=t.length>1?zr(e,t.filter((function(e){return e!==i})),!0):wr,r=Sr(i,a,r)}return r}}}function Lr(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=zr(e.combinator,e.terms.map(Lr),!1);return e.disallowEmpty&&(t=Sr(t,xr,vr)),t}case"Multiplier":return function(e){let t=wr,n=Lr(e.term);if(0===e.max)n=Sr(n,xr,vr),t=Sr(n,null,vr),t.then=Sr(wr,wr,t),e.comma&&(t.then.else=Sr({type:"Comma",syntax:e},t,vr));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==wr&&(t=Sr({type:"Comma",syntax:e},t,vr)),t=Sr(n,Sr(wr,wr,t),vr);if(0===e.min)t=Sr(wr,wr,t);else for(let r=0;r=65&&a<=90&&(a|=32),a!==r)return!1}return!0}function Fr(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&"?"!==e.value}(e))}function qr(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type&&"/"===e.value)}function Hr(e,t,n){let r=function(e,t,n){function r(){do{b++,f=by&&(y=b)}function c(){k=k.type===Pr?k.prev:{type:Nr,syntax:u.syntax,token:k.token,prev:k},u=u.prev}let u=null,h=null,d=null,p=null,m=0,g=null,f=null,b=-1,y=0,k={type:_r,syntax:null,token:null,prev:null};for(r();null===g&&++md.tokenIndex)&&(d=p,p=!1);else if(null===d){g=Dr;break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,b=d.tokenIndex,f=bb){for(;b":"<'"+t.name+"'>"));if(!1!==p&&null!==f&&"Type"===t.type&&("custom-ident"===t.name&&1===f.type||"length"===t.name&&"0"===f.value)){null===p&&(p=i(t,d)),t=vr;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:Pr,syntax:t.syntax,token:k.token,prev:k},t=r.match;break}case"Keyword":{let e=t.name;if(null!==f){let n=f.value;if(-1!==n.indexOf("\\")&&(n=n.replace(/\\[09].*$/,"")),Ur(n,e)){s(),t=wr;break}}t=vr;break}case"AtKeyword":case"Function":if(null!==f&&Ur(f.value,t.name)){s(),t=wr;break}t=vr;break;case"Token":if(null!==f&&f.value===t.value){s(),t=wr;break}t=vr;break;case"Comma":null!==f&&18===f.type?Fr(k.token)?t=vr:(s(),t=qr(f)?vr:wr):t=Fr(k.token)||qr(f)?wr:vr;break;case"String":let r="",m=b;for(;m"Type"===e.type&&e.name===t))}function Jr(e,t){return Kr(this,e,(e=>"Property"===e.type&&e.name===t))}function Qr(e){return Kr(this,e,(e=>"Keyword"===e.type))}function Kr(e,t,n){let r=Wr.call(e,t);return null!==r&&r.some(n)}function Gr(e){return"node"in e?e.node:Gr(e.match[0])}function Yr(e){return"node"in e?e.node:Yr(e.match[e.match.length-1])}function Xr(e,t,n,r,a){let i=[];return null!==n.matched&&function n(o){if(null!==o.syntax&&o.syntax.type===r&&o.syntax.name===a){let n=Gr(o),r=Yr(o);e.syntax.walk(t,(function(e,t,a){if(e===n){let e=new He;do{if(e.appendData(t.data),t.data===r)break;t=t.next}while(null!==t);i.push({parent:a,nodes:e})}}))}Array.isArray(o.match)&&o.match.forEach(n)}(n.matched),i}S(Vr,{getTrace:()=>Wr,isKeyword:()=>Qr,isProperty:()=>Jr,isType:()=>$r});var{hasOwnProperty:Zr}=Object.prototype;function ea(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function ta(e){return Boolean(e)&&ea(e.offset)&&ea(e.line)&&ea(e.column)}function na(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let a in n){let i=!0;if(!1!==Zr.call(n,a)){if("type"===a)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)a+=".source";else if(ta(n.loc.start)){if(ta(n.loc.end))continue;a+=".end"}else a+=".start";i=!1}else if(t.hasOwnProperty(a)){i=!1;for(let e=0;!i&&e");else{if(!Array.isArray(r))throw new Error("Wrong value `"+r+"` in `"+e+"."+t+"` structure definition");i.push("List")}}a[t]=i.join(" | ")}return{docs:a,check:na(e,r)}}var aa=Rr(Wt.join(" | "));function ia(e,t,n){let r={};for(let a in e)e[a].syntax&&(r[a]=n?e[a].syntax:_t(e[a].syntax,{compact:t}));return r}function oa(e,t,n){let r={};for(let[a,i]of Object.entries(e))r[a]={prelude:i.prelude&&(n?i.prelude.syntax:_t(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&ia(i.descriptors,t,n)};return r}function la(e,t,n){return{matched:e,iterations:n,error:t,...Vr}}function sa(e,t,n,r){let a,i=kr(n,e.syntax);return function(e){for(let t=0;t(Object.defineProperty(i,"syntax",{value:mr(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:Rr(i.syntax,a)}),i.match)})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Mt("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||sa(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),a=Ft(t);return r.descriptors?r.descriptors[a.name]||r.descriptors[a.basename]?void 0:new Mt("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new Mt("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return la(null,n);let r=this.getAtrule(e);return r.prelude?sa(this,r.prelude,t||"",!1):la(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return la(null,r);let a=this.getAtrule(e),i=Ft(t);return sa(this,a.descriptors[i.name]||a.descriptors[i.basename],n,!1)}matchDeclaration(e){return"Declaration"!==e.type?la(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(qt(e).custom)return la(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?la(null,n):sa(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?sa(this,n,t,!1):la(null,new Mt("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),sa(this,e,t,!1)):la(null,new Mt("Bad syntax"))}findValueFragments(e,t,n,r){return Xr(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return Xr(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}}),r}getAtrule(e,t=!0){let n=Ft(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=qt(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,a,i,o){if(i.has(a))return i.get(a);i.set(a,!1),null!==o.syntax&&br(o.syntax,(function(o){if("Type"!==o.type&&"Property"!==o.type)return;let l="Type"===o.type?r.types:r.properties,s="Type"===o.type?t:n;(!hasOwnProperty.call(l,o.name)||e(r,o.name,s,l[o.name]))&&i.set(a,!0)}),this)}let t=new Map,n=new Map;for(let n in this.types)e(this,n,t,this.types[n]);for(let t in this.properties)e(this,t,n,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),n=[...n.keys()].filter((e=>n.get(e))),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:ia(this.types,!t,e),properties:ia(this.properties,!t,e),atrules:oa(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function ua(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function ha(e,t){let n=Object.create(null);for(let[r,a]of Object.entries(e))if(a){n[r]={};for(let e of Object.keys(a))t.includes(e)&&(n[r][e]=a[e])}return n}function da(e,t){let n={...e};for(let[r,a]of Object.entries(t))switch(r){case"generic":n[r]=Boolean(a);break;case"units":n[r]={...e[r]};for(let[e,t]of Object.entries(a))n[r][e]=Array.isArray(t)?t:[];break;case"atrules":n[r]={...e[r]};for(let[e,t]of Object.entries(a)){let a=n[r][e]||{},i=n[r][e]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(t){i.prelude=t.prelude?ua(i.prelude,t.prelude):i.prelude||null;for(let[e,n]of Object.entries(t.descriptors||{}))i.descriptors[e]=n?ua(i.descriptors[e],n):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[e,t]of Object.entries(a))n[r][e]=ua(n[r][e],t);break;case"scope":n[r]={...e[r]};for(let[e,t]of Object.entries(a))n[r][e]={...n[r][e],...t};break;case"parseContext":n[r]={...e[r],...a};break;case"atrule":case"pseudo":n[r]={...e[r],...ha(a,["parse"])};break;case"node":n[r]={...e[r],...ha(a,["name","structure","parse","generate","walkContext"])}}return n}function pa(e){let t=it(e),n=Lt(e),r=vt(e),{fromPlainObject:a,toPlainObject:i}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&!(e.children instanceof He)&&(e.children=(new He).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof He&&(e.children=e.children.toArray())}}),t)}}(n),o={lexer:null,createLexer:e=>new ca(e,o,o.lexer.structure),tokenize:Fe,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:a,toPlainObject:i,fork(t){let n=da({},e);return pa("function"==typeof t?t(n,Object.assign):da(n,t))}};return o.lexer=new ca({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},o),o}var ma={};S(ma,{AnPlusB:()=>ga,Atrule:()=>La,AtrulePrelude:()=>Da,AttributeSelector:()=>Ha,Block:()=>ni,Brackets:()=>pi,CDC:()=>yi,CDO:()=>Ai,ClassSelector:()=>zi,Combinator:()=>Pi,Comment:()=>Hi,Declaration:()=>Gi,DeclarationList:()=>go,Dimension:()=>xo,Function:()=>To,Hash:()=>Oo,IdSelector:()=>Vo,Identifier:()=>Bo,MediaFeature:()=>Ko,MediaQuery:()=>el,MediaQueryList:()=>il,NestingSelector:()=>ul,Nth:()=>fl,Number:()=>vl,Operator:()=>El,Parentheses:()=>Il,Percentage:()=>Ml,PseudoClassSelector:()=>Fl,PseudoElementSelector:()=>Jl,Ratio:()=>Zl,Raw:()=>ls,Rule:()=>ps,Selector:()=>vs,SelectorList:()=>Es,String:()=>_s,StyleSheet:()=>qs,TypeSelector:()=>Gs,UnicodeRange:()=>ac,Url:()=>fc,Value:()=>Lc,WhiteSpace:()=>Pc});var ga={};S(ga,{generate:()=>za,name:()=>Sa,parse:()=>Ta,structure:()=>Ea});var fa=43,ba=45,ya=110,ka=!0,wa=!1;function va(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===fa||r===ba)&&(t&&this.error("Number sign is not allowed"),n++);n0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==fa&&n!==ba&&this.error("Number sign is expected")),xa.call(this,0!==t),t===ba?"-"+this.consume(10):this.consume(10)}var Sa="AnPlusB",Ea={a:[String,null],b:[String,null]};function Ta(){let e=this.tokenStart,t=null,n=null;if(10===this.tokenType)xa.call(this,wa),n=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,ba))switch(t="-1",Aa.call(this,1,ya),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ca.call(this);break;case 3:Aa.call(this,2,ba),this.next(),this.skipSC(),xa.call(this,ka),n="-"+this.consume(10);break;default:Aa.call(this,2,ba),va.call(this,3,ka),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(fa)&&1===this.lookupType(1)){let r=0;switch(t="1",this.isDelim(fa)&&(r=1,this.next()),Aa.call(this,0,ya),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ca.call(this);break;case 2:Aa.call(this,1,ba),this.next(),this.skipSC(),xa.call(this,ka),n="-"+this.consume(10);break;default:Aa.call(this,1,ba),va.call(this,2,ka),this.next(),n=this.substrToCursor(e+r+1)}}else if(12===this.tokenType){let r=this.charCodeAt(this.tokenStart),a=r===fa||r===ba,i=this.tokenStart+a;for(;iMa,name:()=>_a,parse:()=>Na,structure:()=>Pa,walkContext:()=>Oa});var _a="Atrule",Oa="atrule",Pa={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Na(e=!1){let t,n,r=this.tokenStart,a=null,i=null;switch(this.eat(3),t=this.substrToCursor(r+1),n=t.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(a=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,t,e),Ra):Ra.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:i=hasOwnProperty.call(this.atrule,n)&&"function"==typeof this.atrule[n].block?this.atrule[n].block.call(this,e):this.Block(Ia.call(this))}return{type:"Atrule",loc:this.getLocation(r,this.tokenStart),name:t,prelude:a,block:i}}function Ma(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var Da={};S(Da,{generate:()=>qa,name:()=>ja,parse:()=>Fa,structure:()=>Ua,walkContext:()=>Ba});var ja="AtrulePrelude",Ba="atrulePrelude",Ua={children:[[]]};function Fa(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function qa(e){this.children(e)}var Ha={};S(Ha,{generate:()=>ti,name:()=>Xa,parse:()=>ei,structure:()=>Za});var Va=36,Wa=42,$a=61,Ja=94,Qa=124,Ka=126;function Ga(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Wa)?(t=!0,this.next()):this.isDelim(Qa)||this.eat(1),this.isDelim(Qa)?this.charCodeAt(this.tokenStart+1)!==$a?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Ya(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==$a&&t!==Ka&&t!==Ja&&t!==Va&&t!==Wa&&t!==Qa&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==$a&&(this.isDelim($a)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var Xa="AttributeSelector",Za={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function ei(){let e,t=this.tokenStart,n=null,r=null,a=null;return this.eat(19),this.skipSC(),e=Ga.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(n=Ya.call(this),this.skipSC(),r=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(a=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:a}}function ti(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}var ni={};S(ni,{generate:()=>di,name:()=>si,parse:()=>hi,structure:()=>ui,walkContext:()=>ci});var ri=38;function ai(e){return this.Raw(e,null,!0)}function ii(){return this.parseWithFallback(this.Rule,ai)}function oi(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function li(){if(17===this.tokenType)return oi.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,oi);return 17===this.tokenType&&this.next(),e}var si="Block",ci="block",ui={children:[["Atrule","Rule","Declaration"]]};function hi(e){let t=e?li:ii,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),ai));break;default:e&&this.isDelim(ri)?r.push(ii.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function di(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var pi={};S(pi,{generate:()=>bi,name:()=>mi,parse:()=>fi,structure:()=>gi});var mi="Brackets",gi={children:[[]]};function fi(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function bi(e){this.token(9,"["),this.children(e),this.token(9,"]")}var yi={};S(yi,{generate:()=>xi,name:()=>ki,parse:()=>vi,structure:()=>wi});var ki="CDC",wi=[];function vi(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function xi(){this.token(15,"--\x3e")}var Ai={};S(Ai,{generate:()=>Ti,name:()=>Ci,parse:()=>Ei,structure:()=>Si});var Ci="CDO",Si=[];function Ei(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Ti(){this.token(14,"\x3c!--")}var zi={};S(zi,{generate:()=>Oi,name:()=>Ri,parse:()=>_i,structure:()=>Ii});var Li=46,Ri="ClassSelector",Ii={name:String};function _i(){return this.eatDelim(Li),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Oi(e){this.token(9,"."),this.token(1,e.name)}var Pi={};S(Pi,{generate:()=>qi,name:()=>Bi,parse:()=>Fi,structure:()=>Ui});var Ni=43,Mi=47,Di=62,ji=126,Bi="Combinator",Ui={name:String};function Fi(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case Di:case Ni:case ji:this.next();break;case Mi:this.next(),this.eatIdent("deep"),this.eatDelim(Mi);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function qi(e){this.tokenize(e.name)}var Hi={};S(Hi,{generate:()=>Ki,name:()=>$i,parse:()=>Qi,structure:()=>Ji});var Vi=42,Wi=47,$i="Comment",Ji={value:String};function Qi(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===Vi&&this.charCodeAt(t-1)===Wi&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Ki(e){this.token(25,"/*"+e.value+"*/")}var Gi={};S(Gi,{generate:()=>ho,name:()=>lo,parse:()=>uo,structure:()=>co,walkContext:()=>so});var Yi=33,Xi=35,Zi=36,eo=38,to=42,no=43,ro=47;function ao(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function io(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function oo(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(Yi)&&!1===this.isBalanceEdge(e)&&this.error(),t}var lo="Declaration",so="declaration",co={important:[Boolean,String],property:String,value:["Value","Raw"]};function uo(){let e,t=this.tokenStart,n=this.tokenIndex,r=po.call(this),a=Ht(r),i=a?this.parseCustomProperty:this.parseValue,o=a?io:ao,l=!1;this.skipSC(),this.eat(16);let s=this.tokenIndex;if(a||this.skipSC(),e=i?this.parseWithFallback(oo,o):o.call(this,this.tokenIndex),a&&"Value"===e.type&&e.children.isEmpty)for(let t=s-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(Yi)&&(l=mo.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:l,property:r,value:e}}function ho(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function po(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case to:case Zi:case no:case Xi:case eo:this.next();break;case ro:this.next(),this.isDelim(ro)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function mo(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var go={};S(go,{generate:()=>vo,name:()=>yo,parse:()=>wo,structure:()=>ko});var fo=38;function bo(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var yo="DeclarationList",ko={children:[["Declaration","Atrule","Rule"]]};function wo(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),bo));break;default:this.isDelim(fo)?e.push(this.parseWithFallback(this.Rule,bo)):e.push(this.parseWithFallback(this.Declaration,bo))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function vo(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var xo={};S(xo,{generate:()=>Eo,name:()=>Ao,parse:()=>So,structure:()=>Co});var Ao="Dimension",Co={value:String,unit:String};function So(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Eo(e){this.token(12,e.value+e.unit)}var To={};S(To,{generate:()=>_o,name:()=>zo,parse:()=>Io,structure:()=>Ro,walkContext:()=>Lo});var zo="Function",Lo="function",Ro={name:String,children:[[]]};function Io(e,t){let n,r=this.tokenStart,a=this.consumeFunctionName(),i=a.toLowerCase();return n=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:a,children:n}}function _o(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Oo={};S(Oo,{generate:()=>jo,name:()=>No,parse:()=>Do,structure:()=>Mo,xxx:()=>Po});var Po="XXX",No="Hash",Mo={value:String};function Do(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function jo(e){this.token(4,"#"+e.value)}var Bo={};S(Bo,{generate:()=>Ho,name:()=>Uo,parse:()=>qo,structure:()=>Fo});var Uo="Identifier",Fo={name:String};function qo(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Ho(e){this.token(1,e.name)}var Vo={};S(Vo,{generate:()=>Qo,name:()=>Wo,parse:()=>Jo,structure:()=>$o});var Wo="IdSelector",$o={name:String};function Jo(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Qo(e){this.token(9,"#"+e.name)}var Ko={};S(Ko,{generate:()=>Zo,name:()=>Go,parse:()=>Xo,structure:()=>Yo});var Go="MediaFeature",Yo={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function Xo(){let e,t=this.tokenStart,n=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:n=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:n}}function Zo(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var el={};S(el,{generate:()=>al,name:()=>tl,parse:()=>rl,structure:()=>nl});var tl="MediaQuery",nl={children:[["Identifier","MediaFeature","WhiteSpace"]]};function rl(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function al(e){this.children(e)}var il={};S(il,{generate:()=>cl,name:()=>ol,parse:()=>sl,structure:()=>ll});var ol="MediaQueryList",ll={children:[["MediaQuery"]]};function sl(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function cl(e){this.children(e,(()=>this.token(18,",")))}var ul={};S(ul,{generate:()=>gl,name:()=>dl,parse:()=>ml,structure:()=>pl});var hl=38,dl="NestingSelector",pl={};function ml(){let e=this.tokenStart;return this.eatDelim(hl),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function gl(){this.token(9,"&")}var fl={};S(fl,{generate:()=>wl,name:()=>bl,parse:()=>kl,structure:()=>yl});var bl="Nth",yl={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function kl(){this.skipSC();let e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function wl(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var vl={};S(vl,{generate:()=>Sl,name:()=>xl,parse:()=>Cl,structure:()=>Al});var xl="Number",Al={value:String};function Cl(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Sl(e){this.token(10,e.value)}var El={};S(El,{generate:()=>Rl,name:()=>Tl,parse:()=>Ll,structure:()=>zl});var Tl="Operator",zl={value:String};function Ll(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Rl(e){this.tokenize(e.value)}var Il={};S(Il,{generate:()=>Nl,name:()=>_l,parse:()=>Pl,structure:()=>Ol});var _l="Parentheses",Ol={children:[[]]};function Pl(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function Nl(e){this.token(21,"("),this.children(e),this.token(22,")")}var Ml={};S(Ml,{generate:()=>Ul,name:()=>Dl,parse:()=>Bl,structure:()=>jl});var Dl="Percentage",jl={value:String};function Bl(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Ul(e){this.token(11,e.value+"%")}var Fl={};S(Fl,{generate:()=>$l,name:()=>ql,parse:()=>Wl,structure:()=>Vl,walkContext:()=>Hl});var ql="PseudoClassSelector",Hl="function",Vl={name:String,children:[["Raw"],null]};function Wl(){let e,t,n=this.tokenStart,r=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),22==this.lookupNonWSType(0)?r=this.createList():hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function $l(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Jl={};S(Jl,{generate:()=>Xl,name:()=>Ql,parse:()=>Yl,structure:()=>Gl,walkContext:()=>Kl});var Ql="PseudoElementSelector",Kl="function",Gl={name:String,children:[["Raw"],null]};function Yl(){let e,t,n=this.tokenStart,r=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),22==this.lookupNonWSType(0)?r=this.createList():hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Xl(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Zl={};S(Zl,{generate:()=>os,name:()=>rs,parse:()=>is,structure:()=>as});var es=47,ts=46;function ns(){this.skipSC();let e=this.consume(10);for(let t=0;t0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}S(ls,{generate:()=>ds,name:()=>cs,parse:()=>hs,structure:()=>us});var cs="Raw",us={value:String};function hs(e,t,n){let r,a=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>a?ss.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(a,r),value:this.substring(a,r)}}function ds(e){this.tokenize(e.value)}var ps={};function ms(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function gs(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}S(ps,{generate:()=>ws,name:()=>fs,parse:()=>ks,structure:()=>ys,walkContext:()=>bs});var fs="Rule",bs="rule",ys={prelude:["SelectorList","Raw"],block:["Block"]};function ks(){let e,t,n=this.tokenIndex,r=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(gs,ms):ms.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.tokenStart),prelude:e,block:t}}function ws(e){this.node(e.prelude),this.node(e.block)}var vs={};S(vs,{generate:()=>Ss,name:()=>xs,parse:()=>Cs,structure:()=>As});var xs="Selector",As={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Cs(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function Ss(e){this.children(e)}var Es={};S(Es,{generate:()=>Is,name:()=>Ts,parse:()=>Rs,structure:()=>Ls,walkContext:()=>zs});var Ts="SelectorList",zs="selector",Ls={children:[["Selector","Raw"]]};function Rs(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Is(e){this.children(e,(()=>this.token(18,",")))}var _s={};S(_s,{generate:()=>Fs,name:()=>js,parse:()=>Us,structure:()=>Bs});S({},{decode:()=>Ms,encode:()=>Ds});var Os=92,Ps=34,Ns=39;function Ms(e){let t=e.length,n=e.charCodeAt(0),r=n===Ps||n===Ns?1:0,a=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let n=r;n<=a;n++){let r=e.charCodeAt(n);if(r===Os){if(n===a){n!==t-1&&(i=e.substr(n+1));break}if(r=e.charCodeAt(++n),de(Os,r)){let t=n-1,r=ze(e,t);n=r-1,i+=_e(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(n+1)&&n++}else i+=e[n]}return i}function Ds(e,t){let n=t?"'":'"',r=t?Ns:Ps,a="",i=!1;for(let t=0;tKs,name:()=>Ws,parse:()=>Qs,structure:()=>Js,walkContext:()=>$s});var Hs=33;function Vs(e){return this.Raw(e,null,!1)}var Ws="StyleSheet",$s="stylesheet",Js={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Qs(){let e,t=this.tokenStart,n=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==Hs){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,Vs);break;default:e=this.parseWithFallback(this.Rule,Vs)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:n}}function Ks(e){this.children(e)}var Gs={};S(Gs,{generate:()=>rc,name:()=>ec,parse:()=>nc,structure:()=>tc});var Ys=42,Xs=124;function Zs(){1!==this.tokenType&&!1===this.isDelim(Ys)&&this.error("Identifier or asterisk is expected"),this.next()}var ec="TypeSelector",tc={name:String};function nc(){let e=this.tokenStart;return this.isDelim(Xs)?(this.next(),Zs.call(this)):(Zs.call(this),this.isDelim(Xs)&&(this.next(),Zs.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function rc(e){this.tokenize(e.name)}var ac={};S(ac,{generate:()=>gc,name:()=>dc,parse:()=>mc,structure:()=>pc});var ic=43,oc=45,lc=63;function sc(e,t){let n=0;for(let r=this.tokenStart+e;r6&&this.error("Too many hex digits",r)}return this.next(),n}function cc(e){let t=0;for(;this.isDelim(lc);)++t>e&&this.error("Too many question marks"),this.next()}function uc(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===ic?"Plus sign":"Hyphen minus")+" is expected")}function hc(){let e=0;switch(this.tokenType){case 10:if(e=sc.call(this,1,!0),this.isDelim(lc)){cc.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){uc.call(this,oc),sc.call(this,1,!1);break}break;case 12:e=sc.call(this,1,!0),e>0&&cc.call(this,6-e);break;default:if(this.eatDelim(ic),1===this.tokenType){e=sc.call(this,0,!0),e>0&&cc.call(this,6-e);break}if(this.isDelim(lc)){this.next(),cc.call(this,5);break}this.error("Hex digit or question mark is expected")}}var dc="UnicodeRange",pc={value:String};function mc(){let e=this.tokenStart;return this.eatIdent("u"),hc.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function gc(e){this.tokenize(e.value)}var fc={};S(fc,{generate:()=>zc,name:()=>Sc,parse:()=>Tc,structure:()=>Ec});S({},{decode:()=>Ac,encode:()=>Cc});var bc=32,yc=92,kc=34,wc=39,vc=40,xc=41;function Ac(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===xc?t-2:t-1,a="";for(;nOc,name:()=>Rc,parse:()=>_c,structure:()=>Ic});var Rc="Value",Ic={children:[[]]};function _c(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function Oc(e){this.children(e)}var Pc={};S(Pc,{generate:()=>Bc,name:()=>Mc,parse:()=>jc,structure:()=>Dc});var Nc=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Mc="WhiteSpace",Dc={value:String};function jc(){return this.eat(13),Nc}function Bc(e){this.token(13,e.value)}var Uc={generic:!0,generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["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"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( )","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","asin()":"asin( )","atan()":"atan( )","atan2()":"atan2( , )",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?",axis:"block|inline|vertical|horizontal","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":"||||( )","calc-constant":"e|pi|infinity|-infinity|NaN","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( [] )","cos()":"cos( )",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( , ? )","exp()":"exp( )","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'>|||| [/ ]?||||||||","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]]? )","hypot()":"hypot( # )",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|","lab()":"lab( [||none] [||none] [||none] [/ [|none]]? )","layer()":"layer( )","layer-name":" ['.' ]*","lch()":"lch( [||none] [||none] [|none] [/ [|none]]? )","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 ]? , )","log()":"log( , ? )","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] )","mod()":"mod( , )","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( [|none] )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pow()":"pow( , )","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 ]? , )",ratio:" [/ ]?","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","rem()":"rem( , )","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 ]? , )","reversed-counter-name":"reversed( )","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( [|] )","round()":"round( ? , , )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( )","scale()":"scale( [|]#{1,2} )","scale3d()":"scale3d( [|]#{3} )","scaleX()":"scaleX( [|] )","scaleY()":"scaleY( [|] )","scaleZ()":"scaleZ( [|] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","sign()":"sign( )","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]","sin()":"sin( )","single-animation":"