!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).singlefile={})}(this,(function(n){"use strict";const e=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"],t=1,a=3,o=8,i=[{tagName:"HEAD",accept:n=>!n.childNodes.length||n.childNodes[0].nodeType==t},{tagName:"BODY",accept:n=>!n.childNodes.length}],r=[{tagName:"HTML",accept:n=>!n||n.nodeType!=o},{tagName:"HEAD",accept:n=>!n||n.nodeType!=o&&(n.nodeType!=a||!m(n.textContent))},{tagName:"BODY",accept:n=>!n||n.nodeType!=o},{tagName:"LI",accept:(n,e)=>!n&&e.parentElement&&("UL"==d(e.parentElement)||"OL"==d(e.parentElement))||n&&["LI"].includes(d(n))},{tagName:"DT",accept:n=>!n||["DT","DD"].includes(d(n))},{tagName:"P",accept:n=>n&&["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(d(n))},{tagName:"DD",accept:n=>!n||["DT","DD"].includes(d(n))},{tagName:"RT",accept:n=>!n||["RT","RP"].includes(d(n))},{tagName:"RP",accept:n=>!n||["RT","RP"].includes(d(n))},{tagName:"OPTGROUP",accept:n=>!n||["OPTGROUP"].includes(d(n))},{tagName:"OPTION",accept:n=>!n||["OPTION","OPTGROUP"].includes(d(n))},{tagName:"COLGROUP",accept:n=>!n||n.nodeType!=o&&(n.nodeType!=a||!m(n.textContent))},{tagName:"CAPTION",accept:n=>!n||n.nodeType!=o&&(n.nodeType!=a||!m(n.textContent))},{tagName:"THEAD",accept:n=>!n||["TBODY","TFOOT"].includes(d(n))},{tagName:"TBODY",accept:n=>!n||["TBODY","TFOOT"].includes(d(n))},{tagName:"TFOOT",accept:n=>!n},{tagName:"TR",accept:n=>!n||["TR"].includes(d(n))},{tagName:"TD",accept:n=>!n||["TD","TH"].includes(d(n))},{tagName:"TH",accept:n=>!n||["TD","TH"].includes(d(n))}],s=["STYLE","SCRIPT","XMP","IFRAME","NOEMBED","NOFRAMES","PLAINTEXT","NOSCRIPT"];function l(n,e){const t=n.doctype;let a="";return t&&(a=" "),a+c(n.documentElement,e)}function c(n,l,m){return n.nodeType==a?function(n){const e=n.parentNode;let a;e&&e.nodeType==t&&(a=d(e));return!a||s.includes(a)?"SCRIPT"==a||"STYLE"==a?n.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):n.textContent:n.textContent.replace(/&/g,"&").replace(/\u00a0/g," ").replace(//g,">")}(n):n.nodeType==o?"\x3c!--"+n.textContent+"--\x3e":n.nodeType==t?function(n,t,a){const o=d(n),s=t&&i.find((e=>o==d(e)&&e.accept(n)));let l="";s&&!n.attributes.length||(l="<"+o.toLowerCase(),Array.from(n.attributes).forEach((e=>l+=function(n,e,t){const a=n.name;let o="";if(!a.match(/["'>/=]/)){let i,r=n.value;t&&"class"==a&&(r=Array.from(e.classList).map((n=>n.trim())).join(" ")),r=r.replace(/&/g,"&").replace(/\u00a0/g," "),r.includes('"')&&(r.includes("'")||!t?r=r.replace(/"/g,"""):i=!0);const s=!t||r.match(/[ \t\n\f\r'"`=<>]/);o+=" ",n.namespace?"http://www.w3.org/XML/1998/namespace"==n.namespaceURI?o+="xml:"+a:"http://www.w3.org/2000/xmlns/"==n.namespaceURI?("xmlns"!==a&&(o+="xmlns:"),o+=a):"http://www.w3.org/1999/xlink"==n.namespaceURI?o+="xlink:"+a:o+=a:o+=a,""!=r&&(o+="=",s&&(o+=i?"'":'"'),o+=r,s&&(o+=i?"'":'"'))}return o}(e,n,t))),l+=">");"TEMPLATE"!=o||n.childNodes.length?Array.from(n.childNodes).forEach((n=>l+=c(n,t,a||"svg"==o))):l+=n.innerHTML;const m=t&&r.find((e=>o==d(e)&&e.accept(n.nextSibling,n)));(a||!m&&!e.includes(o))&&(l+="");return l}(n,l,m):void 0}function m(n){return Boolean(n.match(/^[ \t\n\f\r]/))}function d(n){return n.tagName&&n.tagName.toUpperCase()}const h="single-file-",p="SingleFile",u="single-file-infobar",g="\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 w(n,e,t){if(!n.querySelector(u)){let a;e.infobarContent?a=e.infobarContent.replace(/\\n/g,"\n").replace(/\\t/g,"\t"):e.saveDate&&(a=e.saveDate),a=a||"No info";const o=function(n,e,t){const a=n.createElement(e);return t.appendChild(a),Array.from(getComputedStyle(a)).forEach((n=>a.style.setProperty(n,"initial","important"))),a}(n,u,n.body);let i;if(t)i=o.attachShadow({mode:"open"});else{const e=n.createElement("template");e.setAttribute("shadowrootmode","open"),o.appendChild(e),i=e}const r=n.createElement("div"),s=n.createElement("style");s.textContent=g.replace(/ {2}/g,"").replace(/\n/g,"").replace(/: /g,":").replace(/, /g,","),r.appendChild(s);const l=n.createElement("form");l.classList.add("infobar"),r.appendChild(l);const c=n.createElement("span");c.tabIndex=-1,c.classList.add("infobar-icon"),l.appendChild(c);const m=n.createElement("span");m.tabIndex=-1,m.classList.add("infobar-content");const d=n.createElement("input");d.type="checkbox",d.required=!0,d.classList.add("infobar-close-icon"),d.title="Close",m.appendChild(d);const h=n.createElement("span");h.textContent=a,m.appendChild(h);const p=n.createElement("a");if(p.classList.add("infobar-link-icon"),p.target="_blank",p.rel="noopener noreferrer",p.title="Open source URL: "+e.saveUrl,p.href=e.saveUrl,m.appendChild(p),l.appendChild(m),t)i.appendChild(r);else{const e=n.createElement("script");let t=f.toString();t+=b.toString(),t+="("+k.toString()+")(document)",e.textContent=t,r.appendChild(e),i.innerHTML=r.outerHTML}n.body.appendChild(o)}}function b(n){const e=n.evaluate("//comment()",n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);let t=e&&e.singleNodeValue;if(t&&t.nodeType==Node.COMMENT_NODE&&t.textContent.includes(p)){const n=t.textContent.split("\n"),[,,e,...a]=n,o=e.match(/^ url: (.*) ?$/),i=o&&o[1];if(i){let n,e;if(a.length&&(e=a[0].split("saved date: ")[1],e&&a.shift(),a.length>1)){let e=a[0].split("info: ")[1].trim();for(let n=1;n{if(o.pendingData){const e=o.pendingData;o.pendingData=new E(e.length+n.length);const{pendingData:t}=o;t.set(e,0),t.set(n,e.length)}else o.pendingData=new E(n)}))}append(n){return this.codec.push(n),a(this)}flush(){return this.codec.push(new E,!0),a(this)}};function a(n){if(n.pendingData){const e=n.pendingData;return n.pendingData=null,e}return new E}}const On=[];for(let n=0;n<256;n++){let e=n;for(let n=0;n<8;n++)1&e?e=e>>>1^3988292384:e>>>=1;On[n]=e}class Pn{constructor(n){this.crc=n||-1}append(n){let e=0|this.crc;for(let t=0,a=0|n.length;t>>8^On[255&(e^n[t])];this.crc=e}get(){return~this.crc}}class _n extends U{constructor(){let n;const e=new Pn;super({transform(n,t){e.append(n),t.enqueue(n)},flush(){const t=new E(4);new B(t.buffer).setUint32(0,e.get()),n.value=t}}),n=this}}function Fn(n){if(void 0===P){n=unescape(encodeURIComponent(n));const e=new E(n.length);for(let t=0;t0&&e&&(n[t-1]=qn.partial(e,n[t-1]&2147483648>>e-1,1)),n},partial:(n,e,t)=>32===n?e:(t?0|e:e<<32-n)+1099511627776*n,getPartial:n=>C.round(n/1099511627776)||32,_shiftRight(n,e,t,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(t),t=0;if(0===e)return a.concat(n);for(let o=0;o>>e),t=n[o]<<32-e;const o=n.length?n[n.length-1]:0,i=qn.getPartial(o);return a.push(qn.partial(e+i&31,e+i>32?t:a.pop(),1)),a}},Hn={bytes:{fromBits(n){const e=qn.bitLength(n)/8,t=new E(e);let a;for(let o=0;o>>24,a<<=8;return t},toBits(n){const e=[];let t,a=0;for(t=0;t9007199254740991)throw new R("Cannot hash more than 2^53 - 1 bits");const i=new M(t);let r=0;for(let n=e.blockSize+a-(e.blockSize+a&e.blockSize-1);n<=o;n+=e.blockSize)e._block(i.subarray(16*r,16*(r+1))),r+=1;return t.splice(0,16*r),e}finalize(){const n=this;let e=n._buffer;const t=n._h;e=qn.concat(e,[qn.partial(1,1)]);for(let n=e.length+2;15&n;n++)e.push(0);for(e.push(C.floor(n._length/4294967296)),e.push(0|n._length);e.length;)n._block(e.splice(0,16));return n.reset(),t}_f(n,e,t,a){return n<=19?e&t|~e&a:n<=39?e^t^a:n<=59?e&t|e&a|t&a:n<=79?e^t^a:void 0}_S(n,e){return e<>>32-n}_block(n){const e=this,t=e._h,a=y(80);for(let e=0;e<16;e++)a[e]=n[e];let o=t[0],i=t[1],r=t[2],s=t[3],l=t[4];for(let n=0;n<=79;n++){n>=16&&(a[n]=e._S(1,a[n-3]^a[n-8]^a[n-14]^a[n-16]));const t=e._S(5,o)+e._f(n,i,r,s)+l+a[n]+e._key[C.floor(n/20)]|0;l=s,s=r,r=e._S(30,i),i=o,o=t}t[0]=t[0]+o|0,t[1]=t[1]+i|0,t[2]=t[2]+r|0,t[3]=t[3]+s|0,t[4]=t[4]+l|0}}},Gn={aes:class{constructor(n){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],a=e._tables[1],o=n.length;let i,r,s,l=1;if(4!==o&&6!==o&&8!==o)throw new R("invalid aes key size");for(e._key=[r=n.slice(0),s=[]],i=o;i<4*o+28;i++){let n=r[i-1];(i%o==0||8===o&&i%o==4)&&(n=t[n>>>24]<<24^t[n>>16&255]<<16^t[n>>8&255]<<8^t[255&n],i%o==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),r[i]=r[i-o]^n}for(let n=0;i;n++,i--){const e=r[3&n?i:i-4];s[n]=i<=4||n<4?e:a[0][t[e>>>24]]^a[1][t[e>>16&255]]^a[2][t[e>>8&255]]^a[3][t[255&e]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],e=this._tables[1],t=n[4],a=e[4],o=[],i=[];let r,s,l,c;for(let n=0;n<256;n++)i[(o[n]=n<<1^283*(n>>7))^n]=n;for(let m=r=0;!t[m];m^=s||1,r=i[r]||1){let i=r^r<<1^r<<2^r<<3^r<<4;i=i>>8^255&i^99,t[m]=i,a[i]=m,c=o[l=o[s=o[m]]];let d=16843009*c^65537*l^257*s^16843008*m,h=257*o[i]^16843008*i;for(let t=0;t<4;t++)n[t][m]=h=h<<24^h>>>8,e[t][i]=d=d<<24^d>>>8}for(let t=0;t<5;t++)n[t]=n[t].slice(0),e[t]=e[t].slice(0)}_crypt(n,e){if(4!==n.length)throw new R("invalid aes block size");const t=this._key[e],a=t.length/4-2,o=[0,0,0,0],i=this._tables[e],r=i[0],s=i[1],l=i[2],c=i[3],m=i[4];let d,h,p,u=n[0]^t[0],g=n[e?3:1]^t[1],w=n[2]^t[2],b=n[e?1:3]^t[3],f=4;for(let n=0;n>>24]^s[g>>16&255]^l[w>>8&255]^c[255&b]^t[f],h=r[g>>>24]^s[w>>16&255]^l[b>>8&255]^c[255&u]^t[f+1],p=r[w>>>24]^s[b>>16&255]^l[u>>8&255]^c[255&g]^t[f+2],b=r[b>>>24]^s[u>>16&255]^l[g>>8&255]^c[255&w]^t[f+3],f+=4,u=d,g=h,w=p;for(let n=0;n<4;n++)o[e?3&-n:n]=m[u>>>24]<<24^m[g>>16&255]<<16^m[w>>8&255]<<8^m[255&b]^t[f++],d=u,u=g,g=w,w=b,b=d;return o}}},Wn={getRandomValues(n){const e=new M(n.buffer),t=n=>{let e=987654321;const t=4294967295;return function(){e=36969*(65535&e)+(e>>16)&t;return(((e<<16)+(n=18e3*(65535&n)+(n>>16)&t)&t)/4294967296+.5)*(C.random()>.5?1:-1)}};for(let a,o=0;o>24&255)){let e=n>>16&255,t=n>>8&255,a=255&n;255===e?(e=0,255===t?(t=0,255===a?a=0:++a):++t):++e,n=0,n+=e<<16,n+=t<<8,n+=a}else n+=1<<24;return n}incCounter(n){0===(n[0]=this.incWord(n[0]))&&(n[1]=this.incWord(n[1]))}calculate(n,e,t){let a;if(!(a=e.length))return[];const o=qn.bitLength(e);for(let o=0;onew Kn.hmacSha1(Hn.bytes.toBits(n)),pbkdf2(n,e,t,a){if(t=t||1e4,a<0||t<0)throw new R("invalid params to pbkdf2");const o=1+(a>>5)<<2;let i,r,s,l,c;const m=new ArrayBuffer(o),d=new B(m);let h=0;const p=qn;for(e=Hn.bytes.toBits(e),c=1;h<(o||1);c++){for(i=r=n.encrypt(p.concat(e,[c])),s=1;so&&(n=(new t).update(n).finalize());for(let e=0;ethis.resolveReady=n)),password:n,signed:e,strength:t-1,pending:new E})},async transform(n,e){const t=this,{password:o,strength:i,resolveReady:r,ready:s}=t;o?(await async function(n,e,t,a){const o=await Se(n,e,t,Ce(a,0,ie[e])),i=Ce(a,ie[e]);if(o[0]!=i[0]||o[1]!=i[1])throw new R(Yn)}(t,i,o,Ce(n,0,ie[i]+2)),n=Ce(n,ie[i]+2),a?e.error(new R(Xn)):r()):await s;const l=new E(n.length-se-(n.length-se)%Qn);e.enqueue(je(t,n,l,0,se,!0))},async flush(n){const{signed:e,ctr:t,hmac:a,pending:o,ready:i}=this;await i;const r=Ce(o,0,o.length-se),s=Ce(o,o.length-se);let l=new E;if(r.length){const n=Le(ue,r);a.update(n);const e=t.update(n);l=ze(ue,e)}if(e){const n=Ce(ze(ue,a.digest()),0,se);for(let e=0;ethis.resolveReady=n)),password:n,strength:e-1,pending:new E})},async transform(n,e){const t=this,{password:a,strength:o,resolveReady:i,ready:r}=t;let s=new E;a?(s=await async function(n,e,t){const a=$n(new E(ie[e])),o=await Se(n,e,t,a);return xe(a,o)}(t,o,a),i()):await r;const l=new E(s.length+n.length-n.length%Qn);l.set(s,0),e.enqueue(je(t,n,l,s.length,0))},async flush(n){const{ctr:e,hmac:a,pending:o,ready:i}=this;await i;let r=new E;if(o.length){const n=e.update(Le(ue,o));a.update(n),r=ze(ue,n)}t.signature=ze(ue,a.digest()).slice(0,se),n.enqueue(xe(r,t.signature))}}),t=this}}function je(n,e,t,a,o,i){const{ctr:r,hmac:s,pending:l}=n,c=e.length-o;let m;for(l.length&&(e=xe(l,e),t=function(n,e){if(e&&e>n.length){const t=n;(n=new E(e)).set(t,0)}return n}(t,c-c%Qn)),m=0;m<=c-Qn;m+=Qn){const n=Le(ue,Ce(e,m,m+Qn));i&&s.update(n);const o=r.update(n);i||s.update(o),t.set(ze(ue,o),m+a)}return n.pending=Ce(e,m),t}async function Se(n,e,t,a){n.password=null;const o=Fn(t),i=await async function(n,e,t,a,o){if(!fe)return Kn.importKey(e);try{return await he.importKey(n,e,t,a,o)}catch(n){return fe=!1,Kn.importKey(e)}}(ne,o,te,!1,oe),r=await async function(n,e,t){if(!ke)return Kn.pbkdf2(e,n.salt,ae.iterations,t);try{return await he.deriveBits(n,e,t)}catch(a){return ke=!1,Kn.pbkdf2(e,n.salt,ae.iterations,t)}}(v.assign({salt:a},ae),i,8*(2*re[e]+2)),s=new E(r),l=Le(ue,Ce(s,0,re[e])),c=Le(ue,Ce(s,re[e],2*re[e])),m=Ce(s,2*re[e]);return v.assign(n,{keys:{key:l,authentication:c,passwordVerification:m},ctr:new we(new ge(l),y.from(le)),hmac:new be(c)}),m}function xe(n,e){let t=n;return n.length+e.length&&(t=new E(n.length+e.length),t.set(n,0),t.set(e,n.length)),t}function Ce(n,e,t){return n.subarray(e,t)}function ze(n,e){return n.fromBits(e)}function Le(n,e){return n.toBits(e)}const Ae=12;class Ie extends U{constructor({password:n,passwordVerification:e,checkPasswordOnly:t}){super({start(){v.assign(this,{password:n,passwordVerification:e}),De(this,n)},transform(n,e){const a=this;if(a.password){const e=Re(a,n.subarray(0,Ae));if(a.password=null,e[11]!=a.passwordVerification)throw new R(Yn);n=n.subarray(Ae)}t?e.error(new R(Xn)):e.enqueue(Re(a,n))}})}}class Te extends U{constructor({password:n,passwordVerification:e}){super({start(){v.assign(this,{password:n,passwordVerification:e}),De(this,n)},transform(n,e){const t=this;let a,o;if(t.password){t.password=null;const e=$n(new E(Ae));e[11]=t.passwordVerification,a=new E(n.length+e.length),a.set(Ee(t,e),0),o=Ae}else a=new E(n.length),o=0;a.set(Ee(t,n),o),e.enqueue(a)}})}}function Re(n,e){const t=new E(e.length);for(let a=0;a>>24]),o=~n.crcKey2.get(),n.keys=[t,a,o]}function Be(n){const e=2|n.keys[2];return Ne(C.imul(e,1^e)>>>8)}function Ne(n){return 255&n}function Oe(n){return 4294967295&n}const Pe="deflate-raw";class _e extends U{constructor(n,{chunkSize:e,CompressionStream:t,CompressionStreamNative:a}){super({});const{compressed:o,encrypted:i,useCompressionStream:r,zipCrypto:s,signed:l,level:c}=n,m=this;let d,h,p=qe(super.readable);i&&!s||!l||(d=new _n,p=Ge(p,d)),o&&(p=Ue(p,r,{level:c,chunkSize:e},a,t)),i&&(s?p=Ge(p,new Te(n)):(h=new ve(n),p=Ge(p,h))),He(m,p,(()=>{let n;i&&!s&&(n=h.signature),i&&!s||!l||(n=new B(d.value.buffer).getUint32(0)),m.signature=n}))}}class Fe extends U{constructor(n,{chunkSize:e,DecompressionStream:t,DecompressionStreamNative:a}){super({});const{zipCrypto:o,encrypted:i,signed:r,signature:s,compressed:l,useCompressionStream:c}=n;let m,d,h=qe(super.readable);i&&(o?h=Ge(h,new Ie(n)):(d=new ye(n),h=Ge(h,d))),l&&(h=Ue(h,c,{chunkSize:e},a,t)),i&&!o||!r||(m=new _n,h=Ge(h,m)),He(this,h,(()=>{if((!i||o)&&r){const n=new B(m.value.buffer);if(s!=n.getUint32(0,!1))throw new R(Zn)}}))}}function qe(n){return Ge(n,new U({transform(n,e){n&&n.length&&e.enqueue(n)}}))}function He(n,e,t){e=Ge(e,new U({flush:t})),v.defineProperty(n,"readable",{get:()=>e})}function Ue(n,e,t,a,o){try{n=Ge(n,new(e&&a?a:o)(Pe,t))}catch(a){if(!e)throw a;n=Ge(n,new o(Pe,t))}return n}function Ge(n,e){return n.pipeThrough(e)}const We="message",Ve="start",Ke="pull",Je="data",Ye="ack",Ze="close",Xe="deflate",$e="inflate";class Qe extends U{constructor(n,e){super({});const t=this,{codecType:a}=n;let o;a.startsWith(Xe)?o=_e:a.startsWith($e)&&(o=Fe);let i=0;const r=new o(n,e),s=super.readable,l=new U({transform(n,e){n&&n.length&&(i+=n.length,e.enqueue(n))},flush(){const{signature:n}=r;v.assign(t,{signature:n,size:i})}});v.defineProperty(t,"readable",{get:()=>s.pipeThrough(r).pipeThrough(l)})}}const nt=typeof Y!=Cn;class et{constructor(n,{readable:e,writable:t},{options:a,config:o,streamOptions:i,useWebWorkers:r,transferStreams:s,scripts:l},c){const{signal:m}=i;return v.assign(n,{busy:!0,readable:e.pipeThrough(new tt(e,i,o),{signal:m}),writable:t,options:v.assign({},a),scripts:l,transferStreams:s,terminate(){const{worker:e,busy:t}=n;e&&!t&&(e.terminate(),n.interface=null)},onTaskFinished(){n.busy=!1,c(n)}}),(r&&nt?it:ot)(n,o)}}class tt extends U{constructor(n,{onstart:e,onprogress:t,size:a,onend:o},{chunkSize:i}){let r=0;super({start(){e&&at(e,a)},async transform(n,e){r+=n.length,t&&await at(t,r,a),e.enqueue(n)},flush(){n.size=r,o&&at(o,r)}},{highWaterMark:1,size:()=>i})}}async function at(n,...e){try{await n(...e)}catch(n){}}function ot(n,e){return{run:()=>async function({options:n,readable:e,writable:t,onTaskFinished:a},o){const i=new Qe(n,o);try{await e.pipeThrough(i).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:n,size:a}=i;return{signature:n,size:a}}finally{a()}}(n,e)}}function it(n,{baseURL:e,chunkSize:t}){return n.interface||v.assign(n,{worker:lt(n.scripts[0],e,n),interface:{run:()=>async function(n,e){let t,a;const o=new O(((n,e)=>{t=n,a=e}));v.assign(n,{reader:null,writer:null,resolveResult:t,rejectResult:a,result:o});const{readable:i,options:r,scripts:s}=n,{writable:l,closed:c}=function(n){const e=n.getWriter();let t;const a=new O((n=>t=n)),o=new W({async write(n){await e.ready,await e.write(n)},close(){e.releaseLock(),t()},abort:n=>e.abort(n)});return{writable:o,closed:a}}(n.writable),m=ct({type:Ve,scripts:s.slice(1),options:r,config:e,readable:i,writable:l},n);m||v.assign(n,{reader:i.getReader(),writer:l.getWriter()});const d=await o;try{await l.getWriter().close()}catch(n){}return await c,d}(n,{chunkSize:t})}}),n.interface}let rt=!0,st=!0;function lt(n,e,t){const a={type:"module"};let o,i;typeof n==zn&&(n=n());try{o=new T(n,e)}catch(e){o=n}if(rt)try{i=new Y(o)}catch(n){rt=!1,i=new Y(o,a)}else i=new Y(o,a);return i.addEventListener(We,(n=>async function({data:n},e){const{type:t,value:a,messageId:o,result:i,error:r}=n,{reader:s,writer:l,resolveResult:c,rejectResult:m,onTaskFinished:d}=e;try{if(r){const{message:n,stack:e,code:t,name:a}=r,o=new R(n);v.assign(o,{stack:e,code:t,name:a}),h(o)}else{if(t==Ke){const{value:n,done:t}=await s.read();ct({type:Je,value:n,done:t,messageId:o},e)}t==Je&&(await l.ready,await l.write(new E(a)),ct({type:Ye,messageId:o},e)),t==Ze&&h(null,i)}}catch(r){h(r)}function h(n,e){n?m(n):c(e),l&&l.releaseLock(),d()}}(n,t))),i}function ct(n,{worker:e,writer:t,onTaskFinished:a,transferStreams:o}){try{let{value:t,readable:a,writable:i}=n;const r=[];if(t&&(n.value=t.buffer,r.push(n.value)),o&&st?(a&&r.push(a),i&&r.push(i)):n.readable=n.writable=null,r.length)try{return e.postMessage(n,r),!0}catch(t){st=!1,n.readable=n.writable=null,e.postMessage(n)}else e.postMessage(n)}catch(n){throw t&&t.releaseLock(),a(),n}}let mt=[];const dt=[];let ht=0;async function pt(n,e){const{options:t,config:a}=e,{transferStreams:o,useWebWorkers:i,useCompressionStream:r,codecType:s,compressed:l,signed:c,encrypted:m}=t,{workerScripts:d,maxWorkers:h,terminateWorkerTimeout:p}=a;e.transferStreams=o||o===xn;const u=!(l||c||m||e.transferStreams);let g;e.useWebWorkers=!u&&(i||i===xn&&a.useWebWorkers),e.scripts=e.useWebWorkers&&d?d[s]:[],t.useCompressionStream=r||r===xn&&a.useCompressionStream;const w=mt.find((n=>!n.busy));if(w)ut(w),g=new et(w,n,e,b);else if(mt.lengthdt.push({resolve:t,stream:n,workerOptions:e})));return g.run();function b(n){if(dt.length){const[{resolve:e,stream:t,workerOptions:a}]=dt.splice(0,1);e(new et(n,t,a,b))}else n.worker?(ut(n),S.isFinite(p)&&p>=0&&(n.terminateTimeout=setTimeout((()=>{mt=mt.filter((e=>e!=n)),n.terminate()}),p))):mt=mt.filter((e=>e!=n))}}function ut(n){const{terminateTimeout:e}=n;e&&(clearTimeout(e),n.terminateTimeout=null)}const gt="HTTP error ",wt="HTTP Range not supported",bt="Writer iterator completed too soon",ft="Content-Length",kt="Range",yt="HEAD",vt="GET",jt="bytes",St=65536,xt="writable";class Ct{constructor(){this.size=0}init(){this.initialized=!0}}class zt extends Ct{get readable(){const n=this,{chunkSize:e=St}=n,t=new G({start(){this.chunkOffset=0},async pull(a){const{offset:o=0,size:i,diskNumberStart:r}=t,{chunkOffset:s}=this;a.enqueue(await Yt(n,o+s,C.min(e,i-s),r)),s+e>i?a.close():this.chunkOffset+=e}});return t}}class Lt extends Ct{constructor(){super();const n=this,e=new W({write:e=>n.writeUint8Array(e)});v.defineProperty(n,xt,{get:()=>e})}writeUint8Array(){}}class At extends zt{constructor(n){super(),v.assign(this,{blob:n,size:n.size})}async readUint8Array(n,e){const t=this,a=n+e,o=n||ae&&(i=i.slice(n,a)),new E(i)}}class It extends Ct{constructor(n){super();const e=new U,t=[];n&&t.push(["Content-Type",n]),v.defineProperty(this,xt,{get:()=>e.writable}),this.blob=new I(e.readable,{headers:t}).blob()}getData(){return this.blob}}class Tt extends zt{constructor(n,e){super(),Et(this,n,e)}async init(){await Dt(this,qt,Ot),super.init()}readUint8Array(n,e){return Mt(this,n,e,qt,Ot)}}class Rt extends zt{constructor(n,e){super(),Et(this,n,e)}async init(){await Dt(this,Ht,Pt),super.init()}readUint8Array(n,e){return Mt(this,n,e,Ht,Pt)}}function Et(n,e,t){const{preventHeadRequest:a,useRangeHeader:o,forceRangeRequests:i}=t;delete(t=v.assign({},t)).preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR,v.assign(n,{url:e,options:t,preventHeadRequest:a,useRangeHeader:o,forceRangeRequests:i})}async function Dt(n,e,t){const{url:a,useRangeHeader:o,forceRangeRequests:i}=n;if(function(n){const{baseURL:e}=En(),{protocol:t}=new T(n,e);return"http:"==t||"https:"==t}(a)&&(o||i)){const{headers:a}=await e(vt,n,Bt(n));if(!i&&a.get("Accept-Ranges")!=jt)throw new R(wt);{let o;const i=a.get("Content-Range");if(i){const n=i.trim().split(/\s*\/\s*/);if(n.length){const e=n[1];e&&"*"!=e&&(o=S(e))}}o===xn?await Ft(n,e,t):n.size=o}}else await Ft(n,e,t)}async function Mt(n,e,t,a,o){const{useRangeHeader:i,forceRangeRequests:r,options:s}=n;if(i||r){const o=await a(vt,n,Bt(n,e,t));if(206!=o.status)throw new R(wt);return new E(await o.arrayBuffer())}{const{data:a}=n;return a||await o(n,s),new E(n.data.subarray(e,e+t))}}function Bt(n,e=0,t=1){return v.assign({},Nt(n),{[kt]:jt+"="+e+"-"+(e+t-1)})}function Nt({options:n}){const{headers:e}=n;if(e)return Symbol.iterator in e?v.fromEntries(e):e}async function Ot(n){await _t(n,qt)}async function Pt(n){await _t(n,Ht)}async function _t(n,e){const t=await e(vt,n,Nt(n));n.data=new E(await t.arrayBuffer()),n.size||(n.size=n.data.length)}async function Ft(n,e,t){if(n.preventHeadRequest)await t(n,n.options);else{const a=(await e(yt,n,Nt(n))).headers.get(ft);a?n.size=S(a):await t(n,n.options)}}async function qt(n,{options:e,url:t},a){const o=await fetch(t,v.assign({},e,{method:n,headers:a}));if(o.status<400)return o;throw 416==o.status?new R(wt):new R(gt+(o.statusText||o.status))}function Ht(n,{url:e},t){return new O(((a,o)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(i.status<400){const n=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{const t=e.trim().split(/\s*:\s*/);t[0]=t[0].trim().replace(/^[a-z]|-[a-z]/g,(n=>n.toUpperCase())),n.push(t)})),a({status:i.status,arrayBuffer:()=>i.response,headers:new L(n)})}else o(416==i.status?new R(wt):new R(gt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(n=>o(n.detail?n.detail.error:new R("Network error"))),!1),i.open(n,e),t)for(const n of v.entries(t))i.setRequestHeader(n[0],n[1]);i.responseType="arraybuffer",i.send()}))}class Ut extends zt{constructor(n,e={}){super(),v.assign(this,{url:n,reader:e.useXHR?new Rt(n,e):new Tt(n,e)})}set size(n){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(n,e){return this.reader.readUint8Array(n,e)}}class Gt extends zt{constructor(n){super(),this.readers=n}async init(){const n=this,{readers:e}=n;n.lastDiskNumber=0,n.lastDiskOffset=0,await O.all(e.map((async(t,a)=>{await t.init(),a!=e.length-1&&(n.lastDiskOffset+=t.size),n.size+=t.size}))),super.init()}async readUint8Array(n,e,t=0){const a=this,{readers:o}=this;let i,r=t;-1==r&&(r=o.length-1);let s=n;for(;s>=o[r].size;)s-=o[r].size,r++;const l=o[r],c=l.size;if(s+e<=c)i=await Yt(l,s,e);else{const o=c-s;i=new E(e),i.set(await Yt(l,s,o)),i.set(await a.readUint8Array(n+o,e-o,t),o)}return a.lastDiskNumber=C.max(r,a.lastDiskNumber),i}}class Wt extends Ct{constructor(n,e=4294967295){super();const t=this;let a,o,i;v.assign(t,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const r=new W({async write(e){const{availableSize:r}=t;if(i)e.length>=r?(await s(e.slice(0,r)),await l(),t.diskOffset+=a.size,t.diskNumber++,i=null,await this.write(e.slice(r))):await s(e);else{const{value:r,done:s}=await n.next();if(s&&!r)throw new R(bt);a=r,a.size=0,a.maxSize&&(t.maxSize=a.maxSize),t.availableSize=t.maxSize,await Vt(a),o=r.writable,i=o.getWriter(),await this.write(e)}},async close(){await i.ready,await l()}});async function s(n){const e=n.length;e&&(await i.ready,await i.write(n),a.size+=e,t.size+=e,t.availableSize-=e)}async function l(){o.size=a.size,await i.close()}v.defineProperty(t,xt,{get:()=>r})}}async function Vt(n,e){n.init&&!n.initialized&&await n.init(e)}function Kt(n){return y.isArray(n)&&(n=new Gt(n)),n instanceof G&&(n={readable:n}),n}function Jt(n){n.writable===xn&&typeof n.next==zn&&(n=new Wt(n)),n instanceof W&&(n={writable:n});const{writable:e}=n;e.size===xn&&(e.size=0);return n instanceof Wt||v.assign(n,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),n}function Yt(n,e,t,a){return n.readUint8Array(e,t,a)}const Zt=Gt,Xt=Wt,$t="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Qt=256==$t.length;function na(n,e){return e&&"cp437"==e.trim().toLowerCase()?function(n){if(Qt){let e="";for(let t=0;tthis[e]=n[e]))}}const va="File format is not recognized",ja="End of central directory not found",Sa="End of Zip64 central directory not found",xa="End of Zip64 central directory locator not found",Ca="Central directory header not found",za="Local file header not found",La="Zip64 extra field not found",Aa="File contains encrypted entry",Ia="Encryption method not supported",Ta="Compression method not supported",Ra="Split zip file",Ea="utf-8",Da="cp437",Ma=[[ia,Z],[ra,Z],[sa,Z],[la,X]],Ba={[X]:{getValue:Wa,bytes:4},[Z]:{getValue:Va,bytes:8}};class Na{constructor(n,e,t){v.assign(this,{reader:n,config:e,options:t})}async getData(n,e,t={}){const a=this,{reader:o,offset:i,diskNumberStart:r,extraFieldAES:s,compressionMethod:l,config:c,bitFlag:m,signature:d,rawLastModDate:h,uncompressedSize:p,compressedSize:u}=a,g=e.localDirectory={},w=Ka(await Yt(o,i,30,r));let b=Fa(a,t,"password");if(b=b&&b.length&&b,s&&s.originalCompressionMethod!=nn)throw new R(Ta);if(l!=Q&&l!=$)throw new R(Ta);if(Wa(w,0)!=en)throw new R(za);Oa(g,w,4),g.rawExtraField=g.extraFieldLength?await Yt(o,i+30+g.filenameLength,g.extraFieldLength,r):new E,await Pa(a,g,w,4,!0),v.assign(e,{lastAccessDate:g.lastAccessDate,creationDate:g.creationDate});const f=a.encrypted&&g.encrypted,k=f&&!s;if(f){if(!k&&s.strength===xn)throw new R(Ia);if(!b)throw new R(Aa)}const y=i+30+g.filenameLength+g.extraFieldLength,j=u,S=o.readable;v.assign(S,{diskNumberStart:r,offset:y,size:j});const x=Fa(a,t,"signal"),C=Fa(a,t,"checkPasswordOnly");C&&(n=new W),n=Jt(n),await Vt(n,p);const{writable:z}=n,{onstart:L,onprogress:A,onend:I}=t,T={options:{codecType:$e,password:b,zipCrypto:k,encryptionStrength:s&&s.strength,signed:Fa(a,t,"checkSignature"),passwordVerification:k&&(m.dataDescriptor?h>>>8&255:d>>>24&255),signature:d,compressed:0!=l,encrypted:f,useWebWorkers:Fa(a,t,"useWebWorkers"),useCompressionStream:Fa(a,t,"useCompressionStream"),transferStreams:Fa(a,t,"transferStreams"),checkPasswordOnly:C},config:c,streamOptions:{signal:x,size:j,onstart:L,onprogress:A,onend:I}};let D=0;try{({outputSize:D}=await pt({readable:S,writable:z},T))}catch(n){if(!C||n.message!=Xn)throw n}finally{const n=Fa(a,t,"preventClose");z.size+=D,n||z.locked||await z.getWriter().close()}return C?void 0:n.getData?n.getData():z}}function Oa(n,e,t){const a=n.rawBitFlag=Ga(e,t+2),o=(a&wn)==wn,i=Wa(e,t+6);v.assign(n,{encrypted:o,version:Ga(e,t),bitFlag:{level:(6&a)>>1,dataDescriptor:(a&bn)==bn,languageEncodingFlag:(a&fn)==fn},rawLastModDate:i,lastModDate:qa(i),filenameLength:Ga(e,t+22),extraFieldLength:Ga(e,t+24)})}async function Pa(n,e,t,a,o){const{rawExtraField:i}=e,r=e.extraField=new L,s=Ka(new E(i));let l=0;try{for(;le[n]==t));for(let o=0,i=0;o=5&&(i.push(ca),r.push(ma));let s=1;i.forEach(((t,o)=>{if(n.data.length>=s+4){const i=Wa(a,s);e[t]=n[t]=new z(1e3*i);const l=r[o];n[l]=i}s+=4}))}(g,e,o),e.extraFieldExtendedTimestamp=g);const w=r.get(gn);w&&(e.extraFieldUSDZ=w)}async function _a(n,e,t,a,o){const i=Ka(n.data),r=new Pn;r.append(o[t]);const s=Ka(new E(4));s.setUint32(0,r.get(),!0);const l=Wa(i,1);v.assign(n,{version:Ua(i,0),[e]:na(n.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&l==Wa(s,0)}),n.valid&&(a[e]=n[e],a[e+"UTF8"]=!0)}function Fa(n,e,t){return e[t]===xn?n.options[t]:e[t]}function qa(n){const e=(4294901760&n)>>16,t=65535&n;try{return new z(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&t)>>11,(2016&t)>>5,2*(31&t),0)}catch(n){}}function Ha(n){return new z(S(n/x(1e4)-x(116444736e5)))}function Ua(n,e){return n.getUint8(e)}function Ga(n,e){return n.getUint16(e,!0)}function Wa(n,e){return n.getUint32(e,!0)}function Va(n,e){return S(n.getBigUint64(e,!0))}function Ka(n){return new B(n.buffer)}const Ja="File already exists",Ya="Zip file comment exceeds 64KB",Za="File entry comment exceeds 64KB",Xa="File entry name exceeds 64KB",$a="Version exceeds 65535",Qa="The strength must equal 1, 2, or 3",no="Extra field type exceeds 65535",eo="Extra field data exceeds 64KB",to="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",ao=new E([7,0,2,0,65,69,3,0,0]);let oo=0;const io=[];async function ro(n,e){const t=n.getWriter();await t.ready,n.size+=wo(e),await t.write(e),t.releaseLock()}function so(n){if(n)return(x(n.getTime())+x(116444736e5))*x(1e4)}function lo(n,e,t,a){const o=e[t]===xn?n.options[t]:e[t];return o===xn?a:o}function co(n,e,t){n.setUint8(e,t)}function mo(n,e,t){n.setUint16(e,t,!0)}function ho(n,e,t){n.setUint32(e,t,!0)}function po(n,e,t){n.setBigUint64(e,t,!0)}function uo(n,e,t){n.set(e,t)}function go(n){return new B(n.buffer)}function wo(...n){let e=0;return n.forEach((n=>n&&(e+=n.length))),e}let bo;try{bo="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("single-file-extension-editor-helper.js",document.baseURI).href}catch(n){}Mn({baseURL:bo}),function(n){const e=()=>T.createObjectURL(new N(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:a,Uint16Array:i,Uint32Array:o,Int32Array:l,Map:c,DataView:h,Promise:f,TextEncoder:u,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:v,CompressionStream:y,DecompressionStream:b}=self;class m{constructor(e){return class extends g{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const _=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;_[e]=t}class k{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^_[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class S extends g{constructor(){let e;const t=new k;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new h(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=z.getPartial(n);return 32===r?e.concat(t):z._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+z.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=z.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>r.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=z.getPartial(s);return r.push(z.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const i=new o(n);let l=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(i.subarray(16*l,16*(l+1))),l+=1;return n.splice(0,16*l),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(t){const n=this,s=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=s[0],o=s[1],l=s[2],c=s[3],h=s[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,i)+n._f(e,o,l,c)+h+a[e]+n._key[r.floor(e/20)]|0;h=c,c=l,l=n._S(30,o),o=i,i=t}s[0]=s[0]+i|0,s[1]=s[1]+o|0,s[2]=s[2]+l|0,s[3]=s[3]+c|0,s[4]=s[4]+h|0}},I={getRandomValues(e){const t=new o(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,a=0;anew x.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,c,f;const u=new ArrayBuffer(a),p=new h(u);let d=0;const g=z;for(t=D.bytes.toBits(t),f=1;(a||1)>d;f++){for(i=o=e.encrypt(g.concat(t,[f])),l=1;n>l;l++)for(o=e.encrypt(o),c=0;cd&&ls&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},A=void 0!==p&&"function"==typeof p.getRandomValues,T="Invalid password",R="Invalid signature",H="zipjs-abort-check-password";function q(e){return A?p.getRandomValues(e):I.getRandomValues(e)}const B=16,K={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},K),P=t.assign({iterations:1e3,hash:{name:"SHA-1"}},K),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",F="function",L=typeof p!=O,j=L&&p.subtle,G=L&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,l,c=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),l=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];l[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,r[a]=h,c=s[l=s[o=s[h]]];let f=16843009*c^65537*l^257*o^16843008*h,u=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=u=u<<24^u>>>8,t[n][a]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],l=i[1],c=i[2],h=i[3],f=i[4];let u,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],v=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)u=o[g>>>24]^l[w>>16&255]^c[v>>8&255]^h[255&y]^n[b],p=o[w>>>24]^l[v>>16&255]^c[y>>8&255]^h[255&g]^n[b+1],d=o[v>>>24]^l[y>>16&255]^c[g>>8&255]^h[255&w]^n[b+2],y=o[y>>>24]^l[g>>16&255]^c[w>>8&255]^h[255&v]^n[b+3],b+=4,g=u,w=p,v=d;for(let e=0;4>e;e++)a[t?3&-e:e]=f[g>>>24]<<24^f[w>>16&255]<<16^f[v>>8&255]<<8^f[255&y]^n[b++],u=g,g=w,w=v,v=y,y=u;return a}},Q=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=z.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return z.clamp(t,s)}},Y=x.hmacSha1;let Z=L&&G&&typeof j.importKey==F,$=L&&G&&typeof j.deriveBits==F;class ee extends g{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new f((e=>this.resolveReady=e)),password:e,signed:n,strength:r-1,pending:new a})},async transform(e,t){const n=this,{password:r,strength:o,resolveReady:l,ready:c}=n;r?(await(async(e,t,n,r)=>{const a=await re(e,t,n,ae(r,0,U[t])),i=ae(r,U[t]);if(a[0]!=i[0]||a[1]!=i[1])throw new s(T)})(n,o,r,ae(e,0,U[o]+2)),e=ae(e,U[o]+2),i?t.error(new s(H)):l()):await c;const h=new a(e.length-M-(e.length-M)%B);t.enqueue(ne(n,e,h,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:o}=this;await o;const l=ae(i,0,i.length-M),c=ae(i,i.length-M);let h=new a;if(l.length){const e=oe(X,l);r.update(e);const t=n.update(e);h=ie(X,t)}if(t){const e=ae(ie(X,r.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=c[t])throw new s(R)}e.enqueue(h)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new f((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:o}=n;let l=new a;r?(l=await(async(e,t,n)=>{const r=q(new a(U[t]));return se(r,await re(e,t,n,r))})(n,s,r),i()):await o;const c=new a(l.length+e.length-e.length%B);c.set(l,0),t.enqueue(ne(n,e,c,l.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:i}=this;await i;let o=new a;if(s.length){const e=t.update(oe(X,s));n.update(e),o=ie(X,e)}r.signature=ie(X,n.digest()).slice(0,M),e.enqueue(se(o,r.signature))}}),r=this}}function ne(e,t,n,r,s,i){const{ctr:o,hmac:l,pending:c}=e,h=t.length-s;let f;for(c.length&&(t=se(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,h-h%B)),f=0;h-B>=f;f+=B){const e=oe(X,ae(t,f,f+B));i&&l.update(e);const s=o.update(e);i||l.update(s),n.set(ie(X,s),f+r)}return e.pending=ae(t,f),n}async function re(n,r,s,i){n.password=null;const o=(e=>{if(void 0===u){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return x.importKey(t);try{return await j.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,x.importKey(t)}})(0,o,V,0,E),c=await(async(e,t,n)=>{if(!$)return x.pbkdf2(t,e.salt,P.iterations,n);try{return await j.deriveBits(e,t,n)}catch(r){return $=!1,x.pbkdf2(t,e.salt,P.iterations,n)}})(t.assign({salt:i},P),l,8*(2*W[r]+2)),h=new a(c),f=oe(X,ae(h,0,W[r])),p=oe(X,ae(h,W[r],2*W[r])),d=ae(h,2*W[r]);return t.assign(n,{keys:{key:f,authentication:p,passwordVerification:d},ctr:new Q(new J(f),e.from(N)),hmac:new Y(p)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function ie(e,t){return e.fromBits(t)}function oe(e,t){return e.toBits(t)}class le extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;if(n.password){const t=he(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(T);e=e.subarray(12)}r?t.error(new s(H)):t.enqueue(he(n,e))}})}}class ce extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=q(new a(12));t[11]=n.passwordVerification,r=new a(e.length+t.length),r.set(fe(n,t),0),s=12}else r=new a(e.length),s=0;r.set(fe(n,e),s),t.enqueue(r)}})}}function he(e,t){const n=new a(t.length);for(let r=0;r>>24]),a=~e.crcKey2.get(),e.keys=[n,s,a]}function de(e){const t=2|e.keys[2];return ge(r.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ve="deflate-raw";class ye extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,f=this;let u,p,d=me(super.readable);a&&!o||!l||(u=new S,d=Se(d,u)),s&&(d=ke(d,i,{level:c,chunkSize:t},r,n)),a&&(o?d=Se(d,new ce(e)):(p=new te(e),d=Se(d,p))),_e(f,d,(()=>{let e;a&&!o&&(e=p.signature),a&&!o||!l||(e=new h(u.value.buffer).getUint32(0)),f.signature=e}))}}class be extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:i,signed:o,signature:l,compressed:c,useCompressionStream:f}=e;let u,p,d=me(super.readable);i&&(a?d=Se(d,new le(e)):(p=new ee(e),d=Se(d,p))),c&&(d=ke(d,f,{chunkSize:t},r,n)),i&&!a||!o||(u=new S,d=Se(d,u)),_e(this,d,(()=>{if((!i||a)&&o){const e=new h(u.value.buffer);if(l!=e.getUint32(0,!1))throw new s(R)}}))}}function me(e){return Se(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function _e(e,n,r){n=Se(n,new g({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function ke(e,t,n,r,s){try{e=Se(e,new(t&&r?r:s)(ve,n))}catch(r){if(!t)throw r;e=Se(e,new s(ve,n))}return e}function Se(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const r=this,{codecType:s}=e;let a;s.startsWith("deflate")?a=ye:s.startsWith("inflate")&&(a=be);let i=0;const o=new a(e,n),l=super.readable,c=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;t.assign(r,{signature:e,size:i})}});t.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const Ce=new c,Ie=new c;let xe=0;async function Ae(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new m(self.Deflate)),self.Inflate&&(s.DecompressionStream=new m(self.Inflate));const a={highWaterMark:1,size:()=>s.chunkSize},i=e.readable||new w({async pull(e){const t=new f((e=>Ce.set(xe,e)));Te({type:"pull",messageId:xe}),xe=(xe+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},a),o=e.writable||new v({async write(e){let t;const r=new f((e=>t=e));Ie.set(xe,t),Te({type:ze,value:e,messageId:xe}),xe=(xe+1)%n.MAX_SAFE_INTEGER,await r}},a),l=new De(t,s);await i.pipeThrough(l).pipeTo(o,{preventClose:!0,preventAbort:!0});try{await o.getWriter().close()}catch(e){}const{signature:c,size:h}=l;Te({type:"close",result:{signature:c,size:h}})}catch(e){Re(e)}}function Te(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Re(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:a}=e;d({error:{message:t,stack:n,code:r,name:a}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Ae(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(r),done:s})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){Re(e)}}));var He=a,qe=i,Be=l,Ke=new He([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ve=new He([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Pe=new He([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ee=(e,t)=>{for(var n=new qe(31),r=0;31>r;++r)n[r]=t+=1<r;++r)for(var a=n[r];aje;++je){var Ge=(43690&je)>>1|(21845&je)<<1;Ge=(61680&(Ge=(52428&Ge)>>2|(13107&Ge)<<2))>>4|(3855&Ge)<<4,Le[je]=((65280&Ge)>>8|(255&Ge)<<8)>>1}var Xe=(e,t,n)=>{for(var r=e.length,s=0,a=new qe(t);r>s;++s)e[s]&&++a[e[s]-1];var i,o=new qe(t);for(s=1;t>s;++s)o[s]=o[s-1]+a[s-1]<<1;if(n){i=new qe(1<s;++s)if(e[s])for(var c=s<<4|e[s],h=t-e[s],f=o[e[s]-1]++<=f;++f)i[Le[f]>>l]=c}else for(i=new qe(r),s=0;r>s;++s)e[s]&&(i[s]=Le[o[e[s]-1]++]>>15-e[s]);return i},Je=new He(288);for(je=0;144>je;++je)Je[je]=8;for(je=144;256>je;++je)Je[je]=9;for(je=256;280>je;++je)Je[je]=7;for(je=280;288>je;++je)Je[je]=8;var Qe=new He(32);for(je=0;32>je;++je)Qe[je]=5;var Ye=Xe(Je,9,0),Ze=Xe(Je,9,1),$e=Xe(Qe,5,0),et=Xe(Qe,5,1),tt=e=>{for(var t=e[0],n=1;nt&&(t=e[n]);return t},nt=(e,t,n)=>{var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},rt=(e,t)=>{var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},st=e=>(e+7)/8|0,at=(e,t,n)=>{(null==t||0>t)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new He(n-t);return r.set(e.subarray(t,n)),r},it=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ot=(e,t,n)=>{var r=new s(t||it[e]);if(r.code=e,s.captureStackTrace&&s.captureStackTrace(r,ot),!n)throw r;return r},lt=(e,t,n)=>{n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},ct=(e,t,n)=>{n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},ht=(e,t)=>{for(var n=[],r=0;re.f-t.f)),n.push({s:-1,f:25001});var o=n[0],l=n[1],c=0,h=1,f=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=s-1;)o=n[n[c].fr;++r)a[r].s>u&&(u=a[r].s);var p=new qe(u+1),d=ft(n[h-1],p,0);if(d>t){r=0;var g=0,w=d-t,v=1<p[t.s]-p[e.s]||e.f-t.f));s>r;++r){var y=a[r].s;if(p[y]<=t)break;g+=v-(1<>=w;g>0;){var b=a[r].s;p[b]=0&&g;--r){var m=a[r].s;p[m]==t&&(--p[m],++g)}d=t}return{t:new He(p),l:d}},ft=(e,t,n)=>-1==e.s?r.max(ft(e.l,t,n+1),ft(e.r,t,n+1)):t[e.s]=n,ut=e=>{for(var t=e.length;t&&!e[--t];);for(var n=new qe(++t),r=0,s=e[0],a=1,i=e=>{n[r++]=e},o=1;t>=o;++o)if(e[o]==s&&o!=t)++a;else{if(!s&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(s),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(s);a=1,s=e[o]}return{c:n.subarray(0,r),n:t}},pt=(e,t)=>{for(var n=0,r=0;r{var r=n.length,s=st(t+2);e[s]=255&r,e[s+1]=r>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;r>a;++a)e[s+a+4]=n[a];return 8*(s+4+r)},gt=(e,t,n,r,s,a,i,o,l,c,h)=>{lt(t,h++,n),++s[256];for(var f=ht(s,15),u=f.t,p=f.l,d=ht(a,15),g=d.t,w=d.l,v=ut(u),y=v.c,b=v.n,m=ut(g),_=m.c,k=m.n,S=new qe(19),z=0;z4&&!C[Pe[x-1]];--x);var A,T,R,H,q=c+5<<3,B=pt(s,Je)+pt(a,Qe)+i,K=pt(s,u)+pt(a,g)+i+14+3*x+pt(S,C)+2*S[16]+3*S[17]+7*S[18];if(l>=0&&B>=q&&K>=q)return dt(t,h,e.subarray(l,l+c));if(lt(t,h,1+(B>K)),h+=2,B>K){A=Xe(u,p,0),T=u,R=Xe(g,w,0),H=g;var V=Xe(C,I,0);for(lt(t,h,b-257),lt(t,h+5,k-1),lt(t,h+10,x-4),h+=14,z=0;x>z;++z)lt(t,h+3*z,C[Pe[z]]);h+=3*x;for(var P=[y,_],E=0;2>E;++E){var U=P[E];for(z=0;z15&&(lt(t,h,U[z]>>5&127),h+=U[z]>>12)}}}else A=Ye,T=Je,R=$e,H=Qe;for(z=0;o>z;++z){var M=r[z];if(M>255){ct(t,h,A[257+(W=M>>18&31)]),h+=T[W+257],W>7&&(lt(t,h,M>>23&31),h+=Ke[W]);var N=31&M;ct(t,h,R[N]),h+=H[N],N>3&&(ct(t,h,M>>5&8191),h+=Ve[N])}else ct(t,h,A[M]),h+=T[M]}return ct(t,h,A[256]),h+T[256]},wt=new Be([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vt=new He(0),yt=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new He(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(((e,t,n,s,a)=>{if(!a&&(a={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new He(i.length+e.length);o.set(i),o.set(e,i.length),e=o,a.w=i.length}return((e,t,n,s,a,i)=>{var o=i.z||e.length,l=new He(0+o+5*(1+r.ceil(o/7e3))+0),c=l.subarray(0,l.length-0),h=i.l,f=7&(i.r||0);if(t){f&&(c[0]=i.r>>3);for(var u=wt[t-1],p=u>>13,d=8191&u,g=(1<(e[t]^e[t+1]<C+2;++C){var T=m(C),R=32767&C,H=v[T];if(w[R]=H,v[T]=R,C>=x){var q=o-C;if((z>7e3||I>24576)&&(q>423||!h)){f=gt(e,c,0,_,k,S,D,I,A,C-A,f),I=z=D=0,A=C;for(var B=0;286>B;++B)k[B]=0;for(B=0;30>B;++B)S[B]=0}var K=2,V=0,P=d,E=R-H&32767;if(q>2&&T==m(C-E))for(var U=r.min(p,q)-1,W=r.min(32767,C),M=r.min(258,q);W>=E&&--P&&R!=H;){if(e[C+K]==e[C+K-E]){for(var N=0;M>N&&e[C+N]==e[C+N-E];++N);if(N>K){if(K=N,V=E,N>U)break;var O=r.min(E,N-2),F=0;for(B=0;O>B;++B){var L=C-E+B&32767,j=L-w[L]&32767;j>F&&(F=j,H=L)}}}E+=(R=H)-(H=w[R])&32767}if(V){_[I++]=268435456|Me[K]<<18|Fe[V];var G=31&Me[K],X=31&Fe[V];D+=Ke[G]+Ve[X],++k[257+G],++S[X],x=C+K,++z}else _[I++]=e[C],++k[e[C]]}}for(C=r.max(C,x);o>C;++C)_[I++]=e[C],++k[e[C]];f=gt(e,c,h,_,k,S,D,I,A,C-A,f),h||(i.r=7&f|c[f/8|0]<<3,f-=7,i.h=v,i.p=w,i.i=C,i.w=x)}else{for(C=i.w||0;o+h>C;C+=65535){var J=C+65535;o>J||(c[f/8|0]=h,J=o),f=dt(c,f+1,e.subarray(C,J))}i.i=o}return at(l,0,0+st(f)+0)})(e,null==t.level?6:t.level,null==t.mem?r.ceil(1.5*r.max(8,r.min(13,r.log(e.length)))):12+t.mem,0,0,a)})(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||ot(5),this.s.l&&ot(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new He(-32768&n);r.set(this.b.subarray(0,this.s.z)),this.b=r}var s=this.b.length-this.s.z;s&&(this.b.set(e.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(s),32768),this.s.z=e.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e}(),bt=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new He(32768),this.p=new He(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||ot(5),this.d&&ot(4),this.p.length){if(e.length){var t=new He(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=((e,t,n)=>{var s=e.length;if(!s||t.f&&!t.l)return n||new He(0);var a=!n||2!=t.i,i=t.i;n||(n=new He(3*s));var o=e=>{var t=n.length;if(e>t){var s=new He(r.max(2*t,e));s.set(n),n=s}},l=t.f||0,c=t.p||0,h=t.b||0,f=t.l,u=t.d,p=t.m,d=t.n,g=8*s;do{if(!f){l=nt(e,c,1);var w=nt(e,c+1,3);if(c+=3,!w){var v=e[(x=st(c)+4)-4]|e[x-3]<<8,y=x+v;if(y>s){i&&ot(0);break}a&&o(h+v),n.set(e.subarray(x,y),h),t.b=h+=v,t.p=c=8*y,t.f=l;continue}if(1==w)f=Ze,u=et,p=9,d=5;else if(2==w){var b=nt(e,c,31)+257,m=nt(e,c+10,15)+4,_=b+nt(e,c+5,31)+1;c+=14;for(var k=new He(_),S=new He(19),z=0;m>z;++z)S[Pe[z]]=nt(e,c+3*z,7);c+=3*m;var D=tt(S),C=(1<z;){var x,A=I[nt(e,c,C)];if(c+=15&A,16>(x=A>>4))k[z++]=x;else{var T=0,R=0;for(16==x?(R=3+nt(e,c,3),c+=2,T=k[z-1]):17==x?(R=3+nt(e,c,7),c+=3):18==x&&(R=11+nt(e,c,127),c+=7);R--;)k[z++]=T}}var H=k.subarray(0,b),q=k.subarray(b);p=tt(H),d=tt(q),f=Xe(H,p,1),u=Xe(q,d,1)}else ot(1);if(c>g){i&&ot(0);break}}a&&o(h+131072);for(var B=(1<>4;if((c+=15&T)>g){i&&ot(0);break}if(T||ot(2),256>P)n[h++]=P;else{if(256==P){V=c,f=null;break}var E=P-254;if(P>264){var U=Ke[z=P-257];E=nt(e,c,(1<>4;if(W||ot(3),c+=15&W,q=Oe[M],M>3&&(U=Ve[M],q+=rt(e,c)&(1<g){i&&ot(0);break}a&&o(h+131072);var N=h+E;if(q>h){var O=0-q,F=r.min(q,N);for(0>O+h&&ot(3);F>h;++h)n[h]=undefined[O+h]}for(;N>h;h+=4)n[h]=n[h-q],n[h+1]=n[h+1-q],n[h+2]=n[h+2-q],n[h+3]=n[h+3-q];h=N}}t.l=f,t.p=V,t.b=h,t.f=l,f&&(l=1,t.m=p,t.d=u,t.n=d)}while(!l);return h==n.length?n:at(n,0,h)})(this.p,this.s,this.o);this.ondata(at(n,t,this.s.b),this.d),this.o=at(n,this.s.b-32768),this.s.b=this.o.length,this.p=at(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),mt="undefined"!=typeof TextDecoder&&new TextDecoder;try{mt.decode(vt,{stream:!0})}catch(e){}function _t(e,n,r){return class{constructor(s){const i=this;var o,l;o=s,l="level",("function"==typeof t.hasOwn?t.hasOwn(o,l):o.hasOwnProperty(l))&&void 0===s.level&&delete s.level,i.codec=new e(t.assign({},n,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new a(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new a(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new a,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}const{Deflate:kt,Inflate:St}=((e,t={},n)=>({Deflate:_t(e.Deflate,t.deflate,n),Inflate:_t(e.Inflate,t.inflate,n)}))({Deflate:yt,Inflate:bt},void 0,((e,t)=>e.ondata=t));self.initCodec=()=>{self.Deflate=kt,self.Inflate=St};\n'],{type:"text/javascript"}));n({workerScripts:{inflate:[e],deflate:[e]}})}(Mn);var fo=Object.freeze({__proto__:null,BlobReader:At,BlobWriter:It,Data64URIReader:class extends zt{constructor(n){super();let e=n.length;for(;"="==n.charAt(e-1);)e--;const t=n.indexOf(",")+1;v.assign(this,{dataURI:n,dataStart:t,size:C.floor(.75*(e-t))})}readUint8Array(n,e){const{dataStart:t,dataURI:a}=this,o=new E(e),i=4*C.floor(n/3),r=atob(a.substring(i+t,4*C.ceil((n+e)/3)+t)),s=n-3*C.floor(i/4);for(let n=s;n2?e.data+=H(a):e.pending=a}getData(){return this.data+H(this.pending)}},ERR_BAD_FORMAT:va,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Ca,ERR_DUPLICATED_NAME:Ja,ERR_ENCRYPTED:Aa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:xa,ERR_EOCDR_NOT_FOUND:ja,ERR_EOCDR_ZIP64_NOT_FOUND:Sa,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:La,ERR_HTTP_RANGE:wt,ERR_INVALID_COMMENT:Ya,ERR_INVALID_ENCRYPTION_STRENGTH:Qa,ERR_INVALID_ENTRY_COMMENT:Za,ERR_INVALID_ENTRY_NAME:Xa,ERR_INVALID_EXTRAFIELD_DATA:eo,ERR_INVALID_EXTRAFIELD_TYPE:no,ERR_INVALID_PASSWORD:Yn,ERR_INVALID_SIGNATURE:Zn,ERR_INVALID_VERSION:$a,ERR_ITERATOR_COMPLETED_TOO_SOON:bt,ERR_LOCAL_FILE_HEADER_NOT_FOUND:za,ERR_SPLIT_ZIP_FILE:Ra,ERR_UNSUPPORTED_COMPRESSION:Ta,ERR_UNSUPPORTED_ENCRYPTION:Ia,ERR_UNSUPPORTED_FORMAT:to,HttpRangeReader:class extends Ut{constructor(n,e={}){e.useRangeHeader=!0,super(n,e)}},HttpReader:Ut,Reader:zt,SplitDataReader:Gt,SplitDataWriter:Wt,SplitZipReader:Zt,SplitZipWriter:Xt,TextReader:class extends At{constructor(n){super(new N([n],{type:"text/plain"}))}},TextWriter:class extends It{constructor(n){super(n),v.assign(this,{encoding:n,utf8:!n||"utf-8"==n.toLowerCase()})}async getData(){const{encoding:n,utf8:e}=this,t=await super.getData();if(t.text&&e)return t.text();{const e=new FileReader;return new O(((a,o)=>{v.assign(e,{onload:({target:n})=>a(n.result),onerror:()=>o(e.error)}),e.readAsText(t,n)}))}}},Uint8ArrayReader:class extends zt{constructor(n){super(),v.assign(this,{array:n,size:n.length})}readUint8Array(n,e){return this.array.slice(n,n+e)}},Uint8ArrayWriter:class extends Lt{init(n=0){v.assign(this,{offset:0,array:new E(n)}),super.init()}writeUint8Array(n){const e=this;if(e.offset+n.length>e.array.length){const t=e.array;e.array=new E(t.length+n.length),e.array.set(t)}e.array.set(n,e.offset),e.offset+=n.length}getData(){return this.array}},Writer:Lt,ZipReader:class{constructor(n,e={}){v.assign(this,{reader:Kt(n),options:e,config:En()})}async*getEntriesGenerator(n={}){const e=this;let{reader:t}=e;const{config:a}=e;if(await Vt(t),t.size!==xn&&t.readUint8Array||(t=new At(await new I(t.readable).blob()),await Vt(t)),t.size=0;n--)if(r[n]==i[0]&&r[n+1]==i[1]&&r[n+2]==i[2]&&r[n+3]==i[3])return{offset:o+n,buffer:r.slice(n,n+a).buffer}}}(t,rn,t.size,cn,1048560);if(!o){throw Wa(Ka(await Yt(t,0,4)))==tn?new R(Ra):new R(ja)}const i=Ka(o);let r=Wa(i,12),s=Wa(i,16);const l=o.offset,c=Ga(i,20),m=l+cn+c;let d=Ga(i,4);const h=t.lastDiskNumber||0;let p=Ga(i,6),u=Ga(i,8),g=0,w=0;if(s==Z||r==Z||u==X||p==X){const n=Ka(await Yt(t,o.offset-20,20));if(Wa(n,0)!=ln)throw new R(Sa);s=Va(n,8);let e=await Yt(t,s,56,-1),a=Ka(e);const i=o.offset-20-56;if(Wa(a,0)!=sn&&s!=i){const n=s;s=i,g=s-n,e=await Yt(t,s,56,-1),a=Ka(e)}if(Wa(a,0)!=sn)throw new R(xa);d==X&&(d=Wa(a,16)),p==X&&(p=Wa(a,20)),u==X&&(u=Va(a,32)),r==Z&&(r=Va(a,40)),s-=r}if(h!=d)throw new R(Ra);if(s<0||s>=t.size)throw new R(va);let b=0,f=await Yt(t,s,r,p),k=Ka(f);if(r){const n=o.offset-r;if(Wa(k,b)!=on&&s!=n){const e=s;s=n,g=s-e,f=await Yt(t,s,r,p),k=Ka(f)}}const y=o.offset-s-(t.lastDiskOffset||0);if(r!=y&&y>=0&&(r=y,f=await Yt(t,s,r,p),k=Ka(f)),s<0||s>=t.size)throw new R(va);const j=Fa(e,n,"filenameEncoding"),S=Fa(e,n,"commentEncoding");for(let o=0;oi.getData(n,D,e),b=y;const{onprogress:M}=n;if(M)try{await M(o+1,u,new ya(i))}catch(n){}yield D}const x=Fa(e,n,"extractPrependedData"),z=Fa(e,n,"extractAppendedData");return x&&(e.prependedData=w>0?await Yt(t,0,w):new E),e.comment=c?await Yt(t,l+cn,c):new E,z&&(e.appendedData=mio.push(n)));try{if(n=n.trim(),a.filenames.has(n))throw new R(Ja);return a.filenames.add(n),r=async function(n,e,t,a){e=e.trim(),a.directory&&!e.endsWith(vn)?e+=vn:a.directory=e.endsWith(vn);const o=Fn(e);if(wo(o)>X)throw new R(Xa);const i=a.comment||"",r=Fn(i);if(wo(r)>X)throw new R(Za);const s=lo(n,a,"version",20);if(s>X)throw new R($a);const l=lo(n,a,"versionMadeBy",20);if(l>X)throw new R($a);const c=lo(n,a,ca,new z),m=lo(n,a,da),d=lo(n,a,pa),h=lo(n,a,ba,!0),p=lo(n,a,ga,0),u=lo(n,a,wa,0),g=lo(n,a,"password"),w=lo(n,a,"encryptionStrength",3),b=lo(n,a,"zipCrypto"),f=lo(n,a,"extendedTimestamp",!0),k=lo(n,a,"keepOrder",!0),j=lo(n,a,"level"),S=lo(n,a,"useWebWorkers"),L=lo(n,a,"bufferedWrite"),A=lo(n,a,"dataDescriptorSignature",!1),I=lo(n,a,"signal"),T=lo(n,a,"useCompressionStream");let N=lo(n,a,"dataDescriptor",!0),P=lo(n,a,fa);if(g!==xn&&w!==xn&&(w<1||w>3))throw new R(Qa);let _=new E;const{extraField:F}=a;if(F){let n=0,e=0;F.forEach((e=>n+=4+wo(e))),_=new E(n),F.forEach(((n,t)=>{if(t>X)throw new R(no);if(wo(n)>X)throw new R(eo);uo(_,new D([t]),e),uo(_,new D([wo(n)]),e+2),uo(_,n,e+4),e+=4+wo(n)}))}let q=0,H=0,U=0;const G=!0===P;t&&(t=Kt(t),await Vt(t),t.size===xn?(N=!0,(P||P===xn)&&(P=!0,U=q=Z)):(U=t.size,q=function(n){return n+5*(C.floor(n/16383)+1)}(U)));const{diskOffset:W,diskNumber:V,maxSize:K}=n.writer,J=G||U>=Z,Y=G||q>=Z,on=G||n.offset+n.pendingEntriesSize-W>=Z,rn=lo(n,a,"supportZip64SplitFile",!0),sn=rn&&G||V+C.ceil(n.pendingEntriesSize/K)>=X;if(on||J||Y||sn){if(!1===P||!k)throw new R(to);P=!0}P=P||!1,a=v.assign({},a,{rawFilename:o,rawComment:r,version:s,versionMadeBy:l,lastModDate:c,lastAccessDate:m,creationDate:d,rawExtraField:_,zip64:P,zip64UncompressedSize:J,zip64CompressedSize:Y,zip64Offset:on,zip64DiskNumberStart:sn,password:g,level:j,useWebWorkers:S,encryptionStrength:w,extendedTimestamp:f,zipCrypto:b,bufferedWrite:L,keepOrder:k,dataDescriptor:N,dataDescriptorSignature:A,signal:I,msDosCompatible:h,internalFileAttribute:p,externalFileAttribute:u,useCompressionStream:T});const ln=function(n){const{rawFilename:e,lastModDate:t,lastAccessDate:a,creationDate:o,password:i,level:r,zip64:s,zipCrypto:l,dataDescriptor:c,directory:m,rawExtraField:d,encryptionStrength:h,extendedTimestamp:p}=n,u=0!==r&&!m,g=Boolean(i&&wo(i));let w,b,f,k,y=n.version;if(g&&!l){w=new E(wo(ao)+2);const n=go(w);mo(n,0,dn),uo(w,ao,2),co(n,8,h)}else w=new E;if(p){f=new E(9+(a?4:0)+(o?4:0));const n=go(f);mo(n,0,un),mo(n,2,wo(f)-4),k=1+(a?2:0)+(o?4:0),co(n,4,k);let e=5;ho(n,e,C.floor(t.getTime()/1e3)),e+=4,a&&(ho(n,e,C.floor(a.getTime()/1e3)),e+=4),o&&ho(n,e,C.floor(o.getTime()/1e3));try{b=new E(36);const n=go(b),e=so(t);mo(n,0,hn),mo(n,2,32),mo(n,8,pn),mo(n,10,24),po(n,12,e),po(n,20,so(a)||e),po(n,28,so(o)||e)}catch(n){b=new E}}else b=f=new E;let v=fn;c&&(v|=bn);let j=Q;u&&(j=$);s&&(y=y>kn?y:kn);g&&(v|=wn,l||(y=y>yn?y:yn,j=nn,u&&(w[9]=$)));const S=new E(26),x=go(S);mo(x,0,y),mo(x,2,v),mo(x,4,j);const z=new M(1),L=go(z);let A;A=tjn?jn:t;mo(L,0,(A.getHours()<<6|A.getMinutes())<<5|A.getSeconds()/2),mo(L,2,(A.getFullYear()-1980<<4|A.getMonth()+1)<<5|A.getDate());const I=z[0];ho(x,6,I),mo(x,22,wo(e));const T=wo(w,f,b,d);mo(x,24,T);const R=new E(30+wo(e)+T);return ho(go(R),0,en),uo(R,S,4),uo(R,e,30),uo(R,w,30+wo(e)),uo(R,f,30+wo(e,w)),uo(R,b,30+wo(e,w,f)),uo(R,d,30+wo(e,w,f,b)),{localHeaderArray:R,headerArray:S,headerView:x,lastModDate:t,rawLastModDate:I,encrypted:g,compressed:u,version:y,compressionMethod:j,extraFieldExtendedTimestampFlag:k,rawExtraFieldExtendedTimestamp:f,rawExtraFieldNTFS:b,rawExtraFieldAES:w,extraFieldLength:T}}(a),cn=function(n){const{zip64:e,dataDescriptor:t,dataDescriptorSignature:a}=n;let o,i=new E,r=0;t&&(i=new E(e?a?24:20:a?16:12),o=go(i),a&&(r=4,ho(o,0,an)));return{dataDescriptorArray:i,dataDescriptorView:o,dataDescriptorOffset:r}}(a),Cn=wo(ln.localHeaderArray,cn.dataDescriptorArray);H=Cn+q,n.options.usdz&&(H+=H+64);let zn;n.pendingEntriesSize+=H;try{zn=await async function(n,e,t,a,o){const{files:i,writer:r}=n,{keepOrder:s,dataDescriptor:l,signal:c}=o,{headerInfo:m}=a,{usdz:d}=n.options,h=y.from(i.values()).pop();let p,u,g,w,b,f,k={};i.set(e,k);try{let m;s&&(m=h&&h.lock,j()),!(o.bufferedWrite||n.writerLocked||n.bufferedWrites&&s)&&l||d?(f=r,await S()):(f=new It,f.writable.size=0,p=!0,n.bufferedWrites++,await Vt(r)),await Vt(f);const{writable:u}=r;let{diskOffset:g}=r;if(n.addSplitZipSignature){delete n.addSplitZipSignature;const e=new E(4);ho(go(e),0,tn),await ro(u,e),n.offset+=4}p||(await m,await C(u));const{diskNumber:y}=r;if(b=!0,k.diskNumberStart=y,d&&function(n,e){const{headerInfo:t}=n;let{localHeaderArray:a,extraFieldLength:o}=t,i=go(a),r=64-(e+a.length)%64;r<4&&(r+=64);const s=new E(r),l=go(s);mo(l,0,gn),mo(l,2,r-2);const c=a;t.localHeaderArray=a=new E(c.length+r),uo(a,c),uo(a,s,c.length),i=go(a),mo(i,28,o+r),n.metadataSize+=r}(a,n.offset-g),k=await async function(n,e,{diskNumberStart:t,lock:a},o,i,r){const{headerInfo:s,dataDescriptorInfo:l,metadataSize:c}=o,{localHeaderArray:m,headerArray:d,lastModDate:h,rawLastModDate:p,encrypted:u,compressed:g,version:w,compressionMethod:b,rawExtraFieldExtendedTimestamp:f,extraFieldExtendedTimestampFlag:k,rawExtraFieldNTFS:y,rawExtraFieldAES:j}=s,{dataDescriptorArray:S}=l,{rawFilename:C,lastAccessDate:z,creationDate:L,password:A,level:I,zip64:T,zip64UncompressedSize:R,zip64CompressedSize:D,zip64Offset:M,zip64DiskNumberStart:B,zipCrypto:N,dataDescriptor:O,directory:P,versionMadeBy:_,rawComment:F,rawExtraField:q,useWebWorkers:H,onstart:U,onprogress:G,onend:W,signal:V,encryptionStrength:K,extendedTimestamp:J,msDosCompatible:Y,internalFileAttribute:X,externalFileAttribute:$,useCompressionStream:Q}=r,nn={lock:a,versionMadeBy:_,zip64:T,directory:Boolean(P),filenameUTF8:!0,rawFilename:C,commentUTF8:!0,rawComment:F,rawExtraFieldExtendedTimestamp:f,rawExtraFieldNTFS:y,rawExtraFieldAES:j,rawExtraField:q,extendedTimestamp:J,msDosCompatible:Y,internalFileAttribute:X,externalFileAttribute:$,diskNumberStart:t};let en,tn=0,an=0;const{writable:on}=e;if(n){n.chunkSize=Dn(i),await ro(on,m);const e=n.readable,t=e.size=n.size,a={options:{codecType:Xe,level:I,password:A,encryptionStrength:K,zipCrypto:u&&N,passwordVerification:u&&N&&p>>8&255,signed:!0,compressed:g,encrypted:u,useWebWorkers:H,useCompressionStream:Q,transferStreams:!1},config:i,streamOptions:{signal:V,size:t,onstart:U,onprogress:G,onend:W}},o=await pt({readable:e,writable:on},a);on.size+=o.size,en=o.signature,an=n.size=e.size,tn=o.size}else await ro(on,m);let rn;if(T){let n=4;R&&(n+=8),D&&(n+=8),M&&(n+=8),B&&(n+=4),rn=new E(n)}else rn=new E;(function(n,e){const{signature:t,rawExtraFieldZip64:a,compressedSize:o,uncompressedSize:i,headerInfo:r,dataDescriptorInfo:s}=n,{headerView:l,encrypted:c}=r,{dataDescriptorView:m,dataDescriptorOffset:d}=s,{zip64:h,zip64UncompressedSize:p,zip64CompressedSize:u,zipCrypto:g,dataDescriptor:w}=e;c&&!g||t===xn||(ho(l,10,t),w&&ho(m,d,t));if(h){const n=go(a);mo(n,0,mn),mo(n,2,a.length-4);let e=4;p&&(ho(l,18,Z),po(n,e,x(i)),e+=8),u&&(ho(l,14,Z),po(n,e,x(o))),w&&(po(m,d+4,x(o)),po(m,d+12,x(i)))}else ho(l,14,o),ho(l,18,i),w&&(ho(m,d+4,o),ho(m,d+8,i))})({signature:en,rawExtraFieldZip64:rn,compressedSize:tn,uncompressedSize:an,headerInfo:s,dataDescriptorInfo:l},r),O&&await ro(on,S);return v.assign(nn,{uncompressedSize:an,compressedSize:tn,lastModDate:h,rawLastModDate:p,creationDate:L,lastAccessDate:z,encrypted:u,length:c+tn,compressionMethod:b,version:w,headerArray:d,signature:en,rawExtraFieldZip64:rn,extraFieldExtendedTimestampFlag:k,zip64UncompressedSize:R,zip64CompressedSize:D,zip64Offset:M,zip64DiskNumberStart:B}),nn}(t,f,k,a,n.config,o),b=!1,i.set(e,k),k.filename=e,p){await f.writable.getWriter().close();let n=await f.getData();await m,await S(),w=!0,l||(n=await async function(n,e,t,{zipCrypto:a}){let o;o=await e.slice(0,26).arrayBuffer(),26!=o.byteLength&&(o=o.slice(0,26));const i=new B(o);n.encrypted&&!a||ho(i,14,n.signature);n.zip64?(ho(i,18,Z),ho(i,22,Z)):(ho(i,18,n.compressedSize),ho(i,22,n.uncompressedSize));return await ro(t,new E(o)),e.slice(o.byteLength)}(k,n,u,o)),await C(u),k.diskNumberStart=r.diskNumber,g=r.diskOffset,await n.stream().pipeTo(u,{preventClose:!0,preventAbort:!0,signal:c}),u.size+=n.size,w=!1}if(k.offset=n.offset-g,k.zip64)!function(n,e){const{rawExtraFieldZip64:t,offset:a,diskNumberStart:o}=n,{zip64UncompressedSize:i,zip64CompressedSize:r,zip64Offset:s,zip64DiskNumberStart:l}=e,c=go(t);let m=4;i&&(m+=8);r&&(m+=8);s&&(po(c,m,x(a)),m+=8);l&&ho(c,m,o)}(k,o);else if(k.offset>=Z)throw new R(to);return n.offset+=k.length,k}catch(t){if(p&&w||!p&&b){if(n.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(n){}p?n.offset+=f.writable.size:n.offset=f.writable.size}throw i.delete(e),t}finally{p&&n.bufferedWrites--,g&&g(),u&&u()}function j(){k.lock=new O((n=>g=n))}async function S(){n.writerLocked=!0;const{lockWriter:e}=n;n.lockWriter=new O((e=>u=()=>{n.writerLocked=!1,e()})),await e}async function C(n){m.localHeaderArray.length>r.availableSize&&(r.availableSize=0,await ro(n,new E))}}(n,e,t,{headerInfo:ln,dataDescriptorInfo:cn,metadataSize:Cn},a)}finally{n.pendingEntriesSize-=H}return v.assign(zn,{name:e,comment:i,extraField:F}),new ya(zn)}(a,n,e,t),o.add(r),await r}catch(e){throw a.filenames.delete(n),e}finally{o.delete(r);const n=io.shift();n?n():oo--}}async close(n=new E,e={}){const{pendingAddFileCalls:t,writer:a}=this,{writable:o}=a;for(;t.size;)await O.all(y.from(t));await async function(n,e,t){const{files:a,writer:o}=n,{diskOffset:i,writable:r}=o;let{diskNumber:s}=o,l=0,c=0,m=n.offset-i,d=a.size;for(const[,n]of a){const{rawFilename:e,rawExtraFieldZip64:t,rawExtraFieldAES:a,rawComment:o,rawExtraFieldNTFS:i,rawExtraField:r,extendedTimestamp:s,extraFieldExtendedTimestampFlag:l,lastModDate:m}=n;let d;if(s){d=new E(9);const n=go(d);mo(n,0,un),mo(n,2,5),co(n,4,l),ho(n,5,C.floor(m.getTime()/1e3))}else d=new E;n.rawExtraFieldCDExtendedTimestamp=d,c+=46+wo(e,o,t,a,i,d,r)}const h=new E(c),p=go(h);await Vt(o);let u=0;for(const[n,e]of y.from(a.values()).entries()){const{offset:i,rawFilename:s,rawExtraFieldZip64:c,rawExtraFieldAES:m,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:g,rawExtraField:w,rawComment:b,versionMadeBy:f,headerArray:k,directory:y,zip64:v,zip64UncompressedSize:j,zip64CompressedSize:S,zip64DiskNumberStart:x,zip64Offset:C,msDosCompatible:z,internalFileAttribute:L,externalFileAttribute:A,diskNumberStart:I,uncompressedSize:T,compressedSize:R}=e,E=wo(c,m,d,g,w);ho(p,l,on),mo(p,l+4,f);const D=go(k);j||ho(D,18,T),S||ho(D,14,R),uo(h,k,l+6),mo(p,l+30,E),mo(p,l+32,wo(b)),mo(p,l+34,v&&x?X:I),mo(p,l+36,L),A?ho(p,l+38,A):y&&z&&co(p,l+38,16),ho(p,l+42,v&&C?Z:i),uo(h,s,l+46),uo(h,c,l+46+wo(s)),uo(h,m,l+46+wo(s,c)),uo(h,d,l+46+wo(s,c,m)),uo(h,g,l+46+wo(s,c,m,d)),uo(h,w,l+46+wo(s,c,m,d,g)),uo(h,b,l+46+wo(s)+E);const M=46+wo(s,b)+E;if(l-u>o.availableSize&&(o.availableSize=0,await ro(r,h.slice(u,l)),u=l),l+=M,t.onprogress)try{await t.onprogress(n+1,a.size,new ya(e))}catch(n){}}await ro(r,u?h.slice(u):h);let g=o.diskNumber;const{availableSize:w}=o;w=Z||c>=Z||d>=X||g>=X){if(!1===b)throw new R(to);b=!0}const f=new E(b?98:cn),k=go(f);if(l=0,b){ho(k,0,sn),po(k,4,x(44)),mo(k,12,45),mo(k,14,45),ho(k,16,g),ho(k,20,s),po(k,24,x(d)),po(k,32,x(d)),po(k,40,x(c)),po(k,48,x(m)),ho(k,56,ln),po(k,64,x(m)+x(c)),ho(k,72,g+1);lo(n,t,"supportZip64SplitFile",!0)&&(g=X,s=X),d=X,m=Z,c=Z,l+=76}ho(k,l,rn),mo(k,l+4,g),mo(k,l+6,s),mo(k,l+8,d),mo(k,l+10,d),ho(k,l+12,c),ho(k,l+16,m);const v=wo(e);if(v){if(!(v<=X))throw new R(Ya);mo(k,l+20,v)}await ro(r,f),v&&await ro(r,e)}(this,n,e);return lo(this,e,"preventClose")||await o.getWriter().close(),a.getData?a.getData():o}},configure:Mn,getMimeType:function(){return"application/octet-stream"},initReader:Kt,initShimAsyncCodec:function(n,e={},t){return{Deflate:Nn(n.Deflate,e.deflate,t),Inflate:Nn(n.Inflate,e.inflate,t)}},initStream:Vt,initWriter:Jt,readUint8Array:Yt,terminateWorkers:function(){mt.forEach((n=>{ut(n),n.terminate()}))}}),ko=Object.create,yo=Object.defineProperty,vo=Object.getOwnPropertyDescriptor,jo=Object.getOwnPropertyNames,So=Object.getPrototypeOf,xo=Object.prototype.hasOwnProperty,Co=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),zo=(n,e)=>{for(var t in e)yo(n,t,{get:e[t],enumerable:!0})},Lo=Co((n=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(n){if(0<=n&&n{var e=Lo();n.encode=function(n){var t,a="",o=function(n){return n<0?1+(-n<<1):0+(n<<1)}(n);do{t=31&o,(o>>>=5)>0&&(t|=32),a+=e.encode(t)}while(o>0);return a},n.decode=function(n,t,a){var o,i,r=n.length,s=0,l=0;do{if(t>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=e.decode(n.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+n.charAt(t-1));o=!!(32&i),s+=(i&=31)<>1;return 1==(1&n)?-e:e}(s),a.rest=t}})),Io=Co((n=>{n.getArg=function(n,e,t){if(e in n)return n[e];if(3===arguments.length)return t;throw new Error('"'+e+'" is a required argument.')};var e=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,t=/^data:.+\,.+$/;function a(n){var t=n.match(e);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}n.urlParse=a,n.urlGenerate=o;var i=function(n){var e=[];return function(t){for(var a=0;a32&&e.pop(),i}}((function(e){var t=e,i=a(e);if(i){if(!i.path)return e;t=i.path}for(var r=n.isAbsolute(t),s=[],l=0,c=0;;){if(l=c,-1===(c=t.indexOf("/",l))){s.push(t.slice(l));break}for(s.push(t.slice(l,c));c=0;c--)"."===(m=s[c])?s.splice(c,1):".."===m?d++:d>0&&(""===m?(s.splice(c+1,d),d=0):(s.splice(c,2),d--));return""===(t=s.join("/"))&&(t=r?"/":"."),i?(i.path=t,o(i)):t}));function r(n,e){""===n&&(n="."),""===e&&(e=".");var r=a(e),s=a(n);if(s&&(n=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||e.match(t))return e;if(s&&!s.host&&!s.path)return s.host=e,o(s);var l="/"===e.charAt(0)?e:i(n.replace(/\/+$/,"")+"/"+e);return s?(s.path=l,o(s)):l}n.normalize=i,n.join=r,n.isAbsolute=function(n){return"/"===n.charAt(0)||e.test(n)},n.relative=function(n,e){""===n&&(n="."),n=n.replace(/\/$/,"");for(var t=0;0!==e.indexOf(n+"/");){var a=n.lastIndexOf("/");if(a<0||(n=n.slice(0,a)).match(/^([^\/]+:\/)?\/*$/))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)};var s=!("__proto__"in Object.create(null));function l(n){return n}function c(n){if(!n)return!1;var e=n.length;if(e<9||95!==n.charCodeAt(e-1)||95!==n.charCodeAt(e-2)||111!==n.charCodeAt(e-3)||116!==n.charCodeAt(e-4)||111!==n.charCodeAt(e-5)||114!==n.charCodeAt(e-6)||112!==n.charCodeAt(e-7)||95!==n.charCodeAt(e-8)||95!==n.charCodeAt(e-9))return!1;for(var t=e-10;t>=0;t--)if(36!==n.charCodeAt(t))return!1;return!0}function m(n,e){return n===e?0:null===n?1:null===e?-1:n>e?1:-1}n.toSetString=s?l:function(n){return c(n)?"$"+n:n},n.fromSetString=s?l:function(n){return c(n)?n.slice(1):n},n.compareByOriginalPositions=function(n,e,t){var a=m(n.source,e.source);return 0!==a||0!==(a=n.originalLine-e.originalLine)||(0!==(a=n.originalColumn-e.originalColumn)||t)||0!==(a=n.generatedColumn-e.generatedColumn)||0!==(a=n.generatedLine-e.generatedLine)?a:m(n.name,e.name)},n.compareByOriginalPositionsNoSource=function(n,e,t){var a;return 0!==(a=n.originalLine-e.originalLine)||(0!==(a=n.originalColumn-e.originalColumn)||t)||0!==(a=n.generatedColumn-e.generatedColumn)||0!==(a=n.generatedLine-e.generatedLine)?a:m(n.name,e.name)},n.compareByGeneratedPositionsDeflated=function(n,e,t){var a=n.generatedLine-e.generatedLine;return 0!==a||(0!==(a=n.generatedColumn-e.generatedColumn)||t)||0!==(a=m(n.source,e.source))||0!==(a=n.originalLine-e.originalLine)||0!==(a=n.originalColumn-e.originalColumn)?a:m(n.name,e.name)},n.compareByGeneratedPositionsDeflatedNoLine=function(n,e,t){var a=n.generatedColumn-e.generatedColumn;return 0!==a||t||0!==(a=m(n.source,e.source))||0!==(a=n.originalLine-e.originalLine)||0!==(a=n.originalColumn-e.originalColumn)?a:m(n.name,e.name)},n.compareByGeneratedPositionsInflated=function(n,e){var t=n.generatedLine-e.generatedLine;return 0!==t||0!==(t=n.generatedColumn-e.generatedColumn)||0!==(t=m(n.source,e.source))||0!==(t=n.originalLine-e.originalLine)||0!==(t=n.originalColumn-e.originalColumn)?t:m(n.name,e.name)},n.parseSourceMapInput=function(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))},n.computeSourceURL=function(n,e,t){if(e=e||"",n&&("/"!==n[n.length-1]&&"/"!==e[0]&&(n+="/"),e=n+e),t){var s=a(t);if(!s)throw new Error("sourceMapURL could not be parsed");if(s.path){var l=s.path.lastIndexOf("/");l>=0&&(s.path=s.path.substring(0,l+1))}e=r(o(s),e)}return i(e)}})),To=Co((n=>{var e=Io(),t=Object.prototype.hasOwnProperty,a=typeof Map<"u";function o(){this._array=[],this._set=a?new Map:Object.create(null)}o.fromArray=function(n,e){for(var t=new o,a=0,i=n.length;a=0)return o}else{var i=e.toSetString(n);if(t.call(this._set,i))return this._set[i]}throw new Error('"'+n+'" is not in the set.')},o.prototype.at=function(n){if(n>=0&&n{var e=Io();function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}t.prototype.unsortedForEach=function(n,e){this._array.forEach(n,e)},t.prototype.add=function(n){!function(n,t){var a=n.generatedLine,o=t.generatedLine,i=n.generatedColumn,r=t.generatedColumn;return o>a||o==a&&r>=i||e.compareByGeneratedPositionsInflated(n,t)<=0}(this._last,n)?(this._sorted=!1,this._array.push(n)):(this._last=n,this._array.push(n))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=t})),Eo=Co((n=>{var e=Ao(),t=Io(),a=To().ArraySet,o=Ro().MappingList;function i(n){n||(n={}),this._file=t.getArg(n,"file",null),this._sourceRoot=t.getArg(n,"sourceRoot",null),this._skipValidation=t.getArg(n,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(n){var e=n.sourceRoot,a=new i({file:n.file,sourceRoot:e});return n.eachMapping((function(n){var o={generated:{line:n.generatedLine,column:n.generatedColumn}};null!=n.source&&(o.source=n.source,null!=e&&(o.source=t.relative(e,o.source)),o.original={line:n.originalLine,column:n.originalColumn},null!=n.name&&(o.name=n.name)),a.addMapping(o)})),n.sources.forEach((function(o){var i=o;null!==e&&(i=t.relative(e,o)),a._sources.has(i)||a._sources.add(i);var r=n.sourceContentFor(o);null!=r&&a.setSourceContent(o,r)})),a},i.prototype.addMapping=function(n){var e=t.getArg(n,"generated"),a=t.getArg(n,"original",null),o=t.getArg(n,"source",null),i=t.getArg(n,"name",null);this._skipValidation||this._validateMapping(e,a,o,i),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=a&&a.line,originalColumn:null!=a&&a.column,source:o,name:i})},i.prototype.setSourceContent=function(n,e){var a=n;null!=this._sourceRoot&&(a=t.relative(this._sourceRoot,a)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(a)]=e):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(a)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(n,e,o){var i=e;if(null==e){if(null==n.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=n.file}var r=this._sourceRoot;null!=r&&(i=t.relative(r,i));var s=new a,l=new a;this._mappings.unsortedForEach((function(e){if(e.source===i&&null!=e.originalLine){var a=n.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=a.source&&(e.source=a.source,null!=o&&(e.source=t.join(o,e.source)),null!=r&&(e.source=t.relative(r,e.source)),e.originalLine=a.line,e.originalColumn=a.column,null!=a.name&&(e.name=a.name))}var c=e.source;null!=c&&!s.has(c)&&s.add(c);var m=e.name;null!=m&&!l.has(m)&&l.add(m)}),this),this._sources=s,this._names=l,n.sources.forEach((function(e){var a=n.sourceContentFor(e);null!=a&&(null!=o&&(e=t.join(o,e)),null!=r&&(e=t.relative(r,e)),this.setSourceContent(e,a))}),this)},i.prototype._validateMapping=function(n,e,t,a){if(e&&"number"!=typeof e.line&&"number"!=typeof e.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(!(n&&"line"in n&&"column"in n&&n.line>0&&n.column>=0)||e||t||a){if(n&&"line"in n&&"column"in n&&e&&"line"in e&&"column"in e&&n.line>0&&n.column>=0&&e.line>0&&e.column>=0&&t)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:n,source:t,original:e,name:a}))}},i.prototype._serializeMappings=function(){for(var n,a,o,i,r=0,s=1,l=0,c=0,m=0,d=0,h="",p=this._mappings.toArray(),u=0,g=p.length;u0){if(!t.compareByGeneratedPositionsInflated(a,p[u-1]))continue;n+=","}n+=e.encode(a.generatedColumn-r),r=a.generatedColumn,null!=a.source&&(i=this._sources.indexOf(a.source),n+=e.encode(i-d),d=i,n+=e.encode(a.originalLine-1-c),c=a.originalLine-1,n+=e.encode(a.originalColumn-l),l=a.originalColumn,null!=a.name&&(o=this._names.indexOf(a.name),n+=e.encode(o-m),m=o)),h+=n}return h},i.prototype._generateSourcesContent=function(n,e){return n.map((function(n){if(!this._sourcesContents)return null;null!=e&&(n=t.relative(e,n));var a=t.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,a)?this._sourcesContents[a]:null}),this)},i.prototype.toJSON=function(){var n={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(n.file=this._file),null!=this._sourceRoot&&(n.sourceRoot=this._sourceRoot),this._sourcesContents&&(n.sourcesContent=this._generateSourcesContent(n.sources,n.sourceRoot)),n},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=i}));zo({},{AtKeyword:()=>No,BadString:()=>_o,BadUrl:()=>qo,CDC:()=>Jo,CDO:()=>Ko,Colon:()=>Yo,Comma:()=>Xo,Comment:()=>oi,Delim:()=>Ho,Dimension:()=>Wo,EOF:()=>Do,Function:()=>Bo,Hash:()=>Oo,Ident:()=>Mo,LeftCurlyBracket:()=>ti,LeftParenthesis:()=>ni,LeftSquareBracket:()=>$o,Number:()=>Uo,Percentage:()=>Go,RightCurlyBracket:()=>ai,RightParenthesis:()=>ei,RightSquareBracket:()=>Qo,Semicolon:()=>Zo,String:()=>Po,Url:()=>Fo,WhiteSpace:()=>Vo});var Do=0,Mo=1,Bo=2,No=3,Oo=4,Po=5,_o=6,Fo=7,qo=8,Ho=9,Uo=10,Go=11,Wo=12,Vo=13,Ko=14,Jo=15,Yo=16,Zo=17,Xo=18,$o=19,Qo=20,ni=21,ei=22,ti=23,ai=24,oi=25;function ii(n){return n>=48&&n<=57}function ri(n){return ii(n)||n>=65&&n<=70||n>=97&&n<=102}function si(n){return n>=65&&n<=90}function li(n){return function(n){return si(n)||function(n){return n>=97&&n<=122}(n)}(n)||function(n){return n>=128}(n)||95===n}function ci(n){return li(n)||ii(n)||45===n}function mi(n){return n>=0&&n<=8||11===n||n>=14&&n<=31||127===n}function di(n){return 10===n||13===n||12===n}function hi(n){return di(n)||32===n||9===n}function pi(n,e){return!(92!==n||di(e)||0===e)}function ui(n,e,t){return 45===n?li(e)||45===e||pi(e,t):!!li(n)||92===n&&pi(n,e)}function gi(n,e,t){return 43===n||45===n?ii(e)?2:46===e&&ii(t)?3:0:46===n?ii(e)?2:0:ii(n)?1:0}function wi(n){return 65279===n||65534===n?1:0}var bi=new Array(128),fi=130,ki=131,yi=132,vi=133;for(let n=0;nn.length)return!1;for(let o=e;o=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}var Mi=["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 Bi(n=null,e){return null===n||n.length0?wi(e.charCodeAt(0)):0,o=Bi(n.lines,t),i=Bi(n.columns,t),r=n.startLine,s=n.startColumn;for(let n=a;n{})){let t=(n=String(n||"")).length,a=Bi(this.offsetAndType,n.length+1),o=Bi(this.balance,n.length+1),i=0,r=0,s=0,l=-1;for(this.offsetAndType=null,this.balance=null,e(n,((n,e,c)=>{switch(n){default:o[i]=t;break;case r:{let n=sΠfor(s=o[n],r=s>>_i,o[i]=n,o[n++]=i;n>_i:0}lookupOffset(n){return(n+=this.tokenIndex)0?n>_i,this.tokenEnd=e&Pi):(this.tokenIndex=this.tokenCount,this.next())}next(){let n=this.tokenIndex+1;n>_i,this.tokenEnd=n&Pi):(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(n,e){let t,a,o=n;n:for(;o0?this.offsetAndType[o-1]&Pi:this.firstCharOffset,e(this.source.charCodeAt(a))){case 1:break n;case 2:o++;break n;default:this.balance[t]===o&&(o=t)}this.skip(o-this.tokenIndex)}forEachToken(n){for(let e=0,t=this.firstCharOffset;e>_i,a,i,e)}}dump(){let n=new Array(this.tokenCount);return this.forEachToken(((e,t,a,o)=>{n[o]={idx:o,type:Mi[e],chunk:this.source.substring(t,a),balance:this.balance[o]}})),n}};function Hi(n,e){function t(e){return e=n.length?void(cString(n+t+1).padStart(l)+" |"+e)).join("\n")}let i=n.split(/\r\n?|\n|\f/),r=Math.max(1,e-a)-1,s=Math.min(e+a,i.length+1),l=Math.max(4,String(s).length)+1,c=0;(t+=(Ji.length-1)*(i[e-1].substr(0,t-1).match(/\t/g)||[]).length)>Vi&&(c=t-Ki+3,t=Ki-2);for(let n=r;n<=s;n++)n>=0&&n0&&i[n].length>c?"…":"")+i[n].substr(c,Vi-2)+(i[n].length>c+Vi-1?"…":""));return[o(r,e),new Array(t+l+2).join("-")+"^",o(e,s)].filter(Boolean).join("\n")}function Zi(n,e,t,a,o){return Object.assign(Wi("SyntaxError",n),{source:e,offset:t,line:a,column:o,sourceFragment:n=>Yi({source:e,line:a,column:o},isNaN(n)?0:n),get formattedMessage(){return`Parse error: ${n}\n`+Yi({source:e,line:a,column:o},2)}})}function Xi(n){let e=this.createList(),t=!1,a={recognizer:n};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:t=!0,this.next();continue}let o=n.getNode.call(this,a);if(void 0===o)break;t&&(n.onWhiteSpace&&n.onWhiteSpace.call(this,o,e,a),t=!1),e.push(o)}return t&&n.onWhiteSpace&&n.onWhiteSpace.call(this,null,e,a),e}var $i=()=>{},Qi=33,nr=35,er=59,tr=123,ar=0;function or(n){return function(){return this[n]()}}function ir(n){let e=Object.create(null);for(let t in n){let a=n[t],o=a.parse||a;o&&(e[t]=o)}return e}function rr(n){let e="",t="",a=!1,o=$i,i=!1,r=new Oi,s=Object.assign(new qi,function(n){let e={context:Object.create(null),scope:Object.assign(Object.create(null),n.scope),atrule:ir(n.atrule),pseudo:ir(n.pseudo),node:ir(n.node)};for(let t in n.parseContext)switch(typeof n.parseContext[t]){case"function":e.context[t]=n.parseContext[t];break;case"string":e.context[t]=or(n.parseContext[t])}return{config:e,...e,...e.node}}(n||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Xi,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:n=>n===tr?1:0,consumeUntilLeftCurlyBracketOrSemicolon:n=>n===tr||n===er?1:0,consumeUntilExclamationMarkOrSemicolon:n=>n===Qi||n===er?1:0,consumeUntilSemicolonIncluded:n=>n===er?2:0,createList:()=>new Gi,createSingleNodeList:n=>(new Gi).appendData(n),getFirstListNode:n=>n&&n.first,getLastListNode:n=>n&&n.last,parseWithFallback(n,e){let t=this.tokenIndex;try{return n.call(this)}catch(n){if(i)throw n;let a=e.call(this,t);return i=!0,o(n,a),i=!1,a}},lookupNonWSType(n){let e;do{if(e=this.lookupType(n++),13!==e)return e}while(e!==ar);return ar},charCodeAt:n=>n>=0&&ne.substring(n,t),substrToCursor(n){return this.source.substring(n,this.tokenStart)},cmpChar:(n,t)=>Ci(e,n,t),cmpStr:(n,t,a)=>zi(e,n,t,a),consume(n){let e=this.tokenStart;return this.eat(n),this.substrToCursor(e)},consumeFunctionName(){let n=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),n},consumeNumber(n){let t=e.substring(this.tokenStart,Ri(e,this.tokenStart));return this.eat(n),t},eat(n){if(this.tokenType!==n){let e=Mi[n].slice(0,-6).replace(/-/g," ").replace(/^./,(n=>n.toUpperCase())),t=`${/[[\](){}]/.test(e)?`"${e}"`:e} is expected`,a=this.tokenStart;switch(n){case 1:2===this.tokenType||7===this.tokenType?(a=this.tokenEnd-1,t="Identifier is expected but function found"):t="Identifier is expected";break;case 4:this.isDelim(nr)&&(this.next(),a++,t="Name is expected");break;case 11:10===this.tokenType&&(a=this.tokenEnd,t="Percent sign is expected")}this.error(t,a)}this.next()},eatIdent(n){(1!==this.tokenType||!1===this.lookupValue(0,n))&&this.error(`Identifier "${n}" is expected`),this.next()},eatDelim(n){this.isDelim(n)||this.error(`Delim "${String.fromCharCode(n)}" is expected`),this.next()},getLocation:(n,e)=>a?r.getLocationRange(n,e,t):null,getLocationFromList(n){if(a){let e=this.getFirstListNode(n),a=this.getLastListNode(n);return r.getLocationRange(null!==e?e.loc.start.offset-r.startOffset:this.tokenStart,null!==a?a.loc.end.offset-r.startOffset:this.tokenStart,t)}return null},error(n,t){let a=typeof t<"u"&&t=0&&hi(n.charCodeAt(e));e--);return e+1}(e,e.length-1)):r.getLocation(this.tokenStart);throw new Zi(n||"Unexpected input",e,a.offset,a.line,a.column)}});return Object.assign((function(n,l){e=n,l=l||{},s.setSource(e,Hi),r.setSource(e,l.offset,l.line,l.column),t=l.filename||"",a=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:$i,i=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),s.parseValue=!("parseValue"in l)||Boolean(l.parseValue),s.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:m}=l;if(!(c in s.context))throw new Error("Unknown context `"+c+"`");"function"==typeof m&&s.forEachToken(((n,t,a)=>{if(25===n){let n=s.getLocation(t,a),o=zi(e,a-2,a,"*/")?e.slice(t+2,a-2):e.slice(t+2,a);m(o,n)}}));let d=s.context[c].call(s,l);return s.eof||s.error(),d}),{SyntaxError:Zi,config:s.config})}var sr=((n,e,t)=>(t=null!=n?ko(So(n)):{},((n,e,t,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let o of jo(e))!xo.call(n,o)&&o!==t&&yo(n,o,{get:()=>e[o],enumerable:!(a=vo(e,o))||a.enumerable});return n})(!e&&n&&n.__esModule?t:yo(t,"default",{value:n,enumerable:!0}),n)))(Eo(),1),lr=new Set(["Atrule","Selector","Declaration"]);var cr={};zo(cr,{safe:()=>gr,spec:()=>ur});var mr=(n,e)=>{if(9===n&&(n=e),"string"==typeof n){let e=n.charCodeAt(0);return e>127?32768:e<<8}return n},dr=[[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],["/","*"]],hr=dr.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 pr(n){let e=new Set(n.map((([n,e])=>mr(n)<<16|mr(e))));return function(n,t,a){let o=mr(t,a),i=a.charCodeAt(0);return(45===i&&1!==t&&2!==t&&15!==t||43===i?e.has(n<<16|i<<8):e.has(n<<16|o))&&this.emit(" ",13,!0),o}}var ur=pr(dr),gr=pr(hr),wr=92;function br(n,e){if("function"!=typeof e)n.children.forEach(this.node,this);else{let t=null;n.children.forEach((n=>{null!==t&&e.call(this,t),this.node(n),t=n}))}}function fr(n){Hi(n,((e,t,a)=>{this.token(e,n.slice(t,a))}))}function kr(n){let e=new Map;for(let t in n.node){let a=n.node[t];"function"==typeof(a.generate||a)&&e.set(t,a.generate||a)}return function(n,t){let a="",o=0,i={node(n){if(!e.has(n.type))throw new Error("Unknown node type: "+n.type);e.get(n.type).call(r,n)},tokenBefore:gr,token(n,e){o=this.tokenBefore(o,n,e),this.emit(e,n,!1),9===n&&e.charCodeAt(0)===wr&&this.emit("\n",13,!0)},emit(n){a+=n},result:()=>a};t&&("function"==typeof t.decorator&&(i=t.decorator(i)),t.sourceMap&&(i=function(n){let e=new sr.SourceMapGenerator,t={line:1,column:0},a={line:0,column:0},o={line:1,column:0},i={generated:o},r=1,s=0,l=!1,c=n.node;n.node=function(n){if(n.loc&&n.loc.start&&lr.has(n.type)){let c=n.loc.start.line,m=n.loc.start.column-1;(a.line!==c||a.column!==m)&&(a.line=c,a.column=m,t.line=r,t.column=s,l&&(l=!1,(t.line!==o.line||t.column!==o.column)&&e.addMapping(i)),l=!0,e.addMapping({source:n.loc.source,original:a,generated:t}))}c.call(this,n),l&&lr.has(n.type)&&(o.line=r,o.column=s)};let m=n.emit;n.emit=function(n,e,t){for(let e=0;ei.node(n),children:br,token:(n,e)=>i.token(n,e),tokenize:fr};return i.node(n),i.result()}}var{hasOwnProperty:yr}=Object.prototype,vr=function(){};function jr(n){return"function"==typeof n?n:vr}function Sr(n,e){return function(t,a,o){t.type===e&&n.call(this,t,a,o)}}function xr(n,e){let t=e.structure,a=[];for(let n in t){if(!1===yr.call(t,n))continue;let e=t[n],o={name:n,type:!1,nullable:!1};Array.isArray(e)||(e=[e]);for(let n of e)null===n?o.nullable=!0:"string"==typeof n?o.type="node":Array.isArray(n)&&(o.type="list");o.type&&a.push(o)}return a.length?{context:e.walkContext,fields:a}:null}function Cr(n,e){let t=n.fields.slice(),a=n.context,o="string"==typeof a;return e&&t.reverse(),function(n,i,r,s){let l;o&&(l=i[a],i[a]=n);for(let a of t){let t=n[a.name];if(!a.nullable||t)if("list"===a.type){if(e?t.reduceRight(s,!1):t.reduce(s,!1))return!0}else if(r(t))return!0}o&&(i[a]=l)}}function zr({StyleSheet:n,Atrule:e,Rule:t,Block:a,DeclarationList:o}){return{Atrule:{StyleSheet:n,Atrule:e,Rule:t,Block:a},Rule:{StyleSheet:n,Atrule:e,Rule:t,Block:a},Declaration:{StyleSheet:n,Atrule:e,Rule:t,Block:a,DeclarationList:o}}}function Lr(n){let e=function(n){let e={};for(let t in n.node)if(yr.call(n.node,t)){let a=n.node[t];if(!a.structure)throw new Error("Missed `structure` field in `"+t+"` node type definition");e[t]=xr(0,a)}return e}(n),t={},a={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let n in e)yr.call(e,n)&&null!==e[n]&&(t[n]=Cr(e[n],!1),a[n]=Cr(e[n],!0));let r=zr(t),s=zr(a),l=function(n,l){function c(n,e,t){let a=m.call(u,n,e,t);return a===o||a!==i&&!!(h.hasOwnProperty(n.type)&&h[n.type](n,u,c,p)||d.call(u,n,e,t)===o)}let m=vr,d=vr,h=t,p=(n,e,t,a)=>n||c(e,t,a),u={break:o,skip:i,root:n,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)m=l;else if(l&&(m=jr(l.enter),d=jr(l.leave),l.reverse&&(h=a),l.visit)){if(r.hasOwnProperty(l.visit))h=l.reverse?s[l.visit]:r[l.visit];else if(!e.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(e).sort().join(", ")+")");m=Sr(m,l.visit),d=Sr(d,l.visit)}if(m===vr&&d===vr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(n)};return l.break=o,l.skip=i,l.find=function(n,e){let t=null;return l(n,(function(n,a,i){if(e.call(this,n,a,i))return t=n,o})),t},l.findLast=function(n,e){let t=null;return l(n,{reverse:!0,enter(n,a,i){if(e.call(this,n,a,i))return t=n,o}}),t},l.findAll=function(n,e){let t=[];return l(n,(function(n,a,o){e.call(this,n,a,o)&&t.push(n)})),t},l}function Ar(n){return n}function Ir(n,e,t,a){let o;switch(n.type){case"Group":o=function(n,e,t,a){let o=" "===n.combinator||a?n.combinator:" "+n.combinator+" ",i=n.terms.map((n=>Ir(n,e,t,a))).join(o);return n.explicit||t?(a||","===i[0]?"[":"[ ")+i+(a?"]":" ]"):i}(n,e,t,a)+(n.disallowEmpty?"!":"");break;case"Multiplier":return Ir(n.term,e,t,a)+e(function(n){let{min:e,max:t,comma:a}=n;return 0===e&&0===t?a?"#?":"*":0===e&&1===t?"?":1===e&&0===t?a?"#":"+":1===e&&1===t?"":(a?"#":"")+(e===t?"{"+e+"}":"{"+e+","+(0!==t?t:"")+"}")}(n),n);case"Type":o="<"+n.name+(n.opts?e(function(n){if("Range"===n.type)return" ["+(null===n.min?"-∞":n.min)+","+(null===n.max?"∞":n.max)+"]";throw new Error("Unknown node type `"+n.type+"`")}(n.opts),n.opts):"")+">";break;case"Property":o="<'"+n.name+"'>";break;case"Keyword":o=n.name;break;case"AtKeyword":o="@"+n.name;break;case"Function":o=n.name+"(";break;case"String":case"Token":o=n.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+n.type+"`")}return e(o,n)}function Tr(n,e){let t=Ar,a=!1,o=!1;return"function"==typeof e?t=e:e&&(a=Boolean(e.forceBraces),o=Boolean(e.compact),"function"==typeof e.decorate&&(t=e.decorate)),Ir(n,t,a,o)}var Rr={offset:0,line:1,column:1};function Er(n,e){let t=n&&n.loc&&n.loc[e];return t?"line"in t?Dr(t):t:null}function Dr({offset:n,line:e,column:t},a){let o={offset:n,line:e,column:t};if(a){let n=a.split(/\n|\r\n?|\f/);o.offset+=a.length,o.line+=n.length-1,o.column=1===n.length?o.column+a.length:n.pop().length+1}return o}var Mr=function(n,e){let t=Wi("SyntaxReferenceError",n+(e?" `"+e+"`":""));return t.reference=e,t},Br=function(n,e,t,a){let o=Wi("SyntaxMatchError",n),{css:i,mismatchOffset:r,mismatchLength:s,start:l,end:c}=function(n,e){let t,a,o=n.tokens,i=n.longestMatch,r=i1?(t=Er(s||e,"end")||Dr(Rr,d),a=Dr(t)):(t=Er(s,"start")||Dr(Er(e,"start")||Rr,d.slice(0,l)),a=Er(s,"end")||Dr(t,d.substr(l,c))),{css:d,mismatchOffset:l,mismatchLength:c,start:t,end:a}}(a,t);return o.rawMessage=n,o.syntax=e?Tr(e):"",o.css=i,o.mismatchOffset=r,o.mismatchLength=s,o.message=n+"\n syntax: "+o.syntax+"\n value: "+(i||"")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:t&&t.loc&&t.loc.source||"",start:l,end:c},o},Nr=new Map,Or=new Map,Pr=45,_r=function(n){if(Nr.has(n))return Nr.get(n);let e=n.toLowerCase(),t=Nr.get(e);if(void 0===t){let n=qr(e,0),a=n?"":Hr(e,0);t=Object.freeze({basename:e.substr(a.length),name:e,prefix:a,vendor:a,custom:n})}return Nr.set(n,t),t},Fr=function(n){if(Or.has(n))return Or.get(n);let e=n,t=n[0];"/"===t?t="/"===n[1]?"//":"/":"_"!==t&&"*"!==t&&"$"!==t&&"#"!==t&&"+"!==t&&"&"!==t&&(t="");let a=qr(e,t.length);if(!a&&(e=e.toLowerCase(),Or.has(e))){let t=Or.get(e);return Or.set(n,t),t}let o=a?"":Hr(e,t.length),i=e.substr(0,t.length+o.length),r=Object.freeze({basename:e.substr(i.length),name:e.substr(t.length),hack:t,vendor:o,prefix:i,custom:a});return Or.set(n,r),r};function qr(n,e){return e=e||0,n.length-e>=2&&n.charCodeAt(e)===Pr&&n.charCodeAt(e+1)===Pr}function Hr(n,e){if(e=e||0,n.length-e>=3&&n.charCodeAt(e)===Pr&&n.charCodeAt(e+1)!==Pr){let t=n.indexOf("-",e+2);if(-1!==t)return n.substring(e,t+1)}return""}var Ur=["initial","inherit","unset","revert","revert-layer"],Gr=43,Wr=45,Vr=!0;function Kr(n,e){return null!==n&&9===n.type&&n.value.charCodeAt(0)===e}function Jr(n,e,t){for(;null!==n&&(13===n.type||25===n.type);)n=t(++e);return e}function Yr(n,e,t,a){if(!n)return 0;let o=n.value.charCodeAt(e);if(o===Gr||o===Wr){if(t)return 0;e++}for(;e6)return 0}return a}function es(n,e,t){if(!n)return 0;for(;Qr(t(e),$r);){if(++n>6)return 0;e++}return e}var ts=["calc(","-moz-calc(","-webkit-calc("],as=new Map([[2,22],[21,22],[19,20],[23,24]]);function os(n,e){return en.max&&"string"!=typeof n.max)return!0}return!1}function cs(n){return function(e,t,a){return null===e?0:2===e.type&&rs(e.value,ts)?function(n,e){let t=0,a=[],o=0;n:do{switch(n.type){case 24:case 22:case 20:if(n.type!==t)break n;if(t=a.pop(),0===a.length){o++;break n}break;case 2:case 21:case 19:case 23:a.push(t),t=as.get(n.type)}o++}while(n=e(o));return o}(e,t):n(e,t,a)}}function ms(n){return function(e){return null===e||e.type!==n?0:1}}function ds(n){return n&&(n=new Set(n)),function(e,t,a){if(null===e||12!==e.type)return 0;let o=Ri(e.value,0);if(null!==n){let t=e.value.indexOf("\\",o),a=-1!==t&&ss(e.value,t)?e.value.substring(o,t):e.value.substr(o);if(!1===n.has(a.toLowerCase()))return 0}return ls(a,e.value,o)?0:1}}function hs(n){return"function"!=typeof n&&(n=function(){return 0}),function(e,t,a){return null!==e&&10===e.type&&0===Number(e.value)?1:n(e,t,a)}}var ps={"ident-token":ms(1),"function-token":ms(2),"at-keyword-token":ms(3),"hash-token":ms(4),"string-token":ms(5),"bad-string-token":ms(6),"url-token":ms(7),"bad-url-token":ms(8),"delim-token":ms(9),"number-token":ms(10),"percentage-token":ms(11),"dimension-token":ms(12),"whitespace-token":ms(13),"CDO-token":ms(14),"CDC-token":ms(15),"colon-token":ms(16),"semicolon-token":ms(17),"comma-token":ms(18),"[-token":ms(19),"]-token":ms(20),"(-token":ms(21),")-token":ms(22),"{-token":ms(23),"}-token":ms(24)},us={string:ms(5),ident:ms(1),percentage:cs((function(n,e,t){return null===n||11!==n.type||ls(t,n.value,n.value.length-1)?0:1})),zero:hs(),number:cs((function(n,e,t){if(null===n)return 0;let a=Ri(n.value,0);return a!==n.value.length&&!ss(n.value,a)||ls(t,n.value,a)?0:1})),integer:cs((function(n,e,t){if(null===n||10!==n.type)return 0;let a=43===os(n.value,0)||45===os(n.value,0)?1:0;for(;afs,decibel:()=>Ss,flex:()=>js,frequency:()=>ys,length:()=>bs,resolution:()=>vs,semitones:()=>xs,time:()=>ks});var bs=["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"],fs=["deg","grad","rad","turn"],ks=["s","ms"],ys=["hz","khz"],vs=["dpi","dpcm","dppx","x"],js=["fr"],Ss=["db"],xs=["st"];function Cs(n,e,t){return Object.assign(Wi("SyntaxError",n),{input:e,offset:t,rawMessage:n,message:n+"\n "+e+"\n--"+new Array((t||e.length)+1).join("-")+"^"})}zo({},{SyntaxError:()=>Cs,generate:()=>Tr,parse:()=>dl,walk:()=>ul});var zs=class{constructor(n){this.str=n,this.pos=0}charCodeAt(n){return n/[a-zA-Z0-9\-]/.test(String.fromCharCode(e))?1:0)),Qs={" ":1,"&&":2,"||":3,"|":4};function nl(n){return n.substringToPos(n.findWsEnd(n.pos))}function el(n){let e=n.pos;for(;e=128||0===$s[t])break}return n.pos===e&&n.error("Expect a keyword"),n.substringToPos(e)}function tl(n){let e=n.pos;for(;e57)break}return n.pos===e&&n.error("Expect a number"),n.substringToPos(e)}function al(n){let e=n.str.indexOf("'",n.pos+1);return-1===e&&(n.pos=n.str.length,n.error("Expect an apostrophe")),n.substringToPos(e+1)}function ol(n){let e=null,t=null;return n.eat(Js),e=tl(n),n.charCode()===Fs?(n.pos++,n.charCode()!==Zs&&(t=tl(n))):t=e,n.eat(Zs),{min:Number(e),max:t?Number(t):0}}function il(n,e){let t=function(n){let e=null,t=!1;switch(n.charCode()){case Ps:n.pos++,e={min:0,max:0};break;case _s:n.pos++,e={min:1,max:0};break;case Gs:n.pos++,e={min:0,max:1};break;case Ds:n.pos++,t=!0,n.charCode()===Js?e=ol(n):n.charCode()===Gs?(n.pos++,e={min:0,max:0}):e={min:1,max:0};break;case Js:e=ol(n);break;default:return null}return{type:"Multiplier",comma:t,min:e.min,max:e.max,term:null}}(n);return null!==t?(t.term=e,n.charCode()===Ds&&n.charCodeAt(n.pos-1)===_s?il(n,t):t):e}function rl(n){let e=n.peek();return""===e?null:{type:"Token",value:e}}function sl(n){let e,t=null;return n.eat(Hs),e=el(n),n.charCode()===Ns&&n.nextCharCode()===Os&&(n.pos+=2,e+="()"),n.charCodeAt(n.findWsEnd(n.pos))===Vs&&(nl(n),t=function(n){let e=null,t=null,a=1;return n.eat(Vs),n.charCode()===qs&&(n.peek(),a=-1),-1==a&&n.charCode()===Xs?n.peek():(e=a*Number(tl(n)),0!==$s[n.charCode()]&&(e+=el(n))),nl(n),n.eat(Fs),nl(n),n.charCode()===Xs?n.peek():(a=1,n.charCode()===qs&&(n.peek(),a=-1),t=a*Number(tl(n)),0!==$s[n.charCode()]&&(t+=el(n))),n.eat(Ks),{type:"Range",min:e,max:t}}(n)),n.eat(Us),il(n,{type:"Type",name:e,opts:t})}function ll(n,e){function t(n,e){return{type:"Group",terms:n,combinator:e,disallowEmpty:!1,explicit:!1}}let a;for(e=Object.keys(e).sort(((n,e)=>Qs[n]-Qs[e]));e.length>0;){a=e.shift();let o=0,i=0;for(;o1&&(n.splice(i,o-i,t(n.slice(i,o),a)),o=i+1),i=-1))}-1!==i&&e.length&&n.splice(i,o-i,t(n.slice(i,o),a))}return a}function cl(n){let e,t=[],a={},o=null,i=n.pos;for(;e=ml(n);)"Spaces"!==e.type&&("Combinator"===e.type?((null===o||"Combinator"===o.type)&&(n.pos=i,n.error("Unexpected combinator")),a[e.value]=!0):null!==o&&"Combinator"!==o.type&&(a[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(e),o=e,i=n.pos);return null!==o&&"Combinator"===o.type&&(n.pos-=i,n.error("Unexpected combinator")),{type:"Group",terms:t,combinator:ll(t,a)||" ",disallowEmpty:!1,explicit:!1}}function ml(n){let e=n.charCode();if(e<128&&1===$s[e])return function(n){let e=el(n);return n.charCode()===Ns?(n.pos++,{type:"Function",name:e}):il(n,{type:"Keyword",name:e})}(n);switch(e){case Ks:break;case Vs:return il(n,function(n){let e;return n.eat(Vs),e=cl(n),n.eat(Ks),e.explicit=!0,n.charCode()===Es&&(n.pos++,e.disallowEmpty=!0),e}(n));case Hs:return n.nextCharCode()===Bs?function(n){let e;return n.eat(Hs),n.eat(Bs),e=el(n),n.eat(Bs),n.eat(Us),il(n,{type:"Property",name:e})}(n):sl(n);case Ys:return{type:"Combinator",value:n.substringToPos(n.pos+(n.nextCharCode()===Ys?2:1))};case Ms:return n.pos++,n.eat(Ms),{type:"Combinator",value:"&&"};case Fs:return n.pos++,{type:"Comma"};case Bs:return il(n,{type:"String",value:al(n)});case Rs:case Ls:case As:case Ts:case Is:return{type:"Spaces",value:nl(n)};case Ws:return e=n.nextCharCode(),e<128&&1===$s[e]?(n.pos++,{type:"AtKeyword",name:el(n)}):rl(n);case Ps:case _s:case Gs:case Ds:case Es:break;case Js:if(e=n.nextCharCode(),e<48||e>57)return rl(n);break;default:return rl(n)}}function dl(n){let e=new zs(n),t=cl(e);return e.pos!==n.length&&e.error("Unexpected input"),1===t.terms.length&&"Group"===t.terms[0].type?t.terms[0]:t}var hl=function(){};function pl(n){return"function"==typeof n?n:hl}function ul(n,e,t){let a=hl,o=hl;if("function"==typeof e?a=e:e&&(a=pl(e.enter),o=pl(e.leave)),a===hl&&o===hl)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function n(e){switch(a.call(t,e),e.type){case"Group":e.terms.forEach(n);break;case"Multiplier":n(e.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: "+e.type)}o.call(t,e)}(n)}var gl={decorator(n){let e=[],t=null;return{...n,node(e){let a=t;t=e,n.node.call(this,e),t=a},emit(n,a,o){e.push({type:a,value:n,node:o?null:t})},result:()=>e}}};function wl(n,e){return"string"==typeof n?function(n){let e=[];return Hi(n,((t,a,o)=>e.push({type:t,value:n.slice(a,o),node:null}))),e}(n):e.generate(n,gl)}var bl={type:"Match"},fl={type:"Mismatch"},kl={type:"DisallowEmpty"},yl=40,vl=41;function jl(n,e,t){return e===bl&&t===fl||n===bl&&e===bl&&t===bl?n:("If"===n.type&&n.else===fl&&e===bl&&(e=n.then,n=n.match),{type:"If",match:n,then:e,else:t})}function Sl(n){return n.length>2&&n.charCodeAt(n.length-2)===yl&&n.charCodeAt(n.length-1)===vl}function xl(n){return"Keyword"===n.type||"AtKeyword"===n.type||"Function"===n.type||"Type"===n.type&&Sl(n.name)}function Cl(n,e,t){switch(n){case" ":{let n=bl;for(let t=e.length-1;t>=0;t--){n=jl(e[t],n,fl)}return n}case"|":{let n=fl,t=null;for(let a=e.length-1;a>=0;a--){let o=e[a];if(xl(o)&&(null===t&&a>0&&xl(e[a-1])&&(t=Object.create(null),n=jl({type:"Enum",map:t},bl,n)),null!==t)){let n=(Sl(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(n in t)){t[n]=o;continue}}t=null,n=jl(o,bl,n)}return n}case"&&":{if(e.length>5)return{type:"MatchOnce",terms:e,all:!0};let t=fl;for(let a=e.length-1;a>=0;a--){let o,i=e[a];o=e.length>1?Cl(n,e.filter((function(n){return n!==i})),!1):bl,t=jl(i,o,t)}return t}case"||":{if(e.length>5)return{type:"MatchOnce",terms:e,all:!1};let a=t?bl:fl;for(let t=e.length-1;t>=0;t--){let o,i=e[t];o=e.length>1?Cl(n,e.filter((function(n){return n!==i})),!0):bl,a=jl(i,o,a)}return a}}}function zl(n){if("function"==typeof n)return{type:"Generic",fn:n};switch(n.type){case"Group":{let e=Cl(n.combinator,n.terms.map(zl),!1);return n.disallowEmpty&&(e=jl(e,kl,fl)),e}case"Multiplier":return function(n){let e=bl,t=zl(n.term);if(0===n.max)t=jl(t,kl,fl),e=jl(t,null,fl),e.then=jl(bl,bl,e),n.comma&&(e.then.else=jl({type:"Comma",syntax:n},e,fl));else for(let a=n.min||1;a<=n.max;a++)n.comma&&e!==bl&&(e=jl({type:"Comma",syntax:n},e,fl)),e=jl(t,jl(bl,bl,e),fl);if(0===n.min)e=jl(bl,bl,e);else for(let a=0;a=65&&o<=90&&(o|=32),o!==a)return!1}return!0}function Pl(n){return null===n||(18===n.type||2===n.type||21===n.type||19===n.type||23===n.type||function(n){return 9===n.type&&"?"!==n.value}(n))}function _l(n){return null===n||(22===n.type||20===n.type||24===n.type||9===n.type&&"/"===n.value)}function Fl(n,e,t){let a=function(n,e,t){function a(){do{b++,w=bf&&(f=b)}function c(){k=k.type===Rl?k.prev:{type:El,syntax:m.syntax,token:k.token,prev:k},m=m.prev}let m=null,d=null,h=null,p=null,u=0,g=null,w=null,b=-1,f=0,k={type:Il,syntax:null,token:null,prev:null};for(a();null===g&&++uh.tokenIndex)&&(h=p,p=!1);else if(null===h){g=Ml;break}e=h.nextState,d=h.thenStack,m=h.syntaxStack,k=h.matchStack,b=h.tokenIndex,w=bb){for(;b":"<'"+e.name+"'>"));if(!1!==p&&null!==w&&"Type"===e.type&&("custom-ident"===e.name&&1===w.type||"length"===e.name&&"0"===w.value)){null===p&&(p=i(e,h)),e=fl;break}m={syntax:e.syntax,opts:e.syntax.opts||null!==m&&m.opts||null,prev:m},k={type:Rl,syntax:e.syntax,token:k.token,prev:k},e=a.match;break}case"Keyword":{let n=e.name;if(null!==w){let t=w.value;if(-1!==t.indexOf("\\")&&(t=t.replace(/\\[09].*$/,"")),Ol(t,n)){l(),e=bl;break}}e=fl;break}case"AtKeyword":case"Function":if(null!==w&&Ol(w.value,e.name)){l(),e=bl;break}e=fl;break;case"Token":if(null!==w&&w.value===e.value){l(),e=bl;break}e=fl;break;case"Comma":null!==w&&18===w.type?Pl(k.token)?e=fl:(l(),e=_l(w)?fl:bl):e=Pl(k.token)||_l(w)?bl:fl;break;case"String":let a="",u=b;for(;u"Type"===n.type&&n.name===e))}function Gl(n,e){return Vl(this,n,(n=>"Property"===n.type&&n.name===e))}function Wl(n){return Vl(this,n,(n=>"Keyword"===n.type))}function Vl(n,e,t){let a=Hl.call(n,e);return null!==a&&a.some(t)}function Kl(n){return"node"in n?n.node:Kl(n.match[0])}function Jl(n){return"node"in n?n.node:Jl(n.match[n.match.length-1])}function Yl(n,e,t,a,o){let i=[];return null!==t.matched&&function t(r){if(null!==r.syntax&&r.syntax.type===a&&r.syntax.name===o){let t=Kl(r),a=Jl(r);n.syntax.walk(e,(function(n,e,o){if(n===t){let n=new Gi;do{if(n.appendData(e.data),e.data===a)break;e=e.next}while(null!==e);i.push({parent:o,nodes:n})}}))}Array.isArray(r.match)&&r.match.forEach(t)}(t.matched),i}zo(ql,{getTrace:()=>Hl,isKeyword:()=>Wl,isProperty:()=>Gl,isType:()=>Ul});var{hasOwnProperty:Zl}=Object.prototype;function Xl(n){return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n&&n>=0}function $l(n){return Boolean(n)&&Xl(n.offset)&&Xl(n.line)&&Xl(n.column)}function Ql(n,e){return function(t,a){if(!t||t.constructor!==Object)return a(t,"Type of node should be an Object");for(let o in t){let i=!0;if(!1!==Zl.call(t,o)){if("type"===o)t.type!==n&&a(t,"Wrong node type `"+t.type+"`, expected `"+n+"`");else if("loc"===o){if(null===t.loc)continue;if(t.loc&&t.loc.constructor===Object)if("string"!=typeof t.loc.source)o+=".source";else if($l(t.loc.start)){if($l(t.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(e.hasOwnProperty(o)){i=!1;for(let n=0;!i&&n");else{if(!Array.isArray(a))throw new Error("Wrong value `"+a+"` in `"+n+"."+e+"` structure definition");i.push("List")}}o[e]=i.join(" | ")}return{docs:o,check:Ql(n,a)}}var ec=Ll(Ur.join(" | "));function tc(n,e,t){let a={};for(let o in n)n[o].syntax&&(a[o]=t?n[o].syntax:Tr(n[o].syntax,{compact:e}));return a}function ac(n,e,t){let a={};for(let[o,i]of Object.entries(n))a[o]={prelude:i.prelude&&(t?i.prelude.syntax:Tr(i.prelude.syntax,{compact:e})),descriptors:i.descriptors&&tc(i.descriptors,e,t)};return a}function oc(n,e,t){return{matched:n,iterations:t,error:e,...ql}}function ic(n,e,t,a){let o,i=wl(t,n.syntax);return function(n){for(let e=0;e(Object.defineProperty(i,"syntax",{value:dl(n)}),i.syntax)}):i.syntax=n,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:Ll(i.syntax,o)}),i.match)})),i}addAtrule_(n,e){!e||(this.atrules[n]={type:"Atrule",name:n,prelude:e.prelude?this.createDescriptor(e.prelude,"AtrulePrelude",n):null,descriptors:e.descriptors?Object.keys(e.descriptors).reduce(((t,a)=>(t[a]=this.createDescriptor(e.descriptors[a],"AtruleDescriptor",a,n),t)),Object.create(null)):null})}addProperty_(n,e){!e||(this.properties[n]=this.createDescriptor(e,"Property",n))}addType_(n,e){!e||(this.types[n]=this.createDescriptor(e,"Type",n))}checkAtruleName(n){if(!this.getAtrule(n))return new Mr("Unknown at-rule","@"+n)}checkAtrulePrelude(n,e){let t=this.checkAtruleName(n);if(t)return t;let a=this.getAtrule(n);return!a.prelude&&e?new SyntaxError("At-rule `@"+n+"` should not contain a prelude"):!a.prelude||e||ic(this,a.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+n+"` should contain a prelude")}checkAtruleDescriptorName(n,e){let t=this.checkAtruleName(n);if(t)return t;let a=this.getAtrule(n),o=_r(e);return a.descriptors?a.descriptors[o.name]||a.descriptors[o.basename]?void 0:new Mr("Unknown at-rule descriptor",e):new SyntaxError("At-rule `@"+n+"` has no known descriptors")}checkPropertyName(n){if(!this.getProperty(n))return new Mr("Unknown property",n)}matchAtrulePrelude(n,e){let t=this.checkAtrulePrelude(n,e);if(t)return oc(null,t);let a=this.getAtrule(n);return a.prelude?ic(this,a.prelude,e||"",!1):oc(null,null)}matchAtruleDescriptor(n,e,t){let a=this.checkAtruleDescriptorName(n,e);if(a)return oc(null,a);let o=this.getAtrule(n),i=_r(e);return ic(this,o.descriptors[i.name]||o.descriptors[i.basename],t,!1)}matchDeclaration(n){return"Declaration"!==n.type?oc(null,new Error("Not a Declaration node")):this.matchProperty(n.property,n.value)}matchProperty(n,e){if(Fr(n).custom)return oc(null,new Error("Lexer matching doesn't applicable for custom properties"));let t=this.checkPropertyName(n);return t?oc(null,t):ic(this,this.getProperty(n),e,!0)}matchType(n,e){let t=this.getType(n);return t?ic(this,t,e,!1):oc(null,new Mr("Unknown type",n))}match(n,e){return"string"==typeof n||n&&n.type?(("string"==typeof n||!n.match)&&(n=this.createDescriptor(n,"Type","anonymous")),ic(this,n,e,!1)):oc(null,new Mr("Bad syntax"))}findValueFragments(n,e,t,a){return Yl(this,e,this.matchProperty(n,e),t,a)}findDeclarationValueFragments(n,e,t){return Yl(this,n.value,this.matchDeclaration(n),e,t)}findAllFragments(n,e,t){let a=[];return this.syntax.walk(n,{visit:"Declaration",enter:n=>{a.push.apply(a,this.findDeclarationValueFragments(n,e,t))}}),a}getAtrule(n,e=!0){let t=_r(n);return(t.vendor&&e?this.atrules[t.name]||this.atrules[t.basename]:this.atrules[t.name])||null}getAtrulePrelude(n,e=!0){let t=this.getAtrule(n,e);return t&&t.prelude||null}getAtruleDescriptor(n,e){return this.atrules.hasOwnProperty(n)&&this.atrules.declarators&&this.atrules[n].declarators[e]||null}getProperty(n,e=!0){let t=Fr(n);return(t.vendor&&e?this.properties[t.name]||this.properties[t.basename]:this.properties[t.name])||null}getType(n){return hasOwnProperty.call(this.types,n)?this.types[n]:null}validate(){function n(a,o,i,r){if(i.has(o))return i.get(o);i.set(o,!1),null!==r.syntax&&ul(r.syntax,(function(r){if("Type"!==r.type&&"Property"!==r.type)return;let s="Type"===r.type?a.types:a.properties,l="Type"===r.type?e:t;(!hasOwnProperty.call(s,r.name)||n(a,r.name,l,s[r.name]))&&i.set(o,!0)}),this)}let e=new Map,t=new Map;for(let t in this.types)n(this,t,e,this.types[t]);for(let e in this.properties)n(this,e,t,this.properties[e]);return e=[...e.keys()].filter((n=>e.get(n))),t=[...t.keys()].filter((n=>t.get(n))),e.length||t.length?{types:e,properties:t}:null}dump(n,e){return{generic:this.generic,units:this.units,types:tc(this.types,!e,n),properties:tc(this.properties,!e,n),atrules:ac(this.atrules,!e,n)}}toString(){return JSON.stringify(this.dump())}};function sc(n,e){return"string"==typeof e&&/^\s*\|/.test(e)?"string"==typeof n?n+e:e.replace(/^\s*\|\s*/,""):e||null}function lc(n,e){let t=Object.create(null);for(let[a,o]of Object.entries(n))if(o){t[a]={};for(let n of Object.keys(o))e.includes(n)&&(t[a][n]=o[n])}return t}function cc(n,e){let t={...n};for(let[a,o]of Object.entries(e))switch(a){case"generic":t[a]=Boolean(o);break;case"units":t[a]={...n[a]};for(let[n,e]of Object.entries(o))t[a][n]=Array.isArray(e)?e:[];break;case"atrules":t[a]={...n[a]};for(let[n,e]of Object.entries(o)){let o=t[a][n]||{},i=t[a][n]={prelude:o.prelude||null,descriptors:{...o.descriptors}};if(e){i.prelude=e.prelude?sc(i.prelude,e.prelude):i.prelude||null;for(let[n,t]of Object.entries(e.descriptors||{}))i.descriptors[n]=t?sc(i.descriptors[n],t):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case"types":case"properties":t[a]={...n[a]};for(let[n,e]of Object.entries(o))t[a][n]=sc(t[a][n],e);break;case"scope":t[a]={...n[a]};for(let[n,e]of Object.entries(o))t[a][n]={...t[a][n],...e};break;case"parseContext":t[a]={...n[a],...o};break;case"atrule":case"pseudo":t[a]={...n[a],...lc(o,["parse"])};break;case"node":t[a]={...n[a],...lc(o,["name","structure","parse","generate","walkContext"])}}return t}function mc(n){let e=rr(n),t=Lr(n),a=kr(n),{fromPlainObject:o,toPlainObject:i}=function(n){return{fromPlainObject:e=>(n(e,{enter(n){n.children&&!(n.children instanceof Gi)&&(n.children=(new Gi).fromArray(n.children))}}),e),toPlainObject:e=>(n(e,{leave(n){n.children&&n.children instanceof Gi&&(n.children=n.children.toArray())}}),e)}}(t),r={lexer:null,createLexer:n=>new rc(n,r,r.lexer.structure),tokenize:Hi,parse:e,generate:a,walk:t,find:t.find,findLast:t.findLast,findAll:t.findAll,fromPlainObject:o,toPlainObject:i,fork(e){let t=cc({},n);return mc("function"==typeof e?e(t,Object.assign):cc(t,e))}};return r.lexer=new rc({generic:!0,units:n.units,types:n.types,atrules:n.atrules,properties:n.properties,node:n.node},r),r}var dc={};zo(dc,{AnPlusB:()=>hc,Atrule:()=>zc,AtrulePrelude:()=>Mc,AttributeSelector:()=>Fc,Block:()=>Qc,Brackets:()=>mm,CDC:()=>gm,CDO:()=>ym,ClassSelector:()=>Cm,Combinator:()=>Rm,Comment:()=>Fm,Declaration:()=>Km,DeclarationList:()=>dd,Dimension:()=>fd,Function:()=>Sd,Hash:()=>Id,IdSelector:()=>Fd,Identifier:()=>Bd,MediaFeature:()=>Wd,MediaQuery:()=>Zd,MediaQueryList:()=>eh,NestingSelector:()=>rh,Nth:()=>hh,Number:()=>bh,Operator:()=>jh,Parentheses:()=>Lh,Percentage:()=>Eh,PseudoClassSelector:()=>Oh,PseudoElementSelector:()=>Uh,Ratio:()=>Yh,Raw:()=>ap,Rule:()=>cp,Selector:()=>bp,SelectorList:()=>jp,String:()=>Ap,StyleSheet:()=>Pp,TypeSelector:()=>Vp,UnicodeRange:()=>nu,Url:()=>hu,Value:()=>Cu,WhiteSpace:()=>Tu});var hc={};zo(hc,{generate:()=>Cc,name:()=>jc,parse:()=>xc,structure:()=>Sc});var pc=43,uc=45,gc=110,wc=!0,bc=!1;function fc(n,e){let t=this.tokenStart+n,a=this.charCodeAt(t);for((a===pc||a===uc)&&(e&&this.error("Number sign is not allowed"),t++);t0&&this.skip(n),0===e&&(t=this.charCodeAt(this.tokenStart),t!==pc&&t!==uc&&this.error("Number sign is expected")),kc.call(this,0!==e),e===uc?"-"+this.consume(10):this.consume(10)}var jc="AnPlusB",Sc={a:[String,null],b:[String,null]};function xc(){let n=this.tokenStart,e=null,t=null;if(10===this.tokenType)kc.call(this,bc),t=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,uc))switch(e="-1",yc.call(this,1,gc),this.tokenEnd-this.tokenStart){case 2:this.next(),t=vc.call(this);break;case 3:yc.call(this,2,uc),this.next(),this.skipSC(),kc.call(this,wc),t="-"+this.consume(10);break;default:yc.call(this,2,uc),fc.call(this,3,wc),this.next(),t=this.substrToCursor(n+2)}else if(1===this.tokenType||this.isDelim(pc)&&1===this.lookupType(1)){let a=0;switch(e="1",this.isDelim(pc)&&(a=1,this.next()),yc.call(this,0,gc),this.tokenEnd-this.tokenStart){case 1:this.next(),t=vc.call(this);break;case 2:yc.call(this,1,uc),this.next(),this.skipSC(),kc.call(this,wc),t="-"+this.consume(10);break;default:yc.call(this,1,uc),fc.call(this,2,wc),this.next(),t=this.substrToCursor(n+a+1)}}else if(12===this.tokenType){let a=this.charCodeAt(this.tokenStart),o=a===pc||a===uc,i=this.tokenStart+o;for(;iDc,name:()=>Ic,parse:()=>Ec,structure:()=>Rc,walkContext:()=>Tc});var Ic="Atrule",Tc="atrule",Rc={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Ec(n=!1){let e,t,a=this.tokenStart,o=null,i=null;switch(this.eat(3),e=this.substrToCursor(a+1),t=e.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(o=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,e,n),Lc):Lc.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:i=hasOwnProperty.call(this.atrule,t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this,n):this.Block(Ac.call(this))}return{type:"Atrule",loc:this.getLocation(a,this.tokenStart),name:e,prelude:o,block:i}}function Dc(n){this.token(3,"@"+n.name),null!==n.prelude&&this.node(n.prelude),n.block?this.node(n.block):this.token(17,";")}var Mc={};zo(Mc,{generate:()=>_c,name:()=>Bc,parse:()=>Pc,structure:()=>Oc,walkContext:()=>Nc});var Bc="AtrulePrelude",Nc="atrulePrelude",Oc={children:[[]]};function Pc(n){let e=null;return null!==n&&(n=n.toLowerCase()),this.skipSC(),e=hasOwnProperty.call(this.atrule,n)&&"function"==typeof this.atrule[n].prelude?this.atrule[n].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(e),children:e}}function _c(n){this.children(n)}var Fc={};zo(Fc,{generate:()=>$c,name:()=>Yc,parse:()=>Xc,structure:()=>Zc});var qc=36,Hc=42,Uc=61,Gc=94,Wc=124,Vc=126;function Kc(){this.eof&&this.error("Unexpected end of input");let n=this.tokenStart,e=!1;return this.isDelim(Hc)?(e=!0,this.next()):this.isDelim(Wc)||this.eat(1),this.isDelim(Wc)?this.charCodeAt(this.tokenStart+1)!==Uc?(this.next(),this.eat(1)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(n,this.tokenStart),name:this.substrToCursor(n)}}function Jc(){let n=this.tokenStart,e=this.charCodeAt(n);return e!==Uc&&e!==Vc&&e!==Gc&&e!==qc&&e!==Hc&&e!==Wc&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==Uc&&(this.isDelim(Uc)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(n)}var Yc="AttributeSelector",Zc={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Xc(){let n,e=this.tokenStart,t=null,a=null,o=null;return this.eat(19),this.skipSC(),n=Kc.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(t=Jc.call(this),this.skipSC(),a=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:n,matcher:t,value:a,flags:o}}function $c(n){this.token(9,"["),this.node(n.name),null!==n.matcher&&(this.tokenize(n.matcher),this.node(n.value)),null!==n.flags&&this.token(1,n.flags),this.token(9,"]")}var Qc={};zo(Qc,{generate:()=>cm,name:()=>im,parse:()=>lm,structure:()=>sm,walkContext:()=>rm});var nm=38;function em(n){return this.Raw(n,null,!0)}function tm(){return this.parseWithFallback(this.Rule,em)}function am(n){return this.Raw(n,this.consumeUntilSemicolonIncluded,!0)}function om(){if(17===this.tokenType)return am.call(this,this.tokenIndex);let n=this.parseWithFallback(this.Declaration,am);return 17===this.tokenType&&this.next(),n}var im="Block",rm="block",sm={children:[["Atrule","Rule","Declaration"]]};function lm(n){let e=n?om:tm,t=this.tokenStart,a=this.createList();this.eat(23);n:for(;!this.eof;)switch(this.tokenType){case 24:break n;case 13:case 25:this.next();break;case 3:a.push(this.parseWithFallback(this.Atrule.bind(this,n),em));break;default:n&&this.isDelim(nm)?a.push(tm.call(this)):a.push(e.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(t,this.tokenStart),children:a}}function cm(n){this.token(23,"{"),this.children(n,(n=>{"Declaration"===n.type&&this.token(17,";")})),this.token(24,"}")}var mm={};zo(mm,{generate:()=>um,name:()=>dm,parse:()=>pm,structure:()=>hm});var dm="Brackets",hm={children:[[]]};function pm(n,e){let t=this.tokenStart,a=null;return this.eat(19),a=n.call(this,e),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(t,this.tokenStart),children:a}}function um(n){this.token(9,"["),this.children(n),this.token(9,"]")}var gm={};zo(gm,{generate:()=>km,name:()=>wm,parse:()=>fm,structure:()=>bm});var wm="CDC",bm=[];function fm(){let n=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(n,this.tokenStart)}}function km(){this.token(15,"--\x3e")}var ym={};zo(ym,{generate:()=>xm,name:()=>vm,parse:()=>Sm,structure:()=>jm});var vm="CDO",jm=[];function Sm(){let n=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(n,this.tokenStart)}}function xm(){this.token(14,"\x3c!--")}var Cm={};zo(Cm,{generate:()=>Tm,name:()=>Lm,parse:()=>Im,structure:()=>Am});var zm=46,Lm="ClassSelector",Am={name:String};function Im(){return this.eatDelim(zm),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Tm(n){this.token(9,"."),this.token(1,n.name)}var Rm={};zo(Rm,{generate:()=>_m,name:()=>Nm,parse:()=>Pm,structure:()=>Om});var Em=43,Dm=47,Mm=62,Bm=126,Nm="Combinator",Om={name:String};function Pm(){let n,e=this.tokenStart;switch(this.tokenType){case 13:n=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case Mm:case Em:case Bm:this.next();break;case Dm:this.next(),this.eatIdent("deep"),this.eatDelim(Dm);break;default:this.error("Combinator is expected")}n=this.substrToCursor(e)}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:n}}function _m(n){this.tokenize(n.name)}var Fm={};zo(Fm,{generate:()=>Vm,name:()=>Um,parse:()=>Wm,structure:()=>Gm});var qm=42,Hm=47,Um="Comment",Gm={value:String};function Wm(){let n=this.tokenStart,e=this.tokenEnd;return this.eat(25),e-n+2>=2&&this.charCodeAt(e-2)===qm&&this.charCodeAt(e-1)===Hm&&(e-=2),{type:"Comment",loc:this.getLocation(n,this.tokenStart),value:this.substring(n+2,e)}}function Vm(n){this.token(25,"/*"+n.value+"*/")}var Km={};zo(Km,{generate:()=>ld,name:()=>od,parse:()=>sd,structure:()=>rd,walkContext:()=>id});var Jm=33,Ym=35,Zm=36,Xm=38,$m=42,Qm=43,nd=47;function ed(n){return this.Raw(n,this.consumeUntilExclamationMarkOrSemicolon,!0)}function td(n){return this.Raw(n,this.consumeUntilExclamationMarkOrSemicolon,!1)}function ad(){let n=this.tokenIndex,e=this.Value();return"Raw"!==e.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(Jm)&&!1===this.isBalanceEdge(n)&&this.error(),e}var od="Declaration",id="declaration",rd={important:[Boolean,String],property:String,value:["Value","Raw"]};function sd(){let n,e=this.tokenStart,t=this.tokenIndex,a=cd.call(this),o=qr(a),i=o?this.parseCustomProperty:this.parseValue,r=o?td:ed,s=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),n=i?this.parseWithFallback(ad,r):r.call(this,this.tokenIndex),o&&"Value"===n.type&&n.children.isEmpty)for(let e=l-this.tokenIndex;e<=0;e++)if(13===this.lookupType(e)){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(Jm)&&(s=md.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(t)&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:a,value:n}}function ld(n){this.token(1,n.property),this.token(16,":"),this.node(n.value),n.important&&(this.token(9,"!"),this.token(1,!0===n.important?"important":n.important))}function cd(){let n=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case $m:case Zm:case Qm:case Ym:case Xm:this.next();break;case nd:this.next(),this.isDelim(nd)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(n)}function md(){this.eat(9),this.skipSC();let n=this.consume(1);return"important"===n||n}var dd={};zo(dd,{generate:()=>bd,name:()=>ud,parse:()=>wd,structure:()=>gd});var hd=38;function pd(n){return this.Raw(n,this.consumeUntilSemicolonIncluded,!0)}var ud="DeclarationList",gd={children:[["Declaration","Atrule","Rule"]]};function wd(){let n=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule.bind(this,!0),pd));break;default:this.isDelim(hd)?n.push(this.parseWithFallback(this.Rule,pd)):n.push(this.parseWithFallback(this.Declaration,pd))}return{type:"DeclarationList",loc:this.getLocationFromList(n),children:n}}function bd(n){this.children(n,(n=>{"Declaration"===n.type&&this.token(17,";")}))}var fd={};zo(fd,{generate:()=>jd,name:()=>kd,parse:()=>vd,structure:()=>yd});var kd="Dimension",yd={value:String,unit:String};function vd(){let n=this.tokenStart,e=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(n,this.tokenStart),value:e,unit:this.substring(n+e.length,this.tokenStart)}}function jd(n){this.token(12,n.value+n.unit)}var Sd={};zo(Sd,{generate:()=>Ad,name:()=>xd,parse:()=>Ld,structure:()=>zd,walkContext:()=>Cd});var xd="Function",Cd="function",zd={name:String,children:[[]]};function Ld(n,e){let t,a=this.tokenStart,o=this.consumeFunctionName(),i=o.toLowerCase();return t=e.hasOwnProperty(i)?e[i].call(this,e):n.call(this,e),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(a,this.tokenStart),name:o,children:t}}function Ad(n){this.token(2,n.name+"("),this.children(n),this.token(22,")")}var Id={};zo(Id,{generate:()=>Md,name:()=>Rd,parse:()=>Dd,structure:()=>Ed,xxx:()=>Td});var Td="XXX",Rd="Hash",Ed={value:String};function Dd(){let n=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(n,this.tokenStart),value:this.substrToCursor(n+1)}}function Md(n){this.token(4,"#"+n.value)}var Bd={};zo(Bd,{generate:()=>_d,name:()=>Nd,parse:()=>Pd,structure:()=>Od});var Nd="Identifier",Od={name:String};function Pd(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function _d(n){this.token(1,n.name)}var Fd={};zo(Fd,{generate:()=>Gd,name:()=>qd,parse:()=>Ud,structure:()=>Hd});var qd="IdSelector",Hd={name:String};function Ud(){let n=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(n,this.tokenStart),name:this.substrToCursor(n+1)}}function Gd(n){this.token(9,"#"+n.name)}var Wd={};zo(Wd,{generate:()=>Yd,name:()=>Vd,parse:()=>Jd,structure:()=>Kd});var Vd="MediaFeature",Kd={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function Jd(){let n,e=this.tokenStart,t=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:t=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:t=this.Dimension();break;case 1:t=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:n,value:t}}function Yd(n){this.token(21,"("),this.token(1,n.name),null!==n.value&&(this.token(16,":"),this.node(n.value)),this.token(22,")")}var Zd={};zo(Zd,{generate:()=>nh,name:()=>Xd,parse:()=>Qd,structure:()=>$d});var Xd="MediaQuery",$d={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Qd(){let n=this.createList(),e=null;this.skipSC();n:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:e=this.Identifier();break;case 21:e=this.MediaFeature();break;default:break n}n.push(e)}return null===e&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(n),children:n}}function nh(n){this.children(n)}var eh={};zo(eh,{generate:()=>ih,name:()=>th,parse:()=>oh,structure:()=>ah});var th="MediaQueryList",ah={children:[["MediaQuery"]]};function oh(){let n=this.createList();for(this.skipSC();!this.eof&&(n.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(n),children:n}}function ih(n){this.children(n,(()=>this.token(18,",")))}var rh={};zo(rh,{generate:()=>dh,name:()=>lh,parse:()=>mh,structure:()=>ch});var sh=38,lh="NestingSelector",ch={};function mh(){let n=this.tokenStart;return this.eatDelim(sh),{type:"NestingSelector",loc:this.getLocation(n,this.tokenStart)}}function dh(){this.token(9,"&")}var hh={};zo(hh,{generate:()=>wh,name:()=>ph,parse:()=>gh,structure:()=>uh});var ph="Nth",uh={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function gh(){this.skipSC();let n,e=this.tokenStart,t=e,a=null;return n=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),a=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:n,selector:a}}function wh(n){this.node(n.nth),null!==n.selector&&(this.token(1,"of"),this.node(n.selector))}var bh={};zo(bh,{generate:()=>vh,name:()=>fh,parse:()=>yh,structure:()=>kh});var fh="Number",kh={value:String};function yh(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function vh(n){this.token(10,n.value)}var jh={};zo(jh,{generate:()=>zh,name:()=>Sh,parse:()=>Ch,structure:()=>xh});var Sh="Operator",xh={value:String};function Ch(){let n=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(n,this.tokenStart),value:this.substrToCursor(n)}}function zh(n){this.tokenize(n.value)}var Lh={};zo(Lh,{generate:()=>Rh,name:()=>Ah,parse:()=>Th,structure:()=>Ih});var Ah="Parentheses",Ih={children:[[]]};function Th(n,e){let t=this.tokenStart,a=null;return this.eat(21),a=n.call(this,e),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(t,this.tokenStart),children:a}}function Rh(n){this.token(21,"("),this.children(n),this.token(22,")")}var Eh={};zo(Eh,{generate:()=>Nh,name:()=>Dh,parse:()=>Bh,structure:()=>Mh});var Dh="Percentage",Mh={value:String};function Bh(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Nh(n){this.token(11,n.value+"%")}var Oh={};zo(Oh,{generate:()=>Hh,name:()=>Ph,parse:()=>qh,structure:()=>Fh,walkContext:()=>_h});var Ph="PseudoClassSelector",_h="function",Fh={name:String,children:[["Raw"],null]};function qh(){let n,e,t=this.tokenStart,a=null;return this.eat(16),2===this.tokenType?(n=this.consumeFunctionName(),e=n.toLowerCase(),22==this.lookupNonWSType(0)?a=this.createList():hasOwnProperty.call(this.pseudo,e)?(this.skipSC(),a=this.pseudo[e].call(this),this.skipSC()):(a=this.createList(),a.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:a}}function Hh(n){this.token(16,":"),null===n.children?this.token(1,n.name):(this.token(2,n.name+"("),this.children(n),this.token(22,")"))}var Uh={};zo(Uh,{generate:()=>Jh,name:()=>Gh,parse:()=>Kh,structure:()=>Vh,walkContext:()=>Wh});var Gh="PseudoElementSelector",Wh="function",Vh={name:String,children:[["Raw"],null]};function Kh(){let n,e,t=this.tokenStart,a=null;return this.eat(16),this.eat(16),2===this.tokenType?(n=this.consumeFunctionName(),e=n.toLowerCase(),22==this.lookupNonWSType(0)?a=this.createList():hasOwnProperty.call(this.pseudo,e)?(this.skipSC(),a=this.pseudo[e].call(this),this.skipSC()):(a=this.createList(),a.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:a}}function Jh(n){this.token(16,":"),this.token(16,":"),null===n.children?this.token(1,n.name):(this.token(2,n.name+"("),this.children(n),this.token(22,")"))}var Yh={};zo(Yh,{generate:()=>tp,name:()=>Qh,parse:()=>ep,structure:()=>np});var Zh=47,Xh=46;function $h(){this.skipSC();let n=this.consume(10);for(let e=0;e0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}zo(ap,{generate:()=>lp,name:()=>ip,parse:()=>sp,structure:()=>rp});var ip="Raw",rp={value:String};function sp(n,e,t){let a,o=this.getTokenStart(n);return this.skipUntilBalanced(n,e||this.consumeUntilBalanceEnd),a=t&&this.tokenStart>o?op.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,a),value:this.substring(o,a)}}function lp(n){this.tokenize(n.value)}var cp={};function mp(n){return this.Raw(n,this.consumeUntilLeftCurlyBracket,!0)}function dp(){let n=this.SelectorList();return"Raw"!==n.type&&!1===this.eof&&23!==this.tokenType&&this.error(),n}zo(cp,{generate:()=>wp,name:()=>hp,parse:()=>gp,structure:()=>up,walkContext:()=>pp});var hp="Rule",pp="rule",up={prelude:["SelectorList","Raw"],block:["Block"]};function gp(){let n,e,t=this.tokenIndex,a=this.tokenStart;return n=this.parseRulePrelude?this.parseWithFallback(dp,mp):mp.call(this,t),e=this.Block(!0),{type:"Rule",loc:this.getLocation(a,this.tokenStart),prelude:n,block:e}}function wp(n){this.node(n.prelude),this.node(n.block)}var bp={};zo(bp,{generate:()=>vp,name:()=>fp,parse:()=>yp,structure:()=>kp});var fp="Selector",kp={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function yp(){let n=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(n)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(n),children:n}}function vp(n){this.children(n)}var jp={};zo(jp,{generate:()=>Lp,name:()=>Sp,parse:()=>zp,structure:()=>Cp,walkContext:()=>xp});var Sp="SelectorList",xp="selector",Cp={children:[["Selector","Raw"]]};function zp(){let n=this.createList();for(;!this.eof&&(n.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(n),children:n}}function Lp(n){this.children(n,(()=>this.token(18,",")))}var Ap={};zo(Ap,{generate:()=>Op,name:()=>Mp,parse:()=>Np,structure:()=>Bp});zo({},{decode:()=>Ep,encode:()=>Dp});var Ip=92,Tp=34,Rp=39;function Ep(n){let e=n.length,t=n.charCodeAt(0),a=t===Tp||t===Rp?1:0,o=1===a&&e>1&&n.charCodeAt(e-1)===t?e-2:e-1,i="";for(let t=a;t<=o;t++){let a=n.charCodeAt(t);if(a===Ip){if(t===o){t!==e-1&&(i=n.substr(t+1));break}if(a=n.charCodeAt(++t),pi(Ip,a)){let e=t-1,a=Ii(n,e);t=a-1,i+=Di(n.substring(e+1,a))}else 13===a&&10===n.charCodeAt(t+1)&&t++}else i+=n[t]}return i}function Dp(n,e){let t=e?"'":'"',a=e?Rp:Tp,o="",i=!1;for(let e=0;eWp,name:()=>qp,parse:()=>Gp,structure:()=>Up,walkContext:()=>Hp});var _p=33;function Fp(n){return this.Raw(n,null,!1)}var qp="StyleSheet",Hp="stylesheet",Up={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Gp(){let n,e=this.tokenStart,t=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==_p){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,Fp);break;default:n=this.parseWithFallback(this.Rule,Fp)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function Wp(n){this.children(n)}var Vp={};zo(Vp,{generate:()=>Qp,name:()=>Zp,parse:()=>$p,structure:()=>Xp});var Kp=42,Jp=124;function Yp(){1!==this.tokenType&&!1===this.isDelim(Kp)&&this.error("Identifier or asterisk is expected"),this.next()}var Zp="TypeSelector",Xp={name:String};function $p(){let n=this.tokenStart;return this.isDelim(Jp)?(this.next(),Yp.call(this)):(Yp.call(this),this.isDelim(Jp)&&(this.next(),Yp.call(this))),{type:"TypeSelector",loc:this.getLocation(n,this.tokenStart),name:this.substrToCursor(n)}}function Qp(n){this.tokenize(n.name)}var nu={};zo(nu,{generate:()=>du,name:()=>lu,parse:()=>mu,structure:()=>cu});var eu=43,tu=45,au=63;function ou(n,e){let t=0;for(let a=this.tokenStart+n;a6&&this.error("Too many hex digits",a)}return this.next(),t}function iu(n){let e=0;for(;this.isDelim(au);)++e>n&&this.error("Too many question marks"),this.next()}function ru(n){this.charCodeAt(this.tokenStart)!==n&&this.error((n===eu?"Plus sign":"Hyphen minus")+" is expected")}function su(){let n=0;switch(this.tokenType){case 10:if(n=ou.call(this,1,!0),this.isDelim(au)){iu.call(this,6-n);break}if(12===this.tokenType||10===this.tokenType){ru.call(this,tu),ou.call(this,1,!1);break}break;case 12:n=ou.call(this,1,!0),n>0&&iu.call(this,6-n);break;default:if(this.eatDelim(eu),1===this.tokenType){n=ou.call(this,0,!0),n>0&&iu.call(this,6-n);break}if(this.isDelim(au)){this.next(),iu.call(this,5);break}this.error("Hex digit or question mark is expected")}}var lu="UnicodeRange",cu={value:String};function mu(){let n=this.tokenStart;return this.eatIdent("u"),su.call(this),{type:"UnicodeRange",loc:this.getLocation(n,this.tokenStart),value:this.substrToCursor(n)}}function du(n){this.tokenize(n.value)}var hu={};zo(hu,{generate:()=>xu,name:()=>vu,parse:()=>Su,structure:()=>ju});zo({},{decode:()=>ku,encode:()=>yu});var pu=32,uu=92,gu=34,wu=39,bu=40,fu=41;function ku(n){let e=n.length,t=4,a=n.charCodeAt(e-1)===fu?e-2:e-1,o="";for(;tIu,name:()=>zu,parse:()=>Au,structure:()=>Lu});var zu="Value",Lu={children:[[]]};function Au(){let n=this.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(n,this.tokenStart),children:e}}function Iu(n){this.children(n)}var Tu={};zo(Tu,{generate:()=>Bu,name:()=>Eu,parse:()=>Mu,structure:()=>Du});var Ru=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Eu="WhiteSpace",Du={value:String};function Mu(){return this.eat(13),Ru}function Bu(n){this.token(13,n.value)}var Nu={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":"