UNPKG

@lastos/page-spy-plugin-rrweb

Version:
3 lines 190 kB
function e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function t(t,r,s){return(r=e(r))in t?Object.defineProperty(t,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[r]=s,t}var r,s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),o=Object.defineProperty,i=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),a=(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))(a||{});const l={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},c={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},h={},u=()=>!!globalThis.Zone;function p(e){if(h[e])return h[e];const t=globalThis[e],r=t.prototype,s=e in l?l[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]"))}))),o=e in c?c[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!u())return h[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 o=n[e].prototype;return document.body.removeChild(s),o?h[e]=o:r}catch{return r}}const d={};function f(e,t,r){var s;const n="".concat(e,".").concat(String(r));if(d[n])return d[n].call(t);const o=p(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(d[n]=i,i.call(t)):t[r]}const m={};function g(e,t,r){const s="".concat(e,".").concat(String(r));if(m[s])return m[s].bind(t);const n=p(e)[r];return"function"!=typeof n?t[r]:(m[s]=n,n.bind(t))}const y={ownerDocument:function(e){return f("Node",e,"ownerDocument")},childNodes:function(e){return f("Node",e,"childNodes")},parentNode:function(e){return f("Node",e,"parentNode")},parentElement:function(e){return f("Node",e,"parentElement")},textContent:function(e){return f("Node",e,"textContent")},contains:function(e,t){return g("Node",e,"contains")(t)},getRootNode:function(e){return g("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?f("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?f("Element",e,"shadowRoot"):null},querySelector:function(e,t){return f("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return f("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return p("MutationObserver").constructor},patch:function(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()=>{}}}};function w(e){return e.nodeType===e.ELEMENT_NODE}function b(e){const t=e&&"host"in e&&"mode"in e&&y.host(e)||null;return Boolean(t&&"shadowRoot"in t&&y.shadowRoot(t)===e)}function v(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function S(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);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=S(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer(".concat(e.layerName,")")),e.supportsText&&r.push("supports(".concat(e.supportsText,")")),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?L(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?L(r,t):r}}class I{constructor(){i(this,"idNodeMap",new Map),i(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-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 k(e){let{element:t,maskInputOptions:r,tagName:s,type:n,value:o,maskInputFn:i}=e,a=o||"";const l=n&&x(n);return(r[s.toLowerCase()]||l&&r[l])&&(a=i?i(a,t):"*".repeat(a.length)),a}function x(e){return e.toLowerCase()}const O="__rrweb_original__";function M(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?x(t):null}function A(e,t){var r;let s;try{s=new URL(e,null!=t?t:window.location.href)}catch(e){return null}const n=s.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}const R=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,E=/^(?:[a-z+]+:)?\/\//i,N=/^www\..*/i,T=/^(data:)([^,]*),(.*)/i;function L(e,t){return(e||"").replace(R,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(E.test(a)||N.test(a))return"url(".concat(l).concat(a).concat(l,")");if(T.test(a))return"url(".concat(l).concat(a).concat(l,")");if("/"===a[0])return"url(".concat(l).concat(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).concat(l,")");const c=t.split("/"),h=a.split("/");c.pop();for(const e of h)"."!==e&&(".."===e?c.pop():c.push(e));return"url(".concat(l).concat(c.join("/")).concat(l,")")}))}function D(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function P(e,t){return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=Array.from(t.childNodes),n=[];let o=0;if(s.length>1&&e&&"string"==typeof e){let t=D(e,r);const i=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=D(s[a].textContent,r),c=100;let h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,h),1));h++);for(;h<l.length;h++){let u=l.substring(0,h),p=t.split(u),d=-1;if(2===p.length)d=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)d=t.indexOf(u,1);else if(1===p.length){if(u=u.substring(0,u.length-1),p=t.split(u),p.length<=1)return n.push(e),n;h=c+1}else h===l.length-1&&(d=t.indexOf(u));if(p.length>=2&&h>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=D(e).length;d=t.indexOf(u,r)}-1===d&&(d=p[0].length)}if(-1!==d){let a=Math.floor(d/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=D(e.substring(0,a),r);if(l.length===d){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(d);break}l.length<d?a+=Math.max(1,Math.floor((d-l.length)/i)):a-=Math.max(1,Math.floor((l.length-d)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}let F=1;const B=new RegExp("[^a-z0-9-_:]"),_=-2;function U(){return F++}let z,j;const W=/^[^ \t\n\r\u000c]+/,V=/^[, \t\n\r\u000c]+/;const G=new WeakMap;function Y(e,t){return t&&""!==t.trim()?J(e,t):t}function Z(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function J(e,t){let r=G.get(e);if(r||(r=e.createElement("a"),G.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function X(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]||"background"===r&&["table","td","th"].includes(t)?Y(e,s):"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(V),!(r>=t.length);){let o=s(W);if(","===o.slice(-1))o=Y(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=Y(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?L(s,J(e)):"object"===t&&"data"===r?Y(e,s):s:s}function H(e,t,r){return["video","audio"].includes(e)&&"autoplay"===t}function K(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&K(y.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(y.parentNode(e),t,r)}function Q(e,t,r,s){let n;if(w(e)){if(n=e,!y.childNodes(n).length)return!1}else{if(null===y.parentElement(e))return!1;n=y.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(".".concat(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:o,needsMask:i,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:h,maskInputFn:u,dataURLOptions:p={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g=!1,cssCaptured:w=!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:a.Document,childNodes:[],compatMode:e.compatMode}:{type:a.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:a.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:o,maskInputOptions:i={},maskInputFn:l,dataURLOptions:c={},inlineImages:h,recordCanvas:u,keepIframeSrcFn:p,newlyAddedElement:d=!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=x(e.tagName);return B.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const s=e.attributes[t];H(g,s.name,s.value)||(y[s.name]=X(r,g,x(s.name),s.value))}if("link"===g&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=S(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=S(e.sheet);t&&(e.childNodes.length>1&&(t=P(t,e)),y._cssText=t)}if(["input","textarea","select"].includes(g)){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=k({element:e,type:M(e),tagName:g,value:t,maskInputOptions:i,maskInputFn:l}):r&&(y.checked=r)}"option"===g&&(e.selected&&!i.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,o=O in n?n[O]:n;if(new Uint32Array(o.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(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(c.type,c.quality)&&(y.rr_dataURL=t)}if("img"===g&&h){z||(z=r.createElement("canvas"),j=z.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{z.width=t.naturalWidth,z.height=t.naturalHeight,j.drawImage(t,0,0),y.rr_dataURL=z.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn("Cannot inline img src=".concat(s,"! Error: ").concat(e))}"anonymous"===t.crossOrigin&&(n?y.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(["audio","video"].includes(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}d||(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:"".concat(t,"px"),rr_height:"".concat(r,"px")}}"iframe"!==g||p(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(g)&&(b=!0)}catch(e){}return{type:a.Element,tagName:g,attributes:y,childNodes:[],isSVG:Z(e)||void 0,needBlock:m,rootId:f,isCustom:b}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:l,maskInputOptions:c,maskInputFn:u,dataURLOptions:p,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g,rootId:b});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=y.parentNode(e),l=i&&i.tagName;let c="";const h="STYLE"===l||void 0,u="SCRIPT"===l||void 0;u?c="SCRIPT_PLACEHOLDER":o||(c=y.textContent(e),h&&c&&(c=L(c,J(t.doc))));!h&&!u&&c&&r&&(c=s?s(c,y.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:a.Text,textContent:c||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:h,rootId:b,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:a.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:a.Comment,textContent:y.textContent(e)||"",rootId:b};default:return!1}}function $(e){return null==e?"":e.toLowerCase()}function ee(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function te(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:g=!1,recordCanvas:S=!1,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:M=(()=>!1),newlyAddedElement:R=!1,cssCaptured:E=!1}=t;let{needsMask:N}=t,{preserveWhiteSpace:T=!0}=t;if(!N){N=Q(e,i,l,void 0===N)}const L=q(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:N,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,dataURLOptions:m,inlineImages:g,recordCanvas:S,keepIframeSrcFn:M,newlyAddedElement:R,cssCaptured:E});if(!L)return console.warn(e,"not serialized"),null;let D;D=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===a.Comment)return!0;if(e.type===a.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===A(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&($(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===$(e.attributes.name)||"icon"===$(e.attributes.rel)||"apple-touch-icon"===$(e.attributes.rel)||"shortcut icon"===$(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&$(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&($(e.attributes.property).match(/^(og|twitter|fb):/)||$(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===$(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===$(e.attributes.name)||"googlebot"===$(e.attributes.name)||"bingbot"===$(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===$(e.attributes.name)||"generator"===$(e.attributes.name)||"framework"===$(e.attributes.name)||"publisher"===$(e.attributes.name)||"progid"===$(e.attributes.name)||$(e.attributes.property).match(/^article:/)||$(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===$(e.attributes.name)||"yandex-verification"===$(e.attributes.name)||"csrf-token"===$(e.attributes.name)||"p:domain_verify"===$(e.attributes.name)||"verify-v1"===$(e.attributes.name)||"verification"===$(e.attributes.name)||"shopify-checkout-api-token"===$(e.attributes.name)))return!0}}return!1}(L,f)||!T&&L.type===a.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?_:U();const P=Object.assign(L,{id:D});if(s.add(e,P),D===_)return null;C&&C(e);let F=!c;if(P.type===a.Element){F=F&&!P.needBlock,delete P.needBlock;const t=y.shadowRoot(e);t&&v(t)&&(P.isShadowHost=!0)}if((P.type===a.Document||P.type===a.Element)&&F){f.headWhitespace&&P.type===a.Element&&"head"===P.tagName&&(T=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:N,maskTextClass:i,maskTextSelector:l,skipChild:c,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:O,keepIframeSrcFn:M,cssCaptured:!1};if(P.type===a.Element&&"textarea"===P.tagName&&void 0!==P.attributes.value);else{P.type===a.Element&&void 0!==P.attributes._cssText&&"string"==typeof P.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(y.childNodes(e))){const e=te(r,t);e&&P.childNodes.push(e)}}let b=null;if(w(e)&&(b=y.shadowRoot(e)))for(const e of Array.from(y.childNodes(b))){const r=te(e,t);r&&(v(b)&&(r.isShadow=!0),P.childNodes.push(r))}}const B=y.parentNode(e);return B&&b(B)&&v(B)&&(P.isShadow=!0),P.type===a.Element&&"iframe"===P.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout((()=>{o||(t(),o=!0)}),r);return void e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&I){const r=te(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:N,maskTextClass:i,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:O,keepIframeSrcFn:M});r&&I(e,r)}}),k),P.type===a.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===A(P.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout((()=>{n||(t(),n=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),n=!0,t()}))}(e,(()=>{if(x){const t=te(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:N,maskTextClass:i,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:p,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:g,recordCanvas:S,preserveWhiteSpace:T,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:O,keepIframeSrcFn:M});t&&x(e,t)}}),O),P}function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function se(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 ne={exports:{}},oe=String,ie=function(){return{isColorSupported:!1,reset:oe,bold:oe,dim:oe,italic:oe,underline:oe,inverse:oe,hidden:oe,strikethrough:oe,black:oe,red:oe,green:oe,yellow:oe,blue:oe,magenta:oe,cyan:oe,white:oe,gray:oe,bgBlack:oe,bgRed:oe,bgGreen:oe,bgYellow:oe,bgBlue:oe,bgMagenta:oe,bgCyan:oe,bgWhite:oe}};ne.exports=ie(),ne.exports.createColors=ie;var ae=ne.exports;const le=se(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ce=ae,he=le,ue=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),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=ce.isColorSupported),he&&e&&(t=he(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=ce.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var pe=ue;ue.default=ue;var de={};de.isClean=Symbol("isClean"),de.my=Symbol("my");const fe={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};let me=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],o=this.raw(n,"before");o&&this.builder(o),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 fe[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=fe[r]),o.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 ge=me;me.default=me;let ye=ge;function we(e,t){new ye(t).stringify(e)}var be=we;we.default=we;let{isClean:ve,my:Se}=de,Ce=pe,Ie=ge,ke=be;function xe(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],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>xe(e,r))):("object"===o&&null!==n&&(n=xe(n)),r[s]=n)}return r}let Oe=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.raws={},this[ve]=!1,this[Se]=!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 /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}after(e){return this.parent.insertAfter(this,e),this}assign(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=xe(this);for(let r in e)t[r]=e[r];return t}cloneAfter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 Ce(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[ve]){this[ve]=!1;let e=this;for(;e=e.parent;)e[ve]=!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 Ie).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){let s=this,n=!1;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(let e of t)e===this?n=!0:n?(this.parent.insertAfter(s,e),s=e):this.parent.insertBefore(s,e);n||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 o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ke;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 Me=Oe;Oe.default=Oe;let Ae=Me,Re=class extends Ae{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 Ee=Re;Re.default=Re;var Ne={nanoid:function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){let r="",s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;for(;s--;)r+=e[Math.random()*e.length|0];return r}}};let{SourceMapConsumer:Te,SourceMapGenerator:Le}=le,{existsSync:De,readFileSync:Pe}=le,{dirname:Fe,join:Be}=le;let _e=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=Fe(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Te(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=Fe(e),De(e))return this.mapFile=e,Pe(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 Te)return Le.fromSourceMap(t).toString();if(t instanceof Le)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=Be(Fe(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 Ue=_e;_e.default=_e;let{SourceMapConsumer:ze,SourceMapGenerator:je}=le,{fileURLToPath:We,pathToFileURL:Ve}=le,{isAbsolute:Ge,resolve:Ye}=le,{nanoid:Ze}=Ne,Je=le,Xe=pe,He=Ue,Ke=Symbol("fromOffsetCache"),Qe=Boolean(ze&&je),qe=Boolean(Ye&&Ge),$e=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||"object"==typeof e&&!e.toString)throw new Error("PostCSS received ".concat(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&&(!qe||/^\w+:\/\//.test(t.from)||Ge(t.from)?this.file=t.from:this.file=Ye(t.from)),qe&&Qe){let e=new He(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 "+Ze(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r){let s,n,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};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);n=e.line,o=e.col}else n=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,n,o);return s=a?new Xe(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,i.plugin):new Xe(e,void 0===n?t:{column:r,line:t},void 0===n?r:{column:o,line:n},this.css,this.file,i.plugin),s.input={column:r,endColumn:o,endLine:n,line:t,source:this.css},this.file&&(Ve&&(s.input.url=Ve(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[Ke])r=this[Ke];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[Ke]=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:Ye(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Ge(a.source)?Ve(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ve(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!We)throw new Error("file: protocol is not available in this PostCSS build");l.file=We(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),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 et=$e;$e.default=$e,Je&&Je.registerInput&&Je.registerInput($e);let{SourceMapConsumer:tt,SourceMapGenerator:rt}=le,{dirname:st,relative:nt,resolve:ot,sep:it}=le,{pathToFileURL:at}=le,lt=et,ct=Boolean(tt&&rt),ht=Boolean(st&&ot&&nt&&it);var ut=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||st(e.file);!1===this.mapOpts.sourcesContent?(t=new tt(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&&ct&&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=rt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new rt({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 rt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.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?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}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?st(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=st(ot(r,this.mapOpts.annotation)));let s=nt(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 lt(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(at){let t=at(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 pt=Me,dt=class extends pt{constructor(e){super(e),this.type="comment"}};var ft=dt;dt.default=dt;let mt,gt,yt,wt,{isClean:bt,my:vt}=de,St=Ee,Ct=ft,It=Me;function kt(e){return e.map((e=>(e.nodes&&(e.nodes=kt(e.nodes)),delete e.source,e)))}function xt(e){if(e[bt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)xt(t)}let Ot=class e extends It{append(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}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")?function(){for(var r=arguments.length,s=new Array(r),n=0;n<r;n++)s[n]=arguments[n];return e[t](...s.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)))}:"every"===t||"some"===t?r=>e[t]((function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];return r(e.toProxy(),...s)})):"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",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=kt(mt(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 St(t)]}else if(t.selector)t=[new gt(t)];else if(t.name)t=[new yt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ct(t)]}return t.map((t=>(t[vt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[bt]&&xt(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(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.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]}};Ot.registerParse=e=>{mt=e},Ot.registerRule=e=>{gt=e},Ot.registerAtRule=e=>{yt=e},Ot.registerRoot=e=>{wt=e};var Mt=Ot;Ot.default=Ot,Ot.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,yt.prototype):"rule"===e.type?Object.setPrototypeOf(e,gt.prototype):"decl"===e.type?Object.setPrototypeOf(e,St.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ct.prototype):"root"===e.type&&Object.setPrototypeOf(e,wt.prototype),e[vt]=!0,e.nodes&&e.nodes.forEach((e=>{Ot.rebuild(e)}))};let At,Rt,Et=Mt,Nt=class extends Et{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new At(new Rt,this,e).stringify()}};Nt.registerLazyResult=e=>{At=e},Nt.registerProcessor=e=>{Rt=e};var Tt=Nt;Nt.default=Nt;let Lt={};var Dt=function(e){Lt[e]||(Lt[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Pt=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 Ft=Pt;Pt.default=Pt;let Bt=Ft,_t=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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Bt(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var Ut=_t;_t.default=_t;const zt="'".charCodeAt(0),jt='"'.charCodeAt(0),Wt="\\".charCodeAt(0),Vt="/".charCodeAt(0),Gt="\n".charCodeAt(0),Yt=" ".charCodeAt(0),Zt="\f".charCodeAt(0),Jt="\t".charCodeAt(0),Xt="\r".charCodeAt(0),Ht="[".charCodeAt(0),Kt="]".charCodeAt(0),Qt="(".charCodeAt(0),qt=")".charCodeAt(0),$t="{".charCodeAt(0),er="}".charCodeAt(0),tr=";".charCodeAt(0),rr="*".charCodeAt(0),sr=":".charCodeAt(0),nr="@".charCodeAt(0),or=/[\t\n\f\r "#'()/;[\\\]{}]/g,ir=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ar=/.[\r\n"'(/\\]/,lr=/[\da-f]/i;let cr=Mt,hr=class extends cr{constructor(e){super(e),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}};var ur=hr;hr.default=hr,cr.registerAtRule(hr);let pr,dr,fr=Mt,mr=class extends fr{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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new pr(new dr,this,e).stringify()}};mr.registerLazyResult=e=>{pr=e},mr.registerProcessor=e=>{dr=e};var gr=mr;mr.default=mr,fr.registerRoot(mr);let yr={comma:e=>yr.split(e,[","],!0),space:e=>yr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var wr=yr;yr.default=yr;let br=Mt,vr=wr,Sr=class extends br{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return vr.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 Cr=Sr;Sr.default=Sr,br.registerRule(Sr);let Ir=Ee,kr=function(e){let t,r,s,n,o,i,a,l,c,h,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=e.css.valueOf(),d=u.ignoreErrors,f=p.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 u=!!e&&e.ignoreUnclosed;switch(t=p.charCodeAt(m),t){case Gt:case Yt:case Jt:case Xt:case Zt:r=m;do{r+=1,t=p.charCodeAt(r)}while(t===Yt||t===Gt||t===Jt||t===Xt||t===Zt);h=["space",p.slice(m,r)],m=r-1;break;case Ht:case Kt:case $t:case er:case sr:case tr:case qt:{let e=String.fromCharCode(t);h=[e,e,m];break}case Qt:if(l=g.length?g.pop()[1]:"",c=p.charCodeAt(m+1),"url"===l&&c!==zt&&c!==jt&&c!==Yt&&c!==Gt&&c!==Jt&&c!==Zt&&c!==Xt){r=m;do{if(i=!1,r=p.indexOf(")",r+1),-1===r){if(d||u){r=m;break}w("bracket")}for(a=r;p.charCodeAt(a-1)===Wt;)a-=1,i=!i}while(i);h=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),n=p.slice(m,r+1),-1===r||ar.test(n)?h=["(","(",m]:(h=["brackets",n,m,r],m=r);break;case zt:case jt:s=t===zt?"'":'"',r=m;do{if(i=!1,r=p.indexOf(s,r+1),-1===r){if(d||u){r=m+1;break}w("string")}for(a=r;p.charCodeAt(a-1)===Wt;)a-=1,i=!i}while(i);h=["string",p.slice(m,r+1),m,r],m=r;break;case nr:or.lastIndex=m+1,or.test(p),r=0===or.lastIndex?p.length-1:or.lastIndex-2,h=["at-word",p.slice(m,r+1),m,r],m=r;break;case Wt:for(r=m,o=!0;p.charCodeAt(r+1)===Wt;)r+=1,o=!o;if(t=p.charCodeAt(r+1),o&&t!==Vt&&t!==Yt&&t!==Gt&&t!==Jt&&t!==Xt&&t!==Zt&&(r+=1,lr.test(p.charAt(r)))){for(;lr.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Yt&&(r+=1)}h=["word",p.slice(m,r+1),m,r],m=r;break;default:t===Vt&&p.charCodeAt(m+1)===rr?(r=p.indexOf("*/",m+2)+1,0===r&&(d||u?r=p.length:w("comment")),h=["comment",p.slice(m,r+1),m,r],m=r):(ir.lastIndex=m+1,ir.test(p),r=0===ir.lastIndex?p.length-1:ir.lastIndex-2,h=["word",p.slice(m,r+1),m,r],g.push(h),m=r)}return m++,h},position:function(){return m}}},xr=ft,Or=ur,Mr=gr,Ar=Cr;const Rr={empty:!0,space:!0};let Er=Mt,Nr=class{constructor(e){this.input=e,this.root=new Mr,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 Or;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!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){i=!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()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(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=""),i&&(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[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new xr;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=kr(this.input)}decl(e,t){let r=new Ir;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 o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.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+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.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 Ar;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,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}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,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",Rr[a]||Rr[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Ar;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})}},Tr=et;function Lr(e,t){let r=new Tr(e,t),s=new Nr(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 Dr=Lr;Lr.default=Lr,Er.registerParse(Lr);let{isClean:Pr,my:Fr}=de,Br=ut,_r=be,Ur=Mt,zr=Tt,jr=Dt,Wr=Ut,Vr=Dr,Gr=gr;const Yr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zr={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},Jr={Once:!0,postcssPlugin:!0,prepare:!0},Xr=0;function Hr(e){return"object"==typeof e&&"function"==typeof e.then}function Kr(e){let t=!1,r=Yr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,Xr,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,Xr,r+"Exit"]:[r,r+"Exit"]}function Qr(e){let t;return t="document"===e.type?["Document",Xr,"DocumentExit"]:"root"===e.type?["Root",Xr,"RootExit"]:Kr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function qr(e){return e[Pr]=!1,e.nodes&&e.nodes.forEach((e=>qr(e))),e}let $r={},es=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 Wr)n=qr(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=Vr;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[Fr]&&Ur.rebuild(n)}else n=qr(r);this.result=new Wr(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("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[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(!Zr[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event ".concat(r," in ").concat(t.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!Jr[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[Pr];){e[Pr]=!0;let t=[Qr(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=_r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Br(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[Pr];)e[Pr]=!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||jr("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[Pr])return s[Pr]=!0,void e.push(Qr(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,e===Xr)return void(r.nodes&&r.nodes.length&&(r[Pr]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Pr]=!0;let t=Kr(e);for(let r of t)if(r===Xr)e.nodes&&e.each((e=>{e[Pr]||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"}};es.registerPostcss=e=>{$r=e};var ts=es;es.default=es,Gr.registerLazyResult(es),zr.registerLazyResult(es);let rs=ut,ss=be,ns=Dt,os=Dr;const is=Ut;let as=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=ss;this.result=new is(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new rs(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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||ns("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=os;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 ls=as;as.default=as;let cs=ls,hs=ts,us=Tt,ps=gr,ds=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||t.parser||t.stringifier||t.syntax?new hs(this,e,t):new cs(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var fs=ds;ds.default=ds,ps.registerProcessor(ds),us.registerProcessor(ds);let ms=Ee,gs=Ue,ys=ft,ws=ur,bs=et,vs=gr,Ss=Cr;function Cs(e,t){if(Array.isArray(e))return e.map((e=>Cs(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:bs.prototype};r.map&&(r.map={...r.map,__proto__:gs.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Cs(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 vs(s);if("decl"===s.type)return new ms(s);if("rule"===s.type)return new Ss(s);if("comment"===s.type)return new ys(s);if("atrule"===s.type)return new ws(s);throw new Error("Unknown node type: "+e.type)}var Is=Cs;Cs.default=Cs;let ks=pe,xs=Ee,Os=ts,Ms=Mt,As=fs,Rs=be,Es=Is,Ns=Tt,Ts=Ft,Ls=ft,Ds=ur,Ps=Ut,Fs=et,Bs=Dr,_s=wr,Us=Cr,zs=gr,js=Me;function Ws(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new As(t)}Ws.plugin=function(e,t){let r,s=!1;function n(){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 r=t(...arguments);return r.postcssPlugin=e,r.postcssVersion=(new As).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Ws([n(r)]).process(e,t)},n},Ws.stringify=Rs,Ws.parse=Bs,Ws.fromJSON=Es,Ws.list=_s,Ws.comment=e=>new Ls(e),Ws.atRule=e=>new Ds(e),Ws.decl=e=>new xs(e),Ws.rule=e=>new Us(e),Ws.root=e=>new zs(e),Ws.document=e=>new Ns(e),Ws.CssSyntaxError=ks,Ws.Declaration=xs,Ws.Container=Ms,Ws.Processor=As,Ws.Document=Ns,Ws.Comment=Ls,Ws.Warning=Ts,Ws.AtRule=Ds,Ws.Result=Ps,Ws.Input=Fs,Ws.Rule=Us,Ws.Root=zs,Ws.Node=js,Os.registerPostcss(Ws);var Vs=Ws;Ws.default=Ws;const Gs=re(Vs);Gs.stringify,Gs.fromJSON,Gs.plugin,Gs.parse,Gs.list,Gs.document,Gs.comment,Gs.atRule,Gs.rule,Gs.decl,Gs.root,Gs.CssSyntaxError,Gs.Declaration,Gs.Container,Gs.Processor,Gs.Document,Gs.Comment,Gs.Warning,Gs.AtRule,Gs.Result,Gs.Input,Gs.Rule,Gs.Root,Gs.Node;var Ys=Object.defineProperty,Zs=(e,t,r)=>((e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xs(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:{}},Ks=String,Qs=function(){return{isColorSupported:!1,reset:Ks,bold:Ks,dim:Ks,italic:Ks,underline:Ks,inverse:Ks,hidden:Ks,strikethrough:Ks,black:Ks,red:Ks,green:Ks,yellow:Ks,blue:Ks,magenta:Ks,cyan:Ks,white:Ks,gray:Ks,bgBlack:Ks,bgRed:Ks,bgGreen:Ks,bgYellow:Ks,bgBlue:Ks,bgMagenta:Ks,bgCyan:Ks,bgWhite:Ks}};Hs.exports=Qs(),Hs.exports.createColors=Qs;var qs=Hs.exports;const $s=Xs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let en=qs,tn=$s,rn=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),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=en.isColorSupported),tn&&e&&(t=tn(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=en.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var sn=rn;rn.default=rn;var nn={};nn.isClean=Symbol("isClean"),nn.my=Symbol("my");const on={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};let an=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],o=this.raw(n,"before");o&&this.builder(o),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 on[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=on[r]),o.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 ln=an;an.default=an;let cn=ln;function hn(e,t){new cn(t).stringify(e)}var un=hn;hn.default=hn;let{isClean:pn,my:dn}=nn,fn=sn,mn=ln,gn=un;function yn(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],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>yn(e,r))):("object"===o&&null!==n&&(n=yn(n)),r[s]=n)}return r}let wn=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.raws={},this[pn]=!1,this[dn]=!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 /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}after(e){return this.parent.insertAfter(this,e),this}assign(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=yn(this);for(let r in e)t[r]=e[r];return t}cloneAfter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 fn(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[pn]){this[pn]=!1;let e=this;for(;e=e.parent;)e[pn]=!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 mn).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){let s=this,n=!1;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(let e of t)e===this?n=!0:n?(this.parent.insertAfter(s,e),s=e):this.parent.insertBefore(s,e);n||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 o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gn;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 bn=wn;wn.default=wn;let vn=bn,Sn=class extends vn{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 Cn=Sn;Sn.default=Sn;var In={nanoid:function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){let r="",s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;for(;s--;)r+=e[Math.random()*e.length|0];return r}}};let{SourceMapConsumer:kn,SourceMapGenerator:xn}=$s,{existsSync:On,readFileSync:Mn}=$s,{dirname:An,join:Rn}=$s;let En=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=An(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new kn(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=An(e),On(e))return this.mapFile=e,Mn(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 kn)return xn.fromSourceMap(t).toString();if(t instanceof xn)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=Rn(An(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 Nn=En;En.default=En;let{SourceMapConsumer:Tn,SourceMapGenerator:Ln}=$s,{fileURLToPath:Dn,pathToFileURL:Pn}=$s,{isAbsolute:Fn,resolve:Bn}=$s,{nanoid:_n}=In,Un=$s,zn=sn,jn=Nn,Wn=Symbol("fromOffsetCache"),Vn=Boolean(Tn&&Ln),Gn=Boolean(Bn&&Fn),Yn=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||"object"==typeof e&&!e.toString)throw new Error("PostCSS received ".concat(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&&(!Gn||/^\w+:\/\//.test(t.from)||Fn(t.from)?this.file=t.from:this.file=Bn(t.from)),Gn&&Vn){let e=new jn(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 "+_n(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r){let s,n,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};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);n=e.line,o=e.col}else n=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,n,o);return s=a?new zn(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,i.plugin):new zn(e,void 0===n?t:{column:r,line:t},void 0===n?r:{column:o,line:n},this.css,this.file,i.plugin),s.input={column:r,endColumn:o,endLine:n,line:t,source:this.css},this.file&&(Pn&&(s.input.url=Pn(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[Wn])r=this[Wn];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[Wn]=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:Bn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Fn(a.source)?Pn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Pn(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Dn)throw new Error("file: protocol is not available in this PostCSS build");l.file=Dn(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),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 Zn=Yn;Yn.default=Yn,Un&&Un.registerInput&&Un.registerInput(Yn);let{SourceMapConsumer:Jn,SourceMapGenerator:Xn}=$s,{dirname:Hn,relative:Kn,resolve:Qn,sep:qn}=$s,{pathToFileURL:$n}=$s,eo=Zn,to=Boolean(Jn&&Xn),ro=Boolean(Hn&&Qn&&Kn&&qn);var so=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 Jn(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(),ro&&to&&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=Xn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Xn({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 Xn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.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?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}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(Qn(r,this.mapOpts.annotation)));let s=Kn(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 eo(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;"\\"===qn&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let no=bn,oo=class extends no{constructor(e){super(e),this.type="comment"}};var io=oo;oo.default=oo;let ao,lo,co,ho,{isClean:uo,my:po}=nn,fo=Cn,mo=io,go=bn;function yo(e){return e.map((e=>(e.nodes&&(e.nodes=yo(e.nodes)),delete e.source,e)))}function wo(e){if(e[uo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)wo(t)}let bo=class e extends go{append(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}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")?function(){for(var r=arguments.length,s=new Array(r),n=0;n<r;n++)s[n]=arguments[n];return e[t](...s.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)))}:"every"===t||"some"===t?r=>e[t]((function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];return r(e.toProxy(),...s)})):"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",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=yo(ao(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 fo(t)]}else if(t.selector)t=[new lo(t)];else if(t.name)t=[new co(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new mo(t)]}return t.map((t=>(t[po]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[uo]&&wo(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(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.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]}};bo.registerParse=e=>{ao=e},bo.registerRule=e=>{lo=e},bo.registerAtRule=e=>{co=e},bo.registerRoot=e=>{ho=e};var vo=bo;bo.default=bo,bo.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,co.prototype):"rule"===e.type?Object.setPrototypeOf(e,lo.prototype):"decl"===e.type?Object.setPrototypeOf(e,fo.prototype):"comment"===e.type?Object.setPrototypeOf(e,mo.prototype):"root"===e.type&&Object.setPrototypeOf(e,ho.prototype),e[po]=!0,e.nodes&&e.nodes.forEach((e=>{bo.rebuild(e)}))};let So,Co,Io=vo,ko=class extends Io{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new So(new Co,this,e).stringify()}};ko.registerLazyResult=e=>{So=e},ko.registerProcessor=e=>{Co=e};var xo=ko;ko.default=ko;let Oo={};var Mo=function(e){Oo[e]||(Oo[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Ao=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 Ro=Ao;Ao.default=Ao;let Eo=Ro,No=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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Eo(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var To=No;No.default=No;const Lo="'".charCodeAt(0),Do='"'.charCodeAt(0),Po="\\".charCodeAt(0),Fo="/".charCodeAt(0),Bo="\n".charCodeAt(0),_o=" ".charCodeAt(0),Uo="\f".charCodeAt(0),zo="\t".charCodeAt(0),jo="\r".charCodeAt(0),Wo="[".charCodeAt(0),Vo="]".charCodeAt(0),Go="(".charCodeAt(0),Yo=")".charCodeAt(0),Zo="{".charCodeAt(0),Jo="}".charCodeAt(0),Xo=";".charCodeAt(0),Ho="*".charCodeAt(0),Ko=":".charCodeAt(0),Qo="@".charCodeAt(0),qo=/[\t\n\f\r "#'()/;[\\\]{}]/g,$o=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ei=/.[\r\n"'(/\\]/,ti=/[\da-f]/i;let ri=vo,si=class extends ri{constructor(e){super(e),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}};var ni=si;si.default=si,ri.registerAtRule(si);let oi,ii,ai=vo,li=class extends ai{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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new oi(new ii,this,e).stringify()}};li.registerLazyResult=e=>{oi=e},li.registerProcessor=e=>{ii=e};var ci=li;li.default=li,ai.registerRoot(li);let hi={comma:e=>hi.split(e,[","],!0),space:e=>hi.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var ui=hi;hi.default=hi;let pi=vo,di=ui,fi=class extends pi{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return di.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 mi=fi;fi.default=fi,pi.registerRule(fi);let gi=Cn,yi=function(e){let t,r,s,n,o,i,a,l,c,h,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=e.css.valueOf(),d=u.ignoreErrors,f=p.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 u=!!e&&e.ignoreUnclosed;switch(t=p.charCodeAt(m),t){case Bo:case _o:case zo:case jo:case Uo:r=m;do{r+=1,t=p.charCodeAt(r)}while(t===_o||t===Bo||t===zo||t===jo||t===Uo);h=["space",p.slice(m,r)],m=r-1;break;case Wo:case Vo:case Zo:case Jo:case Ko:case Xo:case Yo:{let e=String.fromCharCode(t);h=[e,e,m];break}case Go:if(l=g.length?g.pop()[1]:"",c=p.charCodeAt(m+1),"url"===l&&c!==Lo&&c!==Do&&c!==_o&&c!==Bo&&c!==zo&&c!==Uo&&c!==jo){r=m;do{if(i=!1,r=p.indexOf(")",r+1),-1===r){if(d||u){r=m;break}w("bracket")}for(a=r;p.charCodeAt(a-1)===Po;)a-=1,i=!i}while(i);h=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),n=p.slice(m,r+1),-1===r||ei.test(n)?h=["(","(",m]:(h=["brackets",n,m,r],m=r);break;case Lo:case Do:s=t===Lo?"'":'"',r=m;do{if(i=!1,r=p.indexOf(s,r+1),-1===r){if(d||u){r=m+1;break}w("string")}for(a=r;p.charCodeAt(a-1)===Po;)a-=1,i=!i}while(i);h=["string",p.slice(m,r+1),m,r],m=r;break;case Qo:qo.lastIndex=m+1,qo.test(p),r=0===qo.lastIndex?p.length-1:qo.lastIndex-2,h=["at-word",p.slice(m,r+1),m,r],m=r;break;case Po:for(r=m,o=!0;p.charCodeAt(r+1)===Po;)r+=1,o=!o;if(t=p.charCodeAt(r+1),o&&t!==Fo&&t!==_o&&t!==Bo&&t!==zo&&t!==jo&&t!==Uo&&(r+=1,ti.test(p.charAt(r)))){for(;ti.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===_o&&(r+=1)}h=["word",p.slice(m,r+1),m,r],m=r;break;default:t===Fo&&p.charCodeAt(m+1)===Ho?(r=p.indexOf("*/",m+2)+1,0===r&&(d||u?r=p.length:w("comment")),h=["comment",p.slice(m,r+1),m,r],m=r):($o.lastIndex=m+1,$o.test(p),r=0===$o.lastIndex?p.length-1:$o.lastIndex-2,h=["word",p.slice(m,r+1),m,r],g.push(h),m=r)}return m++,h},position:function(){return m}}},wi=io,bi=ni,vi=ci,Si=mi;const Ci={empty:!0,space:!0};let Ii=vo,ki=class{constructor(e){this.input=e,this.root=new vi,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 bi;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!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){i=!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()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(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=""),i&&(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[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new wi;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=yi(this.input)}decl(e,t){let r=new gi;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 o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.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+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.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 Si;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,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}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,o,i,a,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",Ci[a]||Ci[i]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Si;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})}},xi=Zn;function Oi(e,t){let r=new xi(e,t),s=new ki(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 Mi=Oi;Oi.default=Oi,Ii.registerParse(Oi);let{isClean:Ai,my:Ri}=nn,Ei=so,Ni=un,Ti=vo,Li=xo,Di=Mo,Pi=To,Fi=Mi,Bi=ci;const _i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ui={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},zi={Once:!0,postcssPlugin:!0,prepare:!0},ji=0;function Wi(e){return"object"==typeof e&&"function"==typeof e.then}function Vi(e){let t=!1,r=_i[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,ji,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,ji,r+"Exit"]:[r,r+"Exit"]}function Gi(e){let t;return t="document"===e.type?["Document",ji,"DocumentExit"]:"root"===e.type?["Root",ji,"RootExit"]:Vi(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Yi(e){return e[Ai]=!1,e.nodes&&e.nodes.forEach((e=>Yi(e))),e}let Zi={},Ji=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 Pi)n=Yi(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=Fi;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[Ri]&&Ti.rebuild(n)}else n=Yi(r);this.result=new Pi(t,n,s),this.helpers={...Zi,postcss:Zi,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("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[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(!Ui[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event ".concat(r," in ").concat(t.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!zi[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(Wi(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ai];){e[Ai]=!0;let t=[Gi(e)];for(;t.length>0;){let e=this.visitTick(t);if(Wi(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 Wi(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=Ni;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Ei(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(Wi(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ai];)e[Ai]=!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||Di("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(Wi(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[Ai])return s[Ai]=!0,void e.push(Gi(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,e===ji)return void(r.nodes&&r.nodes.length&&(r[Ai]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Ai]=!0;let t=Vi(e);for(let r of t)if(r===ji)e.nodes&&e.each((e=>{e[Ai]||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"}};Ji.registerPostcss=e=>{Zi=e};var Xi=Ji;Ji.default=Ji,Bi.registerLazyResult(Ji),Li.registerLazyResult(Ji);let Hi=so,Ki=un,Qi=Mo,qi=Mi;const $i=To;let ea=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=Ki;this.result=new $i(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Hi(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.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||Qi("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=qi;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 ta=ea;ea.default=ea;let ra=ta,sa=Xi,na=xo,oa=ci,ia=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||t.parser||t.stringifier||t.syntax?new sa(this,e,t):new ra(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var aa=ia;ia.default=ia,oa.registerProcessor(ia),na.registerProcessor(ia);let la=Cn,ca=Nn,ha=io,ua=ni,pa=Zn,da=ci,fa=mi;function ma(e,t){if(Array.isArray(e))return e.map((e=>ma(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:pa.prototype};r.map&&(r.map={...r.map,__proto__:ca.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>ma(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 da(s);if("decl"===s.type)return new la(s);if("rule"===s.type)return new fa(s);if("comment"===s.type)return new ha(s);if("atrule"===s.type)return new ua(s);throw new Error("Unknown node type: "+e.type)}var ga=ma;ma.default=ma;let ya=sn,wa=Cn,ba=Xi,va=vo,Sa=aa,Ca=un,Ia=ga,ka=xo,xa=Ro,Oa=io,Ma=ni,Aa=To,Ra=Zn,Ea=Mi,Na=ui,Ta=mi,La=ci,Da=bn;function Pa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Sa(t)}Pa.plugin=function(e,t){let r,s=!1;function n(){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 r=t(...arguments);return r.postcssPlugin=e,r.postcssVersion=(new Sa).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Pa([n(r)]).process(e,t)},n},Pa.stringify=Ca,Pa.parse=Ea,Pa.fromJSON=Ia,Pa.list=Na,Pa.comment=e=>new Oa(e),Pa.atRule=e=>new Ma(e),Pa.decl=e=>new wa(e),Pa.rule=e=>new Ta(e),Pa.root=e=>new La(e),Pa.document=e=>new ka(e),Pa.CssSyntaxError=ya,Pa.Declaration=wa,Pa.Container=va,Pa.Processor=Sa,Pa.Document=ka,Pa.Comment=Oa,Pa.Warning=xa,Pa.AtRule=Ma,Pa.Result=Aa,Pa.Input=Ra,Pa.Rule=Ta,Pa.Root=La,Pa.Node=Da,ba.registerPostcss(Pa);var Fa=Pa;Pa.default=Pa;const Ba=Js(Fa);Ba.stringify,Ba.fromJSON,Ba.plugin,Ba.parse,Ba.list,Ba.document,Ba.comment,Ba.atRule,Ba.rule,Ba.decl,Ba.root,Ba.CssSyntaxError,Ba.Declaration,Ba.Container,Ba.Processor,Ba.Document,Ba.Comment,Ba.Warning,Ba.AtRule,Ba.Result,Ba.Input,Ba.Rule,Ba.Root,Ba.Node;class _a{constructor(){Zs(this,"parentElement",null),Zs(this,"parentNode",null),Zs(this,"ownerDocument"),Zs(this,"firstChild",null),Zs(this,"lastChild",null),Zs(this,"previousSibling",null),Zs(this,"nextSibling",null),Zs(this,"ELEMENT_NODE",1),Zs(this,"TEXT_NODE",3),Zs(this,"nodeType"),Zs(this,"nodeName"),Zs(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 _a))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 Ua={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},za={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ja={},Wa=()=>!!globalThis.Zone;function Va(e){if(ja[e])return ja[e];const t=globalThis[e],r=t.prototype,s=e in Ua?Ua[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]"))}))),o=e in za?za[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!Wa())return ja[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 o=n[e].prototype;return document.body.removeChild(s),o?ja[e]=o:r}catch{return r}}const Ga={};function Ya(e,t,r){var s;const n="".concat(e,".").concat(String(r));if(Ga[n])return Ga[n].call(t);const o=Va(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Ga[n]=i,i.call(t)):t[r]}const Za={};function Ja(e,t,r){const s="".concat(e,".").concat(String(r));if(Za[s])return Za[s].bind(t);const n=Va(e)[r];return"function"!=typeof n?t[r]:(Za[s]=n,n.bind(t))}function Xa(){return Va("MutationObserver").constructor}function Ha(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()=>{}}}const Ka={ownerDocument:function(e){return Ya("Node",e,"ownerDocument")},childNodes:function(e){return Ya("Node",e,"childNodes")},parentNode:function(e){return Ya("Node",e,"parentNode")},parentElement:function(e){return Ya("Node",e,"parentElement")},textContent:function(e){return Ya("Node",e,"textContent")},contains:function(e,t){return Ja("Node",e,"contains")(t)},getRootNode:function(e){return Ja("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ya("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ya("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ya("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ya("Element",e,"querySelectorAll")(t)},mutationObserver:Xa,patch:Ha};function Qa(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const qa="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 $a={map:{},getId:()=>(console.error(qa),-1),getNode:()=>(console.error(qa),null),removeNodeFromMap(){console.error(qa)},has:()=>(console.error(qa),!1),reset(){console.error(qa)}};function el(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=null,n=0;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const l=Date.now();n||!1!==r.leading||(n=l);const c=t-(l-n),h=this;c<=0||c>t?(s&&(clearTimeout(s),s=null),n=l,e.apply(h,i)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(h,i)}),c))}}function tl(e,t,r,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>tl(e,t,o||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&($a=new Proxy($a,{get:(e,t,r)=>("map"===t&&console.error(qa),Reflect.get(e,t,r))}));let rl=Date.now;function sl(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Ka.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=Ka.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function nl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ol(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function il(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Ka.parentElement(e)}function al(e,t,r,s){if(!e)return!1;const n=il(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 ll(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===_}function cl(e,t){if(b(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Ka.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||cl(s,t))}function hl(e){return Boolean(e.changedTouches)}function ul(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function pl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function dl(e){return!!e&&(e instanceof _a&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ka.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(rl=()=>(new Date).getTime());class fl{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-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 ml(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ka.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ka.host(Ka.getRootNode(e))&&(r=Ka.host(Ka.getRootNode(e))),r}function gl(e){const t=Ka.ownerDocument(e);if(!t)return!1;const r=function(e){let t,r=e;for(;t=ml(r);)r=t;return r}(e);return Ka.contains(t,r)}function yl(e){const t=Ka.ownerDocument(e);return!!t&&(Ka.contains(t,e)||gl(e))}var wl=(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))(wl||{}),bl=(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))(bl||{}),vl=(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))(vl||{}),Sl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Sl||{}),Cl=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Cl||{}),Il=(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))(Il||{}),kl=(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))(kl||{});function xl(e){return"__ln"in e}class Ol{constructor(){n(this,"length",0),n(this,"head",null),n(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&&xl(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&&xl(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 Ml=(e,t)=>"".concat(e,"@").concat(t);class Al{constructor(){n(this,"frozen",!1),n(this,"locked",!1),n(this,"texts",[]),n(this,"attributes",[]),n(this,"attributeMap",new WeakMap),n(this,"removes",[]),n(this,"mapRemoves",[]),n(this,"movedMap",{}),n(this,"addedSet",new Set),n(this,"movedSet",new Set),n(this,"droppedSet",new Set),n(this,"removesSubTreeCache",new Set),n(this,"mutationCb"),n(this,"blockClass"),n(this,"blockSelector"),n(this,"maskTextClass"),n(this,"maskTextSelector"),n(this,"inlineStylesheet"),n(this,"maskInputOptions"),n(this,"maskTextFn"),n(this,"maskInputFn"),n(this,"keepIframeSrcFn"),n(this,"recordCanvas"),n(this,"inlineImages"),n(this,"slimDOMOptions"),n(this,"dataURLOptions"),n(this,"doc"),n(this,"mirror"),n(this,"iframeManager"),n(this,"stylesheetManager"),n(this,"shadowDomManager"),n(this,"canvasManager"),n(this,"processedNodeManager"),n(this,"unattachedDoc"),n(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),n(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Ol,s=e=>{let t=e,r=_;for(;r===_;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=Ka.parentNode(n);if(!o||!yl(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=b(o)?this.mirror.getId(ml(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=te(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=>{ul(e,this.mirror)&&this.iframeManager.addIframe(e),pl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),dl(n)&&this.shadowDomManager.addShadowRoot(Ka.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:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)El(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Ka.parentNode(e))||n(e);for(const e of this.addedSet)Nl(this.droppedSet,e)||El(this.removesSubTreeCache,e,this.mirror)?Nl(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(Ka.parentNode(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(Ka.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Ka.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Ka.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map((e=>{const t=e.node,r=Ka.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};(i.texts.length||i.attributes.length||i.removes.length||i.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(i))})),n(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));const r=Array.from(Ka.childNodes(e),(e=>Ka.textContent(e)||"")).join("");t.attributes.value=k({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:M(e),value:r,maskInputFn:this.maskInputFn})})),n(this,"processMutation",(e=>{if(!ll(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Ka.textContent(e.target);al(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Q(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,il(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=M(t);s=k({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(al(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"),!H(t.tagName,r))if(n.attributes[r]=X(this.doc,x(t.tagName),x(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),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}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(al(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=b(e.target)?this.mirror.getId(Ka.host(e.target)):this.mirror.getId(e.target);al(e.target,this.blockClass,this.blockSelector,!1)||ll(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Rl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||cl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ml(r,s)]?Rl(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!b(e.target)||!v(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Ka.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),n(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ll(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[Ml(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);al(e,this.blockClass,this.blockSelector,!1)||(Ka.childNodes(e).forEach((e=>this.genAdds(e))),dl(e)&&Ka.childNodes(Ka.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 Rl(e,t){e.delete(t),Ka.childNodes(t).forEach((t=>Rl(e,t)))}function El(e,t,r){return 0!==e.size&&function(e,t,r){const s=Ka.parentNode(t);return!!s&&e.has(s)}(e,t)}function Nl(e,t){return 0!==e.size&&Tl(e,t)}function Tl(e,t){const r=Ka.parentNode(t);return!!r&&(!!e.has(r)||Tl(e,r))}let Ll;const Dl=e=>{if(!Ll)return e;return function(){try{return e(...arguments)}catch(e){if(Ll&&!0===Ll(e))return;throw e}}},Pl=[];function Fl(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 Bl(e,t){const r=new Al;Pl.push(r),r.init(e);const s=new(Xa())(Dl(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function _l(e){let{mouseInteractionCb:t,doc:r,mirror:s,blockClass:n,blockSelector:o,sampling:i}=e;if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,l=[];let c=null;return Object.keys(vl).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((e=>{let i=x(e);const a=(e=>r=>{const i=Fl(r);if(al(i,n,o,!0))return;let a=null,l=e;if("pointerType"in r){switch(r.pointerType){case"mouse":a=Sl.Mouse;break;case"touch":a=Sl.Touch;break;case"pen":a=Sl.Pen}a===Sl.Touch?vl[e]===vl.MouseDown?l="TouchStart":vl[e]===vl.MouseUp&&(l="TouchEnd"):Sl.Pen}else hl(r)&&(a=Sl.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===Sl.Touch||l.startsWith("Mouse")&&a===Sl.Mouse)&&(a=null)):vl[e]===vl.Click&&(a=c,c=null);const h=hl(r)?r.changedTouches[0]:r;if(!h)return;const u=s.getId(i),{clientX:p,clientY:d}=h;Dl(t)({type:vl[l],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(e);if(window.PointerEvent)switch(vl[e]){case vl.MouseDown:case vl.MouseUp:i=i.replace("mouse","pointer");break;case vl.TouchStart:case vl.TouchEnd:return}l.push(Qa(i,a,r))})),Dl((()=>{l.forEach((e=>e()))}))}function Ul(e){let{scrollCb:t,doc:r,mirror:s,blockClass:n,blockSelector:o,sampling:i}=e;return Qa("scroll",Dl(el(Dl((e=>{const i=Fl(e);if(!i||al(i,n,o,!0))return;const a=s.getId(i);if(i===r&&r.defaultView){const e=sl(r.defaultView);t({id:a,x:e.left,y:e.top})}else t({id:a,x:i.scrollLeft,y:i.scrollTop})})),i.scroll||100)),r)}const zl=["INPUT","TEXTAREA","SELECT"],jl=new WeakMap;function Wl(e){return function(e,t){if(Zl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Zl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Zl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Zl("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 Vl(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Gl(e,t){let{mirror:r,stylesheetManager:s}=e;var n,o,i;let a=null;a="#document"===t.nodeName?r.getId(t):r.getId(Ka.host(t));const l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:i.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var t;const r=null==(t=c.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{s.adoptStyleSheets(e,a)}catch(e){}return r}}),Dl((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function Yl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),s(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),n(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),o(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),i(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),a(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),h(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),u(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),p(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),d(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t),e.recordDOM&&(s=Bl(e,e.doc));const n=function(e){let{mousemoveCb:t,sampling:r,doc:s,mirror:n}=e;if(!1===r.mousemove)return()=>{};const o="number"==typeof r.mousemove?r.mousemove:50,i="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500;let a,l=[];const c=el(Dl((e=>{const r=Date.now()-a;t(l.map((e=>(e.timeOffset-=r,e))),e),l=[],a=null})),i),h=Dl(el(Dl((e=>{const t=Fl(e),{clientX:r,clientY:s}=hl(e)?e.changedTouches[0]:e;a||(a=rl()),l.push({x:r,y:s,id:n.getId(t),timeOffset:rl()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?bl.Drag:e instanceof MouseEvent?bl.MouseMove:bl.TouchMove)})),o,{trailing:!1})),u=[Qa("mousemove",h,s),Qa("touchmove",h,s),Qa("drag",h,s)];return Dl((()=>{u.forEach((e=>e()))}))}(e),o=_l(e),i=Ul(e),a=function(e,t){let{viewportResizeCb:r}=e,{win:s}=t,n=-1,o=-1;return Qa("resize",Dl(el(Dl((()=>{const e=nl(),t=ol();n===e&&o===t||(r({width:Number(t),height:Number(e)}),n=e,o=t)})),200)),s)}(e,{win:r}),l=function(e){let{inputCb:t,doc:r,mirror:s,blockClass:n,blockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:h,userTriggeredOnInput:u}=e;function p(e){let t=Fl(e);const s=e.isTrusted,h=t&&t.tagName;if(t&&"OPTION"===h&&(t=Ka.parentElement(t)),!t||!h||zl.indexOf(h)<0||al(t,n,o,!0))return;if(t.classList.contains(i)||a&&t.matches(a))return;let p=t.value,f=!1;const m=M(t)||"";"radio"===m||"checkbox"===m?f=t.checked:(l[h.toLowerCase()]||l[m])&&(p=k({element:t,maskInputOptions:l,tagName:h,type:m,value:p,maskInputFn:c})),d(t,u?{text:p,isChecked:f,userTriggered:s}:{text:p,isChecked:f});const g=t.name;"radio"===m&&g&&f&&r.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((e=>{if(e!==t){const t=e.value;d(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function d(e,r){const n=jl.get(e);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){jl.set(e,r);const n=s.getId(e);Dl(t)({...r,id:n})}}const f=("last"===h.input?["change"]:["input","change"]).map((e=>Qa(e,Dl(p),r))),m=r.defaultView;if(!m)return()=>{f.forEach((e=>e()))};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&f.push(...y.map((e=>tl(e[0],e[1],{set(){Dl(p)({target:this,isTrusted:!1})}},!1,m)))),Dl((()=>{f.forEach((e=>e()))}))}(e),c=function(e){let{mediaInteractionCb:t,blockClass:r,blockSelector:s,mirror:n,sampling:o,doc:i}=e;const a=Dl((e=>el(Dl((o=>{const i=Fl(o);if(!i||al(i,r,s,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=i;t({type:e,id:n.getId(i),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})})),o.media||500))),l=[Qa("play",a(Il.Play),i),Qa("pause",a(Il.Pause),i),Qa("seeked",a(Il.Seeked),i),Qa("volumechange",a(Il.VolumeChange),i),Qa("ratechange",a(Il.RateChange),i)];return Dl((()=>{l.forEach((e=>e()))}))}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function(e,t){let{styleSheetRuleCb:r,mirror:s,stylesheetManager:n}=e,{win:o}=t;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Dl(((e,t,o)=>{const[i,a]=o,{id:l,styleId:c}=Vl(t,s,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length;const s="".concat(e," { ").concat(t," }");return o.CSSStyleSheet.prototype.insertRule.apply(this,[s,r])};const a=o.CSSStyleSheet.prototype.deleteRule;let l,c;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Dl(((e,t,o)=>{const[i]=o,{id:a,styleId:l}=Vl(t,s,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,removes:[{index:i}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(l=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:Dl(((e,t,o)=>{const[i]=o,{id:a,styleId:l}=Vl(t,s,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,replace:i}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(c=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:Dl(((e,t,o)=>{const[i]=o,{id:a,styleId:l}=Vl(t,s,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,replaceSync:i}),e.apply(t,o)}))}));const h={};Jl("CSSGroupingRule")?h.CSSGroupingRule=o.CSSGroupingRule:(Jl("CSSMediaRule")&&(h.CSSMediaRule=o.CSSMediaRule),Jl("CSSConditionRule")&&(h.CSSConditionRule=o.CSSConditionRule),Jl("CSSSupportsRule")&&(h.CSSSupportsRule=o.CSSSupportsRule));const u={};return Object.entries(h).forEach((e=>{let[t,o]=e;u[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[t].insertRule,{apply:Dl(((e,t,o)=>{const[i,a]=o,{id:l,styleId:c}=Vl(t.parentStyleSheet,s,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:[...Wl(t),a||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(u[t].deleteRule,{apply:Dl(((e,t,o)=>{const[i]=o,{id:a,styleId:l}=Vl(t.parentStyleSheet,s,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,removes:[{index:[...Wl(t),i]}]}),e.apply(t,o)}))})})),Dl((()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,l&&(o.CSSStyleSheet.prototype.replace=l),c&&(o.CSSStyleSheet.prototype.replaceSync=c),Object.entries(h).forEach((e=>{let[t,r]=e;r.prototype.insertRule=u[t].insertRule,r.prototype.deleteRule=u[t].deleteRule}))}))}(e,{win:r}),u=Gl(e,e.doc),p=function(e,t){let{styleDeclarationCb:r,mirror:s,ignoreCSSAttributes:n,stylesheetManager:o}=e,{win:i}=t;const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Dl(((e,t,i)=>{var l;const[c,h,u]=i;if(n.has(c))return a.apply(t,[c,h,u]);const{id:p,styleId:d}=Vl(null==(l=t.parentRule)?void 0:l.parentStyleSheet,s,o.styleMirror);return(p&&-1!==p||d&&-1!==d)&&r({id:p,styleId:d,set:{property:c,value:h,priority:u},index:Wl(t.parentRule)}),e.apply(t,i)}))});const l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Dl(((e,t,i)=>{var a;const[c]=i;if(n.has(c))return l.apply(t,[c]);const{id:h,styleId:u}=Vl(null==(a=t.parentRule)?void 0:a.parentStyleSheet,s,o.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,remove:{property:c},index:Wl(t.parentRule)}),e.apply(t,i)}))}),Dl((()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:r}),e.collectFonts&&(d=function(e){let{fontCb:t,doc:r}=e;const s=r.defaultView;if(!s)return()=>{};const n=[],o=new WeakMap,i=s.FontFace;s.FontFace=function(e,t,r){const s=new i(e,t,r);return o.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const a=Ha(r.fonts,"add",(function(e){return function(r){return setTimeout(Dl((()=>{const e=o.get(r);e&&(t(e),o.delete(r))})),0),e.apply(this,[r])}}));return n.push((()=>{s.FontFace=i})),n.push(a),Dl((()=>{n.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=Dl((()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:h}=o;al(i,s,n,!0)||al(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:h})}o({ranges:a})}));return a(),Qa("selectionchange",a)}(e),m=function(e){let{doc:t,customElementCb:r}=e;const s=t.defaultView;return s&&s.customElements?Ha(s.customElements,"define",(function(e){return function(t,s,n){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,s,n])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return Dl((()=>{Pl.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach((e=>e()))}))}function Zl(e){return void 0!==window[e]}function Jl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Xl{constructor(e){n(this,"iframeIdToRemoteIdMap",new WeakMap),n(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}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 Hl{constructor(e){n(this,"iframes",new WeakMap),n(this,"crossOriginIframeMap",new WeakMap),n(this,"crossOriginIframeMirror",new Xl(U)),n(this,"crossOriginIframeStyleMirror"),n(this,"crossOriginIframeRootIdMap",new WeakMap),n(this,"mirror"),n(this,"mutationCb"),n(this,"wrappedEmit"),n(this,"loadListener"),n(this,"stylesheetManager"),n(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Xl(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 wl.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:wl.IncrementalSnapshot,data:{source:bl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case wl.Meta:case wl.Load:case wl.DomContentLoaded:return!1;case wl.Plugin:return t;case wl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case wl.IncrementalSnapshot:switch(t.data.source){case bl.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 bl.Drag:case bl.TouchMove:case bl.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case bl.ViewportResize:return!1;case bl.MediaInteraction:case bl.MouseInteraction:case bl.Scroll:case bl.CanvasMutation:case bl.Input:return this.replaceIds(t.data,e,["id"]),t;case bl.StyleSheetRule:case bl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case bl.Font:return t;case bl.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case bl.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===kl.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Kl{constructor(e){n(this,"shadowDoms",new WeakSet),n(this,"mutationCb"),n(this,"scrollCb"),n(this,"bypassOptions"),n(this,"mirror"),n(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(!v(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Bl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(Ul({...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(Ka.host(e))),this.restoreHandlers.push(Gl({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(Ha(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=Ka.shadowRoot(this);return o&&yl(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Ql="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ql="undefined"==typeof Uint8Array?[]:new Uint8Array(256),$l=0;$l<64;$l++)ql[Ql.charCodeAt($l)]=$l;const ec=new Map;const tc=(e,t,r)=>{if(!e||!nc(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=ec.get(e);return r||(r=new Map,ec.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 rc(e,t,r){if(e instanceof Array)return e.map((e=>rc(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+=Ql[r[t]>>2],n+=Ql[(3&r[t])<<4|r[t+1]>>4],n+=Ql[(15&r[t+1])<<2|r[t+2]>>6],n+=Ql[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:[rc(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:[rc(e.data,t,r),e.width,e.height]}}if(nc(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:tc(e,t,r)}}return e}const sc=(e,t,r)=>e.map((e=>rc(e,t,r))),nc=(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 oc(e,t,r,s){const n=[];try{const o=Ha(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(!al(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(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function ic(e,t,r,s,n,o){const i=[],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=Ha(e,l,(function(e){return function(){for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];const h=e.apply(this,a);if(tc(h,o,this),"tagName"in this.canvas&&!al(this.canvas,s,n,!0)){const e=sc(a,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return h}}));i.push(a)}catch{const s=tl(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const ac="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",lc="undefined"!=typeof window&&window.Blob&&new Blob([(cc=ac,Uint8Array.from(atob(cc),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var cc;function hc(e){let t;try{if(t=lc&&(window.URL||window.webkitURL).createObjectURL(lc),!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,"+ac,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class uc{constructor(e){n(this,"pendingCanvasMutations",new Map),n(this,"rafStamps",{latestId:0,invokeId:null}),n(this,"mirror"),n(this,"mutationCb"),n(this,"resetObservers"),n(this,"frozen",!1),n(this,"locked",!1),n(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:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,s,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,o,{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 o=oc(t,r,s,!0),i=new Map,a=new hc;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:Cl["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{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 c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{al(t,r,s,!0)||e.push(t)})),e})().forEach((async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.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])}))),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=oc(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=Ha(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return al(this.canvas,r,s,!0)||setTimeout((()=>{const r=sc(a,t,this);e(this.canvas,{type:Cl["2D"],property:i,args:r})}),0),n.apply(this,a)}}));n.push(o)}catch{const r=tl(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:Cl["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...ic(t.WebGLRenderingContext.prototype,Cl.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...ic(t.WebGL2RenderingContext.prototype,Cl.WebGL2,e,r,s,t)),()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}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 pc{constructor(e){n(this,"trackedLinkElements",new WeakSet),n(this,"mutationCb"),n(this,"adoptedStyleSheetCb"),n(this,"styleMirror",new fl),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 dc{constructor(){n(this,"nodeMap",new WeakMap),n(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 fc,mc,gc,yc=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(r=e.contentWindow)?void 0:r.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const wc=new I;function bc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:k=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:R,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:N=new Set([]),errorHandler:T}=e;Ll=T;const L=!k||window.parent===window;let D=!1;if(!L)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!D)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),wc.reset();const P=!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!==p?p:{password:!0},F=ee(d);let B;!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 _=0;const U=e=>{for(const t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};fc=(e,n)=>{var o;const i=e;if(i.timestamp=rl(),!(null==(o=Pl[0])?void 0:o.isFrozen())||i.type===wl.FullSnapshot||i.type===wl.IncrementalSnapshot&&i.data.source===bl.Mutation||Pl.forEach((e=>e.unfreeze())),L)null==t||t(U(i),n);else if(D){const e={type:"rrweb",event:U(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===wl.FullSnapshot)B=i,_=0;else if(i.type===wl.IncrementalSnapshot){if(i.data.source===bl.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-B.timestamp>r;(e||t)&&mc(!0)}};const z=e=>{fc({type:wl.IncrementalSnapshot,data:{source:bl.Mutation,...e}})},j=e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.Scroll,...e}}),W=e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.CanvasMutation,...e}}),V=new pc({mutationCb:z,adoptedStyleSheetCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.AdoptedStyleSheet,...e}})}),G=new Hl({mirror:wc,mutationCb:z,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:fc});for(const e of R||[])e.getMirror&&e.getMirror({nodeMirror:wc,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Y=new dc;gc=new uc({recordCanvas:C,mutationCb:W,win:window,blockClass:n,blockSelector:o,mirror:wc,sampling:w.canvas,dataURLOptions:b});const Z=new Kl({mutationCb:z,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:A,sampling:w,slimDOMOptions:F,iframeManager:G,stylesheetManager:V,canvasManager:gc,keepIframeSrcFn:E,processedNodeManager:Y},mirror:wc});mc=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!S)return;fc({type:wl.Meta,data:{href:window.location.href,width:ol(),height:nl()}},e),V.reset(),Z.init(),Pl.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new I,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=(()=>!1)}=t||{};return te(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{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===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:ee(d),dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:wc,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:b,recordCanvas:C,inlineImages:A,onSerialize:e=>{ul(e,wc)&&G.addIframe(e),pl(e,wc)&&V.trackLinkElement(e),dl(e)&&Z.addShadowRoot(Ka.shadowRoot(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:E});if(!t)return console.warn("Failed to snapshot the document");fc({type:wl.FullSnapshot,data:{node:t,initialOffset:sl(window)}},e),Pl.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,wc.getId(document))};try{const e=[],t=e=>{var t;return Dl(Yl)({mutationCb:z,mousemoveCb:(e,t)=>fc({type:wl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.ViewportResize,...e}}),inputCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.Input,...e}}),mediaInteractionCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.MediaInteraction,...e}}),styleSheetRuleCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.StyleSheetRule,...e}}),styleDeclarationCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>fc({type:wl.IncrementalSnapshot,data:{source:bl.Font,...e}}),selectionCb:e=>{fc({type:wl.IncrementalSnapshot,data:{source:bl.Selection,...e}})},customElementCb:e=>{fc({type:wl.IncrementalSnapshot,data:{source:bl.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:S,recordCanvas:C,inlineImages:A,userTriggeredOnInput:O,collectFonts:M,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:F,dataURLOptions:b,mirror:wc,iframeManager:G,stylesheetManager:V,shadowDomManager:Z,processedNodeManager:Y,canvasManager:gc,ignoreCSSAttributes:N,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=>fc({type:wl.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};G.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{mc(),e.push(t(document)),yc=!0};return["interactive","complete"].includes(document.readyState)?r():(e.push(Qa("DOMContentLoaded",(()=>{fc({type:wl.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()}))),e.push(Qa("load",(()=>{fc({type:wl.Load,data:{}}),"load"===x&&r()}),window))),()=>{e.forEach((e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}})),Y.destroy(),yc=!1,Ll=void 0}}catch(e){console.warn(e)}}var vc,Sc;bc.addCustomEvent=(e,t)=>{if(!yc)throw new Error("please add custom event after start recording");fc({type:wl.Custom,data:{tag:e,payload:t}})},bc.freezePage=()=>{Pl.forEach((e=>e.freeze()))},bc.takeFullSnapshot=e=>{if(!yc)throw new Error("please take full snapshot after start recording");mc(e)},bc.mirror=wc,(Sc=vc||(vc={}))[Sc.NotStarted=0]="NotStarted",Sc[Sc.Running=1]="Running",Sc[Sc.Stopped=2]="Stopped";const Cc={...console},Ic=["log","info","error","warn","debug"].reduce(((e,t)=>(e[t]=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];console[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...r)},e.unproxy[t]=function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];Cc[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...r)},e)),{unproxy:{}});class kc{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,"name","RRWebPlugin"),t(this,"stopListener",null),this.options=e}onInit(e){let{socketStore:t}=e;if("object"!=typeof window||"object"!=typeof document||"[object HTMLDocument]"!==Object.prototype.toString.call(document))return void Ic.warn("".concat(this.name," can only used in browser environment"));if(!MutationObserver)return void Ic.warn("".concat(this.name," built on the MutationObserver API and it's not detected in the current browser"));if(kc.hasInited)return;kc.hasInited=!0;const{allowOnline:r=!1,...s}=this.options,n=bc({...s,emit(e){const r=function(e,t){return{role:"client",type:e,data:{...(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&{id:Math.random().toString(36).slice(2)},...t}}}("rrweb-event",e);t.dispatchEvent("public-data",r)}});t.addListener("harbor-clear",(()=>{bc.takeFullSnapshot()})),n&&(this.stopListener=n)}onReset(){var e;null===(e=this.stopListener)||void 0===e||e.call(this),kc.hasInited=!1}}t(kc,"hasInited",!1);export{kc as default};
//# sourceMappingURL=index.min.js.map