| 1 |
- !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",n="single-file-image-loaded",r=globalThis.browser,a=(e,t,n)=>globalThis.addEventListener(e,t,n),o=e=>globalThis.dispatchEvent(e),s=globalThis.CustomEvent,i=globalThis.document,l=globalThis.Document;let c;if(c=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,i instanceof l&&r&&r.runtime&&r.runtime.getURL){a("single-file-new-font-face",(e=>{const t=e.detail,n=Object.assign({},t);delete n.src,c.set(JSON.stringify(n),t)})),a("single-file-delete-font",(e=>{const t=e.detail,n=Object.assign({},t);delete n.src,c.delete(JSON.stringify(n))})),a("single-file-clear-fonts",(()=>c=new Map));let e=i.createElement("script");e.src="data:,("+function(){"undefined"==typeof globalThis&&(window.globalThis=window);const e=globalThis.document,t=globalThis.console,n=e=>globalThis.dispatchEvent(e),r=globalThis.CustomEvent,a=globalThis.FileReader,o=globalThis.Blob,s=t&&t.warn&&((...e)=>t.warn(...e))||(()=>{}),i="single-file-new-font-face",l="single-file-delete-font",c="single-file-clear-fonts",u={family:"font-family",style:"font-style",weight:"font-weight",stretch:"font-stretch",unicodeRange:"unicode-range",variant:"font-variant",featureSettings:"font-feature-settings"};if(globalThis.FontFace){const t=globalThis.FontFace;let a;globalThis.FontFace=function(){return a||(s("SingleFile is hooking the FontFace constructor, document.fonts.delete and document.fonts.clear to handle dynamically loaded fonts."),a=!0),h(...arguments).then((e=>n(new r(i,{detail:e})))),new t(...arguments)},globalThis.FontFace.toString=function(){return"function FontFace() { [native code] }"};const o=e.fonts.delete;e.fonts.delete=function(t){return h(t.family).then((e=>n(new r(l,{detail:e})))),o.call(e.fonts,t)},e.fonts.delete.toString=function(){return"function delete() { [native code] }"};const u=e.fonts.clear;e.fonts.clear=function(){return n(new r(c)),u.call(e.fonts)},e.fonts.clear.toString=function(){return"function clear() { [native code] }"}}async function h(e,t,n){const r={};return r["font-family"]=e,r.src=t,n&&Object.keys(n).forEach((e=>{u[e]&&(r[u[e]]=n[e])})),new Promise((e=>{if(r.src instanceof ArrayBuffer){const t=new a;t.readAsDataURL(new o([r.src])),t.addEventListener("load",(()=>{r.src="url("+t.result+")",e(r)}))}else e(r)}))}}.toString()+")()",(i.documentElement||i).appendChild(e),e.remove(),e=i.createElement("script"),e.src=r.runtime.getURL("/dist/web/hooks/hooks-frames-web.js"),e.async=!1,(i.documentElement||i).appendChild(e),e.remove()}function u(){return Array.from(c.values())}function h(e){e.loadDeferredImagesBlockCookies&&o(new s("single-file-block-cookies-start")),e.loadDeferredImagesBlockStorage&&o(new s("single-file-block-storage-start")),e.loadDeferredImagesKeepZoomLevel?o(new s("single-file-load-deferred-images-keep-zoom-level-start")):o(new s("single-file-load-deferred-images-start"))}function d(e){e.loadDeferredImagesBlockCookies&&o(new s("single-file-block-cookies-end")),e.loadDeferredImagesBlockStorage&&o(new s("single-file-block-storage-end")),e.loadDeferredImagesKeepZoomLevel?o(new s("single-file-load-deferred-images-keep-zoom-level-end")):o(new s("single-file-load-deferred-images-end"))}function p(e){e.loadDeferredImagesKeepZoomLevel?o(new s("single-file-load-deferred-images-keep-zoom-level-reset")):o(new s("single-file-load-deferred-images-reset"))}var m=Object.freeze({__proto__:null,getFontsData:u,loadDeferredImagesStart:h,loadDeferredImagesEnd:d,loadDeferredImagesResetZoomLevel:p,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:n});const f=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function g(e){return e.replace(f,((e,t,n)=>{const r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}))}var y=Object.freeze({__proto__:null,process:g});const b="single-file-on-before-capture",v="single-file-on-after-capture",k="data-single-file-removed-content",w="data-single-file-hidden-content",x="data-single-file-kept-content",S="data-single-file-hidden-frame",E="data-single-file-preserved-space-element",A="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-canvas",I="data-single-file-import",L="data-single-file-movable-style",P="data-single-file-input-value",N="data-single-file-lazy-loaded-src",z="data-single-file-stylesheet",M="data-single-file-disabled-noscript",O="data-single-file-selected-content",D="data-single-file-async-script",U="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",F=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD"],B=/^'(.*?)'$/,q=/^"(.*?)"$/,j={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},H="Page saved with SingleFile",W="Archive processed by SingleFile",$="single-file-ui-element",V=(e,t,n)=>globalThis.addEventListener(e,t,n);function Y(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function G(e,t,n){let r;return e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(M,e.textContent),e.textContent=""})),Y(e),e.head&&e.head.querySelectorAll(U).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+U+", html > body > "+U);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))})),t&&e.documentElement?(r=K(t,e,e.documentElement,n),n.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const n=t.getComputedStyle(e);n&&X(e,n)&&(e.setAttribute(L,""),r.markedElements.push(e))}))):r={canvases:[],images:[],posters:[],usedFonts:[],shadowRoots:[],imports:[],markedElements:[]},{canvases:r.canvases,fonts:u(),stylesheets:te(e),images:r.images,posters:r.posters,usedFonts:Array.from(r.usedFonts.values()),shadowRoots:r.shadowRoots,imports:r.imports,referrer:e.referrer,markedElements:r.markedElements}}function K(e,t,n,r,a={usedFonts:new Map,canvases:[],images:[],posters:[],shadowRoots:[],imports:[],markedElements:[]},o){const s=Array.from(n.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement));return s.forEach((n=>{let s,i,l;if(!r.autoSaveExternalSave&&(r.removeHiddenElements||r.removeUnusedFonts||r.compressHTML)&&(l=e.getComputedStyle(n),n instanceof e.HTMLElement&&r.removeHiddenElements&&(i=(o||n.closest("html > head"))&&F.includes(n.tagName)||n.closest("details"),i||(s=o||X(n,l),s&&(n.setAttribute(w,""),a.markedElements.push(n)))),!s)){if(r.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(n.setAttribute(E,""),a.markedElements.push(n))}r.removeUnusedFonts&&(Q(l,r,a.usedFonts),Q(e.getComputedStyle(n,":first-letter"),r,a.usedFonts),Q(e.getComputedStyle(n,":before"),r,a.usedFonts),Q(e.getComputedStyle(n,":after"),r,a.usedFonts))}!function(e,t,n,r,a,o,s){if("CANVAS"==n.tagName)try{a.canvases.push({dataURI:n.toDataURL("image/png","")}),n.setAttribute(_,a.canvases.length-1),a.markedElements.push(n)}catch(e){}if("IMG"==n.tagName){const t={currentSrc:o?"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==":r.loadDeferredImages&&n.getAttribute(N)||n.currentSrc};if(a.images.push(t),n.setAttribute(C,a.images.length-1),a.markedElements.push(n),n.removeAttribute(N),s=s||e.getComputedStyle(n)){t.size=function(e,t,n){let r=t.naturalWidth,a=t.naturalHeight;if(!r&&!a){const o=null==t.getAttribute("style");let s,i,l,c,u,h,d,p,m=!1;if("content-box"==(n=n||e.getComputedStyle(t)).getPropertyValue("box-sizing")){const e=t.style.getPropertyValue("box-sizing"),n=t.style.getPropertyPriority("box-sizing"),r=t.clientWidth;t.style.setProperty("box-sizing","border-box","important"),m=t.clientWidth!=r,e?t.style.setProperty("box-sizing",e,n):t.style.removeProperty("box-sizing")}s=ne("padding-left",n),i=ne("padding-right",n),l=ne("padding-top",n),c=ne("padding-bottom",n),m?(u=ne("border-left-width",n),h=ne("border-right-width",n),d=ne("border-top-width",n),p=ne("border-bottom-width",n)):u=h=d=p=0,r=Math.max(0,t.clientWidth-s-i-u-h),a=Math.max(0,t.clientHeight-l-c-d-p),o&&t.removeAttribute("style")}return{pxWidth:r,pxHeight:a}}(e,n,s);const r=s.getPropertyValue("box-shadow"),a=s.getPropertyValue("background-image");r&&"none"!=r||a&&"none"!=a||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=s.getPropertyValue("background-color"),t.objectFit=s.getPropertyValue("object-fit"),t.boxSizing=s.getPropertyValue("box-sizing"),t.objectPosition=s.getPropertyValue("object-position"))}}if("VIDEO"==n.tagName&&!n.poster){const e=t.createElement("canvas"),r=e.getContext("2d");e.width=n.clientWidth,e.height=n.clientHeight;try{r.drawImage(n,0,0,e.width,e.height),a.posters.push(e.toDataURL("image/png","")),n.setAttribute(R,a.posters.length-1),a.markedElements.push(n)}catch(e){}}"IFRAME"==n.tagName&&o&&r.removeHiddenElements&&(n.setAttribute(S,""),a.markedElements.push(n));"LINK"==n.tagName&&n.import&&n.import.documentElement&&(a.imports.push({content:re(n.import)}),n.setAttribute(I,a.imports.length-1),a.markedElements.push(n));"INPUT"==n.tagName&&("password"!=n.type&&(n.setAttribute(P,n.value),a.markedElements.push(n)),"radio"!=n.type&&"checkbox"!=n.type||(n.setAttribute(P,n.checked),a.markedElements.push(n)));"TEXTAREA"==n.tagName&&(n.setAttribute(P,n.value),a.markedElements.push(n));"SELECT"==n.tagName&&n.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(P,""),a.markedElements.push(e))}));"SCRIPT"==n.tagName&&(n.async&&""!=n.getAttribute("async")&&"async"!=n.getAttribute("async")&&(n.setAttribute(D,""),a.markedElements.push(n)),n.textContent=n.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,n,r,a,s,l);const c=!(n instanceof e.SVGElement)&&J(n);if(c&&!n.classList.contains($)){const o={};n.setAttribute(A,a.shadowRoots.length),a.markedElements.push(n),a.shadowRoots.push(o),K(e,t,c,r,a,s),o.content=c.innerHTML,o.delegatesFocus=c.delegatesFocus,o.mode=c.mode,c.adoptedStyleSheets&&c.adoptedStyleSheets.length&&(o.adoptedStyleSheets=Array.from(c.adoptedStyleSheets).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join("\n"))))}K(e,t,n,r,a,s),!r.autoSaveExternalSave&&r.removeHiddenElements&&o&&(i||""==n.getAttribute(x)?n.parentElement&&(n.parentElement.setAttribute(x,""),a.markedElements.push(n.parentElement)):s&&(n.setAttribute(k,""),a.markedElements.push(n)))})),a}function Q(e,t,n){if(e){const r=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((a=>{if(a=Z(a),!t.loadedFonts||t.loadedFonts.find((e=>Z(e.family)==a&&e.style==r))){const t=oe(e.getPropertyValue("font-weight")),o=e.getPropertyValue("font-variant")||"normal",s=[a,t,r,o];n.set(JSON.stringify(s),[a,t,r,o])}}))}}function J(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 Z(e=""){return ae(g(e.trim())).toLowerCase()}function X(e,t){let n=!1;if(t){const r=t.getPropertyValue("display"),a=t.getPropertyValue("opacity"),o=t.getPropertyValue("visibility");if(n="none"==r,!n&&("0"==a||"hidden"==o)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();n=!t.width&&!t.height}}return Boolean(n)}function ee(e,t){if(e.querySelectorAll("[data-single-file-disabled-noscript]").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 n=[k,S,w,E,C,R,_,P,A,I,z,D];t=e.querySelectorAll(n.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(k),e.removeAttribute(w),e.removeAttribute(x),e.removeAttribute(S),e.removeAttribute(E),e.removeAttribute(C),e.removeAttribute(R),e.removeAttribute(_),e.removeAttribute(P),e.removeAttribute(A),e.removeAttribute(I),e.removeAttribute(z),e.removeAttribute(D),e.removeAttribute(L)}))}function te(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((n,r)=>{try{const a=e.createElement("style");a.textContent=n.textContent,e.body.appendChild(a);const o=a.sheet;a.remove(),o&&o.cssRules.length==n.sheet.cssRules.length||(n.setAttribute(z,r),t[r]=Array.from(n.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function ne(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function re(e){const t=e.doctype;let n="";return t&&(n="<!DOCTYPE "+t.nodeName,t.publicId?(n+=' PUBLIC "'+t.publicId+'"',t.systemId&&(n+=' "'+t.systemId+'"')):t.systemId&&(n+=' SYSTEM "'+t.systemId+'"'),t.internalSubset&&(n+=" ["+t.internalSubset+"]"),n+="> "),n+e.documentElement.outerHTML}function ae(e){return(e=e.match(B)?e.replace(B,"$1"):e.replace(q,"$1")).trim()}function oe(e){return j[e.toLowerCase().trim()]||e}function se(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?se(t):t)),[])}var ie=Object.freeze({__proto__:null,initUserScriptHandler:function(){V("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),n=new Promise((t=>V(e+"-response",t)));(e=>{globalThis.dispatchEvent(e)})(t),t.defaultPrevented&&await n}))},initDoc:Y,preProcessDoc:G,postProcessDoc:ee,serialize:re,removeQuotes:ae,flatten:se,getFontWeight:oe,normalizeFontFamily:Z,getShadowRoot:J,ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:v,WIN_ID_ATTRIBUTE_NAME:T,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:E,REMOVED_CONTENT_ATTRIBUTE_NAME:k,HIDDEN_CONTENT_ATTRIBUTE_NAME:w,HIDDEN_FRAME_ATTRIBUTE_NAME:S,IMAGE_ATTRIBUTE_NAME:C,POSTER_ATTRIBUTE_NAME:R,CANVAS_ATTRIBUTE_NAME:_,INPUT_VALUE_ATTRIBUTE_NAME:P,SHADOW_ROOT_ATTRIBUTE_NAME:A,HTML_IMPORT_ATTRIBUTE_NAME:I,STYLE_ATTRIBUTE_NAME:L,LAZY_SRC_ATTRIBUTE_NAME:N,STYLESHEET_ATTRIBUTE_NAME:z,SELECTED_CONTENT_ATTRIBUTE_NAME:O,ASYNC_SCRIPT_ATTRIBUTE_NAME:D,COMMENT_HEADER:H,COMMENT_HEADER_LEGACY:W,SINGLE_FILE_UI_ELEMENT_CLASS:$});const le=N,ce=$,ue="attributes",he=globalThis.browser,de=globalThis.document,pe=globalThis.MutationObserver,me=(e,t,n)=>globalThis.addEventListener(e,t,n),fe=(e,t,n)=>globalThis.removeEventListener(e,t,n),ge=new Map;let ye;async function be(e){if(de.documentElement){ge.clear();const r=Math.max(de.documentElement.scrollHeight-1.5*de.documentElement.clientHeight,0),a=Math.max(de.documentElement.scrollWidth-1.5*de.documentElement.clientWidth,0);if(globalThis.scrollY<=r&&globalThis.scrollX<=a)return function(e){return ye=0,new Promise((async r=>{let a;const o=new Set,s=new pe((async t=>{if((t=t.filter((e=>e.type==ue))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(le,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(ce)})).length&&(a=!0,await we(s,e,d),o.size||await ke(s,e,d))}}));async function i(t){await Se("idleTimeout",(async()=>{a?ye<10&&(ye++,Ae("idleTimeout"),await i(Math.max(500,t/2))):(Ae("loadTimeout"),Ae("maxTimeout"),xe(s,e,d))}),t)}function l(e){const t=e.target;t.removeAttribute(le),t.removeEventListener("load",l)}async function c(t){a=!0,await we(s,e,d),await ke(s,e,d),t.detail&&o.add(t.detail)}async function u(t){await we(s,e,d),await ke(s,e,d),o.delete(t.detail),o.size||await ke(s,e,d)}function d(e){s.disconnect(),fe(t,c),fe(n,u),r(e)}await i(2*e.loadDeferredImagesMaxIdleTime),await we(s,e,d),s.observe(de,{subtree:!0,childList:!0,attributes:!0}),me(t,c),me(n,u),h(e)}))}(e)}}function ve(e){p(e)}async function ke(e,t,n){await Se("loadTimeout",(()=>xe(e,t,n)),t.loadDeferredImagesMaxIdleTime)}async function we(e,t,n){await Se("maxTimeout",(async()=>{await Ae("loadTimeout"),await xe(e,t,n)}),10*t.loadDeferredImagesMaxIdleTime)}async function xe(e,t,n){await Ae("idleTimeout"),d(t),await Se("endTimeout",(async()=>{await Ae("maxTimeout"),n()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Se(e,t,n){if(he&&he.runtime&&he.runtime.sendMessage){if(!ge.get(e)||!ge.get(e).pending){const r={callback:t,pending:!0};ge.set(e,r);try{await he.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:n})}catch(r){Ee(e,t,n)}r.pending=!1}}else Ee(e,t,n)}function Ee(e,t,n){const r=ge.get(e);r&&globalThis.clearTimeout(r),ge.set(e,t),globalThis.setTimeout(t,n)}async function Ae(e){if(he&&he.runtime&&he.runtime.sendMessage)try{await he.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){Te(e)}else Te(e)}function Te(e){const t=ge.get(e);ge.delete(e),t&&globalThis.clearTimeout(t)}he&&he.runtime&&he.runtime.onMessage&&he.runtime.onMessage.addListener&&he.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ge.get(e.type);if(t){ge.delete(e.type);try{t.callback()}catch(t){Te(e.type)}}}}));var Ce=Object.freeze({__proto__:null,process:be,resetZoomLevel:ve});const Re={ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:v,WIN_ID_ATTRIBUTE_NAME:T,preProcessDoc:G,serialize:re,postProcessDoc:ee,getShadowRoot:J},_e="__frameTree__::",Ie='iframe, frame, object[type="text/html"][data]',Le="singlefile.frameTree.initRequest",Pe="singlefile.frameTree.ackInitRequest",Ne="singlefile.frameTree.cleanupRequest",ze="singlefile.frameTree.initResponse",Me=5e3,Oe=".",De=globalThis.window==globalThis.top,Ue=globalThis.browser,Fe=globalThis.top,Be=globalThis.MessageChannel,qe=globalThis.document,je=new Map;let He;var We,$e,Ve;function Ye(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function Ge(e){const t=e.sessionId,n=globalThis._singleFile_waitForUserScript;De||(He=globalThis.frameId=e.windowId),Je(qe,e.options,He,t),De||(e.options.userScriptEnabled&&n&&await n(Re.ON_BEFORE_CAPTURE_EVENT_NAME),tt({frames:[rt(qe,globalThis,He,e.options)],sessionId:t,requestedFrameId:qe.documentElement.dataset.requestedFrameId&&He}),e.options.userScriptEnabled&&n&&await n(Re.ON_AFTER_CAPTURE_EVENT_NAME),delete qe.documentElement.dataset.requestedFrameId)}function Ke(e){const t=e.sessionId;et(at(qe),e.windowId,t)}function Qe(e){e.frames.forEach((t=>Ze("responseTimeouts",e.sessionId,t.windowId)));const t=je.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let n=t.frames.find((t=>e.windowId==t.windowId));n||(n={windowId:e.windowId},t.frames.push(n)),n.processed||(n.content=e.content,n.baseURI=e.baseURI,n.title=e.title,n.canvases=e.canvases,n.fonts=e.fonts,n.stylesheets=e.stylesheets,n.images=e.images,n.posters=e.posters,n.usedFonts=e.usedFonts,n.shadowRoots=e.shadowRoots,n.imports=e.imports,n.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(Oe).length-e.windowId.split(Oe).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function Je(e,t,n,r){const a=at(e);!function(e,t,n,r,a){const o=[];let s;je.get(a)?s=je.get(a).requestTimeouts:(s={},je.set(a,{requestTimeouts:s}));t.forEach(((e,t)=>{const n=r+Oe+t;e.setAttribute(Re.WIN_ID_ATTRIBUTE_NAME,n),o.push({windowId:n})})),tt({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),t.forEach(((e,t)=>{const o=r+Oe+t;try{nt(e.contentWindow,{method:Le,windowId:o,sessionId:a,options:n})}catch(e){}s[o]=globalThis.setTimeout((()=>tt({frames:[{windowId:o,processed:!0}],sessionId:a})),Me)})),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r),a.length&&function(e,t,n,r,a){const o=[];t.forEach(((e,t)=>{const s=r+Oe+t;let i;try{i=e.contentDocument}catch(e){}if(i)try{const t=e.contentWindow;t.stop(),Ze("requestTimeouts",a,s),Je(i,n,s,a),o.push(rt(i,t,s,n))}catch(e){o.push({windowId:s,processed:!0})}})),tt({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r)}function Ze(e,t,n){const r=je.get(t);if(r&&r[e]){const t=r[e][n];t&&(globalThis.clearTimeout(t),delete r[e][n])}}function Xe(e,t){const n=je.get(e);n&&n.responseTimeouts&&(n.responseTimeouts[t]=globalThis.setTimeout((()=>tt({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function et(e,t,n){e.forEach(((e,r)=>{const a=t+Oe+r;e.removeAttribute(Re.WIN_ID_ATTRIBUTE_NAME);try{nt(e.contentWindow,{method:Ne,windowId:a,sessionId:n})}catch(e){}})),e.forEach(((e,r)=>{const a=t+Oe+r;let o;try{o=e.contentDocument}catch(e){}if(o)try{et(at(o),a,n)}catch(e){}}))}function tt(e){e.method=ze;try{Fe.singlefile.processors.frameTree.initResponse(e)}catch(t){nt(Fe,e,!0)}}function nt(e,t,n){if(e==Fe&&Ue&&Ue.runtime&&Ue.runtime.sendMessage)Ue.runtime.sendMessage(t);else if(n){const n=new Be;e.postMessage(_e+JSON.stringify({method:t.method,sessionId:t.sessionId}),"*",[n.port2]),n.port1.postMessage(t)}else e.postMessage(_e+JSON.stringify(t),"*")}function rt(e,t,n,r){const a=Re.preProcessDoc(e,t,r),o=Re.serialize(e);Re.postProcessDoc(e,a.markedElements);return{windowId:n,content:o,baseURI:e.baseURI.split("#")[0],title:e.title,canvases:a.canvases,fonts:a.fonts,stylesheets:a.stylesheets,images:a.images,posters:a.posters,usedFonts:a.usedFonts,shadowRoots:a.shadowRoots,imports:a.imports,processed:!0}}function at(e){let t=Array.from(e.querySelectorAll(Ie));return e.querySelectorAll("*").forEach((e=>{const n=Re.getShadowRoot(e);n&&(t=t.concat(...n.querySelectorAll(Ie)))})),t}De&&(He="0",Ue&&Ue.runtime&&Ue.runtime.onMessage&&Ue.runtime.onMessage.addListener&&Ue.runtime.onMessage.addListener((e=>e.method==ze?(Qe(e),Promise.resolve({})):e.method==Pe?(Ze("requestTimeouts",e.sessionId,e.windowId),Xe(e.sessionId,e.windowId),Promise.resolve({})):void 0))),We="message",$e=async e=>{if("string"==typeof e.data&&e.data.startsWith(_e)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(_e.length));t.method==Le?(e.source&&nt(e.source,{method:Pe,windowId:t.windowId,sessionId:t.sessionId}),De||(globalThis.stop(),t.options.loadDeferredImages&&be(t.options),await Ge(t))):t.method==Pe?(Ze("requestTimeouts",t.sessionId,t.windowId),Xe(t.sessionId,t.windowId)):t.method==Ne?Ke(t):t.method==ze&&je.get(t.sessionId)&&(e.ports[0].onmessage=e=>Qe(e.data))}},Ve=!0,globalThis.addEventListener(We,$e,Ve);var ot=Object.freeze({__proto__:null,getAsync:function(e){const t=Ye();return e=JSON.parse(JSON.stringify(e)),new Promise((n=>{je.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,n(e)}}),Ge({windowId:He,sessionId:t,options:e})}))},getSync:function(e){const t=Ye();e=JSON.parse(JSON.stringify(e)),je.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,n=globalThis._singleFile_waitForUserScript;De||(He=globalThis.frameId=e.windowId);Je(qe,e.options,He,t),De||(e.options.userScriptEnabled&&n&&n(Re.ON_BEFORE_CAPTURE_EVENT_NAME),tt({frames:[rt(qe,globalThis,He,e.options)],sessionId:t,requestedFrameId:qe.documentElement.dataset.requestedFrameId&&He}),e.options.userScriptEnabled&&n&&n(Re.ON_AFTER_CAPTURE_EVENT_NAME),delete qe.documentElement.dataset.requestedFrameId)}({windowId:He,sessionId:t,options:e});const n=je.get(t).frames;return n.sessionId=t,n},cleanup:function(e){je.delete(e),Ke({windowId:He,sessionId:e,options:{sessionId:e}})},initResponse:Qe,TIMEOUT_INIT_REQUEST_MESSAGE:Me});const st=globalThis.browser,it=globalThis.document;if(it instanceof globalThis.Document){const e=it.createElement("script");e.async=!1,st&&st.runtime&&st.runtime.getURL&&(e.src=st.runtime.getURL("/dist/web/hooks/hooks-web.js"),e.async=!1),(it.documentElement||it).appendChild(e),e.remove()}var lt=Object.freeze({__proto__:null}),ct=Object.freeze({__proto__:null,frameTree:ot,hooks:lt,hooksFrames:m,lazy:Ce});const ut=/^'(.*?)'$/,ht=/^"(.*?)"$/,dt=["inherit","initial","unset"],pt=["caption","icon","menu","message-box","small-caption","status-bar"],mt=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],ft=["normal","italic","oblique"],gt=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],yt=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"],bt={splitBySpaces:function(e){return Et(e,[" ","\n","\t"])},split:Et,splitByCommas:function(e){return Et(e,[","],{last:!0})}},vt={isSize:function(e){return!isNaN(parseFloat(e))||-1!==e.indexOf("/")||-1!==yt.indexOf(e)}},kt="[parse-css-font] ";function wt(e){if("string"!=typeof e)throw new TypeError(kt+"Expected a string.");if(""===e)throw xt("Cannot parse an empty string.");if(-1!==pt.indexOf(e))return{system:e};const t={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let n=!1;const r=bt.splitBySpaces(e);let a=r.shift();for(;a;a=r.shift())if("normal"!==a&&-1===dt.indexOf(a))if(-1===mt.indexOf(a))if(-1===ft.indexOf(a))if(-1===gt.indexOf(a)){if(vt.isSize(a)){const e=bt.split(a,["/"]);if(t.size=e[0],e[1]?t.lineHeight=St(e[1]):"/"===r[0]&&(r.shift(),t.lineHeight=St(r.shift())),!r.length)throw xt("Missing required font-family.");return t.family=bt.splitByCommas(r.join(" ")).map(At),t}if("normal"!==t.variant)throw xt("Unknown or unsupported font token: "+t.variant);n||(t.variant=a)}else{if(n)continue;t.stretch=a}else{if(n)continue;t.style=a}else{if(n)continue;t.weight=a}else["style","variant","weight","stretch"].forEach((e=>{t[e]=a})),n=!0;throw xt("Missing required font-size.")}function xt(e){return new Error(kt+e)}function St(e){const t=parseFloat(e);return t.toString()===e?t:e}function Et(e,t,{last:n=!1}={}){if("string"!=typeof e)throw new TypeError("expected a string");if(!Array.isArray(t))throw new TypeError("expected a string array of separators");if("boolean"!=typeof n)throw new TypeError("expected a Boolean value for options.last");const r=[];let a="",o=!1,s=0,i=!1,l=!1;for(const n of e)i?l?l=!1:"\\"===n?l=!0:n===i&&(i=!1):'"'===n||"'"===n?i=n:"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&-1!==t.indexOf(n)&&(o=!0),o?(""!==a&&r.push(a.trim()),a="",o=!1):a+=n;return(n||""!==a)&&r.push(a.trim()),r}function At(e){return(e=e.match(ut)?e.replace(ut,"$1"):e.replace(ht,"$1")).trim()}var Tt=Object.freeze({__proto__:null,parse:wt});function Ct(e,t=0){const n=[{mode:"normal",character:null}],r=[];let a=0,o="",s=null,i=null,l=t,c=e;"("===e[0]&&")"===e[e.length-1]&&(c=e.substring(1,e.length-1),l++);for(let e=0;e<c.length;e++){const t=c[e];if("'"!==t&&'"'!==t||(!0===n[a].isCalculationEnabled?(n.push({mode:"string",isCalculationEnabled:!1,character:t}),a++):"string"===n[a].mode&&n[a].character===t&&"\\"!==c[e-1]&&(n.pop(),a--)),"{"===t?(n.push({mode:"interpolation",isCalculationEnabled:!0}),a++):"}"===t&&(n.pop(),a--),"normal"===n[a].mode&&":"===t){const t=c.substring(e+1);i={type:"value",before:/^(\s*)/.exec(t)[1],after:/(\s*)$/.exec(t)[1],value:t.trim()},i.sourceIndex=i.before.length+e+1+l,s={type:"colon",sourceIndex:e+l,after:i.before,value:":"};break}o+=t}return o={type:"media-feature",before:/^(\s*)/.exec(o)[1],after:/(\s*)$/.exec(o)[1],value:o.trim()},o.sourceIndex=o.before.length+l,r.push(o),null!==s&&(s.before=o.after,r.push(s)),null!==i&&r.push(i),r}function Rt(e,t=0){const n=[];let r,a=0,o=!1;r={before:"",after:"",value:""};for(let s=0;s<e.length;s++){const i=e[s];o?(r.value+=i,"{"!==i&&"("!==i||a++,")"!==i&&"}"!==i||a--):-1!==i.search(/\s/)?r.before+=i:("("===i&&(r.type="media-feature-expression",a++),r.value=i,r.sourceIndex=t+s,o=!0),!o||0!==a||")"!==i&&s!==e.length-1&&-1===e[s+1].search(/\s/)||(-1!==["not","only","and"].indexOf(r.value)&&(r.type="keyword"),"media-feature-expression"===r.type&&(r.nodes=Ct(r.value,r.sourceIndex)),n.push(Array.isArray(r.nodes)?new It(r):new Lt(r)),r={before:"",after:"",value:""},o=!1)}for(let e=0;e<n.length;e++)if(r=n[e],e>0&&(n[e-1].after=r.before),void 0===r.type){if(e>0){if("media-feature-expression"===n[e-1].type){r.type="keyword";continue}if("not"===n[e-1].value||"only"===n[e-1].value){r.type="media-type";continue}if("and"===n[e-1].value){r.type="media-feature-expression";continue}"media-type"===n[e-1].type&&(n[e+1]?r.type="media-feature-expression"===n[e+1].type?"keyword":"media-feature-expression":r.type="media-feature-expression")}if(0===e){if(!n[e+1]){r.type="media-type";continue}if(n[e+1]&&("media-feature-expression"===n[e+1].type||"keyword"===n[e+1].type)){r.type="media-type";continue}if(n[e+2]){if("media-feature-expression"===n[e+2].type){r.type="media-type",n[e+1].type="keyword";continue}if("keyword"===n[e+2].type){r.type="keyword",n[e+1].type="media-type";continue}}if(n[e+3]&&"media-feature-expression"===n[e+3].type){r.type="keyword",n[e+1].type="media-type",n[e+2].type="keyword";continue}}}return n}function _t(e){const t=[];let n=0,r=0;const a=/^(\s*)url\s*\(/.exec(e);if(null!==a){let r=a[0].length,o=1;for(;o>0;){const t=e[r];"("===t&&o++,")"===t&&o--,r++}t.unshift(new Lt({type:"url",value:e.substring(0,r).trim(),sourceIndex:a[1].length,before:a[1],after:/^(\s*)/.exec(e.substring(r))[1]})),n=r}for(let a=n;a<e.length;a++){const o=e[a];if("("===o&&r++,")"===o&&r--,0===r&&","===o){const r=e.substring(n,a),o=/^(\s*)/.exec(r)[1];t.push(new It({type:"media-query",value:r.trim(),sourceIndex:n+o.length,nodes:Rt(r,n),before:o,after:/(\s*)$/.exec(r)[1]})),n=a+1}}const o=e.substring(n),s=/^(\s*)/.exec(o)[1];return t.push(new It({type:"media-query",value:o.trim(),sourceIndex:n+s.length,nodes:Rt(o,n),before:s,after:/(\s*)$/.exec(o)[1]})),t}function It(e){this.constructor(e),this.nodes=e.nodes,void 0===this.after&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:""),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((e=>{e.parent=this}))}function Lt(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}It.prototype=Object.create(Lt.prototype),It.constructor=Lt,It.prototype.walk=function(e,t){const n="string"==typeof e||e instanceof RegExp,r=n?t:e,a="string"==typeof e?new RegExp(e):e;for(let o=0;o<this.nodes.length;o++){const s=this.nodes[o];if((!n||a.test(s.type))&&r&&!1===r(s,o,this.nodes))return!1;if(s.nodes&&!1===s.walk(e,t))return!1}return!0},It.prototype.each=function(e=(()=>{})){for(let t=0;t<this.nodes.length;t++){if(!1===e(this.nodes[t],t,this.nodes))return!1}return!0};var Pt=Object.freeze({__proto__:null,parseMediaList:_t});const Nt="___PRESERVED_TOKEN_",zt={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},Mt=/url\(\s*(["']?)data:/g,Ot=/\s+/g,Dt=/\n/g;const Ut=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const Ft=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,Bt=/(^\s|\s$)/g;const qt=/"([^\\"]|\\.|\\)*"/g,jt=/'([^\\']|\\.|\\)*'/g,Ht=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,Wt=/\r\n/g,$t=/[\r\n]/g,Vt=/@variables\s*\{\s*([^}]+)\s*\}/g,Yt=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,Gt=/var\s*\(\s*([^)]+)\s*\)/g,Kt=/calc\(([^;}]*)\)/g,Qt=/(^\s*|\s*$)/g,Jt=/\( /g,Zt=/ \)/g,Xt=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,en=/(^|\})(([^{:])+:)+([^{]*{)/g,tn=/\s+([!{;:>+()\],])/g,nn=/([^\\])\s+([}])/g,rn=/!important/g,an=/___PSEUDOCLASSCOLON___/g,on=/:/g,sn=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,ln=/(^|\D)0?\.?0(m?s)/gi,cn=/\s*(flex|flex-basis):\s*([^;}]+)/gi,un=/\s+/,hn=/(hsla?)\(([^)]+)\)/g,dn=/(^\s+|\s+$)/g,pn=/:first-(line|letter)(\{|,)/gi,mn=/^(.*)(@charset)( "[^"]*";)/gi,fn=/^((\s*)(@charset)( [^;]+;\s*))+/gi,gn=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,yn=/:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi,bn=/^(.*)(@charset "[^"]*";)/g,vn=/^(\s*@charset [^;]+;\s*)+/g,kn=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,wn=/([:,( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi,xn=/\s*\/\*/g,Sn=/\*\/\s*/g,En=/\band\(/gi,An=/([^:])not\(/gi,Tn=/\bor\(/gi,Cn=/([!{}:;>+([,])\s+/g,Rn=/;+\}/g,_n=/([0-9])\.0(ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%| |;)/gi,In=/:0 0 0 0(;|\})/g,Ln=/:0 0 0(;|\})/g,Pn=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,Nn=/(:|\s)0+\.(\d+)/g,zn=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,Mn=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,On=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,Dn=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,Un=/___QUERY_FRACTION___/g,Fn=/;;+/g,Bn=/(:|\s)(#f00)(;|})/g,qn=/___PRESERVED_NEWLINE___/g,jn=/(:|\s)(#000080)(;|})/g,Hn=/(:|\s)(#808080)(;|})/g,Wn=/(:|\s)(#808000)(;|})/g,$n=/(:|\s)(#800080)(;|})/g,Vn=/(:|\s)(#c0c0c0)(;|})/g,Yn=/(:|\s)(#008080)(;|})/g,Gn=/(:|\s)(#ffa500)(;|})/g,Kn=/(:|\s)(#800000)(;|})/g;function Qn(e="",t=zt){const n=[],r=[];let a;const o=e;function s(t){e=e.replace(t,(e=>{const t=e.substring(0,1);if((e=e.slice(1,-1)).indexOf("___PRESERVE_CANDIDATE_COMMENT_")>=0)for(let t=0,r=n.length;t<r;t+=1)e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+t+"___",n[t]);return e=e.replace(Ht,"alpha(opacity="),r.push(e),t+Nt+(r.length-1)+"___"+t}))}e=function(e,t){const n=Mt,r=e.length-1,a=[];let o,s=0;for(;null!==(o=n.exec(e));){const i=o.index+4;let l=o[1];0===l.length&&(l=")");let c=!1,u=n.lastIndex-1;for(;!1===c&&u+1<=r&&-1!=u;)u=e.indexOf(l,u+1),u>0&&"\\"!==e.charAt(u-1)&&(c=!0,")"!=l&&(u=e.indexOf(")",u)));if(a.push(e.substring(s,o.index)),c){let n=e.substring(i,u);const r=n.split(",");r.length>1&&";base64"==r[0].slice(-7)?n=n.replace(Ot,""):(n=n.replace(Dt," "),n=n.replace(Ot," "),n=n.replace(dn,"")),t.push(n);const o="url(___PRESERVED_TOKEN_"+(t.length-1)+"___)";a.push(o),s=u+1}else a.push(e.substring(o.index,n.lastIndex)),s=n.lastIndex}return a.push(e.substring(s)),a.join("")}(e,r),e=function(e,t){const n=[];let r,a=0;for(;;){const o=e.indexOf("/*",a);if(!(o>-1))break;if(r=e.indexOf("*/",o+2),!(r>-1)){r=-2;break}t.push(e.slice(o+2,r)),n.push(e.slice(a,o)),n.push("/*___PRESERVE_CANDIDATE_COMMENT_"+(t.length-1)+"___*/"),a=r+2}return n.push(e.slice(r+2)),n.join("")}(e,n),s(qt),s(jt);for(let a=0,o=n.length;a<o;a+=1){const o=n[a],s="___PRESERVE_CANDIDATE_COMMENT_"+a+"___";if("!"!==o.charAt(0))if("\\"!==o.charAt(o.length-1)){if(0===o.length){const t=e.indexOf(s);t>2&&">"===e.charAt(t-3)&&(r.push(""),e=e.replace(s,Nt+(r.length-1)+"___"))}e=e.replace(`/*${s}*/`,"")}else r.push("\\"),e=e.replace(s,Nt+(r.length-1)+"___"),a+=1,r.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+a+"___",Nt+(r.length-1)+"___");else t.cuteComments?r.push(o.substring(1).replace(Wt,"\n")):t.uglyComments?r.push(o.substring(1).replace($t,"")):r.push(o),e=e.replace(s,Nt+(r.length-1)+"___")}if(t.expandVars){const t={};a=Vt,e=e.replace(a,((e,n)=>(a=Yt,n.replace(a,((e,n,r)=>(n&&r&&(t[n]=r),""))),""))),a=Gt,e=e.replace(a,((e,n)=>t[n]||"none"))}if(e=e.replace(Ot," "),a=Kt,e=e.replace(a,((e,t)=>(r.push("calc("+t.replace(Qt,"").replace(Jt,"(").replace(Zt,")")+")"),Nt+(r.length-1)+"___"))),a=Xt,e=e.replace(a,((e,t)=>(r.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix(___PRESERVED_TOKEN_"+(r.length-1)+"___);"))),a=en,e=(e=(e=(e=(e=e.replace(a,(e=>e.replace(on,"___PSEUDOCLASSCOLON___")))).replace(tn,"$1")).replace(nn,"$1$2")).replace(rn," !important")).replace(an,":"),a=sn,e=e.replace(a,((e,t,n)=>t+":"+(n=n.replace(ln,((e,t,n)=>(r.push("0"+n),t+Nt+(r.length-1)+"___")))))),a=cn,e=function(e,t){const n=Ft;let r,a=0;const o=(e,n)=>{"0"===(e=e.replace(Bt,"")).charAt(0)&&(t.push(e),r[n]=Nt+(t.length-1)+"___")};for(;;){let t=0;r="";let s=e.slice(a).search(n);if(s<0)break;a+=s,s=a;const i=e.length,l=[];for(;a<i;++a){const n=e.charAt(a);if("{"===n)0===t?l.push(r.replace(Bt,"")):1===t&&(r=r.split(","),r.forEach(o),l.push(r.join(",").replace(Bt,""))),r="",t+=1;else if("}"===n){if(2===t)l.push("{"+r.replace(Bt,"")+"}"),r="";else if(1===t){e=e.slice(0,s)+l.shift()+"{"+l.join("")+e.slice(a);break}t-=1}if(t<0)break;"{"!==n&&"}"!==n&&(r+=n)}}return e}(e=(e=e.replace(a,((e,t,n)=>{let a=n.split(un);return r.push(a.pop()),a.push(Nt+(r.length-1)+"___"),a=a.join(" "),`${t}:${a}`}))).replace(hn,((e,t,n)=>{const a=[];return n.split(",").forEach((e=>{"0%"===(e=e.replace(dn,""))?(r.push("0%"),a.push(Nt+(r.length-1)+"___")):a.push(e)})),t+"("+a.join(",")+")"})),r),e=e.replace(pn,((e,t,n)=>":first-"+t.toLowerCase()+" "+n)),e=t.cuteComments?(e=e.replace(xn,"___PRESERVED_NEWLINE___/*")).replace(Sn,"*/___PRESERVED_NEWLINE___"):e.replace(Sn,"*/"),a=mn,e=e.replace(a,((e,t,n,r)=>n.toLowerCase()+r+t)),a=fn,e=e.replace(a,((e,t,n,r,a)=>n+r.toLowerCase()+a)),a=gn,e=e.replace(a,((e,t)=>"@"+t.toLowerCase())),a=yn,e=(e=(e=e.replace(a,((e,t)=>":"+t.toLowerCase()))).replace(bn,"$2$1")).replace(vn,"$1"),a=kn,e=e.replace(a,((e,t)=>":"+t.toLowerCase()+"(")),a=wn,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(a,((e,t,n)=>t+n.toLowerCase()))).replace(En,"and (")).replace(An,"$1not (")).replace(Tn,"or (")).replace(Cn,"$1")).replace(Rn,"}")).replace(_n,"$1$2")).replace(In,":0$1")).replace(Ln,":0$1"),a=Pn,e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0 0"+n))).replace(Nn,"$1.$2"),a=zn,e=e.replace(a,((e,t)=>{const n=t.split(",");let r="#";for(let e=0;e<n.length;e+=1){let t=parseInt(n[e],10);t<16&&(r+="0"),t>255&&(t=255),r+=t.toString(16)}return r})),e=function(e){const t=Ut,n=[];let r,a=0;for(;null!==(r=t.exec(e));)n.push(e.substring(a,r.index)),r[1]?n.push(r[1]+"#"+(r[2]+r[3]+r[4]+r[5]+r[6]+r[7])):r[2].toLowerCase()==r[3].toLowerCase()&&r[4].toLowerCase()==r[5].toLowerCase()&&r[6].toLowerCase()==r[7].toLowerCase()?n.push("#"+(r[3]+r[5]+r[7]).toLowerCase()):n.push("#"+(r[2]+r[3]+r[4]+r[5]+r[6]+r[7]).toLowerCase()),a=t.lastIndex=t.lastIndex-r[8].length;return n.push(e.substring(a)),n.join("")}(e),e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(Bn,"$1red$3")).replace(jn,"$1navy$3")).replace(Hn,"$1gray$3")).replace(Wn,"$1olive$3")).replace($n,"$1purple$3")).replace(Vn,"$1silver$3")).replace(Yn,"$1teal$3")).replace(Gn,"$1orange$3")).replace(Kn,"$1maroon$3"),a=Mn,e=(e=(e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0"+n))).replace(On,"alpha(opacity=")).replace(Dn,"($1:$2___QUERY_FRACTION___$3)")).replace(Un,"/"),t.maxLineLen>0){const n=[];let r=[];for(let a=0,o=e.length;a<o;a+=1){const o=e.charAt(a);r.push(o),"}"===o&&r.length>t.maxLineLen&&(n.push(r.join("")),r=[])}r.length&&n.push(r.join("")),e=n.join("\n")}if(e=(e=e.replace(Fn,";")).replace(Qt,""),r.length>1e3)return o;for(let t=r.length-1;t>=0;t--)e=e.replace(Nt+t+"___",r[t],"g");return e=e.replace(qn,"\n")}var Jn=Object.freeze({__proto__:null,defaultOptions:zt,processString:Qn});function Zn(e){return{prev:null,next:null,data:e}}function Xn(e,t,n){var r;return null!==tr?(r=tr,tr=tr.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function er(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=tr,tr=t}var tr=null,nr=function(){this.cursor=null,this.head=null,this.tail=null};nr.createItem=Zn,nr.prototype.createItem=Zn,nr.prototype.updateCursors=function(e,t,n,r){for(var a=this.cursor;null!==a;)a.prev===e&&(a.prev=t),a.next===n&&(a.next=r),a=a.cursor},nr.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},nr.prototype.fromArray=function(e){var t=null;this.head=null;for(var n=0;n<e.length;n++){var r=Zn(e[n]);null!==t?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this},nr.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},nr.prototype.toJSON=nr.prototype.toArray,nr.prototype.isEmpty=function(){return null===this.head},nr.prototype.first=function(){return this.head&&this.head.data},nr.prototype.last=function(){return this.tail&&this.tail.data},nr.prototype.each=function(e,t){var n;void 0===t&&(t=this);for(var r=Xn(this,null,this.head);null!==r.next;)n=r.next,r.next=n.next,e.call(t,n.data,n,this);er(this)},nr.prototype.forEach=nr.prototype.each,nr.prototype.eachRight=function(e,t){var n;void 0===t&&(t=this);for(var r=Xn(this,this.tail,null);null!==r.prev;)n=r.prev,r.prev=n.prev,e.call(t,n.data,n,this);er(this)},nr.prototype.forEachRight=nr.prototype.eachRight,nr.prototype.reduce=function(e,t,n){var r;void 0===n&&(n=this);for(var a=Xn(this,null,this.head),o=t;null!==a.next;)r=a.next,a.next=r.next,o=e.call(n,o,r.data,r,this);return er(this),o},nr.prototype.reduceRight=function(e,t,n){var r;void 0===n&&(n=this);for(var a=Xn(this,this.tail,null),o=t;null!==a.prev;)r=a.prev,a.prev=r.prev,o=e.call(n,o,r.data,r,this);return er(this),o},nr.prototype.nextUntil=function(e,t,n){if(null!==e){var r;void 0===n&&(n=this);for(var a=Xn(this,null,e);null!==a.next&&(r=a.next,a.next=r.next,!t.call(n,r.data,r,this)););er(this)}},nr.prototype.prevUntil=function(e,t,n){if(null!==e){var r;void 0===n&&(n=this);for(var a=Xn(this,e,null);null!==a.prev&&(r=a.prev,a.prev=r.prev,!t.call(n,r.data,r,this)););er(this)}},nr.prototype.some=function(e,t){var n=this.head;for(void 0===t&&(t=this);null!==n;){if(e.call(t,n.data,n,this))return!0;n=n.next}return!1},nr.prototype.map=function(e,t){var n=new nr,r=this.head;for(void 0===t&&(t=this);null!==r;)n.appendData(e.call(t,r.data,r,this)),r=r.next;return n},nr.prototype.filter=function(e,t){var n=new nr,r=this.head;for(void 0===t&&(t=this);null!==r;)e.call(t,r.data,r,this)&&n.appendData(r.data),r=r.next;return n},nr.prototype.clear=function(){this.head=null,this.tail=null},nr.prototype.copy=function(){for(var e=new nr,t=this.head;null!==t;)e.insert(Zn(t.data)),t=t.next;return e},nr.prototype.prepend=function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this},nr.prototype.prependData=function(e){return this.prepend(Zn(e))},nr.prototype.append=function(e){return this.insert(e)},nr.prototype.appendData=function(e){return this.insert(Zn(e))},nr.prototype.insert=function(e,t){if(null!=t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this},nr.prototype.insertData=function(e,t){return this.insert(Zn(e),t)},nr.prototype.remove=function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e},nr.prototype.push=function(e){this.insert(Zn(e))},nr.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},nr.prototype.unshift=function(e){this.prepend(Zn(e))},nr.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},nr.prototype.prependList=function(e){return this.insertList(e,this.head)},nr.prototype.appendList=function(e){return this.insertList(e)},nr.prototype.insertList=function(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this},nr.prototype.replace=function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)};var rr=nr,ar=function(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return n.name=e,n.message=t,Object.defineProperty(n,"stack",{get:function(){return(r.stack||"").replace(/^(.+\n){1,3}/,e+": "+t+"\n")}}),n},or=" ";function sr(e,t){function n(e,t){return r.slice(e,t).map((function(t,n){for(var r=String(e+n+1);r.length<l;)r=" "+r;return r+" |"+t})).join("\n")}var r=e.source.split(/\r\n?|\n|\f/),a=e.line,o=e.column,s=Math.max(1,a-t)-1,i=Math.min(a+t,r.length+1),l=Math.max(4,String(i).length)+1,c=0;(o+=(or.length-1)*(r[a-1].substr(0,o-1).match(/\t/g)||[]).length)>100&&(c=o-60+3,o=58);for(var u=s;u<=i;u++)u>=0&&u<r.length&&(r[u]=r[u].replace(/\t/g,or),r[u]=(c>0&&r[u].length>c?"…":"")+r[u].substr(c,98)+(r[u].length>c+100-1?"…":""));return[n(s,a),new Array(o+l+2).join("-")+"^",n(a,i)].filter(Boolean).join("\n")}var ir=function(e,t,n,r,a){var o=ar("SyntaxError",e);return o.source=t,o.offset=n,o.line=r,o.column=a,o.sourceFragment=function(e){return sr(o,isNaN(e)?0:e)},Object.defineProperty(o,"formattedMessage",{get:function(){return"Parse error: "+o.message+"\n"+sr(o,2)}}),o.parseError={offset:n,line:r,column:a},o},lr={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},cr=Object.keys(lr).reduce((function(e,t){return e[lr[t]]=t,e}),{}),ur={TYPE:lr,NAME:cr};function hr(e){return e>=48&&e<=57}function dr(e){return e>=65&&e<=90}function pr(e){return e>=97&&e<=122}function mr(e){return dr(e)||pr(e)}function fr(e){return e>=128}function gr(e){return mr(e)||fr(e)||95===e}function yr(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function br(e){return 10===e||13===e||12===e}function vr(e){return br(e)||32===e||9===e}function kr(e,t){return 92===e&&(!br(t)&&0!==t)}var wr=new Array(128);Sr.Eof=128,Sr.WhiteSpace=130,Sr.Digit=131,Sr.NameStart=132,Sr.NonPrintable=133;for(var xr=0;xr<wr.length;xr++)switch(!0){case vr(xr):wr[xr]=Sr.WhiteSpace;break;case hr(xr):wr[xr]=Sr.Digit;break;case gr(xr):wr[xr]=Sr.NameStart;break;case yr(xr):wr[xr]=Sr.NonPrintable;break;default:wr[xr]=xr||Sr.Eof}function Sr(e){return e<128?wr[e]:Sr.NameStart}var Er={isDigit:hr,isHexDigit:function(e){return hr(e)||e>=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:dr,isLowercaseLetter:pr,isLetter:mr,isNonAscii:fr,isNameStart:gr,isName:function(e){return gr(e)||hr(e)||45===e},isNonPrintable:yr,isNewline:br,isWhiteSpace:vr,isValidEscape:kr,isIdentifierStart:function(e,t,n){return 45===e?gr(t)||45===t||kr(t,n):!!gr(e)||92===e&&kr(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?hr(t)?2:46===t&&hr(n)?3:0:46===e?hr(t)?2:0:hr(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:Sr},Ar=Er.isDigit,Tr=Er.isHexDigit,Cr=Er.isUppercaseLetter,Rr=Er.isName,_r=Er.isWhiteSpace,Ir=Er.isValidEscape;function Lr(e,t){return t<e.length?e.charCodeAt(t):0}function Pr(e,t,n){return 13===n&&10===Lr(e,t+1)?2:1}function Nr(e,t,n){var r=e.charCodeAt(t);return Cr(r)&&(r|=32),r===n}function zr(e,t){for(;t<e.length&&Ar(e.charCodeAt(t));t++);return t}function Mr(e,t){if(Tr(Lr(e,(t+=2)-1))){for(var n=Math.min(e.length,t+5);t<n&&Tr(Lr(e,t));t++);var r=Lr(e,t);_r(r)&&(t+=Pr(e,t,r))}return t}var Or={consumeEscaped:Mr,consumeName:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(!Rr(n)){if(!Ir(n,Lr(e,t+1)))break;t=Mr(e,t)-1}}return t},consumeNumber:function(e,t){var n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),Ar(n)&&(t=zr(e,t+1),n=e.charCodeAt(t)),46===n&&Ar(e.charCodeAt(t+1))&&(n=e.charCodeAt(t+=2),t=zr(e,t)),Nr(e,t,101)){var r=0;45!==(n=e.charCodeAt(t+1))&&43!==n||(r=1,n=e.charCodeAt(t+2)),Ar(n)&&(t=zr(e,t+1+r+1))}return t},consumeBadUrlRemnants:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(41===n){t++;break}Ir(n,Lr(e,t+1))&&(t=Mr(e,t))}return t},cmpChar:Nr,cmpStr:function(e,t,n,r){if(n-t!==r.length)return!1;if(t<0||n>e.length)return!1;for(var a=t;a<n;a++){var o=e.charCodeAt(a),s=r.charCodeAt(a-t);if(Cr(o)&&(o|=32),o!==s)return!1}return!0},getNewlineLength:Pr,findWhiteSpaceStart:function(e,t){for(;t>=0&&_r(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t<e.length&&_r(e.charCodeAt(t));t++);return t}},Dr=ur.TYPE,Ur=ur.NAME,Fr=Or.cmpStr,Br=Dr.EOF,qr=Dr.WhiteSpace,jr=Dr.Comment,Hr=16777215,Wr=24,$r=function(){this.offsetAndType=null,this.balance=null,this.reset()};$r.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset},lookupType:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>Wr:Br},lookupOffset:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&Hr:this.source.length},lookupValue:function(e,t){return(e+=this.tokenIndex)<this.tokenCount&&Fr(this.source,this.offsetAndType[e-1]&Hr,this.offsetAndType[e]&Hr,t)},getTokenStart:function(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Hr:this.offsetAndType[this.tokenCount]&Hr:this.firstCharOffset},getRawLength:function(e,t){var n,r=e,a=this.offsetAndType[Math.max(r-1,0)]&Hr;e:for(;r<this.tokenCount&&!((n=this.balance[r])<e);r++)switch(t(this.offsetAndType[r]>>Wr,this.source,a)){case 1:break e;case 2:r++;break e;default:this.balance[n]===r&&(r=n),a=this.offsetAndType[r]&Hr}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]<e},isDelim:function(e,t){return t?this.lookupType(t)===Dr.Delim&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===Dr.Delim&&this.source.charCodeAt(this.tokenStart)===e},getTokenValue:function(){return this.source.substring(this.tokenStart,this.tokenEnd)},getTokenLength:function(){return this.tokenEnd-this.tokenStart},substrToCursor:function(e){return this.source.substring(e,this.tokenStart)},skipWS:function(){for(var e=this.tokenIndex,t=0;e<this.tokenCount&&this.offsetAndType[e]>>Wr===qr;e++,t++);t>0&&this.skip(t)},skipSC:function(){for(;this.tokenType===qr||this.tokenType===jr;)this.next()},skip:function(e){var t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Hr,t=this.offsetAndType[t],this.tokenType=t>>Wr,this.tokenEnd=t&Hr):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Wr,this.tokenEnd=e&Hr):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=Br,this.tokenStart=this.tokenEnd=this.source.length)},forEachToken(e){for(var t=0,n=this.firstCharOffset;t<this.tokenCount;t++){var r=n,a=this.offsetAndType[t],o=a&Hr;n=o,e(a>>Wr,r,o,t)}},dump(){var e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,a)=>{e[a]={idx:a,type:Ur[t],chunk:this.source.substring(n,r),balance:this.balance[a]}})),e}};var Vr=$r;function Yr(e){return e}function Gr(e,t,n,r){var a,o;switch(e.type){case"Group":a=function(e,t,n,r){var a=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",o=e.terms.map((function(e){return Gr(e,t,n,r)})).join(a);return(e.explicit||n)&&(o=(r||","===o[0]?"[":"[ ")+o+(r?"]":" ]")),o}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Gr(e.term,t,n,r)+t(0===(o=e).min&&0===o.max?"*":0===o.min&&1===o.max?"?":1===o.min&&0===o.max?o.comma?"#":"+":1===o.min&&1===o.max?"":(o.comma?"#":"")+(o.min===o.max?"{"+o.min+"}":"{"+o.min+","+(0!==o.max?o.max:"")+"}"),e);case"Type":a="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":a="<'"+e.name+"'>";break;case"Keyword":a=e.name;break;case"AtKeyword":a="@"+e.name;break;case"Function":a=e.name+"(";break;case"String":case"Token":a=e.value;break;case"Comma":a=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(a,e)}var Kr=function(e,t){var n=Yr,r=!1,a=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),a=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),Gr(e,n,r,a)};const Qr={offset:0,line:1,column:1};function Jr(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?Zr(n):n:null}function Zr({offset:e,line:t,column:n},r){const a={offset:e,line:t,column:n};if(r){const e=r.split(/\n|\r\n?|\f/);a.offset+=r.length,a.line+=e.length-1,a.column=1===e.length?a.column+r.length:e.pop().length+1}return a}var Xr=function(e,t){const n=ar("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},ea=function(e,t,n,r){const a=ar("SyntaxMatchError",e),{css:o,mismatchOffset:s,mismatchLength:i,start:l,end:c}=function(e,t){const n=e.tokens,r=e.longestMatch,a=r<n.length&&n[r].node||null,o=a!==t?a:null;let s,i,l=0,c=0,u=0,h="";for(let e=0;e<n.length;e++){const t=n[e].value;e===r&&(c=t.length,l=h.length),null!==o&&n[e].node===o&&(e<=r?u++:u=0),h+=t}return r===n.length||u>1?(s=Jr(o||t,"end")||Zr(Qr,h),i=Zr(s)):(s=Jr(o,"start")||Zr(Jr(t,"start")||Qr,h.slice(0,l)),i=Jr(o,"end")||Zr(s,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:s,end:i}}(r,n);return a.rawMessage=e,a.syntax=t?Kr(t):"<generic>",a.css=o,a.mismatchOffset=s,a.mismatchLength=i,a.message=e+"\n syntax: "+a.syntax+"\n value: "+(o||"<empty string>")+"\n --------"+new Array(a.mismatchOffset+1).join("-")+"^",Object.assign(a,l),a.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},a},ta=Object.prototype.hasOwnProperty,na=Object.create(null),ra=Object.create(null);function aa(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function oa(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var sa={keyword:function(e){if(ta.call(na,e))return na[e];var t=e.toLowerCase();if(ta.call(na,t))return na[e]=na[t];var n=aa(t,0),r=n?"":oa(t,0);return na[e]=Object.freeze({basename:t.substr(r.length),name:t,vendor:r,prefix:r,custom:n})},property:function(e){if(ta.call(ra,e))return ra[e];var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=aa(t,n.length);if(!r&&(t=t.toLowerCase(),ta.call(ra,t)))return ra[e]=ra[t];var a=r?"":oa(t,n.length),o=t.substr(0,n.length+a.length);return ra[e]=Object.freeze({basename:t.substr(o.length),name:t.substr(n.length),hack:n,vendor:a,prefix:o,custom:r})},isCustomProperty:aa,vendorPrefix:oa},ia="undefined"!=typeof Uint32Array?Uint32Array:Array,la=function(e,t){return null===e||e.length<t?new ia(Math.max(t+1024,16384)):e},ca=ur.TYPE,ua=Er.isNewline,ha=Er.isName,da=Er.isValidEscape,pa=Er.isNumberStart,ma=Er.isIdentifierStart,fa=Er.charCodeCategory,ga=Er.isBOM,ya=Or.cmpStr,ba=Or.getNewlineLength,va=Or.findWhiteSpaceEnd,ka=Or.consumeEscaped,wa=Or.consumeName,xa=Or.consumeNumber,Sa=Or.consumeBadUrlRemnants,Ea=16777215,Aa=24;function Ta(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){return h=xa(e,h),ma(n(h),n(h+1),n(h+2))?(g=ca.Dimension,void(h=wa(e,h))):37===n(h)?(g=ca.Percentage,void h++):void(g=ca.Number)}function a(){const t=h;return h=wa(e,h),ya(e,t,h,"url")&&40===n(h)?34===n(h=va(e,h+1))||39===n(h)?(g=ca.Function,void(h=t+4)):void function(){for(g=ca.Url,h=va(e,h);h<e.length;h++){var t=e.charCodeAt(h);switch(fa(t)){case 41:return void h++;case fa.Eof:return;case fa.WhiteSpace:return 41===n(h=va(e,h))||h>=e.length?void(h<e.length&&h++):(h=Sa(e,h),void(g=ca.BadUrl));case 34:case 39:case 40:case fa.NonPrintable:return h=Sa(e,h),void(g=ca.BadUrl);case 92:if(da(t,n(h+1))){h=ka(e,h)-1;break}return h=Sa(e,h),void(g=ca.BadUrl)}}}():40===n(h)?(g=ca.Function,void h++):void(g=ca.Ident)}function o(t){for(t||(t=n(h++)),g=ca.String;h<e.length;h++){var r=e.charCodeAt(h);switch(fa(r)){case t:return void h++;case fa.Eof:return;case fa.WhiteSpace:if(ua(r))return h+=ba(e,h,r),void(g=ca.BadString);break;case 92:if(h===e.length-1)break;var a=n(h+1);ua(a)?h+=ba(e,h+1,a):da(r,a)&&(h=ka(e,h)-1)}}}t||(t=new Vr);for(var s=(e=String(e||"")).length,i=la(t.offsetAndType,s+1),l=la(t.balance,s+1),c=0,u=ga(n(0)),h=u,d=0,p=0,m=0;h<s;){var f=e.charCodeAt(h),g=0;switch(l[c]=s,fa(f)){case fa.WhiteSpace:g=ca.WhiteSpace,h=va(e,h+1);break;case 34:o();break;case 35:ha(n(h+1))||da(n(h+1),n(h+2))?(g=ca.Hash,h=wa(e,h+1)):(g=ca.Delim,h++);break;case 39:o();break;case 40:g=ca.LeftParenthesis,h++;break;case 41:g=ca.RightParenthesis,h++;break;case 43:pa(f,n(h+1),n(h+2))?r():(g=ca.Delim,h++);break;case 44:g=ca.Comma,h++;break;case 45:pa(f,n(h+1),n(h+2))?r():45===n(h+1)&&62===n(h+2)?(g=ca.CDC,h+=3):ma(f,n(h+1),n(h+2))?a():(g=ca.Delim,h++);break;case 46:pa(f,n(h+1),n(h+2))?r():(g=ca.Delim,h++);break;case 47:42===n(h+1)?(g=ca.Comment,1===(h=e.indexOf("*/",h+2)+2)&&(h=e.length)):(g=ca.Delim,h++);break;case 58:g=ca.Colon,h++;break;case 59:g=ca.Semicolon,h++;break;case 60:33===n(h+1)&&45===n(h+2)&&45===n(h+3)?(g=ca.CDO,h+=4):(g=ca.Delim,h++);break;case 64:ma(n(h+1),n(h+2),n(h+3))?(g=ca.AtKeyword,h=wa(e,h+1)):(g=ca.Delim,h++);break;case 91:g=ca.LeftSquareBracket,h++;break;case 92:da(f,n(h+1))?a():(g=ca.Delim,h++);break;case 93:g=ca.RightSquareBracket,h++;break;case 123:g=ca.LeftCurlyBracket,h++;break;case 125:g=ca.RightCurlyBracket,h++;break;case fa.Digit:r();break;case fa.NameStart:a();break;case fa.Eof:break;default:g=ca.Delim,h++}switch(g){case d:for(d=(p=l[m=p&Ea])>>Aa,l[c]=m,l[m++]=c;m<c;m++)l[m]===s&&(l[m]=c);break;case ca.LeftParenthesis:case ca.Function:l[c]=p,p=(d=ca.RightParenthesis)<<Aa|c;break;case ca.LeftSquareBracket:l[c]=p,p=(d=ca.RightSquareBracket)<<Aa|c;break;case ca.LeftCurlyBracket:l[c]=p,p=(d=ca.RightCurlyBracket)<<Aa|c}i[c++]=g<<Aa|h}for(i[c]=ca.EOF<<Aa|h,l[c]=s,l[s]=s;0!==p;)p=l[m=p&Ea],l[m]=s;return t.source=e,t.firstCharOffset=u,t.offsetAndType=i,t.tokenCount=c,t.balance=l,t.reset(),t.next(),t}Object.keys(ur).forEach((function(e){Ta[e]=ur[e]})),Object.keys(Er).forEach((function(e){Ta[e]=Er[e]})),Object.keys(Or).forEach((function(e){Ta[e]=Or[e]}));var Ca=Ta,Ra=Ca.isDigit,_a=Ca.cmpChar,Ia=Ca.TYPE,La=Ia.Delim,Pa=Ia.WhiteSpace,Na=Ia.Comment,za=Ia.Ident,Ma=Ia.Number,Oa=Ia.Dimension,Da=45,Ua=!0;function Fa(e,t){return null!==e&&e.type===La&&e.value.charCodeAt(0)===t}function Ba(e,t,n){for(;null!==e&&(e.type===Pa||e.type===Na);)e=n(++t);return t}function qa(e,t,n,r){if(!e)return 0;var a=e.value.charCodeAt(t);if(43===a||a===Da){if(n)return 0;t++}for(;t<e.value.length;t++)if(!Ra(e.value.charCodeAt(t)))return 0;return r+1}function ja(e,t,n){var r=!1,a=Ba(e,t,n);if(null===(e=n(a)))return t;if(e.type!==Ma){if(!Fa(e,43)&&!Fa(e,Da))return t;if(r=!0,a=Ba(n(++a),a,n),null===(e=n(a))&&e.type!==Ma)return 0}if(!r){var o=e.value.charCodeAt(0);if(43!==o&&o!==Da)return 0}return qa(e,r?0:1,r,a)}var Ha=Ca.isHexDigit,Wa=Ca.cmpChar,$a=Ca.TYPE,Va=$a.Ident,Ya=$a.Delim,Ga=$a.Number,Ka=$a.Dimension;function Qa(e,t){return null!==e&&e.type===Ya&&e.value.charCodeAt(0)===t}function Ja(e,t){return e.value.charCodeAt(0)===t}function Za(e,t,n){for(var r=t,a=0;r<e.value.length;r++){var o=e.value.charCodeAt(r);if(45===o&&n&&0!==a)return Za(e,t+a+1,!1)>0?6:0;if(!Ha(o))return 0;if(++a>6)return 0}return a}function Xa(e,t,n){if(!e)return 0;for(;Qa(n(t),63);){if(++e>6)return 0;t++}return t}var eo=Ca.isIdentifierStart,to=Ca.isHexDigit,no=Ca.isDigit,ro=Ca.cmpStr,ao=Ca.consumeNumber,oo=Ca.TYPE,so=["unset","initial","inherit"],io=["calc(","-moz-calc(","-webkit-calc("];function lo(e,t){return t<e.length?e.charCodeAt(t):0}function co(e,t){return ro(e,0,e.length,t)}function uo(e,t){for(var n=0;n<t.length;n++)if(co(e,t[n]))return!0;return!1}function ho(e,t){return t===e.length-2&&(92===e.charCodeAt(t)&&no(e.charCodeAt(t+1)))}function po(e,t,n){if(e&&"Range"===e.type){var r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r))return!0;if(null!==e.min&&r<e.min)return!0;if(null!==e.max&&r>e.max)return!0}return!1}function mo(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function fo(e){return function(t,n,r){return null===t?0:t.type===oo.Function&&uo(t.value,io)?mo(t,n):e(t,n,r)}}function go(e){return function(t){return null===t||t.type!==e?0:1}}function yo(e){return function(t,n,r){if(null===t||t.type!==oo.Dimension)return 0;var a=ao(t.value,0);if(null!==e){var o=t.value.indexOf("\\",a),s=-1!==o&&ho(t.value,o)?t.value.substring(a,o):t.value.substr(a);if(!1===e.hasOwnProperty(s.toLowerCase()))return 0}return po(r,t.value,a)?0:1}}function bo(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===oo.Number&&0===Number(t.value)?1:e(t,n,r)}}var vo,ko={"ident-token":go(oo.Ident),"function-token":go(oo.Function),"at-keyword-token":go(oo.AtKeyword),"hash-token":go(oo.Hash),"string-token":go(oo.String),"bad-string-token":go(oo.BadString),"url-token":go(oo.Url),"bad-url-token":go(oo.BadUrl),"delim-token":go(oo.Delim),"number-token":go(oo.Number),"percentage-token":go(oo.Percentage),"dimension-token":go(oo.Dimension),"whitespace-token":go(oo.WhiteSpace),"CDO-token":go(oo.CDO),"CDC-token":go(oo.CDC),"colon-token":go(oo.Colon),"semicolon-token":go(oo.Semicolon),"comma-token":go(oo.Comma),"[-token":go(oo.LeftSquareBracket),"]-token":go(oo.RightSquareBracket),"(-token":go(oo.LeftParenthesis),")-token":go(oo.RightParenthesis),"{-token":go(oo.LeftCurlyBracket),"}-token":go(oo.RightCurlyBracket),string:go(oo.String),ident:go(oo.Ident),"custom-ident":function(e){if(null===e||e.type!==oo.Ident)return 0;var t=e.value.toLowerCase();return uo(t,so)||co(t,"default")?0:1},"custom-property-name":function(e){return null===e||e.type!==oo.Ident||45!==lo(e.value,0)||45!==lo(e.value,1)?0:1},"hex-color":function(e){if(null===e||e.type!==oo.Hash)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n<t;n++)if(!to(e.value.charCodeAt(n)))return 0;return 1},"id-selector":function(e){return null===e||e.type!==oo.Hash?0:eo(lo(e.value,1),lo(e.value,2),lo(e.value,3))?1:0},"an-plus-b":function(e,t){var n=0;if(!e)return 0;if(e.type===Ma)return qa(e,0,false,n);if(e.type===za&&e.value.charCodeAt(0)===Da){if(!_a(e.value,1,110))return 0;switch(e.value.length){case 2:return ja(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==Da?0:(n=Ba(t(++n),n,t),qa(e=t(n),0,Ua,n));default:return e.value.charCodeAt(2)!==Da?0:qa(e,3,Ua,n)}}else if(e.type===za||Fa(e,43)&&t(n+1).type===za){if(e.type!==za&&(e=t(++n)),null===e||!_a(e.value,0,110))return 0;switch(e.value.length){case 1:return ja(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==Da?0:(n=Ba(t(++n),n,t),qa(e=t(n),0,Ua,n));default:return e.value.charCodeAt(1)!==Da?0:qa(e,2,Ua,n)}}else if(e.type===Oa){for(var r=e.value.charCodeAt(0),a=43===r||r===Da?1:0,o=a;o<e.value.length&&Ra(e.value.charCodeAt(o));o++);return o===a?0:_a(e.value,o,110)?o+1===e.value.length?ja(t(++n),n,t):e.value.charCodeAt(o+1)!==Da?0:o+2===e.value.length?(n=Ba(t(++n),n,t),qa(e=t(n),0,Ua,n)):qa(e,o+2,Ua,n):0}return 0},urange:function(e,t){var n=0;if(null===e||e.type!==Va||!Wa(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(Qa(e,43))return null===(e=t(++n))?0:e.type===Va?Xa(Za(e,0,!0),++n,t):Qa(e,63)?Xa(1,++n,t):0;if(e.type===Ga){if(!Ja(e,43))return 0;var r=Za(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===Ka||e.type===Ga?Ja(e,45)&&Za(e,1,!1)?n+1:0:Xa(r,n,t)}return e.type===Ka&&Ja(e,43)?Xa(Za(e,1,!0),++n,t):0},"declaration-value":function(e,t){if(!e)return 0;var n=0,r=0,a=e.index;e:do{switch(e.type){case oo.BadString:case oo.BadUrl:break e;case oo.RightCurlyBracket:case oo.RightParenthesis:case oo.RightSquareBracket:if(e.balance>e.index||e.balance<a)break e;r--;break;case oo.Semicolon:if(0===r)break e;break;case oo.Delim:if("!"===e.value&&0===r)break e;break;case oo.Function:case oo.LeftParenthesis:case oo.LeftSquareBracket:case oo.LeftCurlyBracket:r++}if(n++,e.balance<=a)break}while(e=t(n));return n},"any-value":function(e,t){if(!e)return 0;var n=e.index,r=0;e:do{switch(e.type){case oo.BadString:case oo.BadUrl:break e;case oo.RightCurlyBracket:case oo.RightParenthesis:case oo.RightSquareBracket:if(e.balance>e.index||e.balance<n)break e}if(r++,e.balance<=n)break}while(e=t(r));return r},dimension:fo(yo(null)),angle:fo(yo({deg:!0,grad:!0,rad:!0,turn:!0})),decibel:fo(yo({db:!0})),frequency:fo(yo({hz:!0,khz:!0})),flex:fo(yo({fr:!0})),length:fo(bo(yo({px:!0,mm:!0,cm:!0,in:!0,pt:!0,pc:!0,q:!0,em:!0,ex:!0,ch:!0,rem:!0,vh:!0,vw:!0,vmin:!0,vmax:!0,vm:!0}))),resolution:fo(yo({dpi:!0,dpcm:!0,dppx:!0,x:!0})),semitones:fo(yo({st:!0})),time:fo(yo({s:!0,ms:!0})),percentage:fo((function(e,t,n){return null===e||e.type!==oo.Percentage||po(n,e.value,e.value.length-1)?0:1})),zero:bo(),number:fo((function(e,t,n){if(null===e)return 0;var r=ao(e.value,0);return r===e.value.length||ho(e.value,r)?po(n,e.value,r)?0:1:0})),integer:fo((function(e,t,n){if(null===e||e.type!==oo.Number)return 0;for(var r=43===e.value.charCodeAt(0)||45===e.value.charCodeAt(0)?1:0;r<e.value.length;r++)if(!no(e.value.charCodeAt(r)))return 0;return po(n,e.value,r)?0:1})),"-ms-legacy-expression":(vo="expression",vo+="(",function(e,t){return null!==e&&co(e.value,vo)?mo(e,t):0})},wo=function(e,t,n){var r=ar("SyntaxError",e);return r.input=t,r.offset=n,r.rawMessage=e,r.message=r.rawMessage+"\n "+r.input+"\n--"+new Array((r.offset||r.input.length)+1).join("-")+"^",r},xo=function(e){this.str=e,this.pos=0};xo.prototype={charCodeAt:function(e){return e<this.str.length?this.str.charCodeAt(e):0},charCode:function(){return this.charCodeAt(this.pos)},nextCharCode:function(){return this.charCodeAt(this.pos+1)},nextNonWsCode:function(e){return this.charCodeAt(this.findWsEnd(e))},findWsEnd:function(e){for(;e<this.str.length;e++){var t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e},substringToPos:function(e){return this.str.substring(this.pos,this.pos=e)},eat:function(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++},peek:function(){return this.pos<this.str.length?this.str.charAt(this.pos++):""},error:function(e){throw new wo(e,this.str,this.pos)}};var So=xo,Eo=123,Ao=function(e){for(var t="function"==typeof Uint32Array?new Uint32Array(128):new Array(128),n=0;n<128;n++)t[n]=e(String.fromCharCode(n))?1:0;return t}((function(e){return/[a-zA-Z0-9\-]/.test(e)})),To={" ":1,"&&":2,"||":3,"|":4};function Co(e){return e.substringToPos(e.findWsEnd(e.pos))}function Ro(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n>=128||0===Ao[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function _o(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Io(e){var 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 Lo(e){var t,n=null;return e.eat(Eo),t=_o(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=_o(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function Po(e,t){var n=function(e){var t=null,n=!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++,n=!0,t=e.charCode()===Eo?Lo(e):{min:1,max:0};break;case Eo:t=Lo(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,n):t}function No(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function zo(e){var t,n=null;return e.eat(60),t=Ro(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(Co(e),n=function(e){var t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():t=r*Number(_o(e)),Co(e),e.eat(44),Co(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(_o(e))),e.eat(93),null===t&&null===n?null:{type:"Range",min:t,max:n}}(e)),e.eat(62),Po(e,{type:"Type",name:t,opts:n})}function Mo(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}for(t=Object.keys(t).sort((function(e,t){return To[e]-To[t]}));t.length>0;){for(var r=t.shift(),a=0,o=0;a<e.length;a++){var s=e[a];"Combinator"===s.type&&(s.value===r?(-1===o&&(o=a-1),e.splice(a,1),a--):(-1!==o&&a-o>1&&(e.splice(o,a-o,n(e.slice(o,a),r)),a=o+1),o=-1))}-1!==o&&t.length&&e.splice(o,a-o,n(e.slice(o,a),r))}return r}function Oo(e){for(var t,n=[],r={},a=null,o=e.pos;t=Do(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==a&&"Combinator"!==a.type||(e.pos=o,e.error("Unexpected combinator")),r[t.value]=!0):null!==a&&"Combinator"!==a.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),a=t,o=e.pos);return null!==a&&"Combinator"===a.type&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:Mo(n,r)||" ",disallowEmpty:!1,explicit:!1}}function Do(e){var t=e.charCode();if(t<128&&1===Ao[t])return function(e){var t;return t=Ro(e),40===e.charCode()?(e.pos++,{type:"Function",name:t}):Po(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return Po(e,function(e){var t;return e.eat(91),t=Oo(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){var t;return e.eat(60),e.eat(39),t=Ro(e),e.eat(39),e.eat(62),Po(e,{type:"Property",name:t})}(e):zo(e);case 124:return{type:"Combinator",value:e.substringToPos(124===e.nextCharCode()?e.pos+2:e.pos+1)};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return Po(e,{type:"String",value:Io(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:Co(e)};case 64:return(t=e.nextCharCode())<128&&1===Ao[t]?(e.pos++,{type:"AtKeyword",name:Ro(e)}):No(e);case 42:case 43:case 63:case 35:case 33:break;case Eo:if((t=e.nextCharCode())<48||t>57)return No(e);break;default:return No(e)}}function Uo(e){var t=new So(e),n=Oo(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type&&(n=n.terms[0]),n}Uo("[a&&<b>#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!");var Fo=Uo,Bo=function(){};function qo(e){return"function"==typeof e?e:Bo}var jo=function(e,t,n){var r=Bo,a=Bo;if("function"==typeof t?r=t:t&&(r=qo(t.enter),a=qo(t.leave)),r===Bo&&a===Bo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}a.call(n,t)}(e)},Ho=new Vr,Wo={decorator:function(e){var t=null,n={len:0,node:null},r=[n],a="";return{children:e.children,node:function(n){var r=t;t=n,e.node.call(this,n),t=r},chunk:function(e){a+=e,n.node!==t?r.push({len:e.length,node:t}):n.len+=e.length},result:function(){return $o(a,r)}}}};function $o(e,t){var n=[],r=0,a=0,o=t?t[a].node:null;for(Ca(e,Ho);!Ho.eof;){if(t)for(;a<t.length&&r+t[a].len<=Ho.tokenStart;)r+=t[a++].len,o=t[a].node;n.push({type:Ho.tokenType,value:Ho.getTokenValue(),index:Ho.tokenIndex,balance:Ho.balance[Ho.tokenIndex],node:o}),Ho.next()}return n}var Vo={type:"Match"},Yo={type:"Mismatch"},Go={type:"DisallowEmpty"};function Ko(e,t,n){return t===Vo&&n===Yo||e===Vo&&t===Vo&&n===Vo?e:("If"===e.type&&e.else===Yo&&t===Vo&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}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 Zo(e,t,n){switch(e){case" ":for(var r=Vo,a=t.length-1;a>=0;a--){r=Ko(i=t[a],r,Yo)}return r;case"|":r=Yo;var o=null;for(a=t.length-1;a>=0;a--){if(Jo(i=t[a])&&(null===o&&a>0&&Jo(t[a-1])&&(r=Ko({type:"Enum",map:o=Object.create(null)},Vo,r)),null!==o)){var s=(Qo(i.name)?i.name.slice(0,-1):i.name).toLowerCase();if(s in o==!1){o[s]=i;continue}}o=null,r=Ko(i,Vo,r)}return r;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(r=Yo,a=t.length-1;a>=0;a--){var i=t[a];l=t.length>1?Zo(e,t.filter((function(e){return e!==i})),!1):Vo,r=Ko(i,l,r)}return r;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(r=n?Vo:Yo,a=t.length-1;a>=0;a--){var l;i=t[a];l=t.length>1?Zo(e,t.filter((function(e){return e!==i})),!0):Vo,r=Ko(i,l,r)}return r}}function Xo(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=Zo(e.combinator,e.terms.map(Xo),!1);return e.disallowEmpty&&(t=Ko(t,Go,Yo)),t;case"Multiplier":return function(e){var t=Vo,n=Xo(e.term);if(0===e.max)n=Ko(n,Go,Yo),(t=Ko(n,null,Yo)).then=Ko(Vo,Vo,t),e.comma&&(t.then.else=Ko({type:"Comma",syntax:e},t,Yo));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==Vo&&(t=Ko({type:"Comma",syntax:e},t,Yo)),t=Ko(n,Ko(Vo,Vo,t),Yo);if(0===e.min)t=Ko(Vo,Vo,t);else for(r=0;r<e.min-1;r++)e.comma&&t!==Vo&&(t=Ko({type:"Comma",syntax:e},t,Yo)),t=Ko(n,t,Yo);return t}(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}var es=Vo,ts=Yo,ns=Go,rs=function(e,t){return"string"==typeof e&&(e=Fo(e)),{type:"MatchGraph",match:Xo(e),syntax:t||null,source:e}},as=Object.prototype.hasOwnProperty,os=es,ss=ts,is=ns,ls=ur.TYPE,cs="Match";function us(e){for(var t=null,n=null,r=e;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}function hs(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=65&&r<=90&&(r|=32),r!==t.charCodeAt(n))return!1}return!0}function ds(e){return null===e||(e.type===ls.Comma||e.type===ls.Function||e.type===ls.LeftParenthesis||e.type===ls.LeftSquareBracket||e.type===ls.LeftCurlyBracket||function(e){return e.type===ls.Delim&&"?"!==e.value}(e))}function ps(e){return null===e||(e.type===ls.RightParenthesis||e.type===ls.RightSquareBracket||e.type===ls.RightCurlyBracket||e.type===ls.Delim)}function ms(e,t,n){function r(){do{y++,g=y<e.length?e[y]:null}while(null!==g&&(g.type===ls.WhiteSpace||g.type===ls.Comment))}function a(t){var n=y+t;return n<e.length?e[n]:null}function o(e,t){return{nextState:e,matchStack:v,syntaxStack:u,thenStack:h,tokenIndex:y,prev:t}}function s(e){h={nextState:e,matchStack:v,syntaxStack:u,prev:h}}function i(e){d=o(e,d)}function l(){v={type:1,syntax:t.syntax,token:g,prev:v},r(),p=null,y>b&&(b=y)}function c(){v=2===v.type?v.prev:{type:3,syntax:u.syntax,token:v.token,prev:v},u=u.prev}var u=null,h=null,d=null,p=null,m=0,f=null,g=null,y=-1,b=0,v={type:0,syntax:null,token:null,prev:null};for(r();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=ss;break}f=cs;break}if((t=h.nextState)===is){if(h.matchStack===v){t=ss;break}t=os}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,v=d.matchStack,y=d.tokenIndex,g=y<e.length?e[y]:null,d=d.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==ss&&i(t.else),t.then!==os&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":var k=t.syntax.terms;if(t.index===k.length){if(0===t.mask||t.syntax.all){t=ss;break}t=os;break}if(t.mask===(1<<k.length)-1){t=os;break}for(;t.index<k.length;t.index++){var w=1<<t.index;if(0==(t.mask&w)){i(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|w}),t=k[t.index++];break}}break;case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==g)if(-1!==(T=g.value.toLowerCase()).indexOf("\\")&&(T=T.replace(/\\[09].*$/,"")),as.call(t.map,T)){t=t.map[T];break}t=ss;break;case"Generic":var x=null!==u?u.opts:null,S=y+Math.floor(t.fn(g,a,x));if(!isNaN(S)&&S>y){for(;y<S;)l();t=os}else t=ss;break;case"Type":case"Property":var E="Type"===t.type?"types":"properties",A=as.call(n,E)?n[E][t.name]:null;if(!A||!A.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==p&&null!==g&&"Type"===t.type)if("custom-ident"===t.name&&g.type===ls.Ident||"length"===t.name&&"0"===g.value){null===p&&(p=o(t,d)),t=ss;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},v={type:2,syntax:t.syntax,token:v.token,prev:v},t=A.match;break;case"Keyword":var T=t.name;if(null!==g){var C=g.value;if(-1!==C.indexOf("\\")&&(C=C.replace(/\\[09].*$/,"")),hs(C,T)){l(),t=os;break}}t=ss;break;case"AtKeyword":case"Function":if(null!==g&&hs(g.value,t.name)){l(),t=os;break}t=ss;break;case"Token":if(null!==g&&g.value===t.value){l(),t=os;break}t=ss;break;case"Comma":null!==g&&g.type===ls.Comma?ds(v.token)?t=ss:(l(),t=ps(g)?ss:os):t=ds(v.token)||ps(g)?os:ss;break;case"String":var R="";for(S=y;S<e.length&&R.length<t.value.length;S++)R+=e[S].value;if(hs(R,t.value)){for(;y<S;)l();t=os}else t=ss;break;default:throw new Error("Unknown node type: "+t.type)}switch(m,f){case null:console.warn("[csstree-match] BREAK after 15000 iterations"),f="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",v=null;break;case cs:for(;null!==u;)c();break;default:v=null}return{tokens:e,reason:f,iterations:m,match:v,longestMatch:b}}var fs=function(e,t,n){var r=ms(e,t,n||{});if(null===r.match)return r;var a=r.match,o=r.match={syntax:t.syntax||null,match:[]},s=[o];for(a=us(a).prev;null!==a;){switch(a.type){case 2:o.match.push(o={syntax:a.syntax,match:[]}),s.push(o);break;case 3:s.pop(),o=s[s.length-1];break;default:o.match.push({syntax:a.syntax||null,token:a.token.value,node:a.token.node})}a=a.prev}return r};function gs(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}var n=null;return null!==this.matched&&function r(a){if(Array.isArray(a.match)){for(var o=0;o<a.match.length;o++)if(r(a.match[o]))return t(a.syntax)&&n.unshift(a.syntax),!0}else if(a.node===e)return n=t(a.syntax)?[a.syntax]:[],!0;return!1}(this.matched),n}function ys(e,t,n){var r=gs.call(e,t);return null!==r&&r.some(n)}var bs={getTrace:gs,isType:function(e,t){return ys(this,e,(function(e){return"Type"===e.type&&e.name===t}))},isProperty:function(e,t){return ys(this,e,(function(e){return"Property"===e.type&&e.name===t}))},isKeyword:function(e){return ys(this,e,(function(e){return"Keyword"===e.type}))}};function vs(e){return"node"in e?e.node:vs(e.match[0])}function ks(e){return"node"in e?e.node:ks(e.match[e.match.length-1])}var ws={matchFragments:function(e,t,n,r,a){var o=[];return null!==n.matched&&function n(s){if(null!==s.syntax&&s.syntax.type===r&&s.syntax.name===a){var i=vs(s),l=ks(s);e.syntax.walk(t,(function(e,t,n){if(e===i){var r=new rr;do{if(r.appendData(t.data),t.data===l)break;t=t.next}while(null!==t);o.push({parent:n,nodes:r})}}))}Array.isArray(s.match)&&s.match.forEach(n)}(n.matched),o}},xs=Object.prototype.hasOwnProperty;function Ss(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Es(e){return Boolean(e)&&Ss(e.offset)&&Ss(e.line)&&Ss(e.column)}function As(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(var a in n){var o=!0;if(!1!==xs.call(n,a)){if("type"===a)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)a+=".source";else if(Es(n.loc.start)){if(Es(n.loc.end))continue;a+=".end"}else a+=".start";o=!1}else if(t.hasOwnProperty(a)){var s=0;for(o=!1;!o&&s<t[a].length;s++){var i=t[a][s];switch(i){case String:o="string"==typeof n[a];break;case Boolean:o="boolean"==typeof n[a];break;case null:o=null===n[a];break;default:"string"==typeof i?o=n[a]&&n[a].type===i:Array.isArray(i)&&(o=n[a]instanceof rr)}}}else r(n,"Unknown field `"+a+"` for "+e+" node type");o||r(n,"Bad value for `"+e+"."+a+"`")}}for(var a in t)xs.call(t,a)&&!1===xs.call(n,a)&&r(n,"Field `"+e+"."+a+"` is missed")}}function Ts(e,t){var n=t.structure,r={type:String,loc:!0},a={type:'"'+e+'"'};for(var o in n)if(!1!==xs.call(n,o)){for(var s=[],i=r[o]=Array.isArray(n[o])?n[o].slice():[n[o]],l=0;l<i.length;l++){var c=i[l];if(c===String||c===Boolean)s.push(c.name);else if(null===c)s.push("null");else if("string"==typeof c)s.push("<"+c+">");else{if(!Array.isArray(c))throw new Error("Wrong value `"+c+"` in `"+e+"."+o+"` structure definition");s.push("List")}}a[o]=s.join(" | ")}return{docs:a,check:As(e,r)}}var Cs=function(e){var t={};if(e.node)for(var n in e.node)if(xs.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Ts(n,r)}return t},Rs=Xr,_s=ea,Is=rs,Ls=fs,Ps=Cs,Ns=Is("inherit | initial | unset"),zs=Is("inherit | initial | unset | <-ms-legacy-expression>");function Ms(e,t,n){var r={};for(var a in e)e[a].syntax&&(r[a]=n?e[a].syntax:Kr(e[a].syntax,{compact:t}));return r}function Os(e,t,n){const r={};for(const[a,o]of Object.entries(e))r[a]={prelude:o.prelude&&(n?o.prelude.syntax:Kr(o.prelude.syntax,{compact:t})),descriptors:o.descriptors&&Ms(o.descriptors,t,n)};return r}function Ds(e,t,n){return{matched:e,iterations:n,error:t,getTrace:bs.getTrace,isType:bs.isType,isProperty:bs.isProperty,isKeyword:bs.isKeyword}}function Us(e,t,n,r){var a,o=function(e,t){return"string"==typeof e?$o(e,null):t.generate(e,Wo)}(n,e.syntax);return function(e){for(var t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(o)?Ds(null,new Error("Matching for a tree with var() is not supported")):(r&&(a=Ls(o,e.valueCommonSyntax,e)),r&&a.match||(a=Ls(o,t.match,e)).match?Ds(a.match,null,a.iterations):Ds(null,new _s(a.reason,t.syntax,n,a),a.iterations))}var Fs=function(e,t,n){if(this.valueCommonSyntax=Ns,this.syntax=t,this.generic=!1,this.atrules={},this.properties={},this.types={},this.structure=n||Ps(e),e){if(e.types)for(var r in e.types)this.addType_(r,e.types[r]);if(e.generic)for(var r in this.generic=!0,ko)this.addType_(r,ko[r]);if(e.atrules)for(var r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(var r in e.properties)this.addProperty_(r,e.properties[r])}};Fs.prototype={structure:{},checkStructure:function(e){function t(e,t){r.push({node:e,message:t})}var n=this.structure,r=[];return this.syntax.walk(e,(function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")})),!!r.length&&r},createDescriptor:function(e,t,n,r=null){var a={type:t,name:n},o={type:t,name:n,parent:r,syntax:null,match:null};return"function"==typeof e?o.match=Is(e,a):("string"==typeof e?Object.defineProperty(o,"syntax",{get:function(){return Object.defineProperty(o,"syntax",{value:Fo(e)}),o.syntax}}):o.syntax=e,Object.defineProperty(o,"match",{get:function(){return Object.defineProperty(o,"match",{value:Is(o.syntax,a)}),o.match}})),o},addAtrule_:function(e,t){t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),{}):null})},addProperty_:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))},addType_:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e),t===ko["-ms-legacy-expression"]&&(this.valueCommonSyntax=zs))},checkAtruleName:function(e){if(!this.getAtrule(e))return new Rs("Unknown at-rule","@"+e)},checkAtrulePrelude:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):r.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0},checkAtruleDescriptorName:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e),a=sa.keyword(t);return r.descriptors?r.descriptors[a.name]||r.descriptors[a.basename]?void 0:new Rs("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")},checkPropertyName:function(e){return sa.property(e).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(e)?void 0:new Rs("Unknown property",e)},matchAtrulePrelude:function(e,t){var n=this.checkAtrulePrelude(e,t);return n?Ds(null,n):t?Us(this,this.getAtrule(e).prelude,t,!1):Ds(null,null)},matchAtruleDescriptor:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return Ds(null,r);var a=this.getAtrule(e),o=sa.keyword(t);return Us(this,a.descriptors[o.name]||a.descriptors[o.basename],n,!1)},matchDeclaration:function(e){return"Declaration"!==e.type?Ds(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=this.checkPropertyName(e);return n?Ds(null,n):Us(this,this.getProperty(e),t,!0)},matchType:function(e,t){var n=this.getType(e);return n?Us(this,n,t,!1):Ds(null,new Rs("Unknown type",e))},match:function(e,t){return"string"==typeof e||e&&e.type?("string"!=typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),Us(this,e,t,!1)):Ds(null,new Rs("Bad syntax"))},findValueFragments:function(e,t,n,r){return ws.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return ws.matchFragments(this,e.value,this.matchDeclaration(e),t,n)},findAllFragments:function(e,t,n){var r=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}.bind(this)}),r},getAtrule:function(e,t=!0){var n=sa.keyword(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null},getAtrulePrelude:function(e,t=!0){const n=this.getAtrule(e,t);return n&&n.prelude||null},getAtruleDescriptor:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null},getProperty:function(e,t=!0){var n=sa.property(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null},getType:function(e){return this.types.hasOwnProperty(e)?this.types[e]:null},validate:function(){function e(r,a,o,s){if(o.hasOwnProperty(a))return o[a];o[a]=!1,null!==s.syntax&&jo(s.syntax,(function(s){if("Type"===s.type||"Property"===s.type){var i="Type"===s.type?r.types:r.properties,l="Type"===s.type?t:n;i.hasOwnProperty(s.name)&&!e(r,s.name,l,i[s.name])||(o[a]=!0)}}),this)}var t={},n={};for(var r in this.types)e(this,r,t,this.types[r]);for(var r in this.properties)e(this,r,n,this.properties[r]);return t=Object.keys(t).filter((function(e){return t[e]})),n=Object.keys(n).filter((function(e){return n[e]})),t.length||n.length?{types:t,properties:n}:null},dump:function(e,t){return{generic:this.generic,types:Ms(this.types,!t,e),properties:Ms(this.properties,!t,e),atrules:Os(this.atrules,!t,e)}},toString:function(){return JSON.stringify(this.dump())}};var Bs=Fs,qs={SyntaxError:wo,parse:Fo,generate:Kr,walk:jo},js=Ca.isBOM;var Hs=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1};Hs.prototype={setSource:function(e,t,n,r){this.source=e,this.startOffset=void 0===t?0:t,this.startLine=void 0===n?1:n,this.startColumn=void 0===r?1:r,this.linesAndColumnsComputed=!1},ensureLinesAndColumnsComputed:function(){this.linesAndColumnsComputed||(!function(e,t){for(var n=t.length,r=la(e.lines,n),a=e.startLine,o=la(e.columns,n),s=e.startColumn,i=t.length>0?js(t.charCodeAt(0)):0;i<n;i++){var l=t.charCodeAt(i);r[i]=a,o[i]=s++,10!==l&&13!==l&&12!==l||(13===l&&i+1<n&&10===t.charCodeAt(i+1)&&(r[++i]=a,o[i]=s),a++,s=1)}r[i]=a,o[i]=s,e.lines=r,e.columns=o}(this,this.source),this.linesAndColumnsComputed=!0)},getLocation:function(e,t){return this.ensureLinesAndColumnsComputed(),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}},getLocationRange:function(e,t,n){return this.ensureLinesAndColumnsComputed(),{source:n,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]}}}};var Ws=Hs,$s=Ca.TYPE,Vs=$s.WhiteSpace,Ys=$s.Comment,Gs=function(e){var t=this.createList(),n=null,r={recognizer:e,space:null,ignoreWS:!1,ignoreWSAfter:!1};for(this.scanner.skipSC();!this.scanner.eof;){switch(this.scanner.tokenType){case Ys:this.scanner.next();continue;case Vs:r.ignoreWS?this.scanner.next():r.space=this.WhiteSpace();continue}if(void 0===(n=e.getNode.call(this,r)))break;null!==r.space&&(t.push(r.space),r.space=null),t.push(n),r.ignoreWSAfter?(r.ignoreWSAfter=!1,r.ignoreWS=!0):r.ignoreWS=!1}return t},{findWhiteSpaceStart:Ks,cmpStr:Qs}=Or,Js=function(){},Zs=ur.TYPE,Xs=ur.NAME,ei=Zs.WhiteSpace,ti=Zs.Comment,ni=Zs.Ident,ri=Zs.Function,ai=Zs.Url,oi=Zs.Hash,si=Zs.Percentage,ii=Zs.Number;function li(e){return function(){return this[e]()}}var ci=function(e){var t={scanner:new Vr,locationMap:new Ws,filename:"<unknown>",needPositions:!1,onParseError:Js,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Gs,createList:function(){return new rr},createSingleNodeList:function(e){return(new rr).appendData(e)},getFirstListNode:function(e){return e&&e.first()},getLastListNode:function(e){return e.last()},parseWithFallback:function(e,t){var n=this.scanner.tokenIndex;try{return e.call(this)}catch(e){if(this.onParseErrorThrow)throw e;var r=t.call(this,n);return this.onParseErrorThrow=!0,this.onParseError(e,r),this.onParseErrorThrow=!1,r}},lookupNonWSType:function(e){do{var t=this.scanner.lookupType(e++);if(t!==ei)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=Xs[e]+" is expected";switch(e){case ni:this.scanner.tokenType===ri||this.scanner.tokenType===ai?(t=this.scanner.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case oi:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n="Name is expected");break;case si:this.scanner.tokenType===ii&&(t=this.scanner.tokenEnd,n="Percent sign is expected");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===e&&(t+=1)}this.error(n,t)}this.scanner.next()},consume:function(e){var t=this.scanner.getTokenValue();return this.eat(e),t},consumeFunctionName:function(){var e=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(ri),e},getLocation:function(e,t){return this.needPositions?this.locationMap.getLocationRange(e,t,this.filename):null},getLocationFromList:function(e){if(this.needPositions){var t=this.getFirstListNode(e),n=this.getLastListNode(e);return this.locationMap.getLocationRange(null!==t?t.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==n?n.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(e,t){var n=void 0!==t&&t<this.scanner.source.length?this.locationMap.getLocation(t):this.scanner.eof?this.locationMap.getLocation(Ks(this.scanner.source,this.scanner.source.length-1)):this.locationMap.getLocation(this.scanner.tokenStart);throw new ir(e||"Unexpected input",this.scanner.source,n.offset,n.line,n.column)}};for(var n in e=function(e){var t={context:{},scope:{},atrule:{},pseudo:{}};if(e.parseContext)for(var n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=li(e.parseContext[n])}if(e.scope)for(var n in e.scope)t.scope[n]=e.scope[n];if(e.atrule)for(var n in e.atrule){var r=e.atrule[n];r.parse&&(t.atrule[n]=r.parse)}if(e.pseudo)for(var n in e.pseudo){var a=e.pseudo[n];a.parse&&(t.pseudo[n]=a.parse)}if(e.node)for(var n in e.node)t[n]=e.node[n].parse;return t}(e||{}),e)t[n]=e[n];return function(e,n){var r,a=(n=n||{}).context||"default",o=n.onComment;if(Ca(e,t.scanner),t.locationMap.setSource(e,n.offset,n.line,n.column),t.filename=n.filename||"<unknown>",t.needPositions=Boolean(n.positions),t.onParseError="function"==typeof n.onParseError?n.onParseError:Js,t.onParseErrorThrow=!1,t.parseAtrulePrelude=!("parseAtrulePrelude"in n)||Boolean(n.parseAtrulePrelude),t.parseRulePrelude=!("parseRulePrelude"in n)||Boolean(n.parseRulePrelude),t.parseValue=!("parseValue"in n)||Boolean(n.parseValue),t.parseCustomProperty="parseCustomProperty"in n&&Boolean(n.parseCustomProperty),!t.context.hasOwnProperty(a))throw new Error("Unknown context `"+a+"`");return"function"==typeof o&&t.scanner.forEachToken(((n,r,a)=>{if(n===ti){const n=t.getLocation(r,a),s=Qs(e,a-2,a,"*/")?e.slice(r+2,a-2):e.slice(r+2,a);o(s,n)}})),r=t.context[a].call(t,n),t.scanner.eof||t.error(),r}},ui="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),hi=function(e){if(0<=e&&e<ui.length)return ui[e];throw new TypeError("Must be between 0 and 63: "+e)};var di=function(e){var t,n="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&r,(r>>>=5)>0&&(t|=32),n+=hi(t)}while(r>0);return n};var pi=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function a(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[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}function s(e){var n=e,r=a(e);if(r){if(!r.path)return e;n=r.path}for(var s,i=t.isAbsolute(n),l=n.split(/\/+/),c=0,u=l.length-1;u>=0;u--)"."===(s=l[u])?l.splice(u,1):".."===s?c++:c>0&&(""===s?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return""===(n=l.join("/"))&&(n=i?"/":"."),r?(r.path=n,o(r)):n}function i(e,t){""===e&&(e="."),""===t&&(t=".");var n=a(t),i=a(e);if(i&&(e=i.path||"/"),n&&!n.scheme)return i&&(n.scheme=i.scheme),o(n);if(n||t.match(r))return t;if(i&&!i.host&&!i.path)return i.host=t,o(i);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return i?(i.path=l,o(i)):l}t.urlParse=a,t.urlGenerate=o,t.normalize=s,t.join=i,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function h(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?"$"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=h(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=h(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=h(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:h(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=a(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var l=r.path.lastIndexOf("/");l>=0&&(r.path=r.path.substring(0,l+1))}t=i(o(r),t)}return s(t)}}));pi.getArg,pi.urlParse,pi.urlGenerate,pi.normalize,pi.join,pi.isAbsolute,pi.relative,pi.toSetString,pi.fromSetString,pi.compareByOriginalPositions,pi.compareByGeneratedPositionsDeflated,pi.compareByGeneratedPositionsInflated,pi.parseSourceMapInput,pi.computeSourceURL;var mi=Object.prototype.hasOwnProperty,fi="undefined"!=typeof Map;function gi(){this._array=[],this._set=fi?new Map:Object.create(null)}gi.fromArray=function(e,t){for(var n=new gi,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},gi.prototype.size=function(){return fi?this._set.size:Object.getOwnPropertyNames(this._set).length},gi.prototype.add=function(e,t){var n=fi?e:pi.toSetString(e),r=fi?this.has(e):mi.call(this._set,n),a=this._array.length;r&&!t||this._array.push(e),r||(fi?this._set.set(e,a):this._set[n]=a)},gi.prototype.has=function(e){if(fi)return this._set.has(e);var t=pi.toSetString(e);return mi.call(this._set,t)},gi.prototype.indexOf=function(e){if(fi){var t=this._set.get(e);if(t>=0)return t}else{var n=pi.toSetString(e);if(mi.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},gi.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},gi.prototype.toArray=function(){return this._array.slice()};var yi={ArraySet:gi};function bi(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}bi.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},bi.prototype.add=function(e){var t,n,r,a,o,s;t=this._last,n=e,r=t.generatedLine,a=n.generatedLine,o=t.generatedColumn,s=n.generatedColumn,a>r||a==r&&s>=o||pi.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},bi.prototype.toArray=function(){return this._sorted||(this._array.sort(pi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var vi=yi.ArraySet,ki={MappingList:bi}.MappingList;function wi(e){e||(e={}),this._file=pi.getArg(e,"file",null),this._sourceRoot=pi.getArg(e,"sourceRoot",null),this._skipValidation=pi.getArg(e,"skipValidation",!1),this._sources=new vi,this._names=new vi,this._mappings=new ki,this._sourcesContents=null}wi.prototype._version=3,wi.fromSourceMap=function(e){var t=e.sourceRoot,n=new wi({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=pi.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var a=r;null!==t&&(a=pi.relative(t,r)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(r);null!=o&&n.setSourceContent(r,o)})),n},wi.prototype.addMapping=function(e){var t=pi.getArg(e,"generated"),n=pi.getArg(e,"original",null),r=pi.getArg(e,"source",null),a=pi.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,a),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:a})},wi.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=pi.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[pi.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[pi.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},wi.prototype.applySourceMap=function(e,t,n){var r=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.');r=e.file}var a=this._sourceRoot;null!=a&&(r=pi.relative(a,r));var o=new vi,s=new vi;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=pi.join(n,t.source)),null!=a&&(t.source=pi.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||s.has(c)||s.add(c)}),this),this._sources=o,this._names=s,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=pi.join(n,t)),null!=a&&(t=pi.relative(a,t)),this.setSourceContent(t,r))}),this)},wi.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},wi.prototype._serializeMappings=function(){for(var e,t,n,r,a=0,o=1,s=0,i=0,l=0,c=0,u="",h=this._mappings.toArray(),d=0,p=h.length;d<p;d++){if(e="",(t=h[d]).generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(d>0){if(!pi.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=","}e+=di(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=di(r-c),c=r,e+=di(t.originalLine-1-i),i=t.originalLine-1,e+=di(t.originalColumn-s),s=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=di(n-l),l=n)),u+=e}return u},wi.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=pi.relative(t,e));var n=pi.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},wi.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},wi.prototype.toString=function(){return JSON.stringify(this.toJSON())};var xi={SourceMapGenerator:wi}.SourceMapGenerator,Si={Atrule:!0,Selector:!0,Declaration:!0},Ei=Object.prototype.hasOwnProperty;function Ai(e,t){var n=e.children,r=null;"function"!=typeof t?n.forEach(this.node,this):n.forEach((function(e){null!==r&&t.call(this,r),this.node(e),r=e}),this)}var Ti=function(e){function t(e){if(!Ei.call(n,e.type))throw new Error("Unknown node type: "+e.type);n[e.type].call(this,e)}var n={};if(e.node)for(var r in e.node)n[r]=e.node[r].generate;return function(e,n){var r="",a={children:Ai,node:t,chunk:function(e){r+=e},result:function(){return r}};return n&&("function"==typeof n.decorator&&(a=n.decorator(a)),n.sourceMap&&(a=function(e){var t=new xi,n=1,r=0,a={line:1,column:0},o={line:0,column:0},s=!1,i={line:1,column:0},l={generated:i},c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Si.hasOwnProperty(e.type)){var u=e.loc.start.line,h=e.loc.start.column-1;o.line===u&&o.column===h||(o.line=u,o.column=h,a.line=n,a.column=r,s&&(s=!1,a.line===i.line&&a.column===i.column||t.addMapping(l)),s=!0,t.addMapping({source:e.loc.source,original:o,generated:a}))}c.call(this,e),s&&Si.hasOwnProperty(e.type)&&(i.line=n,i.column=r)};var u=e.chunk;e.chunk=function(e){for(var t=0;t<e.length;t++)10===e.charCodeAt(t)?(n++,r=0):r++;u(e)};var h=e.result;return e.result=function(){return s&&t.addMapping(l),{css:h(),map:t}},e}(a))),a.node(e),a.result()}},Ci=Object.prototype.hasOwnProperty,Ri=function(){};function _i(e){return"function"==typeof e?e:Ri}function Ii(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function Li(e,t){var n=t.structure,r=[];for(var a in n)if(!1!==Ci.call(n,a)){var o=n[a],s={name:a,type:!1,nullable:!1};Array.isArray(n[a])||(o=[n[a]]);for(var i=0;i<o.length;i++){var l=o[i];null===l?s.nullable=!0:"string"==typeof l?s.type="node":Array.isArray(l)&&(s.type="list")}s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function Pi(e,t){var n=e.fields.slice(),r=e.context,a="string"==typeof r;return t&&n.reverse(),function(e,o,s,i){var l;a&&(l=o[r],o[r]=e);for(var c=0;c<n.length;c++){var u=n[c],h=e[u.name];if(!u.nullable||h)if("list"===u.type){if(t?h.reduceRight(i,!1):h.reduce(i,!1))return!0}else if(s(h))return!0}a&&(o[r]=l)}}function Ni(e){return{Atrule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Rule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Declaration:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block,DeclarationList:e.DeclarationList}}}var zi=function(e){var t=function(e){var t={};for(var n in e.node)if(Ci.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Li(0,r)}return t}(e),n={},r={},a=Symbol("break-walk"),o=Symbol("skip-node");for(var s in t)Ci.call(t,s)&&null!==t[s]&&(n[s]=Pi(t[s],!1),r[s]=Pi(t[s],!0));var i=Ni(n),l=Ni(r),c=function(e,s){function c(e,t,n){var r=h.call(m,e,t,n);return r===a||r!==o&&(!(!p.hasOwnProperty(e.type)||!p[e.type](e,m,c,u))||d.call(m,e,t,n)===a)}var u=(e,t,n,r)=>e||c(t,n,r),h=Ri,d=Ri,p=n,m={break:a,skip:o,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof s)h=s;else if(s&&(h=_i(s.enter),d=_i(s.leave),s.reverse&&(p=r),s.visit)){if(i.hasOwnProperty(s.visit))p=s.reverse?l[s.visit]:i[s.visit];else if(!t.hasOwnProperty(s.visit))throw new Error("Bad value `"+s.visit+"` for `visit` option (should be: "+Object.keys(t).join(", ")+")");h=Ii(h,s.visit),d=Ii(d,s.visit)}if(h===Ri&&d===Ri)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return c.break=a,c.skip=o,c.find=function(e,t){var n=null;return c(e,(function(e,r,o){if(t.call(this,e,r,o))return n=e,a})),n},c.findLast=function(e,t){var n=null;return c(e,{reverse:!0,enter:function(e,r,o){if(t.call(this,e,r,o))return n=e,a}}),n},c.findAll=function(e,t){var n=[];return c(e,(function(e,r,a){t.call(this,e,r,a)&&n.push(e)})),n},c},Mi=function e(t){var n={};for(var r in t){var a=t[r];a&&(Array.isArray(a)||a instanceof rr?a=a.map(e):a.constructor===Object&&(a=e(a))),n[r]=a}return n};const Oi=Object.prototype.hasOwnProperty,Di={generic:!0,types:qi,atrules:{prelude:ji,descriptors:ji},properties:qi,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,n){for(const r in n)Oi.call(n,r)&&(Ui(t[r])?e(t[r],Fi(n[r])):t[r]=Fi(n[r]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function Ui(e){return e&&e.constructor===Object}function Fi(e){return Ui(e)?Object.assign({},e):e}function Bi(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function qi(e,t){if("string"==typeof t)return Bi(e,t);const n=Object.assign({},e);for(let r in t)Oi.call(t,r)&&(n[r]=Bi(Oi.call(e,r)?e[r]:void 0,t[r]));return n}function ji(e,t){const n=qi(e,t);return!Ui(n)||Object.keys(n).length?n:null}function Hi(e,t,n){for(const r in n)if(!1!==Oi.call(n,r))if(!0===n[r])r in t&&Oi.call(t,r)&&(e[r]=Fi(t[r]));else if(n[r])if("function"==typeof n[r]){const a=n[r];e[r]=a({},e[r]),e[r]=a(e[r]||{},t[r])}else if(Ui(n[r])){const a={};for(let t in e[r])a[t]=Hi({},e[r][t],n[r]);for(let e in t[r])a[e]=Hi(a[e]||{},t[r][e],n[r]);e[r]=a}else if(Array.isArray(n[r])){const a={},o=n[r].reduce((function(e,t){return e[t]=!0,e}),{});for(const[t,n]of Object.entries(e[r]||{}))a[t]={},n&&Hi(a[t],n,o);for(const e in t[r])Oi.call(t[r],e)&&(a[e]||(a[e]={}),t[r]&&t[r][e]&&Hi(a[e],t[r][e],o));e[r]=a}return e}var Wi=(e,t)=>Hi(e,t,Di);function $i(e){var t=ci(e),n=zi(e),r=Ti(e),a=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof rr==0&&(e.children=(new rr).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof rr&&(e.children=e.children.toArray())}}),t}}}(n),o={List:rr,SyntaxError:ir,TokenStream:Vr,Lexer:Bs,vendorPrefix:sa.vendorPrefix,keyword:sa.keyword,property:sa.property,isCustomProperty:sa.isCustomProperty,definitionSyntax:qs,lexer:null,createLexer:function(e){return new Bs(e,o,o.lexer.structure)},tokenize:Ca,parse:t,walk:n,generate:r,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:Mi,fromPlainObject:a.fromPlainObject,toPlainObject:a.toPlainObject,createSyntax:function(e){return $i(Wi({},e))},fork:function(t){var n=Wi({},e);return $i("function"==typeof t?t(n,Object.assign):Wi(n,t))}};return o.lexer=new Bs({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},o),o}var Vi=function(e){return $i(Wi({},e))},Yi={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","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( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",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":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<quote>|<target>|<leader()>|<attr()>|counter( <ident> , <'list-style-type'>? )]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","counter()":"counter( <custom-ident> , <counter-style>? )","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <custom-ident> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","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":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fit-content()":"fit-content( [<length>|<percentage>] )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<positive-integer>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] <resolution>","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length>|<percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length>|<percentage>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )","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":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","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-selector":"<pseudo-page>+|<ident> <pseudo-page>*","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( <length> )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","saturate()":"saturate( <number-percentage> )","scale()":"scale( <number> , <number>? )","scale3d()":"scale3d( <number> , <number> , <number> )","scaleX()":"scaleX( <number> )","scaleY()":"scaleY( <number> )","scaleZ()":"scaleZ( <number> )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"<time>||<timing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-transition":"[none|<single-transition-property>]||<time>||<timing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<positive-integer>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","border-radius":"<length-percentage>{1,2}",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#","name-repeat":"repeat( [<positive-integer>|auto-fill] , <line-names>+ )",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger",ratio:"<integer> / <integer>",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto","track-group":"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>","track-list-v0":"[<string>* <track-group> <string>*]+|none","track-minmax":"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","positive-integer":"<integer [0,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"<integer [0,1]>","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<'color'>","-webkit-border-before-color":"<'color'>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert",animation:"<single-animation>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<timing-function>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<box>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end","caret-color":"auto|<color>",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","color-adjust":"economy|exact","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[size||layout||style||paint]",content:"normal|none|[<content-replacement>|<content-list>] [/ <string>]?","counter-increment":"[<custom-ident> <integer>?]+|none","counter-reset":"[<custom-ident> <integer>?]+|none","counter-set":"[<custom-ident> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|<number>","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<url>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"over|under|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|dark|light|<color>{2}","scrollbar-gutter":"auto|[stable|always]&&both?&&force?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|<shape-box>||<basic-shape>|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<timing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )|fit-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length-percentage>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [<media-query-list>]?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}}}},Gi=Ca.cmpChar,Ki=Ca.isDigit,Qi=Ca.TYPE,Ji=Qi.WhiteSpace,Zi=Qi.Comment,Xi=Qi.Ident,el=Qi.Number,tl=Qi.Dimension,nl=43,rl=45,al=110,ol=!0;function sl(e,t){var n=this.scanner.tokenStart+e,r=this.scanner.source.charCodeAt(n);for(r!==nl&&r!==rl||(t&&this.error("Number sign is not allowed"),n++);n<this.scanner.tokenEnd;n++)Ki(this.scanner.source.charCodeAt(n))||this.error("Integer is expected",n)}function il(e){return sl.call(this,0,e)}function ll(e,t){if(!Gi(this.scanner.source,this.scanner.tokenStart+e,t)){var n="";switch(t){case al:n="N is expected";break;case rl:n="HyphenMinus is expected"}this.error(n,this.scanner.tokenStart+e)}}function cl(){for(var e=0,t=0,n=this.scanner.tokenType;n===Ji||n===Zi;)n=this.scanner.lookupType(++e);if(n!==el){if(!this.scanner.isDelim(nl,e)&&!this.scanner.isDelim(rl,e))return null;t=this.scanner.isDelim(nl,e)?nl:rl;do{n=this.scanner.lookupType(++e)}while(n===Ji||n===Zi);n!==el&&(this.scanner.skip(e),il.call(this,ol))}return e>0&&this.scanner.skip(e),0===t&&(n=this.scanner.source.charCodeAt(this.scanner.tokenStart))!==nl&&n!==rl&&this.error("Number sign is expected"),il.call(this,0!==t),t===rl?"-"+this.consume(el):this.consume(el)}var ul={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var e=this.scanner.tokenStart,t=null,n=null;if(this.scanner.tokenType===el)il.call(this,false),n=this.consume(el);else if(this.scanner.tokenType===Xi&&Gi(this.scanner.source,this.scanner.tokenStart,rl))switch(t="-1",ll.call(this,1,al),this.scanner.getTokenLength()){case 2:this.scanner.next(),n=cl.call(this);break;case 3:ll.call(this,2,rl),this.scanner.next(),this.scanner.skipSC(),il.call(this,ol),n="-"+this.consume(el);break;default:ll.call(this,2,rl),sl.call(this,3,ol),this.scanner.next(),n=this.scanner.substrToCursor(e+2)}else if(this.scanner.tokenType===Xi||this.scanner.isDelim(nl)&&this.scanner.lookupType(1)===Xi){var r=0;switch(t="1",this.scanner.isDelim(nl)&&(r=1,this.scanner.next()),ll.call(this,0,al),this.scanner.getTokenLength()){case 1:this.scanner.next(),n=cl.call(this);break;case 2:ll.call(this,1,rl),this.scanner.next(),this.scanner.skipSC(),il.call(this,ol),n="-"+this.consume(el);break;default:ll.call(this,1,rl),sl.call(this,2,ol),this.scanner.next(),n=this.scanner.substrToCursor(e+r+1)}}else if(this.scanner.tokenType===tl){for(var a=this.scanner.source.charCodeAt(this.scanner.tokenStart),o=(r=a===nl||a===rl,this.scanner.tokenStart+r);o<this.scanner.tokenEnd&&Ki(this.scanner.source.charCodeAt(o));o++);o===this.scanner.tokenStart+r&&this.error("Integer is expected",this.scanner.tokenStart+r),ll.call(this,o-this.scanner.tokenStart,al),t=this.scanner.source.substring(e,o),o+1===this.scanner.tokenEnd?(this.scanner.next(),n=cl.call(this)):(ll.call(this,o-this.scanner.tokenStart+1,rl),o+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),il.call(this,ol),n="-"+this.consume(el)):(sl.call(this,o-this.scanner.tokenStart+2,ol),this.scanner.next(),n=this.scanner.substrToCursor(o+1)))}else this.error();return null!==t&&t.charCodeAt(0)===nl&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===nl&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.scanner.tokenStart),a:t,b:n}},generate:function(e){var t=null!==e.a&&void 0!==e.a,n=null!==e.b&&void 0!==e.b;t?(this.chunk("+1"===e.a?"+n":"1"===e.a?"n":"-1"===e.a?"-n":e.a+"n"),n&&("-"===(n=String(e.b)).charAt(0)||"+"===n.charAt(0)?(this.chunk(n.charAt(0)),this.chunk(n.substr(1))):(this.chunk("+"),this.chunk(n)))):this.chunk(String(e.b))}},hl=Ca.TYPE,dl=hl.WhiteSpace,pl=hl.Semicolon,ml=hl.LeftCurlyBracket,fl=hl.Delim;function gl(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===dl?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function yl(){return 0}var bl={name:"Raw",structure:{value:String},parse:function(e,t,n){var r,a=this.scanner.getTokenStart(e);return this.scanner.skip(this.scanner.getRawLength(e,t||yl)),r=n&&this.scanner.tokenStart>a?gl.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(a,r),value:this.scanner.source.substring(a,r)}},generate:function(e){this.chunk(e.value)},mode:{default:yl,leftCurlyBracket:function(e){return e===ml?1:0},leftCurlyBracketOrSemicolon:function(e){return e===ml||e===pl?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===fl&&33===t.charCodeAt(n)||e===pl?1:0},semicolonIncluded:function(e){return e===pl?2:0}}},vl=Ca.TYPE,kl=bl.mode,wl=vl.AtKeyword,xl=vl.Semicolon,Sl=vl.LeftCurlyBracket,El=vl.RightCurlyBracket;function Al(e){return this.Raw(e,kl.leftCurlyBracketOrSemicolon,!0)}function Tl(){for(var e,t=1;e=this.scanner.lookupType(t);t++){if(e===El)return!0;if(e===Sl||e===wl)return!1}return!1}var Cl={name:"Atrule",structure:{name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null,a=null;switch(this.eat(wl),t=(e=this.scanner.substrToCursor(n+1)).toLowerCase(),this.scanner.skipSC(),!1===this.scanner.eof&&this.scanner.tokenType!==Sl&&this.scanner.tokenType!==xl&&(this.parseAtrulePrelude?"AtrulePrelude"===(r=this.parseWithFallback(this.AtrulePrelude.bind(this,e),Al)).type&&null===r.children.head&&(r=null):r=Al.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case xl:this.scanner.next();break;case Sl:a=this.atrule.hasOwnProperty(t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(Tl.call(this))}return{type:"Atrule",loc:this.getLocation(n,this.scanner.tokenStart),name:e,prelude:r,block:a}},generate:function(e){this.chunk("@"),this.chunk(e.name),null!==e.prelude&&(this.chunk(" "),this.node(e.prelude)),e.block?this.node(e.block):this.chunk(";")},walkContext:"atrule"},Rl=Ca.TYPE,_l=Rl.Semicolon,Il=Rl.LeftCurlyBracket,Ll={name:"AtrulePrelude",structure:{children:[[]]},parse:function(e){var t=null;return null!==e&&(e=e.toLowerCase()),this.scanner.skipSC(),t=this.atrule.hasOwnProperty(e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),!0!==this.scanner.eof&&this.scanner.tokenType!==Il&&this.scanner.tokenType!==_l&&this.error("Semicolon or block is expected"),null===t&&(t=this.createList()),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e)},walkContext:"atrulePrelude"},Pl=Ca.TYPE,Nl=Pl.Ident,zl=Pl.String,Ml=Pl.Colon,Ol=Pl.LeftSquareBracket,Dl=Pl.RightSquareBracket;function Ul(){this.scanner.eof&&this.error("Unexpected end of input");var e=this.scanner.tokenStart,t=!1,n=!0;return this.scanner.isDelim(42)?(t=!0,n=!1,this.scanner.next()):this.scanner.isDelim(124)||this.eat(Nl),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(Nl)):t&&this.error("Identifier is expected",this.scanner.tokenEnd):t&&this.error("Vertical line is expected"),n&&this.scanner.tokenType===Ml&&(this.scanner.next(),this.eat(Nl)),{type:"Identifier",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}}function Fl(){var e=this.scanner.tokenStart,t=this.scanner.source.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),61!==t&&(this.scanner.isDelim(61)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(e)}var Bl={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var e,t=this.scanner.tokenStart,n=null,r=null,a=null;return this.eat(Ol),this.scanner.skipSC(),e=Ul.call(this),this.scanner.skipSC(),this.scanner.tokenType!==Dl&&(this.scanner.tokenType!==Nl&&(n=Fl.call(this),this.scanner.skipSC(),r=this.scanner.tokenType===zl?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===Nl&&(a=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(Dl),{type:"AttributeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:n,value:r,flags:a}},generate:function(e){var t=" ";this.chunk("["),this.node(e.name),null!==e.matcher&&(this.chunk(e.matcher),null!==e.value&&(this.node(e.value),"String"===e.value.type&&(t=""))),null!==e.flags&&(this.chunk(t),this.chunk(e.flags)),this.chunk("]")}},ql=Ca.TYPE,jl=bl.mode,Hl=ql.WhiteSpace,Wl=ql.Comment,$l=ql.Semicolon,Vl=ql.AtKeyword,Yl=ql.LeftCurlyBracket,Gl=ql.RightCurlyBracket;function Kl(e){return this.Raw(e,null,!0)}function Ql(){return this.parseWithFallback(this.Rule,Kl)}function Jl(e){return this.Raw(e,jl.semicolonIncluded,!0)}function Zl(){if(this.scanner.tokenType===$l)return Jl.call(this,this.scanner.tokenIndex);var e=this.parseWithFallback(this.Declaration,Jl);return this.scanner.tokenType===$l&&this.scanner.next(),e}var Xl={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(e){var t=e?Zl:Ql,n=this.scanner.tokenStart,r=this.createList();this.eat(Yl);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case Gl:break e;case Hl:case Wl:this.scanner.next();break;case Vl:r.push(this.parseWithFallback(this.Atrule,Kl));break;default:r.push(t.call(this))}return this.scanner.eof||this.eat(Gl),{type:"Block",loc:this.getLocation(n,this.scanner.tokenStart),children:r}},generate:function(e){this.chunk("{"),this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")})),this.chunk("}")},walkContext:"block"},ec=Ca.TYPE,tc=ec.LeftSquareBracket,nc=ec.RightSquareBracket,rc={name:"Brackets",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(tc),n=e.call(this,t),this.scanner.eof||this.eat(nc),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("["),this.children(e),this.chunk("]")}},ac=Ca.TYPE.CDC,oc={name:"CDC",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(ac),{type:"CDC",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("--\x3e")}},sc=Ca.TYPE.CDO,ic={name:"CDO",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(sc),{type:"CDO",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("\x3c!--")}},lc=Ca.TYPE.Ident,cc={name:"ClassSelector",structure:{name:String},parse:function(){return this.scanner.isDelim(46)||this.error("Full stop is expected"),this.scanner.next(),{type:"ClassSelector",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(lc)}},generate:function(e){this.chunk("."),this.chunk(e.name)}},uc=Ca.TYPE.Ident,hc={name:"Combinator",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 62:case 43:case 126:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.tokenType===uc&&!1!==this.scanner.lookupValue(0,"deep")||this.error("Identifier `deep` is expected"),this.scanner.next(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.scanner.next();break;default:this.error("Combinator is expected")}return{type:"Combinator",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},dc=Ca.TYPE.Comment,pc={name:"Comment",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=this.scanner.tokenEnd;return this.eat(dc),t-e+2>=2&&42===this.scanner.source.charCodeAt(t-2)&&47===this.scanner.source.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e+2,t)}},generate:function(e){this.chunk("/*"),this.chunk(e.value),this.chunk("*/")}},mc=sa.isCustomProperty,fc=Ca.TYPE,gc=bl.mode,yc=fc.Ident,bc=fc.Hash,vc=fc.Colon,kc=fc.Semicolon,wc=fc.Delim,xc=fc.WhiteSpace;function Sc(e){return this.Raw(e,gc.exclamationMarkOrSemicolon,!0)}function Ec(e){return this.Raw(e,gc.exclamationMarkOrSemicolon,!1)}function Ac(){var e=this.scanner.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.scanner.eof&&this.scanner.tokenType!==kc&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(e)&&this.error(),t}var Tc={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var e,t=this.scanner.tokenStart,n=this.scanner.tokenIndex,r=Cc.call(this),a=mc(r),o=a?this.parseCustomProperty:this.parseValue,s=a?Ec:Sc,i=!1;this.scanner.skipSC(),this.eat(vc);const l=this.scanner.tokenIndex;if(a||this.scanner.skipSC(),e=o?this.parseWithFallback(Ac,s):s.call(this,this.scanner.tokenIndex),a&&"Value"===e.type&&e.children.isEmpty())for(let t=l-this.scanner.tokenIndex;t<=0;t++)if(this.scanner.lookupType(t)===xc){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.scanner.isDelim(33)&&(i=Rc.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==kc&&!1===this.scanner.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.scanner.tokenStart),important:i,property:r,value:e}},generate:function(e){this.chunk(e.property),this.chunk(":"),this.node(e.value),e.important&&this.chunk(!0===e.important?"!important":"!"+e.important)},walkContext:"declaration"};function Cc(){var e=this.scanner.tokenStart;if(this.scanner.tokenType===wc)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next()}return this.scanner.tokenType===bc?this.eat(bc):this.eat(yc),this.scanner.substrToCursor(e)}function Rc(){this.eat(wc),this.scanner.skipSC();var e=this.consume(yc);return"important"===e||e}var _c=Ca.TYPE,Ic=bl.mode,Lc=_c.WhiteSpace,Pc=_c.Comment,Nc=_c.Semicolon;function zc(e){return this.Raw(e,Ic.semicolonIncluded,!0)}var Mc={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var e=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case Lc:case Pc:case Nc:this.scanner.next();break;default:e.push(this.parseWithFallback(this.Declaration,zc))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")}))}},Oc=Or.consumeNumber,Dc=Ca.TYPE.Dimension,Uc={name:"Dimension",structure:{value:String,unit:String},parse:function(){var e=this.scanner.tokenStart,t=Oc(this.scanner.source,e);return this.eat(Dc),{type:"Dimension",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t),unit:this.scanner.source.substring(t,this.scanner.tokenStart)}},generate:function(e){this.chunk(e.value),this.chunk(e.unit)}},Fc=Ca.TYPE.RightParenthesis,Bc={name:"Function",structure:{name:String,children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart,a=this.consumeFunctionName(),o=a.toLowerCase();return n=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.scanner.eof||this.eat(Fc),{type:"Function",loc:this.getLocation(r,this.scanner.tokenStart),name:a,children:n}},generate:function(e){this.chunk(e.name),this.chunk("("),this.children(e),this.chunk(")")},walkContext:"function"},qc=Ca.TYPE.Hash,jc={name:"Hash",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(qc),{type:"Hash",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.value)}},Hc=Ca.TYPE.Ident,Wc={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(Hc)}},generate:function(e){this.chunk(e.name)}},$c=Ca.TYPE.Hash,Vc={name:"IdSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.eat($c),{type:"IdSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.name)}},Yc=Ca.TYPE,Gc=Yc.Ident,Kc=Yc.Number,Qc=Yc.Dimension,Jc=Yc.LeftParenthesis,Zc=Yc.RightParenthesis,Xc=Yc.Colon,eu=Yc.Delim,tu={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var e,t=this.scanner.tokenStart,n=null;if(this.eat(Jc),this.scanner.skipSC(),e=this.consume(Gc),this.scanner.skipSC(),this.scanner.tokenType!==Zc){switch(this.eat(Xc),this.scanner.skipSC(),this.scanner.tokenType){case Kc:n=this.lookupNonWSType(1)===eu?this.Ratio():this.Number();break;case Qc:n=this.Dimension();break;case Gc:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat(Zc),{type:"MediaFeature",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:n}},generate:function(e){this.chunk("("),this.chunk(e.name),null!==e.value&&(this.chunk(":"),this.node(e.value)),this.chunk(")")}},nu=Ca.TYPE,ru=nu.WhiteSpace,au=nu.Comment,ou=nu.Ident,su=nu.LeftParenthesis,iu={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var e=this.createList(),t=null,n=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case au:this.scanner.next();continue;case ru:n=this.WhiteSpace();continue;case ou:t=this.Identifier();break;case su:t=this.MediaFeature();break;default:break e}null!==n&&(e.push(n),n=null),e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}},lu=Ca.TYPE.Comma,cu={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(e){var t=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(t.push(this.MediaQuery(e)),this.scanner.tokenType===lu);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e,(function(){this.chunk(",")}))}},uu=Ca.TYPE.Number,hu={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(uu)}},generate:function(e){this.chunk(e.value)}},du={name:"Operator",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},pu=Ca.TYPE,mu=pu.LeftParenthesis,fu=pu.RightParenthesis,gu={name:"Parentheses",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(mu),n=e.call(this,t),this.scanner.eof||this.eat(fu),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("("),this.children(e),this.chunk(")")}},yu=Or.consumeNumber,bu=Ca.TYPE.Percentage,vu={name:"Percentage",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=yu(this.scanner.source,e);return this.eat(bu),{type:"Percentage",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t)}},generate:function(e){this.chunk(e.value),this.chunk("%")}},ku=Ca.TYPE,wu=ku.Ident,xu=ku.Function,Su=ku.Colon,Eu=ku.RightParenthesis,Au={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(Su),this.scanner.tokenType===xu?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(Eu)):e=this.consume(wu),{type:"PseudoClassSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk(":"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"))},walkContext:"function"},Tu=Ca.TYPE,Cu=Tu.Ident,Ru=Tu.Function,_u=Tu.Colon,Iu=Tu.RightParenthesis,Lu={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(_u),this.eat(_u),this.scanner.tokenType===Ru?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(Iu)):e=this.consume(Cu),{type:"PseudoElementSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk("::"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"))},walkContext:"function"},Pu=Ca.isDigit,Nu=Ca.TYPE,zu=Nu.Number,Mu=Nu.Delim;function Ou(){this.scanner.skipWS();for(var e=this.consume(zu),t=0;t<e.length;t++){var n=e.charCodeAt(t);Pu(n)||46===n||this.error("Unsigned number is expected",this.scanner.tokenStart-e.length+t)}return 0===Number(e)&&this.error("Zero number is not allowed",this.scanner.tokenStart-e.length),e}var Du={name:"Ratio",structure:{left:String,right:String},parse:function(){var e,t=this.scanner.tokenStart,n=Ou.call(this);return this.scanner.skipWS(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.eat(Mu),e=Ou.call(this),{type:"Ratio",loc:this.getLocation(t,this.scanner.tokenStart),left:n,right:e}},generate:function(e){this.chunk(e.left),this.chunk("/"),this.chunk(e.right)}},Uu=Ca.TYPE,Fu=bl.mode,Bu=Uu.LeftCurlyBracket;function qu(e){return this.Raw(e,Fu.leftCurlyBracket,!0)}function ju(){var e=this.SelectorList();return"Raw"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==Bu&&this.error(),e}var Hu={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var e,t,n=this.scanner.tokenIndex,r=this.scanner.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(ju,qu):qu.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.scanner.tokenStart),prelude:e,block:t}},generate:function(e){this.node(e.prelude),this.node(e.block)},walkContext:"rule"},Wu=Ca.TYPE.Comma,$u={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var e=this.createList();!this.scanner.eof&&(e.push(this.Selector()),this.scanner.tokenType===Wu);)this.scanner.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(){this.chunk(",")}))},walkContext:"selector"},Vu=Ca.TYPE.String,Yu={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Vu)}},generate:function(e){this.chunk(e.value)}},Gu=Ca.TYPE,Ku=Gu.WhiteSpace,Qu=Gu.Comment,Ju=Gu.AtKeyword,Zu=Gu.CDO,Xu=Gu.CDC;function eh(e){return this.Raw(e,null,!1)}var th={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var e,t=this.scanner.tokenStart,n=this.createList();!this.scanner.eof;){switch(this.scanner.tokenType){case Ku:this.scanner.next();continue;case Qu:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}e=this.Comment();break;case Zu:e=this.CDO();break;case Xu:e=this.CDC();break;case Ju:e=this.parseWithFallback(this.Atrule,eh);break;default:e=this.parseWithFallback(this.Rule,eh)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:n}},generate:function(e){this.children(e)},walkContext:"stylesheet"},nh=Ca.TYPE.Ident;function rh(){this.scanner.tokenType!==nh&&!1===this.scanner.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.scanner.next()}var ah={name:"TypeSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),rh.call(this)):(rh.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),rh.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},oh=Ca.isHexDigit,sh=Ca.cmpChar,ih=Ca.TYPE,lh=Ca.NAME,ch=ih.Ident,uh=ih.Number,hh=ih.Dimension;function dh(e,t){for(var n=this.scanner.tokenStart+e,r=0;n<this.scanner.tokenEnd;n++){var a=this.scanner.source.charCodeAt(n);if(45===a&&t&&0!==r)return 0===dh.call(this,e+r+1,!1)&&this.error(),-1;oh(a)||this.error(t&&0!==r?"HyphenMinus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n)}return this.scanner.next(),r}function ph(e){for(var t=0;this.scanner.isDelim(63);)++t>e&&this.error("Too many question marks"),this.scanner.next()}function mh(e){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==e&&this.error(lh[e]+" is expected")}function fh(){var e=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===ch?void((e=dh.call(this,0,!0))>0&&ph.call(this,6-e)):this.scanner.isDelim(63)?(this.scanner.next(),void ph.call(this,5)):void this.error("Hex digit or question mark is expected")):this.scanner.tokenType===uh?(mh.call(this,43),e=dh.call(this,1,!0),this.scanner.isDelim(63)?void ph.call(this,6-e):this.scanner.tokenType===hh||this.scanner.tokenType===uh?(mh.call(this,45),void dh.call(this,1,!1)):void 0):this.scanner.tokenType===hh?(mh.call(this,43),void((e=dh.call(this,1,!0))>0&&ph.call(this,6-e))):void this.error()}var gh={name:"UnicodeRange",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return sh(this.scanner.source,e,117)||this.error("U is expected"),sh(this.scanner.source,e+1,43)||this.error("Plus sign is expected"),this.scanner.next(),fh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},yh=Ca.isWhiteSpace,bh=Ca.cmpStr,vh=Ca.TYPE,kh=vh.Function,wh=vh.Url,xh=vh.RightParenthesis,Sh={name:"Url",structure:{value:["String","Raw"]},parse:function(){var e,t=this.scanner.tokenStart;switch(this.scanner.tokenType){case wh:for(var n=t+4,r=this.scanner.tokenEnd-1;n<r&&yh(this.scanner.source.charCodeAt(n));)n++;for(;n<r&&yh(this.scanner.source.charCodeAt(r-1));)r--;e={type:"Raw",loc:this.getLocation(n,r),value:this.scanner.source.substring(n,r)},this.eat(wh);break;case kh:bh(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(kh),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(xh);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(e){this.chunk("url"),this.chunk("("),this.node(e.value),this.chunk(")")}},Eh=Ca.TYPE.WhiteSpace,Ah=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Th={name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(Eh),Ah},generate:function(e){this.chunk(e.value)}},Ch={AnPlusB:ul,Atrule:Cl,AtrulePrelude:Ll,AttributeSelector:Bl,Block:Xl,Brackets:rc,CDC:oc,CDO:ic,ClassSelector:cc,Combinator:hc,Comment:pc,Declaration:Tc,DeclarationList:Mc,Dimension:Uc,Function:Bc,Hash:jc,Identifier:Wc,IdSelector:Vc,MediaFeature:tu,MediaQuery:iu,MediaQueryList:cu,Nth:{name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(e){this.scanner.skipSC();var t,n=this.scanner.tokenStart,r=n,a=null;return t=this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),this.scanner.skipSC(),e&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),a=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(a.children).loc.end.offset)):this.needPositions&&(r=t.loc.end.offset),{type:"Nth",loc:this.getLocation(n,r),nth:t,selector:a}},generate:function(e){this.node(e.nth),null!==e.selector&&(this.chunk(" of "),this.node(e.selector))}},Number:hu,Operator:du,Parentheses:gu,Percentage:vu,PseudoClassSelector:Au,PseudoElementSelector:Lu,Ratio:Du,Raw:bl,Rule:Hu,Selector:{name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}},SelectorList:$u,String:Yu,StyleSheet:th,TypeSelector:ah,UnicodeRange:gh,Url:Sh,Value:{name:"Value",structure:{children:[[]]},parse:function(){var e=this.scanner.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.scanner.tokenStart),children:t}},generate:function(e){this.children(e)}},WhiteSpace:Th},Rh={generic:!0,types:Yi.types,atrules:Yi.atrules,properties:Yi.properties,node:Ch},_h=Ca.cmpChar,Ih=Ca.cmpStr,Lh=Ca.TYPE,Ph=Lh.Ident,Nh=Lh.String,zh=Lh.Number,Mh=Lh.Function,Oh=Lh.Url,Dh=Lh.Hash,Uh=Lh.Dimension,Fh=Lh.Percentage,Bh=Lh.LeftParenthesis,qh=Lh.LeftSquareBracket,jh=Lh.Comma,Hh=Lh.Delim,Wh=function(e){switch(this.scanner.tokenType){case Dh:return this.Hash();case jh:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case Bh:return this.Parentheses(this.readSequence,e.recognizer);case qh:return this.Brackets(this.readSequence,e.recognizer);case Nh:return this.String();case Uh:return this.Dimension();case Fh:return this.Percentage();case zh:return this.Number();case Mh:return Ih(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case Oh:return this.Url();case Ph:return _h(this.scanner.source,this.scanner.tokenStart,117)&&_h(this.scanner.source,this.scanner.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case Hh:var t=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(47===t||42===t||43===t||45===t)return this.Operator();35===t&&this.error("Hex or identifier is expected",this.scanner.tokenStart+1)}},$h={getNode:Wh},Vh=Ca.TYPE,Yh=Vh.Delim,Gh=Vh.Ident,Kh=Vh.Dimension,Qh=Vh.Percentage,Jh=Vh.Number,Zh=Vh.Hash,Xh=Vh.Colon,ed=Vh.LeftSquareBracket;var td={getNode:function(e){switch(this.scanner.tokenType){case ed:return this.AttributeSelector();case Zh:return this.IdSelector();case Xh:return this.scanner.lookupType(1)===Xh?this.PseudoElementSelector():this.PseudoClassSelector();case Gh:return this.TypeSelector();case Jh:case Qh:return this.Percentage();case Kh:46===this.scanner.source.charCodeAt(this.scanner.tokenStart)&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case Yh:switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 43:case 62:case 126:return e.space=null,e.ignoreWSAfter=!0,this.Combinator();case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}},nd=Ca.TYPE,rd=bl.mode,ad=nd.Comma,od=nd.WhiteSpace,sd={AtrulePrelude:$h,Selector:td,Value:{getNode:Wh,expression:function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))},var:function(){var e=this.createList();if(this.scanner.skipSC(),e.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===ad){e.push(this.Operator());const t=this.scanner.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,rd.exclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty())for(let e=t-this.scanner.tokenIndex;e<=0;e++)if(this.scanner.lookupType(e)===od){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n)}return e}}},id=Ca.TYPE,ld=id.String,cd=id.Ident,ud=id.Url,hd=id.Function,dd=id.LeftParenthesis,pd={parse:{prelude:function(){var e=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case ld:e.push(this.String());break;case ud:case hd:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.lookupNonWSType(0)!==cd&&this.lookupNonWSType(0)!==dd||(e.push(this.WhiteSpace()),e.push(this.MediaQueryList())),e},block:null}},md=Ca.TYPE,fd=md.WhiteSpace,gd=md.Comment,yd=md.Ident,bd=md.Function,vd=md.Colon,kd=md.LeftParenthesis;function wd(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function xd(){return this.scanner.skipSC(),this.scanner.tokenType===yd&&this.lookupNonWSType(1)===vd?this.createSingleNodeList(this.Declaration()):Sd.call(this)}function Sd(){var e,t=this.createList(),n=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case fd:n=this.WhiteSpace();continue;case gd:this.scanner.next();continue;case bd:e=this.Function(wd,this.scope.AtrulePrelude);break;case yd:e=this.Identifier();break;case kd:e=this.Parentheses(xd,this.scope.AtrulePrelude);break;default:break e}null!==n&&(t.push(n),n=null),t.push(e)}return t}var Ed,Ad={parse:function(){return this.createSingleNodeList(this.SelectorList())}},Td={parse:function(){return this.createSingleNodeList(this.Nth(true))}},Cd={parse:function(){return this.createSingleNodeList(this.Nth(false))}},Rd={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:sd,atrule:{"font-face":{parse:{prelude:null,block:function(){return this.Block(!0)}}},import:pd,media:{parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}},page:{parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}},supports:{parse:{prelude:function(){var e=Sd.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block:function(){return this.Block(!1)}}}},pseudo:{dir:{parse:function(){return this.createSingleNodeList(this.Identifier())}},has:{parse:function(){return this.createSingleNodeList(this.SelectorList())}},lang:{parse:function(){return this.createSingleNodeList(this.Identifier())}},matches:Ad,not:Ad,"nth-child":Td,"nth-last-child":Td,"nth-last-of-type":Cd,"nth-of-type":Cd,slotted:{parse:function(){return this.createSingleNodeList(this.Selector())}}},node:Ch},_d={node:Ch},Id="1.1.3",Ld={version:Id},Pd=(Ed=Object.freeze({__proto__:null,version:Id,default:Ld}))&&Ed.default||Ed;var Nd=Vi(function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}(Rh,Rd,_d)),zd=Pd.version;Nd.version=zd;var Md=Nd;const Od=Md.generate,Dd=Md.parse;var Ud=Object.freeze({__proto__:null,generate:Od,parse:Dd});function Fd(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){let n;const r=t.exec(e.substring(f));if(r)return n=r[0],f+=n.length,n}const r=e.length,a=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,s=/^[^ \t\n\r\u000c]+/,i=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;let u,h,d,p,m,f=0;const g=[];for(;;){if(n(o),f>=r)return g;u=n(s),h=[],","===u.slice(-1)?(u=u.replace(i,""),b()):y()}function y(){for(n(a),d="",p="in descriptor";;){if(m=e.charAt(f),"in descriptor"===p)if(t(m))d&&(h.push(d),d="",p="after descriptor");else{if(","===m)return f+=1,d&&h.push(d),void b();if("("===m)d+=m,p="in parens";else{if(""===m)return d&&h.push(d),void b();d+=m}}else if("in parens"===p)if(")"===m)d+=m,p="in descriptor";else{if(""===m)return h.push(d),void b();d+=m}else if("after descriptor"===p)if(t(m));else{if(""===m)return void b();p="in descriptor",f-=1}f+=1}}function b(){let t,n,r,a,o,s,i,d,p,m=!1;const f={};for(a=0;a<h.length;a++)o=h[a],s=o[o.length-1],i=o.substring(0,o.length-1),d=parseInt(i,10),p=parseFloat(i),l.test(i)&&"w"===s?((t||n)&&(m=!0),0===d?m=!0:t=d):c.test(i)&&"x"===s?((t||n||r)&&(m=!0),p<0?m=!0:n=p):l.test(i)&&"h"===s?((r||n)&&(m=!0),0===d?m=!0:r=d):m=!0;m?console&&console.log&&console.log('Invalid srcset descriptor found in "'+e+'" at "'+o+'".'):(f.url=u,t&&(f.w=t),n&&(f.d=n),r&&(f.h=r),g.push(f))}}var Bd=Object.freeze({__proto__:null,process:Fd});let qd,jd,Hd,Wd;qd={},qd.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),qd.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),qd.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,qd.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),qd.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),qd.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),qd.collectAnHTTPQuotedString=(e,t)=>{let n="";for(t++;;){for(;t<e.length&&'"'!==e[t]&&"\\"!==e[t];)n+=e[t],++t;if(t>=e.length)break;const r=e[t];if(++t,"\\"!==r)break;if(t>=e.length){n+="\\";break}n+=e[t],++t}return[n,t]};{const{solelyContainsHTTPTokenCodePoints:e}=qd;Hd=t=>{let n=`${t.type}/${t.subtype}`;if(0===t.parameters.size)return n;for(let[r,a]of t.parameters)n+=";",n+=r,n+="=",e(a)&&0!==a.length||(a=a.replace(/(["\\])/g,"\\$1"),a=`"${a}"`),n+=a;return n}}{const{removeLeadingAndTrailingHTTPWhitespace:e,removeTrailingHTTPWhitespace:t,isHTTPWhitespaceChar:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a,asciiLowercase:o,collectAnHTTPQuotedString:s}=qd;jd=i=>{i=e(i);let l=0,c="";for(;l<i.length&&"/"!==i[l];)c+=i[l],++l;if(0===c.length||!r(c))return null;if(l>=i.length)return null;++l;let u="";for(;l<i.length&&";"!==i[l];)u+=i[l],++l;if(u=t(u),0===u.length||!r(u))return null;const h={type:o(c),subtype:o(u),parameters:new Map};for(;l<i.length;){for(++l;n(i[l]);)++l;let e="";for(;l<i.length&&";"!==i[l]&&"="!==i[l];)e+=i[l],++l;if(e=o(e),l<i.length){if(";"===i[l])continue;++l}let c=null;if('"'===i[l])for([c,l]=s(i,l);l<i.length&&";"!==i[l];)++l;else{for(c="";l<i.length&&";"!==i[l];)c+=i[l],++l;if(c=t(c),""===c)continue}e.length>0&&r(e)&&a(c)&&!h.parameters.has(e)&&h.parameters.set(e,c)}return h}}{const e=jd,t=Hd,{asciiLowercase:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a}=qd;Wd=class{constructor(t){t=String(t);const n=e(t);if(null===n)throw new Error(`Could not parse MIME type string "${t}"`);this._type=n.type,this._subtype=n.subtype,this._parameters=new o(n.parameters)}static parse(e){try{return new this(e)}catch(e){return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(0===(e=n(String(e))).length)throw new Error("Invalid type: must be a non-empty string");if(!r(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(0===(e=n(String(e))).length)throw new Error("Invalid subtype: must be a non-empty string");if(!r(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return t(this)}isJavaScript({allowParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}default:return!1}}isXML(){return"xml"===this._subtype&&("text"===this._type||"application"===this._type)||this._subtype.endsWith("+xml")}isHTML(){return"html"===this._subtype&&"text"===this._type}};class o{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=n(String(e)),this._map.get(e)}has(e){return e=n(String(e)),this._map.has(e)}set(e,t){if(e=n(String(e)),t=String(t),!r(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!a(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=n(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}}var $d=Object.freeze({__proto__:null,fontPropertyParser:Tt,mediaQueryParser:Pt,cssMinifier:Jn,cssTree:Ud,cssUnescape:y,srcsetParser:Bd,get MIMEType(){return Wd}});const Vd={normalizeFontFamily:Z,getFontWeight:oe},Yd=globalThis.FontFace,Gd=/url\s*\(\s*'(.*?)'\s*\)/i,Kd=/url\s*\(\s*"(.*?)"\s*\)/i,Qd=/url\s*\(\s*(.*?)\s*\)/i,Jd=/(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g,Zd=/^'(.*?)'$/,Xd=/^"(.*?)"$/,ep=/^url\(\s*["']?data:font\/(woff2?)/,tp=/^url\(\s*["']?data:application\/x-font-(woff)/,np=/\.([^.?#]+)((\?|#).*?)?$/,rp=/format\((.*?)\)\s*,?$/,ap=/(.*?)\s*,?$/,op=/^url\(["']?data:[^,]*,?["']?\)/,sp="local(",ip={"ultra-condensed":"50%","extra-condensed":"62.5%",condensed:"75%","semi-condensed":"87.5%",normal:"100%","semi-expanded":"112.5%",expanded:"125%","extra-expanded":"150%","ultra-expanded":"200%"};async function lp(e,t,n,r){const a={fonts:new Map,medias:new Map,supports:new Map},o={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}};let s=0;return t.forEach((t=>{const n=t.stylesheet.children;if(n)if(o.rules.processed+=n.getSize(),o.rules.discarded+=n.getSize(),t.mediaText&&"all"!=t.mediaText){const r=fp();a.medias.set("media-"+s+"-"+t.mediaText,r),cp(e,n,s,r)}else cp(e,n,s,a);s++})),up(a),await Promise.all([...t].map((async([,e],t)=>{const s=e.stylesheet.children,i=e.mediaText;s&&(i&&"all"!=i?await hp(s,t,a.medias.get("media-"+t+"-"+i),n,r,o):await hp(s,t,a,n,r,o),o.rules.discarded-=s.getSize())}))),o}function cp(e,t,n,r){let a=0,o=0;t.forEach((t=>{if("Atrule"==t.type&&"media"==t.name&&t.block&&t.block.children&&t.prelude){const o=Od(t.prelude),s=fp();r.medias.set("media-"+n+"-"+a+"-"+o,s),a++,cp(e,t.block.children,n,s)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const a=Od(t.prelude),s=fp();r.supports.set("supports-"+n+"-"+o+"-"+a,s),o++,cp(e,t.block.children,n,s)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=mp(t);let n=r.fonts.get(e);n||(n=[],r.fonts.set(e,n));const a=pp(t,"src");if(a){const e=a.match(Jd);e&&e.forEach((e=>n.unshift(e)))}}}))}function up(e){e.fonts.forEach(((t,n)=>{e.fonts.set(n,t.map((e=>{const t=e.match(rp);let n;const r=e.match(Gd)||e.match(Kd)||e.match(Qd),a=r&&r[1];if(t&&t[1]&&(n=t[1].replace(Zd,"$1").replace(Xd,"$1").toLowerCase()),!n){const t=e.match(ep);if(t&&t[1])n=t[1];else{const t=e.match(tp);t&&t[1]&&(n=t[1])}}if(!n&&a){const e=a.match(np);e&&e[1]&&(n=e[1])}return{src:e.match(ap)[1],fontUrl:a,format:n}})))})),e.medias.forEach((e=>up(e))),e.supports.forEach((e=>up(e)))}async function hp(e,t,n,r,a,o){const s=[];let i=0,l=0;for(let c=e.head;c;c=c.next){const e=c.data;if("Atrule"==e.type&&"media"==e.name&&e.block&&e.block.children&&e.prelude){const s=Od(e.prelude);await hp(e.block.children,t,n.medias.get("media-"+t+"-"+i+"-"+s),r,a,o),i++}else if("Atrule"==e.type&&"supports"==e.name&&e.block&&e.block.children&&e.prelude){const s=Od(e.prelude);await hp(e.block.children,t,n.supports.get("supports-"+t+"-"+l+"-"+s),r,a,o),l++}else if("Atrule"==e.type&&"font-face"==e.name){const t=mp(e),i=n.fonts.get(t);if(i){await dp(e,i,r,a,o)&&n.fonts.delete(t)}else s.push(c)}}s.forEach((t=>e.remove(t)))}async function dp(e,t,n,r,a){const o=[];for(let t=e.block.children.head;t;t=t.next)"src"==t.data.property&&o.push(t);o.pop(),o.forEach((t=>e.block.children.remove(t)));const s=e.block.children.filter((e=>"src"==e.property)).tail;if(s){await Promise.all(t.map((async(e,t)=>{if(r.has(e.src))e.valid=r.get(e.src);else{if(Yd){const r=new Yd("test-font",e.src);try{let t;await Promise.race([r.load().then((()=>r.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(t)})),new Promise((n=>t=globalThis.setTimeout((()=>{e.valid=!0,n()}),5e3)))])}catch(r){const a=n.get(s.data);if(a){const n=a[a.length-t-1];if(n){const t=new Yd("test-font","url("+n+")");try{let n;await Promise.race([t.load().then((()=>t.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(n)})),new Promise((t=>n=globalThis.setTimeout((()=>{e.valid=!0,t()}),5e3)))])}catch(e){}}}else e.valid=!0}}else e.valid=!0;r.set(e.src,e.valid)}})));const e=(e,n)=>t.find((t=>!t.src.match(op)&&t.format==e&&(!n||t.valid))),o=e=>t.filter((t=>t==e||t.src.startsWith(sp)));a.fonts.processed+=t.length,a.fonts.discarded+=t.length;const i=e("woff2-variations",!0)||e("woff2",!0)||e("woff",!0);if(i)t=o(i);else{const n=e("truetype-variations",!0)||e("truetype",!0);if(n)t=o(n);else{const n=e("opentype")||e("embedded-opentype");t=n?o(n):t.filter((e=>!e.src.match(op)&&e.valid||e.src.startsWith(sp)))}}a.fonts.discarded-=t.length,t.reverse();try{s.data.value=Dd(t.map((e=>e.src)).join(","),{context:"value"})}catch(e){}return!0}return!1}function pp(e,t){let n;if(e.block.children&&(n=e.block.children.filter((e=>{try{return e.property==t&&!Od(e.value).match(/\\9$/)}catch(n){return e.property==t}})).tail),n)try{return Od(n.data.value)}catch(e){}}function mp(e){return JSON.stringify([Vd.normalizeFontFamily(pp(e,"font-family")),Vd.getFontWeight(pp(e,"font-weight")||"400"),pp(e,"font-style")||"normal",pp(e,"unicode-range"),(t=pp(e,"font-stretch"),ip[t]||t),pp(e,"font-variant")||"normal",pp(e,"font-feature-settings"),pp(e,"font-variation-settings")]);var t}function fp(){return{fonts:new Map,medias:new Map,supports:new Map}}var gp=Object.freeze({__proto__:null,process:lp});const yp={normalizeFontFamily:Z,flatten:se,getFontWeight:oe,removeQuotes:ae},bp=/\s*,\s*/,vp=/-/,kp=/\?/g,wp=/^U\+/i,xp=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function Sp(e,t,n,r){const a={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}},o={declared:[],used:[]},s=e.createElement("style");let i="";e.body.appendChild(s),t.forEach((t=>{const n=t.stylesheet.children;n&&(a.processed+=n.getSize(),a.discarded+=n.getSize(),Ep(n,o),i=Np(e,n,s,i))})),n.forEach((e=>{const t=_p(e);t.length&&o.used.push(t),i=zp(e.children,s,i)})),s.remove(),i+=e.body.innerText,globalThis.getComputedStyle&&r.doc&&(o.used=o.used.map((e=>e.map((e=>{const t=e.match(/^var\((--.*)\)$/);if(t&&t[1]){const n=globalThis.getComputedStyle(r.doc.body).getPropertyValue(t[1]);return n&&n.split(",").map((e=>yp.normalizeFontFamily(e)))||e}return e})))),o.used=o.used.map((e=>yp.flatten(e))));let l,c;return o.used.find((e=>e.find((e=>e.startsWith("var(--")))))?l=[]:(c=new Map,o.used.forEach((e=>e.forEach((e=>{if(o.declared.find((t=>t.fontFamily==e))){const t=r.usedFonts&&r.usedFonts.filter((t=>t[0]==e));t&&t.length&&c.set(e,t)}})))),l=o.declared.filter((e=>!c.has(e.fontFamily)))),t.forEach((e=>{const t=e.stylesheet.children;t&&(Ap(t,o.declared,l,c,i),a.rules.discarded-=t.getSize())})),a}function Ep(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)Ep(e.block.children,t);else if("Rule"==e.type){const n=_p(e.block);n.length&&t.used.push(n)}else if("Atrule"==e.type&&"font-face"==e.name){const n=yp.normalizeFontFamily(Rp(e.block.children,"font-family"));if(n){const r=Rp(e.block.children,"font-weight")||"400",a=Rp(e.block.children,"font-style")||"normal",o=Rp(e.block.children,"font-variant")||"normal";r.split(",").forEach((e=>t.declared.push({fontFamily:n,fontWeight:yp.getFontWeight(yp.removeQuotes(e)),fontStyle:a,fontVariant:o})))}}}))}function Ap(e,t,n,r,a){const o=[];for(let s=e.head;s;s=s.next){const e=s.data;if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)Ap(e.block.children,t,n,r,a);else if("Atrule"==e.type&&"font-face"==e.name){const i=yp.normalizeFontFamily(Rp(e.block.children,"font-family"));if(i){const l=Rp(e.block.children,"unicode-range");!n.find((e=>e.fontFamily==i))&&Op(a,l)&&Tp(e,i,t,r)||o.push(s)}const l=[];for(let t=e.block.children.head;t;t=t.next)"font-display"==t.data.property&&l.push(t);l.length&&l.forEach((t=>e.block.children.remove(t)))}}o.forEach((t=>e.remove(t)))}function Tp(e,t,n,r){let a;const o=r&&r.get(t);if(o&&o.length){let r=Rp(e.block.children,"font-style")||"normal";if(xp.find((e=>r.trim().match(e)))){const s=yp.getFontWeight(Rp(e.block.children,"font-weight")||"400"),i=n.filter((e=>e.fontFamily==t&&e.fontStyle==r)).map((e=>e.fontWeight)).sort(((e,t)=>e-t));let l=o.map((e=>Ip(e,r,i)));a=Cp(s,l),a||(l=o.map((e=>((e=Array.from(e))[2]="normal",Ip(e,r,i))))),a=Cp(s,l)}else a=!0}else a=!0;return a}function Cp(e,t){return e.split(",").find((e=>t.includes(yp.getFontWeight(yp.removeQuotes(e)))))}function Rp(e,t){let n;if(e&&(n=e.filter((e=>e.property==t)).tail),n)try{return yp.removeQuotes(Od(n.data.value)).toLowerCase()}catch(e){}}function _p(e){let t=e.children.filter((e=>"font-family"==e.property)).tail,n=[];if(t){let e="";t.data.value.children?t.data.value.children.forEach((t=>{"Operator"==t.type&&","==t.value&&e?(n.push(yp.normalizeFontFamily(e)),e=""):e+=Od(t)})):t=Od(t.data.value),e&&n.push(yp.normalizeFontFamily(e))}const r=e.children.filter((e=>"font"==e.property)).tail;if(r&&r.data&&r.data.value)try{wt(Od(r.data.value)).family.forEach((e=>n.push(yp.normalizeFontFamily(e))))}catch(e){}return n}function Ip(e,t,n){let r;if(e[2]==t){let t=Number(e[1]);n.length>1?(t>=400&&t<=500&&(r=n.find((e=>e>=t&&e<=500)),r||(r=Lp(t,n)),r||(r=Pp(t,n))),t<400&&(r=n.slice().reverse().find((e=>e<=t)),r||(r=Pp(t,n))),t>500&&(r=n.find((e=>e>=t)),r||(r=Lp(t,n)))):r=n[0]}return r}function Lp(e,t){return t.slice().reverse().find((t=>t<e))}function Pp(e,t){return t.find((t=>t>e))}function Np(e,t,n,r){return t.forEach((t=>{t.block&&t.block.children&&t.prelude&&t.prelude.children&&("Atrule"!=t.type||"media"!=t.name&&"supports"!=t.name?"Rule"==t.type&&(r=zp(t.block.children,n,r)):r=Np(e,t.block.children,n,r))})),r}function zp(e,t,n){const r=Mp(e,"content",t),a=Mp(e,"quotes",t);return n.includes(r)||(n+=r),n.includes(a)||(n+=a),n}function Mp(e,t,n){const r=Rp(e,t)||"";return r?(n.textContent='tmp { content:"'+r+'"}',n.sheet&&n.sheet.cssRules?yp.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content")):r):""}function Op(e,t){if(t){const n=t.split(bp);let r;const a=n.filter((t=>{const n=t.split(vp);let a;if(2==n.length&&(n[0]=Dp(n[0]),a="["+n[0]+"-"+Dp("U+"+n[1])+"]"),1==n.length)if(n[0].includes("?")){const e=Dp(n[0]),t=e;a="["+e.replace(kp,"0")+"-"+t.replace(kp,"F")+"]"}else n[0]&&(a="["+Dp(n[0])+"]");if(a)try{return new RegExp(a,"u").test(e)}catch(e){return r=!0,!1}return!0}));return!r&&(!n.length||a.length)}return!0}function Dp(e){for(e=e.replace(wp,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var Up=Object.freeze({__proto__:null,process:Sp});const Fp="all",Bp=["after","before","first-letter","first-line","placeholder","selection","part","marker"],qp="sf-hidden",jp=/-(ms|webkit|moz|o)-/;class Hp{constructor(e,t,n){this.doc=e,this.mediaAllInfo=$p(Fp);const r=new Map;let a=0;const o=e.createElement("style");e.body.appendChild(o),t.forEach((t=>{if(!t.scoped){const s=t.stylesheet.children;if(s)if(t.mediaText&&t.mediaText!=Fp){const i=$p(t.mediaText);this.mediaAllInfo.medias.set("style-"+a+"-"+t.mediaText,i),Vp(e,s,i,a,n,r,o)}else Vp(e,s,this.mediaAllInfo,a,n,r,o)}a++})),Qp(this.mediaAllInfo),Gp(this.mediaAllInfo,[],this.mediaAllInfo,o),o.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function Wp(e,t,n){return new Hp(e,t,n).getMediaAllInfo()}function $p(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==Fp&&(t.matchedStyles=new Map),t}function Vp(e,t,n,r,a,o,s){let i=0,l=0;t.forEach((t=>{if(t.block&&t.block.children&&t.prelude&&t.prelude.children)if("Atrule"==t.type&&"media"==t.name){const l=Od(t.prelude),c=$p(l);n.medias.set("rule-"+r+"-"+i+"-"+l,c),i++,Vp(e,t.block.children,c,r,a,o,s)}else if("Rule"==t.type){const i=t.prelude.children.toArray(),c=t.prelude.children.toArray().map((e=>Od(e))),u={ruleData:t,mediaInfo:n,ruleIndex:l,sheetIndex:r,matchedSelectors:new Set,declarations:new Set,selectors:i,selectorsText:c};if(!function(e,t){return t.textContent=e+"{}",t.sheet?!t.sheet.cssRules.length:t.sheet}(c.join(","),s))for(let n=t.prelude.children.head,r=0;n;n=n.next,r++){const t=c[r];Yp(e,{selector:n,selectorText:t,ruleInfo:u},a,o)}l++}}))}function Yp(e,t,n,r){const a=function(e,t){const n=[];r(e={data:Dd(Od(e.data),{context:"selector"})}),n.length&&(n.forEach((({parentSelector:e,selector:t})=>{0!=e.data.children.getSize()&&t.prev&&"Combinator"!=t.prev.data.type&&"WhiteSpace"!=t.prev.data.type?e.data.children.remove(t):e.data.children.replace(t,Dd("*",{context:"selector"}).children.head)})),t=Od(e.data).trim());return t;function r(e,t){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)r(t,e);("PseudoClassSelector"==e.data.type||"PseudoElementSelector"==e.data.type&&(a(e)||Bp.includes(e.data.name)))&&n.push({parentSelector:t,selector:e})}function a(e){const t=e.data.name;return t.startsWith("-")||t.startsWith("\\-")}}(t.selector,t.selectorText),o=a!=t.selectorText?a:t.selectorText,s=r.get(o);let i=s;if(!i)try{i=e.querySelectorAll(o),".sf-hidden"!=o&&(i=Array.from(e.querySelectorAll(o)).filter((e=>!e.classList.contains(qp)&&("none"!=e.style.getPropertyValue("display")||"important"!=e.style.getPropertyPriority("display")))))}catch(e){}if(i&&(s||r.set(o,i),i.length))if(a==t.selectorText)i.forEach((e=>function(e,t,n){const r=t.ruleInfo.mediaInfo,a=n.get(e);let o=r.elements.get(e);o||(o=[],a&&o.push({styleInfo:{styleData:a,declarations:new Set}}),r.elements.set(e,o));const s=Jp(t.selector.data);s.ruleIndex=t.ruleInfo.ruleIndex,s.sheetIndex=t.ruleInfo.sheetIndex,t.specificity=s,o.push(t)}(e,t,n)));else{let e=t.ruleInfo.mediaInfo.pseudoRules.get(t.ruleInfo.ruleData);e||(e=new Set,t.ruleInfo.mediaInfo.pseudoRules.set(t.ruleInfo.ruleData,e)),e.add(t.selectorText)}}function Gp(e,t,n,r){e.elements.forEach((a=>function(e,t){const n=new Map,r=new Set;return e.forEach((e=>{let a;a=e.styleInfo?e.styleInfo.styleData.children:e.ruleInfo.ruleData.block.children,function(e,t,n,r,a){for(let o=t.tail;o;o=o.prev){const t=o.data,s=Od(t);if("Declaration"==t.type&&(s.match(jp)||!r.has(t.property)||t.important)&&!Kp(s,a)){const a=e.get(t);(!a||t.important&&!a.important)&&(e.set(t,{selectorInfo:n,important:t.important}),s.match(jp)||r.add(t.property))}}}(n,a,e,r,t)})),n}(a,r).forEach(((r,a)=>{if(r.selectorInfo.ruleInfo||e==n){let o;if(r.selectorInfo.ruleInfo){o=r.selectorInfo.ruleInfo;const n=o.ruleData,a=[e,...t].find((e=>e.rules.get(n)))||e;a.rules.set(n,o),n&&o.matchedSelectors.add(r.selectorInfo.selectorText)}else{o=r.selectorInfo.styleInfo;const e=o.styleData;n.matchedStyles.get(e)||n.matchedStyles.set(e,o)}o.declarations.has(a)||o.declarations.add(a)}})))),delete e.elements,e.medias.forEach((a=>Gp(a,[e,...t],n,r)))}function Kp(e,t){let n;return t.textContent="single-file-declaration { "+e+"}",t.sheet&&!t.sheet.cssRules[0].style.length&&(e.match(jp)||(n=!0)),n}function Qp(e){e.elements.forEach((e=>e.sort(((e,t)=>{return e.styleInfo&&!t.styleInfo?-1:!e.styleInfo&&t.styleInfo?1:(n=e.specificity,r=t.specificity,n.a>r.a?-1:n.a<r.a?1:n.b>r.b?-1:n.b<r.b?1:n.c>r.c?-1:n.c<r.c?1:n.sheetIndex>r.sheetIndex?-1:n.sheetIndex<r.sheetIndex?1:n.ruleIndex>r.ruleIndex?-1:n.ruleIndex<r.ruleIndex?1:-1);var n,r})))),e.medias.forEach(Qp)}function Jp(e,t={a:0,b:0,c:0}){return"IdSelector"==e.type&&t.a++,("ClassSelector"==e.type||"AttributeSelector"==e.type||"PseudoClassSelector"==e.type&&"not"!=e.name)&&t.b++,("TypeSelector"==e.type&&"*"!=e.name||"PseudoElementSelector"==e.type)&&t.c++,e.children&&e.children.forEach((e=>Jp(e,t))),t}var Zp=Object.freeze({__proto__:null,getMediaAllInfo:Wp});const Xp={flatten:se},em="all",tm="screen";function nm(e){const t={processed:0,discarded:0};return e.forEach(((n,r)=>{if(am(n.mediaText||em,tm)&&n.stylesheet.children){rm(n.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(r)})),t}function rm(e,t,n=[]){for(let r=e.head;r;r=r.next){const a=r.data;"Atrule"==a.type&&"media"==a.name&&a.block&&a.block.children&&a.prelude&&a.prelude.children&&(t.processed++,am(Od(a.prelude),tm)?rm(a.block.children,t,n):(n.push({cssRules:e,cssRule:r}),t.discarded++))}return n}function am(e,t){const n=Xp.flatten(_t(e).map((e=>om(e,t))));return n.find((e=>!e.not&&(e.value==t||e.value==em)||e.not&&(e.value==em||e.value!=t)))}function om(e,t,n=[]){return e.nodes.map(((r,a)=>{if("media-query"==r.type)return om(r,t,n);if("media-type"==r.type){const t={not:Boolean(a&&"keyword"==e.nodes[0].type&&"not"==e.nodes[0].value),value:r.value};n.find((e=>t.not==e.not&&t.value==e.value))||n.push(t)}})),n.length||n.push({not:!1,value:em}),n}var sm=Object.freeze({__proto__:null,process:nm});function im(e,t,n){const r={processed:0,discarded:0};let a=0;return e.forEach((e=>{if(!e.scoped){const t=e.stylesheet.children;if(t){let o;r.processed+=t.getSize(),r.discarded+=t.getSize(),o=e.mediaText&&"all"!=e.mediaText?n.medias.get("style-"+a+"-"+e.mediaText):n,lm(t,a,o),r.discarded-=t.getSize()}}a++})),t.forEach((e=>function(e,t){const n=[],r=t.matchedStyles.get(e);if(r){let t;for(let a=e.children.head;a&&!t;a=a.next)r.declarations.has(a.data)||n.push(a);n.forEach((t=>e.children.remove(t)))}}(e,n))),r}function lm(e,t,n){let r=0;const a=[];for(let o=e.head;o;o=o.next){const e=o.data;if(e.block&&e.block.children&&e.prelude&&e.prelude.children){if("Atrule"==e.type&&"media"==e.name){const s=Od(e.prelude);lm(e.block.children,t,n.medias.get("rule-"+t+"-"+r+"-"+s)),e.prelude.children.getSize()&&e.block.children.getSize()||a.push(o),r++}else if("Rule"==e.type){const t=n.rules.get(e),r=n.pseudoRules.get(e);t||r?t&&(cm(e,t,r),e.prelude.children.getSize()&&e.block.children.getSize()||a.push(o)):a.push(o)}}else e&&"Raw"!=e.type&&("Rule"!=e.type||e.prelude&&"Raw"!=e.prelude.type)||a.push(o)}a.forEach((t=>e.remove(t)))}function cm(e,t,n){const r=[],a=[];let o;for(let r=e.prelude.children.head;r;r=r.next){const e=Od(r.data);n&&n.has(e)&&(o=!0),t.matchedSelectors.has(e)||n&&n.has(e)||a.push(r)}if(!o)for(let n=e.block.children.tail;n;n=n.prev)t.declarations.has(n.data)||r.push(n);r.forEach((t=>e.block.children.remove(t))),a.forEach((t=>e.prelude.children.remove(t)))}var um=Object.freeze({__proto__:null,process:im});const hm="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";function dm(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:n,srcset:r}=pm(t);if(!n){const t=function(e){let t=e.find((e=>e.src)),n=t&&t.src,r=t&&t.srcset;n||(t=e.find((e=>fm(e.src))),n=t&&t.src,n==hm&&(n=null));r||(t=e.find((e=>fm(e.srcset))),r=t&&t.srcset,r==hm&&(r=null));return{src:n,srcset:r}}(Array.from(e.querySelectorAll("source")).reverse());n=t.src,r||(r=t.srcset)}mm({src:n,srcset:r},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>mm(pm(e),e)))}function pm(e){let t=e.getAttribute("src");t==hm&&(t=null);let n=fm(e.getAttribute("srcset"));return n==hm&&(n=null),{src:t,srcset:n}}function mm(e,t,n){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",hm),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),n&&n.querySelectorAll("source").forEach((e=>e.remove()))}function fm(e){if(e){const t=Fd(e);if(t.length)return t.find((e=>e.url)).url}}var gm=Object.freeze({__proto__:null,process:dm});const ym=["allowfullscreen","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","truespeed","typemustmatch","visible"],bm=["script","style","pre","textarea"],vm=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],km={form:{method:"get"},script:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},style:{media:"all",type:"text/css"},link:{media:"all"}},wm=/[ \t\f\r]+/g,xm=/[\n]+/g,Sm=/^\s+$/,Em=[function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{ym.includes(t.name)&&e.setAttribute(t.name,"")}))},function(e){3==e.nodeType&&e.previousSibling&&3==e.previousSibling.nodeType&&(e.textContent=e.previousSibling.textContent+e.textContent,e.previousSibling.remove())},function(e,t){if(3==e.nodeType){let n=e.parentElement;if(!(""==n.getAttribute(t.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME))){const t=e.textContent;let r=Tm(n);for(;r;)n=n.parentElement,r=n&&Tm(n);(!n||r)&&t.length>1&&(e.textContent=t.replace(wm,function(e){return e.parentElement&&"HEAD"==e.parentElement.tagName?"\n":" "}(e)).replace(xm,"\n"))}}},function(e){if(8==e.nodeType&&"HTML"!=e.parentElement.tagName)return!e.textContent.toLowerCase().trim().startsWith("[if")},function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{if(vm.includes(t.name.toLowerCase())){const n=e.getAttribute(t.name);(""==n||(n||"").match(Sm))&&e.removeAttribute(t.name)}}))},function(e){if(1==e.nodeType){const t=km[e.tagName.toLowerCase()];t&&Object.keys(t).forEach((n=>{const r=t[n];("function"==typeof r?r(e):e.getAttribute(n)==r)&&e.removeAttribute(n)}))}},function(e){if(1==e.nodeType&&"SCRIPT"==e.tagName&&"application/ld+json"==e.type&&e.textContent.trim())try{e.textContent=JSON.stringify(JSON.parse(e.textContent))}catch(e){}},e=>function(e,t,n){if(1==e.nodeType&&e.tagName.toLowerCase()==t.toLowerCase()){let t=e.previousSibling;const r=[];for(;t&&3==t.nodeType&&!t.textContent.trim();)r.push(t),t=t.previousSibling;t&&1==t.nodeType&&t.tagName==e.tagName&&n(e,t)&&(e.textContent=t.textContent+e.textContent,r.forEach((e=>e.remove())),t.remove())}}(e,"style",((e,t)=>e.parentElement&&"HEAD"==e.parentElement.tagName&&e.media==t.media&&e.title==t.title))];function Am(e,t){!function(e){e.querySelectorAll("style, script:not([src])").forEach((e=>{e.textContent.trim()||e.remove()}))}(e);const n=e.createTreeWalker(e.documentElement,4294967295,null,!1);let r=n.nextNode();for(;r;){const e=Em.find((e=>e(r,t))),a=r;r=n.nextNode(),e&&a.remove()}}function Tm(e){return e&&!bm.includes(e.tagName.toLowerCase())}var Cm=Object.freeze({__proto__:null,process:Am});const Rm=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_m=[{tagName:"head",accept:e=>!e.childNodes.length||1==e.childNodes[0].nodeType},{tagName:"body",accept:e=>!e.childNodes.length}],Im=[{tagName:"html",accept:e=>!e||8!=e.nodeType},{tagName:"head",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!zm(e.textContent))},{tagName:"body",accept:e=>!e||8!=e.nodeType},{tagName:"li",accept:(e,t)=>!e&&t.parentElement&&("UL"==t.parentElement.tagName||"OL"==t.parentElement.tagName)||e&&["LI"].includes(e.tagName)},{tagName:"dt",accept:e=>!e||["DT","DD"].includes(e.tagName)},{tagName:"p",accept:e=>e&&["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIV","DL","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"].includes(e.tagName)},{tagName:"dd",accept:e=>!e||["DT","DD"].includes(e.tagName)},{tagName:"rt",accept:e=>!e||["RT","RP"].includes(e.tagName)},{tagName:"rp",accept:e=>!e||["RT","RP"].includes(e.tagName)},{tagName:"optgroup",accept:e=>!e||["OPTGROUP"].includes(e.tagName)},{tagName:"option",accept:e=>!e||["OPTION","OPTGROUP"].includes(e.tagName)},{tagName:"colgroup",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!zm(e.textContent))},{tagName:"caption",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!zm(e.textContent))},{tagName:"thead",accept:e=>!e||["TBODY","TFOOT"].includes(e.tagName)},{tagName:"tbody",accept:e=>!e||["TBODY","TFOOT"].includes(e.tagName)},{tagName:"tfoot",accept:e=>!e},{tagName:"tr",accept:e=>!e||["TR"].includes(e.tagName)},{tagName:"td",accept:e=>!e||["TD","TH"].includes(e.tagName)},{tagName:"th",accept:e=>!e||["TD","TH"].includes(e.tagName)}],Lm=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"];function Pm(e,t){const n=e.doctype;let r="";return n&&(r="<!DOCTYPE "+n.nodeName,n.publicId?(r+=' PUBLIC "'+n.publicId+'"',n.systemId&&(r+=' "'+n.systemId+'"')):n.systemId&&(r+=' SYSTEM "'+n.systemId+'"'),n.internalSubset&&(r+=" ["+n.internalSubset+"]"),r+="> "),r+Nm(e.documentElement,t)}function Nm(e,t,n){return 3==e.nodeType?function(e){const t=e.parentNode;let n;t&&1==t.nodeType&&(n=t.tagName.toLowerCase());return!n||Lm.includes(n)?"script"==n?e.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):e.textContent:e.textContent.replace(/&/g,"&").replace(/\u00a0/g," ").replace(/</g,"<").replace(/>/g,">")}(e):8==e.nodeType?"\x3c!--"+e.textContent+"--\x3e":1==e.nodeType?function(e,t,n){const r=e.tagName.toLowerCase(),a=t&&_m.find((t=>r==t.tagName&&t.accept(e)));let o="";a&&!e.attributes.length||(o="<"+r,Array.from(e.attributes).forEach((n=>o+=function(e,t,n){const r=e.name;let a="";if(!r.match(/["'>/=]/)){let o,s=e.value;n&&"class"==r&&(s=Array.from(t.classList).map((e=>e.trim())).join(" ")),s=s.replace(/&/g,"&").replace(/\u00a0/g," "),s.includes('"')&&(s.includes("'")||!n?s=s.replace(/"/g,"""):o=!0);const i=!n||!s.match(/^[^ \t\n\f\r'"`=<>]+$/);a+=" ",e.namespace?"http://www.w3.org/XML/1998/namespace"==e.namespaceURI?a+="xml:"+r:"http://www.w3.org/2000/xmlns/"==e.namespaceURI?("xmlns"!==r&&(a+="xmlns:"),a+=r):"http://www.w3.org/1999/xlink"==e.namespaceURI?a+="xlink:"+r:a+=r:a+=r,""!=s&&(a+="=",i&&(a+=o?"'":'"'),a+=s,i&&(a+=o?"'":'"'))}return a}(n,e,t))),o+=">");"TEMPLATE"!=e.tagName||e.childNodes.length?Array.from(e.childNodes).forEach((e=>o+=Nm(e,t,n||"svg"==r))):o+=e.innerHTML;const s=t&&Im.find((t=>r==t.tagName&&t.accept(e.nextSibling,e)));(n||!s&&!Rm.includes(r))&&(o+="</"+r+">");return o}(e,t,n):void 0}function zm(e){return Boolean(e.match(/^[ \t\n\f\r]/))}var Mm=Object.freeze({__proto__:null,process:Pm}),Om=Object.freeze({__proto__:null,fontsAltMinifier:gp,fontsMinifier:Up,matchedRules:Zp,mediasAltMinifier:sm,cssRulesMinifier:um,imagesAltMinifier:gm,htmlMinifier:Cm,serializer:Mm});const Dm=globalThis.Set,Um=globalThis.Map;let Fm,Bm;class qm{constructor(e){this.options=e}async run(){const e=globalThis._singleFile_waitForUserScript;this.options.userScriptEnabled&&e&&await e(Fm.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new ef(this.options,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(Fm.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const jm="page-loading",Hm="page-loaded",Wm="resource-initializing",$m="resources-initialized",Vm="resource-loaded",Ym="page-ended",Gm="stage-started",Km="stage-ended",Qm="stage-task-started",Jm="stage-task-ended";class Zm{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:jm,PAGE_LOADED:Hm,RESOURCES_INITIALIZING:Wm,RESOURCES_INITIALIZED:$m,RESOURCE_LOADED:Vm,PAGE_ENDED:Ym,STAGE_STARTED:Gm,STAGE_ENDED:Km,STAGE_TASK_STARTED:Qm,STAGE_TASK_ENDED:Jm}}}const Xm=[{sequential:[{action:"preProcessPage"},{option:"loadDeferredImagesKeepZoomLevel",action:"resetZoomLevel"},{action:"replaceStyleContents"},{action:"resetCharsetMeta"},{option:"saveFavicon",action:"saveFavicon"},{action:"replaceCanvasElements"},{action:"insertFonts"},{action:"insertShadowRootContents"},{action:"setInputValues"},{option:"moveStylesInHead",action:"moveStylesInHead"},{option:"removeScripts",action:"removeScripts"},{option:"selected",action:"removeUnselectedElements"},{option:"removeVideoSrc",action:"insertVideoPosters"},{option:"removeFrames",action:"removeFrames"},{option:"removeVideoSrc",action:"removeVideoSources"},{option:"removeAudioSrc",action:"removeAudioSources"},{action:"removeDiscardedResources"},{option:"removeHiddenElements",action:"removeHiddenElements"},{action:"resolveHrefs"},{action:"resolveStyleAttributeURLs"}],parallel:[{action:"resolveStylesheetURLs"},{option:"!removeFrames",action:"resolveFrameURLs"},{action:"resolveHtmlImportURLs"}]},{sequential:[{option:"removeUnusedStyles",action:"removeUnusedStyles"},{option:"removeAlternativeMedias",action:"removeAlternativeMedias"},{option:"removeUnusedFonts",action:"removeUnusedFonts"}],parallel:[{action:"processStylesheets"},{action:"processStyleAttributes"},{action:"processPageResources"},{option:"!removeScripts",action:"processScripts"}]},{sequential:[{option:"removeAlternativeImages",action:"removeAlternativeImages"}],parallel:[{option:"removeAlternativeFonts",action:"removeAlternativeFonts"},{option:"!removeFrames",action:"processFrames"},{option:"!removeImports",action:"processHtmlImports"}]},{sequential:[{action:"replaceStylesheets"},{action:"replaceStyleAttributes"},{action:"insertVariables"},{option:"compressHTML",action:"compressHTML"},{action:"cleanupPage"}],parallel:[{option:"enableMaff",action:"insertMAFFMetaData"},{action:"setDocInfo"}]}];class ef{constructor(e,t){const n=t&&e.doc;this.root=t,this.options=e,this.options.url=this.options.url||n&&this.options.doc.location.href;const r=this.options.url.match(/^.*\//);if(this.options.resourceReferrer=this.options.passReferrerOnError&&r&&r[0],this.options.baseURI=n&&this.options.doc.baseURI,this.options.rootDocument=t,this.options.updatedResources=this.options.updatedResources||{},this.options.fontTests=new Um,this.batchRequest=new tf,this.processor=new pf(e,this.batchRequest),n){const e=Fm.preProcessDoc(this.options.doc,this.options.win,this.options);this.options.canvases=e.canvases,this.options.fonts=e.fonts,this.options.stylesheets=e.stylesheets,this.options.images=e.images,this.options.posters=e.posters,this.options.usedFonts=e.usedFonts,this.options.shadowRoots=e.shadowRoots,this.options.imports=e.imports,this.options.referrer=e.referrer,this.markedElements=e.markedElements}this.options.saveRawPage&&(this.options.removeFrames=!0),this.options.content=this.options.content||(n?Fm.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new Zm(jm,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new Zm(Hm,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new Zm(Wm,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&Fm.postProcessDoc(this.options.doc,this.markedElements)}cancel(){function e(e){e.runner&&e.runner.cancel()}this.cancelled=!0,this.batchRequest.cancel(),this.root&&(this.options.frames&&this.options.frames.forEach(e),this.options.imports&&this.options.imports.forEach(e))}async run(){this.root&&(this.processor.initialize(this.batchRequest),this.onprogress(new Zm($m,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new Zm(Vm,e))}),this.options),await this.pendingPromises,this.options.doc=null,this.options.win=null,await this.executeStage(2),await this.executeStage(3),this.processor.finalize()}getDocument(){return this.processor.doc}getStyleSheets(){return this.processor.stylesheets}getPageData(){return this.root&&this.onprogress(new Zm(Ym,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let n;return this.onprogress(new Zm(Gm,{pageURL:this.options.url,step:e,frame:t})),Xm[e].sequential.forEach((n=>{this.onprogress(new Zm(Qm,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||this.executeTask(n),this.onprogress(new Zm(Jm,{pageURL:this.options.url,step:e,task:n.action,frame:t}))})),n=Xm[e].parallel?await Promise.all(Xm[e].parallel.map((async n=>{this.onprogress(new Zm(Qm,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||await this.executeTask(n),this.onprogress(new Zm(Jm,{pageURL:this.options.url,step:e,task:n.action,frame:t}))}))):Promise.resolve(),this.onprogress(new Zm(Km,{pageURL:this.options.url,step:e,frame:t})),n}executeTask(e){if(!e.option||e.option.startsWith("!")&&!this.options[e.option]||this.options[e.option])return this.processor[e.action]()}}class tf{constructor(){this.requests=new Um,this.duplicates=new Um}addURL(e,{asBinary:t,expectedType:n,groupDuplicates:r,baseURI:a,blockMixedContent:o}={}){return new Promise(((s,i)=>{const l=JSON.stringify([e,t,n,a,o]);let c=this.requests.get(l);c||(c=[],this.requests.set(l,c));const u={resolve:s,reject:i};if(c.push(u),r){let e=this.duplicates.get(l);e||(e=[],this.duplicates.set(l,e)),e.push(u)}}))}getMaxResources(){return this.requests.size}run(e,t){const n=[...this.requests.keys()];let r=0;return Promise.all(n.map((async n=>{const[a,o,s,i,l]=JSON.parse(n),c=this.requests.get(n);try{const u=r;r+=1;const h=await Fm.getContent(a,{asBinary:o,expectedType:s,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,frameId:t.windowId,resourceReferrer:t.resourceReferrer,baseURI:i,blockMixedContent:l,acceptHeaders:t.acceptHeaders});e({url:a}),this.cancelled||c.forEach((e=>{const t=this.duplicates.get(n),r=t&&t.length>1&&t.includes(e);e.resolve({content:h.data,indexResource:u,duplicate:r})}))}catch(t){r+=1,e({url:a}),c.forEach((e=>e.reject(t)))}this.requests.delete(n)})))}cancel(){this.cancelled=!0;[...this.requests.keys()].forEach((e=>{this.requests.get(e).forEach((e=>e.reject())),this.requests.delete(e)}))}}const nf=["data:text/"],rf="data:image/svg+xml",af="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",of=/<script/gi,sf=/<noscript/gi,lf=/<canvas/gi,cf="shadowmode",uf="delegatesfocus",hf="data-template-shadow-root",df="utf-8";class pf{constructor(e,t){this.options=e,this.stats=new tg(e),this.baseURI=Ff(e.baseURI||e.url),this.batchRequest=t,this.stylesheets=new Um,this.styles=new Um,this.cssVariables=new Um,this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(Fm.resolveURL("index.rdf",this.options.baseURI||this.options.url),{expectedType:"document"})),this.maxResources=this.batchRequest.getMaxResources(),this.options.saveRawPage||this.options.removeFrames||!this.options.frames||this.options.frames.forEach((e=>this.maxResources+=e.maxResources||0)),!this.options.removeImports&&this.options.imports&&this.options.imports.forEach((e=>this.maxResources+=e.maxResources||0)),this.stats.set("processed","resources",this.maxResources)}async loadPage(e,t){let n;if(e&&!this.options.saveRawPage||(n=await Fm.getContent(this.baseURI,{maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,charset:t,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,expectedType:"document",acceptHeaders:this.options.acceptHeaders}),e=n.data),this.doc=Fm.parseDocContent(e,this.baseURI),this.options.saveRawPage){let t;if(this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((e=>{const n=e.content.split(";")[1];n&&!t&&(t=n.split("=")[1].trim().toLowerCase())})),t&&n.charset&&t.toLowerCase()!=n.charset.toLowerCase())return this.loadPage(e,t)}this.workStyleElement=this.doc.createElement("style"),this.doc.body.appendChild(this.workStyleElement),this.onEventAttributeNames=function(e){const t=e.createElement("div"),n=[];for(const e in t)e.startsWith("on")&&n.push(e);return n.push("onunload"),n}(this.doc)}finalize(){this.workStyleElement.parentNode&&this.workStyleElement.remove()}async getPageData(){Fm.postProcessDoc(this.doc);const e=Fm.parseURL(this.baseURI);if(this.options.insertSingleFileComment){const e=this.doc.documentElement.firstChild;let t=this.options.saveUrl,n=this.options.saveDate;if(8==e.nodeType&&(e.textContent.includes(Fm.COMMENT_HEADER_LEGACY)||e.textContent.includes(Fm.COMMENT_HEADER))){const r=this.doc.documentElement.firstChild.textContent.split("\n"),[,,a,o]=r;t=a.split("url: ")[1],n=o.split("saved date: ")[1],e.remove()}const r=(this.options.infobarContent||"").replace(/\\n/g,"\n").replace(/\\t/g,"\t"),a=this.doc.createComment("\n "+(this.options.useLegacyCommentHeader?Fm.COMMENT_HEADER_LEGACY:Fm.COMMENT_HEADER)+" \n url: "+t+" \n saved date: "+n+(r?" \n info: "+r:"")+"\n");this.doc.documentElement.insertBefore(a,this.doc.documentElement.firstChild)}if(this.options.insertCanonicalLink&&this.options.saveUrl.match(xf)){let e=this.doc.querySelector("link[rel=canonical]");e||(e=this.doc.createElement("link"),e.setAttribute("rel","canonical"),this.doc.head.appendChild(e)),e&&!e.href&&(e.href=this.options.saveUrl)}if(this.options.insertMetaCSP){const e=this.doc.createElement("meta");e.httpEquiv="content-security-policy",e.content="default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:;",this.doc.head.appendChild(e)}if(this.options.insertMetaNoIndex){let e=this.doc.querySelector("meta[name=robots][content*=noindex]");e||(e=this.doc.createElement("meta"),e.setAttribute("name","robots"),e.setAttribute("content","noindex"),this.doc.head.appendChild(e))}let t;this.options.displayStats&&(t=Fm.getContentSize(this.doc.documentElement.outerHTML));const n=Fm.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=Fm.getContentSize(n);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",t-e)}let r=await kf.evalTemplate(this.options.filenameTemplate,this.options,n)||"";const a=this.options.filenameReplacementCharacter;if(r=Fm.getValidFilename(r,this.options.filenameReplacedCharacters,a),this.options.backgroundSave||(r=r.replace(/\//g,a)),!this.options.saveToGDrive&&!this.options.saveToGitHub&&!this.options.saveWithCompanion&&("bytes"==this.options.filenameMaxLengthUnit&&Fm.getContentSize(r)>this.options.filenameMaxLength||r.length>this.options.filenameMaxLength)){const e=r.match(/(\.[^.]{3,4})$/),t=e&&e[0]&&e[0].length>1?e[0]:"";r="bytes"==this.options.filenameMaxLengthUnit?await Fm.truncateText(r,this.options.filenameMaxLength-t.length):r.substring(0,this.options.filenameMaxLength-t.length),r=r+"…"+t}r||(r="Unnamed page");const o=this.baseURI.match(/([^/]*)\/?(\.html?.*)$/)||this.baseURI.match(/\/\/([^/]*)\/?$/),s={stats:this.stats.data,title:this.options.title||(this.baseURI&&o?o[1]:e.hostname?e.hostname:""),filename:r,content:n};return this.options.addProof&&(s.hash=await Fm.digest("SHA-256",n)),this.options.retrieveLinks&&(s.links=Array.from(new Dm(Array.from(this.doc.links).map((e=>e.href))))),s}preProcessPage(){this.options.win&&this.doc.body.querySelectorAll(':not(svg) title, meta, link[href][rel*="icon"]').forEach((e=>e instanceof this.options.win.HTMLElement&&this.doc.head.appendChild(e))),this.options.images&&!this.options.saveRawPage&&(this.doc.querySelectorAll("img["+Fm.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(Fm.IMAGE_ATTRIBUTE_NAME);if(t){const n=this.options.images[Number(t)];n&&(this.options.removeHiddenElements&&(n.size&&!n.size.pxWidth&&!n.size.pxHeight||""==e.getAttribute(Fm.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",af):(n.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",n.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=af||!e.getAttribute("data-src")||(n.src=e.dataset.src,e.setAttribute("src",e.dataset.src),e.removeAttribute("data-src")))))}})),this.options.loadDeferredImages&&this.doc.querySelectorAll("img[data-srcset]").forEach((e=>{!e.getAttribute("srcset")&&e.getAttribute("data-srcset")&&(e.setAttribute("srcset",e.dataset.srcset),e.removeAttribute("data-srcset"))})))}replaceStyleContents(){this.options.stylesheets&&this.doc.querySelectorAll("style").forEach(((e,t)=>{if(e.getAttribute(Fm.STYLESHEET_ATTRIBUTE_NAME)){const n=this.options.stylesheets[Number(t)];n&&(e.textContent=n)}}))}removeUnselectedElements(){function e(e){1==e.nodeType&&e.querySelector("svg,style,link")||!n(e)?t(e):e.remove()}function t(t){n(t)&&(t.style.setProperty("display","none","important"),Array.from(t.childNodes).forEach(e))}function n(e){if(1==e.nodeType){const t=e.tagName&&e.tagName.toLowerCase();return"svg"!=t&&"style"!=t&&"link"!=t}}!function n(r){let a=!1;Array.from(r.childNodes).forEach((r=>{if(1==r.nodeType){const o=""==r.getAttribute(Fm.SELECTED_CONTENT_ATTRIBUTE_NAME);a=a||o,o?(r.removeAttribute(Fm.SELECTED_CONTENT_ATTRIBUTE_NAME),n(r)):a?e(r):t(r)}}))}(this.doc.body),this.doc.body.removeAttribute(Fm.SELECTED_CONTENT_ATTRIBUTE_NAME)}insertVideoPosters(){this.options.posters&&this.doc.querySelectorAll("video[src], video > source[src]").forEach((e=>{let t;t="VIDEO"==e.tagName?e:e.parentElement;const n=e.getAttribute(Fm.POSTER_ATTRIBUTE_NAME);if(n){const e=this.options.posters[Number(n)];!t.poster&&e&&t.setAttribute("poster",e)}}))}removeFrames(){const e=this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]');this.stats.set("discarded","frames",e.length),this.stats.set("processed","frames",e.length),this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]').forEach((e=>e.remove()))}removeScripts(){this.onEventAttributeNames.forEach((e=>this.doc.querySelectorAll("["+e+"]").forEach((t=>t.removeAttribute(e))))),this.doc.querySelectorAll("[href]").forEach((e=>{e.href&&e.href.match&&e.href.match(/^\s*javascript:/)&&e.setAttribute("href","")})),this.doc.querySelectorAll("[src]").forEach((e=>{e.src&&e.src.match(/^\s*javascript:/)&&e.removeAttribute("src")}));const e=this.doc.querySelectorAll('script:not([type="application/ld+json"]):not([data-template-shadow-root])');this.stats.set("discarded","scripts",e.length),this.stats.set("processed","scripts",e.length),e.forEach((e=>e.remove()))}removeVideoSources(){const e=this.doc.querySelectorAll("video[src], video > source");this.stats.set("discarded","video sources",e.length),this.stats.set("processed","video sources",e.length),e.forEach((t=>{"SOURCE"==t.tagName?t.remove():e.forEach((e=>e.removeAttribute("src")))}))}removeAudioSources(){const e=this.doc.querySelectorAll("audio[src], audio > source[src]");this.stats.set("discarded","audio sources",e.length),this.stats.set("processed","audio sources",e.length),e.forEach((t=>{"SOURCE"==t.tagName?t.remove():e.forEach((e=>e.removeAttribute("src")))}))}removeDiscardedResources(){this.doc.querySelectorAll("."+Fm.SINGLE_FILE_UI_ELEMENT_CLASS).forEach((e=>e.remove())),this.doc.querySelectorAll("button button").forEach((e=>e.remove())),this.doc.querySelectorAll('meta[http-equiv=refresh], meta[disabled-http-equiv], meta[http-equiv="content-security-policy"]').forEach((e=>e.remove()));const e=this.doc.querySelectorAll('applet, object[data]:not([type="image/svg+xml"]):not([type="image/svg-xml"]):not([type="text/html"]), embed[src]:not([src*=".svg"]):not([src*=".pdf"])');this.stats.set("discarded","objects",e.length),this.stats.set("processed","objects",e.length),e.forEach((e=>e.remove()));this.doc.querySelectorAll("link[rel~=preconnect], link[rel~=prerender], link[rel~=dns-prefetch], link[rel~=preload], link[rel~=manifest], link[rel~=prefetch]").forEach((e=>{let t;t=this.options.removeScripts?/(preconnect|prerender|dns-prefetch|preload|prefetch|manifest)/g:/(preconnect|prerender|dns-prefetch|prefetch|manifest)/g;const n=e.getAttribute("rel").replace(t,"").trim();n.length?e.setAttribute("rel",n):e.remove()})),this.doc.querySelectorAll('link[rel*=stylesheet][rel*=alternate][title],link[rel*=stylesheet]:not([href]),link[rel*=stylesheet][href=""]').forEach((e=>e.remove())),this.options.removeHiddenElements&&this.doc.querySelectorAll("input[type=hidden]").forEach((e=>e.remove())),this.options.saveFavicon||this.doc.querySelectorAll('link[rel*="icon"]').forEach((e=>e.remove())),this.doc.querySelectorAll("a[ping]").forEach((e=>e.removeAttribute("ping")))}resetCharsetMeta(){let e;this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((t=>{const n=t.content.split(";")[1];n&&!e&&(e=n.split("=")[1],e&&(this.charset=e.trim().toLowerCase())),t.remove()}));const t=this.doc.createElement("meta");t.setAttribute("charset",df),this.doc.head.firstChild?this.doc.head.insertBefore(t,this.doc.head.firstChild):this.doc.head.appendChild(t)}setInputValues(){this.doc.querySelectorAll("input:not([type=radio]):not([type=checkbox])").forEach((e=>{const t=e.getAttribute(Fm.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(Fm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(Fm.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(Fm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}moveStylesInHead(){this.doc.querySelectorAll("style").forEach((e=>{""==e.getAttribute(Fm.STYLE_ATTRIBUTE_NAME)&&this.doc.head.appendChild(e)}))}saveFavicon(){let e=this.doc.querySelector('link[href][rel="icon"]');e||(e=this.doc.querySelector('link[href][rel="shortcut icon"]')),e||(e=this.doc.createElement("link"),e.setAttribute("type","image/x-icon"),e.setAttribute("rel","shortcut icon"),e.setAttribute("href","/favicon.ico")),this.doc.head.appendChild(e)}replaceCanvasElements(){this.options.canvases&&this.doc.querySelectorAll("canvas").forEach((e=>{const t=e.getAttribute(Fm.CANVAS_ATTRIBUTE_NAME);if(t){const n=this.options.canvases[Number(t)];n&&(kf.setBackgroundImage(e,"url("+n.dataURI+")"),this.stats.add("processed","canvas",1))}}))}insertFonts(){if(this.options.fonts&&this.options.fonts.length){let e="";if(this.options.fonts.forEach((t=>{if(t["font-family"]&&t.src){e+="@font-face{";let n="";Object.keys(t).forEach((e=>{n&&(n+=";"),n+=e+":"+t[e]})),e+=n+"}"}})),e){const t=this.doc.createElement("style");t.textContent=e;const n=this.doc.querySelector("style");n?n.parentElement.insertBefore(t,n):this.doc.head.insertBefore(t,this.doc.head.firstChild)}}}removeHiddenElements(){const e=this.doc.querySelectorAll("["+Fm.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+Fm.REMOVED_CONTENT_ATTRIBUTE_NAME+"]");if(this.stats.set("discarded","hidden elements",t.length),this.stats.set("processed","hidden elements",t.length),e.length){const t=this.doc.createElement("style");t.textContent=".sf-hidden{display:none!important;}",this.doc.head.appendChild(t),e.forEach((e=>{"none"!=e.style.getPropertyValue("display")&&("important"==e.style.getPropertyPriority("display")?e.style.setProperty("display","none","important"):e.classList.add("sf-hidden"))}))}t.forEach((e=>e.remove()))}resolveHrefs(){this.doc.querySelectorAll("a[href], area[href], link[href]").forEach((e=>{const t=e.getAttribute("href").trim();if("LINK"==e.tagName&&e.rel.includes("stylesheet")&&this.options.saveOriginalURLs&&!Gf(t)&&e.setAttribute("data-sf-original-href",t),!Qf(t)){let n;try{n=Fm.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(n){const t=Ff(this.options.url);!n.startsWith(t+"#")||n.startsWith(t+"#!")||this.options.resolveFragmentIdentifierURLs||(n=n.substring(t.length));try{e.setAttribute("href",n)}catch(e){}}}}))}resolveStyleAttributeURLs(){this.doc.querySelectorAll("[style]").forEach((e=>{let t=e.getAttribute("style");this.options.compressCSS&&(t=Fm.compressCSS(t)),t=kf.resolveStylesheetURLs(t,this.baseURI,this.workStyleElement,this.options.saveOriginalURLs);const n=Bm.parse(t,{context:"declarationList"});this.styles.set(e,n)}))}async resolveStylesheetURLs(){if(await Promise.all(Array.from(this.doc.querySelectorAll("style, link[rel*=stylesheet]")).map((async t=>{const n={maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,url:this.options.url,charset:this.charset,compressCSS:this.options.compressCSS,updatedResources:this.options.updatedResources,rootDocument:this.options.rootDocument,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,blockMixedContent:this.options.blockMixedContent,saveOriginalURLs:this.options.saveOriginalURLs,acceptHeaders:this.options.acceptHeaders};let r;t.media&&(r=t.media.toLowerCase());const a={mediaText:r};t.closest("[shadowmode]")&&(a.scoped=!0),"LINK"==t.tagName&&t.charset&&(n.charset=t.charset),await e(t,a,this.stylesheets,this.baseURI,n,this.workStyleElement)}))),this.options.rootDocument){const t=Object.keys(this.options.updatedResources).filter((e=>"stylesheet"==this.options.updatedResources[e].type&&!this.options.updatedResources[e].retrieved)).map((e=>this.options.updatedResources[e]));await Promise.all(t.map((async t=>{t.retrieved=!0;const n=this.doc.createElement("style");this.doc.body.appendChild(n),n.textContent=t.content,await e(n,{},this.stylesheets,this.baseURI,this.options,this.workStyleElement)})))}async function e(e,n,r,a,o,s){r.set(e,n);let i,l=await t(e,a,o,s);qf(l,o.charset)||(o=Object.assign({},o,{charset:jf(l)}),l=await t(e,a,o,s));try{i=Bm.parse(Xf(l))}catch(e){}i&&i.children?(o.compressCSS&&kf.removeSingleLineCssComments(i),n.stylesheet=i):r.delete(e)}async function t(e,t,n,r){let a;return a="LINK"==e.tagName?await kf.resolveLinkStylesheetURLs(e.href,t,n,r):await kf.resolveImportURLs(e.textContent,t,n,r),a||""}}async resolveFrameURLs(){if(!this.options.saveRawPage){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{if("OBJECT"==e.tagName)e.setAttribute("data","data:text/html,");else{const t=e.getAttribute("src");this.options.saveOriginalURLs&&!Gf(t)&&e.setAttribute("data-sf-original-src",t),e.removeAttribute("src"),e.removeAttribute("srcdoc")}Array.from(e.childNodes).forEach((e=>e.remove()));const t=e.getAttribute(Fm.WIN_ID_ATTRIBUTE_NAME);if(this.options.frames&&t){const n=this.options.frames.find((e=>e.windowId==t));n&&await async function(e,t,n,r,a){a.insertSingleFileComment=!1,a.insertCanonicalLink=!1,a.insertMetaNoIndex=!1,a.saveFavicon=!1,a.url=e.baseURI,a.windowId=n,e.content&&(a.content=e.content,a.canvases=e.canvases,a.fonts=e.fonts,a.stylesheets=e.stylesheets,a.images=e.images,a.posters=e.posters,a.usedFonts=e.usedFonts,a.shadowRoots=e.shadowRoots,a.imports=e.imports,e.runner=new ef(a),e.frameElement=t,await e.runner.loadPage(),await e.runner.initialize(),e.maxResources=r.getMaxResources())}(n,e,t,this.batchRequest,Object.create(this.options))}})))}}insertShadowRootContents(){const e=this.doc,t=this.options;if(this.options.shadowRoots&&this.options.shadowRoots.length){!function n(r){Array.from(r.querySelectorAll("["+Fm.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((r=>{const a=r.getAttribute(Fm.SHADOW_ROOT_ATTRIBUTE_NAME);if(a){const o=t.shadowRoots[Number(a)];if(o){const t=e.createElement("template");t.setAttribute(cf,o.mode),o.delegatesFocus&&t.setAttribute(uf,""),o.adoptedStyleSheets&&o.adoptedStyleSheets.forEach((n=>{const r=e.createElement("style");r.textContent=n,t.appendChild(r)}));const a=Fm.parseDocContent(o.content);if(a.head){const e=a.head.querySelector("meta[charset]");e&&e.remove(),a.head.childNodes.forEach((e=>t.appendChild(a.importNode(e,!0))))}a.body&&a.body.childNodes.forEach((e=>t.appendChild(a.importNode(e,!0)))),n(t),r.firstChild?r.insertBefore(t,r.firstChild):r.appendChild(t)}}}))}(this.doc),this.options.removeScripts&&this.doc.querySelectorAll("script[data-template-shadow-root]").forEach((e=>e.remove()));const n=e.createElement("script");n.setAttribute(hf,""),n.textContent='(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[shadowmode]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("shadowmode"),delegatesFocus:Boolean(element.getAttribute("delegatesfocus"))});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()',e.body.appendChild(n)}}async resolveHtmlImportURLs(){const e=Array.from(this.doc.querySelectorAll("link[rel=import][href]"));await Promise.all(e.map((async e=>{const t=e.href;this.options.saveOriginalURLs&&!Gf(t)&&e.setAttribute("data-sf-original-href",t),e.removeAttribute("href");const n=Object.create(this.options);n.insertSingleFileComment=!1,n.insertCanonicalLink=!1,n.insertMetaNoIndex=!1,n.saveFavicon=!1,n.removeUnusedStyles=!1,n.removeAlternativeMedias=!1,n.removeUnusedFonts=!1,n.removeHiddenElements=!1,n.url=t;const r=e.getAttribute(Fm.HTML_IMPORT_ATTRIBUTE_NAME);if(r){const t=n.imports[Number(r)];t&&(n.content=t.content,t.runner=new ef(n),await t.runner.loadPage(),await t.runner.initialize(),n.removeImports||(t.maxResources=t.runner.batchRequest.getMaxResources()),t.runner.getStyleSheets().forEach((t=>{const n=this.doc.createElement("style");e.insertAdjacentElement("afterEnd",n),this.stylesheets.set(n,t)})))}n.removeImports&&(e.remove(),this.stats.add("discarded","HTML imports",1))})))}removeUnusedStyles(){this.mediaAllInfo||(this.mediaAllInfo=Fm.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=Fm.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){Fm.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=Fm.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){this.options.fontURLs=new Um,await Promise.all([...this.stylesheets].map((([,e])=>kf.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>kf.processStyle(e.children.toArray(),this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processPageResources(){let e=[['link[href][rel*="icon"]',"href",!1,!0],['object[type="image/svg+xml"], object[type="image/svg-xml"]',"data"],["img[src], input[src][type=image]","src",!0],['embed[src*=".svg"], embed[src*=".pdf"]',"src"],["video[poster]","poster"],["*[background]","background"],["image","xlink:href"],["image","href"]].map((([e,t,n,r])=>kf.processAttribute(this.doc.querySelectorAll(e),t,this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest,n,r)));e=e.concat([kf.processXLinks(this.doc.querySelectorAll("use"),this.doc,this.baseURI,this.options,this.batchRequest),kf.processSrcset(this.doc.querySelectorAll("img[srcset], source[srcset]"),"srcset",this.baseURI,this.batchRequest)]),this.options.removeAudioSrc||e.push(kf.processAttribute(this.doc.querySelectorAll("audio[src], audio > source[src]"),"src",this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest)),this.options.removeVideoSrc||e.push(kf.processAttribute(this.doc.querySelectorAll("video[src], video > source[src]"),"src",this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest)),await Promise.all(e),this.options.saveFavicon&&kf.processShortcutIcons(this.doc)}async processScripts(){await Promise.all(Array.from(this.doc.querySelectorAll("script[src], link[rel=preload][as=script][href]")).map((async e=>{let t,n;"SCRIPT"==e.tagName?(n=e.getAttribute("src"),this.options.saveOriginalURLs&&!Gf(n)&&e.setAttribute("data-sf-original-src",n)):(n=e.getAttribute("href"),this.options.saveOriginalURLs&&!Gf(n)&&e.setAttribute("data-sf-original-href",n)),e.removeAttribute("integrity"),e.textContent="";try{t=Fm.resolveURL(n,this.baseURI)}catch(e){}if(Zf(t)){"SCRIPT"==e.tagName?e.removeAttribute("src"):e.removeAttribute("href"),this.stats.add("processed","scripts",1);const n=await Fm.getContent(t,{asBinary:!0,charset:this.charset!=df&&this.charset,maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,baseURI:this.options.baseURI,blockMixedContent:this.options.blockMixedContent,expectedType:"script",acceptHeaders:this.options.acceptHeaders});if(n.data=Uf(t,n,this.options),"SCRIPT"==e.tagName)e.setAttribute("src",n.data),""!=e.getAttribute("async")&&"async"!=e.getAttribute("async")&&""!=e.getAttribute(Fm.ASYNC_SCRIPT_ATTRIBUTE_NAME)||e.setAttribute("async","");else{const t=this.doc.createElement("script");t.setAttribute("src",n.data),t.setAttribute("async",""),e.parentElement.replaceChild(t,e)}}})))}removeAlternativeImages(){Fm.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await Fm.removeAlternativeFonts(this.doc,this.stylesheets,this.options.fontURLs,this.options.fontTests)}async processFrames(){if(this.options.frames){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{const t=e.getAttribute(Fm.WIN_ID_ATTRIBUTE_NAME);if(t){const n=this.options.frames.find((e=>e.windowId==t));if(n)if(this.options.frames=this.options.frames.filter((e=>e.windowId!=t)),n.runner&&""!=e.getAttribute(Fm.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await n.runner.run();const t=await n.runner.getPageData();e.removeAttribute(Fm.WIN_ID_ATTRIBUTE_NAME);let r="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(sf)||t.content.match(lf)||t.content.match(of))&&(r+=" allow-scripts allow-same-origin"),e.setAttribute("sandbox",r),"OBJECT"==e.tagName?e.setAttribute("data","data:text/html,"+t.content):"FRAME"==e.tagName?e.setAttribute("src","data:text/html,"+t.content.replace(/%/g,"%25").replace(/#/g,"%23")):(e.setAttribute("srcdoc",t.content),e.removeAttribute("src")),this.stats.addAll(t)}else e.removeAttribute(Fm.WIN_ID_ATTRIBUTE_NAME),this.stats.add("discarded","frames",1)}})))}}async processHtmlImports(){const e=Array.from(this.doc.querySelectorAll("link[rel=import]"));await Promise.all(e.map((async e=>{const t=e.getAttribute(Fm.HTML_IMPORT_ATTRIBUTE_NAME);if(t){const n=this.options.imports[Number(t)];if(n.runner){this.stats.add("processed","HTML imports",1),await n.runner.run();const t=await n.runner.getPageData();e.removeAttribute(Fm.HTML_IMPORT_ATTRIBUTE_NAME),e.setAttribute("href","data:text/html,"+t.content),this.stats.addAll(t)}else this.stats.add("discarded","HTML imports",1)}})))}replaceStylesheets(){this.doc.querySelectorAll("style").forEach((e=>{const t=this.stylesheets.get(e);if(t){this.stylesheets.delete(e);let n=Bm.generate(t.stylesheet);this.options.saveOriginalURLs&&(n=Kf(n)),e.textContent=n,t.mediaText&&(e.media=t.mediaText)}else e.remove()})),this.doc.querySelectorAll("link[rel*=stylesheet]").forEach((e=>{const t=this.stylesheets.get(e);if(t){this.stylesheets.delete(e);const n=this.doc.createElement("style");t.mediaText&&(n.media=t.mediaText);let r=Bm.generate(t.stylesheet);this.options.saveOriginalURLs&&(r=Kf(r),n.setAttribute("data-sf-original-href",e.getAttribute("data-sf-original-href"))),n.textContent=r,e.parentElement.replaceChild(n,e)}else e.remove()}))}replaceStyleAttributes(){this.doc.querySelectorAll("[style]").forEach((e=>{const t=this.styles.get(e);if(t){this.styles.delete(e);let n=Bm.generate(t);this.options.saveOriginalURLs&&(n=Kf(n)),e.setAttribute("style",n)}else e.setAttribute("style","")}))}insertVariables(){if(this.cssVariables.size){const e=this.doc.createElement("style"),t=this.doc.head.querySelector("style");t?this.doc.head.insertBefore(e,t):this.doc.head.appendChild(e);let n="";this.cssVariables.forEach((({content:e,url:t},r)=>{this.cssVariables.delete(r),n&&(n+=";"),n+=`${bf+r}: `,this.options.saveOriginalURLs&&(n+=`/* original URL: ${t} */ `),n+=`url("${e}")`})),e.textContent=":root{"+n+"}"}}compressHTML(){let e;this.options.displayStats&&(e=Fm.getContentSize(this.doc.documentElement.outerHTML)),Fm.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:Fm.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-Fm.getContentSize(this.doc.documentElement.outerHTML))}cleanupPage(){this.doc.querySelectorAll("base").forEach((e=>e.remove()));const e=this.doc.head.querySelector("meta[charset]");e&&(this.doc.head.insertBefore(e,this.doc.head.firstChild),1==this.doc.head.querySelectorAll("*").length&&0==this.doc.body.childNodes.length&&this.doc.head.querySelector("meta[charset]").remove())}resetZoomLevel(){const e=this.doc.documentElement.style.getPropertyValue("-sf-transform"),t=this.doc.documentElement.style.getPropertyPriority("-sf-transform"),n=this.doc.documentElement.style.getPropertyValue("-sf-transform-origin"),r=this.doc.documentElement.style.getPropertyPriority("-sf-transform-origin"),a=this.doc.documentElement.style.getPropertyValue("-sf-min-height"),o=this.doc.documentElement.style.getPropertyPriority("-sf-min-height");this.doc.documentElement.style.setProperty("transform",e,t),this.doc.documentElement.style.setProperty("transform-origin",n,r),this.doc.documentElement.style.setProperty("min-height",a,o),this.doc.documentElement.style.removeProperty("-sf-transform"),this.doc.documentElement.style.removeProperty("-sf-transform-origin"),this.doc.documentElement.style.removeProperty("-sf-min-height")}async insertMAFFMetaData(){const e=await this.maffMetaDataPromise;if(e&&e.content){const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",n=Fm.parseXMLContent(e.content),r=n.querySelector("RDF > Description > originalurl"),a=n.querySelector("RDF > Description > archivetime");if(r&&(this.options.saveUrl=r.getAttributeNS(t,"resource")),a){const e=a.getAttributeNS(t,"resource");if(e){const t=new Date(e);isNaN(t.getTime())||(this.options.saveDate=new Date(e))}}}}async setDocInfo(){const e=this.doc.querySelector("title"),t=this.doc.querySelector("meta[name=description]"),n=this.doc.querySelector("meta[name=author]"),r=this.doc.querySelector("meta[name=creator]"),a=this.doc.querySelector("meta[name=publisher]"),o=this.doc.querySelector("h1");this.options.title=e?e.textContent.trim():"",this.options.info={description:t&&t.content?t.content.trim():"",lang:this.doc.documentElement.lang,author:n&&n.content?n.content.trim():"",creator:r&&r.content?r.content.trim():"",publisher:a&&a.content?a.content.trim():"",heading:o&&o.textContent?o.textContent.trim():""},this.options.infobarContent=await kf.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const mf="data:",ff="about:blank",gf="data:null;base64,",yf=/(#.+?)$/,bf="--sf-img-",vf=524288;class kf{static async evalTemplate(e="",t,n,r){const a=Fm.parseURL(t.saveUrl);e=await Hf(e,"page-title",(()=>t.title||"No title"),r,t.filenameReplacementCharacter),e=await Hf(e,"page-heading",(()=>t.info.heading||"No heading"),r,t.filenameReplacementCharacter),e=await Hf(e,"page-language",(()=>t.info.lang||"No language"),r,t.filenameReplacementCharacter),e=await Hf(e,"page-description",(()=>t.info.description||"No description"),r,t.filenameReplacementCharacter),e=await Hf(e,"page-author",(()=>t.info.author||"No author"),r,t.filenameReplacementCharacter),e=await Hf(e,"page-creator",(()=>t.info.creator||"No creator"),r,t.filenameReplacementCharacter),e=await Hf(e,"page-publisher",(()=>t.info.publisher||"No publisher"),r,t.filenameReplacementCharacter),await c(t.saveDate),await c(t.visitDate,"visit-"),e=await Hf(e,"url-hash",(()=>a.hash.substring(1)||"No hash"),r,t.filenameReplacementCharacter),e=await Hf(e,"url-host",(()=>a.host.replace(/\/$/,"")||"No host"),r,t.filenameReplacementCharacter),e=await Hf(e,"url-hostname",(()=>a.hostname.replace(/\/$/,"")||"No hostname"),r,t.filenameReplacementCharacter);const o=l(a.href);e=await Hf(e,"url-href",(()=>o||"No href"),void 0===r||r,t.filenameReplacementCharacter),e=await Hf(e,"url-href-digest-sha-1",o?async()=>Fm.digest("SHA-1",o):"No href",r,t.filenameReplacementCharacter),e=await Hf(e,"url-href-flat",(()=>l(a.href)||"No href"),!1,t.filenameReplacementCharacter),e=await Hf(e,"url-referrer",(()=>l(t.referrer)||"No referrer"),void 0===r||r,t.filenameReplacementCharacter),e=await Hf(e,"url-referrer-flat",(()=>l(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await Hf(e,"url-password",(()=>a.password||"No password"),r,t.filenameReplacementCharacter),e=await Hf(e,"url-pathname",(()=>l(a.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===r||r,t.filenameReplacementCharacter),e=await Hf(e,"url-pathname-flat",(()=>l(a.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await Hf(e,"url-port",(()=>a.port||"No port"),r,t.filenameReplacementCharacter),e=await Hf(e,"url-protocol",(()=>a.protocol||"No protocol"),r,t.filenameReplacementCharacter),e=await Hf(e,"url-search",(()=>a.search.substring(1)||"No search"),r,t.filenameReplacementCharacter);const s=a.search.substring(1).split("&").map((e=>e.split("=")));for(const[n,a]of s)e=await Hf(e,"url-search-"+n,(()=>a||""),r,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await Hf(e,"url-username",(()=>a.username||"No username"),r,t.filenameReplacementCharacter),e=await Hf(e,"tab-id",(()=>String(t.tabId||"No tab id")),r,t.filenameReplacementCharacter),e=await Hf(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),r,t.filenameReplacementCharacter),e=await Hf(e,"url-last-segment",(()=>l(function(e,t){let n=e.pathname.match(/\/([^/]+)$/),r=n&&n[0];r||(n=e.href.match(/([^/]+)\/?$/),r=n&&n[0]);r||(n=r.match(/(.*)\.[^.]+$/),r=n&&n[0]);r||(r=e.hostname.replace(/\/+/g,t).replace(/\/$/,""));n=r.match(/(.*)\.[^.]+$/),n&&n[1]&&(r=n[1]);return r=r.replace(/\/$/,"").replace(/^\//,""),r}(a,t.filenameReplacementCharacter))||"No last segment"),r,t.filenameReplacementCharacter),n&&(e=await Hf(e,"digest-sha-256",(async()=>Fm.digest("SHA-256",n)),r,t.filenameReplacementCharacter),e=await Hf(e,"digest-sha-384",(async()=>Fm.digest("SHA-384",n)),r,t.filenameReplacementCharacter),e=await Hf(e,"digest-sha-512",(async()=>Fm.digest("SHA-512",n)),r,t.filenameReplacementCharacter));const i=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await Hf(e,"bookmark-pathname",(()=>i),void 0===r||r,t.filenameReplacementCharacter),e=await Hf(e,"bookmark-pathname-flat",(()=>i),!1,t.filenameReplacementCharacter),(e=await Hf(e,"profile-name",(()=>t.profileName),r,t.filenameReplacementCharacter)).trim();function l(e){try{return decodeURI(e)}catch(t){return e}}async function c(n,a=""){n&&(e=await Hf(e,a+"datetime-iso",(()=>n.toISOString()),r,t.filenameReplacementCharacter),e=await Hf(e,a+"date-iso",(()=>n.toISOString().split("T")[0]),r,t.filenameReplacementCharacter),e=await Hf(e,a+"time-iso",(()=>n.toISOString().split("T")[1].split("Z")[0]),r,t.filenameReplacementCharacter),e=await Hf(e,a+"date-locale",(()=>n.toLocaleDateString()),r,t.filenameReplacementCharacter),e=await Hf(e,a+"time-locale",(()=>n.toLocaleTimeString()),r,t.filenameReplacementCharacter),e=await Hf(e,a+"day-locale",(()=>String(n.getDate()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"month-locale",(()=>String(n.getMonth()+1).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"year-locale",(()=>String(n.getFullYear())),r,t.filenameReplacementCharacter),e=await Hf(e,a+"datetime-locale",(()=>n.toLocaleString()),r,t.filenameReplacementCharacter),e=await Hf(e,a+"datetime-utc",(()=>n.toUTCString()),r,t.filenameReplacementCharacter),e=await Hf(e,a+"day-utc",(()=>String(n.getUTCDate()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"month-utc",(()=>String(n.getUTCMonth()+1).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"year-utc",(()=>String(n.getUTCFullYear())),r,t.filenameReplacementCharacter),e=await Hf(e,a+"hours-locale",(()=>String(n.getHours()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"minutes-locale",(()=>String(n.getMinutes()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"seconds-locale",(()=>String(n.getSeconds()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"hours-utc",(()=>String(n.getUTCHours()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"minutes-utc",(()=>String(n.getUTCMinutes()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"seconds-utc",(()=>String(n.getUTCSeconds()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Hf(e,a+"time-ms",(()=>String(n.getTime())),r,t.filenameReplacementCharacter))}}static setBackgroundImage(e,t,n){e.style.setProperty("background-blend-mode","normal","important"),e.style.setProperty("background-clip","content-box","important"),e.style.setProperty("background-position",n&&n["background-position"]?n["background-position"]:"center","important"),e.style.setProperty("background-color",n&&n["background-color"]?n["background-color"]:"transparent","important"),e.style.setProperty("background-image",t,"important"),e.style.setProperty("background-size",n&&n["background-size"]?n["background-size"]:"100% 100%","important"),e.style.setProperty("background-origin","content-box","important"),e.style.setProperty("background-repeat","no-repeat","important")}static processShortcutIcons(e){let t=Vf(Array.from(e.querySelectorAll('link[href][rel="icon"], link[href][rel="shortcut icon"]')));t||(t=Vf(Array.from(e.querySelectorAll('link[href][rel*="icon"]'))),t&&(t.rel="icon")),t&&e.querySelectorAll('link[href][rel*="icon"]').forEach((e=>{e!=t&&e.remove()}))}static removeSingleLineCssComments(e){const t=[];for(let n=e.children.head;n;n=n.next){const e=n.data;"Raw"==e.type&&e.value&&e.value.trim().startsWith("//")&&t.push(n)}t.forEach((t=>e.children.remove(t)))}static async resolveImportURLs(e,t,n,r,a=new Dm){const o=function(e){return e.match(If)||[]}(e=kf.resolveStylesheetURLs(e,t,r,n.saveOriginalURLs));return await Promise.all(o.map((async o=>{const s=function(e){const t=e.match(Lf)||e.match(Pf)||e.match(Nf)||e.match(zf)||e.match(Mf)||e.match(Of);if(t){const[,e,n]=t;return{resourceURL:e,media:n}}}(o);if(s){const i=Wf(o);let l=Ff(s.resourceURL);if(!Qf(l)&&Jf(l)){try{l=Fm.resolveURL(s.resourceURL,t)}catch(e){}if(Zf(l)&&!a.has(l)){const t=await async function(e){const t=await Fm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,validateTextContentType:!0,frameId:n.frameId,charset:n.charset,resourceReferrer:n.resourceReferrer,baseURI:n.baseURI,blockMixedContent:n.blockMixedContent,expectedType:"stylesheet",acceptHeaders:n.acceptHeaders});return qf(t.data,t.charset||n.charset)?t:(n=Object.assign({},n,{charset:jf(t.data)}),Fm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,validateTextContentType:!0,frameId:n.frameId,charset:n.charset,resourceReferrer:n.resourceReferrer,baseURI:n.baseURI,blockMixedContent:n.blockMixedContent,expectedType:"stylesheet",acceptHeaders:n.acceptHeaders}))}(l);l=t.resourceURL,t.data=Uf(l,t,n),t.data&&t.data.match(/^<!doctype /i)&&(t.data="");let c=Xf(t.data);if(n.compressCSS&&(c=Fm.compressCSS(c)),c=function(e,t){return t?"@media "+t+"{ "+e+" }":e}(c,s.media),e.includes(o)){const t=new Dm(a);t.add(l),c=await kf.resolveImportURLs(c,l,n,r,t),r.textContent=c,e=r.sheet&&r.sheet.cssRules.length||!r.sheet&&c?e.replace(i,c):e.replace(i,"")}}else e=e.replace(i,"")}else e=e.replace(i,"")}}))),e}static resolveStylesheetURLs(e,t,n,r){const a=$f(e,!0);return r&&(e=function(e){return e.replace(Tf,(function(e,t,n,r,a,o,s){return Gf(n=n||a||s)?e:"-sf-url-original("+JSON.stringify(n)+") "+e}))}(e)),a.map((r=>{const a=Yf(r);let o=Ff(a);if(n.textContent='tmp { content:"'+o+'"}',n.sheet&&n.sheet.cssRules&&(o=Fm.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content"))),!Qf(o))if(!o||Jf(o)){let n;if(!a.startsWith("#"))try{n=Fm.resolveURL(o,t)}catch(e){}if(Zf(n)&&a!=n&&e.includes(r))try{e=e.replace(Wf(r),a?r.replace(a,n):"url("+n+")")}catch(e){}}else{let t;t=a?r.replace(a,gf):"url(data:null;base64,)",e=e.replace(Wf(r),t)}})),e}static async resolveLinkStylesheetURLs(e,t,n,r){if((e=Ff(e))&&e!=t&&e!=ff){const a=await Fm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,charset:n.charset,frameId:n.frameId,resourceReferrer:n.resourceReferrer,validateTextContentType:!0,baseURI:t,blockMixedContent:n.blockMixedContent,expectedType:"stylesheet",acceptHeaders:n.acceptHeaders});if(!qf(a.data,a.charset||n.charset))return n=Object.assign({},n,{charset:jf(a.data)}),kf.resolveLinkStylesheetURLs(e,t,n,r);e=a.resourceURL,a.data=Uf(a.resourceURL,a,n),a.data&&a.data.match(/^<!doctype /i)&&(a.data="");let o=Xf(a.data);return n.compressCSS&&(o=Fm.compressCSS(o)),o=await kf.resolveImportURLs(o,e,n,r),o}}static async processStylesheet(e,t,n,r,a){const o=[],s=[];for(let l=e.head;l;l=l.next){const e=l.data;"Atrule"==e.type&&"charset"==e.name?s.push(l):e.block&&e.block.children&&("Rule"==e.type?o.push(this.processStyle(e.block.children.toArray(),t,n,r,a)):"Atrule"!=e.type||"media"!=e.name&&"supports"!=e.name?"Atrule"==e.type&&"font-face"==e.name&&o.push(i(e,n.fontURLs)):o.push(this.processStylesheet(e.block.children,t,n,r,a)))}async function i(e,r){await Promise.all(e.block.children.toArray().map((async e=>{if("Declaration"==e.type&&e.value.children){const o=$f(Bf(e.value),!0);await Promise.all(o.map((async o=>{const s=Yf(o),i=Ff(s);if(!Qf(i)&&Zf(i)){let{content:o}=await a.addURL(i,{asBinary:!0,expectedType:"font",baseURI:t,blockMixedContent:n.blockMixedContent}),l=r.get(e);l||(l=[],r.set(e,l)),l.push(i),function(e,t,n){e.value.children.forEach((e=>{"Url"==e.type&&Fm.removeQuotes(Bf(e.value))==t&&(e.value.value=n)}))}(e,s,o)}})))}})))}s.forEach((t=>e.remove(t))),await Promise.all(o)}static async processStyle(e,t,n,r,a){function o(e,t,n,r=0){for(let a=t.head;a;a=a.next)a.data.children&&o(e,a.data.children,n,r+1),"Url"==a.data.type&&Fm.removeQuotes(Bf(a.data.value))==e&&n(a,t,0==r)}await Promise.all(e.map((async e=>{if(e.value&&!e.value.children&&"Raw"==e.value.type)try{e.value=Bm.parse(e.value.value,{context:"value"})}catch(e){}if("Declaration"==e.type&&e.value.children){const t=$f(Bf(e.value));await Promise.all(t.map((async t=>{const s=Yf(t),i=Ff(s);if(!Qf(i)&&Zf(i)){let t,{content:l,indexResource:c,duplicate:u}=await a.addURL(i,{asBinary:!0,expectedType:"image",groupDuplicates:n.groupDuplicateImages});const h=[];o(s,e.value.children,((e,r,a)=>{if(!s.startsWith("#"))if(u&&n.groupDuplicateImages&&a&&Fm.getContentSize(l)<vf){const n=Bm.parse("var("+bf+c+")",{context:"value"}).children.head;h.push({parent:r,token:e,value:n}),t=!0}else e.data.value.value=l})),t&&(r.set(c,{content:l,url:s}),h.forEach((({parent:e,token:t,value:n})=>e.replace(t,n))))}})))}})))}static async processAttribute(e,t,n,r,a,o,s,i,l){await Promise.all(Array.from(e).map((async e=>{let c=e.getAttribute(t);if(null!=c){c=Ff(c);let u=e.dataset.singleFileOriginURL;if(r.saveOriginalURLs&&!Gf(c)&&e.setAttribute("data-sf-original-"+t,c),delete e.dataset.singleFileOriginURL,!Qf(c)&&(e.setAttribute(t,af),Jf(c))){try{c=Fm.resolveURL(c,n)}catch(e){}if(Zf(c)){let{content:h,indexResource:d,duplicate:p}=await s.addURL(c,{asBinary:!0,expectedType:"image",groupDuplicates:r.groupDuplicateImages&&"IMG"==e.tagName&&"src"==t});if(u&&h==gf){try{u=Fm.resolveURL(u,n)}catch(e){}try{c=u,h=(await Fm.getContent(c,{asBinary:!0,expectedType:"image",maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,frameId:r.windowId,resourceReferrer:r.resourceReferrer,acceptHeaders:r.acceptHeaders})).data}catch(e){}}if(l&&h==gf)e.remove();else{if(!nf.filter((e=>h.startsWith(e))).length){const n=h.startsWith(rf);if(i&&p&&r.groupDuplicateImages&&!n&&Fm.getContentSize(h)<vf)if(kf.replaceImageSource(e,bf+d,r)){a.set(d,{content:h,url:u});const t=Bm.parse(e.getAttribute("style"),{context:"declarationList"});o.set(e,t)}else e.setAttribute(t,h);else e.setAttribute(t,h)}}}}}})))}static async processXLinks(e,t,n,r,a){let o="xlink:href";await Promise.all(Array.from(e).map((async e=>{let t=e.getAttribute(o);null==t&&(o="href",t=e.getAttribute(o)),r.saveOriginalURLs&&!Gf(t)&&e.setAttribute("data-sf-original-href",t);let s=Ff(t);if(Jf(s)&&!Qf(s)){e.setAttribute(o,af);try{s=Fm.resolveURL(s,n)}catch(e){}if(Zf(s)){const r=t.match(yf);if(t.startsWith(n+"#"))e.setAttribute(o,r[0]);else{const t=await a.addURL(s,{expectedType:"image"}),n=Fm.parseSVGContent(t.content);if(r&&r[0]){let t;try{t=n.querySelector(r[0])}catch(e){}t&&(e.setAttribute(o,r[0]),e.parentElement.insertBefore(t,e.parentElement.firstChild))}else{const t=await a.addURL(s,{expectedType:"image"});e.setAttribute(o,"data:image/svg+xml,"+t)}}}}else s==r.url&&e.setAttribute(o,t.substring(s.length))})))}static async processSrcset(e,t,n,r){await Promise.all(Array.from(e).map((async e=>{const a=e.getAttribute(t),o=Fm.parseSrcset(a);e.setAttribute("data-sf-original-srcset",a);const s=await Promise.all(o.map((async e=>{let t=Ff(e.url);if(Qf(t))return t+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(Jf(t)){try{t=Fm.resolveURL(t,n)}catch(e){}if(Zf(t)){const{content:n}=await r.addURL(t,{asBinary:!0,expectedType:"image"});return nf.filter((e=>n.startsWith(e))).length?"":n+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute(t,s.join(", "))})))}static replaceImageSource(e,t,n){if(e.getAttribute(Fm.IMAGE_ATTRIBUTE_NAME)){const r=n.images[Number(e.getAttribute(Fm.IMAGE_ATTRIBUTE_NAME))];if(r&&r.replaceable){e.setAttribute("src",`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="${r.size.pxWidth}" height="${r.size.pxHeight}"><rect fill-opacity="0"/></svg>`);const n={};return("content"==r.objectFit||"cover"==r.objectFit)&&r.objectFit&&(n["background-size"]=r.objectFit),r.objectPosition&&(n["background-position"]=r.objectPosition),r.backgroundColor&&(n["background-color"]=r.backgroundColor),kf.setBackgroundImage(e,"var("+t+")",n),e.removeAttribute(Fm.IMAGE_ATTRIBUTE_NAME),!0}}}}const wf="blob:",xf=/^https?:\/\//,Sf=/^file:\/\//,Ef=/^https?:\/\/+\s*$/,Af=/^(https?:\/\/|file:\/\/|blob:).+/,Tf=/(url\s*\(\s*'(.*?)'\s*\))|(url\s*\(\s*"(.*?)"\s*\))|(url\s*\(\s*(.*?)\s*\))/gi,Cf=/^url\s*\(\s*'(.*?)'\s*\)$/i,Rf=/^url\s*\(\s*"(.*?)"\s*\)$/i,_f=/^url\s*\(\s*(.*?)\s*\)$/i,If=/(@import\s*url\s*\(\s*'(.*?)'\s*\)\s*(.*?)(;|$|}))|(@import\s*url\s*\(\s*"(.*?)"\s*\)\s*(.*?)(;|$|}))|(@import\s*url\s*\(\s*(.*?)\s*\)\s*(.*?)(;|$|}))|(@import\s*'(.*?)'\s*(.*?)(;|$|}))|(@import\s*"(.*?)"\s*(.*?)(;|$|}))|(@import\s*(.*?)\s*(.*?)(;|$|}))/gi,Lf=/@import\s*url\s*\(\s*'(.*?)'\s*\)\s*(.*?)(;|$|})/i,Pf=/@import\s*url\s*\(\s*"(.*?)"\s*\)\s*(.*?)(;|$|})/i,Nf=/@import\s*url\s*\(\s*(.*?)\s*\)\s*(.*?)(;|$|})/i,zf=/@import\s*'(.*?)'\s*(.*?)(;|$|})/i,Mf=/@import\s*"(.*?)"\s*(.*?)(;|$|})/i,Of=/@import\s*(.*?)\s*(.*?)(;|$|})/i,Df=/([{}()^$&.*?/+|[\\\\]|\]|-)/g;function Uf(e,t,n){return n.rootDocument&&n.updatedResources[e]?(n.updatedResources[e].retrieved=!0,n.updatedResources[e].content):t.data||""}function Ff(e){return!e||e.startsWith(mf)?e:e.split("#")[0]}function Bf(e){let t="";try{t=Bm.generate(e)}catch(e){}return t}function qf(e,t="utf-8"){const n=jf(e);return!n||n==t.toLowerCase()}function jf(e){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}async function Hf(e,t,n,r,a){let o,s;if(e){const i="{\\s*"+t.replace(/\W|_/g,"[$&]")+"\\s*}";let l=new RegExp(i+"\\[\\d+(ch)?\\]","g");if(e.match(l)){const t=e.match(l)[0];t.match(/\[(\d+)\]$/)?(o=Number(t.match(/\[(\d+)\]$/)[1]),(isNaN(o)||o<=0)&&(o=null)):(s=Number(t.match(/\[(\d+)ch\]$/)[1]),(isNaN(s)||s<=0)&&(s=null))}else l=new RegExp(i,"g");if(e.match(l)){let t=await n();return r||(t=t.replace(/\/+/g,a)),o?t=await Fm.truncateText(t,o):s&&(t=t.substring(0,s)),e.replace(l,t)}}return e}function Wf(e){return new RegExp(e.replace(Df,"\\$1"),"gi")}function $f(e,t){const n=e.match(Tf)||[];return t?[...new Dm(n)]:n}function Vf(e){return(e=e.filter((e=>e.href!=af))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function Yf(e){const t=e.match(Cf)||e.match(Rf)||e.match(_f);return t&&t[1]}function Gf(e){return e&&(e.startsWith(mf)||e.startsWith(wf))}function Kf(e){return e.replace(/-sf-url-original\("(.*?)"\)/g,"/* original URL: $1 */")}function Qf(e){return e&&(e.startsWith(mf)||e==ff)}function Jf(e){return e&&!e.match(Ef)}function Zf(e){return Jf(e)&&(e.match(xf)||e.match(Sf)||e.startsWith(wf))&&e.match(Af)}function Xf(e){try{return e.replace(/\/\*(.|\s)*?\*\//g,"")}catch(t){let n,r;do{n=e.indexOf("/*"),r=e.indexOf("*/",n+2),-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substr(r+2))}while(-1!=n&&-1!=r);return e}}const eg={discarded:{"HTML bytes":0,"hidden elements":0,"HTML imports":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0},processed:{"HTML bytes":0,"hidden elements":0,"HTML imports":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0}};class tg{constructor(e){this.options=e,e.displayStats&&(this.data=JSON.parse(JSON.stringify(eg)))}set(e,t,n){this.options.displayStats&&(this.data[e][t]=n)}add(e,t,n){this.options.displayStats&&(this.data[e][t]+=n)}addAll(e){this.options.displayStats&&(Object.keys(this.data.discarded).forEach((t=>this.add("discarded",t,e.stats.discarded[t]||0))),Object.keys(this.data.processed).forEach((t=>this.add("processed",t,e.stats.processed[t]||0))))}}const ng=1048576,rg=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],ag=globalThis.URL,og=globalThis.DOMParser,sg=globalThis.Blob,ig=globalThis.FileReader,lg=(e,t)=>globalThis.fetch(e,t),cg=globalThis.crypto,ug=globalThis.TextDecoder,hg=globalThis.TextEncoder;function dg(e){return(e=e||{}).fetch=e.fetch||lg,e.frameFetch=e.frameFetch||e.fetch||lg,{getContent:async function(t,n){let r;const a=e.fetch,o=e.frameFetch;if(n.blockMixedContent&&/^https:/i.test(n.baseURI)&&!/^https:/i.test(t))return{data:n.asBinary?"data:null;base64,":"",resourceURL:t};try{const e=n.acceptHeaders?n.acceptHeaders[n.expectedType]:"*/*";if(n.frameId)try{r=await o(t,{frameId:n.frameId,referrer:n.resourceReferrer,headers:{accept:e}})}catch(n){r=await a(t,{headers:{accept:e}})}else r=await a(t,{referrer:n.resourceReferrer,headers:{accept:e}})}catch(e){return{data:n.asBinary?"data:null;base64,":"",resourceURL:t}}let s;try{s=await r.arrayBuffer()}catch(e){return{data:n.asBinary?"data:null;base64,":"",resourceURL:t}}t=r.url||t;let i,l="";try{const e=new Wd(r.headers.get("content-type"));l=e.type+"/"+e.subtype,i=e.parameters.get("charset")}catch(e){}l||(l=function(e,t){if("image"==e){if(n([255,255,255,255],[0,0,1,0]))return"image/x-icon";if(n([255,255,255,255],[0,0,2,0]))return"image/x-icon";if(n([255,255],[78,77]))return"image/bmp";if(n([255,255,255,255,255,255],[71,73,70,56,57,97]))return"image/gif";if(n([255,255,255,255,255,255],[71,73,70,56,59,97]))return"image/gif";if(n([255,255,255,255,0,0,0,0,255,255,255,255,255,255],[82,73,70,70,0,0,0,0,87,69,66,80,86,80]))return"image/webp";if(n([255,255,255,255,255,255,255,255],[137,80,78,71,13,10,26,10]))return"image/png";if(n([255,255,255],[255,216,255]))return"image/jpeg"}if("font"==e){if(n([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,80]))return"application/vnd.ms-fontobject";if(n([255,255,255,255],[0,1,0,0]))return"font/ttf";if(n([255,255,255,255],[79,84,84,79]))return"font/otf";if(n([255,255,255,255],[116,116,99,102]))return"font/collection";if(n([255,255,255,255],[119,79,70,70]))return"font/woff";if(n([255,255,255,255],[119,79,70,50]))return"font/woff2"}function n(e,n){let r=!0,a=0;if(t.byteLength>=n.length){const o=new Uint8Array(t,0,e.length);for(a=0;a<e.length&&r;a++)r=r&&(o[a]&e[a])==n[a];return r}}}(n.expectedType,s));!i&&n.charset&&(i=n.charset);if(n.asBinary)try{if(n.maxResourceSizeEnabled&&s.byteLength>n.maxResourceSize*ng)return{data:"data:null;base64,",resourceURL:t};{const e=new ig;e.readAsDataURL(new sg([s],{type:l+(n.charset?";charset="+n.charset:"")}));return{data:await new Promise(((t,n)=>{e.addEventListener("load",(()=>t(e.result)),!1),e.addEventListener("error",n,!1)})),resourceURL:t}}}catch(e){return{data:"data:null;base64,",resourceURL:t}}else{if(r.status>=400||n.validateTextContentType&&l&&!l.startsWith("text/"))return{data:"",resourceURL:t};if(i||(i="utf-8"),n.maxResourceSizeEnabled&&s.byteLength>n.maxResourceSize*ng)return{data:"",resourceURL:t,charset:i};try{return{data:new ug(i).decode(s),resourceURL:t,charset:i}}catch(e){try{return i="utf-8",{data:new ug(i).decode(s),resourceURL:t,charset:i}}catch(e){return{data:"",resourceURL:t,charset:i}}}}},parseURL:(e,t)=>void 0===t?new ag(e):new ag(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getValidFilename:(e,t=rg,n="_")=>(t.forEach((t=>e=e.replace(new RegExp("["+t+"]+","g"),n))),e=e.replace(/\.\.\//g,"").replace(/^\/+/,"").replace(/\/+/g,"/").replace(/\/$/,"").replace(/\.$/,"").replace(/\.\//g,"."+n).replace(/\/\./g,"/"+n)),parseDocContent(e,t){const n=(new og).parseFromString(e,"text/html");n.head||n.documentElement.insertBefore(n.createElement("HEAD"),n.body);let r=n.querySelector("base");return r&&r.getAttribute("href")||(r&&r.remove(),r=n.createElement("base"),r.setAttribute("href",t),n.head.insertBefore(r,n.head.firstChild)),n},parseXMLContent:e=>(new og).parseFromString(e,"text/xml"),parseSVGContent(e){const t=(new og).parseFromString(e,"image/svg+xml");return t.querySelector("parsererror")?(new og).parseFromString(e,"text/html"):t},async digest(e,t){try{return function(e){const t=[],n=new DataView(e);for(let e=0;e<n.byteLength;e+=4){const r="00000000",a=(r+n.getUint32(e).toString(16)).slice(-r.length);t.push(a)}return t.join("")}(await cg.subtle.digest(e,new hg("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new sg([e]).size,truncateText(e,t){const n=new sg([e]),r=new ig;return r.readAsText(n.slice(0,t)),new Promise(((n,a)=>{r.addEventListener("load",(()=>{e.startsWith(r.result)?n(r.result):this.truncateText(e,t-1).then(n).catch(a)}),!1),r.addEventListener("error",a,!1)}))},minifyHTML:(e,t)=>Am(e,t),minifyCSSRules:(e,t,n)=>im(e,t,n),removeUnusedFonts:(e,t,n,r)=>Sp(e,t,n,r),removeAlternativeFonts:(e,t,n,r)=>lp(e,t,n,r),getMediaAllInfo:(e,t,n)=>Wp(e,t,n),compressCSS:(e,t)=>Qn(e,t),minifyMedias:e=>nm(e),removeAlternativeImages:e=>dm(e),parseSrcset:e=>Fd(e),preProcessDoc:(e,t,n)=>G(e,t,n),postProcessDoc(e,t){ee(e,t)},serialize:(e,t)=>Pm(e,t),removeQuotes:e=>ae(e),ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:v,WIN_ID_ATTRIBUTE_NAME:T,REMOVED_CONTENT_ATTRIBUTE_NAME:k,HIDDEN_CONTENT_ATTRIBUTE_NAME:w,HIDDEN_FRAME_ATTRIBUTE_NAME:S,IMAGE_ATTRIBUTE_NAME:C,POSTER_ATTRIBUTE_NAME:R,CANVAS_ATTRIBUTE_NAME:_,HTML_IMPORT_ATTRIBUTE_NAME:I,STYLE_ATTRIBUTE_NAME:L,INPUT_VALUE_ATTRIBUTE_NAME:P,SHADOW_ROOT_ATTRIBUTE_NAME:A,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:E,STYLESHEET_ATTRIBUTE_NAME:z,SELECTED_CONTENT_ATTRIBUTE_NAME:O,COMMENT_HEADER:H,COMMENT_HEADER_LEGACY:W,SINGLE_FILE_UI_ELEMENT_CLASS:$}}function pg(t){e.SingleFile=function(...e){return[Fm,Bm]=e,qm}(dg(t),Ud)}e.SingleFile=void 0,e.getPageData=async function(t={},n,r=globalThis.document,a=globalThis){const o=ot;let s;if(pg(n),r&&a){Y(r);const e=[];if(!t.saveRawPage){if(!t.removeFrames&&o&&globalThis.frames&&globalThis.frames.length){let n;n=t.loadDeferredImages?new Promise((e=>globalThis.setTimeout((()=>e(o.getAsync(t))),t.loadDeferredImagesMaxIdleTime-o.TIMEOUT_INIT_REQUEST_MESSAGE))):o.getAsync(t),e.push(n)}t.loadDeferredImages&&e.push(be(t))}[t.frames]=await Promise.all(e),s=t.frames&&t.frames.sessionId}t.doc=r,t.win=a,t.insertCanonicalLink=!0,t.onprogress=e=>{e.type===e.RESOURCES_INITIALIZED&&r&&a&&t.loadDeferredImages&&ve(t)};const i=new e.SingleFile(t);return await i.run(),s&&o.cleanup(s),await i.getPageData()},e.helper=ie,e.init=pg,e.modules=Om,e.processors=ct,e.vendor=$d,Object.defineProperty(e,"__esModule",{value:!0})}));
|