"let _singleFileDefine; if (typeof define !== 'undefined') { _singleFileDefine = define; define = null }!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t((e=\"undefined\"!=typeof globalThis?globalThis:e||self).singlefile={})}(this,(function(e){\"use strict\";const t=\"single-file-load-image\",r=\"single-file-image-loaded\",n=(e,t,r)=>globalThis.addEventListener(e,t,r),o=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},i=globalThis.CustomEvent,a=globalThis.document,s=globalThis.Document;let l;function c(){return Array.from(l.values())}function u(e){e.loadDeferredImagesBlockCookies&&o(new i(\"single-file-block-cookies-start\")),e.loadDeferredImagesBlockStorage&&o(new i(\"single-file-block-storage-start\")),e.loadDeferredImagesDispatchScrollEvent&&o(new i(\"single-file-dispatch-scroll-event-start\")),e.loadDeferredImagesKeepZoomLevel?o(new i(\"single-file-load-deferred-images-keep-zoom-level-start\")):o(new i(\"single-file-load-deferred-images-start\"))}function h(e){e.loadDeferredImagesBlockCookies&&o(new i(\"single-file-block-cookies-end\")),e.loadDeferredImagesBlockStorage&&o(new i(\"single-file-block-storage-end\")),e.loadDeferredImagesDispatchScrollEvent&&o(new i(\"single-file-dispatch-scroll-event-end\")),e.loadDeferredImagesKeepZoomLevel?o(new i(\"single-file-load-deferred-images-keep-zoom-level-end\")):o(new i(\"single-file-load-deferred-images-end\"))}function d(e){e.loadDeferredImagesKeepZoomLevel?o(new i(\"single-file-load-deferred-images-keep-zoom-level-reset\")):o(new i(\"single-file-load-deferred-images-reset\"))}l=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,a instanceof s&&(n(\"single-file-new-font-face\",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,l.set(JSON.stringify(r),t)})),n(\"single-file-delete-font\",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,l.delete(JSON.stringify(r))})),n(\"single-file-clear-fonts\",(()=>l=new Map)));var p=Object.freeze({__proto__:null,getFontsData:c,loadDeferredImagesStart:u,loadDeferredImagesEnd:h,loadDeferredImagesResetZoomLevel:d,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:r});const m=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",f=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+m+\"?|(\"+m+\")|.)\",\"ig\");function g(e){return e.replace(f,((e,t,r)=>{const n=\"0x\"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}))}var y=Object.freeze({__proto__:null,process:g});const b=\"single-file-on-before-capture\",k=\"single-file-on-after-capture\",v=\"data-single-file-removed-content\",w=\"data-single-file-hidden-content\",x=\"data-single-file-kept-content\",A=\"data-single-file-hidden-frame\",E=\"data-single-file-preserved-space-element\",S=\"data-single-file-shadow-root-element\",T=\"data-single-file-win-id\",C=\"data-single-file-image\",R=\"data-single-file-poster\",_=\"data-single-file-video\",I=\"data-single-file-canvas\",L=\"data-single-file-movable-style\",N=\"data-single-file-input-value\",z=\"data-single-file-lazy-loaded-src\",P=\"data-single-file-stylesheet\",M=\"data-single-file-disabled-noscript\",O=\"data-single-file-selected-content\",U=\"data-single-file-invalid-element\",D=\"data-single-file-async-script\",F=\"*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)\",q=[\"NOSCRIPT\",\"DISABLED-NOSCRIPT\",\"META\",\"LINK\",\"STYLE\",\"TITLE\",\"TEMPLATE\",\"SOURCE\",\"OBJECT\",\"SCRIPT\",\"HEAD\",\"BODY\"],j=/^'(.*?)'$/,B=/^\"(.*?)\"$/,H={regular:\"400\",normal:\"400\",bold:\"700\",bolder:\"700\",lighter:\"100\"},V=\"Page saved with SingleFile\",W=\"Archive processed by SingleFile\",$=\"single-file-ui-element\",G=\"data:,\",Y=(e,t,r)=>globalThis.addEventListener(e,t,r);function J(e){e.querySelectorAll(\"meta[http-equiv=refresh]\").forEach((e=>{e.removeAttribute(\"http-equiv\"),e.setAttribute(\"disabled-http-equiv\",\"refresh\")}))}function Q(e,t,r){e.querySelectorAll(\"noscript:not([\"+M+\"])\").forEach((e=>{e.setAttribute(M,e.textContent),e.textContent=\"\"})),J(e),e.head&&e.head.querySelectorAll(F).forEach((e=>e.hidden=!0)),e.querySelectorAll(\"svg foreignObject\").forEach((e=>{const t=e.querySelectorAll(\"html > head > \"+F+\", html > body > \"+F);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))}));const n=new Map;let o;return t&&e.documentElement?(e.querySelectorAll(\"button button, a a\").forEach((t=>{const r=e.createElement(\"template\");r.setAttribute(U,\"\"),r.content.appendChild(t.cloneNode(!0)),n.set(t,r),t.replaceWith(r)})),o=K(t,e,e.documentElement,r),r.moveStylesInHead&&e.querySelectorAll(\"body style, body ~ style\").forEach((e=>{const r=ce(t,e);r&&te(e,r)&&(e.setAttribute(L,\"\"),o.markedElements.push(e))}))):o={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],markedElements:[]},{canvases:o.canvases,fonts:c(),stylesheets:ne(e),images:o.images,posters:o.posters,videos:o.videos,usedFonts:Array.from(o.usedFonts.values()),shadowRoots:o.shadowRoots,referrer:e.referrer,markedElements:o.markedElements,invalidElements:n}}function K(e,t,r,n,o={usedFonts:new Map,canvases:[],images:[],posters:[],videos:[],shadowRoots:[],markedElements:[]},i){return Array.from(r.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((r=>{let a,s,l;if(!n.autoSaveExternalSave&&(n.removeHiddenElements||n.removeUnusedFonts||n.compressHTML)&&(l=ce(e,r),r instanceof e.HTMLElement&&n.removeHiddenElements&&(s=(i||r.closest(\"html > head\"))&&q.includes(r.tagName)||r.closest(\"details\"),s||(a=i||te(r,l),a&&(r.setAttribute(w,\"\"),o.markedElements.push(r)))),!a)){if(n.compressHTML&&l){const e=l.getPropertyValue(\"white-space\");e&&e.startsWith(\"pre\")&&(r.setAttribute(E,\"\"),o.markedElements.push(r))}n.removeUnusedFonts&&(Z(l,n,o.usedFonts),Z(ce(e,r,\":first-letter\"),n,o.usedFonts),Z(ce(e,r,\":before\"),n,o.usedFonts),Z(ce(e,r,\":after\"),n,o.usedFonts))}!function(e,t,r,n,o,i,a){if(\"CANVAS\"==r.tagName)try{o.canvases.push({dataURI:r.toDataURL(\"image/png\",\"\")}),r.setAttribute(I,o.canvases.length-1),o.markedElements.push(r)}catch(e){}if(\"IMG\"==r.tagName){const t={currentSrc:i?G:n.loadDeferredImages&&r.getAttribute(z)||r.currentSrc};if(o.images.push(t),r.setAttribute(C,o.images.length-1),o.markedElements.push(r),r.removeAttribute(z),a=a||ce(e,r)){t.size=function(e,t,r){let n=t.naturalWidth,o=t.naturalHeight;if(!n&&!o){const i=null==t.getAttribute(\"style\");if(r=r||ce(e,t)){let e,a,s,l,c,u,h,d,p=!1;if(\"content-box\"==r.getPropertyValue(\"box-sizing\")){const e=t.style.getPropertyValue(\"box-sizing\"),r=t.style.getPropertyPriority(\"box-sizing\"),n=t.clientWidth;t.style.setProperty(\"box-sizing\",\"border-box\",\"important\"),p=t.clientWidth!=n,e?t.style.setProperty(\"box-sizing\",e,r):t.style.removeProperty(\"box-sizing\")}e=oe(\"padding-left\",r),a=oe(\"padding-right\",r),s=oe(\"padding-top\",r),l=oe(\"padding-bottom\",r),p?(c=oe(\"border-left-width\",r),u=oe(\"border-right-width\",r),h=oe(\"border-top-width\",r),d=oe(\"border-bottom-width\",r)):c=u=h=d=0,n=Math.max(0,t.clientWidth-e-a-c-u),o=Math.max(0,t.clientHeight-s-l-h-d),i&&t.removeAttribute(\"style\")}}return{pxWidth:n,pxHeight:o}}(e,r,a);const n=a.getPropertyValue(\"box-shadow\"),o=a.getPropertyValue(\"background-image\");n&&\"none\"!=n||o&&\"none\"!=o||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=a.getPropertyValue(\"background-color\"),t.objectFit=a.getPropertyValue(\"object-fit\"),t.boxSizing=a.getPropertyValue(\"box-sizing\"),t.objectPosition=a.getPropertyValue(\"object-position\"))}}if(\"VIDEO\"==r.tagName){const n=r.currentSrc;if(n&&!n.startsWith(\"blob:\")&&!n.startsWith(\"data:\")){const t=ce(e,r.parentNode);o.videos.push({positionParent:t&&t.getPropertyValue(\"position\"),src:n,size:{pxWidth:r.clientWidth,pxHeight:r.clientHeight},currentTime:r.currentTime}),r.setAttribute(_,o.videos.length-1)}if(!r.poster){const e=t.createElement(\"canvas\"),n=e.getContext(\"2d\");e.width=r.clientWidth,e.height=r.clientHeight;try{n.drawImage(r,0,0,e.width,e.height),o.posters.push(e.toDataURL(\"image/png\",\"\")),r.setAttribute(R,o.posters.length-1),o.markedElements.push(r)}catch(e){}}}\"IFRAME\"==r.tagName&&i&&n.removeHiddenElements&&(r.setAttribute(A,\"\"),o.markedElements.push(r));\"INPUT\"==r.tagName&&(\"password\"!=r.type&&(r.setAttribute(N,r.value),o.markedElements.push(r)),\"radio\"!=r.type&&\"checkbox\"!=r.type||(r.setAttribute(N,r.checked),o.markedElements.push(r)));\"TEXTAREA\"==r.tagName&&(r.setAttribute(N,r.value),o.markedElements.push(r));\"SELECT\"==r.tagName&&r.querySelectorAll(\"option\").forEach((e=>{e.selected&&(e.setAttribute(N,\"\"),o.markedElements.push(e))}));\"SCRIPT\"==r.tagName&&(r.async&&\"\"!=r.getAttribute(\"async\")&&\"async\"!=r.getAttribute(\"async\")&&(r.setAttribute(D,\"\"),o.markedElements.push(r)),r.textContent=r.textContent.replace(/<\\/script>/gi,\"<\\\\/script>\"))}(e,t,r,n,o,a,l);const c=!(r instanceof e.SVGElement)&&X(r);if(c&&!r.classList.contains($)){const i={};r.setAttribute(S,o.shadowRoots.length),o.markedElements.push(r),o.shadowRoots.push(i),K(e,t,c,n,o,a),i.content=c.innerHTML,i.mode=c.mode;try{c.adoptedStyleSheets&&c.adoptedStyleSheets.length&&(i.adoptedStyleSheets=Array.from(c.adoptedStyleSheets).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join(\"\\n\"))))}catch(e){}}K(e,t,r,n,o,a),!n.autoSaveExternalSave&&n.removeHiddenElements&&i&&(s||\"\"==r.getAttribute(x)?r.parentElement&&(r.parentElement.setAttribute(x,\"\"),o.markedElements.push(r.parentElement)):a&&(r.setAttribute(v,\"\"),o.markedElements.push(r)))})),o}function Z(e,t,r){if(e){const n=e.getPropertyValue(\"font-style\")||\"normal\";e.getPropertyValue(\"font-family\").split(\",\").forEach((o=>{if(o=ee(o),!t.loadedFonts||t.loadedFonts.find((e=>ee(e.family)==o&&e.style==n))){const t=se(e.getPropertyValue(\"font-weight\")),i=e.getPropertyValue(\"font-variant\")||\"normal\",a=[o,t,n,i];r.set(JSON.stringify(a),[o,t,n,i])}}))}}function X(e){const t=globalThis.chrome;if(e.openOrClosedShadowRoot)return e.openOrClosedShadowRoot;if(!(t&&t.dom&&t.dom.openOrClosedShadowRoot))return e.shadowRoot;try{return t.dom.openOrClosedShadowRoot(e)}catch(t){return e.shadowRoot}}function ee(e=\"\"){return ae(g(e.trim())).toLowerCase()}function te(e,t){let r=!1;if(t){const n=t.getPropertyValue(\"display\"),o=t.getPropertyValue(\"opacity\"),i=t.getPropertyValue(\"visibility\");if(r=\"none\"==n,!r&&(\"0\"==o||\"hidden\"==i)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();r=!t.width&&!t.height}}return Boolean(r)}function re(e,t,r){if(e.querySelectorAll(\"[\"+M+\"]\").forEach((e=>{e.textContent=e.getAttribute(M),e.removeAttribute(M)})),e.querySelectorAll(\"meta[disabled-http-equiv]\").forEach((e=>{e.setAttribute(\"http-equiv\",e.getAttribute(\"disabled-http-equiv\")),e.removeAttribute(\"disabled-http-equiv\")})),e.head&&e.head.querySelectorAll(\"*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)\").forEach((e=>e.removeAttribute(\"hidden\"))),!t){const r=[v,A,w,E,C,R,_,I,N,S,P,D];t=e.querySelectorAll(r.map((e=>\"[\"+e+\"]\")).join(\",\"))}t.forEach((e=>{e.removeAttribute(v),e.removeAttribute(w),e.removeAttribute(x),e.removeAttribute(A),e.removeAttribute(E),e.removeAttribute(C),e.removeAttribute(R),e.removeAttribute(_),e.removeAttribute(I),e.removeAttribute(N),e.removeAttribute(S),e.removeAttribute(P),e.removeAttribute(D),e.removeAttribute(L)})),r&&Array.from(r.entries()).forEach((([e,t])=>t.replaceWith(e)))}function ne(e){if(e){const t=[];return e.querySelectorAll(\"style\").forEach(((r,n)=>{try{const o=e.createElement(\"style\");o.textContent=r.textContent,e.body.appendChild(o);const i=o.sheet;o.remove(),i&&i.cssRules.length==r.sheet.cssRules.length||(r.setAttribute(P,n),t[n]=Array.from(r.sheet.cssRules).map((e=>e.cssText)).join(\"\\n\"))}catch(e){}})),t}}function oe(e,t){if(t.getPropertyValue(e).endsWith(\"px\"))return parseFloat(t.getPropertyValue(e))}function ie(e){const t=e.doctype;let r=\"\";return t&&(r=\" \"),r+e.documentElement.outerHTML}function ae(e){return(e=e.match(j)?e.replace(j,\"$1\"):e.replace(B,\"$1\")).trim()}function se(e){return H[e.toLowerCase().trim()]||e}function le(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?le(t):t)),[])}function ce(e,t,r){try{return e.getComputedStyle(t,r)}catch(e){}}var ue=Object.freeze({__proto__:null,initUserScriptHandler:function(){Y(\"single-file-user-script-init\",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+\"-request\",{cancelable:!0}),r=new Promise((t=>Y(e+\"-response\",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await r}))},initDoc:J,preProcessDoc:Q,postProcessDoc:re,serialize:ie,removeQuotes:ae,flatten:le,getFontWeight:se,normalizeFontFamily:ee,getShadowRoot:X,ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:E,REMOVED_CONTENT_ATTRIBUTE_NAME:v,HIDDEN_CONTENT_ATTRIBUTE_NAME:w,HIDDEN_FRAME_ATTRIBUTE_NAME:A,IMAGE_ATTRIBUTE_NAME:C,POSTER_ATTRIBUTE_NAME:R,VIDEO_ATTRIBUTE_NAME:_,CANVAS_ATTRIBUTE_NAME:I,INPUT_VALUE_ATTRIBUTE_NAME:N,SHADOW_ROOT_ATTRIBUTE_NAME:S,STYLE_ATTRIBUTE_NAME:L,LAZY_SRC_ATTRIBUTE_NAME:z,STYLESHEET_ATTRIBUTE_NAME:P,SELECTED_CONTENT_ATTRIBUTE_NAME:O,INVALID_ELEMENT_ATTRIBUTE_NAME:U,ASYNC_SCRIPT_ATTRIBUTE_NAME:D,COMMENT_HEADER:V,COMMENT_HEADER_LEGACY:W,SINGLE_FILE_UI_ELEMENT_CLASS:$,EMPTY_RESOURCE:G});const he=z,de=$,pe=\"attributes\",me=globalThis.browser,fe=globalThis.document,ge=globalThis.MutationObserver,ye=(e,t,r)=>globalThis.addEventListener(e,t,r),be=(e,t,r)=>globalThis.removeEventListener(e,t,r),ke=new Map;let ve;async function we(e){if(fe.documentElement){ke.clear();const n=fe.body&&fe.body.scrollHeight||fe.documentElement.scrollHeight,o=fe.body&&fe.body.scrollWidth||fe.documentElement.scrollWidth;if(n>globalThis.innerHeight||o>globalThis.innerWidth){const i=Math.max(n-1.5*globalThis.innerHeight,0),a=Math.max(o-1.5*globalThis.innerWidth,0);if(globalThis.scrollY{let o;const i=new Set,a=new ge((async t=>{if((t=t.filter((e=>e.type==pe))).length){t.filter((e=>{if(\"src\"==e.attributeName&&(e.target.setAttribute(he,e.target.src),e.target.addEventListener(\"load\",l)),\"src\"==e.attributeName||\"srcset\"==e.attributeName||\"SOURCE\"==e.target.tagName)return!e.target.classList||!e.target.classList.contains(de)})).length&&(o=!0,await Ee(a,e,d),i.size||await Ae(a,e,d))}}));async function s(t){await Te(\"idleTimeout\",(async()=>{o?ve<10&&(ve++,Re(\"idleTimeout\"),await s(Math.max(500,t/2))):(Re(\"loadTimeout\"),Re(\"maxTimeout\"),Se(a,e,d))}),t,e.loadDeferredImagesNativeTimeout)}function l(e){const t=e.target;t.removeAttribute(he),t.removeEventListener(\"load\",l)}async function c(t){o=!0,await Ee(a,e,d),await Ae(a,e,d),t.detail&&i.add(t.detail)}async function h(t){await Ee(a,e,d),await Ae(a,e,d),i.delete(t.detail),i.size||await Ae(a,e,d)}function d(e){a.disconnect(),be(t,c),be(r,h),n(e)}await s(2*e.loadDeferredImagesMaxIdleTime),await Ee(a,e,d),a.observe(fe,{subtree:!0,childList:!0,attributes:!0}),ye(t,c),ye(r,h),u(e)}))}(e)}}}function xe(e){d(e)}async function Ae(e,t,r){await Te(\"loadTimeout\",(()=>Se(e,t,r)),t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function Ee(e,t,r){await Te(\"maxTimeout\",(async()=>{await Re(\"loadTimeout\"),await Se(e,t,r)}),10*t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function Se(e,t,r){await Re(\"idleTimeout\"),h(t),await Te(\"endTimeout\",(async()=>{await Re(\"maxTimeout\"),r()}),t.loadDeferredImagesMaxIdleTime/2,t.loadDeferredImagesNativeTimeout),e.disconnect()}async function Te(e,t,r,n){if(me&&me.runtime&&me.runtime.sendMessage&&!n){if(!ke.get(e)||!ke.get(e).pending){const n={callback:t,pending:!0};ke.set(e,n);try{await me.runtime.sendMessage({method:\"singlefile.lazyTimeout.setTimeout\",type:e,delay:r})}catch(n){Ce(e,t,r)}n.pending=!1}}else Ce(e,t,r)}function Ce(e,t,r){const n=ke.get(e);n&&globalThis.clearTimeout(n),ke.set(e,t),globalThis.setTimeout(t,r)}async function Re(e){if(me&&me.runtime&&me.runtime.sendMessage)try{await me.runtime.sendMessage({method:\"singlefile.lazyTimeout.clearTimeout\",type:e})}catch(t){_e(e)}else _e(e)}function _e(e){const t=ke.get(e);ke.delete(e),t&&globalThis.clearTimeout(t)}me&&me.runtime&&me.runtime.onMessage&&me.runtime.onMessage.addListener&&me.runtime.onMessage.addListener((e=>{if(\"singlefile.lazyTimeout.onTimeout\"==e.method){const t=ke.get(e.type);if(t){ke.delete(e.type);try{t.callback()}catch(t){_e(e.type)}}}}));var Ie=Object.freeze({__proto__:null,process:we,resetZoomLevel:xe});const Le={ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,preProcessDoc:Q,serialize:ie,postProcessDoc:re,getShadowRoot:X},Ne=\"__frameTree__::\",ze='iframe, frame, object[type=\"text/html\"][data]',Pe=\"singlefile.frameTree.initRequest\",Me=\"singlefile.frameTree.ackInitRequest\",Oe=\"singlefile.frameTree.cleanupRequest\",Ue=\"singlefile.frameTree.initResponse\",De=5e3,Fe=\".\",qe=globalThis.window==globalThis.top,je=globalThis.browser,Be=globalThis.top,He=globalThis.MessageChannel,Ve=globalThis.document;let We,$e=globalThis.sessions;var Ge,Ye,Je;function Qe(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join(\"\")}async function Ke(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,qe||(We=globalThis.frameId=e.windowId),et(Ve,e.options,We,t),qe||(e.options.userScriptEnabled&&r&&await r(Le.ON_BEFORE_CAPTURE_EVENT_NAME),ot({frames:[at(Ve,globalThis,We,e.options)],sessionId:t,requestedFrameId:Ve.documentElement.dataset.requestedFrameId&&We}),e.options.userScriptEnabled&&r&&await r(Le.ON_AFTER_CAPTURE_EVENT_NAME),delete Ve.documentElement.dataset.requestedFrameId)}function Ze(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;nt(st(Ve),e.windowId,t)}}function Xe(e){e.frames.forEach((t=>tt(\"responseTimeouts\",e.sessionId,t.windowId)));const t=$e.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let r=t.frames.find((t=>e.windowId==t.windowId));r||(r={windowId:e.windowId},t.frames.push(r)),r.processed||(r.content=e.content,r.baseURI=e.baseURI,r.title=e.title,r.canvases=e.canvases,r.fonts=e.fonts,r.stylesheets=e.stylesheets,r.images=e.images,r.posters=e.posters,r.videos=e.videos,r.usedFonts=e.usedFonts,r.shadowRoots=e.shadowRoots,r.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(Fe).length-e.windowId.split(Fe).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function et(e,t,r,n){const o=st(e);!function(e,t,r,n,o){const i=[];let a;$e.get(o)?a=$e.get(o).requestTimeouts:(a={},$e.set(o,{requestTimeouts:a}));t.forEach(((e,t)=>{const r=n+Fe+t;e.setAttribute(Le.WIN_ID_ATTRIBUTE_NAME,r),i.push({windowId:r})})),ot({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),t.forEach(((e,t)=>{const i=n+Fe+t;try{it(e.contentWindow,{method:Pe,windowId:i,sessionId:o,options:r})}catch(e){}a[i]=globalThis.setTimeout((()=>ot({frames:[{windowId:i,processed:!0}],sessionId:o})),De)})),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n),o.length&&function(e,t,r,n,o){const i=[];t.forEach(((e,t)=>{const a=n+Fe+t;let s;try{s=e.contentDocument}catch(e){}if(s)try{const t=e.contentWindow;t.stop(),tt(\"requestTimeouts\",o,a),et(s,r,a,o),i.push(at(s,t,a,r))}catch(e){i.push({windowId:a,processed:!0})}})),ot({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n)}function tt(e,t,r){const n=$e.get(t);if(n&&n[e]){const t=n[e][r];t&&(globalThis.clearTimeout(t),delete n[e][r])}}function rt(e,t){const r=$e.get(e);r&&r.responseTimeouts&&(r.responseTimeouts[t]=globalThis.setTimeout((()=>ot({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function nt(e,t,r){e.forEach(((e,n)=>{const o=t+Fe+n;e.removeAttribute(Le.WIN_ID_ATTRIBUTE_NAME);try{it(e.contentWindow,{method:Oe,windowId:o,sessionId:r})}catch(e){}})),e.forEach(((e,n)=>{const o=t+Fe+n;let i;try{i=e.contentDocument}catch(e){}if(i)try{nt(st(i),o,r)}catch(e){}}))}function ot(e){e.method=Ue;try{Be.singlefile.processors.frameTree.initResponse(e)}catch(t){it(Be,e,!0)}}function it(e,t,r){if(e==Be&&je&&je.runtime&&je.runtime.sendMessage)je.runtime.sendMessage(t);else if(r){const r=new He;e.postMessage(Ne+JSON.stringify({method:t.method,sessionId:t.sessionId}),\"*\",[r.port2]),r.port1.postMessage(t)}else e.postMessage(Ne+JSON.stringify(t),\"*\")}function at(e,t,r,n){const o=Le.preProcessDoc(e,t,n),i=Le.serialize(e);Le.postProcessDoc(e,o.markedElements,o.invalidElements);return{windowId:r,content:i,baseURI:e.baseURI.split(\"#\")[0],title:e.title,canvases:o.canvases,fonts:o.fonts,stylesheets:o.stylesheets,images:o.images,posters:o.posters,videos:o.videos,usedFonts:o.usedFonts,shadowRoots:o.shadowRoots,processed:!0}}function st(e){let t=Array.from(e.querySelectorAll(ze));return e.querySelectorAll(\"*\").forEach((e=>{const r=Le.getShadowRoot(e);r&&(t=t.concat(...r.querySelectorAll(ze)))})),t}$e||($e=globalThis.sessions=new Map),qe&&(We=\"0\",je&&je.runtime&&je.runtime.onMessage&&je.runtime.onMessage.addListener&&je.runtime.onMessage.addListener((e=>e.method==Ue?(Xe(e),Promise.resolve({})):e.method==Me?(tt(\"requestTimeouts\",e.sessionId,e.windowId),rt(e.sessionId,e.windowId),Promise.resolve({})):void 0))),Ge=\"message\",Ye=async e=>{if(\"string\"==typeof e.data&&e.data.startsWith(Ne)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(Ne.length));t.method==Pe?(e.source&&it(e.source,{method:Me,windowId:t.windowId,sessionId:t.sessionId}),qe||(globalThis.stop(),t.options.loadDeferredImages&&we(t.options),await Ke(t))):t.method==Me?(tt(\"requestTimeouts\",t.sessionId,t.windowId),rt(t.sessionId,t.windowId)):t.method==Oe?Ze(t):t.method==Ue&&$e.get(t.sessionId)&&(e.ports[0].onmessage=e=>Xe(e.data))}},Je=!0,globalThis.addEventListener(Ge,Ye,Je);var lt=Object.freeze({__proto__:null,getAsync:function(e){const t=Qe();return e=JSON.parse(JSON.stringify(e)),new Promise((r=>{$e.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,r(e)}}),Ke({windowId:We,sessionId:t,options:e})}))},getSync:function(e){const t=Qe();e=JSON.parse(JSON.stringify(e)),$e.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,qe||(We=globalThis.frameId=e.windowId);et(Ve,e.options,We,t),qe||(e.options.userScriptEnabled&&r&&r(Le.ON_BEFORE_CAPTURE_EVENT_NAME),ot({frames:[at(Ve,globalThis,We,e.options)],sessionId:t,requestedFrameId:Ve.documentElement.dataset.requestedFrameId&&We}),e.options.userScriptEnabled&&r&&r(Le.ON_AFTER_CAPTURE_EVENT_NAME),delete Ve.documentElement.dataset.requestedFrameId)}({windowId:We,sessionId:t,options:e});const r=$e.get(t).frames;return r.sessionId=t,r},cleanup:function(e){$e.delete(e),Ze({windowId:We,sessionId:e,options:{sessionId:e}})},initResponse:Xe,TIMEOUT_INIT_REQUEST_MESSAGE:De}),ct=Object.freeze({__proto__:null,frameTree:lt,hooksFrames:p,lazy:Ie}),ut=Object.create,ht=Object.defineProperty,dt=Object.defineProperties,pt=Object.getOwnPropertyDescriptor,mt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertyNames,gt=Object.getOwnPropertySymbols,yt=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,vt=(e,t,r)=>t in e?ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wt=(e,t)=>{for(var r in t||(t={}))bt.call(t,r)&&vt(e,r,t[r]);if(gt)for(var r of gt(t))kt.call(t,r)&&vt(e,r,t[r]);return e},xt=(e,t)=>dt(e,mt(t)),At=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(e,t)=>{for(var r in t)ht(e,r,{get:t[r],enumerable:!0})},St=At((e=>{var t=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");e.encode=function(e){if(0<=e&&e{var t=St();e.encode=function(e){var r,n,o=\"\",i=(n=e)<0?1+(-n<<1):0+(n<<1);do{r=31&i,(i>>>=5)>0&&(r|=32),o+=t.encode(r)}while(i>0);return o},e.decode=function(e,r,n){var o,i,a=e.length,s=0,l=0;do{if(r>=a)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(r++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(r-1));o=!!(32&i),s+=(i&=31)<>1;return 1==(1&e)?-t:t}(s),n.rest=r}})),Ct=At((e=>{e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('\"'+t+'\" is a required argument.')};var t=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function o(e){var t=\"\";return e.scheme&&(t+=e.scheme+\":\"),t+=\"//\",e.auth&&(t+=e.auth+\"@\"),e.host&&(t+=e.host),e.port&&(t+=\":\"+e.port),e.path&&(t+=e.path),t}e.urlParse=n,e.urlGenerate=o;var i,a,s=(i=function(t){var r=t,i=n(t);if(i){if(!i.path)return t;r=i.path}for(var a=e.isAbsolute(r),s=[],l=0,c=0;;){if(l=c,-1===(c=r.indexOf(\"/\",l))){s.push(r.slice(l));break}for(s.push(r.slice(l,c));c=0;c--)\".\"===(u=s[c])?s.splice(c,1):\"..\"===u?h++:h>0&&(\"\"===u?(s.splice(c+1,h),h=0):(s.splice(c,2),h--));return\"\"===(r=s.join(\"/\"))&&(r=a?\"/\":\".\"),i?(i.path=r,o(i)):r},a=[],function(e){for(var t=0;t32&&a.pop(),n});function l(e,t){\"\"===e&&(e=\".\"),\"\"===t&&(t=\".\");var i=n(t),a=n(e);if(a&&(e=a.path||\"/\"),i&&!i.scheme)return a&&(i.scheme=a.scheme),o(i);if(i||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var l=\"/\"===t.charAt(0)?t:s(e.replace(/\\/+$/,\"\")+\"/\"+t);return a?(a.path=l,o(a)):l}e.normalize=s,e.join=l,e.isAbsolute=function(e){return\"/\"===e.charAt(0)||t.test(e)},e.relative=function(e,t){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==t.indexOf(e+\"/\");){var n=e.lastIndexOf(\"/\");if(n<0||(e=e.slice(0,n)).match(/^([^\\/]+:\\/)?\\/*$/))return t;++r}return Array(r+1).join(\"../\")+t.substr(e.length+1)};var c=!(\"__proto__\"in Object.create(null));function u(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=c?u:function(e){return h(e)?\"$\"+e:e},e.fromSetString=c?u:function(e){return h(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=d(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,r){var n;return 0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||(0!==(n=e.generatedColumn-t.generatedColumn)||r)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,r){var n=e.generatedColumn-t.generatedColumn;return 0!==n||r||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\\)]}'[^\\n]*\\n/,\"\"))},e.computeSourceURL=function(e,t,r){if(t=t||\"\",e&&(\"/\"!==e[e.length-1]&&\"/\"!==t[0]&&(e+=\"/\"),t=e+t),r){var i=n(r);if(!i)throw new Error(\"sourceMapURL could not be parsed\");if(i.path){var a=i.path.lastIndexOf(\"/\");a>=0&&(i.path=i.path.substring(0,a+1))}t=l(o(i),t)}return s(t)}})),Rt=At((e=>{var t=Ct(),r=Object.prototype.hasOwnProperty,n=typeof Map<\"u\";function o(){this._array=[],this._set=n?new Map:Object.create(null)}o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;n=0)return o}else{var i=t.toSetString(e);if(r.call(this._set,i))return this._set[i]}throw new Error('\"'+e+'\" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e{var t=Ct();function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,r){var n=e.generatedLine,o=r.generatedLine,i=e.generatedColumn,a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),It=At((e=>{var t=Tt(),r=Ct(),n=Rt().ArraySet,o=_t().MappingList;function i(e){e||(e={}),this._file=r.getArg(e,\"file\",null),this._sourceRoot=r.getArg(e,\"sourceRoot\",null),this._skipValidation=r.getArg(e,\"skipValidation\",!1),this._sources=new n,this._names=new n,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,n=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=r.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),n.addMapping(o)})),e.sources.forEach((function(o){var i=o;null!==t&&(i=r.relative(t,o)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(o);null!=a&&n.setSourceContent(o,a)})),n},i.prototype.addMapping=function(e){var t=r.getArg(e,\"generated\"),n=r.getArg(e,\"original\",null),o=r.getArg(e,\"source\",null),i=r.getArg(e,\"name\",null);this._skipValidation||this._validateMapping(t,n,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:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:o,name:i})},i.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=r.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[r.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[r.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,o){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\\'s \"file\" property. Both were omitted.');i=e.file}var a=this._sourceRoot;null!=a&&(i=r.relative(a,i));var s=new n,l=new n;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var n=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=n.source&&(t.source=n.source,null!=o&&(t.source=r.join(o,t.source)),null!=a&&(t.source=r.relative(a,t.source)),t.originalLine=n.line,t.originalColumn=n.column,null!=n.name&&(t.name=n.name))}var c=t.source;null!=c&&!s.has(c)&&s.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=s,this._names=l,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=o&&(t=r.join(o,t)),null!=a&&(t=r.relative(a,t)),this.setSourceContent(t,n))}),this)},i.prototype._validateMapping=function(e,t,r,n){if(t&&\"number\"!=typeof t.line&&\"number\"!=typeof t.column)throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if(!(e&&\"line\"in e&&\"column\"in e&&e.line>0&&e.column>=0)||t||r||n){if(e&&\"line\"in e&&\"column\"in e&&t&&\"line\"in t&&\"column\"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error(\"Invalid mapping: \"+JSON.stringify({generated:e,source:r,original:t,name:n}))}},i.prototype._serializeMappings=function(){for(var e,n,o,i,a=0,s=1,l=0,c=0,u=0,h=0,d=\"\",p=this._mappings.toArray(),m=0,f=p.length;m0){if(!r.compareByGeneratedPositionsInflated(n,p[m-1]))continue;e+=\",\"}e+=t.encode(n.generatedColumn-a),a=n.generatedColumn,null!=n.source&&(i=this._sources.indexOf(n.source),e+=t.encode(i-h),h=i,e+=t.encode(n.originalLine-1-c),c=n.originalLine-1,e+=t.encode(n.originalColumn-l),l=n.originalColumn,null!=n.name&&(o=this._names.indexOf(n.name),e+=t.encode(o-u),u=o)),d+=e}return d},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=r.relative(t,e));var n=r.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i})),Lt={};Et(Lt,{AtKeyword:()=>Mt,BadString:()=>Dt,BadUrl:()=>qt,CDC:()=>Gt,CDO:()=>$t,Colon:()=>Yt,Comma:()=>Qt,Comment:()=>nr,Delim:()=>jt,Dimension:()=>Vt,EOF:()=>Nt,Function:()=>Pt,Hash:()=>Ot,Ident:()=>zt,LeftCurlyBracket:()=>tr,LeftParenthesis:()=>Xt,LeftSquareBracket:()=>Kt,Number:()=>Bt,Percentage:()=>Ht,RightCurlyBracket:()=>rr,RightParenthesis:()=>er,RightSquareBracket:()=>Zt,Semicolon:()=>Jt,String:()=>Ut,Url:()=>Ft,WhiteSpace:()=>Wt});var Nt=0,zt=1,Pt=2,Mt=3,Ot=4,Ut=5,Dt=6,Ft=7,qt=8,jt=9,Bt=10,Ht=11,Vt=12,Wt=13,$t=14,Gt=15,Yt=16,Jt=17,Qt=18,Kt=19,Zt=20,Xt=21,er=22,tr=23,rr=24,nr=25;function or(e){return e>=48&&e<=57}function ir(e){return or(e)||e>=65&&e<=70||e>=97&&e<=102}function ar(e){return e>=65&&e<=90}function sr(e){return function(e){return ar(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function lr(e){return sr(e)||or(e)||45===e}function cr(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function ur(e){return 10===e||13===e||12===e}function hr(e){return ur(e)||32===e||9===e}function dr(e,t){return!(92!==e||ur(t)||0===t)}function pr(e,t,r){return 45===e?sr(t)||45===t||dr(t,r):!!sr(e)||92===e&&dr(e,t)}function mr(e,t,r){return 43===e||45===e?or(t)?2:46===t&&or(r)?3:0:46===e?or(t)?2:0:or(e)?1:0}function fr(e){return 65279===e||65534===e?1:0}var gr=new Array(128),yr=130;for(let e=0;ee.length)return!1;for(let o=t;o=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Ir=[\"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\"];function Lr(e=null,t){return null===e||e.length0?fr(t.charCodeAt(0)):0,o=Lr(e.lines,r),i=Lr(e.columns,r),a=e.startLine,s=e.startColumn;for(let e=n;e{})){let r=(e=String(e||\"\")).length,n=Lr(this.offsetAndType,e.length+1),o=Lr(this.balance,e.length+1),i=0,a=0,s=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=r;break;case a:{let e=s&zr;for(s=o[e],a=s>>Pr,o[i]=e,o[e++]=i;e>Pr:0}lookupOffset(e){return(e+=this.tokenIndex)0?e>Pr,this.tokenEnd=t&zr):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>Pr,this.tokenEnd=e&zr):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let r,n,o=e;e:for(;o0?this.offsetAndType[o-1]&zr:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break e;case 2:o++;break e;default:this.balance[r]===o&&(o=r)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,r=this.firstCharOffset;t>Pr,n,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,r,n,o)=>{e[o]={idx:o,type:Ir[t],chunk:this.source.substring(r,n),balance:this.balance[o]}})),e}};function Ur(e,t){function r(t){return t=e.length?void(cString(e+r+1).padStart(l)+\" |\"+t)).join(\"\\n\")}let i=e.split(/\\r\\n?|\\n|\\f/),a=Math.max(1,t-n)-1,s=Math.min(t+n,i.length+1),l=Math.max(4,String(s).length)+1,c=0;(r+=(jr.length-1)*(i[t-1].substr(0,r-1).match(/\\t/g)||[]).length)>100&&(c=r-60+3,r=58);for(let e=a;e<=s;e++)e>=0&&e0&&i[e].length>c?\"…\":\"\")+i[e].substr(c,98)+(i[e].length>c+100-1?\"…\":\"\"));return[o(a,t),new Array(r+l+2).join(\"-\")+\"^\",o(t,s)].filter(Boolean).join(\"\\n\")}function Hr(e,t,r,n,o){return Object.assign(qr(\"SyntaxError\",e),{source:t,offset:r,line:n,column:o,sourceFragment:e=>Br({source:t,line:n,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\\n`+Br({source:t,line:n,column:o},2)}})}function Vr(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(void 0===o)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Wr=()=>{};function $r(e){return function(){return this[e]()}}function Gr(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function Yr(e){let t=\"\",r=\"\",n=!1,o=Wr,i=!1,a=new class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,r=1,n=1){this.source=e,this.startOffset=t,this.startLine=r,this.startColumn=n,this.computed=!1}getLocation(e,t){return this.computed||Nr(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||Nr(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},s=Object.assign(new Or,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Gr(e.atrule),pseudo:Gr(e.pseudo),node:Gr(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case\"function\":t.context[r]=e.parseContext[r];break;case\"string\":t.context[r]=$r(e.parseContext[r])}return wt(wt({config:t},t),t.node)}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Vr,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new Fr,createSingleNodeList:e=>(new Fr).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let r=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let n=t.call(this,r);return i=!0,o(e,n),i=!1,n}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&et.substring(e,r),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,r)=>wr(t,e,r),cmpStr:(e,r,n)=>xr(t,e,r,n),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let r=t.substring(this.tokenStart,Cr(t,this.tokenStart));return this.eat(e),r},eat(e){if(this.tokenType!==e){let t=Ir[e].slice(0,-6).replace(/-/g,\" \").replace(/^./,(e=>e.toUpperCase())),r=`${/[[\\](){}]/.test(t)?`\"${t}\"`:t} is expected`,n=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(n=this.tokenEnd-1,r=\"Identifier is expected but function found\"):r=\"Identifier is expected\";break;case 4:this.isDelim(35)&&(this.next(),n++,r=\"Name is expected\");break;case 11:10===this.tokenType&&(n=this.tokenEnd,r=\"Percent sign is expected\")}this.error(r,n)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier \"${e}\" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim \"${String.fromCharCode(e)}\" is expected`),this.next()},getLocation:(e,t)=>n?a.getLocationRange(e,t,r):null,getLocationFromList(e){if(n){let t=this.getFirstListNode(e),n=this.getLastListNode(e);return a.getLocationRange(null!==t?t.loc.start.offset-a.startOffset:this.tokenStart,null!==n?n.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(e,r){let n=void 0!==r&&r=0&&hr(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new Hr(e||\"Unexpected input\",t,n.offset,n.line,n.column)}});return Object.assign((function(e,l){t=e,l=l||{},s.setSource(t,Ur),a.setSource(t,l.offset,l.line,l.column),r=l.filename||\"\",n=Boolean(l.positions),o=\"function\"==typeof l.onParseError?l.onParseError:Wr,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:u}=l;if(!(c in s.context))throw new Error(\"Unknown context `\"+c+\"`\");\"function\"==typeof u&&s.forEachToken(((e,r,n)=>{if(25===e){let e=s.getLocation(r,n),o=xr(t,n-2,n,\"*/\")?t.slice(r+2,n-2):t.slice(r+2,n);u(o,e)}}));let h=s.context[c].call(s,l);return s.eof||s.error(),h}),{SyntaxError:Hr,config:s.config})}var Jr,Qr,Kr,Zr=(Jr=It(),Qr=1,Kr=null!=Jr?ut(yt(Jr)):{},((e,t,r,n)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let o of ft(t))!bt.call(e,o)&&o!==r&&ht(e,o,{get:()=>t[o],enumerable:!(n=pt(t,o))||n.enumerable});return e})(!Qr&&Jr&&Jr.__esModule?Kr:ht(Kr,\"default\",{value:Jr,enumerable:!0}),Jr)),Xr=new Set([\"Atrule\",\"Selector\",\"Declaration\"]);var en={};Et(en,{safe:()=>sn,spec:()=>an});var tn=(e,t)=>{if(9===e&&(e=t),\"string\"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},rn=[[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],[\"/\",\"*\"]],nn=rn.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 on(e){let t=new Set(e.map((([e,t])=>tn(e)<<16|tn(t))));return function(e,r,n){let o=tn(r,n),i=n.charCodeAt(0);return(45===i&&1!==r&&2!==r&&15!==r||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(\" \",13,!0),o}}var an=on(rn),sn=on(nn);function ln(e,t){if(\"function\"!=typeof t)e.children.forEach(this.node,this);else{let r=null;e.children.forEach((e=>{null!==r&&t.call(this,r),this.node(e),r=e}))}}function cn(e){Ur(e,((t,r,n)=>{this.token(t,e.slice(r,n))}))}function un(e){let t=new Map;for(let r in e.node){let n=e.node[r];\"function\"==typeof(n.generate||n)&&t.set(r,n.generate||n)}return function(e,r){let n=\"\",o=0,i={node(e){if(!t.has(e.type))throw new Error(\"Unknown node type: \"+e.type);t.get(e.type).call(a,e)},tokenBefore:sn,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit(\"\\n\",13,!0)},emit(e){n+=e},result:()=>n};r&&(\"function\"==typeof r.decorator&&(i=r.decorator(i)),r.sourceMap&&(i=function(e){let t=new Zr.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},a=1,s=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Xr.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(n.line!==c||n.column!==u)&&(n.line=c,n.column=u,r.line=a,r.column=s,l&&(l=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:n,generated:r}))}c.call(this,e),l&&Xr.has(e.type)&&(o.line=a,o.column=s)};let u=e.emit;e.emit=function(e,t,r){for(let t=0;ti.node(e),children:ln,token:(e,t)=>i.token(e,t),tokenize:cn};return i.node(e),i.result()}}var{hasOwnProperty:hn}=Object.prototype,dn=function(){};function pn(e){return\"function\"==typeof e?e:dn}function mn(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function fn(e,t){let r=t.structure,n=[];for(let e in r){if(!1===hn.call(r,e))continue;let t=r[e],o={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?o.nullable=!0:\"string\"==typeof e?o.type=\"node\":Array.isArray(e)&&(o.type=\"list\");o.type&&n.push(o)}return n.length?{context:t.walkContext,fields:n}:null}function gn(e,t){let r=e.fields.slice(),n=e.context,o=\"string\"==typeof n;return t&&r.reverse(),function(e,i,a,s){let l;o&&(l=i[n],i[n]=e);for(let n of r){let r=e[n.name];if(!n.nullable||r)if(\"list\"===n.type){if(t?r.reduceRight(s,!1):r.reduce(s,!1))return!0}else if(a(r))return!0}o&&(i[n]=l)}}function yn({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function bn(e){let t=function(e){let t={};for(let r in e.node)if(hn.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error(\"Missed `structure` field in `\"+r+\"` node type definition\");t[r]=fn(0,n)}return t}(e),r={},n={},o=Symbol(\"break-walk\"),i=Symbol(\"skip-node\");for(let e in t)hn.call(t,e)&&null!==t[e]&&(r[e]=gn(t[e],!1),n[e]=gn(t[e],!0));let a=yn(r),s=yn(n),l=function(e,l){function c(e,t,r){let n=u.call(m,e,t,r);return n===o||n!==i&&!!(d.hasOwnProperty(e.type)&&d[e.type](e,m,c,p)||h.call(m,e,t,r)===o)}let u=dn,h=dn,d=r,p=(e,t,r,n)=>e||c(t,r,n),m={break:o,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(\"function\"==typeof l)u=l;else if(l&&(u=pn(l.enter),h=pn(l.leave),l.reverse&&(d=n),l.visit)){if(a.hasOwnProperty(l.visit))d=l.reverse?s[l.visit]:a[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error(\"Bad value `\"+l.visit+\"` for `visit` option (should be: \"+Object.keys(t).sort().join(\", \")+\")\");u=mn(u,l.visit),h=mn(h,l.visit)}if(u===dn&&h===dn)throw new Error(\"Neither `enter` nor `leave` walker handler is set or both aren't a function\");c(e)};return l.break=o,l.skip=i,l.find=function(e,t){let r=null;return l(e,(function(e,n,i){if(t.call(this,e,n,i))return r=e,o})),r},l.findLast=function(e,t){let r=null;return l(e,{reverse:!0,enter(e,n,i){if(t.call(this,e,n,i))return r=e,o}}),r},l.findAll=function(e,t){let r=[];return l(e,(function(e,n,o){t.call(this,e,n,o)&&r.push(e)})),r},l}function kn(e){return e}function vn(e,t,r,n){let o;switch(e.type){case\"Group\":o=function(e,t,r,n){let o=\" \"===e.combinator||n?e.combinator:\" \"+e.combinator+\" \",i=e.terms.map((e=>vn(e,t,r,n))).join(o);return e.explicit||r?(n||\",\"===i[0]?\"[\":\"[ \")+i+(n?\"]\":\" ]\"):i}(e,t,r,n)+(e.disallowEmpty?\"!\":\"\");break;case\"Multiplier\":return vn(e.term,t,r,n)+t(function(e){let{min:t,max:r,comma:n}=e;return 0===t&&0===r?n?\"#?\":\"*\":0===t&&1===r?\"?\":1===t&&0===r?n?\"#\":\"+\":1===t&&1===r?\"\":(n?\"#\":\"\")+(t===r?\"{\"+t+\"}\":\"{\"+t+\",\"+(0!==r?r:\"\")+\"}\")}(e),e);case\"Type\":o=\"<\"+e.name+(e.opts?t(function(e){if(\"Range\"===e.type)return\" [\"+(null===e.min?\"-∞\":e.min)+\",\"+(null===e.max?\"∞\":e.max)+\"]\";throw new Error(\"Unknown node type `\"+e.type+\"`\")}(e.opts),e.opts):\"\")+\">\";break;case\"Property\":o=\"<'\"+e.name+\"'>\";break;case\"Keyword\":o=e.name;break;case\"AtKeyword\":o=\"@\"+e.name;break;case\"Function\":o=e.name+\"(\";break;case\"String\":case\"Token\":o=e.value;break;case\"Comma\":o=\",\";break;default:throw new Error(\"Unknown node type `\"+e.type+\"`\")}return t(o,e)}function wn(e,t){let r=kn,n=!1,o=!1;return\"function\"==typeof t?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),\"function\"==typeof t.decorate&&(r=t.decorate)),vn(e,r,n,o)}var xn={offset:0,line:1,column:1};function An(e,t){let r=e&&e.loc&&e.loc[t];return r?\"line\"in r?En(r):r:null}function En({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let e=n.split(/\\n|\\r\\n?|\\f/);o.offset+=n.length,o.line+=e.length-1,o.column=1===e.length?o.column+n.length:e.pop().length+1}return o}var Sn=function(e,t){let r=qr(\"SyntaxReferenceError\",e+(t?\" `\"+t+\"`\":\"\"));return r.reference=t,r},Tn=function(e,t,r,n){let o=qr(\"SyntaxMatchError\",e),{css:i,mismatchOffset:a,mismatchLength:s,start:l,end:c}=function(e,t){let r,n,o=e.tokens,i=e.longestMatch,a=i1?(r=An(s||t,\"end\")||En(xn,h),n=En(r)):(r=An(s,\"start\")||En(An(t,\"start\")||xn,h.slice(0,l)),n=An(s,\"end\")||En(r,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:r,end:n}}(n,r);return o.rawMessage=e,o.syntax=t?wn(t):\"\",o.css=i,o.mismatchOffset=a,o.mismatchLength=s,o.message=e+\"\\n syntax: \"+o.syntax+\"\\n value: \"+(i||\"\")+\"\\n --------\"+new Array(o.mismatchOffset+1).join(\"-\")+\"^\",Object.assign(o,l),o.loc={source:r&&r.loc&&r.loc.source||\"\",start:l,end:c},o},Cn=new Map,Rn=new Map,_n=function(e){if(Cn.has(e))return Cn.get(e);let t=e.toLowerCase(),r=Cn.get(t);if(void 0===r){let e=Nn(t,0),n=e?\"\":zn(t,0);r=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:e})}return Cn.set(e,r),r},In=function(e){if(Rn.has(e))return Rn.get(e);let t=e,r=e[0];\"/\"===r?r=\"/\"===e[1]?\"//\":\"/\":\"_\"!==r&&\"*\"!==r&&\"$\"!==r&&\"#\"!==r&&\"+\"!==r&&\"&\"!==r&&(r=\"\");let n=Nn(t,r.length);if(!n&&(t=t.toLowerCase(),Rn.has(t))){let r=Rn.get(t);return Rn.set(e,r),r}let o=n?\"\":zn(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return Rn.set(e,a),a},Ln=zn;function Nn(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function zn(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){let r=e.indexOf(\"-\",t+2);if(-1!==r)return e.substring(t,r+1)}return\"\"}var Pn=[\"initial\",\"inherit\",\"unset\",\"revert\",\"revert-layer\"],Mn=45,On=!0;function Un(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Dn(e,t,r){for(;null!==e&&(13===e.type||25===e.type);)e=r(++t);return t}function Fn(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(43===o||o===Mn){if(r)return 0;t++}for(;t6)return 0}return n}function Hn(e,t,r){if(!e)return 0;for(;jn(r(t),63);){if(++e>6)return 0;t++}return t}var Vn=[\"calc(\",\"-moz-calc(\",\"-webkit-calc(\"],Wn=new Map([[2,22],[21,22],[19,20],[23,24]]);function $n(e,t){return te.max&&\"string\"!=typeof e.max)return!0}return!1}function Kn(e){return function(t,r,n){return null===t?0:2===t.type&&Yn(t.value,Vn)?function(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),0===n.length){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Wn.get(e.type)}o++}while(e=t(o));return o}(t,r):e(t,r,n)}}function Zn(e){return function(t){return null===t||t.type!==e?0:1}}function Xn(e){return e&&(e=new Set(e)),function(t,r,n){if(null===t||12!==t.type)return 0;let o=Cr(t.value,0);if(null!==e){let r=t.value.indexOf(\"\\\\\",o),n=-1!==r&&Jn(t.value,r)?t.value.substring(o,r):t.value.substr(o);if(!1===e.has(n.toLowerCase()))return 0}return Qn(n,t.value,o)?0:1}}function eo(e){return\"function\"!=typeof e&&(e=function(){return 0}),function(t,r,n){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,r,n)}}var to={\"ident-token\":Zn(1),\"function-token\":Zn(2),\"at-keyword-token\":Zn(3),\"hash-token\":Zn(4),\"string-token\":Zn(5),\"bad-string-token\":Zn(6),\"url-token\":Zn(7),\"bad-url-token\":Zn(8),\"delim-token\":Zn(9),\"number-token\":Zn(10),\"percentage-token\":Zn(11),\"dimension-token\":Zn(12),\"whitespace-token\":Zn(13),\"CDO-token\":Zn(14),\"CDC-token\":Zn(15),\"colon-token\":Zn(16),\"semicolon-token\":Zn(17),\"comma-token\":Zn(18),\"[-token\":Zn(19),\"]-token\":Zn(20),\"(-token\":Zn(21),\")-token\":Zn(22),\"{-token\":Zn(23),\"}-token\":Zn(24)},ro={string:Zn(5),ident:Zn(1),percentage:Kn((function(e,t,r){return null===e||11!==e.type||Qn(r,e.value,e.value.length-1)?0:1})),zero:eo(),number:Kn((function(e,t,r){if(null===e)return 0;let n=Cr(e.value,0);return n!==e.value.length&&!Jn(e.value,n)||Qn(r,e.value,n)?0:1})),integer:Kn((function(e,t,r){if(null===e||10!==e.type)return 0;let n=43===$n(e.value,0)||45===$n(e.value,0)?1:0;for(;nao,decibel:()=>ho,flex:()=>uo,frequency:()=>lo,length:()=>io,resolution:()=>co,semitones:()=>po,time:()=>so});var io=[\"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\"],ao=[\"deg\",\"grad\",\"rad\",\"turn\"],so=[\"s\",\"ms\"],lo=[\"hz\",\"khz\"],co=[\"dpi\",\"dpcm\",\"dppx\",\"x\"],uo=[\"fr\"],ho=[\"db\"],po=[\"st\"],mo={};function fo(e,t,r){return Object.assign(qr(\"SyntaxError\",e),{input:t,offset:r,rawMessage:e,message:e+\"\\n \"+t+\"\\n--\"+new Array((r||t.length)+1).join(\"-\")+\"^\"})}Et(mo,{SyntaxError:()=>fo,generate:()=>wn,parse:()=>Io,walk:()=>zo});var go=123,yo=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\\-]/.test(String.fromCharCode(t))?1:0)),bo={\" \":1,\"&&\":2,\"||\":3,\"|\":4};function ko(e){return e.substringToPos(e.findWsEnd(e.pos))}function vo(e){let t=e.pos;for(;t=128||0===yo[r])break}return e.pos===t&&e.error(\"Expect a keyword\"),e.substringToPos(t)}function wo(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error(\"Expect a number\"),e.substringToPos(t)}function xo(e){let t=e.str.indexOf(\"'\",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error(\"Expect an apostrophe\")),e.substringToPos(t+1)}function Ao(e){let t=null,r=null;return e.eat(go),t=wo(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(r=wo(e))):r=t,e.eat(125),{min:Number(t),max:r?Number(r):0}}function Eo(e,t){let r=function(e){let t=null,r=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,r=!0,e.charCode()===go?t=Ao(e):63===e.charCode()?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case go:t=Ao(e);break;default:return null}return{type:\"Multiplier\",comma:r,min:t.min,max:t.max,term:null}}(e);return null!==r?(r.term=t,35===e.charCode()&&43===e.charCodeAt(e.pos-1)?Eo(e,r):r):t}function So(e){let t=e.peek();return\"\"===t?null:{type:\"Token\",value:t}}function To(e){let t,r=null;return e.eat(60),t=vo(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+=\"()\"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(ko(e),r=function(e){let t=null,r=null,n=1;return e.eat(91),45===e.charCode()&&(e.peek(),n=-1),-1==n&&8734===e.charCode()?e.peek():(t=n*Number(wo(e)),0!==yo[e.charCode()]&&(t+=vo(e))),ko(e),e.eat(44),ko(e),8734===e.charCode()?e.peek():(n=1,45===e.charCode()&&(e.peek(),n=-1),r=n*Number(wo(e)),0!==yo[e.charCode()]&&(r+=vo(e))),e.eat(93),{type:\"Range\",min:t,max:r}}(e)),e.eat(62),Eo(e,{type:\"Type\",name:t,opts:r})}function Co(e,t){function r(e,t){return{type:\"Group\",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort(((e,t)=>bo[e]-bo[t]));t.length>0;){n=t.shift();let o=0,i=0;for(;o1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function Ro(e){let t,r=[],n={},o=null,i=e.pos;for(;t=_o(e);)\"Spaces\"!==t.type&&(\"Combinator\"===t.type?((null===o||\"Combinator\"===o.type)&&(e.pos=i,e.error(\"Unexpected combinator\")),n[t.value]=!0):null!==o&&\"Combinator\"!==o.type&&(n[\" \"]=!0,r.push({type:\"Combinator\",value:\" \"})),r.push(t),o=t,i=e.pos);return null!==o&&\"Combinator\"===o.type&&(e.pos-=i,e.error(\"Unexpected combinator\")),{type:\"Group\",terms:r,combinator:Co(r,n)||\" \",disallowEmpty:!1,explicit:!1}}function _o(e){let t=e.charCode();if(t<128&&1===yo[t])return function(e){let t=vo(e);return 40===e.charCode()?(e.pos++,{type:\"Function\",name:t}):Eo(e,{type:\"Keyword\",name:t})}(e);switch(t){case 93:break;case 91:return Eo(e,function(e){let t;return e.eat(91),t=Ro(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){let t;return e.eat(60),e.eat(39),t=vo(e),e.eat(39),e.eat(62),Eo(e,{type:\"Property\",name:t})}(e):To(e);case 124:return{type:\"Combinator\",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:\"Combinator\",value:\"&&\"};case 44:return e.pos++,{type:\"Comma\"};case 39:return Eo(e,{type:\"String\",value:xo(e)});case 32:case 9:case 10:case 13:case 12:return{type:\"Spaces\",value:ko(e)};case 64:return t=e.nextCharCode(),t<128&&1===yo[t]?(e.pos++,{type:\"AtKeyword\",name:vo(e)}):So(e);case 42:case 43:case 63:case 35:case 33:break;case go:if(t=e.nextCharCode(),t<48||t>57)return So(e);break;default:return So(e)}}function Io(e){let t=new class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return et})}};function Mo(e,t){return\"string\"==typeof e?function(e){let t=[];return Ur(e,((r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null}))),t}(e):t.generate(e,Po)}var Oo={type:\"Match\"},Uo={type:\"Mismatch\"},Do={type:\"DisallowEmpty\"};function Fo(e,t,r){return t===Oo&&r===Uo||e===Oo&&t===Oo&&r===Oo?e:(\"If\"===e.type&&e.else===Uo&&t===Oo&&(t=e.then,e=e.match),{type:\"If\",match:e,then:t,else:r})}function qo(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function jo(e){return\"Keyword\"===e.type||\"AtKeyword\"===e.type||\"Function\"===e.type||\"Type\"===e.type&&qo(e.name)}function Bo(e,t,r){switch(e){case\" \":{let e=Oo;for(let r=t.length-1;r>=0;r--){e=Fo(t[r],e,Uo)}return e}case\"|\":{let e=Uo,r=null;for(let n=t.length-1;n>=0;n--){let o=t[n];if(jo(o)&&(null===r&&n>0&&jo(t[n-1])&&(r=Object.create(null),e=Fo({type:\"Enum\",map:r},Oo,e)),null!==r)){let e=(qo(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in r)){r[e]=o;continue}}r=null,e=Fo(o,Oo,e)}return e}case\"&&\":{if(t.length>5)return{type:\"MatchOnce\",terms:t,all:!0};let r=Uo;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?Bo(e,t.filter((function(e){return e!==i})),!1):Oo,r=Fo(i,o,r)}return r}case\"||\":{if(t.length>5)return{type:\"MatchOnce\",terms:t,all:!1};let n=r?Oo:Uo;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?Bo(e,t.filter((function(e){return e!==i})),!0):Oo,n=Fo(i,o,n)}return n}}}function Ho(e){if(\"function\"==typeof e)return{type:\"Generic\",fn:e};switch(e.type){case\"Group\":{let t=Bo(e.combinator,e.terms.map(Ho),!1);return e.disallowEmpty&&(t=Fo(t,Do,Uo)),t}case\"Multiplier\":return function(e){let t=Oo,r=Ho(e.term);if(0===e.max)r=Fo(r,Do,Uo),t=Fo(r,null,Uo),t.then=Fo(Oo,Oo,t),e.comma&&(t.then.else=Fo({type:\"Comma\",syntax:e},t,Uo));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==Oo&&(t=Fo({type:\"Comma\",syntax:e},t,Uo)),t=Fo(r,Fo(Oo,Oo,t),Uo);if(0===e.min)t=Fo(Oo,Oo,t);else for(let n=0;n=65&&o<=90&&(o|=32),o!==n)return!1}return!0}function Yo(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&\"?\"!==e.value}(e))}function Jo(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type&&\"/\"===e.value)}function Qo(e,t,r){let n=function(e,t,r){function n(){do{y++,g=yb&&(b=y)}function c(){k=2===k.type?k.prev:{type:3,syntax:u.syntax,token:k.token,prev:k},u=u.prev}let u=null,h=null,d=null,p=null,m=0,f=null,g=null,y=-1,b=0,k={type:0,syntax:null,token:null,prev:null};for(n();null===f&&++m<15e3;)switch(t.type){case\"Match\":if(null===h){if(null!==g&&(y!==e.length-1||\"\\\\0\"!==g.value&&\"\\\\9\"!==g.value)){t=Uo;break}f=$o;break}if((t=h.nextState)===Do){if(h.matchStack===k){t=Uo;break}t=Oo}for(;h.syntaxStack!==u;)c();h=h.prev;break;case\"Mismatch\":if(null!==p&&!1!==p)(null===d||y>d.tokenIndex)&&(d=p,p=!1);else if(null===d){f=\"Mismatch\";break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,y=d.tokenIndex,g=yy){for(;y\":\"<'\"+t.name+\"'>\"));if(!1!==p&&null!==g&&\"Type\"===t.type&&(\"custom-ident\"===t.name&&1===g.type||\"length\"===t.name&&\"0\"===g.value)){null===p&&(p=i(t,d)),t=Uo;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:2,syntax:t.syntax,token:k.token,prev:k},t=n.match;break}case\"Keyword\":{let e=t.name;if(null!==g){let r=g.value;if(-1!==r.indexOf(\"\\\\\")&&(r=r.replace(/\\\\[09].*$/,\"\")),Go(r,e)){l(),t=Oo;break}}t=Uo;break}case\"AtKeyword\":case\"Function\":if(null!==g&&Go(g.value,t.name)){l(),t=Oo;break}t=Uo;break;case\"Token\":if(null!==g&&g.value===t.value){l(),t=Oo;break}t=Uo;break;case\"Comma\":null!==g&&18===g.type?Yo(k.token)?t=Uo:(l(),t=Jo(g)?Uo:Oo):t=Yo(k.token)||Jo(g)?Oo:Uo;break;case\"String\":let n=\"\",m=y;for(;m\"Type\"===e.type&&e.name===t))}function ei(e,t){return ri(this,e,(e=>\"Property\"===e.type&&e.name===t))}function ti(e){return ri(this,e,(e=>\"Keyword\"===e.type))}function ri(e,t,r){let n=Zo.call(e,t);return null!==n&&n.some(r)}function ni(e){return\"node\"in e?e.node:ni(e.match[0])}function oi(e){return\"node\"in e?e.node:oi(e.match[e.match.length-1])}function ii(e,t,r,n,o){let i=[];return null!==r.matched&&function r(a){if(null!==a.syntax&&a.syntax.type===n&&a.syntax.name===o){let r=ni(a),n=oi(a);e.syntax.walk(t,(function(e,t,o){if(e===r){let e=new Fr;do{if(e.appendData(t.data),t.data===n)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}}))}Array.isArray(a.match)&&a.match.forEach(r)}(r.matched),i}Et(Ko,{getTrace:()=>Zo,isKeyword:()=>ti,isProperty:()=>ei,isType:()=>Xo});var{hasOwnProperty:ai}=Object.prototype;function si(e){return\"number\"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function li(e){return Boolean(e)&&si(e.offset)&&si(e.line)&&si(e.column)}function ci(e,t){return function(r,n){if(!r||r.constructor!==Object)return n(r,\"Type of node should be an Object\");for(let o in r){let i=!0;if(!1!==ai.call(r,o)){if(\"type\"===o)r.type!==e&&n(r,\"Wrong node type `\"+r.type+\"`, expected `\"+e+\"`\");else if(\"loc\"===o){if(null===r.loc)continue;if(r.loc&&r.loc.constructor===Object)if(\"string\"!=typeof r.loc.source)o+=\".source\";else if(li(r.loc.start)){if(li(r.loc.end))continue;o+=\".end\"}else o+=\".start\";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e\");else{if(!Array.isArray(n))throw new Error(\"Wrong value `\"+n+\"` in `\"+e+\".\"+t+\"` structure definition\");i.push(\"List\")}}o[t]=i.join(\" | \")}return{docs:o,check:ci(e,n)}}var hi=Vo(Pn.join(\" | \"));function di(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:wn(e[o].syntax,{compact:t}));return n}function pi(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:wn(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&di(i.descriptors,t,r)};return n}function mi(e,t,r){return wt({matched:e,iterations:r,error:t},Ko)}function fi(e,t,r,n){let o,i=Mo(r,e.syntax);return function(e){for(let t=0;t(Object.defineProperty(i,\"syntax\",{value:Io(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,\"match\",{get:()=>(Object.defineProperty(i,\"match\",{value:Vo(i.syntax,o)}),i.match)})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:\"Atrule\",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,\"AtrulePrelude\",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((r,n)=>(r[n]=this.createDescriptor(t.descriptors[n],\"AtruleDescriptor\",n,e),r)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,\"Property\",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,\"Type\",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Sn(\"Unknown at-rule\",\"@\"+e)}checkAtrulePrelude(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e);return!n.prelude&&t?new SyntaxError(\"At-rule `@\"+e+\"` should not contain a prelude\"):!n.prelude||t||fi(this,n.prelude,\"\",!1).matched?void 0:new SyntaxError(\"At-rule `@\"+e+\"` should contain a prelude\")}checkAtruleDescriptorName(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e),o=_n(t);return n.descriptors?n.descriptors[o.name]||n.descriptors[o.basename]?void 0:new Sn(\"Unknown at-rule descriptor\",t):new SyntaxError(\"At-rule `@\"+e+\"` has no known descriptors\")}checkPropertyName(e){if(!this.getProperty(e))return new Sn(\"Unknown property\",e)}matchAtrulePrelude(e,t){let r=this.checkAtrulePrelude(e,t);if(r)return mi(null,r);let n=this.getAtrule(e);return n.prelude?fi(this,n.prelude,t||\"\",!1):mi(null,null)}matchAtruleDescriptor(e,t,r){let n=this.checkAtruleDescriptorName(e,t);if(n)return mi(null,n);let o=this.getAtrule(e),i=_n(t);return fi(this,o.descriptors[i.name]||o.descriptors[i.basename],r,!1)}matchDeclaration(e){return\"Declaration\"!==e.type?mi(null,new Error(\"Not a Declaration node\")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(In(e).custom)return mi(null,new Error(\"Lexer matching doesn't applicable for custom properties\"));let r=this.checkPropertyName(e);return r?mi(null,r):fi(this,this.getProperty(e),t,!0)}matchType(e,t){let r=this.getType(e);return r?fi(this,r,t,!1):mi(null,new Sn(\"Unknown type\",e))}match(e,t){return\"string\"==typeof e||e&&e.type?((\"string\"==typeof e||!e.match)&&(e=this.createDescriptor(e,\"Type\",\"anonymous\")),fi(this,e,t,!1)):mi(null,new Sn(\"Bad syntax\"))}findValueFragments(e,t,r,n){return ii(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return ii(this,e.value,this.matchDeclaration(e),t,r)}findAllFragments(e,t,r){let n=[];return this.syntax.walk(e,{visit:\"Declaration\",enter:e=>{n.push.apply(n,this.findDeclarationValueFragments(e,t,r))}}),n}getAtrule(e,t=!0){let r=_n(e);return(r.vendor&&t?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(e,t=!0){let r=this.getAtrule(e,t);return r&&r.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let r=In(e);return(r.vendor&&t?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(n,o,i,a){if(i.has(o))return i.get(o);i.set(o,!1),null!==a.syntax&&zo(a.syntax,(function(a){if(\"Type\"!==a.type&&\"Property\"!==a.type)return;let s=\"Type\"===a.type?n.types:n.properties,l=\"Type\"===a.type?t:r;(!hasOwnProperty.call(s,a.name)||e(n,a.name,l,s[a.name]))&&i.set(o,!0)}),this)}let t=new Map,r=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let t in this.properties)e(this,t,r,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),r=[...r.keys()].filter((e=>r.get(e))),t.length||r.length?{types:t,properties:r}:null}dump(e,t){return{generic:this.generic,units:this.units,types:di(this.types,!t,e),properties:di(this.properties,!t,e),atrules:pi(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function yi(e,t){return\"string\"==typeof t&&/^\\s*\\|/.test(t)?\"string\"==typeof e?e+t:t.replace(/^\\s*\\|\\s*/,\"\"):t||null}function bi(e,t){let r=Object.create(null);for(let[n,o]of Object.entries(e))if(o){r[n]={};for(let e of Object.keys(o))t.includes(e)&&(r[n][e]=o[e])}return r}function ki(e,t){let r=wt({},e);for(let[n,o]of Object.entries(t))switch(n){case\"generic\":r[n]=Boolean(o);break;case\"units\":r[n]=wt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Array.isArray(t)?t:[];break;case\"atrules\":r[n]=wt({},e[n]);for(let[e,t]of Object.entries(o)){let o=r[n][e]||{},i=r[n][e]={prelude:o.prelude||null,descriptors:wt({},o.descriptors)};if(t){i.prelude=t.prelude?yi(i.prelude,t.prelude):i.prelude||null;for(let[e,r]of Object.entries(t.descriptors||{}))i.descriptors[e]=r?yi(i.descriptors[e],r):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case\"types\":case\"properties\":r[n]=wt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=yi(r[n][e],t);break;case\"scope\":r[n]=wt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=wt(wt({},r[n][e]),t);break;case\"parseContext\":r[n]=wt(wt({},e[n]),o);break;case\"atrule\":case\"pseudo\":r[n]=wt(wt({},e[n]),bi(o,[\"parse\"]));break;case\"node\":r[n]=wt(wt({},e[n]),bi(o,[\"name\",\"structure\",\"parse\",\"generate\",\"walkContext\"]))}return r}function vi(e){let t=Yr(e),r=bn(e),n=un(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&!(e.children instanceof Fr)&&(e.children=(new Fr).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof Fr&&(e.children=e.children.toArray())}}),t)}}(r),a={lexer:null,createLexer:e=>new gi(e,a,a.lexer.structure),tokenize:Ur,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let r=ki({},e);return vi(\"function\"==typeof t?t(r,Object.assign):ki(r,t))}};return a.lexer=new gi({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var wi=e=>vi(ki({},e)),xi={};Et(xi,{AnPlusB:()=>Ai,Atrule:()=>Oi,AtrulePrelude:()=>Vi,AttributeSelector:()=>Qi,Block:()=>na,Brackets:()=>pa,CDC:()=>ba,CDO:()=>Aa,ClassSelector:()=>Ra,Combinator:()=>za,Comment:()=>Da,Declaration:()=>Ha,DeclarationList:()=>es,Dimension:()=>as,Function:()=>hs,Hash:()=>ys,IdSelector:()=>Rs,Identifier:()=>As,MediaFeature:()=>zs,MediaQuery:()=>Ds,MediaQueryList:()=>Hs,NestingSelector:()=>Ys,Nth:()=>Xs,Number:()=>ol,Operator:()=>cl,Parentheses:()=>ml,Percentage:()=>kl,PseudoClassSelector:()=>El,PseudoElementSelector:()=>Il,Ratio:()=>Ol,Raw:()=>Bl,Rule:()=>Yl,Selector:()=>rc,SelectorList:()=>sc,String:()=>pc,StyleSheet:()=>wc,TypeSelector:()=>Rc,UnicodeRange:()=>Pc,Url:()=>Hc,Value:()=>Kc,WhiteSpace:()=>ru});var Ai={};Et(Ai,{generate:()=>Mi,name:()=>Ni,parse:()=>Pi,structure:()=>zi});var Ei=43,Si=45,Ti=110,Ci=!0;function Ri(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===Ei||n===Si)&&(t&&this.error(\"Number sign is not allowed\"),r++);r0&&this.skip(e),0===t&&(r=this.charCodeAt(this.tokenStart),r!==Ei&&r!==Si&&this.error(\"Number sign is expected\")),_i.call(this,0!==t),t===Si?\"-\"+this.consume(10):this.consume(10)}var Ni=\"AnPlusB\",zi={a:[String,null],b:[String,null]};function Pi(){let e=this.tokenStart,t=null,r=null;if(10===this.tokenType)_i.call(this,false),r=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,Si))switch(t=\"-1\",Ii.call(this,1,Ti),this.tokenEnd-this.tokenStart){case 2:this.next(),r=Li.call(this);break;case 3:Ii.call(this,2,Si),this.next(),this.skipSC(),_i.call(this,Ci),r=\"-\"+this.consume(10);break;default:Ii.call(this,2,Si),Ri.call(this,3,Ci),this.next(),r=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(Ei)&&1===this.lookupType(1)){let n=0;switch(t=\"1\",this.isDelim(Ei)&&(n=1,this.next()),Ii.call(this,0,Ti),this.tokenEnd-this.tokenStart){case 1:this.next(),r=Li.call(this);break;case 2:Ii.call(this,1,Si),this.next(),this.skipSC(),_i.call(this,Ci),r=\"-\"+this.consume(10);break;default:Ii.call(this,1,Si),Ri.call(this,2,Ci),this.next(),r=this.substrToCursor(e+n+1)}}else if(12===this.tokenType){let n=this.charCodeAt(this.tokenStart),o=n===Ei||n===Si,i=this.tokenStart+o;for(;iHi,name:()=>Fi,parse:()=>Bi,structure:()=>ji,walkContext:()=>qi});var Fi=\"Atrule\",qi=\"atrule\",ji={name:String,prelude:[\"AtrulePrelude\",\"Raw\",null],block:[\"Block\",null]};function Bi(e=!1){let t,r,n=this.tokenStart,o=null,i=null;switch(this.eat(3),t=this.substrToCursor(n+1),r=t.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(o=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,t,e),Ui):Ui.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:i=hasOwnProperty.call(this.atrule,r)&&\"function\"==typeof this.atrule[r].block?this.atrule[r].block.call(this,e):this.Block(Di.call(this))}return{type:\"Atrule\",loc:this.getLocation(n,this.tokenStart),name:t,prelude:o,block:i}}function Hi(e){this.token(3,\"@\"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,\";\")}var Vi={};Et(Vi,{generate:()=>Ji,name:()=>Wi,parse:()=>Yi,structure:()=>Gi,walkContext:()=>$i});var Wi=\"AtrulePrelude\",$i=\"atrulePrelude\",Gi={children:[[]]};function Yi(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&\"function\"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error(\"Semicolon or block is expected\"),{type:\"AtrulePrelude\",loc:this.getLocationFromList(t),children:t}}function Ji(e){this.children(e)}var Qi={};Et(Qi,{generate:()=>ra,name:()=>Xi,parse:()=>ta,structure:()=>ea});function Ki(){this.eof&&this.error(\"Unexpected end of input\");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error(\"Identifier is expected\",this.tokenEnd):t&&this.error(\"Vertical line is expected\"),{type:\"Identifier\",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Zi(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error(\"Attribute selector (=, ~=, ^=, $=, *=, |=) is expected\"),this.next(),61!==t&&(this.isDelim(61)||this.error(\"Equal sign is expected\"),this.next()),this.substrToCursor(e)}var Xi=\"AttributeSelector\",ea={name:\"Identifier\",matcher:[String,null],value:[\"String\",\"Identifier\",null],flags:[String,null]};function ta(){let e,t=this.tokenStart,r=null,n=null,o=null;return this.eat(19),this.skipSC(),e=Ki.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(r=Zi.call(this),this.skipSC(),n=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(t,this.tokenStart),name:e,matcher:r,value:n,flags:o}}function ra(e){this.token(9,\"[\"),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,\"]\")}var na={};Et(na,{generate:()=>da,name:()=>la,parse:()=>ha,structure:()=>ua,walkContext:()=>ca});function oa(e){return this.Raw(e,null,!0)}function ia(){return this.parseWithFallback(this.Rule,oa)}function aa(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function sa(){if(17===this.tokenType)return aa.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,aa);return 17===this.tokenType&&this.next(),e}var la=\"Block\",ca=\"block\",ua={children:[[\"Atrule\",\"Rule\",\"Declaration\"]]};function ha(e){let t=e?sa:ia,r=this.tokenStart,n=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule.bind(this,e),oa));break;default:e&&this.isDelim(38)?n.push(ia.call(this)):n.push(t.call(this))}return this.eof||this.eat(24),{type:\"Block\",loc:this.getLocation(r,this.tokenStart),children:n}}function da(e){this.token(23,\"{\"),this.children(e,(e=>{\"Declaration\"===e.type&&this.token(17,\";\")})),this.token(24,\"}\")}var pa={};Et(pa,{generate:()=>ya,name:()=>ma,parse:()=>ga,structure:()=>fa});var ma=\"Brackets\",fa={children:[[]]};function ga(e,t){let r=this.tokenStart,n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:\"Brackets\",loc:this.getLocation(r,this.tokenStart),children:n}}function ya(e){this.token(9,\"[\"),this.children(e),this.token(9,\"]\")}var ba={};Et(ba,{generate:()=>xa,name:()=>ka,parse:()=>wa,structure:()=>va});var ka=\"CDC\",va=[];function wa(){let e=this.tokenStart;return this.eat(15),{type:\"CDC\",loc:this.getLocation(e,this.tokenStart)}}function xa(){this.token(15,\"--\\x3e\")}var Aa={};Et(Aa,{generate:()=>Ca,name:()=>Ea,parse:()=>Ta,structure:()=>Sa});var Ea=\"CDO\",Sa=[];function Ta(){let e=this.tokenStart;return this.eat(14),{type:\"CDO\",loc:this.getLocation(e,this.tokenStart)}}function Ca(){this.token(14,\"\\x3c!--\")}var Ra={};Et(Ra,{generate:()=>Na,name:()=>_a,parse:()=>La,structure:()=>Ia});var _a=\"ClassSelector\",Ia={name:String};function La(){return this.eatDelim(46),{type:\"ClassSelector\",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Na(e){this.token(9,\".\"),this.token(1,e.name)}var za={};Et(za,{generate:()=>Ua,name:()=>Pa,parse:()=>Oa,structure:()=>Ma});var Pa=\"Combinator\",Ma={name:String};function Oa(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=\" \";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent(\"deep\"),this.eatDelim(47);break;default:this.error(\"Combinator is expected\")}e=this.substrToCursor(t)}return{type:\"Combinator\",loc:this.getLocation(t,this.tokenStart),name:e}}function Ua(e){this.tokenize(e.name)}var Da={};Et(Da,{generate:()=>Ba,name:()=>Fa,parse:()=>ja,structure:()=>qa});var Fa=\"Comment\",qa={value:String};function ja(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:\"Comment\",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Ba(e){this.token(25,\"/*\"+e.value+\"*/\")}var Ha={};Et(Ha,{generate:()=>Ka,name:()=>Ga,parse:()=>Qa,structure:()=>Ja,walkContext:()=>Ya});function Va(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Wa(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function $a(){let e=this.tokenIndex,t=this.Value();return\"Raw\"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Ga=\"Declaration\",Ya=\"declaration\",Ja={important:[Boolean,String],property:String,value:[\"Value\",\"Raw\"]};function Qa(){let e,t=this.tokenStart,r=this.tokenIndex,n=Za.call(this),o=Nn(n),i=o?this.parseCustomProperty:this.parseValue,a=o?Wa:Va,s=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback($a,a):a.call(this,this.tokenIndex),o&&\"Value\"===e.type&&e.children.isEmpty)for(let t=l-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:\"WhiteSpace\",loc:null,value:\" \"});break}return this.isDelim(33)&&(s=Xa.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(r)&&this.error(),{type:\"Declaration\",loc:this.getLocation(t,this.tokenStart),important:s,property:n,value:e}}function Ka(e){this.token(1,e.property),this.token(16,\":\"),this.node(e.value),e.important&&(this.token(9,\"!\"),this.token(1,!0===e.important?\"important\":e.important))}function Za(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Xa(){this.eat(9),this.skipSC();let e=this.consume(1);return\"important\"===e||e}var es={};Et(es,{generate:()=>is,name:()=>rs,parse:()=>os,structure:()=>ns});function ts(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var rs=\"DeclarationList\",ns={children:[[\"Declaration\",\"Atrule\",\"Rule\"]]};function os(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),ts));break;default:this.isDelim(38)?e.push(this.parseWithFallback(this.Rule,ts)):e.push(this.parseWithFallback(this.Declaration,ts))}return{type:\"DeclarationList\",loc:this.getLocationFromList(e),children:e}}function is(e){this.children(e,(e=>{\"Declaration\"===e.type&&this.token(17,\";\")}))}var as={};Et(as,{generate:()=>us,name:()=>ss,parse:()=>cs,structure:()=>ls});var ss=\"Dimension\",ls={value:String,unit:String};function cs(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:\"Dimension\",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function us(e){this.token(12,e.value+e.unit)}var hs={};Et(hs,{generate:()=>gs,name:()=>ds,parse:()=>fs,structure:()=>ms,walkContext:()=>ps});var ds=\"Function\",ps=\"function\",ms={name:String,children:[[]]};function fs(e,t){let r,n=this.tokenStart,o=this.consumeFunctionName(),i=o.toLowerCase();return r=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:\"Function\",loc:this.getLocation(n,this.tokenStart),name:o,children:r}}function gs(e){this.token(2,e.name+\"(\"),this.children(e),this.token(22,\")\")}var ys={};Et(ys,{generate:()=>xs,name:()=>ks,parse:()=>ws,structure:()=>vs,xxx:()=>bs});var bs=\"XXX\",ks=\"Hash\",vs={value:String};function ws(){let e=this.tokenStart;return this.eat(4),{type:\"Hash\",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function xs(e){this.token(4,\"#\"+e.value)}var As={};Et(As,{generate:()=>Cs,name:()=>Es,parse:()=>Ts,structure:()=>Ss});var Es=\"Identifier\",Ss={name:String};function Ts(){return{type:\"Identifier\",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Cs(e){this.token(1,e.name)}var Rs={};Et(Rs,{generate:()=>Ns,name:()=>_s,parse:()=>Ls,structure:()=>Is});var _s=\"IdSelector\",Is={name:String};function Ls(){let e=this.tokenStart;return this.eat(4),{type:\"IdSelector\",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Ns(e){this.token(9,\"#\"+e.name)}var zs={};Et(zs,{generate:()=>Us,name:()=>Ps,parse:()=>Os,structure:()=>Ms});var Ps=\"MediaFeature\",Ms={name:String,value:[\"Identifier\",\"Number\",\"Dimension\",\"Ratio\",null]};function Os(){let e,t=this.tokenStart,r=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;default:this.error(\"Number, dimension, ratio or identifier is expected\")}this.skipSC()}return this.eat(22),{type:\"MediaFeature\",loc:this.getLocation(t,this.tokenStart),name:e,value:r}}function Us(e){this.token(21,\"(\"),this.token(1,e.name),null!==e.value&&(this.token(16,\":\"),this.node(e.value)),this.token(22,\")\")}var Ds={};Et(Ds,{generate:()=>Bs,name:()=>Fs,parse:()=>js,structure:()=>qs});var Fs=\"MediaQuery\",qs={children:[[\"Identifier\",\"MediaFeature\",\"WhiteSpace\"]]};function js(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error(\"Identifier or parenthesis is expected\"),{type:\"MediaQuery\",loc:this.getLocationFromList(e),children:e}}function Bs(e){this.children(e)}var Hs={};Et(Hs,{generate:()=>Gs,name:()=>Vs,parse:()=>$s,structure:()=>Ws});var Vs=\"MediaQueryList\",Ws={children:[[\"MediaQuery\"]]};function $s(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:\"MediaQueryList\",loc:this.getLocationFromList(e),children:e}}function Gs(e){this.children(e,(()=>this.token(18,\",\")))}var Ys={};Et(Ys,{generate:()=>Zs,name:()=>Js,parse:()=>Ks,structure:()=>Qs});var Js=\"NestingSelector\",Qs={};function Ks(){let e=this.tokenStart;return this.eatDelim(38),{type:\"NestingSelector\",loc:this.getLocation(e,this.tokenStart)}}function Zs(){this.token(9,\"&\")}var Xs={};Et(Xs,{generate:()=>nl,name:()=>el,parse:()=>rl,structure:()=>tl});var el=\"Nth\",tl={nth:[\"AnPlusB\",\"Identifier\"],selector:[\"SelectorList\",null]};function rl(){this.skipSC();let e,t=this.tokenStart,r=t,n=null;return e=this.lookupValue(0,\"odd\")||this.lookupValue(0,\"even\")?this.Identifier():this.AnPlusB(),r=this.tokenStart,this.skipSC(),this.lookupValue(0,\"of\")&&(this.next(),n=this.SelectorList(),r=this.tokenStart),{type:\"Nth\",loc:this.getLocation(t,r),nth:e,selector:n}}function nl(e){this.node(e.nth),null!==e.selector&&(this.token(1,\"of\"),this.node(e.selector))}var ol={};Et(ol,{generate:()=>ll,name:()=>il,parse:()=>sl,structure:()=>al});var il=\"Number\",al={value:String};function sl(){return{type:\"Number\",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function ll(e){this.token(10,e.value)}var cl={};Et(cl,{generate:()=>pl,name:()=>ul,parse:()=>dl,structure:()=>hl});var ul=\"Operator\",hl={value:String};function dl(){let e=this.tokenStart;return this.next(),{type:\"Operator\",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function pl(e){this.tokenize(e.value)}var ml={};Et(ml,{generate:()=>bl,name:()=>fl,parse:()=>yl,structure:()=>gl});var fl=\"Parentheses\",gl={children:[[]]};function yl(e,t){let r=this.tokenStart,n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:\"Parentheses\",loc:this.getLocation(r,this.tokenStart),children:n}}function bl(e){this.token(21,\"(\"),this.children(e),this.token(22,\")\")}var kl={};Et(kl,{generate:()=>Al,name:()=>vl,parse:()=>xl,structure:()=>wl});var vl=\"Percentage\",wl={value:String};function xl(){return{type:\"Percentage\",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Al(e){this.token(11,e.value+\"%\")}var El={};Et(El,{generate:()=>_l,name:()=>Sl,parse:()=>Rl,structure:()=>Cl,walkContext:()=>Tl});var Sl=\"PseudoClassSelector\",Tl=\"function\",Cl={name:String,children:[[\"Raw\"],null]};function Rl(){let e,t,r=this.tokenStart,n=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:\"PseudoClassSelector\",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function _l(e){this.token(16,\":\"),null===e.children?this.token(1,e.name):(this.token(2,e.name+\"(\"),this.children(e),this.token(22,\")\"))}var Il={};Et(Il,{generate:()=>Ml,name:()=>Ll,parse:()=>Pl,structure:()=>zl,walkContext:()=>Nl});var Ll=\"PseudoElementSelector\",Nl=\"function\",zl={name:String,children:[[\"Raw\"],null]};function Pl(){let e,t,r=this.tokenStart,n=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:\"PseudoElementSelector\",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function Ml(e){this.token(16,\":\"),this.token(16,\":\"),null===e.children?this.token(1,e.name):(this.token(2,e.name+\"(\"),this.children(e),this.token(22,\")\"))}var Ol={};Et(Ol,{generate:()=>jl,name:()=>Dl,parse:()=>ql,structure:()=>Fl});function Ul(){this.skipSC();let e=this.consume(10);for(let t=0;t0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}Et(Bl,{generate:()=>Gl,name:()=>Vl,parse:()=>$l,structure:()=>Wl});var Vl=\"Raw\",Wl={value:String};function $l(e,t,r){let n,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n=r&&this.tokenStart>o?Hl.call(this):this.tokenStart,{type:\"Raw\",loc:this.getLocation(o,n),value:this.substring(o,n)}}function Gl(e){this.tokenize(e.value)}var Yl={};function Jl(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Ql(){let e=this.SelectorList();return\"Raw\"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}Et(Yl,{generate:()=>tc,name:()=>Kl,parse:()=>ec,structure:()=>Xl,walkContext:()=>Zl});var Kl=\"Rule\",Zl=\"rule\",Xl={prelude:[\"SelectorList\",\"Raw\"],block:[\"Block\"]};function ec(){let e,t,r=this.tokenIndex,n=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Ql,Jl):Jl.call(this,r),t=this.Block(!0),{type:\"Rule\",loc:this.getLocation(n,this.tokenStart),prelude:e,block:t}}function tc(e){this.node(e.prelude),this.node(e.block)}var rc={};Et(rc,{generate:()=>ac,name:()=>nc,parse:()=>ic,structure:()=>oc});var nc=\"Selector\",oc={children:[[\"TypeSelector\",\"IdSelector\",\"ClassSelector\",\"AttributeSelector\",\"PseudoClassSelector\",\"PseudoElementSelector\",\"Combinator\",\"WhiteSpace\"]]};function ic(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error(\"Selector is expected\"),{type:\"Selector\",loc:this.getLocationFromList(e),children:e}}function ac(e){this.children(e)}var sc={};Et(sc,{generate:()=>dc,name:()=>lc,parse:()=>hc,structure:()=>uc,walkContext:()=>cc});var lc=\"SelectorList\",cc=\"selector\",uc={children:[[\"Selector\",\"Raw\"]]};function hc(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:\"SelectorList\",loc:this.getLocationFromList(e),children:e}}function dc(e){this.children(e,(()=>this.token(18,\",\")))}var pc={};Et(pc,{generate:()=>vc,name:()=>yc,parse:()=>kc,structure:()=>bc});var mc={};Et(mc,{decode:()=>fc,encode:()=>gc});function fc(e){let t=e.length,r=e.charCodeAt(0),n=34===r||39===r?1:0,o=1===n&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1,i=\"\";for(let r=n;r<=o;r++){let n=e.charCodeAt(r);if(92===n){if(r===o){r!==t-1&&(i=e.substr(r+1));break}if(n=e.charCodeAt(++r),dr(92,n)){let t=r-1,n=Sr(e,t);r=n-1,i+=_r(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(r+1)&&r++}else i+=e[r]}return i}function gc(e,t){let r=t?\"'\":'\"',n=t?39:34,o=\"\",i=!1;for(let t=0;tCc,name:()=>Ac,parse:()=>Tc,structure:()=>Sc,walkContext:()=>Ec});function xc(e){return this.Raw(e,null,!1)}var Ac=\"StyleSheet\",Ec=\"stylesheet\",Sc={children:[[\"Comment\",\"CDO\",\"CDC\",\"Atrule\",\"Rule\",\"Raw\"]]};function Tc(){let e,t=this.tokenStart,r=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(33!==this.charCodeAt(this.tokenStart+2)){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,xc);break;default:e=this.parseWithFallback(this.Rule,xc)}r.push(e)}return{type:\"StyleSheet\",loc:this.getLocation(t,this.tokenStart),children:r}}function Cc(e){this.children(e)}var Rc={};Et(Rc,{generate:()=>zc,name:()=>Ic,parse:()=>Nc,structure:()=>Lc});function _c(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error(\"Identifier or asterisk is expected\"),this.next()}var Ic=\"TypeSelector\",Lc={name:String};function Nc(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),_c.call(this)):(_c.call(this),this.isDelim(124)&&(this.next(),_c.call(this))),{type:\"TypeSelector\",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function zc(e){this.tokenize(e.name)}var Pc={};Et(Pc,{generate:()=>Bc,name:()=>Fc,parse:()=>jc,structure:()=>qc});function Mc(e,t){let r=0;for(let n=this.tokenStart+e;n6&&this.error(\"Too many hex digits\",n)}return this.next(),r}function Oc(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error(\"Too many question marks\"),this.next()}function Uc(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?\"Plus sign\":\"Hyphen minus\")+\" is expected\")}function Dc(){let e=0;switch(this.tokenType){case 10:if(e=Mc.call(this,1,!0),this.isDelim(63)){Oc.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){Uc.call(this,45),Mc.call(this,1,!1);break}break;case 12:e=Mc.call(this,1,!0),e>0&&Oc.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){e=Mc.call(this,0,!0),e>0&&Oc.call(this,6-e);break}if(this.isDelim(63)){this.next(),Oc.call(this,5);break}this.error(\"Hex digit or question mark is expected\")}}var Fc=\"UnicodeRange\",qc={value:String};function jc(){let e=this.tokenStart;return this.eatIdent(\"u\"),Dc.call(this),{type:\"UnicodeRange\",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Bc(e){this.tokenize(e.value)}var Hc={};Et(Hc,{generate:()=>Qc,name:()=>Gc,parse:()=>Jc,structure:()=>Yc});var Vc={};Et(Vc,{decode:()=>Wc,encode:()=>$c});function Wc(e){let t=e.length,r=4,n=41===e.charCodeAt(t-1)?t-2:t-1,o=\"\";for(;rtu,name:()=>Zc,parse:()=>eu,structure:()=>Xc});var Zc=\"Value\",Xc={children:[[]]};function eu(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:\"Value\",loc:this.getLocation(e,this.tokenStart),children:t}}function tu(e){this.children(e)}var ru={};Et(ru,{generate:()=>su,name:()=>ou,parse:()=>au,structure:()=>iu});var nu=Object.freeze({type:\"WhiteSpace\",loc:null,value:\" \"}),ou=\"WhiteSpace\",iu={value:String};function au(){return this.eat(13),nu}function su(e){this.token(13,e.value)}var lu=xt(wt({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\":\"