@lark-sentry/screen-record 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@lark-sentry/types"),r=require("@lark-sentry/utils"),s=require("@lark-sentry/reporter"),n=require("@lark-sentry/constants"),i=Object.defineProperty,o=(e,t,r)=>((e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),a=Object.defineProperty,l=(e,t,r)=>((e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),h=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(h||{});const c={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},u={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},d={};function p(e){if(d[e])return d[e];const t=globalThis[e],r=t.prototype,s=e in c?c[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),i=e in u?u[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return d[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?d[e]=i:r}catch{return r}}const f={};function m(e,t,r){var s;const n=`${e}.${String(r)}`;if(f[n])return f[n].call(t);const i=p(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(f[n]=o,o.call(t)):t[r]}const g={};function y(e,t,r){const s=`${e}.${String(r)}`;if(g[s])return g[s].bind(t);const n=p(e)[r];return"function"!=typeof n?t[r]:(g[s]=n,n.bind(t))}const w={childNodes:function(e){return m("Node",e,"childNodes")},parentNode:function(e){return m("Node",e,"parentNode")},parentElement:function(e){return m("Node",e,"parentElement")},textContent:function(e){return m("Node",e,"textContent")},contains:function(e,t){return y("Node",e,"contains")(t)},getRootNode:function(e){return y("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?m("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?m("Element",e,"shadowRoot"):null},querySelector:function(e,t){return m("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return m("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return p("MutationObserver").constructor}};function b(e){return e.nodeType===e.ELEMENT_NODE}function v(e){const t=e&&"host"in e&&"mode"in e&&w.host(e)||null;return Boolean(t&&"shadowRoot"in t&&w.shadowRoot(t)===e)}function S(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function _(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,e=>C(e,s)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function C(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=_(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?D(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?D(r,t):r}}class k{constructor(){l(this,"idNodeMap",new Map),l(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function x({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";const a=s&&I(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function I(e){return e.toLowerCase()}const O="__rrweb_original__";function A(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?I(t):null}function R(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const M=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,E=/^(?:[a-z+]+:)?\/\//i,T=/^www\..*/i,N=/^(data:)([^,]*),(.*)/i;function D(e,t){return(e||"").replace(M,(e,r,s,n,i,o)=>{const a=s||i||o,l=r||n||"";if(!a)return e;if(E.test(a)||T.test(a))return`url(${l}${a}${l})`;if(N.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const h=t.split("/"),c=a.split("/");h.pop();for(const e of c)"."!==e&&(".."===e?h.pop():h.push(e));return`url(${l}${h.join("/")}${l})`})}function L(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function F(e,t){return function(e,t){const r=Array.from(t.childNodes),s=[];if(r.length>1&&e&&"string"==typeof e){const t=L(e);for(let n=1;n<r.length;n++)if(r[n].textContent&&"string"==typeof r[n].textContent){const i=L(r[n].textContent);for(let r=3;r<i.length;r++){const n=i.substring(0,r);if(2===t.split(n).length){const r=t.indexOf(n);for(let t=r;t<e.length;t++)if(L(e.substring(0,t)).length===r){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(e,t).join("/* rr_split */")}let z=1;const P=new RegExp("[^a-z0-9-_:]");function U(){return z++}let B,Z;const j=/^[^ \t\n\r\u000c]+/,W=/^[, \t\n\r\u000c]+/;const V=new WeakMap;function G(e,t){return t&&""!==t.trim()?H(e,t):t}function Y(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function H(e,t){let r=V.get(e);if(r||(r=e.createElement("a"),V.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function J(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?G(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(W),!(r>=t.length);){let i=s(j);if(","===i.slice(-1))i=G(e,i.substring(0,i.length-1)),n.push(i);else{let s="";i=G(e,i);let o=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((i+s).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,n.push((i+s).trim());break}"("===e&&(o=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?D(s,H(e)):"object"===t&&"data"===r?G(e,s):s:G(e,s):s}function X(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function K(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&K(w.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&K(w.parentNode(e),t,r)}function $(e,t,r,s){let n;if(b(e)){if(n=e,!w.childNodes(n).length)return!1}else{if(null===w.parentElement(e))return!1;n=w.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(K(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function q(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:p,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g=!1,cssCaptured:y=!1}=t,b=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:h.Document,childNodes:[],compatMode:e.compatMode}:{type:h.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:h.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:f}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=I(e.tagName);return P.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const s=e.attributes[t];X(g,s.name,s.value)||(y[s.name]=J(r,g,I(s.name),s.value))}if("link"===g&&i){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=_(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=_(e.sheet);t&&(e.childNodes.length>1&&(t=F(t,e)),y._cssText=t)}if("input"===g||"textarea"===g||"select"===g){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=x({element:e,type:A(e),tagName:g,value:t,maskInputOptions:o,maskInputFn:a}):r&&(y.checked=r)}"option"===g&&(e.selected&&!o.select?y.selected=!0:delete y.selected);"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,i=O in n?n[O]:n;if(new Uint32Array(i.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(l.type,l.quality)&&(y.rr_dataURL=t)}if("img"===g&&c){B||(B=r.createElement("canvas"),Z=B.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{B.width=t.naturalWidth,B.height=t.naturalHeight,Z.drawImage(t,0,0),y.rr_dataURL=B.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?y.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===g||"video"===g){const t=y;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(m){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==g||d(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(g)&&(b=!0)}catch(e){}return{type:h.Element,tagName:g,attributes:y,childNodes:[],isSVG:Y(e)||void 0,needBlock:m,rootId:f,isCustom:b}}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,dataURLOptions:d,inlineImages:p,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g,rootId:b});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,o=w.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;u?l="SCRIPT_PLACEHOLDER":i||(l=w.textContent(e),c&&l&&(l=D(l,H(t.doc))));!c&&!u&&l&&r&&(l=s?s(l,w.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:h.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:o,maskTextFn:c,rootId:b,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:h.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:h.Comment,textContent:w.textContent(e)||"",rootId:b};default:return!1}}function Q(e){return null==e?"":e.toLowerCase()}function ee(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:g=!1,recordCanvas:y=!1,onSerialize:_,onIframeLoad:C,iframeLoadTimeout:k=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:A=!1,cssCaptured:M=!1}=t;let{needsMask:E}=t,{preserveWhiteSpace:T=!0}=t;if(!E){E=$(e,o,a,void 0===E)}const N=q(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:E,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,dataURLOptions:m,inlineImages:g,recordCanvas:y,keepIframeSrcFn:O,newlyAddedElement:A,cssCaptured:M});if(!N)return console.warn(e,"not serialized"),null;let D;D=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===h.Comment)return!0;if(e.type===h.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===R(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Q(e.attributes.name)||"icon"===Q(e.attributes.rel)||"apple-touch-icon"===Q(e.attributes.rel)||"shortcut icon"===Q(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Q(e.attributes.property).match(/^(og|twitter|fb):/)||Q(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Q(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Q(e.attributes.name)||"googlebot"===Q(e.attributes.name)||"bingbot"===Q(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Q(e.attributes.name)||"generator"===Q(e.attributes.name)||"framework"===Q(e.attributes.name)||"publisher"===Q(e.attributes.name)||"progid"===Q(e.attributes.name)||Q(e.attributes.property).match(/^article:/)||Q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Q(e.attributes.name)||"yandex-verification"===Q(e.attributes.name)||"csrf-token"===Q(e.attributes.name)||"p:domain_verify"===Q(e.attributes.name)||"verify-v1"===Q(e.attributes.name)||"verification"===Q(e.attributes.name)||"shopify-checkout-api-token"===Q(e.attributes.name)))return!0}}return!1}(N,f)||!T&&N.type===h.Text&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?-2:U();const L=Object.assign(N,{id:D});if(s.add(e,L),-2===D)return null;_&&_(e);let F=!l;if(L.type===h.Element){F=F&&!L.needBlock,delete L.needBlock;const t=w.shadowRoot(e);t&&S(t)&&(L.isShadowHost=!0)}if((L.type===h.Document||L.type===h.Element)&&F){f.headWhitespace&&L.type===h.Element&&"head"===L.tagName&&(T=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:E,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:y,preserveWhiteSpace:T,onSerialize:_,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:O,cssCaptured:!1};if(L.type===h.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else{L.type===h.Element&&void 0!==L.attributes._cssText&&"string"==typeof L.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(w.childNodes(e))){const e=ee(r,t);e&&L.childNodes.push(e)}}let v=null;if(b(e)&&(v=w.shadowRoot(e)))for(const e of Array.from(w.childNodes(v))){const r=ee(e,t);r&&(S(v)&&(r.isShadow=!0),L.childNodes.push(r))}}const z=w.parentNode(e);return z&&v(z)&&S(z)&&(L.isShadow=!0),L.type===h.Element&&"iframe"===L.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,i=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout(()=>{i||(t(),i=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}const o="about:blank";if(s.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&C){const r=ee(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:E,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:y,preserveWhiteSpace:T,onSerialize:_,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:O});r&&C(e,r)}},k),L.type===h.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===R(L.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(x){const t=ee(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:E,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:y,preserveWhiteSpace:T,onSerialize:_,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:O});t&&x(e,t)}},I),L}function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function re(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var se={exports:{}},ne=String,ie=function(){return{isColorSupported:!1,reset:ne,bold:ne,dim:ne,italic:ne,underline:ne,inverse:ne,hidden:ne,strikethrough:ne,black:ne,red:ne,green:ne,yellow:ne,blue:ne,magenta:ne,cyan:ne,white:ne,gray:ne,bgBlack:ne,bgRed:ne,bgGreen:ne,bgYellow:ne,bgBlue:ne,bgMagenta:ne,bgCyan:ne,bgWhite:ne}};se.exports=ie(),se.exports.createColors=ie;var oe=se.exports;const ae=re(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let le=oe,he=ae,ce=class e extends Error{constructor(t,r,s,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=le.isColorSupported),he&&e&&(t=he(t));let r,s,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=le.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(o)+e+"\n "+t+r("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var ue=ce;ce.default=ce;var de={};de.isClean=Symbol("isClean"),de.my=Symbol("my");const pe={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let fe=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return pe[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[n]?s=this[n](i,e):i.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var o;return void 0===s&&(s=pe[r]),i.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var me=fe;fe.default=fe;let ge=me;function ye(e,t){new ge(t).stringify(e)}var we=ye;ye.default=ye;let{isClean:be,my:ve}=de,Se=ue,_e=me,Ce=we;function ke(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>ke(e,r)):("object"===i&&null!==n&&(n=ke(n)),r[s]=n)}return r}let xe=class{constructor(e={}){this.raws={},this[be]=!1,this[ve]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ke(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Se(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[be]){this[be]=!1;let e=this;for(;e=e.parent;)e[be]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new _e).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ce){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Ie=xe;xe.default=xe;let Oe=Ie,Ae=class extends Oe{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Re=Ae;Ae.default=Ae;var Me={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Ee,SourceMapGenerator:Te}=ae,{existsSync:Ne,readFileSync:De}=ae,{dirname:Le,join:Fe}=ae;let ze=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Le(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ee(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Le(e),Ne(e))return this.mapFile=e,De(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Ee)return Te.fromSourceMap(t).toString();if(t instanceof Te)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Fe(Le(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Pe=ze;ze.default=ze;let{SourceMapConsumer:Ue,SourceMapGenerator:Be}=ae,{fileURLToPath:Ze,pathToFileURL:je}=ae,{isAbsolute:We,resolve:Ve}=ae,{nanoid:Ge}=Me,Ye=ae,He=ue,Je=Pe,Xe=Symbol("fromOffsetCache"),Ke=Boolean(Ue&&Be),$e=Boolean(Ve&&We),qe=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!$e||/^\w+:\/\//.test(t.from)||We(t.from)?this.file=t.from:this.file=Ve(t.from)),$e&&Ke){let e=new Je(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Ge(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,o=e.col}else i=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return n=a?new He(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new He(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin),n.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(je&&(n.input.url=je(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Xe])r=this[Xe];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Xe]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ve(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:s,line:r})),i=We(a.source)?je(a.source):new URL(a.source,this.map.consumer().sourceRoot||je(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Ze)throw new Error("file: protocol is not available in this PostCSS build");l.file=Ze(i)}let h=o.sourceContentFor(a.source);return h&&(l.source=h),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Qe=qe;qe.default=qe,Ye&&Ye.registerInput&&Ye.registerInput(qe);let{SourceMapConsumer:et,SourceMapGenerator:tt}=ae,{dirname:rt,relative:st,resolve:nt,sep:it}=ae,{pathToFileURL:ot}=ae,at=Qe,lt=Boolean(et&&tt),ht=Boolean(rt&&nt&&st&&it);var ct=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||rt(e.file);!1===this.mapOpts.sourcesContent?(t=new et(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ht&&lt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=tt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new tt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new tt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=s-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?rt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=rt(nt(r,this.mapOpts.annotation)));let s=st(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new at(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ot){let t=ot(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===it&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let ut=Ie,dt=class extends ut{constructor(e){super(e),this.type="comment"}};var pt=dt;dt.default=dt;let ft,mt,gt,yt,{isClean:wt,my:bt}=de,vt=Re,St=pt,_t=Ie;function Ct(e){return e.map(e=>(e.nodes&&(e.nodes=Ct(e.nodes)),delete e.source,e))}function kt(e){if(e[wt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)kt(t)}let xt=class e extends _t{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Ct(ft(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new vt(t)]}else if(t.selector)t=[new mt(t)];else if(t.name)t=[new gt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new St(t)]}return t.map(t=>(t[bt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[wt]&&kt(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};xt.registerParse=e=>{ft=e},xt.registerRule=e=>{mt=e},xt.registerAtRule=e=>{gt=e},xt.registerRoot=e=>{yt=e};var It=xt;xt.default=xt,xt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,gt.prototype):"rule"===e.type?Object.setPrototypeOf(e,mt.prototype):"decl"===e.type?Object.setPrototypeOf(e,vt.prototype):"comment"===e.type?Object.setPrototypeOf(e,St.prototype):"root"===e.type&&Object.setPrototypeOf(e,yt.prototype),e[bt]=!0,e.nodes&&e.nodes.forEach(e=>{xt.rebuild(e)})};let Ot,At,Rt=It,Mt=class extends Rt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ot(new At,this,e).stringify()}};Mt.registerLazyResult=e=>{Ot=e},Mt.registerProcessor=e=>{At=e};var Et=Mt;Mt.default=Mt;let Tt={};var Nt=function(e){Tt[e]||(Tt[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Dt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Lt=Dt;Dt.default=Dt;let Ft=Lt,zt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Ft(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Pt=zt;zt.default=zt;const Ut="'".charCodeAt(0),Bt='"'.charCodeAt(0),Zt="\\".charCodeAt(0),jt="/".charCodeAt(0),Wt="\n".charCodeAt(0),Vt=" ".charCodeAt(0),Gt="\f".charCodeAt(0),Yt="\t".charCodeAt(0),Ht="\r".charCodeAt(0),Jt="[".charCodeAt(0),Xt="]".charCodeAt(0),Kt="(".charCodeAt(0),$t=")".charCodeAt(0),qt="{".charCodeAt(0),Qt="}".charCodeAt(0),er=";".charCodeAt(0),tr="*".charCodeAt(0),rr=":".charCodeAt(0),sr="@".charCodeAt(0),nr=/[\t\n\f\r "#'()/;[\\\]{}]/g,ir=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,or=/.[\r\n"'(/\\]/,ar=/[\da-f]/i;let lr=It,hr=class extends lr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var cr=hr;hr.default=hr,lr.registerAtRule(hr);let ur,dr,pr=It,fr=class extends pr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ur(new dr,this,e).stringify()}};fr.registerLazyResult=e=>{ur=e},fr.registerProcessor=e=>{dr=e};var mr=fr;fr.default=fr,pr.registerRoot(fr);let gr={comma:e=>gr.split(e,[","],!0),space:e=>gr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",h=!1;for(let r of e)h?h=!1:"\\"===r?h=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var yr=gr;gr.default=gr;let wr=It,br=yr,vr=class extends wr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return br.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Sr=vr;vr.default=vr,wr.registerRule(vr);let _r=Re,Cr=function(e,t={}){let r,s,n,i,o,a,l,h,c,u,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case Wt:case Vt:case Yt:case Ht:case Gt:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Vt||r===Wt||r===Yt||r===Ht||r===Gt);u=["space",d.slice(m,s)],m=s-1;break;case Jt:case Xt:case qt:case Qt:case rr:case er:case $t:{let e=String.fromCharCode(r);u=[e,e,m];break}case Kt:if(h=g.length?g.pop()[1]:"",c=d.charCodeAt(m+1),"url"===h&&c!==Ut&&c!==Bt&&c!==Vt&&c!==Wt&&c!==Yt&&c!==Gt&&c!==Ht){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}w("bracket")}for(l=s;d.charCodeAt(l-1)===Zt;)l-=1,a=!a}while(a);u=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),i=d.slice(m,s+1),-1===s||or.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Ut:case Bt:n=r===Ut?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}w("string")}for(l=s;d.charCodeAt(l-1)===Zt;)l-=1,a=!a}while(a);u=["string",d.slice(m,s+1),m,s],m=s;break;case sr:nr.lastIndex=m+1,nr.test(d),s=0===nr.lastIndex?d.length-1:nr.lastIndex-2,u=["at-word",d.slice(m,s+1),m,s],m=s;break;case Zt:for(s=m,o=!0;d.charCodeAt(s+1)===Zt;)s+=1,o=!o;if(r=d.charCodeAt(s+1),o&&r!==jt&&r!==Vt&&r!==Wt&&r!==Yt&&r!==Ht&&r!==Gt&&(s+=1,ar.test(d.charAt(s)))){for(;ar.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Vt&&(s+=1)}u=["word",d.slice(m,s+1),m,s],m=s;break;default:r===jt&&d.charCodeAt(m+1)===tr?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:w("comment")),u=["comment",d.slice(m,s+1),m,s],m=s):(ir.lastIndex=m+1,ir.test(d),s=0===ir.lastIndex?d.length-1:ir.lastIndex-2,u=["word",d.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},kr=pt,xr=cr,Ir=mr,Or=Sr;const Ar={empty:!0,space:!0};let Rr=It,Mr=class{constructor(e){this.input=e,this.root=new Ir,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new xr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new kr;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Cr(this.input)}decl(e,t){let r=new _r;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Or;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,o,a,l=r.length,h="",c=!0;for(let e=0;e<l;e+=1)n=r[e],i=n[0],"space"!==i||e!==l-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",Ar[a]||Ar[o]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new Or;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Er=Qe;function Tr(e,t){let r=new Er(e,t),s=new Mr(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Nr=Tr;Tr.default=Tr,Rr.registerParse(Tr);let{isClean:Dr,my:Lr}=de,Fr=ct,zr=we,Pr=It,Ur=Et,Br=Nt,Zr=Pt,jr=Nr,Wr=mr;const Vr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gr={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Yr={Once:!0,postcssPlugin:!0,prepare:!0};function Hr(e){return"object"==typeof e&&"function"==typeof e.then}function Jr(e){let t=!1,r=Vr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Xr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Jr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Kr(e){return e[Dr]=!1,e.nodes&&e.nodes.forEach(e=>Kr(e)),e}let $r={},qr=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Zr)n=Kr(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=jr;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Lr]&&Pr.rebuild(n)}else n=Kr(r);this.result=new Zr(t,n,s),this.helpers={...$r,postcss:$r,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),i=s.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Gr[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Yr[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Hr(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Dr];){e[Dr]=!0;let t=[Xr(e)];for(;t.length>0;){let e=this.visitTick(t);if(Hr(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return Hr(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=zr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fr(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Hr(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Dr];)e[Dr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Br("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Hr(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Dr])return s[Dr]=!0,void e.push(Xr(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Dr]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Dr]=!0;let t=Jr(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Dr]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};qr.registerPostcss=e=>{$r=e};var Qr=qr;qr.default=qr,Wr.registerLazyResult(qr),Ur.registerLazyResult(qr);let es=ct,ts=we,rs=Nt,ss=Nr;const ns=Pt;let is=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=ts;this.result=new ns(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new es(n,s,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||rs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ss;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var os=is;is.default=is;let as=os,ls=Qr,hs=Et,cs=mr,us=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new ls(this,e,t):new as(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ds=us;us.default=us,cs.registerProcessor(us),hs.registerProcessor(us);let ps=Re,fs=Pe,ms=pt,gs=cr,ys=Qe,ws=mr,bs=Sr;function vs(e,t){if(Array.isArray(e))return e.map(e=>vs(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:ys.prototype};r.map&&(r.map={...r.map,__proto__:fs.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>vs(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new ws(s);if("decl"===s.type)return new ps(s);if("rule"===s.type)return new bs(s);if("comment"===s.type)return new ms(s);if("atrule"===s.type)return new gs(s);throw new Error("Unknown node type: "+e.type)}var Ss=vs;vs.default=vs;let _s=ue,Cs=Re,ks=Qr,xs=It,Is=ds,Os=we,As=Ss,Rs=Et,Ms=Lt,Es=pt,Ts=cr,Ns=Pt,Ds=Qe,Ls=Nr,Fs=yr,zs=Sr,Ps=mr,Us=Ie;function Bs(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Is(e)}Bs.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Is).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Bs([n(r)]).process(e,t)},n},Bs.stringify=Os,Bs.parse=Ls,Bs.fromJSON=As,Bs.list=Fs,Bs.comment=e=>new Es(e),Bs.atRule=e=>new Ts(e),Bs.decl=e=>new Cs(e),Bs.rule=e=>new zs(e),Bs.root=e=>new Ps(e),Bs.document=e=>new Rs(e),Bs.CssSyntaxError=_s,Bs.Declaration=Cs,Bs.Container=xs,Bs.Processor=Is,Bs.Document=Rs,Bs.Comment=Es,Bs.Warning=Ms,Bs.AtRule=Ts,Bs.Result=Ns,Bs.Input=Ds,Bs.Rule=zs,Bs.Root=Ps,Bs.Node=Us,ks.registerPostcss(Bs);var Zs=Bs;Bs.default=Bs;const js=te(Zs);js.stringify,js.fromJSON,js.plugin,js.parse,js.list,js.document,js.comment,js.atRule,js.rule,js.decl,js.root,js.CssSyntaxError,js.Declaration,js.Container,js.Processor,js.Document,js.Comment,js.Warning,js.AtRule,js.Result,js.Input,js.Rule,js.Root,js.Node;var Ws=Object.defineProperty,Vs=(e,t,r)=>((e,t,r)=>t in e?Ws(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Gs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ys(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var Hs={exports:{}},Js=String,Xs=function(){return{isColorSupported:!1,reset:Js,bold:Js,dim:Js,italic:Js,underline:Js,inverse:Js,hidden:Js,strikethrough:Js,black:Js,red:Js,green:Js,yellow:Js,blue:Js,magenta:Js,cyan:Js,white:Js,gray:Js,bgBlack:Js,bgRed:Js,bgGreen:Js,bgYellow:Js,bgBlue:Js,bgMagenta:Js,bgCyan:Js,bgWhite:Js}};Hs.exports=Xs(),Hs.exports.createColors=Xs;var Ks=Hs.exports;const $s=Ys(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let qs=Ks,Qs=$s,en=class e extends Error{constructor(t,r,s,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=qs.isColorSupported),Qs&&e&&(t=Qs(t));let r,s,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=qs.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(o)+e+"\n "+t+r("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var tn=en;en.default=en;var rn={};rn.isClean=Symbol("isClean"),rn.my=Symbol("my");const sn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let nn=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return sn[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[n]?s=this[n](i,e):i.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var o;return void 0===s&&(s=sn[r]),i.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var on=nn;nn.default=nn;let an=on;function ln(e,t){new an(t).stringify(e)}var hn=ln;ln.default=ln;let{isClean:cn,my:un}=rn,dn=tn,pn=on,fn=hn;function mn(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>mn(e,r)):("object"===i&&null!==n&&(n=mn(n)),r[s]=n)}return r}let gn=class{constructor(e={}){this.raws={},this[cn]=!1,this[un]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=mn(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new dn(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[cn]){this[cn]=!1;let e=this;for(;e=e.parent;)e[cn]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new pn).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=fn){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var yn=gn;gn.default=gn;let wn=yn,bn=class extends wn{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var vn=bn;bn.default=bn;var Sn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:_n,SourceMapGenerator:Cn}=$s,{existsSync:kn,readFileSync:xn}=$s,{dirname:In,join:On}=$s;let An=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=In(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new _n(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=In(e),kn(e))return this.mapFile=e,xn(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof _n)return Cn.fromSourceMap(t).toString();if(t instanceof Cn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=On(In(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Rn=An;An.default=An;let{SourceMapConsumer:Mn,SourceMapGenerator:En}=$s,{fileURLToPath:Tn,pathToFileURL:Nn}=$s,{isAbsolute:Dn,resolve:Ln}=$s,{nanoid:Fn}=Sn,zn=$s,Pn=tn,Un=Rn,Bn=Symbol("fromOffsetCache"),Zn=Boolean(Mn&&En),jn=Boolean(Ln&&Dn),Wn=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!jn||/^\w+:\/\//.test(t.from)||Dn(t.from)?this.file=t.from:this.file=Ln(t.from)),jn&&Zn){let e=new Un(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Fn(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,o=e.col}else i=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return n=a?new Pn(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new Pn(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin),n.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Nn&&(n.input.url=Nn(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Bn])r=this[Bn];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Bn]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ln(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:s,line:r})),i=Dn(a.source)?Nn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Nn(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Tn)throw new Error("file: protocol is not available in this PostCSS build");l.file=Tn(i)}let h=o.sourceContentFor(a.source);return h&&(l.source=h),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Vn=Wn;Wn.default=Wn,zn&&zn.registerInput&&zn.registerInput(Wn);let{SourceMapConsumer:Gn,SourceMapGenerator:Yn}=$s,{dirname:Hn,relative:Jn,resolve:Xn,sep:Kn}=$s,{pathToFileURL:$n}=$s,qn=Vn,Qn=Boolean(Gn&&Yn),ei=Boolean(Hn&&Xn&&Jn&&Kn);var ti=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Hn(e.file);!1===this.mapOpts.sourcesContent?(t=new Gn(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ei&&Qn&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Yn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Yn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Yn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=s-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Hn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Hn(Xn(r,this.mapOpts.annotation)));let s=Jn(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new qn(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($n){let t=$n(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Kn&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let ri=yn,si=class extends ri{constructor(e){super(e),this.type="comment"}};var ni=si;si.default=si;let ii,oi,ai,li,{isClean:hi,my:ci}=rn,ui=vn,di=ni,pi=yn;function fi(e){return e.map(e=>(e.nodes&&(e.nodes=fi(e.nodes)),delete e.source,e))}function mi(e){if(e[hi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)mi(t)}let gi=class e extends pi{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=fi(ii(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new ui(t)]}else if(t.selector)t=[new oi(t)];else if(t.name)t=[new ai(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new di(t)]}return t.map(t=>(t[ci]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[hi]&&mi(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};gi.registerParse=e=>{ii=e},gi.registerRule=e=>{oi=e},gi.registerAtRule=e=>{ai=e},gi.registerRoot=e=>{li=e};var yi=gi;gi.default=gi,gi.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ai.prototype):"rule"===e.type?Object.setPrototypeOf(e,oi.prototype):"decl"===e.type?Object.setPrototypeOf(e,ui.prototype):"comment"===e.type?Object.setPrototypeOf(e,di.prototype):"root"===e.type&&Object.setPrototypeOf(e,li.prototype),e[ci]=!0,e.nodes&&e.nodes.forEach(e=>{gi.rebuild(e)})};let wi,bi,vi=yi,Si=class extends vi{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new wi(new bi,this,e).stringify()}};Si.registerLazyResult=e=>{wi=e},Si.registerProcessor=e=>{bi=e};var _i=Si;Si.default=Si;let Ci={};var ki=function(e){Ci[e]||(Ci[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let xi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ii=xi;xi.default=xi;let Oi=Ii,Ai=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Oi(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Ri=Ai;Ai.default=Ai;const Mi="'".charCodeAt(0),Ei='"'.charCodeAt(0),Ti="\\".charCodeAt(0),Ni="/".charCodeAt(0),Di="\n".charCodeAt(0),Li=" ".charCodeAt(0),Fi="\f".charCodeAt(0),zi="\t".charCodeAt(0),Pi="\r".charCodeAt(0),Ui="[".charCodeAt(0),Bi="]".charCodeAt(0),Zi="(".charCodeAt(0),ji=")".charCodeAt(0),Wi="{".charCodeAt(0),Vi="}".charCodeAt(0),Gi=";".charCodeAt(0),Yi="*".charCodeAt(0),Hi=":".charCodeAt(0),Ji="@".charCodeAt(0),Xi=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ki=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,$i=/.[\r\n"'(/\\]/,qi=/[\da-f]/i;let Qi=yi,eo=class extends Qi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var to=eo;eo.default=eo,Qi.registerAtRule(eo);let ro,so,no=yi,io=class extends no{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ro(new so,this,e).stringify()}};io.registerLazyResult=e=>{ro=e},io.registerProcessor=e=>{so=e};var oo=io;io.default=io,no.registerRoot(io);let ao={comma:e=>ao.split(e,[","],!0),space:e=>ao.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",h=!1;for(let r of e)h?h=!1:"\\"===r?h=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var lo=ao;ao.default=ao;let ho=yi,co=lo,uo=class extends ho{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return co.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var po=uo;uo.default=uo,ho.registerRule(uo);let fo=vn,mo=function(e,t={}){let r,s,n,i,o,a,l,h,c,u,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case Di:case Li:case zi:case Pi:case Fi:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Li||r===Di||r===zi||r===Pi||r===Fi);u=["space",d.slice(m,s)],m=s-1;break;case Ui:case Bi:case Wi:case Vi:case Hi:case Gi:case ji:{let e=String.fromCharCode(r);u=[e,e,m];break}case Zi:if(h=g.length?g.pop()[1]:"",c=d.charCodeAt(m+1),"url"===h&&c!==Mi&&c!==Ei&&c!==Li&&c!==Di&&c!==zi&&c!==Fi&&c!==Pi){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}w("bracket")}for(l=s;d.charCodeAt(l-1)===Ti;)l-=1,a=!a}while(a);u=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),i=d.slice(m,s+1),-1===s||$i.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case Mi:case Ei:n=r===Mi?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}w("string")}for(l=s;d.charCodeAt(l-1)===Ti;)l-=1,a=!a}while(a);u=["string",d.slice(m,s+1),m,s],m=s;break;case Ji:Xi.lastIndex=m+1,Xi.test(d),s=0===Xi.lastIndex?d.length-1:Xi.lastIndex-2,u=["at-word",d.slice(m,s+1),m,s],m=s;break;case Ti:for(s=m,o=!0;d.charCodeAt(s+1)===Ti;)s+=1,o=!o;if(r=d.charCodeAt(s+1),o&&r!==Ni&&r!==Li&&r!==Di&&r!==zi&&r!==Pi&&r!==Fi&&(s+=1,qi.test(d.charAt(s)))){for(;qi.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Li&&(s+=1)}u=["word",d.slice(m,s+1),m,s],m=s;break;default:r===Ni&&d.charCodeAt(m+1)===Yi?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:w("comment")),u=["comment",d.slice(m,s+1),m,s],m=s):(Ki.lastIndex=m+1,Ki.test(d),s=0===Ki.lastIndex?d.length-1:Ki.lastIndex-2,u=["word",d.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}},go=ni,yo=to,wo=oo,bo=po;const vo={empty:!0,space:!0};let So=yi,_o=class{constructor(e){this.input=e,this.root=new wo,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new yo;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new go;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=mo(this.input)}decl(e,t){let r=new fo;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new bo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,o,a,l=r.length,h="",c=!0;for(let e=0;e<l;e+=1)n=r[e],i=n[0],"space"!==i||e!==l-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",vo[a]||vo[o]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new bo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Co=Vn;function ko(e,t){let r=new Co(e,t),s=new _o(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var xo=ko;ko.default=ko,So.registerParse(ko);let{isClean:Io,my:Oo}=rn,Ao=ti,Ro=hn,Mo=yi,Eo=_i,To=ki,No=Ri,Do=xo,Lo=oo;const Fo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zo={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Po={Once:!0,postcssPlugin:!0,prepare:!0};function Uo(e){return"object"==typeof e&&"function"==typeof e.then}function Bo(e){let t=!1,r=Fo[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Zo(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Bo(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function jo(e){return e[Io]=!1,e.nodes&&e.nodes.forEach(e=>jo(e)),e}let Wo={},Vo=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof No)n=jo(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Do;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Oo]&&Mo.rebuild(n)}else n=jo(r);this.result=new No(t,n,s),this.helpers={...Wo,postcss:Wo,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),i=s.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!zo[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Po[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Uo(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Io];){e[Io]=!0;let t=[Zo(e)];for(;t.length>0;){let e=this.visitTick(t);if(Uo(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return Uo(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Ro;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Ao(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Uo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Io];)e[Io]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||To("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Uo(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Io])return s[Io]=!0,void e.push(Zo(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Io]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Io]=!0;let t=Bo(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Io]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Vo.registerPostcss=e=>{Wo=e};var Go=Vo;Vo.default=Vo,Lo.registerLazyResult(Vo),Eo.registerLazyResult(Vo);let Yo=ti,Ho=hn,Jo=ki,Xo=xo;const Ko=Ri;let $o=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Ho;this.result=new Ko(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Yo(n,s,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Jo("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Xo;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var qo=$o;$o.default=$o;let Qo=qo,ea=Go,ta=_i,ra=oo,sa=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new ea(this,e,t):new Qo(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var na=sa;sa.default=sa,ra.registerProcessor(sa),ta.registerProcessor(sa);let ia=vn,oa=Rn,aa=ni,la=to,ha=Vn,ca=oo,ua=po;function da(e,t){if(Array.isArray(e))return e.map(e=>da(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:ha.prototype};r.map&&(r.map={...r.map,__proto__:oa.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>da(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new ca(s);if("decl"===s.type)return new ia(s);if("rule"===s.type)return new ua(s);if("comment"===s.type)return new aa(s);if("atrule"===s.type)return new la(s);throw new Error("Unknown node type: "+e.type)}var pa=da;da.default=da;let fa=tn,ma=vn,ga=Go,ya=yi,wa=na,ba=hn,va=pa,Sa=_i,_a=Ii,Ca=ni,ka=to,xa=Ri,Ia=Vn,Oa=xo,Aa=lo,Ra=po,Ma=oo,Ea=yn;function Ta(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new wa(e)}Ta.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new wa).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Ta([n(r)]).process(e,t)},n},Ta.stringify=ba,Ta.parse=Oa,Ta.fromJSON=va,Ta.list=Aa,Ta.comment=e=>new Ca(e),Ta.atRule=e=>new ka(e),Ta.decl=e=>new ma(e),Ta.rule=e=>new Ra(e),Ta.root=e=>new Ma(e),Ta.document=e=>new Sa(e),Ta.CssSyntaxError=fa,Ta.Declaration=ma,Ta.Container=ya,Ta.Processor=wa,Ta.Document=Sa,Ta.Comment=Ca,Ta.Warning=_a,Ta.AtRule=ka,Ta.Result=xa,Ta.Input=Ia,Ta.Rule=Ra,Ta.Root=Ma,Ta.Node=Ea,ga.registerPostcss(Ta);var Na=Ta;Ta.default=Ta;const Da=Gs(Na);Da.stringify,Da.fromJSON,Da.plugin,Da.parse,Da.list,Da.document,Da.comment,Da.atRule,Da.rule,Da.decl,Da.root,Da.CssSyntaxError,Da.Declaration,Da.Container,Da.Processor,Da.Document,Da.Comment,Da.Warning,Da.AtRule,Da.Result,Da.Input,Da.Rule,Da.Root,Da.Node;class La{constructor(...e){Vs(this,"parentElement",null),Vs(this,"parentNode",null),Vs(this,"ownerDocument"),Vs(this,"firstChild",null),Vs(this,"lastChild",null),Vs(this,"previousSibling",null),Vs(this,"nextSibling",null),Vs(this,"ELEMENT_NODE",1),Vs(this,"TEXT_NODE",3),Vs(this,"nodeType"),Vs(this,"nodeName"),Vs(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof La))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Fa={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},za={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Pa={};function Ua(e){if(Pa[e])return Pa[e];const t=globalThis[e],r=t.prototype,s=e in Fa?Fa[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),i=e in za?za[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return Pa[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?Pa[e]=i:r}catch{return r}}const Ba={};function Za(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ba[n])return Ba[n].call(t);const i=Ua(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(Ba[n]=o,o.call(t)):t[r]}const ja={};function Wa(e,t,r){const s=`${e}.${String(r)}`;if(ja[s])return ja[s].bind(t);const n=Ua(e)[r];return"function"!=typeof n?t[r]:(ja[s]=n,n.bind(t))}function Va(){return Ua("MutationObserver").constructor}const Ga={childNodes:function(e){return Za("Node",e,"childNodes")},parentNode:function(e){return Za("Node",e,"parentNode")},parentElement:function(e){return Za("Node",e,"parentElement")},textContent:function(e){return Za("Node",e,"textContent")},contains:function(e,t){return Wa("Node",e,"contains")(t)},getRootNode:function(e){return Wa("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Za("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Za("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Za("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Za("Element",e,"querySelectorAll")(t)},mutationObserver:Va};function Ya(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Ha="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Ja={map:{},getId:()=>(console.error(Ha),-1),getNode:()=>(console.error(Ha),null),removeNodeFromMap(){console.error(Ha)},has:()=>(console.error(Ha),!1),reset(){console.error(Ha)}};function Xa(e,t,r={}){let s=null,n=0;return function(...i){const o=Date.now();n||!1!==r.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=o,e.apply(l,i)):s||!1===r.trailing||(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,i)},a))}}function Ka(e,t,r,s,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Ka(e,t,i||{},!0)}function $a(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ja=new Proxy(Ja,{get:(e,t,r)=>("map"===t&&console.error(Ha),Reflect.get(e,t,r))}));let qa=Date.now;function Qa(e){var t,r,s,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=Ga.parentElement(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(s=Ga.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function el(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function tl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function rl(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Ga.parentElement(e)}function sl(e,t,r,s){if(!e)return!1;const n=rl(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(K(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function nl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function il(e,t){if(v(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Ga.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||il(s,t))}function ol(e){return Boolean(e.changedTouches)}function al(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function ll(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function hl(e){return!!e&&(e instanceof La&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ga.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(qa=()=>(new Date).getTime());class cl{constructor(){o(this,"id",1),o(this,"styleIDMap",new WeakMap),o(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ul(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ga.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ga.host(Ga.getRootNode(e))&&(r=Ga.host(Ga.getRootNode(e))),r}function dl(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=ul(r);)r=t;return r}(e);return Ga.contains(t,r)}function pl(e){const t=e.ownerDocument;return!!t&&(Ga.contains(t,e)||dl(e))}var fl=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(fl||{}),ml=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ml||{}),gl=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(gl||{}),yl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(yl||{}),wl=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(wl||{}),bl=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(bl||{}),vl=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(vl||{});function Sl(e){return"__ln"in e}class _l{constructor(){o(this,"length",0),o(this,"head",null),o(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Sl(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Sl(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Cl=(e,t)=>`${e}@${t}`;class kl{constructor(){o(this,"frozen",!1),o(this,"locked",!1),o(this,"texts",[]),o(this,"attributes",[]),o(this,"attributeMap",new WeakMap),o(this,"removes",[]),o(this,"mapRemoves",[]),o(this,"movedMap",{}),o(this,"addedSet",new Set),o(this,"movedSet",new Set),o(this,"droppedSet",new Set),o(this,"removesSubTreeCache",new Set),o(this,"mutationCb"),o(this,"blockClass"),o(this,"blockSelector"),o(this,"maskTextClass"),o(this,"maskTextSelector"),o(this,"inlineStylesheet"),o(this,"maskInputOptions"),o(this,"maskTextFn"),o(this,"maskInputFn"),o(this,"keepIframeSrcFn"),o(this,"recordCanvas"),o(this,"inlineImages"),o(this,"slimDOMOptions"),o(this,"dataURLOptions"),o(this,"doc"),o(this,"mirror"),o(this,"iframeManager"),o(this,"stylesheetManager"),o(this,"shadowDomManager"),o(this,"canvasManager"),o(this,"processedNodeManager"),o(this,"unattachedDoc"),o(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),o(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new _l,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const i=Ga.parentNode(n);if(!i||!pl(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=v(i)?this.mirror.getId(ul(n)):this.mirror.getId(i),l=s(n);if(-1===a||-1===l)return r.addNode(n);const h=ee(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{al(e,this.mirror)&&this.iframeManager.addIframe(e),ll(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),hl(n)&&this.shadowDomManager.addShadowRoot(Ga.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});h&&(e.push({parentId:a,nextId:l,node:h}),t.add(h.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Il(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Ga.parentNode(e))||n(e);for(const e of this.addedSet)Ol(this.droppedSet,e)||Il(this.removesSubTreeCache,e,this.mirror)?Ol(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let i=null;for(;r.length;){let e=null;if(i){const t=this.mirror.getId(Ga.parentNode(i.value)),r=s(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(Ga.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Ga.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Ga.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,r=Ga.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),o(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(Ga.childNodes(e),e=>Ga.textContent(e)||"").join("")}),o(this,"processMutation",e=>{if(!nl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Ga.textContent(e.target);sl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:$(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,rl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=A(t);s=x({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(sl(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!X(t.tagName,r))if(n.attributes[r]=J(this.doc,I(t.tagName),I(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||i!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===i?s:[s,i]:n._unchangedStyles[e]=[s,i]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(sl(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),s=v(e.target)?this.mirror.getId(Ga.host(e.target)):this.mirror.getId(e.target);sl(e.target,this.blockClass,this.blockSelector,!1)||nl(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(xl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||il(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Cl(r,s)]?xl(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!v(e.target)||!S(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Ga.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),o(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(nl(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Cl(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);sl(e,this.blockClass,this.blockSelector,!1)||(Ga.childNodes(e).forEach(e=>this.genAdds(e)),hl(e)&&Ga.childNodes(Ga.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function xl(e,t){e.delete(t),Ga.childNodes(t).forEach(t=>xl(e,t))}function Il(e,t,r){return 0!==e.size&&function(e,t){const r=Ga.parentNode(t);return!!r&&e.has(r)}(e,t)}function Ol(e,t){return 0!==e.size&&Al(e,t)}function Al(e,t){const r=Ga.parentNode(t);return!!r&&(!!e.has(r)||Al(e,r))}let Rl;const Ml=e=>{if(!Rl)return e;return(...t)=>{try{return e(...t)}catch(e){if(Rl&&!0===Rl(e))return;throw e}}},El=[];function Tl(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Nl(e,t){const r=new kl;El.push(r),r.init(e);const s=new(Va())(Ml(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Dl({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(gl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=I(i);const h=(t=>i=>{const o=Tl(i);if(sl(o,s,n,!0))return;let a=null,h=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=yl.Mouse;break;case"touch":a=yl.Touch;break;case"pen":a=yl.Pen}a===yl.Touch?gl[t]===gl.MouseDown?h="TouchStart":gl[t]===gl.MouseUp&&(h="TouchEnd"):yl.Pen}else ol(i)&&(a=yl.Touch);null!==a?(l=a,(h.startsWith("Touch")&&a===yl.Touch||h.startsWith("Mouse")&&a===yl.Mouse)&&(a=null)):gl[t]===gl.Click&&(a=l,l=null);const c=ol(i)?i.changedTouches[0]:i;if(!c)return;const u=r.getId(o),{clientX:d,clientY:p}=c;Ml(e)({type:gl[h],id:u,x:d,y:p,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(gl[i]){case gl.MouseDown:case gl.MouseUp:o=o.replace("mouse","pointer");break;case gl.TouchStart:case gl.TouchEnd:return}a.push(Ya(o,h,t))}),Ml(()=>{a.forEach(e=>e())})}function Ll({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){return Ya("scroll",Ml(Xa(Ml(i=>{const o=Tl(i);if(!o||sl(o,s,n,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=Qa(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const Fl=["INPUT","TEXTAREA","SELECT"],zl=new WeakMap;function Pl(e){return function(e,t){if(jl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||jl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||jl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||jl("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Ul(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Bl({mirror:e,stylesheetManager:t},r){var s,n,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(Ga.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(i=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return s}}),Ml(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function Zl(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:h,styleDeclarationCb:c,canvasMutationCb:u,fontCb:d,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),h(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),c(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Nl(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=Xa(Ml(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),h=Ml(Xa(Ml(e=>{const t=Tl(e),{clientX:r,clientY:n}=ol(e)?e.changedTouches[0]:e;o||(o=qa()),a.push({x:r,y:n,id:s.getId(t),timeOffset:qa()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?ml.Drag:e instanceof MouseEvent?ml.MouseMove:ml.TouchMove)}),n,{trailing:!1})),c=[Ya("mousemove",h,r),Ya("touchmove",h,r),Ya("drag",h,r)];return Ml(()=>{c.forEach(e=>e())})}(e),i=Dl(e),o=Ll(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Ya("resize",Ml(Xa(Ml(()=>{const t=el(),n=tl();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:h,userTriggeredOnInput:c}){function u(e){let r=Tl(e);const h=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=Ga.parentElement(r)),!r||!u||Fl.indexOf(u)<0||sl(r,s,n,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let p=r.value,f=!1;const m=A(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(p=x({element:r,maskInputOptions:a,tagName:u,type:m,value:p,maskInputFn:l})),d(r,c?{text:p,isChecked:f,userTriggered:h}:{text:p,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;d(e,c?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function d(t,s){const n=zl.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){zl.set(t,s);const n=r.getId(t);Ml(e)({...s,id:n})}}const p=("last"===h.input?["change"]:["input","change"]).map(e=>Ya(e,Ml(u),t)),f=t.defaultView;if(!f)return()=>{p.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...g.map(e=>Ka(e[0],e[1],{set(){Ml(u)({target:this,isTrusted:!1})}},!1,f))),Ml(()=>{p.forEach(e=>e())})}(e),h=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:i}){const o=Ml(i=>Xa(Ml(n=>{const o=Tl(n);if(!o||sl(o,t,r,!0))return;const{currentTime:a,volume:l,muted:h,playbackRate:c,loop:u}=o;e({type:i,id:s.getId(o),currentTime:a,volume:l,muted:h,playbackRate:c,loop:u})}),n.media||500)),a=[Ya("play",o(bl.Play),i),Ya("pause",o(bl.Pause),i),Ya("seeked",o(bl.Seeked),i),Ya("volumechange",o(bl.VolumeChange),i),Ya("ratechange",o(bl.RateChange),i)];return Ml(()=>{a.forEach(e=>e())})}(e);let c=()=>{},u=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:Ml((s,n,i)=>{const[o,a]=i,{id:l,styleId:h}=Ul(n,t,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:a}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const i=s.CSSStyleSheet.prototype.deleteRule;let o,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Ml((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Ul(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Ml((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Ul(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),s.apply(n,i)})})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Ml((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Ul(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(n,i)})}));const l={};Wl("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Wl("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Wl("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Wl("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const h={};return Object.entries(l).forEach(([s,n])=>{h[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(h[s].insertRule,{apply:Ml((s,n,i)=>{const[o,a]=i,{id:l,styleId:h}=Ul(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:[...Pl(n),a||0]}]}),s.apply(n,i)})}),n.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:Ml((s,n,i)=>{const[o]=i,{id:a,styleId:l}=Ul(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Pl(n),o]}]}),s.apply(n,i)})})}),Ml(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=i,o&&(s.CSSStyleSheet.prototype.replace=o),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=h[e].insertRule,t.prototype.deleteRule=h[e].deleteRule})})}(e,{win:r}),u=Bl(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Ml((n,o,a)=>{var l;const[h,c,u]=a;if(r.has(h))return i.apply(o,[h,c,u]);const{id:d,styleId:p}=Ul(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:h,value:c,priority:u},index:Pl(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Ml((n,i,a)=>{var l;const[h]=a;if(r.has(h))return o.apply(i,[h]);const{id:c,styleId:u}=Ul(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,remove:{property:h},index:Pl(i.parentRule)}),n.apply(i,a)})}),Ml(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){const s=new i(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const o=$a(t.fonts,"add",function(t){return function(r){return setTimeout(Ml(()=>{const t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}});return s.push(()=>{r.FontFace=i}),s.push(o),Ml(()=>{s.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:i}=e;let o=!0;const a=Ml(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:h,endOffset:c}=i;sl(o,s,n,!0)||sl(h,s,n,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(h),endOffset:c})}i({ranges:a})});return a(),Ya("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?$a(r.customElements,"define",function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return Ml(()=>{El.forEach(e=>e.reset()),null==s||s.disconnect(),n(),i(),o(),a(),l(),h(),c(),u(),d(),p(),f(),m(),g.forEach(e=>e())})}function jl(e){return void 0!==window[e]}function Wl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Vl{constructor(e){o(this,"iframeIdToRemoteIdMap",new WeakMap),o(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),i=s||this.getRemoteIdToIdMap(e);let o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Gl{constructor(e){o(this,"iframes",new WeakMap),o(this,"crossOriginIframeMap",new WeakMap),o(this,"crossOriginIframeMirror",new Vl(U)),o(this,"crossOriginIframeStyleMirror"),o(this,"crossOriginIframeRootIdMap",new WeakMap),o(this,"mirror"),o(this,"mutationCb"),o(this,"wrappedEmit"),o(this,"loadListener"),o(this,"stylesheetManager"),o(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case fl.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:fl.IncrementalSnapshot,data:{source:ml.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case fl.Meta:case fl.Load:case fl.DomContentLoaded:return!1;case fl.Plugin:return t;case fl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case fl.IncrementalSnapshot:switch(t.data.source){case ml.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case ml.Drag:case ml.TouchMove:case ml.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case ml.ViewportResize:return!1;case ml.MediaInteraction:case ml.MouseInteraction:case ml.Scroll:case ml.CanvasMutation:case ml.Input:return this.replaceIds(t.data,e,["id"]),t;case ml.StyleSheetRule:case ml.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ml.Font:return t;case ml.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case ml.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===vl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Yl{constructor(e){o(this,"shadowDoms",new WeakSet),o(this,"mutationCb"),o(this,"scrollCb"),o(this,"bypassOptions"),o(this,"mirror"),o(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!S(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Nl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ll({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Ga.host(e))),this.restoreHandlers.push(Bl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push($a(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),i=Ga.shadowRoot(this);return i&&pl(this)&&r.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Xl=0;Xl<64;Xl++)Jl[Hl.charCodeAt(Xl)]=Xl;const Kl=new Map;const $l=(e,t,r)=>{if(!e||!eh(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Kl.get(e);return r||(r=new Map,Kl.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function ql(e,t,r){if(e instanceof Array)return e.map(e=>ql(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=Hl[r[t]>>2],n+=Hl[(3&r[t])<<4|r[t+1]>>4],n+=Hl[(15&r[t+1])<<2|r[t+2]>>6],n+=Hl[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[ql(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[ql(e.data,t,r),e.width,e.height]}}if(eh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:$l(e,t,r)}}return e}const Ql=(e,t,r)=>e.map(e=>ql(e,t,r)),eh=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function th(e,t,r,s){const n=[];try{const i=$a(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!sl(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function rh(e,t,r,s,n,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=$a(e,l,function(e){return function(...o){const a=e.apply(this,o);if($l(a,i,this),"tagName"in this.canvas&&!sl(this.canvas,s,n,!0)){const e=Ql(o,i,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});o.push(a)}catch{const s=Ka(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}const sh="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",nh="undefined"!=typeof window&&window.Blob&&new Blob([(ih=sh,Uint8Array.from(atob(ih),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var ih;function oh(e){let t;try{if(t=nh&&(window.URL||window.webkitURL).createObjectURL(nh),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+sh,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class ah{constructor(e){o(this,"pendingCanvasMutations",new Map),o(this,"rafStamps",{latestId:0,invokeId:null}),o(this,"mirror"),o(this,"mutationCb"),o(this,"resetObservers"),o(this,"frozen",!1),o(this,"locked",!1),o(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,s,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const i=th(t,r,s,!0),o=new Map,a=new oh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:i}=e.data;this.mutationCb({id:t,type:wl["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let h,c=0;const u=e=>{c&&e-c<l||(c=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{sl(t,r,s,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(o.get(r))return;if(0===e.width||0===e.height)return;if(o.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])})),h=requestAnimationFrame(u)};h=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=th(e,t,r,!1),n=function(e,t,r,s){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=$a(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return sl(this.canvas,r,s,!0)||setTimeout(()=>{const r=Ql(i,t,this);e(this.canvas,{type:wl["2D"],property:o,args:r})},0),n.apply(this,i)}});n.push(i)}catch{const r=Ka(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:wl["2D"],property:o,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,s){const n=[];return n.push(...rh(t.WebGLRenderingContext.prototype,wl.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...rh(t.WebGL2RenderingContext.prototype,wl.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map(e=>{const{type:t,...r}=e;return r}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class lh{constructor(e){o(this,"trackedLinkElements",new WeakSet),o(this,"mutationCb"),o(this,"adoptedStyleSheetCb"),o(this,"styleMirror",new cl),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:C(e,t.href),index:r}))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class hh{constructor(){o(this,"nodeMap",new WeakMap),o(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ch,uh,dh,ph=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(Fc){console.debug("Unable to override Array.from",Fc)}const fh=new k;function mh(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:p,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:_=!1,recordCrossOriginIframes:C=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:I=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:R,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:E=new Set([]),errorHandler:T}=e;Rl=T;const N=!C||window.parent===window;let D=!1;if(!N)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!D)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),fh.reset();const L=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},F=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let z;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let P=0;const U=e=>{for(const t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};ch=(e,n)=>{var i;const o=e;if(o.timestamp=qa(),!(null==(i=El[0])?void 0:i.isFrozen())||o.type===fl.FullSnapshot||o.type===fl.IncrementalSnapshot&&o.data.source===ml.Mutation||El.forEach(e=>e.unfreeze()),N)null==t||t(U(o),n);else if(D){const e={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===fl.FullSnapshot)z=o,P=0;else if(o.type===fl.IncrementalSnapshot){if(o.data.source===ml.Mutation&&o.data.isAttachIframe)return;P++;const e=s&&P>=s,t=r&&o.timestamp-z.timestamp>r;(e||t)&&uh(!0)}};const B=e=>{ch({type:fl.IncrementalSnapshot,data:{source:ml.Mutation,...e}})},Z=e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.Scroll,...e}}),j=e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.CanvasMutation,...e}}),W=new lh({mutationCb:B,adoptedStyleSheetCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.AdoptedStyleSheet,...e}})}),V=new Gl({mirror:fh,mutationCb:B,stylesheetManager:W,recordCrossOriginIframes:C,wrappedEmit:ch});for(const e of R||[])e.getMirror&&e.getMirror({nodeMirror:fh,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const G=new hh;dh=new ah({recordCanvas:_,mutationCb:j,win:window,blockClass:n,blockSelector:i,mirror:fh,sampling:w.canvas,dataURLOptions:b});const Y=new Yl({mutationCb:B,scrollCb:Z,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:L,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:_,inlineImages:A,sampling:w,slimDOMOptions:F,iframeManager:V,stylesheetManager:W,canvasManager:dh,keepIframeSrcFn:M,processedNodeManager:G},mirror:fh});uh=(e=!1)=>{if(!S)return;ch({type:fl.Meta,data:{href:window.location.href,width:tl(),height:el()}},e),W.reset(),Y.init(),El.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new k,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:u,maskInputFn:d,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t||{};return ee(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:u,maskInputFn:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:h,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:fh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:L,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:b,recordCanvas:_,inlineImages:A,onSerialize:e=>{al(e,fh)&&V.addIframe(e),ll(e,fh)&&W.trackLinkElement(e),hl(e)&&Y.addShadowRoot(Ga.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:M});if(!t)return console.warn("Failed to snapshot the document");ch({type:fl.FullSnapshot,data:{node:t,initialOffset:Qa(window)}},e),El.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,fh.getId(document))};try{const e=[],t=e=>{var t;return Ml(Zl)({mutationCb:B,mousemoveCb:(e,t)=>ch({type:fl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.MouseInteraction,...e}}),scrollCb:Z,viewportResizeCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.ViewportResize,...e}}),inputCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.Input,...e}}),mediaInteractionCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.MediaInteraction,...e}}),styleSheetRuleCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.StyleSheetRule,...e}}),styleDeclarationCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.StyleDeclaration,...e}}),canvasMutationCb:j,fontCb:e=>ch({type:fl.IncrementalSnapshot,data:{source:ml.Font,...e}}),selectionCb:e=>{ch({type:fl.IncrementalSnapshot,data:{source:ml.Selection,...e}})},customElementCb:e=>{ch({type:fl.IncrementalSnapshot,data:{source:ml.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:h,maskInputOptions:L,inlineStylesheet:c,sampling:w,recordDOM:S,recordCanvas:_,inlineImages:A,userTriggeredOnInput:I,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:M,blockSelector:i,slimDOMOptions:F,dataURLOptions:b,mirror:fh,iframeManager:V,stylesheetManager:W,shadowDomManager:Y,processedNodeManager:G,canvasManager:dh,ignoreCSSAttributes:E,plugins:(null==(t=null==R?void 0:R.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>ch({type:fl.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};V.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{uh(),e.push(t(document)),ph=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Ya("DOMContentLoaded",()=>{ch({type:fl.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()})),e.push(Ya("load",()=>{ch({type:fl.Load,data:{}}),"load"===x&&r()},window))),()=>{e.forEach(e=>e()),G.destroy(),ph=!1,Rl=void 0}}catch(e){console.warn(e)}}var gh,yh;mh.addCustomEvent=(e,t)=>{if(!ph)throw new Error("please add custom event after start recording");ch({type:fl.Custom,data:{tag:e,payload:t}})},mh.freezePage=()=>{El.forEach(e=>e.freeze())},mh.takeFullSnapshot=e=>{if(!ph)throw new Error("please take full snapshot after start recording");uh(e)},mh.mirror=fh,(yh=gh||(gh={}))[yh.NotStarted=0]="NotStarted",yh[yh.Running=1]="Running",yh[yh.Stopped=2]="Stopped";function wh(e){let t=e.length;for(;--t>=0;)e[t]=0}const bh=256,vh=286,Sh=30,_h=15,Ch=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),kh=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),xh=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ih=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Oh=new Array(576);wh(Oh);const Ah=new Array(60);wh(Ah);const Rh=new Array(512);wh(Rh);const Mh=new Array(256);wh(Mh);const Eh=new Array(29);wh(Eh);const Th=new Array(Sh);function Nh(e,t,r,s,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=s,this.max_length=n,this.has_stree=e&&e.length}let Dh,Lh,Fh;function zh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}wh(Th);const Ph=e=>e<256?Rh[e]:Rh[256+(e>>>7)],Uh=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Bh=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,Uh(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},Zh=(e,t,r)=>{Bh(e,r[2*t],r[2*t+1])},jh=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},Wh=(e,t,r)=>{const s=new Array(16);let n,i,o=0;for(n=1;n<=_h;n++)o=o+r[n-1]<<1,s[n]=o;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=jh(s[t]++,t))}},Vh=e=>{let t;for(t=0;t<vh;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Sh;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Gh=e=>{e.bi_valid>8?Uh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Yh=(e,t,r,s)=>{const n=2*t,i=2*r;return e[n]<e[i]||e[n]===e[i]&&s[t]<=s[r]},Hh=(e,t,r)=>{const s=e.heap[r];let n=r<<1;for(;n<=e.heap_len&&(n<e.heap_len&&Yh(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!Yh(t,s,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=s},Jh=(e,t,r)=>{let s,n,i,o,a=0;if(0!==e.sym_next)do{s=255&e.pending_buf[e.sym_buf+a++],s+=(255&e.pending_buf[e.sym_buf+a++])<<8,n=e.pending_buf[e.sym_buf+a++],0===s?Zh(e,n,t):(i=Mh[n],Zh(e,i+bh+1,t),o=Ch[i],0!==o&&(n-=Eh[i],Bh(e,n,o)),s--,i=Ph(s),Zh(e,i,r),o=kh[i],0!==o&&(s-=Th[i],Bh(e,s,o)))}while(a<e.sym_next);Zh(e,256,t)},Xh=(e,t)=>{const r=t.dyn_tree,s=t.stat_desc.static_tree,n=t.stat_desc.has_stree,i=t.stat_desc.elems;let o,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<i;o++)0!==r[2*o]?(e.heap[++e.heap_len]=h=o,e.depth[o]=0):r[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=h<2?++h:0,r[2*l]=1,e.depth[l]=0,e.opt_len--,n&&(e.static_len-=s[2*l+1]);for(t.max_code=h,o=e.heap_len>>1;o>=1;o--)Hh(e,r,o);l=i;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Hh(e,r,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,r[2*l]=r[2*o]+r[2*a],e.depth[l]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,r[2*o+1]=r[2*a+1]=l,e.heap[1]=l++,Hh(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,s=t.max_code,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,u,d,p,f,m=0;for(d=0;d<=_h;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],d=r[2*r[2*c+1]+1]+1,d>l&&(d=l,m++),r[2*c+1]=d,c>s||(e.bl_count[d]++,p=0,c>=a&&(p=o[c-a]),f=r[2*c],e.opt_len+=f*(d+p),i&&(e.static_len+=f*(n[2*c+1]+p)));if(0!==m){do{for(d=l-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(c=e.bl_count[d];0!==c;)u=e.heap[--h],u>s||(r[2*u+1]!==d&&(e.opt_len+=(d-r[2*u+1])*r[2*u],r[2*u+1]=d),c--)}})(e,t),Wh(r,h,e.bl_count)},Kh=(e,t,r)=>{let s,n,i=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),t[2*(r+1)+1]=65535,s=0;s<=r;s++)n=o,o=t[2*(s+1)+1],++a<l&&n===o||(a<h?e.bl_tree[2*n]+=a:0!==n?(n!==i&&e.bl_tree[2*n]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,i=n,0===o?(l=138,h=3):n===o?(l=6,h=3):(l=7,h=4))},$h=(e,t,r)=>{let s,n,i=-1,o=t[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),s=0;s<=r;s++)if(n=o,o=t[2*(s+1)+1],!(++a<l&&n===o)){if(a<h)do{Zh(e,n,e.bl_tree)}while(0!==--a);else 0!==n?(n!==i&&(Zh(e,n,e.bl_tree),a--),Zh(e,16,e.bl_tree),Bh(e,a-3,2)):a<=10?(Zh(e,17,e.bl_tree),Bh(e,a-3,3)):(Zh(e,18,e.bl_tree),Bh(e,a-11,7));a=0,i=n,0===o?(l=138,h=3):n===o?(l=6,h=3):(l=7,h=4)}};let qh=!1;const Qh=(e,t,r,s)=>{Bh(e,0+(s?1:0),3),Gh(e),Uh(e,r),Uh(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var ec=e=>{qh||((()=>{let e,t,r,s,n;const i=new Array(16);for(r=0,s=0;s<28;s++)for(Eh[s]=r,e=0;e<1<<Ch[s];e++)Mh[r++]=s;for(Mh[r-1]=s,n=0,s=0;s<16;s++)for(Th[s]=n,e=0;e<1<<kh[s];e++)Rh[n++]=s;for(n>>=7;s<Sh;s++)for(Th[s]=n<<7,e=0;e<1<<kh[s]-7;e++)Rh[256+n++]=s;for(t=0;t<=_h;t++)i[t]=0;for(e=0;e<=143;)Oh[2*e+1]=8,e++,i[8]++;for(;e<=255;)Oh[2*e+1]=9,e++,i[9]++;for(;e<=279;)Oh[2*e+1]=7,e++,i[7]++;for(;e<=287;)Oh[2*e+1]=8,e++,i[8]++;for(Wh(Oh,287,i),e=0;e<Sh;e++)Ah[2*e+1]=5,Ah[2*e]=jh(e,5);Dh=new Nh(Oh,Ch,257,vh,_h),Lh=new Nh(Ah,kh,0,Sh,_h),Fh=new Nh(new Array(0),xh,0,19,7)})(),qh=!0),e.l_desc=new zh(e.dyn_ltree,Dh),e.d_desc=new zh(e.dyn_dtree,Lh),e.bl_desc=new zh(e.bl_tree,Fh),e.bi_buf=0,e.bi_valid=0,Vh(e)},tc=(e,t,r,s)=>{let n,i,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<bh;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Xh(e,e.l_desc),Xh(e,e.d_desc),o=(e=>{let t;for(Kh(e,e.dyn_ltree,e.l_desc.max_code),Kh(e,e.dyn_dtree,e.d_desc.max_code),Xh(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Ih[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),n=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=n&&(n=i)):n=i=r+5,r+4<=n&&-1!==t?Qh(e,t,r,s):4===e.strategy||i===n?(Bh(e,2+(s?1:0),3),Jh(e,Oh,Ah)):(Bh(e,4+(s?1:0),3),((e,t,r,s)=>{let n;for(Bh(e,t-257,5),Bh(e,r-1,5),Bh(e,s-4,4),n=0;n<s;n++)Bh(e,e.bl_tree[2*Ih[n]+1],3);$h(e,e.dyn_ltree,t-1),$h(e,e.dyn_dtree,r-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Jh(e,e.dyn_ltree,e.dyn_dtree)),Vh(e),s&&Gh(e)},rc={_tr_init:ec,_tr_stored_block:Qh,_tr_flush_block:tc,_tr_tally:(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Mh[r]+bh+1)]++,e.dyn_dtree[2*Ph(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{Bh(e,2,3),Zh(e,256,Oh),(e=>{16===e.bi_valid?(Uh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var sc=(e,t,r,s)=>{let n=65535&e,i=e>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{n=n+t[s++]|0,i=i+n|0}while(--o);n%=65521,i%=65521}return n|i<<16};const nc=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var ic=(e,t,r,s)=>{const n=nc,i=s+r;e^=-1;for(let r=s;r<i;r++)e=e>>>8^n[255&(e^t[r])];return-1^e},oc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ac={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:lc,_tr_stored_block:hc,_tr_flush_block:cc,_tr_tally:uc,_tr_align:dc}=rc,{Z_NO_FLUSH:pc,Z_PARTIAL_FLUSH:fc,Z_FULL_FLUSH:mc,Z_FINISH:gc,Z_BLOCK:yc,Z_OK:wc,Z_STREAM_END:bc,Z_STREAM_ERROR:vc,Z_DATA_ERROR:Sc,Z_BUF_ERROR:_c,Z_DEFAULT_COMPRESSION:Cc,Z_FILTERED:kc,Z_HUFFMAN_ONLY:xc,Z_RLE:Ic,Z_FIXED:Oc,Z_DEFAULT_STRATEGY:Ac,Z_UNKNOWN:Rc,Z_DEFLATED:Mc}=ac,Ec=258,Tc=262,Nc=42,Dc=113,Lc=666,Fc=(e,t)=>(e.msg=oc[t],t),zc=e=>2*e-(e>4?9:0),Pc=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Uc=e=>{let t,r,s,n=e.w_size;t=e.hash_size,s=t;do{r=e.head[--s],e.head[s]=r>=n?r-n:0}while(--t);t=n,s=t;do{r=e.prev[--s],e.prev[s]=r>=n?r-n:0}while(--t)};let Bc=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;const Zc=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},jc=(e,t)=>{cc(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Zc(e.strm)},Wc=(e,t)=>{e.pending_buf[e.pending++]=t},Vc=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Gc=(e,t,r,s)=>{let n=e.avail_in;return n>s&&(n=s),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),r),1===e.state.wrap?e.adler=sc(e.adler,t,n,r):2===e.state.wrap&&(e.adler=ic(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)},Yc=(e,t)=>{let r,s,n=e.max_chain_length,i=e.strstart,o=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-Tc?e.strstart-(e.w_size-Tc):0,h=e.window,c=e.w_mask,u=e.prev,d=e.strstart+Ec;let p=h[i+o-1],f=h[i+o];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,h[r+o]===f&&h[r+o-1]===p&&h[r]===h[i]&&h[++r]===h[i+1]){i+=2,r++;do{}while(h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&i<d);if(s=Ec-(d-i),i=d-Ec,s>o){if(e.match_start=t,o=s,s>=a)break;p=h[i+o-1],f=h[i+o]}}}while((t=u[t&c])>l&&0!==--n);return o<=e.lookahead?o:e.lookahead},Hc=e=>{const t=e.w_size;let r,s,n;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Tc)&&(e.window.set(e.window.subarray(t,t+t-s),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Uc(e),s+=t),0===e.strm.avail_in)break;if(r=Gc(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=r,e.lookahead+e.insert>=3)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=Bc(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=Bc(e,e.ins_h,e.window[n+3-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<Tc&&0!==e.strm.avail_in)},Jc=(e,t)=>{let r,s,n,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(r=65535,n=e.bi_valid+42>>3,e.strm.avail_out<n)break;if(n=e.strm.avail_out-n,s=e.strstart-e.block_start,r>s+e.strm.avail_in&&(r=s+e.strm.avail_in),r>n&&(r=n),r<i&&(0===r&&t!==gc||t===pc||r!==s+e.strm.avail_in))break;o=t===gc&&r===s+e.strm.avail_in?1:0,hc(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Zc(e.strm),s&&(s>r&&(s=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+s),e.strm.next_out),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s,e.block_start+=s,r-=s),r&&(Gc(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==pc&&t!==gc&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(n=e.window_size-e.strstart,e.strm.avail_in>n&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,n+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),n>e.strm.avail_in&&(n=e.strm.avail_in),n&&(Gc(e.strm,e.window,e.strstart,n),e.strstart+=n,e.insert+=n>e.w_size-e.insert?e.w_size-e.insert:n),e.high_water<e.strstart&&(e.high_water=e.strstart),n=e.bi_valid+42>>3,n=e.pending_buf_size-n>65535?65535:e.pending_buf_size-n,i=n>e.w_size?e.w_size:n,s=e.strstart-e.block_start,(s>=i||(s||t===gc)&&t!==pc&&0===e.strm.avail_in&&s<=n)&&(r=s>n?n:s,o=t===gc&&0===e.strm.avail_in&&r===s?1:0,hc(e,e.block_start,r,o),e.block_start+=r,Zc(e.strm)),o?3:1)},Xc=(e,t)=>{let r,s;for(;;){if(e.lookahead<Tc){if(Hc(e),e.lookahead<Tc&&t===pc)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Bc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-Tc&&(e.match_length=Yc(e,r)),e.match_length>=3)if(s=uc(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Bc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Bc(e,e.ins_h,e.window[e.strstart+1]);else s=uc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(s&&(jc(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===gc?(jc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(jc(e,!1),0===e.strm.avail_out)?1:2},Kc=(e,t)=>{let r,s,n;for(;;){if(e.lookahead<Tc){if(Hc(e),e.lookahead<Tc&&t===pc)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Bc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Tc&&(e.match_length=Yc(e,r),e.match_length<=5&&(e.strategy===kc||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,s=uc(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=Bc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,s&&(jc(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(s=uc(e,0,e.window[e.strstart-1]),s&&jc(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(s=uc(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===gc?(jc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(jc(e,!1),0===e.strm.avail_out)?1:2};function $c(e,t,r,s,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=s,this.func=n}const qc=[new $c(0,0,0,0,Jc),new $c(4,4,8,4,Xc),new $c(4,5,16,8,Xc),new $c(4,6,32,32,Xc),new $c(4,4,16,16,Kc),new $c(8,16,32,32,Kc),new $c(8,16,128,128,Kc),new $c(8,32,128,256,Kc),new $c(32,128,258,1024,Kc),new $c(32,258,258,4096,Kc)];function Qc(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Mc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Pc(this.dyn_ltree),Pc(this.dyn_dtree),Pc(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Pc(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Pc(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const eu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Nc&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Dc&&t.status!==Lc?1:0},tu=e=>{if(eu(e))return Fc(e,vc);e.total_in=e.total_out=0,e.data_type=Rc;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Nc:Dc,e.adler=2===t.wrap?0:1,t.last_flush=-2,lc(t),wc},ru=e=>{const t=tu(e);var r;return t===wc&&((r=e.state).window_size=2*r.w_size,Pc(r.head),r.max_lazy_match=qc[r.level].max_lazy,r.good_match=qc[r.level].good_length,r.nice_match=qc[r.level].nice_length,r.max_chain_length=qc[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},su=(e,t,r,s,n,i)=>{if(!e)return vc;let o=1;if(t===Cc&&(t=6),s<0?(o=0,s=-s):s>15&&(o=2,s-=16),n<1||n>9||r!==Mc||s<8||s>15||t<0||t>9||i<0||i>Oc||8===s&&1!==o)return Fc(e,vc);8===s&&(s=9);const a=new Qc;return e.state=a,a.strm=e,a.status=Nc,a.wrap=o,a.gzhead=null,a.w_bits=s,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=n+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<n+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=i,a.method=r,ru(e)};var nu=(e,t)=>{let r=t.length;if(eu(e))return vc;const s=e.state,n=s.wrap;if(2===n||1===n&&s.status!==Nc||s.lookahead)return vc;if(1===n&&(e.adler=sc(e.adler,t,r,0)),s.wrap=0,r>=s.w_size){0===n&&(Pc(s.head),s.strstart=0,s.block_start=0,s.insert=0);let e=new Uint8Array(s.w_size);e.set(t.subarray(r-s.w_size,r),0),t=e,r=s.w_size}const i=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Hc(s);s.lookahead>=3;){let e=s.strstart,t=s.lookahead-2;do{s.ins_h=Bc(s,s.ins_h,s.window[e+3-1]),s.prev[e&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=e,e++}while(--t);s.strstart=e,s.lookahead=2,Hc(s)}return s.strstart+=s.lookahead,s.block_start=s.strstart,s.insert=s.lookahead,s.lookahead=0,s.match_length=s.prev_length=2,s.match_available=0,e.next_in=o,e.input=a,e.avail_in=i,s.wrap=n,wc},iu={deflateInit:(e,t)=>su(e,t,Mc,15,8,Ac),deflateInit2:su,deflateReset:ru,deflateResetKeep:tu,deflateSetHeader:(e,t)=>eu(e)||2!==e.state.wrap?vc:(e.state.gzhead=t,wc),deflate:(e,t)=>{if(eu(e)||t>yc||t<0)return e?Fc(e,vc):vc;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Lc&&t!==gc)return Fc(e,0===e.avail_out?_c:vc);const s=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Zc(e),0===e.avail_out)return r.last_flush=-1,wc}else if(0===e.avail_in&&zc(t)<=zc(s)&&t!==gc)return Fc(e,_c);if(r.status===Lc&&0!==e.avail_in)return Fc(e,_c);if(r.status===Nc&&0===r.wrap&&(r.status=Dc),r.status===Nc){let t=Mc+(r.w_bits-8<<4)<<8,s=-1;if(s=r.strategy>=xc||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=s<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Vc(r,t),0!==r.strstart&&(Vc(r,e.adler>>>16),Vc(r,65535&e.adler)),e.adler=1,r.status=Dc,Zc(e),0!==r.pending)return r.last_flush=-1,wc}if(57===r.status)if(e.adler=0,Wc(r,31),Wc(r,139),Wc(r,8),r.gzhead)Wc(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Wc(r,255&r.gzhead.time),Wc(r,r.gzhead.time>>8&255),Wc(r,r.gzhead.time>>16&255),Wc(r,r.gzhead.time>>24&255),Wc(r,9===r.level?2:r.strategy>=xc||r.level<2?4:0),Wc(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Wc(r,255&r.gzhead.extra.length),Wc(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ic(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Wc(r,0),Wc(r,0),Wc(r,0),Wc(r,0),Wc(r,0),Wc(r,9===r.level?2:r.strategy>=xc||r.level<2?4:0),Wc(r,3),r.status=Dc,Zc(e),0!==r.pending)return r.last_flush=-1,wc;if(69===r.status){if(r.gzhead.extra){let t=r.pending,s=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+s>r.pending_buf_size;){let n=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=ic(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=n,Zc(e),0!==r.pending)return r.last_flush=-1,wc;t=0,s-=n}let n=new Uint8Array(r.gzhead.extra);r.pending_buf.set(n.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending+=s,r.gzhead.hcrc&&r.pending>t&&(e.adler=ic(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,s=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>s&&(e.adler=ic(e.adler,r.pending_buf,r.pending-s,s)),Zc(e),0!==r.pending)return r.last_flush=-1,wc;s=0}t=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Wc(r,t)}while(0!==t);r.gzhead.hcrc&&r.pending>s&&(e.adler=ic(e.adler,r.pending_buf,r.pending-s,s)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,s=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>s&&(e.adler=ic(e.adler,r.pending_buf,r.pending-s,s)),Zc(e),0!==r.pending)return r.last_flush=-1,wc;s=0}t=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Wc(r,t)}while(0!==t);r.gzhead.hcrc&&r.pending>s&&(e.adler=ic(e.adler,r.pending_buf,r.pending-s,s))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Zc(e),0!==r.pending))return r.last_flush=-1,wc;Wc(r,255&e.adler),Wc(r,e.adler>>8&255),e.adler=0}if(r.status=Dc,Zc(e),0!==r.pending)return r.last_flush=-1,wc}if(0!==e.avail_in||0!==r.lookahead||t!==pc&&r.status!==Lc){let s=0===r.level?Jc(r,t):r.strategy===xc?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Hc(e),0===e.lookahead)){if(t===pc)return 1;break}if(e.match_length=0,r=uc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(jc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===gc?(jc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(jc(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===Ic?((e,t)=>{let r,s,n,i;const o=e.window;for(;;){if(e.lookahead<=Ec){if(Hc(e),e.lookahead<=Ec&&t===pc)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=e.strstart-1,s=o[n],s===o[++n]&&s===o[++n]&&s===o[++n])){i=e.strstart+Ec;do{}while(s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&s===o[++n]&&n<i);e.match_length=Ec-(i-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=uc(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=uc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(jc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===gc?(jc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(jc(e,!1),0===e.strm.avail_out)?1:2})(r,t):qc[r.level].func(r,t);if(3!==s&&4!==s||(r.status=Lc),1===s||3===s)return 0===e.avail_out&&(r.last_flush=-1),wc;if(2===s&&(t===fc?dc(r):t!==yc&&(hc(r,0,0,!1),t===mc&&(Pc(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Zc(e),0===e.avail_out))return r.last_flush=-1,wc}return t!==gc?wc:r.wrap<=0?bc:(2===r.wrap?(Wc(r,255&e.adler),Wc(r,e.adler>>8&255),Wc(r,e.adler>>16&255),Wc(r,e.adler>>24&255),Wc(r,255&e.total_in),Wc(r,e.total_in>>8&255),Wc(r,e.total_in>>16&255),Wc(r,e.total_in>>24&255)):(Vc(r,e.adler>>>16),Vc(r,65535&e.adler)),Zc(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?wc:bc)},deflateEnd:e=>{if(eu(e))return vc;const t=e.state.status;return e.state=null,t===Dc?Fc(e,Sc):wc},deflateSetDictionary:nu,deflateInfo:"pako deflate (from Nodeca project)"};const ou=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var au=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)ou(r,t)&&(e[t]=r[t])}}return e},lu=e=>{let t=0;for(let r=0,s=e.length;r<s;r++)t+=e[r].length;const r=new Uint8Array(t);for(let t=0,s=0,n=e.length;t<n;t++){let n=e[t];r.set(n,s),s+=n.length}return r};let hu=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){hu=!1}const cu=new Uint8Array(256);for(let e=0;e<256;e++)cu[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;cu[254]=cu[254]=1;var uu=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,s,n,i,o=e.length,a=0;for(n=0;n<o;n++)r=e.charCodeAt(n),55296==(64512&r)&&n+1<o&&(s=e.charCodeAt(n+1),56320==(64512&s)&&(r=65536+(r-55296<<10)+(s-56320),n++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(a),i=0,n=0;i<a;n++)r=e.charCodeAt(n),55296==(64512&r)&&n+1<o&&(s=e.charCodeAt(n+1),56320==(64512&s)&&(r=65536+(r-55296<<10)+(s-56320),n++)),r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},du=(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let s,n;const i=new Array(2*r);for(n=0,s=0;s<r;){let t=e[s++];if(t<128){i[n++]=t;continue}let o=cu[t];if(o>4)i[n++]=65533,s+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&s<r;)t=t<<6|63&e[s++],o--;o>1?i[n++]=65533:t<65536?i[n++]=t:(t-=65536,i[n++]=55296|t>>10&1023,i[n++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&hu)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r})(i,n)},pu=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+cu[e[r]]>t?r:t};var fu=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const mu=Object.prototype.toString,{Z_NO_FLUSH:gu,Z_SYNC_FLUSH:yu,Z_FULL_FLUSH:wu,Z_FINISH:bu,Z_OK:vu,Z_STREAM_END:Su,Z_DEFAULT_COMPRESSION:_u,Z_DEFAULT_STRATEGY:Cu,Z_DEFLATED:ku}=ac;function xu(e){this.options=au({level:_u,method:ku,chunkSize:16384,windowBits:15,memLevel:8,strategy:Cu},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fu,this.strm.avail_out=0;let r=iu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==vu)throw new Error(oc[r]);if(t.header&&iu.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?uu(t.dictionary):"[object ArrayBuffer]"===mu.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=iu.deflateSetDictionary(this.strm,e),r!==vu)throw new Error(oc[r]);this._dict_set=!0}}function Iu(e,t){const r=new xu(t);if(r.push(e,!0),r.err)throw r.msg||oc[r.err];return r.result}xu.prototype.push=function(e,t){const r=this.strm,s=this.options.chunkSize;let n,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?bu:gu,"string"==typeof e?r.input=uu(e):"[object ArrayBuffer]"===mu.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(i===yu||i===wu)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(n=iu.deflate(r,i),n===Su)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=iu.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===vu;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},xu.prototype.onData=function(e){this.chunks.push(e)},xu.prototype.onEnd=function(e){e===vu&&(this.result=lu(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ou=function(e,t){return(t=t||{}).raw=!0,Iu(e,t)},Au=function(e,t){return(t=t||{}).gzip=!0,Iu(e,t)},Ru={Deflate:xu,deflate:Iu,deflateRaw:Ou,gzip:Au};const Mu=16209;var Eu=function(e,t){let r,s,n,i,o,a,l,h,c,u,d,p,f,m,g,y,w,b,v,S,_,C,k,x;const I=e.state;r=e.next_in,k=e.input,s=r+(e.avail_in-5),n=e.next_out,x=e.output,i=n-(t-e.avail_out),o=n+(e.avail_out-257),a=I.dmax,l=I.wsize,h=I.whave,c=I.wnext,u=I.window,d=I.hold,p=I.bits,f=I.lencode,m=I.distcode,g=(1<<I.lenbits)-1,y=(1<<I.distbits)-1;e:do{p<15&&(d+=k[r++]<<p,p+=8,d+=k[r++]<<p,p+=8),w=f[d&g];t:for(;;){if(b=w>>>24,d>>>=b,p-=b,b=w>>>16&255,0===b)x[n++]=65535&w;else{if(!(16&b)){if(64&b){if(32&b){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=Mu;break e}w=f[(65535&w)+(d&(1<<b)-1)];continue t}for(v=65535&w,b&=15,b&&(p<b&&(d+=k[r++]<<p,p+=8),v+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=k[r++]<<p,p+=8,d+=k[r++]<<p,p+=8),w=m[d&y];;){if(b=w>>>24,d>>>=b,p-=b,b=w>>>16&255,16&b){if(S=65535&w,b&=15,p<b&&(d+=k[r++]<<p,p+=8,p<b&&(d+=k[r++]<<p,p+=8)),S+=d&(1<<b)-1,S>a){e.msg="invalid distance too far back",I.mode=Mu;break e}if(d>>>=b,p-=b,b=n-i,S>b){if(b=S-b,b>h&&I.sane){e.msg="invalid distance too far back",I.mode=Mu;break e}if(_=0,C=u,0===c){if(_+=l-b,b<v){v-=b;do{x[n++]=u[_++]}while(--b);_=n-S,C=x}}else if(c<b){if(_+=l+c-b,b-=c,b<v){v-=b;do{x[n++]=u[_++]}while(--b);if(_=0,c<v){b=c,v-=b;do{x[n++]=u[_++]}while(--b);_=n-S,C=x}}}else if(_+=c-b,b<v){v-=b;do{x[n++]=u[_++]}while(--b);_=n-S,C=x}for(;v>2;)x[n++]=C[_++],x[n++]=C[_++],x[n++]=C[_++],v-=3;v&&(x[n++]=C[_++],v>1&&(x[n++]=C[_++]))}else{_=n-S;do{x[n++]=x[_++],x[n++]=x[_++],x[n++]=x[_++],v-=3}while(v>2);v&&(x[n++]=x[_++],v>1&&(x[n++]=x[_++]))}break}if(64&b){e.msg="invalid distance code",I.mode=Mu;break e}w=m[(65535&w)+(d&(1<<b)-1)]}}break}}while(r<s&&n<o);v=p>>3,r-=v,p-=v<<3,d&=(1<<p)-1,e.next_in=r,e.next_out=n,e.avail_in=r<s?s-r+5:5-(r-s),e.avail_out=n<o?o-n+257:257-(n-o),I.hold=d,I.bits=p};const Tu=15,Nu=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Du=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Lu=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Fu=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var zu=(e,t,r,s,n,i,o,a)=>{const l=a.bits;let h,c,u,d,p,f,m=0,g=0,y=0,w=0,b=0,v=0,S=0,_=0,C=0,k=0,x=null;const I=new Uint16Array(16),O=new Uint16Array(16);let A,R,M,E=null;for(m=0;m<=Tu;m++)I[m]=0;for(g=0;g<s;g++)I[t[r+g]]++;for(b=l,w=Tu;w>=1&&0===I[w];w--);if(b>w&&(b=w),0===w)return n[i++]=20971520,n[i++]=20971520,a.bits=1,0;for(y=1;y<w&&0===I[y];y++);for(b<y&&(b=y),_=1,m=1;m<=Tu;m++)if(_<<=1,_-=I[m],_<0)return-1;if(_>0&&(0===e||1!==w))return-1;for(O[1]=0,m=1;m<Tu;m++)O[m+1]=O[m]+I[m];for(g=0;g<s;g++)0!==t[r+g]&&(o[O[t[r+g]]++]=g);if(0===e?(x=E=o,f=20):1===e?(x=Nu,E=Du,f=257):(x=Lu,E=Fu,f=0),k=0,g=0,m=y,p=i,v=b,S=0,u=-1,C=1<<b,d=C-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){A=m-S,o[g]+1<f?(R=0,M=o[g]):o[g]>=f?(R=E[o[g]-f],M=x[o[g]-f]):(R=96,M=0),h=1<<m-S,c=1<<v,y=c;do{c-=h,n[p+(k>>S)+c]=A<<24|R<<16|M}while(0!==c);for(h=1<<m-1;k&h;)h>>=1;if(0!==h?(k&=h-1,k+=h):k=0,g++,0===--I[m]){if(m===w)break;m=t[r+o[g]]}if(m>b&&(k&d)!==u){for(0===S&&(S=b),p+=y,v=m-S,_=1<<v;v+S<w&&(_-=I[v+S],!(_<=0));)v++,_<<=1;if(C+=1<<v,1===e&&C>852||2===e&&C>592)return 1;u=k&d,n[u]=b<<24|v<<16|p-i}}return 0!==k&&(n[p+k]=m-S<<24|64<<16),a.bits=b,0};const{Z_FINISH:Pu,Z_BLOCK:Uu,Z_TREES:Bu,Z_OK:Zu,Z_STREAM_END:ju,Z_NEED_DICT:Wu,Z_STREAM_ERROR:Vu,Z_DATA_ERROR:Gu,Z_MEM_ERROR:Yu,Z_BUF_ERROR:Hu,Z_DEFLATED:Ju}=ac,Xu=16180,Ku=16190,$u=16191,qu=16192,Qu=16194,ed=16199,td=16200,rd=16206,sd=16209,nd=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function id(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const od=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Xu||t.mode>16211?1:0},ad=e=>{if(od(e))return Vu;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Xu,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Zu},ld=e=>{if(od(e))return Vu;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ad(e)},hd=(e,t)=>{let r;if(od(e))return Vu;const s=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Vu:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=r,s.wbits=t,ld(e))},cd=(e,t)=>{if(!e)return Vu;const r=new id;e.state=r,r.strm=e,r.window=null,r.mode=Xu;const s=hd(e,t);return s!==Zu&&(e.state=null),s};let ud,dd,pd=!0;const fd=e=>{if(pd){ud=new Int32Array(512),dd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(zu(1,e.lens,0,288,ud,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;zu(2,e.lens,0,32,dd,0,e.work,{bits:5}),pd=!1}e.lencode=ud,e.lenbits=9,e.distcode=dd,e.distbits=5},md=(e,t,r,s)=>{let n;const i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),s>=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(n=i.wsize-i.wnext,n>s&&(n=s),i.window.set(t.subarray(r-s,r-s+n),i.wnext),(s-=n)?(i.window.set(t.subarray(r-s,r),0),i.wnext=s,i.whave=i.wsize):(i.wnext+=n,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=n))),0};var gd=(e,t)=>{let r,s,n,i,o,a,l,h,c,u,d,p,f,m,g,y,w,b,v,S,_,C,k=0;const x=new Uint8Array(4);let I,O;const A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(od(e)||!e.output||!e.input&&0!==e.avail_in)return Vu;r=e.state,r.mode===$u&&(r.mode=qu),o=e.next_out,n=e.output,l=e.avail_out,i=e.next_in,s=e.input,a=e.avail_in,h=r.hold,c=r.bits,u=a,d=l,C=Zu;e:for(;;)switch(r.mode){case Xu:if(0===r.wrap){r.mode=qu;break}for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(2&r.wrap&&35615===h){0===r.wbits&&(r.wbits=15),r.check=0,x[0]=255&h,x[1]=h>>>8&255,r.check=ic(r.check,x,2,0),h=0,c=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=sd;break}if((15&h)!==Ju){e.msg="unknown compression method",r.mode=sd;break}if(h>>>=4,c-=4,_=8+(15&h),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){e.msg="invalid window size",r.mode=sd;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&h?16189:$u,h=0,c=0;break;case 16181:for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(r.flags=h,(255&r.flags)!==Ju){e.msg="unknown compression method",r.mode=sd;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=sd;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,r.check=ic(r.check,x,2,0)),h=0,c=0,r.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.head&&(r.head.time=h),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,x[2]=h>>>16&255,x[3]=h>>>24&255,r.check=ic(r.check,x,4,0)),h=0,c=0,r.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,r.check=ic(r.check,x,2,0)),h=0,c=0,r.mode=16184;case 16184:if(1024&r.flags){for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&4&r.wrap&&(x[0]=255&h,x[1]=h>>>8&255,r.check=ic(r.check,x,2,0)),h=0,c=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>a&&(p=a),p&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(s.subarray(i,i+p),_)),512&r.flags&&4&r.wrap&&(r.check=ic(r.check,s,p,i)),a-=p,i+=p,r.length-=p),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break e;p=0;do{_=s[i+p++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&p<a);if(512&r.flags&&4&r.wrap&&(r.check=ic(r.check,s,p,i)),a-=p,i+=p,_)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===a)break e;p=0;do{_=s[i+p++],r.head&&_&&r.length<65536&&(r.head.comment+=String.fromCharCode(_))}while(_&&p<a);if(512&r.flags&&4&r.wrap&&(r.check=ic(r.check,s,p,i)),a-=p,i+=p,_)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;c<16;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(4&r.wrap&&h!==(65535&r.check)){e.msg="header crc mismatch",r.mode=sd;break}h=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=$u;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}e.adler=r.check=nd(h),h=0,c=0,r.mode=Ku;case Ku:if(0===r.havedict)return e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=h,r.bits=c,Wu;e.adler=r.check=1,r.mode=$u;case $u:if(t===Uu||t===Bu)break e;case qu:if(r.last){h>>>=7&c,c-=7&c,r.mode=rd;break}for(;c<3;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}switch(r.last=1&h,h>>>=1,c-=1,3&h){case 0:r.mode=16193;break;case 1:if(fd(r),r.mode=ed,t===Bu){h>>>=2,c-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=sd}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",r.mode=sd;break}if(r.length=65535&h,h=0,c=0,r.mode=Qu,t===Bu)break e;case Qu:r.mode=16195;case 16195:if(p=r.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;n.set(s.subarray(i,i+p),o),a-=p,i+=p,l-=p,o+=p,r.length-=p;break}r.mode=$u;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(r.nlen=257+(31&h),h>>>=5,c-=5,r.ndist=1+(31&h),h>>>=5,c-=5,r.ncode=4+(15&h),h>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=sd;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;c<3;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.lens[A[r.have++]]=7&h,h>>>=3,c-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},C=zu(0,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,C){e.msg="invalid code lengths set",r.mode=sd;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;k=r.lencode[h&(1<<r.lenbits)-1],g=k>>>24,y=k>>>16&255,w=65535&k,!(g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(w<16)h>>>=g,c-=g,r.lens[r.have++]=w;else{if(16===w){for(O=g+2;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(h>>>=g,c-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=sd;break}_=r.lens[r.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===w){for(O=g+3;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=g,c-=g,_=0,p=3+(7&h),h>>>=3,c-=3}else{for(O=g+7;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=g,c-=g,_=0,p=11+(127&h),h>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=sd;break}for(;p--;)r.lens[r.have++]=_}}if(r.mode===sd)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=sd;break}if(r.lenbits=9,I={bits:r.lenbits},C=zu(1,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,C){e.msg="invalid literal/lengths set",r.mode=sd;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},C=zu(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,C){e.msg="invalid distances set",r.mode=sd;break}if(r.mode=ed,t===Bu)break e;case ed:r.mode=td;case td:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=h,r.bits=c,Eu(e,d),o=e.next_out,n=e.output,l=e.avail_out,i=e.next_in,s=e.input,a=e.avail_in,h=r.hold,c=r.bits,r.mode===$u&&(r.back=-1);break}for(r.back=0;k=r.lencode[h&(1<<r.lenbits)-1],g=k>>>24,y=k>>>16&255,w=65535&k,!(g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(y&&!(240&y)){for(b=g,v=y,S=w;k=r.lencode[S+((h&(1<<b+v)-1)>>b)],g=k>>>24,y=k>>>16&255,w=65535&k,!(b+g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=b,c-=b,r.back+=b}if(h>>>=g,c-=g,r.back+=g,r.length=w,0===y){r.mode=16205;break}if(32&y){r.back=-1,r.mode=$u;break}if(64&y){e.msg="invalid literal/length code",r.mode=sd;break}r.extra=15&y,r.mode=16201;case 16201:if(r.extra){for(O=r.extra;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;k=r.distcode[h&(1<<r.distbits)-1],g=k>>>24,y=k>>>16&255,w=65535&k,!(g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(!(240&y)){for(b=g,v=y,S=w;k=r.distcode[S+((h&(1<<b+v)-1)>>b)],g=k>>>24,y=k>>>16&255,w=65535&k,!(b+g<=c);){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}h>>>=b,c-=b,r.back+=b}if(h>>>=g,c-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=sd;break}r.offset=w,r.extra=15&y,r.mode=16203;case 16203:if(r.extra){for(O=r.extra;c<O;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=sd;break}r.mode=16204;case 16204:if(0===l)break e;if(p=d-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=sd;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=n,f=o-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{n[o++]=m[f++]}while(--p);0===r.length&&(r.mode=td);break;case 16205:if(0===l)break e;n[o++]=r.length,l--,r.mode=td;break;case rd:if(r.wrap){for(;c<32;){if(0===a)break e;a--,h|=s[i++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,4&r.wrap&&d&&(e.adler=r.check=r.flags?ic(r.check,n,d,o-d):sc(r.check,n,d,o-d)),d=l,4&r.wrap&&(r.flags?h:nd(h))!==r.check){e.msg="incorrect data check",r.mode=sd;break}h=0,c=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;c<32;){if(0===a)break e;a--,h+=s[i++]<<c,c+=8}if(4&r.wrap&&h!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=sd;break}h=0,c=0}r.mode=16208;case 16208:C=ju;break e;case sd:C=Gu;break e;case 16210:return Yu;default:return Vu}return e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=h,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<sd&&(r.mode<rd||t!==Pu))&&md(e,e.output,e.next_out,d-e.avail_out),u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,4&r.wrap&&d&&(e.adler=r.check=r.flags?ic(r.check,n,d,e.next_out-d):sc(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===$u?128:0)+(r.mode===ed||r.mode===Qu?256:0),(0===u&&0===d||t===Pu)&&C===Zu&&(C=Hu),C},yd={inflateReset:ld,inflateReset2:hd,inflateResetKeep:ad,inflateInit:e=>cd(e,15),inflateInit2:cd,inflate:gd,inflateEnd:e=>{if(od(e))return Vu;let t=e.state;return t.window&&(t.window=null),e.state=null,Zu},inflateGetHeader:(e,t)=>{if(od(e))return Vu;const r=e.state;return 2&r.wrap?(r.head=t,t.done=!1,Zu):Vu},inflateSetDictionary:(e,t)=>{const r=t.length;let s,n,i;return od(e)?Vu:(s=e.state,0!==s.wrap&&s.mode!==Ku?Vu:s.mode===Ku&&(n=1,n=sc(n,t,r,0),n!==s.check)?Gu:(i=md(e,t,r,r),i?(s.mode=16210,Yu):(s.havedict=1,Zu)))},inflateInfo:"pako inflate (from Nodeca project)"};var wd=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const bd=Object.prototype.toString,{Z_NO_FLUSH:vd,Z_FINISH:Sd,Z_OK:_d,Z_STREAM_END:Cd,Z_NEED_DICT:kd,Z_STREAM_ERROR:xd,Z_DATA_ERROR:Id,Z_MEM_ERROR:Od}=ac;function Ad(e){this.options=au({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fu,this.strm.avail_out=0;let r=yd.inflateInit2(this.strm,t.windowBits);if(r!==_d)throw new Error(oc[r]);if(this.header=new wd,yd.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=uu(t.dictionary):"[object ArrayBuffer]"===bd.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=yd.inflateSetDictionary(this.strm,t.dictionary),r!==_d)))throw new Error(oc[r])}function Rd(e,t){const r=new Ad(t);if(r.push(e),r.err)throw r.msg||oc[r.err];return r.result}Ad.prototype.push=function(e,t){const r=this.strm,s=this.options.chunkSize,n=this.options.dictionary;let i,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Sd:vd,"[object ArrayBuffer]"===bd.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),i=yd.inflate(r,o),i===kd&&n&&(i=yd.inflateSetDictionary(r,n),i===_d?i=yd.inflate(r,o):i===Id&&(i=kd));r.avail_in>0&&i===Cd&&r.state.wrap>0&&0!==e[r.next_in];)yd.inflateReset(r),i=yd.inflate(r,o);switch(i){case xd:case Id:case kd:case Od:return this.onEnd(i),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||i===Cd))if("string"===this.options.to){let e=pu(r.output,r.next_out),t=r.next_out-e,n=du(r.output,e);r.next_out=t,r.avail_out=s-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==_d||0!==a){if(i===Cd)return i=yd.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Ad.prototype.onData=function(e){this.chunks.push(e)},Ad.prototype.onEnd=function(e){e===_d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=lu(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Md=function(e,t){return(t=t||{}).raw=!0,Rd(e,t)},Ed={Inflate:Ad,inflate:Rd,inflateRaw:Md,ungzip:Rd};const{Deflate:Td,deflate:Nd,deflateRaw:Dd,gzip:Ld}=Ru,{Inflate:Fd,inflate:zd,inflateRaw:Pd,ungzip:Ud}=Ed;var Bd={Deflate:Td,deflate:Nd,deflateRaw:Dd,gzip:Ld,Inflate:Fd,inflate:zd,inflateRaw:Pd,ungzip:Ud,constants:ac};function Zd(e){if(!e)return"";const t=JSON.stringify(e),r=Bd.gzip(t);return btoa(String.fromCharCode(...r))}var jd=Object.defineProperty,Wd=(e,t,r)=>((e,t,r)=>t in e?jd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Vd extends t.SentryPlugin{constructor(e={durationMs:n.DEFAULT_OPTIONS.screenRecordDurationMs,eventTypes:n.DEFAULT_OPTIONS.screenRecordEventTypes}){super(t.EventType.ScreenRecord),Wd(this,"durationMs",n.DEFAULT_OPTIONS.screenRecordDurationMs),Wd(this,"eventTypes",n.DEFAULT_OPTIONS.screenRecordEventTypes);const{durationMs:r=n.DEFAULT_OPTIONS.screenRecordDurationMs,eventTypes:s=n.DEFAULT_OPTIONS.screenRecordEventTypes}=e;this.durationMs=r,this.eventTypes=s}init(){r.sentry.options.enableScreenRecord=!0,r.sentry.options.screenRecordEventTypes=this.eventTypes,r.sentry.options.screenRecordDurationMs=this.durationMs,function(e){const s=new r.MinHeap;mh({emit(n,i){if(i)if(r.sentry.shouldRecordScreen){const s={id:crypto.randomUUID(),name:"ScreenRecord",message:"",...r.getTime(),type:t.EventType.ScreenRecord,status:t.Status.OK,event:Zd(n)};e.send(s),r.sentry.shouldRecordScreen=!1}else s.clear();s.push(n)},recordCanvas:!0,checkoutEveryNms:r.sentry.options.screenRecordDurationMs})}(s)}}exports.default=Vd;
2
+ //# sourceMappingURL=index.min.cjs.map