| 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=>globalThis.dispatchEvent(e),o=globalThis.CustomEvent,s=globalThis.document,i=globalThis.HTMLDocument,l=globalThis.FileReader,c=globalThis.Blob,u=[];if(s instanceof i&&r&&r.runtime&&r.runtime.getURL){h="single-file-new-font-face",d=e=>{const t=e.detail;u.find((e=>JSON.stringify(e)==JSON.stringify(t)))||u.push(e.detail)},globalThis.addEventListener(h,d,p);let e=s.createElement("script");e.textContent="("+function(){const e=globalThis.console,t=e=>globalThis.dispatchEvent(e),n=globalThis.CustomEvent,r=e&&e.warn&&((...t)=>e.warn(...t))||(()=>{}),a="single-file-new-font-face",o={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 e=globalThis.FontFace;let s;globalThis.FontFace=function(){s||(r("SingleFile is hooking the FontFace constructor to get font URLs."),s=!0);const i={};i["font-family"]=arguments[0],i.src=arguments[1];const u=arguments[2];if(u&&Object.keys(u).forEach((e=>{o[e]&&(i[o[e]]=u[e])})),i.src instanceof ArrayBuffer){const e=new l;e.readAsDataURL(new c([i.src])),e.addEventListener("load",(()=>{i.src="url("+e.result+")",t(new n(a,{detail:i}))}))}else t(new n(a,{detail:i}));return new e(...arguments)},globalThis.FontFace.toString=function(){return"function FontFace() { [native code] }"}}}.toString()+")()",(s.documentElement||s).appendChild(e),e.remove(),e=s.createElement("script"),e.src=r.runtime.getURL("/dist/web/hooks/hooks-frames-web.js"),e.async=!1,(s.documentElement||s).appendChild(e),e.remove()}var h,d,p;function m(){return u}function f(e){e.loadDeferredImagesBlockCookies&&a(new o("single-file-block-cookies-start")),e.loadDeferredImagesBlockStorage&&a(new o("single-file-block-storage-start")),e.loadDeferredImagesKeepZoomLevel?a(new o("single-file-load-deferred-images-keep-zoom-level-start")):a(new o("single-file-load-deferred-images-start"))}function g(e){e.loadDeferredImagesBlockCookies&&a(new o("single-file-block-cookies-end")),e.loadDeferredImagesBlockStorage&&a(new o("single-file-block-storage-end")),e.loadDeferredImagesKeepZoomLevel?a(new o("single-file-load-deferred-images-keep-zoom-level-end")):a(new o("single-file-load-deferred-images-end"))}function y(e){e.loadDeferredImagesKeepZoomLevel?a(new o("single-file-load-deferred-images-keep-zoom-level-reset")):a(new o("single-file-load-deferred-images-reset"))}var b=Object.freeze({__proto__:null,getFontsData:m,loadDeferredImagesStart:f,loadDeferredImagesEnd:g,loadDeferredImagesResetZoomLevel:y,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:n});const v=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function k(e){return e.replace(v,((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 w=Object.freeze({__proto__:null,process:k});const x="single-file-on-before-capture",S="single-file-on-after-capture",E="data-single-file-removed-content",A="data-single-file-hidden-content",T="data-single-file-kept-content",C="data-single-file-hidden-frame",R="data-single-file-preserved-space-element",_="data-single-file-shadow-root-element",I="data-single-file-win-id",L="data-single-file-image",P="data-single-file-poster",N="data-single-file-canvas",z="data-single-file-import",M="data-single-file-input-value",D="data-single-file-lazy-loaded-src",O="data-single-file-stylesheet",U="data-single-file-disabled-noscript",F="data-single-file-selected-content",B="data-single-file-async-script",q="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",j=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD"],H=/^'(.*?)'$/,W=/^"(.*?)"$/,V={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},$="Page saved with SingleFile",Y="Archive processed by SingleFile",G="single-file-ui-element",K=(e,t,n)=>globalThis.addEventListener(e,t,n);function Q(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function J(e,t,n){let r;return e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(U,e.textContent),e.textContent=""})),Q(e),e.head&&e.head.querySelectorAll(q).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+q+", html > body > "+q);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))})),r=t&&e.documentElement?Z(t,e,e.documentElement,n):{canvases:[],images:[],posters:[],usedFonts:[],shadowRoots:[],imports:[],markedElements:[]},{canvases:r.canvases,fonts:m(),stylesheets:re(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 Z(e,t,n,r,a={usedFonts:new Map,canvases:[],images:[],posters:[],shadowRoots:[],imports:[],markedElements:[]},o){return Array.from(n.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).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"))&&j.includes(n.tagName)||n.closest("details"),i||(s=o||function(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)}(n,l),s&&(n.setAttribute(A,""),a.markedElements.push(n)))),!s)){if(r.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(n.setAttribute(R,""),a.markedElements.push(n))}r.removeUnusedFonts&&(X(l,r,a.usedFonts),X(e.getComputedStyle(n,":first-letter"),r,a.usedFonts),X(e.getComputedStyle(n,":before"),r,a.usedFonts),X(e.getComputedStyle(n,":after"),r,a.usedFonts))}!function(e,t,n,r,a,o,s){if("CANVAS"==n.tagName)try{const t=ae(e,n,s);a.canvases.push({dataURI:n.toDataURL("image/png",""),width:t.width,height:t.height}),n.setAttribute(N,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(D)||n.currentSrc};if(a.images.push(t),n.setAttribute(L,a.images.length-1),a.markedElements.push(n),n.removeAttribute(D),s=s||e.getComputedStyle(n)){t.size=ae(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(P,a.posters.length-1),a.markedElements.push(n)}catch(e){}}"IFRAME"==n.tagName&&o&&r.removeHiddenElements&&(n.setAttribute(C,""),a.markedElements.push(n));"LINK"==n.tagName&&n.import&&n.import.documentElement&&(a.imports.push({content:se(n.import)}),n.setAttribute(z,a.imports.length-1),a.markedElements.push(n));"INPUT"==n.tagName&&("password"!=n.type&&(n.setAttribute(M,n.value),a.markedElements.push(n)),"radio"!=n.type&&"checkbox"!=n.type||(n.setAttribute(M,n.checked),a.markedElements.push(n)));"TEXTAREA"==n.tagName&&(n.setAttribute(M,n.value),a.markedElements.push(n));"SELECT"==n.tagName&&n.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(M,""),a.markedElements.push(e))}));"SCRIPT"==n.tagName&&(n.async&&""!=n.getAttribute("async")&&"async"!=n.getAttribute("async")&&(n.setAttribute(B,""),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)&&ee(n);if(c&&!n.classList.contains(G)){const o={};n.setAttribute(_,a.shadowRoots.length),a.markedElements.push(n),a.shadowRoots.push(o),Z(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"))))}Z(e,t,n,r,a,s),!r.autoSaveExternalSave&&r.removeHiddenElements&&o&&(i||""==n.getAttribute(T)?n.parentElement&&(n.parentElement.setAttribute(T,""),a.markedElements.push(n.parentElement)):s&&(n.setAttribute(E,""),a.markedElements.push(n)))})),a}function X(e,t,n){if(e){const r=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((a=>{if(a=te(a),!t.loadedFonts||t.loadedFonts.find((e=>te(e.family)==a&&e.style==r))){const t=le(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 ee(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 te(e=""){return ie(k(e.trim())).toLowerCase()}function ne(e,t){if(e.querySelectorAll("[data-single-file-disabled-noscript]").forEach((e=>{e.textContent=e.getAttribute(U),e.removeAttribute(U)})),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=[E,C,A,R,L,P,N,M,_,z,O,B];t=e.querySelectorAll(n.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(E),e.removeAttribute(A),e.removeAttribute(T),e.removeAttribute(C),e.removeAttribute(R),e.removeAttribute(L),e.removeAttribute(P),e.removeAttribute(N),e.removeAttribute(M),e.removeAttribute(_),e.removeAttribute(z),e.removeAttribute(O),e.removeAttribute(B)}))}function re(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(O,r),t[r]=Array.from(n.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function ae(e,t,n){let r=t.naturalWidth,a=t.naturalHeight;if(!r&&!a){let o,s,i,l,c,u,h,d,p=!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"),p=t.clientWidth!=r,e?t.style.setProperty("box-sizing",e,n):t.style.removeProperty("box-sizing")}o=oe("padding-left",n),s=oe("padding-right",n),i=oe("padding-top",n),l=oe("padding-bottom",n),p?(c=oe("border-left-width",n),u=oe("border-right-width",n),h=oe("border-top-width",n),d=oe("border-bottom-width",n)):c=u=h=d=0,r=Math.max(0,t.clientWidth-o-s-c-u),a=Math.max(0,t.clientHeight-i-l-h-d)}return{pxWidth:r,pxHeight:a}}function oe(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function se(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 ie(e){return(e=e.match(H)?e.replace(H,"$1"):e.replace(W,"$1")).trim()}function le(e){return V[e.toLowerCase().trim()]||e}function ce(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?ce(t):t)),[])}var ue=Object.freeze({__proto__:null,initUserScriptHandler:function(){K("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),n=new Promise((t=>K(e+"-response",t)));(e=>{globalThis.dispatchEvent(e)})(t),t.defaultPrevented&&await n}))},initDoc:Q,preProcessDoc:J,postProcessDoc:ne,serialize:se,removeQuotes:ie,flatten:ce,getFontWeight:le,normalizeFontFamily:te,getShadowRoot:ee,ON_BEFORE_CAPTURE_EVENT_NAME:x,ON_AFTER_CAPTURE_EVENT_NAME:S,WIN_ID_ATTRIBUTE_NAME:I,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:R,REMOVED_CONTENT_ATTRIBUTE_NAME:E,HIDDEN_CONTENT_ATTRIBUTE_NAME:A,HIDDEN_FRAME_ATTRIBUTE_NAME:C,IMAGE_ATTRIBUTE_NAME:L,POSTER_ATTRIBUTE_NAME:P,CANVAS_ATTRIBUTE_NAME:N,INPUT_VALUE_ATTRIBUTE_NAME:M,SHADOW_ROOT_ATTRIBUTE_NAME:_,HTML_IMPORT_ATTRIBUTE_NAME:z,LAZY_SRC_ATTRIBUTE_NAME:D,STYLESHEET_ATTRIBUTE_NAME:O,SELECTED_CONTENT_ATTRIBUTE_NAME:F,ASYNC_SCRIPT_ATTRIBUTE_NAME:B,COMMENT_HEADER:$,COMMENT_HEADER_LEGACY:Y,SINGLE_FILE_UI_ELEMENT_CLASS:G});const he=D,de=G,pe="attributes",me=globalThis.browser,fe=globalThis.document,ge=globalThis.MutationObserver,ye=(e,t,n)=>globalThis.addEventListener(e,t,n),be=(e,t,n)=>globalThis.removeEventListener(e,t,n),ve=new Map;async function ke(e){if(fe.documentElement){ve.clear();const r=Math.max(fe.documentElement.scrollHeight-1.5*fe.documentElement.clientHeight,0),a=Math.max(fe.documentElement.scrollWidth-1.5*fe.documentElement.clientWidth,0);if(globalThis.scrollY<=r&&globalThis.scrollX<=a)return function(e){return new Promise((async r=>{let a;const o=new Set,s=new ge((async t=>{if((t=t.filter((e=>e.type==pe))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(he,e.target.src),e.target.addEventListener("load",l)),"src"==e.attributeName||"srcset"==e.attributeName||"SOURCE"==e.target.tagName)return!e.target.classList||!e.target.classList.contains(de)})).length&&(a=!0,await Se(s,e,h),o.size||await xe(s,e,h))}}));async function i(t){await Ae("idleTimeout",(async()=>{a?(Te("idleTimeout"),await i(Math.max(500,t/2))):(Te("loadTimeout"),Te("maxTimeout"),Ee(s,e,h))}),t)}function l(e){const t=e.target;t.removeAttribute(he),t.removeEventListener("load",l)}async function c(t){a=!0,await Se(s,e,h),await xe(s,e,h),t.detail&&o.add(t.detail)}async function u(t){await Se(s,e,h),await xe(s,e,h),o.delete(t.detail),o.size||await xe(s,e,h)}function h(e){s.disconnect(),be(t,c),be(n,u),r(e)}await i(2*e.loadDeferredImagesMaxIdleTime),await Se(s,e,h),s.observe(fe,{subtree:!0,childList:!0,attributes:!0}),ye(t,c),ye(n,u),f(e)}))}(e)}}function we(e){y(e)}async function xe(e,t,n){await Ae("loadTimeout",(()=>Ee(e,t,n)),t.loadDeferredImagesMaxIdleTime)}async function Se(e,t,n){await Ae("maxTimeout",(async()=>{await Te("loadTimeout"),await Ee(e,t,n)}),10*t.loadDeferredImagesMaxIdleTime)}async function Ee(e,t,n){await Te("idleTimeout"),g(t),await Ae("endTimeout",(async()=>{await Te("maxTimeout"),n()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Ae(e,t,n){if(me&&me.runtime&&me.runtime.sendMessage){if(!ve.get(e)||!ve.get(e).pending){const r={callback:t,pending:!0};ve.set(e,r),await me.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:n}),r.pending=!1}}else{const r=ve.get(e);r&&globalThis.clearTimeout(r),ve.set(e,t),globalThis.setTimeout(t,n)}}async function Te(e){if(me&&me.runtime&&me.runtime.sendMessage)await me.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e});else{const t=ve.get(e);ve.delete(e),t&&globalThis.clearTimeout(t)}}me&&me.runtime&&me.runtime.onMessage&&me.runtime.onMessage.addListener&&me.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ve.get(e.type);t&&(ve.delete(e.type),t.callback())}}));var Ce=Object.freeze({__proto__:null,process:ke,resetZoomLevel:we});const Re={ON_BEFORE_CAPTURE_EVENT_NAME:x,ON_AFTER_CAPTURE_EVENT_NAME:S,WIN_ID_ATTRIBUTE_NAME:I,preProcessDoc:J,serialize:se,postProcessDoc:ne,getShadowRoot:ee},_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=".",De=globalThis.window==globalThis.top,Oe=globalThis.browser,Ue=globalThis.top,Fe=globalThis.MessageChannel,Be=globalThis.document,qe=new Map;let je;function He(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function We(e){const t=e.sessionId,n=globalThis._singleFile_waitForUserScript;De||(je=globalThis.frameId=e.windowId),Ye(Be,e.options,je,t),De||(e.options.userScriptEnabled&&n&&await n(Re.ON_BEFORE_CAPTURE_EVENT_NAME),Je({frames:[Xe(Be,globalThis,je,e.options)],sessionId:t,requestedFrameId:Be.documentElement.dataset.requestedFrameId&&je}),e.options.userScriptEnabled&&n&&await n(Re.ON_AFTER_CAPTURE_EVENT_NAME),delete Be.documentElement.dataset.requestedFrameId)}function Ve(e){const t=e.sessionId;Qe(et(Be),e.windowId,t)}function $e(e){e.frames.forEach((t=>Ge("responseTimeouts",e.sessionId,t.windowId)));const t=qe.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(Me).length-e.windowId.split(Me).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function Ye(e,t,n,r){const a=et(e);!function(e,t,n,r,a){const o=[];let s;qe.get(a)?s=qe.get(a).requestTimeouts:(s={},qe.set(a,{requestTimeouts:s}));t.forEach(((e,t)=>{const n=r+Me+t;e.setAttribute(Re.WIN_ID_ATTRIBUTE_NAME,n),o.push({windowId:n})})),Je({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),t.forEach(((e,t)=>{const o=r+Me+t;try{Ze(e.contentWindow,{method:Le,windowId:o,sessionId:a,options:n})}catch(e){}s[o]=globalThis.setTimeout((()=>Je({frames:[{windowId:o,processed:!0}],sessionId:a})),750)})),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+Me+t;let i;try{i=e.contentDocument}catch(e){}if(i)try{const t=e.contentWindow;t.stop(),Ge("requestTimeouts",a,s),Ye(i,n,s,a),o.push(Xe(i,t,s,n))}catch(e){o.push({windowId:s,processed:!0})}})),Je({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r)}function Ge(e,t,n){const r=qe.get(t);if(r&&r[e]){const t=r[e][n];t&&(globalThis.clearTimeout(t),delete r[e][n])}}function Ke(e,t){const n=qe.get(e);n&&n.responseTimeouts&&(n.responseTimeouts[t]=globalThis.setTimeout((()=>Je({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function Qe(e,t,n){e.forEach(((e,r)=>{const a=t+Me+r;e.removeAttribute(Re.WIN_ID_ATTRIBUTE_NAME);try{Ze(e.contentWindow,{method:Ne,windowId:a,sessionId:n})}catch(e){}})),e.forEach(((e,r)=>{const a=t+Me+r;let o;try{o=e.contentDocument}catch(e){}if(o)try{Qe(et(o),a,n)}catch(e){}}))}function Je(e){e.method=ze;try{Ue.singlefile.processors.frameTree.initResponse(e)}catch(t){Ze(Ue,e,!0)}}function Ze(e,t,n){if(e==Ue&&Oe&&Oe.runtime&&Oe.runtime.sendMessage)Oe.runtime.sendMessage(t);else if(n){const n=new Fe;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 Xe(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 et(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&&(je="0",Oe&&Oe.runtime&&Oe.runtime.onMessage&&Oe.runtime.onMessage.addListener&&Oe.runtime.onMessage.addListener((e=>e.method==ze?($e(e),Promise.resolve({})):e.method==Pe?(Ge("requestTimeouts",e.sessionId,e.windowId),Ke(e.sessionId,e.windowId),Promise.resolve({})):void 0))),((e,t,n)=>{globalThis.addEventListener(e,t,n)})("message",(async e=>{if("string"==typeof e.data&&e.data.startsWith(_e)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(_e.length));if(t.method==Le)e.source&&Ze(e.source,{method:Pe,windowId:t.windowId,sessionId:t.sessionId}),De||(globalThis.stop(),t.options.loadDeferredImages&&ke(t.options),await We(t));else if(t.method==Pe)Ge("requestTimeouts",t.sessionId,t.windowId),Ke(t.sessionId,t.windowId);else if(t.method==Ne)Ve(t);else if(t.method==ze&&qe.get(t.sessionId)){e.ports[0].onmessage=e=>$e(e.data)}}}),!0);var tt=Object.freeze({__proto__:null,getAsync:function(e){const t=He();return e=JSON.parse(JSON.stringify(e)),new Promise((n=>{qe.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,n(e)}}),We({windowId:je,sessionId:t,options:e})}))},getSync:function(e){const t=He();e=JSON.parse(JSON.stringify(e)),qe.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,n=globalThis._singleFile_waitForUserScript;De||(je=globalThis.frameId=e.windowId);Ye(Be,e.options,je,t),De||(e.options.userScriptEnabled&&n&&n(Re.ON_BEFORE_CAPTURE_EVENT_NAME),Je({frames:[Xe(Be,globalThis,je,e.options)],sessionId:t,requestedFrameId:Be.documentElement.dataset.requestedFrameId&&je}),e.options.userScriptEnabled&&n&&n(Re.ON_AFTER_CAPTURE_EVENT_NAME),delete Be.documentElement.dataset.requestedFrameId)}({windowId:je,sessionId:t,options:e});const n=qe.get(t).frames;return n.sessionId=t,n},cleanup:function(e){qe.delete(e),Ve({windowId:je,sessionId:e,options:{sessionId:e}})},initResponse:$e,TIMEOUT_INIT_REQUEST_MESSAGE:750});const nt=globalThis.browser,rt=globalThis.document;if(rt instanceof globalThis.HTMLDocument){const e=rt.createElement("script");e.async=!1,nt&&nt.runtime&&nt.runtime.getURL&&(e.src=nt.runtime.getURL("/dist/web/hooks/hooks-web.js"),e.async=!1),(rt.documentElement||rt).appendChild(e),e.remove()}var at=Object.freeze({__proto__:null}),ot=Object.freeze({__proto__:null,frameTree:tt,hooks:at,hooksFrames:b,lazy:Ce});const st=/^'(.*?)'$/,it=/^"(.*?)"$/,lt=["inherit","initial","unset"],ct=["caption","icon","menu","message-box","small-caption","status-bar"],ut=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],ht=["normal","italic","oblique"],dt=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],pt=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"],mt={splitBySpaces:function(e){return kt(e,[" ","\n","\t"])},split:kt,splitByCommas:function(e){return kt(e,[","],{last:!0})}},ft={isSize:function(e){return!isNaN(parseFloat(e))||-1!==e.indexOf("/")||-1!==pt.indexOf(e)}},gt="[parse-css-font] ";function yt(e){if("string"!=typeof e)throw new TypeError(gt+"Expected a string.");if(""===e)throw bt("Cannot parse an empty string.");if(-1!==ct.indexOf(e))return{system:e};const t={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let n=!1;const r=mt.splitBySpaces(e);let a=r.shift();for(;a;a=r.shift())if("normal"!==a&&-1===lt.indexOf(a))if(-1===ut.indexOf(a))if(-1===ht.indexOf(a))if(-1===dt.indexOf(a)){if(ft.isSize(a)){const e=mt.split(a,["/"]);if(t.size=e[0],e[1]?t.lineHeight=vt(e[1]):"/"===r[0]&&(r.shift(),t.lineHeight=vt(r.shift())),!r.length)throw bt("Missing required font-family.");return t.family=mt.splitByCommas(r.join(" ")).map(wt),t}if("normal"!==t.variant)throw bt("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 bt("Missing required font-size.")}function bt(e){return new Error(gt+e)}function vt(e){const t=parseFloat(e);return t.toString()===e?t:e}function kt(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 wt(e){return(e=e.match(st)?e.replace(st,"$1"):e.replace(it,"$1")).trim()}var xt=Object.freeze({__proto__:null,parse:yt});function St(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 Et(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=St(r.value,r.sourceIndex)),n.push(Array.isArray(r.nodes)?new Tt(r):new Ct(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 At(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 Ct({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 Tt({type:"media-query",value:r.trim(),sourceIndex:n+o.length,nodes:Et(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 Tt({type:"media-query",value:o.trim(),sourceIndex:n+s.length,nodes:Et(o,n),before:s,after:/(\s*)$/.exec(o)[1]})),t}function Tt(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 Ct(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}Tt.prototype=Object.create(Ct.prototype),Tt.constructor=Ct,Tt.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},Tt.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 Rt=Object.freeze({__proto__:null,parseMediaList:At});const _t="___PRESERVED_TOKEN_",It={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},Lt=/url\(\s*(["']?)data:/g,Pt=/\s+/g,Nt=/\n/g;const zt=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const Mt=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,Dt=/(^\s|\s$)/g;const Ot=/("([^\\"]|\\.|\\)*")|('([^\\']|\\.|\\)*')/g,Ut=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,Ft=/\r\n/g,Bt=/[\r\n]/g,qt=/@variables\s*\{\s*([^}]+)\s*\}/g,jt=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,Ht=/var\s*\(\s*([^)]+)\s*\)/g,Wt=/calc\(([^;}]*)\)/g,Vt=/(^\s*|\s*$)/g,$t=/\( /g,Yt=/ \)/g,Gt=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,Kt=/(^|\})(([^{:])+:)+([^{]*{)/g,Qt=/\s+([!{;:>+()\],])/g,Jt=/([^\\])\s+([}])/g,Zt=/!important/g,Xt=/___PSEUDOCLASSCOLON___/g,en=/:/g,tn=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,nn=/(^|\D)0?\.?0(m?s)/gi,rn=/\s*(flex|flex-basis):\s*([^;}]+)/gi,an=/\s+/,on=/(hsla?)\(([^)]+)\)/g,sn=/(^\s+|\s+$)/g,ln=/:first-(line|letter)(\{|,)/gi,cn=/^(.*)(@charset)( "[^"]*";)/gi,un=/^((\s*)(@charset)( [^;]+;\s*))+/gi,hn=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,dn=/:(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,pn=/^(.*)(@charset "[^"]*";)/g,mn=/^(\s*@charset [^;]+;\s*)+/g,fn=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,gn=/([:,( ]\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,yn=/\s*\/\*/g,bn=/\*\/\s*/g,vn=/\band\(/gi,kn=/([^:])not\(/gi,wn=/\bor\(/gi,xn=/([!{}:;>+([,])\s+/g,Sn=/;+\}/g,En=/([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,An=/:0 0 0 0(;|\})/g,Tn=/:0 0 0(;|\})/g,Cn=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,Rn=/(:|\s)0+\.(\d+)/g,_n=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,In=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,Ln=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,Pn=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,Nn=/___QUERY_FRACTION___/g,zn=/;;+/g,Mn=/(:|\s)(#f00)(;|})/g,Dn=/___PRESERVED_NEWLINE___/g,On=/(:|\s)(#000080)(;|})/g,Un=/(:|\s)(#808080)(;|})/g,Fn=/(:|\s)(#808000)(;|})/g,Bn=/(:|\s)(#800080)(;|})/g,qn=/(:|\s)(#c0c0c0)(;|})/g,jn=/(:|\s)(#008080)(;|})/g,Hn=/(:|\s)(#ffa500)(;|})/g,Wn=/(:|\s)(#800000)(;|})/g;function Vn(e="",t=It){const n=[],r=[];let a;const o=e;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=function(e,t){const n=Lt,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(Pt,""):(n=n.replace(Nt," "),n=n.replace(Pt," "),n=n.replace(sn,"")),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),n),a=Ot,e=e.replace(a,(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(Ut,"alpha(opacity="),r.push(e),t+_t+(r.length-1)+"___"+t}));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,_t+(r.length-1)+"___"))}e=e.replace(`/*${s}*/`,"")}else r.push("\\"),e=e.replace(s,_t+(r.length-1)+"___"),a+=1,r.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+a+"___",_t+(r.length-1)+"___");else t.cuteComments?r.push(o.substring(1).replace(Ft,"\n")):t.uglyComments?r.push(o.substring(1).replace(Bt,"")):r.push(o),e=e.replace(s,_t+(r.length-1)+"___")}if(t.expandVars){const t={};a=qt,e=e.replace(a,((e,n)=>(a=jt,n.replace(a,((e,n,r)=>(n&&r&&(t[n]=r),""))),""))),a=Ht,e=e.replace(a,((e,n)=>t[n]||"none"))}if(e=e.replace(Pt," "),a=Wt,e=e.replace(a,((e,t)=>(r.push("calc("+t.replace(Vt,"").replace($t,"(").replace(Yt,")")+")"),_t+(r.length-1)+"___"))),a=Gt,e=e.replace(a,((e,t)=>(r.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix(___PRESERVED_TOKEN_"+(r.length-1)+"___);"))),a=Kt,e=(e=(e=(e=(e=e.replace(a,(e=>e.replace(en,"___PSEUDOCLASSCOLON___")))).replace(Qt,"$1")).replace(Jt,"$1$2")).replace(Zt," !important")).replace(Xt,":"),a=tn,e=e.replace(a,((e,t,n)=>t+":"+(n=n.replace(nn,((e,t,n)=>(r.push("0"+n),t+_t+(r.length-1)+"___")))))),a=rn,e=(e=function(e,t){const n=Mt;let r,a=0;const o=(e,n)=>{"0"===(e=e.replace(Dt,"")).charAt(0)&&(t.push(e),r[n]=_t+(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(Dt,"")):1===t&&(r=r.split(","),r.forEach(o),l.push(r.join(",").replace(Dt,""))),r="",t+=1;else if("}"===n){if(2===t)l.push("{"+r.replace(Dt,"")+"}"),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(an);return r.push(a.pop()),a.push(_t+(r.length-1)+"___"),a=a.join(" "),`${t}:${a}`}))).replace(on,((e,t,n)=>{const a=[];return n.split(",").forEach((e=>{"0%"===(e=e.replace(sn,""))?(r.push("0%"),a.push(_t+(r.length-1)+"___")):a.push(e)})),t+"("+a.join(",")+")"})),r)).replace(ln,((e,t,n)=>":first-"+t.toLowerCase()+" "+n)),e=t.cuteComments?(e=e.replace(yn,"___PRESERVED_NEWLINE___/*")).replace(bn,"*/___PRESERVED_NEWLINE___"):e.replace(bn,"*/"),a=cn,e=e.replace(a,((e,t,n,r)=>n.toLowerCase()+r+t)),a=un,e=e.replace(a,((e,t,n,r,a)=>n+r.toLowerCase()+a)),a=hn,e=e.replace(a,((e,t)=>"@"+t.toLowerCase())),a=dn,e=(e=(e=e.replace(a,((e,t)=>":"+t.toLowerCase()))).replace(pn,"$2$1")).replace(mn,"$1"),a=fn,e=e.replace(a,((e,t)=>":"+t.toLowerCase()+"(")),a=gn,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(a,((e,t,n)=>t+n.toLowerCase()))).replace(vn,"and (")).replace(kn,"$1not (")).replace(wn,"or (")).replace(xn,"$1")).replace(Sn,"}")).replace(En,"$1$2")).replace(An,":0$1")).replace(Tn,":0$1"),a=Cn,e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0 0"+n))).replace(Rn,"$1.$2"),a=_n,e=(e=(e=(e=(e=(e=(e=(e=(e=(e=function(e){const t=zt,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.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})))).replace(Mn,"$1red$3")).replace(On,"$1navy$3")).replace(Un,"$1gray$3")).replace(Fn,"$1olive$3")).replace(Bn,"$1purple$3")).replace(qn,"$1silver$3")).replace(jn,"$1teal$3")).replace(Hn,"$1orange$3")).replace(Wn,"$1maroon$3"),a=In,e=(e=(e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0"+n))).replace(Ln,"alpha(opacity=")).replace(Pn,"($1:$2___QUERY_FRACTION___$3)")).replace(Nn,"/"),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(zn,";")).replace(Vt,""),r.length>1e3)return o;for(let t=r.length-1;t>=0;t--)e=e.replace(_t+t+"___",r[t],"g");return e=e.replace(Dn,"\n")}var $n=Object.freeze({__proto__:null,defaultOptions:It,processString:Vn});function Yn(e){return{prev:null,next:null,data:e}}function Gn(e,t,n){var r;return null!==Qn?(r=Qn,Qn=Qn.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function Kn(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=Qn,Qn=t}var Qn=null,Jn=function(){this.cursor=null,this.head=null,this.tail=null};Jn.createItem=Yn,Jn.prototype.createItem=Yn,Jn.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},Jn.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},Jn.prototype.fromArray=function(e){var t=null;this.head=null;for(var n=0;n<e.length;n++){var r=Yn(e[n]);null!==t?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this},Jn.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},Jn.prototype.toJSON=Jn.prototype.toArray,Jn.prototype.isEmpty=function(){return null===this.head},Jn.prototype.first=function(){return this.head&&this.head.data},Jn.prototype.last=function(){return this.tail&&this.tail.data},Jn.prototype.each=function(e,t){var n;void 0===t&&(t=this);for(var r=Gn(this,null,this.head);null!==r.next;)n=r.next,r.next=n.next,e.call(t,n.data,n,this);Kn(this)},Jn.prototype.forEach=Jn.prototype.each,Jn.prototype.eachRight=function(e,t){var n;void 0===t&&(t=this);for(var r=Gn(this,this.tail,null);null!==r.prev;)n=r.prev,r.prev=n.prev,e.call(t,n.data,n,this);Kn(this)},Jn.prototype.forEachRight=Jn.prototype.eachRight,Jn.prototype.reduce=function(e,t,n){var r;void 0===n&&(n=this);for(var a=Gn(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 Kn(this),o},Jn.prototype.reduceRight=function(e,t,n){var r;void 0===n&&(n=this);for(var a=Gn(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 Kn(this),o},Jn.prototype.nextUntil=function(e,t,n){if(null!==e){var r;void 0===n&&(n=this);for(var a=Gn(this,null,e);null!==a.next&&(r=a.next,a.next=r.next,!t.call(n,r.data,r,this)););Kn(this)}},Jn.prototype.prevUntil=function(e,t,n){if(null!==e){var r;void 0===n&&(n=this);for(var a=Gn(this,e,null);null!==a.prev&&(r=a.prev,a.prev=r.prev,!t.call(n,r.data,r,this)););Kn(this)}},Jn.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},Jn.prototype.map=function(e,t){var n=new Jn,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},Jn.prototype.filter=function(e,t){var n=new Jn,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},Jn.prototype.clear=function(){this.head=null,this.tail=null},Jn.prototype.copy=function(){for(var e=new Jn,t=this.head;null!==t;)e.insert(Yn(t.data)),t=t.next;return e},Jn.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},Jn.prototype.prependData=function(e){return this.prepend(Yn(e))},Jn.prototype.append=function(e){return this.insert(e)},Jn.prototype.appendData=function(e){return this.insert(Yn(e))},Jn.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},Jn.prototype.insertData=function(e,t){return this.insert(Yn(e),t)},Jn.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},Jn.prototype.push=function(e){this.insert(Yn(e))},Jn.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},Jn.prototype.unshift=function(e){this.prepend(Yn(e))},Jn.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},Jn.prototype.prependList=function(e){return this.insertList(e,this.head)},Jn.prototype.appendList=function(e){return this.insertList(e)},Jn.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},Jn.prototype.replace=function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)};var Zn=Jn,Xn=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},er=" ";function tr(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+=(er.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,er),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 nr=function(e,t,n,r,a){var o=Xn("SyntaxError",e);return o.source=t,o.offset=n,o.line=r,o.column=a,o.sourceFragment=function(e){return tr(o,isNaN(e)?0:e)},Object.defineProperty(o,"formattedMessage",{get:function(){return"Parse error: "+o.message+"\n"+tr(o,2)}}),o.parseError={offset:n,line:r,column:a},o},rr={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},ar=Object.keys(rr).reduce((function(e,t){return e[rr[t]]=t,e}),{}),or={TYPE:rr,NAME:ar};function sr(e){return e>=48&&e<=57}function ir(e){return e>=65&&e<=90}function lr(e){return e>=97&&e<=122}function cr(e){return ir(e)||lr(e)}function ur(e){return e>=128}function hr(e){return cr(e)||ur(e)||95===e}function dr(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function pr(e){return 10===e||13===e||12===e}function mr(e){return pr(e)||32===e||9===e}function fr(e,t){return 92===e&&(!pr(t)&&0!==t)}var gr=new Array(128);br.Eof=128,br.WhiteSpace=130,br.Digit=131,br.NameStart=132,br.NonPrintable=133;for(var yr=0;yr<gr.length;yr++)switch(!0){case mr(yr):gr[yr]=br.WhiteSpace;break;case sr(yr):gr[yr]=br.Digit;break;case hr(yr):gr[yr]=br.NameStart;break;case dr(yr):gr[yr]=br.NonPrintable;break;default:gr[yr]=yr||br.Eof}function br(e){return e<128?gr[e]:br.NameStart}var vr={isDigit:sr,isHexDigit:function(e){return sr(e)||e>=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:ir,isLowercaseLetter:lr,isLetter:cr,isNonAscii:ur,isNameStart:hr,isName:function(e){return hr(e)||sr(e)||45===e},isNonPrintable:dr,isNewline:pr,isWhiteSpace:mr,isValidEscape:fr,isIdentifierStart:function(e,t,n){return 45===e?hr(t)||45===t||fr(t,n):!!hr(e)||92===e&&fr(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?sr(t)?2:46===t&&sr(n)?3:0:46===e?sr(t)?2:0:sr(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:br},kr=vr.isDigit,wr=vr.isHexDigit,xr=vr.isUppercaseLetter,Sr=vr.isName,Er=vr.isWhiteSpace,Ar=vr.isValidEscape;function Tr(e,t){return t<e.length?e.charCodeAt(t):0}function Cr(e,t,n){return 13===n&&10===Tr(e,t+1)?2:1}function Rr(e,t,n){var r=e.charCodeAt(t);return xr(r)&&(r|=32),r===n}function _r(e,t){for(;t<e.length&&kr(e.charCodeAt(t));t++);return t}function Ir(e,t){if(wr(Tr(e,(t+=2)-1))){for(var n=Math.min(e.length,t+5);t<n&&wr(Tr(e,t));t++);var r=Tr(e,t);Er(r)&&(t+=Cr(e,t,r))}return t}var Lr={consumeEscaped:Ir,consumeName:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(!Sr(n)){if(!Ar(n,Tr(e,t+1)))break;t=Ir(e,t)-1}}return t},consumeNumber:function(e,t){var n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),kr(n)&&(t=_r(e,t+1),n=e.charCodeAt(t)),46===n&&kr(e.charCodeAt(t+1))&&(n=e.charCodeAt(t+=2),t=_r(e,t)),Rr(e,t,101)){var r=0;45!==(n=e.charCodeAt(t+1))&&43!==n||(r=1,n=e.charCodeAt(t+2)),kr(n)&&(t=_r(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}Ar(n,Tr(e,t+1))&&(t=Ir(e,t))}return t},cmpChar:Rr,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(xr(o)&&(o|=32),o!==s)return!1}return!0},getNewlineLength:Cr,findWhiteSpaceStart:function(e,t){for(;t>=0&&Er(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t<e.length&&Er(e.charCodeAt(t));t++);return t}},Pr=or.TYPE,Nr=or.NAME,zr=Lr.cmpStr,Mr=Pr.EOF,Dr=Pr.WhiteSpace,Or=Pr.Comment,Ur=16777215,Fr=24,Br=function(){this.offsetAndType=null,this.balance=null,this.reset()};Br.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]>>Fr:Mr},lookupOffset:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&Ur:this.source.length},lookupValue:function(e,t){return(e+=this.tokenIndex)<this.tokenCount&&zr(this.source,this.offsetAndType[e-1]&Ur,this.offsetAndType[e]&Ur,t)},getTokenStart:function(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Ur:this.offsetAndType[this.tokenCount]&Ur:this.firstCharOffset},getRawLength:function(e,t){var n,r=e,a=this.offsetAndType[Math.max(r-1,0)]&Ur;e:for(;r<this.tokenCount&&!((n=this.balance[r])<e);r++)switch(t(this.offsetAndType[r]>>Fr,this.source,a)){case 1:break e;case 2:r++;break e;default:a=this.offsetAndType[r]&Ur,this.balance[n]===r&&(r=n)}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]<e},isDelim:function(e,t){return t?this.lookupType(t)===Pr.Delim&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===Pr.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]>>Fr===Dr;e++,t++);t>0&&this.skip(t)},skipSC:function(){for(;this.tokenType===Dr||this.tokenType===Or;)this.next()},skip:function(e){var t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Ur,t=this.offsetAndType[t],this.tokenType=t>>Fr,this.tokenEnd=t&Ur):(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>>Fr,this.tokenEnd=e&Ur):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=Mr,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&Ur;n=o,e(a>>Fr,r,o,t)}},dump(){var e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,a)=>{e[a]={idx:a,type:Nr[t],chunk:this.source.substring(n,r),balance:this.balance[a]}})),e}};var qr=Br;function jr(e){return e}function Hr(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 Hr(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 Hr(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){switch(e.type){case"Range":return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";default: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 Wr=function(e,t){var n=jr,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)),Hr(e,n,r,a)};const Vr={offset:0,line:1,column:1};function $r(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?Yr(n):n:null}function Yr({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 Gr=function(e,t){const n=Xn("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},Kr=function(e,t,n,r){const a=Xn("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=$r(o||t,"end")||Yr(Vr,h),i=Yr(s)):(s=$r(o,"start")||Yr($r(t,"start")||Vr,h.slice(0,l)),i=$r(o,"end")||Yr(s,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:s,end:i}}(r,n);return a.rawMessage=e,a.syntax=t?Wr(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},Qr=Object.prototype.hasOwnProperty,Jr=Object.create(null),Zr=Object.create(null);function Xr(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function ea(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 ta={keyword:function(e){if(Qr.call(Jr,e))return Jr[e];var t=e.toLowerCase();if(Qr.call(Jr,t))return Jr[e]=Jr[t];var n=Xr(t,0),r=n?"":ea(t,0);return Jr[e]=Object.freeze({basename:t.substr(r.length),name:t,vendor:r,prefix:r,custom:n})},property:function(e){if(Qr.call(Zr,e))return Zr[e];var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=Xr(t,n.length);if(!r&&(t=t.toLowerCase(),Qr.call(Zr,t)))return Zr[e]=Zr[t];var a=r?"":ea(t,n.length),o=t.substr(0,n.length+a.length);return Zr[e]=Object.freeze({basename:t.substr(o.length),name:t.substr(n.length),hack:n,vendor:a,prefix:o,custom:r})},isCustomProperty:Xr,vendorPrefix:ea},na="undefined"!=typeof Uint32Array?Uint32Array:Array,ra=function(e,t){return null===e||e.length<t?new na(Math.max(t+1024,16384)):e},aa=or.TYPE,oa=vr.isNewline,sa=vr.isName,ia=vr.isValidEscape,la=vr.isNumberStart,ca=vr.isIdentifierStart,ua=vr.charCodeCategory,ha=vr.isBOM,da=Lr.cmpStr,pa=Lr.getNewlineLength,ma=Lr.findWhiteSpaceEnd,fa=Lr.consumeEscaped,ga=Lr.consumeName,ya=Lr.consumeNumber,ba=Lr.consumeBadUrlRemnants,va=16777215,ka=24;function wa(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){return h=ya(e,h),ca(n(h),n(h+1),n(h+2))?(g=aa.Dimension,void(h=ga(e,h))):37===n(h)?(g=aa.Percentage,void h++):void(g=aa.Number)}function a(){const t=h;return h=ga(e,h),da(e,t,h,"url")&&40===n(h)?34===n(h=ma(e,h+1))||39===n(h)?(g=aa.Function,void(h=t+4)):void function(){for(g=aa.Url,h=ma(e,h);h<e.length;h++){var t=e.charCodeAt(h);switch(ua(t)){case 41:return void h++;case ua.Eof:return;case ua.WhiteSpace:return 41===n(h=ma(e,h))||h>=e.length?void(h<e.length&&h++):(h=ba(e,h),void(g=aa.BadUrl));case 34:case 39:case 40:case ua.NonPrintable:return h=ba(e,h),void(g=aa.BadUrl);case 92:if(ia(t,n(h+1))){h=fa(e,h)-1;break}return h=ba(e,h),void(g=aa.BadUrl)}}}():40===n(h)?(g=aa.Function,void h++):void(g=aa.Ident)}function o(t){for(t||(t=n(h++)),g=aa.String;h<e.length;h++){var r=e.charCodeAt(h);switch(ua(r)){case t:return void h++;case ua.Eof:return;case ua.WhiteSpace:if(oa(r))return h+=pa(e,h,r),void(g=aa.BadString);break;case 92:if(h===e.length-1)break;var a=n(h+1);oa(a)?h+=pa(e,h+1,a):ia(r,a)&&(h=fa(e,h)-1)}}}t||(t=new qr);for(var s=(e=String(e||"")).length,i=ra(t.offsetAndType,s+1),l=ra(t.balance,s+1),c=0,u=ha(n(0)),h=u,d=0,p=0,m=0;h<s;){var f=e.charCodeAt(h),g=0;switch(l[c]=s,ua(f)){case ua.WhiteSpace:g=aa.WhiteSpace,h=ma(e,h+1);break;case 34:o();break;case 35:sa(n(h+1))||ia(n(h+1),n(h+2))?(g=aa.Hash,h=ga(e,h+1)):(g=aa.Delim,h++);break;case 39:o();break;case 40:g=aa.LeftParenthesis,h++;break;case 41:g=aa.RightParenthesis,h++;break;case 43:la(f,n(h+1),n(h+2))?r():(g=aa.Delim,h++);break;case 44:g=aa.Comma,h++;break;case 45:la(f,n(h+1),n(h+2))?r():45===n(h+1)&&62===n(h+2)?(g=aa.CDC,h+=3):ca(f,n(h+1),n(h+2))?a():(g=aa.Delim,h++);break;case 46:la(f,n(h+1),n(h+2))?r():(g=aa.Delim,h++);break;case 47:42===n(h+1)?(g=aa.Comment,1===(h=e.indexOf("*/",h+2)+2)&&(h=e.length)):(g=aa.Delim,h++);break;case 58:g=aa.Colon,h++;break;case 59:g=aa.Semicolon,h++;break;case 60:33===n(h+1)&&45===n(h+2)&&45===n(h+3)?(g=aa.CDO,h+=4):(g=aa.Delim,h++);break;case 64:ca(n(h+1),n(h+2),n(h+3))?(g=aa.AtKeyword,h=ga(e,h+1)):(g=aa.Delim,h++);break;case 91:g=aa.LeftSquareBracket,h++;break;case 92:ia(f,n(h+1))?a():(g=aa.Delim,h++);break;case 93:g=aa.RightSquareBracket,h++;break;case 123:g=aa.LeftCurlyBracket,h++;break;case 125:g=aa.RightCurlyBracket,h++;break;case ua.Digit:r();break;case ua.NameStart:a();break;case ua.Eof:break;default:g=aa.Delim,h++}switch(g){case d:for(d=(p=l[m=p&va])>>ka,l[c]=m,l[m++]=c;m<c;m++)l[m]===s&&(l[m]=c);break;case aa.LeftParenthesis:case aa.Function:l[c]=p,p=(d=aa.RightParenthesis)<<ka|c;break;case aa.LeftSquareBracket:l[c]=p,p=(d=aa.RightSquareBracket)<<ka|c;break;case aa.LeftCurlyBracket:l[c]=p,p=(d=aa.RightCurlyBracket)<<ka|c}i[c++]=g<<ka|h}for(i[c]=aa.EOF<<ka|h,l[c]=s,l[s]=s;0!==p;)p=l[m=p&va],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(or).forEach((function(e){wa[e]=or[e]})),Object.keys(vr).forEach((function(e){wa[e]=vr[e]})),Object.keys(Lr).forEach((function(e){wa[e]=Lr[e]}));var xa=wa,Sa=xa.isDigit,Ea=xa.cmpChar,Aa=xa.TYPE,Ta=Aa.Delim,Ca=Aa.WhiteSpace,Ra=Aa.Comment,_a=Aa.Ident,Ia=Aa.Number,La=Aa.Dimension,Pa=45,Na=!0;function za(e,t){return null!==e&&e.type===Ta&&e.value.charCodeAt(0)===t}function Ma(e,t,n){for(;null!==e&&(e.type===Ca||e.type===Ra);)e=n(++t);return t}function Da(e,t,n,r){if(!e)return 0;var a=e.value.charCodeAt(t);if(43===a||a===Pa){if(n)return 0;t++}for(;t<e.value.length;t++)if(!Sa(e.value.charCodeAt(t)))return 0;return r+1}function Oa(e,t,n){var r=!1,a=Ma(e,t,n);if(null===(e=n(a)))return t;if(e.type!==Ia){if(!za(e,43)&&!za(e,Pa))return t;if(r=!0,a=Ma(n(++a),a,n),null===(e=n(a))&&e.type!==Ia)return 0}if(!r){var o=e.value.charCodeAt(0);if(43!==o&&o!==Pa)return 0}return Da(e,r?0:1,r,a)}var Ua=xa.isHexDigit,Fa=xa.cmpChar,Ba=xa.TYPE,qa=Ba.Ident,ja=Ba.Delim,Ha=Ba.Number,Wa=Ba.Dimension;function Va(e,t){return null!==e&&e.type===ja&&e.value.charCodeAt(0)===t}function $a(e,t){return e.value.charCodeAt(0)===t}function Ya(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 Ya(e,t+a+1,!1)>0?6:0;if(!Ua(o))return 0;if(++a>6)return 0}return a}function Ga(e,t,n){if(!e)return 0;for(;Va(n(t),63);){if(++e>6)return 0;t++}return t}var Ka=xa.isIdentifierStart,Qa=xa.isHexDigit,Ja=xa.isDigit,Za=xa.cmpStr,Xa=xa.consumeNumber,eo=xa.TYPE,to=["unset","initial","inherit"],no=["calc(","-moz-calc(","-webkit-calc("];function ro(e,t){return t<e.length?e.charCodeAt(t):0}function ao(e,t){return Za(e,0,e.length,t)}function oo(e,t){for(var n=0;n<t.length;n++)if(ao(e,t[n]))return!0;return!1}function so(e,t){return t===e.length-2&&(92===e.charCodeAt(t)&&Ja(e.charCodeAt(t+1)))}function io(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 lo(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function co(e){return function(t,n,r){return null===t?0:t.type===eo.Function&&oo(t.value,no)?lo(t,n):e(t,n,r)}}function uo(e){return function(t){return null===t||t.type!==e?0:1}}function ho(e){return function(t,n,r){if(null===t||t.type!==eo.Dimension)return 0;var a=Xa(t.value,0);if(null!==e){var o=t.value.indexOf("\\",a),s=-1!==o&&so(t.value,o)?t.value.substring(a,o):t.value.substr(a);if(!1===e.hasOwnProperty(s.toLowerCase()))return 0}return io(r,t.value,a)?0:1}}function po(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===eo.Number&&0===Number(t.value)?1:e(t,n,r)}}var mo,fo={"ident-token":uo(eo.Ident),"function-token":uo(eo.Function),"at-keyword-token":uo(eo.AtKeyword),"hash-token":uo(eo.Hash),"string-token":uo(eo.String),"bad-string-token":uo(eo.BadString),"url-token":uo(eo.Url),"bad-url-token":uo(eo.BadUrl),"delim-token":uo(eo.Delim),"number-token":uo(eo.Number),"percentage-token":uo(eo.Percentage),"dimension-token":uo(eo.Dimension),"whitespace-token":uo(eo.WhiteSpace),"CDO-token":uo(eo.CDO),"CDC-token":uo(eo.CDC),"colon-token":uo(eo.Colon),"semicolon-token":uo(eo.Semicolon),"comma-token":uo(eo.Comma),"[-token":uo(eo.LeftSquareBracket),"]-token":uo(eo.RightSquareBracket),"(-token":uo(eo.LeftParenthesis),")-token":uo(eo.RightParenthesis),"{-token":uo(eo.LeftCurlyBracket),"}-token":uo(eo.RightCurlyBracket),string:uo(eo.String),ident:uo(eo.Ident),"custom-ident":function(e){if(null===e||e.type!==eo.Ident)return 0;var t=e.value.toLowerCase();return oo(t,to)||ao(t,"default")?0:1},"custom-property-name":function(e){return null===e||e.type!==eo.Ident||45!==ro(e.value,0)||45!==ro(e.value,1)?0:1},"hex-color":function(e){if(null===e||e.type!==eo.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(!Qa(e.value.charCodeAt(n)))return 0;return 1},"id-selector":function(e){return null===e||e.type!==eo.Hash?0:Ka(ro(e.value,1),ro(e.value,2),ro(e.value,3))?1:0},"an-plus-b":function(e,t){var n=0;if(!e)return 0;if(e.type===Ia)return Da(e,0,false,n);if(e.type===_a&&e.value.charCodeAt(0)===Pa){if(!Ea(e.value,1,110))return 0;switch(e.value.length){case 2:return Oa(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==Pa?0:(n=Ma(t(++n),n,t),Da(e=t(n),0,Na,n));default:return e.value.charCodeAt(2)!==Pa?0:Da(e,3,Na,n)}}else if(e.type===_a||za(e,43)&&t(n+1).type===_a){if(e.type!==_a&&(e=t(++n)),null===e||!Ea(e.value,0,110))return 0;switch(e.value.length){case 1:return Oa(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==Pa?0:(n=Ma(t(++n),n,t),Da(e=t(n),0,Na,n));default:return e.value.charCodeAt(1)!==Pa?0:Da(e,2,Na,n)}}else if(e.type===La){for(var r=e.value.charCodeAt(0),a=43===r||r===Pa?1:0,o=a;o<e.value.length&&Sa(e.value.charCodeAt(o));o++);return o===a?0:Ea(e.value,o,110)?o+1===e.value.length?Oa(t(++n),n,t):e.value.charCodeAt(o+1)!==Pa?0:o+2===e.value.length?(n=Ma(t(++n),n,t),Da(e=t(n),0,Na,n)):Da(e,o+2,Na,n):0}return 0},urange:function(e,t){var n=0;if(null===e||e.type!==qa||!Fa(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(Va(e,43))return null===(e=t(++n))?0:e.type===qa?Ga(Ya(e,0,!0),++n,t):Va(e,63)?Ga(1,++n,t):0;if(e.type===Ha){if(!$a(e,43))return 0;var r=Ya(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===Wa||e.type===Ha?$a(e,45)&&Ya(e,1,!1)?n+1:0:Ga(r,n,t)}return e.type===Wa&&$a(e,43)?Ga(Ya(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 eo.BadString:case eo.BadUrl:break e;case eo.RightCurlyBracket:case eo.RightParenthesis:case eo.RightSquareBracket:if(e.balance>e.index||e.balance<a)break e;r--;break;case eo.Semicolon:if(0===r)break e;break;case eo.Delim:if("!"===e.value&&0===r)break e;break;case eo.Function:case eo.LeftParenthesis:case eo.LeftSquareBracket:case eo.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 eo.BadString:case eo.BadUrl:break e;case eo.RightCurlyBracket:case eo.RightParenthesis:case eo.RightSquareBracket:if(e.balance>e.index||e.balance<n)break e}if(r++,e.balance<=n)break}while(e=t(r));return r},dimension:co(ho(null)),angle:co(ho({deg:!0,grad:!0,rad:!0,turn:!0})),decibel:co(ho({db:!0})),frequency:co(ho({hz:!0,khz:!0})),flex:co(ho({fr:!0})),length:co(po(ho({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:co(ho({dpi:!0,dpcm:!0,dppx:!0,x:!0})),semitones:co(ho({st:!0})),time:co(ho({s:!0,ms:!0})),percentage:co((function(e,t,n){return null===e||e.type!==eo.Percentage||io(n,e.value,e.value.length-1)?0:1})),zero:po(),number:co((function(e,t,n){if(null===e)return 0;var r=Xa(e.value,0);return r===e.value.length||so(e.value,r)?io(n,e.value,r)?0:1:0})),integer:co((function(e,t,n){if(null===e||e.type!==eo.Number)return 0;for(var r=43===e.value.charCodeAt(0)||45===e.value.charCodeAt(0)?1:0;r<e.value.length;r++)if(!Ja(e.value.charCodeAt(r)))return 0;return io(n,e.value,r)?0:1})),"-ms-legacy-expression":(mo="expression",mo+="(",function(e,t){return null!==e&&ao(e.value,mo)?lo(e,t):0})},go=function(e,t,n){var r=Xn("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},yo=function(e){this.str=e,this.pos=0};yo.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 go(e,this.str,this.pos)}};var bo=yo,vo=123,ko=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)})),wo={" ":1,"&&":2,"||":3,"|":4};function xo(e){return e.substringToPos(e.findWsEnd(e.pos))}function So(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n>=128||0===ko[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Eo(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 Ao(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 To(e){var t,n=null;return e.eat(vo),t=Eo(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=Eo(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function Co(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()===vo?To(e):{min:1,max:0};break;case vo:t=To(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 Ro(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function _o(e){var t,n=null;return e.eat(60),t=So(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(xo(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(Eo(e)),xo(e),e.eat(44),xo(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(Eo(e))),e.eat(93),null===t&&null===n?null:{type:"Range",min:t,max:n}}(e)),e.eat(62),Co(e,{type:"Type",name:t,opts:n})}function Io(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 wo[e]-wo[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 Lo(e){for(var t,n=[],r={},a=null,o=e.pos;t=Po(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:Io(n,r)||" ",disallowEmpty:!1,explicit:!1}}function Po(e){var t=e.charCode();if(t<128&&1===ko[t])return function(e){var t;return t=So(e),40===e.charCode()?(e.pos++,{type:"Function",name:t}):Co(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return Co(e,function(e){var t;return e.eat(91),t=Lo(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=So(e),e.eat(39),e.eat(62),Co(e,{type:"Property",name:t})}(e):_o(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 Co(e,{type:"String",value:Ao(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:xo(e)};case 64:return(t=e.nextCharCode())<128&&1===ko[t]?(e.pos++,{type:"AtKeyword",name:So(e)}):Ro(e);case 42:case 43:case 63:case 35:case 33:break;case vo:if((t=e.nextCharCode())<48||t>57)return Ro(e);break;default:return Ro(e)}}function No(e){var t=new bo(e),n=Lo(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type&&(n=n.terms[0]),n}No("[a&&<b>#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!");var zo=No,Mo=function(){};function Do(e){return"function"==typeof e?e:Mo}var Oo=function(e,t,n){var r=Mo,a=Mo;if("function"==typeof t?r=t:t&&(r=Do(t.enter),a=Do(t.leave)),r===Mo&&a===Mo)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)},Uo=new qr,Fo={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 Bo(a,r)}}}};function Bo(e,t){var n=[],r=0,a=0,o=t?t[a].node:null;for(xa(e,Uo);!Uo.eof;){if(t)for(;a<t.length&&r+t[a].len<=Uo.tokenStart;)r+=t[a++].len,o=t[a].node;n.push({type:Uo.tokenType,value:Uo.getTokenValue(),index:Uo.tokenIndex,balance:Uo.balance[Uo.tokenIndex],node:o}),Uo.next()}return n}var qo={type:"Match"},jo={type:"Mismatch"},Ho={type:"DisallowEmpty"};function Wo(e,t,n){return t===qo&&n===jo||e===qo&&t===qo&&n===qo?e:("If"===e.type&&e.else===jo&&t===qo&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Vo(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function $o(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&Vo(e.name)}function Yo(e,t,n){switch(e){case" ":for(var r=qo,a=t.length-1;a>=0;a--){r=Wo(i=t[a],r,jo)}return r;case"|":r=jo;var o=null;for(a=t.length-1;a>=0;a--){if($o(i=t[a])&&(null===o&&a>0&&$o(t[a-1])&&(r=Wo({type:"Enum",map:o=Object.create(null)},qo,r)),null!==o)){var s=(Vo(i.name)?i.name.slice(0,-1):i.name).toLowerCase();if(s in o==!1){o[s]=i;continue}}o=null,r=Wo(i,qo,r)}return r;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(r=jo,a=t.length-1;a>=0;a--){var i=t[a];l=t.length>1?Yo(e,t.filter((function(e){return e!==i})),!1):qo,r=Wo(i,l,r)}return r;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(r=n?qo:jo,a=t.length-1;a>=0;a--){var l;i=t[a];l=t.length>1?Yo(e,t.filter((function(e){return e!==i})),!0):qo,r=Wo(i,l,r)}return r}}function Go(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=Yo(e.combinator,e.terms.map(Go),!1);return e.disallowEmpty&&(t=Wo(t,Ho,jo)),t;case"Multiplier":return function(e){var t=qo,n=Go(e.term);if(0===e.max)n=Wo(n,Ho,jo),(t=Wo(n,null,jo)).then=Wo(qo,qo,t),e.comma&&(t.then.else=Wo({type:"Comma",syntax:e},t,jo));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==qo&&(t=Wo({type:"Comma",syntax:e},t,jo)),t=Wo(n,Wo(qo,qo,t),jo);if(0===e.min)t=Wo(qo,qo,t);else for(r=0;r<e.min-1;r++)e.comma&&t!==qo&&(t=Wo({type:"Comma",syntax:e},t,jo)),t=Wo(n,t,jo);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 Ko=qo,Qo=jo,Jo=Ho,Zo=function(e,t){return"string"==typeof e&&(e=zo(e)),{type:"MatchGraph",match:Go(e),syntax:t||null,source:e}},Xo=Object.prototype.hasOwnProperty,es=Ko,ts=Qo,ns=Jo,rs=or.TYPE,as="Match";function os(e){for(var t=null,n=null,r=e;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}function ss(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 is(e){return null===e||(e.type===rs.Comma||e.type===rs.Function||e.type===rs.LeftParenthesis||e.type===rs.LeftSquareBracket||e.type===rs.LeftCurlyBracket||function(e){return e.type===rs.Delim&&"?"!==e.value}(e))}function ls(e){return null===e||(e.type===rs.RightParenthesis||e.type===rs.RightSquareBracket||e.type===rs.RightCurlyBracket||e.type===rs.Delim)}function cs(e,t,n){function r(){do{y++,g=y<e.length?e[y]:null}while(null!==g&&(g.type===rs.WhiteSpace||g.type===rs.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=ts;break}f=as;break}if((t=h.nextState)===ns){if(h.matchStack===v){t=ts;break}t=es}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!==ts&&i(t.else),t.then!==es&&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=ts;break}t=es;break}if(t.mask===(1<<k.length)-1){t=es;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].*$/,"")),Xo.call(t.map,T)){t=t.map[T];break}t=ts;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=es}else t=ts;break;case"Type":case"Property":var E="Type"===t.type?"types":"properties",A=Xo.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===rs.Ident||"length"===t.name&&"0"===g.value){null===p&&(p=o(t,d)),t=ts;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].*$/,"")),ss(C,T)){l(),t=es;break}}t=ts;break;case"AtKeyword":case"Function":if(null!==g&&ss(g.value,t.name)){l(),t=es;break}t=ts;break;case"Token":if(null!==g&&g.value===t.value){l(),t=es;break}t=ts;break;case"Comma":null!==g&&g.type===rs.Comma?is(v.token)?t=ts:(l(),t=ls(g)?ts:es):t=is(v.token)||ls(g)?es:ts;break;case"String":var R="";for(S=y;S<e.length&&R.length<t.value.length;S++)R+=e[S].value;if(ss(R,t.value)){for(;y<S;)l();t=es}else t=ts;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 as:for(;null!==u;)c();break;default:v=null}return{tokens:e,reason:f,iterations:m,match:v,longestMatch:b}}var us=function(e,t,n){var r=cs(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=os(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 hs(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 ds(e,t,n){var r=hs.call(e,t);return null!==r&&r.some(n)}var ps={getTrace:hs,isType:function(e,t){return ds(this,e,(function(e){return"Type"===e.type&&e.name===t}))},isProperty:function(e,t){return ds(this,e,(function(e){return"Property"===e.type&&e.name===t}))},isKeyword:function(e){return ds(this,e,(function(e){return"Keyword"===e.type}))}};function ms(e){return"node"in e?e.node:ms(e.match[0])}function fs(e){return"node"in e?e.node:fs(e.match[e.match.length-1])}var gs={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=ms(s),l=fs(s);e.syntax.walk(t,(function(e,t,n){if(e===i){var r=new Zn;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}},ys=Object.prototype.hasOwnProperty;function bs(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function vs(e){return Boolean(e)&&bs(e.offset)&&bs(e.line)&&bs(e.column)}function ks(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!==ys.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(vs(n.loc.start)){if(vs(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 Zn)}}}else r(n,"Unknown field `"+a+"` for "+e+" node type");o||r(n,"Bad value for `"+e+"."+a+"`")}}for(var a in t)ys.call(t,a)&&!1===ys.call(n,a)&&r(n,"Field `"+e+"."+a+"` is missed")}}function ws(e,t){var n=t.structure,r={type:String,loc:!0},a={type:'"'+e+'"'};for(var o in n)if(!1!==ys.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:ks(e,r)}}var xs=Gr,Ss=Kr,Es=Zo,As=us,Ts=function(e){var t={};if(e.node)for(var n in e.node)if(ys.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]=ws(n,r)}return t},Cs=Es("inherit | initial | unset"),Rs=Es("inherit | initial | unset | <-ms-legacy-expression>");function _s(e,t,n){var r={};for(var a in e)e[a].syntax&&(r[a]=n?e[a].syntax:Wr(e[a].syntax,{compact:t}));return r}function Is(e,t,n){const r={};for(const[a,o]of Object.entries(e))r[a]={prelude:o.prelude&&(n?o.prelude.syntax:Wr(o.prelude.syntax,{compact:t})),descriptors:o.descriptors&&_s(o.descriptors,t,n)};return r}function Ls(e,t,n){return{matched:e,iterations:n,error:t,getTrace:ps.getTrace,isType:ps.isType,isProperty:ps.isProperty,isKeyword:ps.isKeyword}}function Ps(e,t,n,r){var a,o=function(e,t){return"string"==typeof e?Bo(e,null):t.generate(e,Fo)}(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)?Ls(null,new Error("Matching for a tree with var() is not supported")):(r&&(a=As(o,e.valueCommonSyntax,e)),r&&a.match||(a=As(o,t.match,e)).match?Ls(a.match,null,a.iterations):Ls(null,new Ss(a.reason,t.syntax,n,a),a.iterations))}var Ns=function(e,t,n){if(this.valueCommonSyntax=Cs,this.syntax=t,this.generic=!1,this.atrules={},this.properties={},this.types={},this.structure=n||Ts(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,fo)this.addType_(r,fo[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])}};Ns.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=Es(e,a):("string"==typeof e?Object.defineProperty(o,"syntax",{get:function(){return Object.defineProperty(o,"syntax",{value:zo(e)}),o.syntax}}):o.syntax=e,Object.defineProperty(o,"match",{get:function(){return Object.defineProperty(o,"match",{value:Es(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===fo["-ms-legacy-expression"]&&(this.valueCommonSyntax=Rs))},checkAtruleName:function(e){if(!this.getAtrule(e))return new xs("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=ta.keyword(t);return r.descriptors?r.descriptors[a.name]||r.descriptors[a.basename]?void 0:new xs("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")},checkPropertyName:function(e){return ta.property(e).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(e)?void 0:new xs("Unknown property",e)},matchAtrulePrelude:function(e,t){var n=this.checkAtrulePrelude(e,t);return n?Ls(null,n):t?Ps(this,this.getAtrule(e).prelude,t,!0):Ls(null,null)},matchAtruleDescriptor:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return Ls(null,r);var a=this.getAtrule(e),o=ta.keyword(t);return Ps(this,a.descriptors[o.name]||a.descriptors[o.basename],n,!0)},matchDeclaration:function(e){return"Declaration"!==e.type?Ls(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=this.checkPropertyName(e);return n?Ls(null,n):Ps(this,this.getProperty(e),t,!0)},matchType:function(e,t){var n=this.getType(e);return n?Ps(this,n,t,!1):Ls(null,new xs("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")),Ps(this,e,t,!1)):Ls(null,new xs("Bad syntax"))},findValueFragments:function(e,t,n,r){return gs.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return gs.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=ta.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=ta.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&&Oo(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:_s(this.types,!t,e),properties:_s(this.properties,!t,e),atrules:Is(this.atrules,!t,e)}},toString:function(){return JSON.stringify(this.dump())}};var zs=Ns,Ms={SyntaxError:go,parse:zo,generate:Wr,walk:Oo},Ds=xa.isBOM;var Os=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1};Os.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=ra(e.lines,n),a=e.startLine,o=ra(e.columns,n),s=e.startColumn,i=t.length>0?Ds(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 Us=Os,Fs=xa.TYPE,Bs=Fs.WhiteSpace,qs=Fs.Comment,js=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 qs:this.scanner.next();continue;case Bs: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:Hs,cmpStr:Ws}=Lr,Vs=function(){},$s=or.TYPE,Ys=or.NAME,Gs=$s.WhiteSpace,Ks=$s.Comment,Qs=$s.Ident,Js=$s.Function,Zs=$s.Url,Xs=$s.Hash,ei=$s.Percentage,ti=$s.Number;function ni(e){return function(){return this[e]()}}var ri=function(e){var t={scanner:new qr,locationMap:new Us,filename:"<unknown>",needPositions:!1,onParseError:Vs,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:js,createList:function(){return new Zn},createSingleNodeList:function(e){return(new Zn).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!==Gs)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=Ys[e]+" is expected";switch(e){case Qs:this.scanner.tokenType===Js||this.scanner.tokenType===Zs?(t=this.scanner.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case Xs:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n="Name is expected");break;case ei:this.scanner.tokenType===ti&&(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(Js),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(Hs(this.scanner.source,this.scanner.source.length-1)):this.locationMap.getLocation(this.scanner.tokenStart);throw new nr(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]=ni(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||{}))t[n]=e[n];return function(e,n){var r,a=(n=n||{}).context||"default",o=n.onComment;if(xa(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:Vs,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===Ks){const n=t.getLocation(r,a),s=Ws(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}},ai="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),oi=function(e){if(0<=e&&e<ai.length)return ai[e];throw new TypeError("Must be between 0 and 63: "+e)};var si=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+=oi(t)}while(r>0);return n};var ii=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)}})),li=(ii.getArg,ii.urlParse,ii.urlGenerate,ii.normalize,ii.join,ii.isAbsolute,ii.relative,ii.toSetString,ii.fromSetString,ii.compareByOriginalPositions,ii.compareByGeneratedPositionsDeflated,ii.compareByGeneratedPositionsInflated,ii.parseSourceMapInput,ii.computeSourceURL,Object.prototype.hasOwnProperty),ci="undefined"!=typeof Map;function ui(){this._array=[],this._set=ci?new Map:Object.create(null)}ui.fromArray=function(e,t){for(var n=new ui,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},ui.prototype.size=function(){return ci?this._set.size:Object.getOwnPropertyNames(this._set).length},ui.prototype.add=function(e,t){var n=ci?e:ii.toSetString(e),r=ci?this.has(e):li.call(this._set,n),a=this._array.length;r&&!t||this._array.push(e),r||(ci?this._set.set(e,a):this._set[n]=a)},ui.prototype.has=function(e){if(ci)return this._set.has(e);var t=ii.toSetString(e);return li.call(this._set,t)},ui.prototype.indexOf=function(e){if(ci){var t=this._set.get(e);if(t>=0)return t}else{var n=ii.toSetString(e);if(li.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},ui.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},ui.prototype.toArray=function(){return this._array.slice()};var hi={ArraySet:ui};function di(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}di.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},di.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||ii.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},di.prototype.toArray=function(){return this._sorted||(this._array.sort(ii.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var pi=hi.ArraySet,mi={MappingList:di}.MappingList;function fi(e){e||(e={}),this._file=ii.getArg(e,"file",null),this._sourceRoot=ii.getArg(e,"sourceRoot",null),this._skipValidation=ii.getArg(e,"skipValidation",!1),this._sources=new pi,this._names=new pi,this._mappings=new mi,this._sourcesContents=null}fi.prototype._version=3,fi.fromSourceMap=function(e){var t=e.sourceRoot,n=new fi({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=ii.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=ii.relative(t,r)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(r);null!=o&&n.setSourceContent(r,o)})),n},fi.prototype.addMapping=function(e){var t=ii.getArg(e,"generated"),n=ii.getArg(e,"original",null),r=ii.getArg(e,"source",null),a=ii.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})},fi.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=ii.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ii.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[ii.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},fi.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=ii.relative(a,r));var o=new pi,s=new pi;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=ii.join(n,t.source)),null!=a&&(t.source=ii.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=ii.join(n,t)),null!=a&&(t=ii.relative(a,t)),this.setSourceContent(t,r))}),this)},fi.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}))},fi.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(!ii.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=","}e+=si(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=si(r-c),c=r,e+=si(t.originalLine-1-i),i=t.originalLine-1,e+=si(t.originalColumn-s),s=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=si(n-l),l=n)),u+=e}return u},fi.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=ii.relative(t,e));var n=ii.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},fi.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},fi.prototype.toString=function(){return JSON.stringify(this.toJSON())};var gi={SourceMapGenerator:fi}.SourceMapGenerator,yi={Atrule:!0,Selector:!0,Declaration:!0},bi=Object.prototype.hasOwnProperty;function vi(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 ki=function(e){function t(e){if(!bi.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:vi,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 gi,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&&yi.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&&yi.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()}},wi=Object.prototype.hasOwnProperty,xi=function(){};function Si(e){return"function"==typeof e?e:xi}function Ei(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function Ai(e,t){var n=t.structure,r=[];for(var a in n)if(!1!==wi.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 Ti(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 Ci(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 Ri=function(e){var t=function(e){var t={};for(var n in e.node)if(wi.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]=Ai(0,r)}return t}(e),n={},r={},a=Symbol("break-walk"),o=Symbol("skip-node");for(var s in t)wi.call(t,s)&&null!==t[s]&&(n[s]=Ti(t[s],!1),r[s]=Ti(t[s],!0));var i=Ci(n),l=Ci(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=xi,d=xi,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=Si(s.enter),d=Si(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=Ei(h,s.visit),d=Ei(d,s.visit)}if(h===xi&&d===xi)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},_i=function e(t){var n={};for(var r in t){var a=t[r];a&&(Array.isArray(a)||a instanceof Zn?a=a.map(e):a.constructor===Object&&(a=e(a))),n[r]=a}return n};const Ii=Object.prototype.hasOwnProperty,Li={generic:!0,types:Mi,atrules:{prelude:Di,descriptors:Di},properties:Mi,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,n){for(const r in n)Ii.call(n,r)&&(Pi(t[r])?e(t[r],Ni(n[r])):t[r]=Ni(n[r]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function Pi(e){return e&&e.constructor===Object}function Ni(e){return Pi(e)?Object.assign({},e):e}function zi(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Mi(e,t){if("string"==typeof t)return zi(e,t);const n=Object.assign({},e);for(let r in t)Ii.call(t,r)&&(n[r]=zi(Ii.call(e,r)?e[r]:void 0,t[r]));return n}function Di(e,t){const n=Mi(e,t);return!Pi(n)||Object.keys(n).length?n:null}function Oi(e,t,n){for(const r in n)if(!1!==Ii.call(n,r))if(!0===n[r])r in t&&Ii.call(t,r)&&(e[r]=Ni(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(Pi(n[r])){const a={};for(let t in e[r])a[t]=Oi({},e[r][t],n[r]);for(let e in t[r])a[e]=Oi(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&&Oi(a[t],n,o);for(const e in t[r])Ii.call(t[r],e)&&(a[e]||(a[e]={}),t[r]&&t[r][e]&&Oi(a[e],t[r][e],o));e[r]=a}return e}var Ui=(e,t)=>Oi(e,t,Li);function Fi(e){var t=ri(e),n=Ri(e),r=ki(e),a=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof Zn==0&&(e.children=(new Zn).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof Zn&&(e.children=e.children.toArray())}}),t}}}(n),o={List:Zn,SyntaxError:nr,TokenStream:qr,Lexer:zs,vendorPrefix:ta.vendorPrefix,keyword:ta.keyword,property:ta.property,isCustomProperty:ta.isCustomProperty,definitionSyntax:Ms,lexer:null,createLexer:function(e){return new zs(e,o,o.lexer.structure)},tokenize:xa,parse:t,walk:n,generate:r,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:_i,fromPlainObject:a.fromPlainObject,toPlainObject:a.toPlainObject,createSyntax:function(e){return Fi(Ui({},e))},fork:function(t){var n=Ui({},e);return Fi("function"==typeof t?t(n,Object.assign):Ui(n,t))}};return o.lexer=new zs({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},o),o}var Bi=function(e){return Fi(Ui({},e))},qi={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> )","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>"}}}},ji=xa.cmpChar,Hi=xa.isDigit,Wi=xa.TYPE,Vi=Wi.WhiteSpace,$i=Wi.Comment,Yi=Wi.Ident,Gi=Wi.Number,Ki=Wi.Dimension,Qi=43,Ji=45,Zi=110,Xi=!0;function el(e,t){var n=this.scanner.tokenStart+e,r=this.scanner.source.charCodeAt(n);for(r!==Qi&&r!==Ji||(t&&this.error("Number sign is not allowed"),n++);n<this.scanner.tokenEnd;n++)Hi(this.scanner.source.charCodeAt(n))||this.error("Integer is expected",n)}function tl(e){return el.call(this,0,e)}function nl(e,t){if(!ji(this.scanner.source,this.scanner.tokenStart+e,t)){var n="";switch(t){case Zi:n="N is expected";break;case Ji:n="HyphenMinus is expected"}this.error(n,this.scanner.tokenStart+e)}}function rl(){for(var e=0,t=0,n=this.scanner.tokenType;n===Vi||n===$i;)n=this.scanner.lookupType(++e);if(n!==Gi){if(!this.scanner.isDelim(Qi,e)&&!this.scanner.isDelim(Ji,e))return null;t=this.scanner.isDelim(Qi,e)?Qi:Ji;do{n=this.scanner.lookupType(++e)}while(n===Vi||n===$i);n!==Gi&&(this.scanner.skip(e),tl.call(this,Xi))}return e>0&&this.scanner.skip(e),0===t&&(n=this.scanner.source.charCodeAt(this.scanner.tokenStart))!==Qi&&n!==Ji&&this.error("Number sign is expected"),tl.call(this,0!==t),t===Ji?"-"+this.consume(Gi):this.consume(Gi)}var al={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var e=this.scanner.tokenStart,t=null,n=null;if(this.scanner.tokenType===Gi)tl.call(this,false),n=this.consume(Gi);else if(this.scanner.tokenType===Yi&&ji(this.scanner.source,this.scanner.tokenStart,Ji))switch(t="-1",nl.call(this,1,Zi),this.scanner.getTokenLength()){case 2:this.scanner.next(),n=rl.call(this);break;case 3:nl.call(this,2,Ji),this.scanner.next(),this.scanner.skipSC(),tl.call(this,Xi),n="-"+this.consume(Gi);break;default:nl.call(this,2,Ji),el.call(this,3,Xi),this.scanner.next(),n=this.scanner.substrToCursor(e+2)}else if(this.scanner.tokenType===Yi||this.scanner.isDelim(Qi)&&this.scanner.lookupType(1)===Yi){var r=0;switch(t="1",this.scanner.isDelim(Qi)&&(r=1,this.scanner.next()),nl.call(this,0,Zi),this.scanner.getTokenLength()){case 1:this.scanner.next(),n=rl.call(this);break;case 2:nl.call(this,1,Ji),this.scanner.next(),this.scanner.skipSC(),tl.call(this,Xi),n="-"+this.consume(Gi);break;default:nl.call(this,1,Ji),el.call(this,2,Xi),this.scanner.next(),n=this.scanner.substrToCursor(e+r+1)}}else if(this.scanner.tokenType===Ki){for(var a=this.scanner.source.charCodeAt(this.scanner.tokenStart),o=(r=a===Qi||a===Ji,this.scanner.tokenStart+r);o<this.scanner.tokenEnd&&Hi(this.scanner.source.charCodeAt(o));o++);o===this.scanner.tokenStart+r&&this.error("Integer is expected",this.scanner.tokenStart+r),nl.call(this,o-this.scanner.tokenStart,Zi),t=this.scanner.source.substring(e,o),o+1===this.scanner.tokenEnd?(this.scanner.next(),n=rl.call(this)):(nl.call(this,o-this.scanner.tokenStart+1,Ji),o+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),tl.call(this,Xi),n="-"+this.consume(Gi)):(el.call(this,o-this.scanner.tokenStart+2,Xi),this.scanner.next(),n=this.scanner.substrToCursor(o+1)))}else this.error();return null!==t&&t.charCodeAt(0)===Qi&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===Qi&&(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))}},ol=xa.TYPE,sl=ol.WhiteSpace,il=ol.Semicolon,ll=ol.LeftCurlyBracket,cl=ol.Delim;function ul(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===sl?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function hl(){return 0}var dl={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||hl)),r=n&&this.scanner.tokenStart>a?ul.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:hl,leftCurlyBracket:function(e){return e===ll?1:0},leftCurlyBracketOrSemicolon:function(e){return e===ll||e===il?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===cl&&33===t.charCodeAt(n)||e===il?1:0},semicolonIncluded:function(e){return e===il?2:0}}},pl=xa.TYPE,ml=dl.mode,fl=pl.AtKeyword,gl=pl.Semicolon,yl=pl.LeftCurlyBracket,bl=pl.RightCurlyBracket;function vl(e){return this.Raw(e,ml.leftCurlyBracketOrSemicolon,!0)}function kl(){for(var e,t=1;e=this.scanner.lookupType(t);t++){if(e===bl)return!0;if(e===yl||e===fl)return!1}return!1}var wl={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(fl),t=(e=this.scanner.substrToCursor(n+1)).toLowerCase(),this.scanner.skipSC(),!1===this.scanner.eof&&this.scanner.tokenType!==yl&&this.scanner.tokenType!==gl&&(this.parseAtrulePrelude?"AtrulePrelude"===(r=this.parseWithFallback(this.AtrulePrelude.bind(this,e),vl)).type&&null===r.children.head&&(r=null):r=vl.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case gl:this.scanner.next();break;case yl:a=this.atrule.hasOwnProperty(t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(kl.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"},xl=xa.TYPE,Sl=xl.Semicolon,El=xl.LeftCurlyBracket,Al={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!==El&&this.scanner.tokenType!==Sl&&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"},Tl=xa.TYPE,Cl=Tl.Ident,Rl=Tl.String,_l=Tl.Colon,Il=Tl.LeftSquareBracket,Ll=Tl.RightSquareBracket;function Pl(){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(Cl),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(Cl)):t&&this.error("Identifier is expected",this.scanner.tokenEnd):t&&this.error("Vertical line is expected"),n&&this.scanner.tokenType===_l&&(this.scanner.next(),this.eat(Cl)),{type:"Identifier",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}}function Nl(){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 zl={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(Il),this.scanner.skipSC(),e=Pl.call(this),this.scanner.skipSC(),this.scanner.tokenType!==Ll&&(this.scanner.tokenType!==Cl&&(n=Nl.call(this),this.scanner.skipSC(),r=this.scanner.tokenType===Rl?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===Cl&&(a=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(Ll),{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("]")}},Ml=xa.TYPE,Dl=dl.mode,Ol=Ml.WhiteSpace,Ul=Ml.Comment,Fl=Ml.Semicolon,Bl=Ml.AtKeyword,ql=Ml.LeftCurlyBracket,jl=Ml.RightCurlyBracket;function Hl(e){return this.Raw(e,null,!0)}function Wl(){return this.parseWithFallback(this.Rule,Hl)}function Vl(e){return this.Raw(e,Dl.semicolonIncluded,!0)}function $l(){if(this.scanner.tokenType===Fl)return Vl.call(this,this.scanner.tokenIndex);var e=this.parseWithFallback(this.Declaration,Vl);return this.scanner.tokenType===Fl&&this.scanner.next(),e}var Yl={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(e){var t=e?$l:Wl,n=this.scanner.tokenStart,r=this.createList();this.eat(ql);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case jl:break e;case Ol:case Ul:this.scanner.next();break;case Bl:r.push(this.parseWithFallback(this.Atrule,Hl));break;default:r.push(t.call(this))}return this.scanner.eof||this.eat(jl),{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"},Gl=xa.TYPE,Kl=Gl.LeftSquareBracket,Ql=Gl.RightSquareBracket,Jl={name:"Brackets",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(Kl),n=e.call(this,t),this.scanner.eof||this.eat(Ql),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("["),this.children(e),this.chunk("]")}},Zl=xa.TYPE.CDC,Xl={name:"CDC",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(Zl),{type:"CDC",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("--\x3e")}},ec=xa.TYPE.CDO,tc={name:"CDO",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(ec),{type:"CDO",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("\x3c!--")}},nc=xa.TYPE.Ident,rc={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(nc)}},generate:function(e){this.chunk("."),this.chunk(e.name)}},ac=xa.TYPE.Ident,oc={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===ac&&!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)}},sc=xa.TYPE.Comment,ic={name:"Comment",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=this.scanner.tokenEnd;return this.eat(sc),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("*/")}},lc=ta.isCustomProperty,cc=xa.TYPE,uc=dl.mode,hc=cc.Ident,dc=cc.Hash,pc=cc.Colon,mc=cc.Semicolon,fc=cc.Delim,gc=cc.WhiteSpace;function yc(e){return this.Raw(e,uc.exclamationMarkOrSemicolon,!0)}function bc(e){return this.Raw(e,uc.exclamationMarkOrSemicolon,!1)}function vc(){var e=this.scanner.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.scanner.eof&&this.scanner.tokenType!==mc&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(e)&&this.error(),t}var kc={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var e,t=this.scanner.tokenStart,n=this.scanner.tokenIndex,r=wc.call(this),a=lc(r),o=a?this.parseCustomProperty:this.parseValue,s=a?bc:yc,i=!1;this.scanner.skipSC(),this.eat(pc);const l=this.scanner.tokenIndex;if(a||this.scanner.skipSC(),e=o?this.parseWithFallback(vc,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)===gc){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.scanner.isDelim(33)&&(i=xc.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==mc&&!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 wc(){var e=this.scanner.tokenStart;if(this.scanner.tokenType===fc)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===dc?this.eat(dc):this.eat(hc),this.scanner.substrToCursor(e)}function xc(){this.eat(fc),this.scanner.skipSC();var e=this.consume(hc);return"important"===e||e}var Sc=xa.TYPE,Ec=dl.mode,Ac=Sc.WhiteSpace,Tc=Sc.Comment,Cc=Sc.Semicolon;function Rc(e){return this.Raw(e,Ec.semicolonIncluded,!0)}var _c={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var e=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case Ac:case Tc:case Cc:this.scanner.next();break;default:e.push(this.parseWithFallback(this.Declaration,Rc))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")}))}},Ic=Lr.consumeNumber,Lc=xa.TYPE.Dimension,Pc={name:"Dimension",structure:{value:String,unit:String},parse:function(){var e=this.scanner.tokenStart,t=Ic(this.scanner.source,e);return this.eat(Lc),{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)}},Nc=xa.TYPE.RightParenthesis,zc={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(Nc),{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"},Mc=xa.TYPE.Hash,Dc={name:"Hash",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(Mc),{type:"Hash",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.value)}},Oc=xa.TYPE.Ident,Uc={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(Oc)}},generate:function(e){this.chunk(e.name)}},Fc=xa.TYPE.Hash,Bc={name:"IdSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(Fc),{type:"IdSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.name)}},qc=xa.TYPE,jc=qc.Ident,Hc=qc.Number,Wc=qc.Dimension,Vc=qc.LeftParenthesis,$c=qc.RightParenthesis,Yc=qc.Colon,Gc=qc.Delim,Kc={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var e,t=this.scanner.tokenStart,n=null;if(this.eat(Vc),this.scanner.skipSC(),e=this.consume(jc),this.scanner.skipSC(),this.scanner.tokenType!==$c){switch(this.eat(Yc),this.scanner.skipSC(),this.scanner.tokenType){case Hc:n=this.lookupNonWSType(1)===Gc?this.Ratio():this.Number();break;case Wc:n=this.Dimension();break;case jc:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat($c),{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(")")}},Qc=xa.TYPE,Jc=Qc.WhiteSpace,Zc=Qc.Comment,Xc=Qc.Ident,eu=Qc.LeftParenthesis,tu={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 Zc:this.scanner.next();continue;case Jc:n=this.WhiteSpace();continue;case Xc:t=this.Identifier();break;case eu: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)}},nu=xa.TYPE.Comma,ru={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===nu);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e,(function(){this.chunk(",")}))}},au=xa.TYPE.Number,ou={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(au)}},generate:function(e){this.chunk(e.value)}},su={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)}},iu=xa.TYPE,lu=iu.LeftParenthesis,cu=iu.RightParenthesis,uu={name:"Parentheses",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(lu),n=e.call(this,t),this.scanner.eof||this.eat(cu),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("("),this.children(e),this.chunk(")")}},hu=Lr.consumeNumber,du=xa.TYPE.Percentage,pu={name:"Percentage",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=hu(this.scanner.source,e);return this.eat(du),{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("%")}},mu=xa.TYPE,fu=mu.Ident,gu=mu.Function,yu=mu.Colon,bu=mu.RightParenthesis,vu={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(yu),this.scanner.tokenType===gu?(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(bu)):e=this.consume(fu),{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"},ku=xa.TYPE,wu=ku.Ident,xu=ku.Function,Su=ku.Colon,Eu=ku.RightParenthesis,Au={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(Su),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:"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"},Tu=xa.isDigit,Cu=xa.TYPE,Ru=Cu.Number,_u=Cu.Delim;function Iu(){this.scanner.skipWS();for(var e=this.consume(Ru),t=0;t<e.length;t++){var n=e.charCodeAt(t);Tu(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 Lu={name:"Ratio",structure:{left:String,right:String},parse:function(){var e,t=this.scanner.tokenStart,n=Iu.call(this);return this.scanner.skipWS(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.eat(_u),e=Iu.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)}},Pu=xa.TYPE,Nu=dl.mode,zu=Pu.LeftCurlyBracket;function Mu(e){return this.Raw(e,Nu.leftCurlyBracket,!0)}function Du(){var e=this.SelectorList();return"Raw"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==zu&&this.error(),e}var Ou={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(Du,Mu):Mu.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"},Uu=xa.TYPE.Comma,Fu={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var e=this.createList();!this.scanner.eof&&(e.push(this.Selector()),this.scanner.tokenType===Uu);)this.scanner.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(){this.chunk(",")}))},walkContext:"selector"},Bu=xa.TYPE.String,qu={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Bu)}},generate:function(e){this.chunk(e.value)}},ju=xa.TYPE,Hu=ju.WhiteSpace,Wu=ju.Comment,Vu=ju.AtKeyword,$u=ju.CDO,Yu=ju.CDC;function Gu(e){return this.Raw(e,null,!1)}var Ku={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 Hu:this.scanner.next();continue;case Wu:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}e=this.Comment();break;case $u:e=this.CDO();break;case Yu:e=this.CDC();break;case Vu:e=this.parseWithFallback(this.Atrule,Gu);break;default:e=this.parseWithFallback(this.Rule,Gu)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:n}},generate:function(e){this.children(e)},walkContext:"stylesheet"},Qu=xa.TYPE.Ident;function Ju(){this.scanner.tokenType!==Qu&&!1===this.scanner.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.scanner.next()}var Zu={name:"TypeSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),Ju.call(this)):(Ju.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),Ju.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},Xu=xa.isHexDigit,eh=xa.cmpChar,th=xa.TYPE,nh=xa.NAME,rh=th.Ident,ah=th.Number,oh=th.Dimension;function sh(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===sh.call(this,e+r+1,!1)&&this.error(),-1;Xu(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 ih(e){for(var t=0;this.scanner.isDelim(63);)++t>e&&this.error("Too many question marks"),this.scanner.next()}function lh(e){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==e&&this.error(nh[e]+" is expected")}function ch(){var e=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===rh?void((e=sh.call(this,0,!0))>0&&ih.call(this,6-e)):this.scanner.isDelim(63)?(this.scanner.next(),void ih.call(this,5)):void this.error("Hex digit or question mark is expected")):this.scanner.tokenType===ah?(lh.call(this,43),e=sh.call(this,1,!0),this.scanner.isDelim(63)?void ih.call(this,6-e):this.scanner.tokenType===oh||this.scanner.tokenType===ah?(lh.call(this,45),void sh.call(this,1,!1)):void 0):this.scanner.tokenType===oh?(lh.call(this,43),void((e=sh.call(this,1,!0))>0&&ih.call(this,6-e))):void this.error()}var uh={name:"UnicodeRange",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return eh(this.scanner.source,e,117)||this.error("U is expected"),eh(this.scanner.source,e+1,43)||this.error("Plus sign is expected"),this.scanner.next(),ch.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},hh=xa.isWhiteSpace,dh=xa.cmpStr,ph=xa.TYPE,mh=ph.Function,fh=ph.Url,gh=ph.RightParenthesis,yh={name:"Url",structure:{value:["String","Raw"]},parse:function(){var e,t=this.scanner.tokenStart;switch(this.scanner.tokenType){case fh:for(var n=t+4,r=this.scanner.tokenEnd-1;n<r&&hh(this.scanner.source.charCodeAt(n));)n++;for(;n<r&&hh(this.scanner.source.charCodeAt(r-1));)r--;e={type:"Raw",loc:this.getLocation(n,r),value:this.scanner.source.substring(n,r)},this.eat(fh);break;case mh:dh(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(mh),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(gh);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(")")}},bh=xa.TYPE.WhiteSpace,vh=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),kh={AnPlusB:al,Atrule:wl,AtrulePrelude:Al,AttributeSelector:zl,Block:Yl,Brackets:Jl,CDC:Xl,CDO:tc,ClassSelector:rc,Combinator:oc,Comment:ic,Declaration:kc,DeclarationList:_c,Dimension:Pc,Function:zc,Hash:Dc,Identifier:Uc,IdSelector:Bc,MediaFeature:Kc,MediaQuery:tu,MediaQueryList:ru,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:ou,Operator:su,Parentheses:uu,Percentage:pu,PseudoClassSelector:vu,PseudoElementSelector:Au,Ratio:Lu,Raw:dl,Rule:Ou,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:Fu,String:qu,StyleSheet:Ku,TypeSelector:Zu,UnicodeRange:uh,Url:yh,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:{name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(bh),vh},generate:function(e){this.chunk(e.value)}}},wh={generic:!0,types:qi.types,atrules:qi.atrules,properties:qi.properties,node:kh},xh=xa.cmpChar,Sh=xa.cmpStr,Eh=xa.TYPE,Ah=Eh.Ident,Th=Eh.String,Ch=Eh.Number,Rh=Eh.Function,_h=Eh.Url,Ih=Eh.Hash,Lh=Eh.Dimension,Ph=Eh.Percentage,Nh=Eh.LeftParenthesis,zh=Eh.LeftSquareBracket,Mh=Eh.Comma,Dh=Eh.Delim,Oh=function(e){switch(this.scanner.tokenType){case Ih:return this.Hash();case Mh:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case Nh:return this.Parentheses(this.readSequence,e.recognizer);case zh:return this.Brackets(this.readSequence,e.recognizer);case Th:return this.String();case Lh:return this.Dimension();case Ph:return this.Percentage();case Ch:return this.Number();case Rh:return Sh(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case _h:return this.Url();case Ah:return xh(this.scanner.source,this.scanner.tokenStart,117)&&xh(this.scanner.source,this.scanner.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case Dh: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)}},Uh={getNode:Oh},Fh=xa.TYPE,Bh=Fh.Delim,qh=Fh.Ident,jh=Fh.Dimension,Hh=Fh.Percentage,Wh=Fh.Number,Vh=Fh.Hash,$h=Fh.Colon,Yh=Fh.LeftSquareBracket;var Gh={getNode:function(e){switch(this.scanner.tokenType){case Yh:return this.AttributeSelector();case Vh:return this.IdSelector();case $h:return this.scanner.lookupType(1)===$h?this.PseudoElementSelector():this.PseudoClassSelector();case qh:return this.TypeSelector();case Wh:case Hh:return this.Percentage();case jh:46===this.scanner.source.charCodeAt(this.scanner.tokenStart)&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case Bh: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()}}}},Kh=xa.TYPE,Qh=dl.mode,Jh=Kh.Comma,Zh=Kh.WhiteSpace,Xh={AtrulePrelude:Uh,Selector:Gh,Value:{getNode:Oh,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===Jh){e.push(this.Operator());const t=this.scanner.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,Qh.exclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty())for(let e=t-this.scanner.tokenIndex;e<=0;e++)if(this.scanner.lookupType(e)===Zh){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n)}return e}}},ed=xa.TYPE,td=ed.String,nd=ed.Ident,rd=ed.Url,ad=ed.Function,od=ed.LeftParenthesis,sd={parse:{prelude:function(){var e=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case td:e.push(this.String());break;case rd:case ad:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.lookupNonWSType(0)!==nd&&this.lookupNonWSType(0)!==od||(e.push(this.WhiteSpace()),e.push(this.MediaQueryList())),e},block:null}},id=xa.TYPE,ld=id.WhiteSpace,cd=id.Comment,ud=id.Ident,hd=id.Function,dd=id.Colon,pd=id.LeftParenthesis;function md(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function fd(){return this.scanner.skipSC(),this.scanner.tokenType===ud&&this.lookupNonWSType(1)===dd?this.createSingleNodeList(this.Declaration()):gd.call(this)}function gd(){var e,t=this.createList(),n=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case ld:n=this.WhiteSpace();continue;case cd:this.scanner.next();continue;case hd:e=this.Function(md,this.scope.AtrulePrelude);break;case ud:e=this.Identifier();break;case pd:e=this.Parentheses(fd,this.scope.AtrulePrelude);break;default:break e}null!==n&&(t.push(n),n=null),t.push(e)}return t}var yd,bd={parse:function(){return this.createSingleNodeList(this.SelectorList())}},vd={parse:function(){return this.createSingleNodeList(this.Nth(true))}},kd={parse:function(){return this.createSingleNodeList(this.Nth(false))}},wd={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:Xh,atrule:{"font-face":{parse:{prelude:null,block:function(){return this.Block(!0)}}},import:sd,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=gd.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:bd,not:bd,"nth-child":vd,"nth-last-child":vd,"nth-last-of-type":kd,"nth-of-type":kd,slotted:{parse:function(){return this.createSingleNodeList(this.Selector())}}},node:kh},xd={node:kh},Sd="1.1.2",Ed={version:Sd},Ad=(yd=Object.freeze({__proto__:null,version:Sd,default:Ed}))&&yd.default||yd;var Td=Bi(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}(wh,wd,xd)),Cd=Ad.version;Td.version=Cd;var Rd=Td;const _d=Rd.generate,Id=Rd.parse;var Ld=Object.freeze({__proto__:null,generate:_d,parse:Id});function Pd(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 Nd=Object.freeze({__proto__:null,process:Pd});let zd,Md,Dd,Od;zd={},zd.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),zd.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),zd.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,zd.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),zd.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),zd.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),zd.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}=zd;Dd=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}=zd;Md=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=Md,t=Dd,{asciiLowercase:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a}=zd;Od=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 Ud=Object.freeze({__proto__:null,fontPropertyParser:xt,mediaQueryParser:Rt,cssMinifier:$n,cssTree:Ld,cssUnescape:w,srcsetParser:Nd,get MIMEType(){return Od}});const Fd={normalizeFontFamily:te,getFontWeight:le},Bd=globalThis.FontFace,qd=/url\s*\(\s*'(.*?)'\s*\)/i,jd=/url\s*\(\s*"(.*?)"\s*\)/i,Hd=/url\s*\(\s*(.*?)\s*\)/i,Wd=/(url|local)\(.*?\)\s*(,|$)/g,Vd=/^'(.*?)'$/,$d=/^"(.*?)"$/,Yd=/^url\(\s*["']?data:font\/(woff2?)/,Gd=/^url\(\s*["']?data:application\/x-font-(woff)/,Kd=/\.([^.?#]+)((\?|#).*?)?$/,Qd=/format\((.*?)\)\s*,?$/,Jd=/(.*?)\s*,?$/,Zd=/^url\(["']?data:[^,]*,?["']?\)/,Xd="local(",ep={"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 tp(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=lp();a.medias.set("media-"+s+"-"+t.mediaText,r),np(e,n,s,r)}else np(e,n,s,a);s++})),rp(a),await Promise.all([...t].map((async([,e],t)=>{const s=e.stylesheet.children,i=e.mediaText;s&&(i&&"all"!=i?await ap(s,t,a.medias.get("media-"+t+"-"+i),n,r,o):await ap(s,t,a,n,r,o),o.rules.discarded-=s.getSize())}))),o}function np(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=_d(t.prelude),s=lp();r.medias.set("media-"+n+"-"+a+"-"+o,s),a++,np(e,t.block.children,n,s)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const a=_d(t.prelude),s=lp();r.supports.set("supports-"+n+"-"+o+"-"+a,s),o++,np(e,t.block.children,n,s)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=ip(t);let n=r.fonts.get(e);n||(n=[],r.fonts.set(e,n));const a=sp(t,"src");if(a){const e=a.match(Wd);e&&e.forEach((e=>n.unshift(e)))}}}))}function rp(e){e.fonts.forEach(((t,n)=>{e.fonts.set(n,t.map((e=>{const t=e.match(Qd);let n;const r=e.match(qd)||e.match(jd)||e.match(Hd),a=r&&r[1];if(t&&t[1]&&(n=t[1].replace(Vd,"$1").replace($d,"$1").toLowerCase()),!n){const t=e.match(Yd);if(t&&t[1])n=t[1];else{const t=e.match(Gd);t&&t[1]&&(n=t[1])}}if(!n&&a){const e=a.match(Kd);e&&e[1]&&(n=e[1])}return{src:e.match(Jd)[1],fontUrl:a,format:n}})))})),e.medias.forEach((e=>rp(e))),e.supports.forEach((e=>rp(e)))}async function ap(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=_d(e.prelude);await ap(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=_d(e.prelude);await ap(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=ip(e),i=n.fonts.get(t);if(i){await op(e,i,r,a,o)&&n.fonts.delete(t)}else s.push(c)}}s.forEach((t=>e.remove(t)))}async function op(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(Bd){const r=new Bd("test-font",e.src);try{await r.load(),await r.loaded,e.valid=!0}catch(r){const a=n.get(s.data);if(a){const n=a[a.length-t-1];if(n){const t=new Bd("test-font","url("+n+")");try{await Promise.race([t.load().then((()=>t.loaded)).then((()=>e.valid=!0)),new Promise((t=>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(Zd)&&t.format==e&&(!n||t.valid))),o=e=>t.filter((t=>t==e||t.src.startsWith(Xd)));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(Zd)&&e.valid||e.src.startsWith(Xd)))}}a.fonts.discarded-=t.length,t.reverse();try{s.data.value=Id(t.map((e=>e.src)).join(","),{context:"value"})}catch(e){}return!0}return!1}function sp(e,t){let n;if(e.block.children&&(n=e.block.children.filter((e=>{try{return e.property==t&&!_d(e.value).match(/\\9$/)}catch(n){return e.property==t}})).tail),n)try{return _d(n.data.value)}catch(e){}}function ip(e){return JSON.stringify([Fd.normalizeFontFamily(sp(e,"font-family")),Fd.getFontWeight(sp(e,"font-weight")||"400"),sp(e,"font-style")||"normal",sp(e,"unicode-range"),(t=sp(e,"font-stretch"),ep[t]||t),sp(e,"font-variant")||"normal",sp(e,"font-feature-settings"),sp(e,"font-variation-settings")]);var t}function lp(){return{fonts:new Map,medias:new Map,supports:new Map}}var cp=Object.freeze({__proto__:null,process:tp});const up={normalizeFontFamily:te,flatten:ce,getFontWeight:le,removeQuotes:ie},hp=/\s*,\s*/,dp=/-/,pp=/\?/g,mp=/^U\+/i,fp=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function gp(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(),yp(n,o),i=Tp(e,n,s,i))})),n.forEach((e=>{const t=xp(e);t.length&&o.used.push(t),i=Cp(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=>up.normalizeFontFamily(e)))||e}return e})))),o.used=o.used.map((e=>up.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&&(bp(t,o.declared,l,c,i),a.rules.discarded-=t.getSize())})),a}function yp(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)yp(e.block.children,t);else if("Rule"==e.type){const n=xp(e.block);n.length&&t.used.push(n)}else if("Atrule"==e.type&&"font-face"==e.name){const n=up.normalizeFontFamily(wp(e.block.children,"font-family"));if(n){const r=wp(e.block.children,"font-weight")||"400",a=wp(e.block.children,"font-style")||"normal",o=wp(e.block.children,"font-variant")||"normal";r.split(",").forEach((e=>t.declared.push({fontFamily:n,fontWeight:up.getFontWeight(up.removeQuotes(e)),fontStyle:a,fontVariant:o})))}}}))}function bp(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)bp(e.block.children,t,n,r,a);else if("Atrule"==e.type&&"font-face"==e.name){const i=up.normalizeFontFamily(wp(e.block.children,"font-family"));if(i){const l=wp(e.block.children,"unicode-range");!n.find((e=>e.fontFamily==i))&&_p(a,l)&&vp(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 vp(e,t,n,r){let a;const o=r&&r.get(t);if(o&&o.length){let r=wp(e.block.children,"font-style")||"normal";if(fp.find((e=>r.trim().match(e)))){const s=up.getFontWeight(wp(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=>Sp(e,r,i)));a=kp(s,l),a||(l=o.map((e=>((e=Array.from(e))[2]="normal",Sp(e,r,i))))),a=kp(s,l)}else a=!0}else a=!0;return a}function kp(e,t){return e.split(",").find((e=>t.includes(up.getFontWeight(up.removeQuotes(e)))))}function wp(e,t){let n;if(e&&(n=e.filter((e=>e.property==t)).tail),n)try{return up.removeQuotes(_d(n.data.value)).toLowerCase()}catch(e){}}function xp(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(up.normalizeFontFamily(e)),e=""):e+=_d(t)})):t=_d(t.data.value),e&&n.push(up.normalizeFontFamily(e))}const r=e.children.filter((e=>"font"==e.property)).tail;if(r&&r.data&&r.data.value)try{yt(_d(r.data.value)).family.forEach((e=>n.push(up.normalizeFontFamily(e))))}catch(e){}return n}function Sp(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=Ep(t,n)),r||(r=Ap(t,n))),t<400&&(r=n.slice().reverse().find((e=>e<=t)),r||(r=Ap(t,n))),t>500&&(r=n.find((e=>e>=t)),r||(r=Ep(t,n)))):r=n[0]}return r}function Ep(e,t){return t.slice().reverse().find((t=>t<e))}function Ap(e,t){return t.find((t=>t>e))}function Tp(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=Cp(t.block.children,n,r)):r=Tp(e,t.block.children,n,r))})),r}function Cp(e,t,n){const r=Rp(e,"content",t),a=Rp(e,"quotes",t);return n.includes(r)||(n+=r),n.includes(a)||(n+=a),n}function Rp(e,t,n){const r=wp(e,t)||"";return r?(n.textContent='tmp { content:"'+r+'"}',n.sheet&&n.sheet.cssRules?up.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content")):r):""}function _p(e,t){if(t){const n=t.split(hp);let r;const a=n.filter((t=>{const n=t.split(dp);let a;if(2==n.length&&(n[0]=Ip(n[0]),a="["+n[0]+"-"+Ip("U+"+n[1])+"]"),1==n.length)if(n[0].includes("?")){const e=Ip(n[0]),t=e;a="["+e.replace(pp,"0")+"-"+t.replace(pp,"F")+"]"}else n[0]&&(a="["+Ip(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 Ip(e){for(e=e.replace(mp,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var Lp=Object.freeze({__proto__:null,process:gp});const Pp="all",Np=["after","before","first-letter","first-line","placeholder","selection","part","marker"],zp="sf-hidden",Mp=/-(ms|webkit|moz|o)-/;class Dp{constructor(e,t,n){this.doc=e,this.mediaAllInfo=Up(Pp);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!=Pp){const i=Up(t.mediaText);this.mediaAllInfo.medias.set("style-"+a+"-"+t.mediaText,i),Fp(e,s,i,a,n,r,o)}else Fp(e,s,this.mediaAllInfo,a,n,r,o)}a++})),Hp(this.mediaAllInfo),qp(this.mediaAllInfo,[],this.mediaAllInfo,o),o.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function Op(e,t,n){return new Dp(e,t,n).getMediaAllInfo()}function Up(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==Pp&&(t.matchedStyles=new Map),t}function Fp(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=_d(t.prelude),c=Up(l);n.medias.set("rule-"+r+"-"+i+"-"+l,c),i++,Fp(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=>_d(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];Bp(e,{selector:n,selectorText:t,ruleInfo:u},a,o)}l++}}))}function Bp(e,t,n,r){const a=function(e,t){const n=[];r(e={data:Id(_d(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,Id("*",{context:"selector"}).children.head)})),t=_d(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)||Np.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(zp)&&("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=Wp(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 qp(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=_d(t);if("Declaration"==t.type&&(s.match(Mp)||!r.has(t.property)||t.important)&&!jp(s,a)){const a=e.get(t);(!a||t.important&&!a.important)&&(e.set(t,{selectorInfo:n,important:t.important}),s.match(Mp)||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;([e,...t].find((e=>e.rules.get(n)))||e).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=>qp(a,[e,...t],n,r)))}function jp(e,t){let n;return t.textContent="single-file-declaration { "+e+"}",t.sheet&&!t.sheet.cssRules[0].style.length&&(e.match(Mp)||(n=!0)),n}function Hp(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(Hp)}function Wp(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=>Wp(e,t))),t}var Vp=Object.freeze({__proto__:null,getMediaAllInfo:Op});const $p={flatten:ce},Yp="all",Gp="screen";function Kp(e){const t={processed:0,discarded:0};return e.forEach(((n,r)=>{if(Jp(n.mediaText||Yp,Gp)&&n.stylesheet.children){Qp(n.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(r)})),t}function Qp(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++,Jp(_d(a.prelude),Gp)?Qp(a.block.children,t,n):(n.push({cssRules:e,cssRule:r}),t.discarded++))}return n}function Jp(e,t){return $p.flatten(At(e).map((e=>Zp(e,t)))).find((e=>!e.not&&(e.value==t||e.value==Yp)||e.not&&(e.value==Yp||e.value!=t)))}function Zp(e,t,n=[]){return e.nodes.map(((r,a)=>{if("media-query"==r.type)return Zp(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:Yp}),n}var Xp=Object.freeze({__proto__:null,process:Kp});function em(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,tm(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 tm(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=_d(e.prelude);tm(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&&(nm(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 nm(e,t,n){const r=[],a=[];let o;for(let r=e.prelude.children.head;r;r=r.next){const e=_d(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 rm=Object.freeze({__proto__:null,process:em});const am="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";function om(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:n,srcset:r}=sm(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=>lm(e.src))),n=t&&t.src,n==am&&(n=null));r||(t=e.find((e=>lm(e.srcset))),r=t&&t.srcset,r==am&&(r=null));return{src:n,srcset:r}}(Array.from(e.querySelectorAll("source")).reverse());n=t.src,r||(r=t.srcset)}im({src:n,srcset:r},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>im(sm(e),e)))}function sm(e){let t=e.getAttribute("src");t==am&&(t=null);let n=lm(e.getAttribute("srcset"));return n==am&&(n=null),{src:t,srcset:n}}function im(e,t,n){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",am),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),n&&n.querySelectorAll("source").forEach((e=>e.remove()))}function lm(e){if(e){const t=Pd(e);if(t.length)return t.find((e=>e.url)).url}}var cm=Object.freeze({__proto__:null,process:om});const um=["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"],hm=["script","style","pre","textarea"],dm=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],pm={form:{method:"get"},script:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},style:{media:"all",type:"text/css"},link:{media:"all"}},mm=/[ \t\f\r]+/g,fm=/[\n]+/g,gm=/^\s+$/,ym=[function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{um.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=vm(n);for(;r;)n=n.parentElement,r=n&&vm(n);(!n||r)&&t.length>1&&(e.textContent=t.replace(mm,function(e){return e.parentElement&&"HEAD"==e.parentElement.tagName?"\n":" "}(e)).replace(fm,"\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(dm.includes(t.name.toLowerCase())){const n=e.getAttribute(t.name);(""==n||(n||"").match(gm))&&e.removeAttribute(t.name)}}))},function(e){if(1==e.nodeType){const t=pm[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 bm(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=ym.find((e=>e(r,t))),a=r;r=n.nextNode(),e&&a.remove()}}function vm(e){return e&&!hm.includes(e.tagName.toLowerCase())}var km=Object.freeze({__proto__:null,process:bm});const wm=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],xm=[{tagName:"head",accept:e=>!e.childNodes.length||1==e.childNodes[0].nodeType},{tagName:"body",accept:e=>!e.childNodes.length}],Sm=[{tagName:"html",accept:e=>!e||8!=e.nodeType},{tagName:"head",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!Cm(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||!Cm(e.textContent))},{tagName:"caption",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!Cm(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)}],Em=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"];function Am(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+Tm(e.documentElement,t)}function Tm(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||Em.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&&xm.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+=Tm(e,t,n||"svg"==r))):o+=e.innerHTML;const s=t&&Sm.find((t=>r==t.tagName&&t.accept(e.nextSibling,e)));(n||!s&&!wm.includes(r))&&(o+="</"+r+">");return o}(e,t,n):void 0}function Cm(e){return Boolean(e.match(/^[ \t\n\f\r]/))}var Rm=Object.freeze({__proto__:null,process:Am}),_m=Object.freeze({__proto__:null,fontsAltMinifier:cp,fontsMinifier:Lp,matchedRules:Vp,mediasAltMinifier:Xp,cssRulesMinifier:rm,imagesAltMinifier:cm,htmlMinifier:km,serializer:Rm});const Im=globalThis.Set,Lm=globalThis.Map;let Pm,Nm;class zm{constructor(e){this.options=e}async run(){const e=globalThis._singleFile_waitForUserScript;this.options.userScriptEnabled&&e&&await e(Pm.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new Ym(this.options,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(Pm.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const Mm="page-loading",Dm="page-loaded",Om="resource-initializing",Um="resources-initialized",Fm="resource-loaded",Bm="page-ended",qm="stage-started",jm="stage-ended",Hm="stage-task-started",Wm="stage-task-ended";class Vm{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:Mm,PAGE_LOADED:Dm,RESOURCES_INITIALIZING:Om,RESOURCES_INITIALIZED:Um,RESOURCE_LOADED:Fm,PAGE_ENDED:Bm,STAGE_STARTED:qm,STAGE_ENDED:jm,STAGE_TASK_STARTED:Hm,STAGE_TASK_ENDED:Wm}}}const $m=[{sequential:[{action:"preProcessPage"},{option:"loadDeferredImagesKeepZoomLevel",action:"resetZoomLevel"},{action:"replaceStyleContents"},{action:"resetCharsetMeta"},{option:"saveFavicon",action:"saveFavicon"},{action:"replaceCanvasElements"},{action:"insertFonts"},{action:"insertShadowRootContents"},{action:"setInputValues"},{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 Ym{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 Lm,this.batchRequest=new Gm,this.processor=new af(e,this.batchRequest),n){const e=Pm.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?Pm.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new Vm(Mm,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new Vm(Dm,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new Vm(Om,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&Pm.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 Vm(Um,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new Vm(Fm,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 Vm(Bm,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let n;return this.onprogress(new Vm(qm,{pageURL:this.options.url,step:e,frame:t})),$m[e].sequential.forEach((n=>{this.onprogress(new Vm(Hm,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||this.executeTask(n),this.onprogress(new Vm(Wm,{pageURL:this.options.url,step:e,task:n.action,frame:t}))})),n=$m[e].parallel?await Promise.all($m[e].parallel.map((async n=>{this.onprogress(new Vm(Hm,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||await this.executeTask(n),this.onprogress(new Vm(Wm,{pageURL:this.options.url,step:e,task:n.action,frame:t}))}))):Promise.resolve(),this.onprogress(new Vm(jm,{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 Gm{constructor(){this.requests=new Lm,this.duplicates=new Lm}addURL(e,t,n,r){return new Promise(((a,o)=>{const s=JSON.stringify([e,t,n]);let i=this.requests.get(s);i||(i=[],this.requests.set(s,i));const l={resolve:a,reject:o};if(i.push(l),r){let e=this.duplicates.get(s);e||(e=[],this.duplicates.set(s,e)),e.push(l)}}))}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]=JSON.parse(n),i=this.requests.get(n);try{const l=r;r+=1;const c=await Pm.getContent(a,{asBinary:o,expectedType:s,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,frameId:t.windowId,resourceReferrer:t.resourceReferrer});e({url:a}),this.cancelled||i.forEach((e=>{const t=this.duplicates.get(n),r=t&&t.length>1&&t.includes(e);e.resolve({content:c.data,indexResource:l,duplicate:r})}))}catch(t){r+=1,e({url:a}),i.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 Km=["data:text/"],Qm="data:image/svg+xml",Jm="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Zm=/<script/gi,Xm=/<noscript/gi,ef="shadowmode",tf="delegatesfocus",nf="data-template-shadow-root",rf="utf-8";class af{constructor(e,t){this.options=e,this.stats=new Wf(e),this.baseURI=If(e.baseURI||e.url),this.batchRequest=t,this.stylesheets=new Lm,this.styles=new Lm,this.cssVariables=new Lm,this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(Pm.resolveURL("index.rdf",this.options.baseURI||this.options.url))),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 Pm.getContent(this.baseURI,{maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,charset:t,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer}),e=n.data),this.doc=Pm.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&&t!=n.charset)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(){Pm.postProcessDoc(this.doc);const e=Pm.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(Pm.COMMENT_HEADER_LEGACY)||e.textContent.includes(Pm.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?Pm.COMMENT_HEADER_LEGACY:Pm.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(pf)){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.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=Pm.getContentSize(this.doc.documentElement.outerHTML));const n=Pm.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=Pm.getContentSize(n);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",t-e)}let r=await df.evalTemplate(this.options.filenameTemplate,this.options,n)||"";const a=this.options.filenameReplacementCharacter;if(r=Pm.getValidFilename(r,this.options.filenameReplacedCharacters,a),this.options.backgroundSave||(r=r.replace(/\//g,a)),!this.options.saveToGDrive&&Pm.getContentSize(r)>this.options.filenameMaxLength){const e=r.match(/(\.[^.]{3,4})$/),t=e&&e[0]&&e[0].length>1?e[0]:"";r=await Pm.truncateText(r,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 Pm.digest("SHA-256",n)),this.options.retrieveLinks&&(s.links=Array.from(new Im(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["+Pm.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(Pm.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(Pm.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",Jm):(n.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",n.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=Jm||!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(Pm.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(Pm.SELECTED_CONTENT_ATTRIBUTE_NAME);a=a||o,o?(r.removeAttribute(Pm.SELECTED_CONTENT_ATTRIBUTE_NAME),n(r)):a?e(r):t(r)}}))}(this.doc.body),this.doc.body.removeAttribute(Pm.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(Pm.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("."+Pm.SINGLE_FILE_UI_ELEMENT_CLASS).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",rf),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(Pm.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(Pm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(Pm.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(Pm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}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(Pm.CANVAS_ATTRIBUTE_NAME);if(t){const n=this.options.canvases[Number(t)];n&&(df.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("["+Pm.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+Pm.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(!Ff(t)){let n;try{n=Pm.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(n){const t=If(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=Pm.compressCSS(t)),t=df.resolveStylesheetURLs(t,this.baseURI,this.workStyleElement);const n=Nm.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};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);Pf(l,o.charset)||(o=Object.assign({},o,{charset:Nf(l)}),l=await t(e,a,o,s));try{i=Nm.parse(jf(l))}catch(e){}i&&i.children?(o.compressCSS&&df.removeSingleLineCssComments(i),n.stylesheet=i):r.delete(e)}async function t(e,t,n,r){let a;return a="LINK"==e.tagName?await df.resolveLinkStylesheetURLs(e.href,t,n,r):await df.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=>{"OBJECT"==e.tagName?e.setAttribute("data","data:text/html,"):(e.removeAttribute("src"),e.removeAttribute("srcdoc")),Array.from(e.childNodes).forEach((e=>e.remove()));const t=e.getAttribute(Pm.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 Ym(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("["+Pm.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((r=>{const a=r.getAttribute(Pm.SHADOW_ROOT_ATTRIBUTE_NAME);if(a){const o=t.shadowRoots[Number(a)];if(o){const t=e.createElement("template");t.setAttribute(ef,o.mode),o.delegatesFocus&&t.setAttribute(tf),o.adoptedStyleSheets&&o.adoptedStyleSheets.forEach((n=>{const r=e.createElement("style");r.textContent=n,t.appendChild(r)}));const a=Pm.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(nf,""),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;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(Pm.HTML_IMPORT_ATTRIBUTE_NAME);if(r){const t=n.imports[Number(r)];t&&(n.content=t.content,t.runner=new Ym(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=Pm.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=Pm.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){Pm.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=Pm.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){this.options.fontURLs=new Lm,await Promise.all([...this.stylesheets].map((([,e])=>df.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>df.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])=>df.processAttribute(this.doc.querySelectorAll(e),t,this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest,n,r)));e=e.concat([df.processXLinks(this.doc.querySelectorAll("use"),this.baseURI,this.options,this.batchRequest),df.processSrcset(this.doc.querySelectorAll("img[srcset], source[srcset]"),"srcset",this.baseURI,this.batchRequest)]),this.options.removeAudioSrc||e.push(df.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(df.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&&df.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"),e.removeAttribute("src")):(n=e.getAttribute("href"),e.removeAttribute("href")),e.removeAttribute("integrity"),e.textContent="";try{t=Pm.resolveURL(n,this.baseURI)}catch(e){}if(qf(t)){this.stats.add("processed","scripts",1);const n=await Pm.getContent(t,{asBinary:!0,charset:this.charset!=rf&&this.charset,maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer});if(n.data=_f(t,n,this.options),"SCRIPT"==e.tagName)e.setAttribute("src",n.data),""!=e.getAttribute("async")&&"async"!=e.getAttribute("async")&&""!=e.getAttribute(Pm.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(){Pm.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await Pm.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(Pm.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(Pm.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await n.runner.run();const t=await n.runner.getPageData();e.removeAttribute(Pm.WIN_ID_ATTRIBUTE_NAME);let r="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(Xm)||t.content.match(Zm))&&(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(Pm.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(Pm.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(Pm.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=Nm.generate(t.stylesheet);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=Nm.generate(t.stylesheet);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=Nm.generate(t);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(((e,t)=>{this.cssVariables.delete(t),n&&(n+=";"),n+=`${uf+t}:url("${e}")`})),e.textContent=":root{"+n+"}"}}compressHTML(){let e;this.options.displayStats&&(e=Pm.getContentSize(this.doc.documentElement.outerHTML)),Pm.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:Pm.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-Pm.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=Pm.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 df.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const of="data:",sf="about:blank",lf="data:null;base64,",cf=/(#.+?)$/,uf="--sf-img-",hf=524288;class df{static async evalTemplate(e="",t,n,r){const a=Pm.parseURL(t.saveUrl);e=await zf(e,"page-title",(()=>t.title||"No title"),r,t.filenameReplacementCharacter),e=await zf(e,"page-heading",(()=>t.info.heading||"No heading"),r,t.filenameReplacementCharacter),e=await zf(e,"page-language",(()=>t.info.lang||"No language"),r,t.filenameReplacementCharacter),e=await zf(e,"page-description",(()=>t.info.description||"No description"),r,t.filenameReplacementCharacter),e=await zf(e,"page-author",(()=>t.info.author||"No author"),r,t.filenameReplacementCharacter),e=await zf(e,"page-creator",(()=>t.info.creator||"No creator"),r,t.filenameReplacementCharacter),e=await zf(e,"page-publisher",(()=>t.info.publisher||"No publisher"),r,t.filenameReplacementCharacter),await l(t.saveDate),await l(t.visitDate,"visit-"),e=await zf(e,"url-hash",(()=>a.hash.substring(1)||"No hash"),r,t.filenameReplacementCharacter),e=await zf(e,"url-host",(()=>a.host.replace(/\/$/,"")||"No host"),r,t.filenameReplacementCharacter),e=await zf(e,"url-hostname",(()=>a.hostname.replace(/\/$/,"")||"No hostname"),r,t.filenameReplacementCharacter),e=await zf(e,"url-href",(()=>i(a.href)||"No href"),void 0===r||r,t.filenameReplacementCharacter),e=await zf(e,"url-href-flat",(()=>i(a.href)||"No href"),!1,t.filenameReplacementCharacter),e=await zf(e,"url-referrer",(()=>i(t.referrer)||"No referrer"),void 0===r||r,t.filenameReplacementCharacter),e=await zf(e,"url-referrer-flat",(()=>i(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await zf(e,"url-password",(()=>a.password||"No password"),r,t.filenameReplacementCharacter),e=await zf(e,"url-pathname",(()=>i(a.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===r||r,t.filenameReplacementCharacter),e=await zf(e,"url-pathname-flat",(()=>i(a.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await zf(e,"url-port",(()=>a.port||"No port"),r,t.filenameReplacementCharacter),e=await zf(e,"url-protocol",(()=>a.protocol||"No protocol"),r,t.filenameReplacementCharacter),e=await zf(e,"url-search",(()=>a.search.substring(1)||"No search"),r,t.filenameReplacementCharacter);const o=a.search.substring(1).split("&").map((e=>e.split("=")));for(const[n,a]of o)e=await zf(e,"url-search-"+n,(()=>a||""),r,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await zf(e,"url-username",(()=>a.username||"No username"),r,t.filenameReplacementCharacter),e=await zf(e,"tab-id",(()=>String(t.tabId||"No tab id")),r,t.filenameReplacementCharacter),e=await zf(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),r,t.filenameReplacementCharacter),e=await zf(e,"url-last-segment",(()=>i(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 zf(e,"digest-sha-256",(async()=>Pm.digest("SHA-256",n)),r,t.filenameReplacementCharacter),e=await zf(e,"digest-sha-384",(async()=>Pm.digest("SHA-384",n)),r,t.filenameReplacementCharacter),e=await zf(e,"digest-sha-512",(async()=>Pm.digest("SHA-512",n)),r,t.filenameReplacementCharacter));const s=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await zf(e,"bookmark-pathname",(()=>s),void 0===r||r,t.filenameReplacementCharacter),e=await zf(e,"bookmark-pathname-flat",(()=>s),!1,t.filenameReplacementCharacter),(e=await zf(e,"profile-name",(()=>t.profileName),r,t.filenameReplacementCharacter)).trim();function i(e){try{return decodeURI(e)}catch(t){return e}}async function l(n,a=""){n&&(e=await zf(e,a+"datetime-iso",(()=>n.toISOString()),r,t.filenameReplacementCharacter),e=await zf(e,a+"date-iso",(()=>n.toISOString().split("T")[0]),r,t.filenameReplacementCharacter),e=await zf(e,a+"time-iso",(()=>n.toISOString().split("T")[1].split("Z")[0]),r,t.filenameReplacementCharacter),e=await zf(e,a+"date-locale",(()=>n.toLocaleDateString()),r,t.filenameReplacementCharacter),e=await zf(e,a+"time-locale",(()=>n.toLocaleTimeString()),r,t.filenameReplacementCharacter),e=await zf(e,a+"day-locale",(()=>String(n.getDate()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"month-locale",(()=>String(n.getMonth()+1).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"year-locale",(()=>String(n.getFullYear())),r,t.filenameReplacementCharacter),e=await zf(e,a+"datetime-locale",(()=>n.toLocaleString()),r,t.filenameReplacementCharacter),e=await zf(e,a+"datetime-utc",(()=>n.toUTCString()),r,t.filenameReplacementCharacter),e=await zf(e,a+"day-utc",(()=>String(n.getUTCDate()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"month-utc",(()=>String(n.getUTCMonth()+1).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"year-utc",(()=>String(n.getUTCFullYear())),r,t.filenameReplacementCharacter),e=await zf(e,a+"hours-locale",(()=>String(n.getHours()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"minutes-locale",(()=>String(n.getMinutes()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"seconds-locale",(()=>String(n.getSeconds()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"hours-utc",(()=>String(n.getUTCHours()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"minutes-utc",(()=>String(n.getUTCMinutes()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(e,a+"seconds-utc",(()=>String(n.getUTCSeconds()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await zf(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=Of(Array.from(e.querySelectorAll('link[href][rel="icon"], link[href][rel="shortcut icon"]')));t||(t=Of(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 Im){const o=function(e){return e.match(wf)||[]}(e=df.resolveStylesheetURLs(e,t,r));return await Promise.all(o.map((async o=>{const i=function(e){const t=e.match(xf)||e.match(Sf)||e.match(Ef)||e.match(Af)||e.match(Tf)||e.match(Cf);if(t){const[,e,n]=t;return{resourceURL:e,media:n}}}(o);if(i){const l=Mf(o);let c=If(i.resourceURL);if(!Ff(c)&&Bf(c)){try{c=Pm.resolveURL(i.resourceURL,t)}catch(e){}if(qf(c)&&!a.has(c)){const t=await s(c);c=t.resourceURL,t.data=_f(c,t,n);let u=jf(t.data);if(n.compressCSS&&(u=Pm.compressCSS(u)),u=function(e,t){return t?"@media "+t+"{ "+e+" }":e}(u,i.media),e.includes(o)){const t=new Im(a);t.add(c),u=await df.resolveImportURLs(u,c,n,r,t),r.textContent=u,e=r.sheet&&r.sheet.cssRules.length||!r.sheet&&u?e.replace(l,u):e.replace(l,"")}}else e=e.replace(l,"")}else e=e.replace(l,"")}}))),e;async function s(e){const t=await Pm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,validateTextContentType:!0,frameId:n.frameId,charset:n.charset,resourceReferrer:n.resourceReferrer});return Pf(t.data,t.charset||n.charset)?t:(n=Object.assign({},n,{charset:Nf(t.data)}),s(e))}}static resolveStylesheetURLs(e,t,n){return Df(e,!0).map((r=>{const a=Uf(r);let o=If(a);if(n.textContent='tmp { content:"'+o+'"}',n.sheet&&n.sheet.cssRules&&(o=Pm.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content"))),!Ff(o))if(!o||Bf(o)){let n;if(!a.startsWith("#"))try{n=Pm.resolveURL(o,t)}catch(e){}qf(n)&&o!=n&&e.includes(r)&&(e=e.replace(Mf(r),a?r.replace(a,n):"url("+n+")"))}else{let t;t=a?r.replace(a,lf):"url(data:null;base64,)",e=e.replace(Mf(r),t)}})),e}static async resolveLinkStylesheetURLs(e,t,n,r){if((e=If(e))&&e!=t&&e!=sf){const a=await Pm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,charset:n.charset,frameId:n.frameId,resourceReferrer:n.resourceReferrer,validateTextContentType:!0});if(!Pf(a.data,a.charset||n.charset))return n=Object.assign({},n,{charset:Nf(a.data)}),df.resolveLinkStylesheetURLs(e,t,n,r);e=a.resourceURL,a.data=_f(a.resourceURL,a,n);let o=jf(a.data);return n.compressCSS&&(o=Pm.compressCSS(o)),o=await df.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,t){await Promise.all(e.block.children.toArray().map((async e=>{if("Declaration"==e.type&&e.value.children){const n=Df(Lf(e.value),!0);await Promise.all(n.map((async n=>{const r=Uf(n),o=If(r);if(!Ff(o)&&qf(o)){let{content:n}=await a.addURL(o,!0,"font"),s=t.get(e);s||(s=[],t.set(e,s)),s.push(o),function(e,t,n){e.value.children.forEach((e=>{"Url"==e.type&&Pm.removeQuotes(Lf(e.value))==t&&(e.value.value=n)}))}(e,r,n)}})))}})))}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&&Pm.removeQuotes(Lf(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=Nm.parse(e.value.value,{context:"value"})}catch(e){}if("Declaration"==e.type&&e.value.children){const t=Df(Lf(e.value));await Promise.all(t.map((async t=>{const s=Uf(t),i=If(s);if(!Ff(i)&&qf(i)){let t,{content:l,indexResource:c,duplicate:u}=await a.addURL(i,!0,"image",!0);const h=[];o(s,e.value.children,((e,r,a)=>{if(!s.startsWith("#"))if(u&&n.groupDuplicateImages&&a&&Pm.getContentSize(l)<hf){const n=Nm.parse("var("+uf+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,l),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=If(c);let u=e.dataset.singleFileOriginURL;if(delete e.dataset.singleFileOriginURL,!Ff(c)&&(e.setAttribute(t,Jm),Bf(c))){try{c=Pm.resolveURL(c,n)}catch(e){}if(qf(c)){let{content:h,indexResource:d,duplicate:p}=await s.addURL(c,!0,"image","IMG"==e.tagName&&"src"==t);if(u&&h==lf){try{u=Pm.resolveURL(u,n)}catch(e){}try{c=u,h=(await Pm.getContent(c,{asBinary:!0,expectedType:"image",maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,frameId:r.windowId,resourceReferrer:r.resourceReferrer})).data}catch(e){}}if(l&&h==lf)e.remove();else{if(!Km.filter((e=>h.startsWith(e))).length){const n=h.startsWith(Qm);if(i&&p&&r.groupDuplicateImages&&!n&&Pm.getContentSize(h)<hf)if(df.replaceImageSource(e,uf+d,r)){a.set(d,h);const t=Nm.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){let a="xlink:href";await Promise.all(Array.from(e).map((async e=>{let o=e.getAttribute(a);null==o&&(a="href",o=e.getAttribute(a));let s=If(o);if(Bf(s)&&!Ff(s)){e.setAttribute(a,Jm);try{s=Pm.resolveURL(s,t)}catch(e){}if(qf(s)){const{content:t}=await r.addURL(s),n=o.match(cf);if(n&&n[0]){let r;try{r=Pm.parseSVGContent(t).querySelector(n[0])}catch(e){}r&&(e.setAttribute(a,n[0]),e.parentElement.insertBefore(r,e.parentElement.firstChild))}else e.setAttribute(a,"data:image/svg+xml,"+t)}}else s==n.url&&e.setAttribute(a,o.substring(s.length))})))}static async processSrcset(e,t,n,r){await Promise.all(Array.from(e).map((async e=>{const a=Pm.parseSrcset(e.getAttribute(t)),o=await Promise.all(a.map((async e=>{let t=If(e.url);if(Ff(t))return t+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(Bf(t)){try{t=Pm.resolveURL(t,n)}catch(e){}if(qf(t)){const{content:n}=await r.addURL(t,!0,"image");return Km.filter((e=>n.startsWith(e))).length?"":n+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute(t,o.join(", "))})))}static replaceImageSource(e,t,n){if(e.getAttribute(Pm.IMAGE_ATTRIBUTE_NAME)){const r=n.images[Number(e.getAttribute(Pm.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),df.setBackgroundImage(e,"var("+t+")",n),e.removeAttribute(Pm.IMAGE_ATTRIBUTE_NAME),!0}}}}const pf=/^https?:\/\//,mf=/^file:\/\//,ff=/^https?:\/\/+\s*$/,gf=/^(https?:\/\/|file:\/\/|blob:).+/,yf=/(url\s*\(\s*'(.*?)'\s*\))|(url\s*\(\s*"(.*?)"\s*\))|(url\s*\(\s*(.*?)\s*\))/gi,bf=/^url\s*\(\s*'(.*?)'\s*\)$/i,vf=/^url\s*\(\s*"(.*?)"\s*\)$/i,kf=/^url\s*\(\s*(.*?)\s*\)$/i,wf=/(@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,xf=/@import\s*url\s*\(\s*'(.*?)'\s*\)\s*(.*?)(;|$|})/i,Sf=/@import\s*url\s*\(\s*"(.*?)"\s*\)\s*(.*?)(;|$|})/i,Ef=/@import\s*url\s*\(\s*(.*?)\s*\)\s*(.*?)(;|$|})/i,Af=/@import\s*'(.*?)'\s*(.*?)(;|$|})/i,Tf=/@import\s*"(.*?)"\s*(.*?)(;|$|})/i,Cf=/@import\s*(.*?)\s*(.*?)(;|$|})/i,Rf=/([{}()^$&.*?/+|[\\\\]|\]|-)/g;function _f(e,t,n){return n.rootDocument&&n.updatedResources[e]?(n.updatedResources[e].retrieved=!0,n.updatedResources[e].content):t.data||""}function If(e){return!e||e.startsWith(of)?e:e.split("#")[0]}function Lf(e){let t="";try{t=Nm.generate(e)}catch(e){}return t}function Pf(e,t="utf-8"){const n=Nf(e);return!n||n==t.toLowerCase()}function Nf(e){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}async function zf(e,t,n,r,a){let o;if(e){const s="{\\s*"+t.replace(/\W|_/g,"[$&]")+"\\s*}";let i=new RegExp(s+"\\[\\d+\\]","g");if(e.match(i)){const t=e.match(i)[0];o=Number(t.match(/\[(\d+)\]$/)[1]),(isNaN(o)||o<=0)&&(o=null)}else i=new RegExp(s,"g");if(e.match(i)){let t=await n();return r||(t=t.replace(/\/+/g,a)),o&&(t=await Pm.truncateText(t,o)),e.replace(i,t)}}return e}function Mf(e){return new RegExp(e.replace(Rf,"\\$1"),"gi")}function Df(e,t){const n=e.match(yf)||[];return t?[...new Im(n)]:n}function Of(e){return(e=e.filter((e=>e.href!=Jm))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function Uf(e){const t=e.match(bf)||e.match(vf)||e.match(kf);return t&&t[1]}function Ff(e){return e&&(e.startsWith(of)||e==sf)}function Bf(e){return e&&!e.match(ff)}function qf(e){return Bf(e)&&(e.match(pf)||e.match(mf)||e.startsWith("blob:"))&&e.match(gf)}function jf(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 Hf={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 Wf{constructor(e){this.options=e,e.displayStats&&(this.data=JSON.parse(JSON.stringify(Hf)))}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 Vf=1048576,$f=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],Yf=globalThis.URL,Gf=globalThis.DOMParser,Kf=globalThis.Blob,Qf=globalThis.FileReader,Jf=e=>globalThis.fetch(e),Zf=globalThis.crypto,Xf=globalThis.TextDecoder,eg=globalThis.TextEncoder;function tg(e){return(e=e||{}).fetch=e.fetch||Jf,e.frameFetch=e.frameFetch||e.fetch||Jf,{getContent:async function(t,n){let r;const a=e.fetch,o=e.frameFetch;try{if(n.frameId)try{r=await o(t,{frameId:n.frameId,referrer:n.resourceReferrer})}catch(e){r=await a(t)}else r=await a(t,{referrer:n.resourceReferrer})}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 Od(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*Vf)return{data:"data:null;base64,",resourceURL:t};{const e=new Qf;e.readAsDataURL(new Kf([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*Vf)return{data:"",resourceURL:t,charset:i};try{return{data:new Xf(i).decode(s),resourceURL:t,charset:i}}catch(e){try{return i="utf-8",{data:new Xf(i).decode(s),resourceURL:t,charset:i}}catch(e){return{data:"",resourceURL:t,charset:i}}}}},parseURL:(e,t)=>void 0===t?new Yf(e):new Yf(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getValidFilename:(e,t=$f,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 Gf).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 Gf).parseFromString(e,"text/xml"),parseSVGContent:e=>(new Gf).parseFromString(e,"image/svg+xml"),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 Zf.subtle.digest(e,new eg("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new Kf([e]).size,truncateText(e,t){const n=new Kf([e]),r=new Qf;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)=>bm(e,t),minifyCSSRules:(e,t,n)=>em(e,t,n),removeUnusedFonts:(e,t,n,r)=>gp(e,t,n,r),removeAlternativeFonts:(e,t,n,r)=>tp(e,t,n,r),getMediaAllInfo:(e,t,n)=>Op(e,t,n),compressCSS:(e,t)=>Vn(e,t),minifyMedias:e=>Kp(e),removeAlternativeImages:e=>om(e),parseSrcset:e=>Pd(e),preProcessDoc:(e,t,n)=>J(e,t,n),postProcessDoc(e,t){ne(e,t)},serialize:(e,t)=>Am(e,t),removeQuotes:e=>ie(e),ON_BEFORE_CAPTURE_EVENT_NAME:x,ON_AFTER_CAPTURE_EVENT_NAME:S,WIN_ID_ATTRIBUTE_NAME:I,REMOVED_CONTENT_ATTRIBUTE_NAME:E,HIDDEN_CONTENT_ATTRIBUTE_NAME:A,HIDDEN_FRAME_ATTRIBUTE_NAME:C,IMAGE_ATTRIBUTE_NAME:L,POSTER_ATTRIBUTE_NAME:P,CANVAS_ATTRIBUTE_NAME:N,HTML_IMPORT_ATTRIBUTE_NAME:z,INPUT_VALUE_ATTRIBUTE_NAME:M,SHADOW_ROOT_ATTRIBUTE_NAME:_,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:R,STYLESHEET_ATTRIBUTE_NAME:O,SELECTED_CONTENT_ATTRIBUTE_NAME:F,COMMENT_HEADER:$,COMMENT_HEADER_LEGACY:Y,SINGLE_FILE_UI_ELEMENT_CLASS:G}}function ng(t){e.SingleFile=function(...e){return[Pm,Nm]=e,zm}(tg(t),Ld)}e.getPageData=async function(t={},n,r=globalThis.document,a=globalThis){const o=tt;let s;if(ng(n),r&&a){Q(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(ke(t))}[t.frames]=await Promise.all(e),s=t.frames&&t.frames.sessionId}t.doc=r,t.win=a,t.insertSingleFileComment=!0,t.insertCanonicalLink=!0,t.onprogress=e=>{e.type===e.RESOURCES_INITIALIZED&&r&&a&&t.loadDeferredImages&&we(t)};const i=new e.SingleFile(t);return await i.run(),s&&o.cleanup(s),await i.getPageData()},e.helper=ue,e.init=ng,e.modules=_m,e.processors=ot,e.vendor=Ud,Object.defineProperty(e,"__esModule",{value:!0})}));
|