From a43df630c4a10b03b8babea26c120f8ccb2d81e3 Mon Sep 17 00:00:00 2001 From: Gildas Date: Wed, 28 Jul 2021 00:23:39 +0200 Subject: [PATCH] bump version --- dist/single-file.js | 2 +- manifest.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/single-file.js b/dist/single-file.js index efc17eb30..68f0c2255 100644 --- a/dist/single-file.js +++ b/dist/single-file.js @@ -1 +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;let l;if(l=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=[],s instanceof i&&r&&r.runtime&&r.runtime.getURL){c="single-file-new-font-face",u=e=>{const t=e.detail;l.find((e=>JSON.stringify(e)==JSON.stringify(t)))||l.push(e.detail)},globalThis.addEventListener(c,u,h);let e=s.createElement("script");e.textContent="("+function(){"undefined"==typeof globalThis&&(window.globalThis=window);const e=globalThis.console,t=e=>globalThis.dispatchEvent(e),n=globalThis.CustomEvent,r=globalThis.FileReader,a=globalThis.Blob,o=e&&e.warn&&((...t)=>e.warn(...t))||(()=>{}),s="single-file-new-font-face",i={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 l;globalThis.FontFace=function(){l||(o("SingleFile is hooking the FontFace constructor to get font URLs."),l=!0);const c={};c["font-family"]=arguments[0],c.src=arguments[1];const u=arguments[2];if(u&&Object.keys(u).forEach((e=>{i[e]&&(c[i[e]]=u[e])})),c.src instanceof ArrayBuffer){const e=new r;e.readAsDataURL(new a([c.src])),e.addEventListener("load",(()=>{c.src="url("+e.result+")",t(new n(s,{detail:c}))}))}else t(new n(s,{detail:c}));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 c,u,h;function d(){return l}function p(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 m(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 f(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 g=Object.freeze({__proto__:null,getFontsData:d,loadDeferredImagesStart:p,loadDeferredImagesEnd:m,loadDeferredImagesResetZoomLevel:f,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:n});const y=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function b(e){return e.replace(y,((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 v=Object.freeze({__proto__:null,process:b});const k="single-file-on-before-capture",w="single-file-on-after-capture",x="data-single-file-removed-content",S="data-single-file-hidden-content",E="data-single-file-kept-content",A="data-single-file-hidden-frame",T="data-single-file-preserved-space-element",C="data-single-file-shadow-root-element",R="data-single-file-win-id",_="data-single-file-image",I="data-single-file-poster",L="data-single-file-canvas",P="data-single-file-import",N="data-single-file-input-value",z="data-single-file-lazy-loaded-src",M="data-single-file-stylesheet",D="data-single-file-disabled-noscript",O="data-single-file-selected-content",U="data-single-file-async-script",F="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",B=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD"],q=/^'(.*?)'$/,j=/^"(.*?)"$/,H={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},W="Page saved with SingleFile",V="Archive processed by SingleFile",$="single-file-ui-element",Y=(e,t,n)=>globalThis.addEventListener(e,t,n);function G(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function K(e,t,n){let r;return e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(D,e.textContent),e.textContent=""})),G(e),e.head&&e.head.querySelectorAll(F).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+F+", html > body > "+F);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))})),r=t&&e.documentElement?Q(t,e,e.documentElement,n):{canvases:[],images:[],posters:[],usedFonts:[],shadowRoots:[],imports:[],markedElements:[]},{canvases:r.canvases,fonts:d(),stylesheets:te(e),images:r.images,posters:r.posters,usedFonts:Array.from(r.usedFonts.values()),shadowRoots:r.shadowRoots,imports:r.imports,referrer:e.referrer,markedElements:r.markedElements}}function Q(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"))&&B.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(S,""),a.markedElements.push(n)))),!s)){if(r.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(n.setAttribute(T,""),a.markedElements.push(n))}r.removeUnusedFonts&&(J(l,r,a.usedFonts),J(e.getComputedStyle(n,":first-letter"),r,a.usedFonts),J(e.getComputedStyle(n,":before"),r,a.usedFonts),J(e.getComputedStyle(n,":after"),r,a.usedFonts))}!function(e,t,n,r,a,o,s){if("CANVAS"==n.tagName)try{const t=ne(e,n,s);a.canvases.push({dataURI:n.toDataURL("image/png",""),width:t.width,height:t.height}),n.setAttribute(L,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(z)||n.currentSrc};if(a.images.push(t),n.setAttribute(_,a.images.length-1),a.markedElements.push(n),n.removeAttribute(z),s=s||e.getComputedStyle(n)){t.size=ne(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(I,a.posters.length-1),a.markedElements.push(n)}catch(e){}}"IFRAME"==n.tagName&&o&&r.removeHiddenElements&&(n.setAttribute(A,""),a.markedElements.push(n));"LINK"==n.tagName&&n.import&&n.import.documentElement&&(a.imports.push({content:ae(n.import)}),n.setAttribute(P,a.imports.length-1),a.markedElements.push(n));"INPUT"==n.tagName&&("password"!=n.type&&(n.setAttribute(N,n.value),a.markedElements.push(n)),"radio"!=n.type&&"checkbox"!=n.type||(n.setAttribute(N,n.checked),a.markedElements.push(n)));"TEXTAREA"==n.tagName&&(n.setAttribute(N,n.value),a.markedElements.push(n));"SELECT"==n.tagName&&n.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(N,""),a.markedElements.push(e))}));"SCRIPT"==n.tagName&&(n.async&&""!=n.getAttribute("async")&&"async"!=n.getAttribute("async")&&(n.setAttribute(U,""),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)&&Z(n);if(c&&!n.classList.contains($)){const o={};n.setAttribute(C,a.shadowRoots.length),a.markedElements.push(n),a.shadowRoots.push(o),Q(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"))))}Q(e,t,n,r,a,s),!r.autoSaveExternalSave&&r.removeHiddenElements&&o&&(i||""==n.getAttribute(E)?n.parentElement&&(n.parentElement.setAttribute(E,""),a.markedElements.push(n.parentElement)):s&&(n.setAttribute(x,""),a.markedElements.push(n)))})),a}function J(e,t,n){if(e){const r=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((a=>{if(a=X(a),!t.loadedFonts||t.loadedFonts.find((e=>X(e.family)==a&&e.style==r))){const t=se(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 Z(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 X(e=""){return oe(b(e.trim())).toLowerCase()}function ee(e,t){if(e.querySelectorAll("[data-single-file-disabled-noscript]").forEach((e=>{e.textContent=e.getAttribute(D),e.removeAttribute(D)})),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=[x,A,S,T,_,I,L,N,C,P,M,U];t=e.querySelectorAll(n.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(x),e.removeAttribute(S),e.removeAttribute(E),e.removeAttribute(A),e.removeAttribute(T),e.removeAttribute(_),e.removeAttribute(I),e.removeAttribute(L),e.removeAttribute(N),e.removeAttribute(C),e.removeAttribute(P),e.removeAttribute(M),e.removeAttribute(U)}))}function te(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((n,r)=>{try{const a=e.createElement("style");a.textContent=n.textContent,e.body.appendChild(a);const o=a.sheet;a.remove(),o&&o.cssRules.length==n.sheet.cssRules.length||(n.setAttribute(M,r),t[r]=Array.from(n.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function ne(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=re("padding-left",n),s=re("padding-right",n),i=re("padding-top",n),l=re("padding-bottom",n),p?(c=re("border-left-width",n),u=re("border-right-width",n),h=re("border-top-width",n),d=re("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 re(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function ae(e){const t=e.doctype;let n="";return t&&(n=" "),n+e.documentElement.outerHTML}function oe(e){return(e=e.match(q)?e.replace(q,"$1"):e.replace(j,"$1")).trim()}function se(e){return H[e.toLowerCase().trim()]||e}function ie(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?ie(t):t)),[])}var le=Object.freeze({__proto__:null,initUserScriptHandler:function(){Y("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),n=new Promise((t=>Y(e+"-response",t)));(e=>{globalThis.dispatchEvent(e)})(t),t.defaultPrevented&&await n}))},initDoc:G,preProcessDoc:K,postProcessDoc:ee,serialize:ae,removeQuotes:oe,flatten:ie,getFontWeight:se,normalizeFontFamily:X,getShadowRoot:Z,ON_BEFORE_CAPTURE_EVENT_NAME:k,ON_AFTER_CAPTURE_EVENT_NAME:w,WIN_ID_ATTRIBUTE_NAME:R,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:T,REMOVED_CONTENT_ATTRIBUTE_NAME:x,HIDDEN_CONTENT_ATTRIBUTE_NAME:S,HIDDEN_FRAME_ATTRIBUTE_NAME:A,IMAGE_ATTRIBUTE_NAME:_,POSTER_ATTRIBUTE_NAME:I,CANVAS_ATTRIBUTE_NAME:L,INPUT_VALUE_ATTRIBUTE_NAME:N,SHADOW_ROOT_ATTRIBUTE_NAME:C,HTML_IMPORT_ATTRIBUTE_NAME:P,LAZY_SRC_ATTRIBUTE_NAME:z,STYLESHEET_ATTRIBUTE_NAME:M,SELECTED_CONTENT_ATTRIBUTE_NAME:O,ASYNC_SCRIPT_ATTRIBUTE_NAME:U,COMMENT_HEADER:W,COMMENT_HEADER_LEGACY:V,SINGLE_FILE_UI_ELEMENT_CLASS:$});const ce=z,ue=$,he="attributes",de=globalThis.browser,pe=globalThis.document,me=globalThis.MutationObserver,fe=(e,t,n)=>globalThis.addEventListener(e,t,n),ge=(e,t,n)=>globalThis.removeEventListener(e,t,n),ye=new Map;async function be(e){if(pe.documentElement){ye.clear();const r=Math.max(pe.documentElement.scrollHeight-1.5*pe.documentElement.clientHeight,0),a=Math.max(pe.documentElement.scrollWidth-1.5*pe.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 me((async t=>{if((t=t.filter((e=>e.type==he))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(ce,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(ue)})).length&&(a=!0,await we(s,e,h),o.size||await ke(s,e,h))}}));async function i(t){await Se("idleTimeout",(async()=>{a?(Ae("idleTimeout"),await i(Math.max(500,t/2))):(Ae("loadTimeout"),Ae("maxTimeout"),xe(s,e,h))}),t)}function l(e){const t=e.target;t.removeAttribute(ce),t.removeEventListener("load",l)}async function c(t){a=!0,await we(s,e,h),await ke(s,e,h),t.detail&&o.add(t.detail)}async function u(t){await we(s,e,h),await ke(s,e,h),o.delete(t.detail),o.size||await ke(s,e,h)}function h(e){s.disconnect(),ge(t,c),ge(n,u),r(e)}await i(2*e.loadDeferredImagesMaxIdleTime),await we(s,e,h),s.observe(pe,{subtree:!0,childList:!0,attributes:!0}),fe(t,c),fe(n,u),p(e)}))}(e)}}function ve(e){f(e)}async function ke(e,t,n){await Se("loadTimeout",(()=>xe(e,t,n)),t.loadDeferredImagesMaxIdleTime)}async function we(e,t,n){await Se("maxTimeout",(async()=>{await Ae("loadTimeout"),await xe(e,t,n)}),10*t.loadDeferredImagesMaxIdleTime)}async function xe(e,t,n){await Ae("idleTimeout"),m(t),await Se("endTimeout",(async()=>{await Ae("maxTimeout"),n()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Se(e,t,n){if(de&&de.runtime&&de.runtime.sendMessage){if(!ye.get(e)||!ye.get(e).pending){const r={callback:t,pending:!0};ye.set(e,r);try{await de.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:n})}catch(r){Ee(e,t,n)}r.pending=!1}}else Ee(e,t,n)}function Ee(e,t,n){const r=ye.get(e);r&&globalThis.clearTimeout(r),ye.set(e,t),globalThis.setTimeout(t,n)}async function Ae(e){if(de&&de.runtime&&de.runtime.sendMessage)try{await de.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){Te(e)}else Te(e)}function Te(e){const t=ye.get(e);ye.delete(e),t&&globalThis.clearTimeout(t)}de&&de.runtime&&de.runtime.onMessage&&de.runtime.onMessage.addListener&&de.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ye.get(e.type);if(t){ye.delete(e.type);try{t.callback()}catch(t){Te(e.type)}}}}));var Ce=Object.freeze({__proto__:null,process:be,resetZoomLevel:ve});const Re={ON_BEFORE_CAPTURE_EVENT_NAME:k,ON_AFTER_CAPTURE_EVENT_NAME:w,WIN_ID_ATTRIBUTE_NAME:R,preProcessDoc:K,serialize:ae,postProcessDoc:ee,getShadowRoot:Z},_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&&be(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:g,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;e0&&(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;a0?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{})){for(let t=0;t+()\],])/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;t2&&">"===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{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;e255&&(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;at.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;n100&&(c=o-60+3,o=58);for(var u=s;u<=i;u++)u>=0&&u0&&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=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 te.length)return!1;for(var a=t;a=0&&Er(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t>Fr:Mr},lookupOffset:function(e){return(e+=this.tokenIndex)0?e>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]>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>Fr,this.tokenEnd=t&Ur):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var e=this.tokenIndex+1;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>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=r1?(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):"",a.css=o,a.mismatchOffset=s,a.mismatchLength=i,a.message=e+"\n syntax: "+a.syntax+"\n value: "+(o||"")+"\n --------"+new Array(a.mismatchOffset+1).join("-")+"^",Object.assign(a,l),a.loc={source:n&&n.loc&&n.loc.source||"",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=e.length?void(h>ka,l[c]=m,l[m++]=c;m0?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 te.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;ne.index||e.balancee.index||e.balance=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;t57)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;a1&&(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&&#|<'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(;a2&&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=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=yb&&(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=yy){for(;y":"<'"+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=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");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(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",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",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>>=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)}}));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;var li=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=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&&er||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;d0){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;te||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":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||counter( , <'list-style-type'>? )]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","counter()":"counter( , ? )","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fit-content()":"fit-content( [|] )","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"|||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] ","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"||min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [||min-content|max-content|auto] , [|||min-content|max-content|auto] )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' ","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","saturate()":"saturate( )","scale()":"scale( , ? )","scale3d()":"scale3d( , , )","scaleX()":"scaleX( )","scaleY()":"scaleY( )","scaleZ()":"scaleZ( )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"